Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-17810

MCO API erroneously contains certificate dates typed/formatted as strings, violates API conformance

XMLWordPrintable

    • Important
    • No
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      The MCO's "Certificate Observability" CRD fields (introduced in MCO-607) are non-RFC3339 formatted strings and are unparseable as the API standard metav1.Time
      
      For context, the MCO is currently migrating its API to openshift/api where it needs to comply with API standards, and if these strings are still present in the API when 4.14 ships, we will be unable to upgrade from the shipping version to the one where the API has migrated, so we need to adjust this now before it ships. 

      Version-Release number of selected component (if applicable):

       

      How reproducible:

      100% 

      Steps to Reproduce:

      1.Create a cluster
      2.Observe ControllerConfig status.controllerCertificates
      3.Observe MachineConfigPool status.certExpirys
      

      Actual results:

      Types are wrong, and strings are formatted thusly: 2033-08-12 01:47:54 +0000 UTC 

      Expected results:

      ControllerConfig and MachineConfigPools do not contain certificate observability fields formatted as "2033-08-12 01:47:54 +0000 UTC".
      
      Either contain certificate observability fields formatted as "2006-01-02T15:04:05Z07:00" or should not contain them at all. 

      Additional info:

      If we ship 4.14 with these strings how they are, we will be stuck like that and unable to easily upgrade out of it (because the new MCO that regards the fields as metav1.Time will be unable to parse the old strings), e.g.
      
      2023-08-15T05:03:40.989575279Z W0815 05:03:40.989527 1 reflector.go:533] github.com/openshift/client-go/machineconfiguration/informers/externalversions/factory.go:101: failed to list *v1.MachineConfigPool: parsing time "2033-08-12 01:47:54 +0000 UTC" as "2006-01-02T15:04:05Z07:00": cannot parse " 01:47:54 +0000 UTC" as "T" 2023-08-15T05:03:40.989575279Z E0815 05:03:40.989555 1 reflector.go:148] github.com/openshift/client-go/machineconfiguration/informers/externalversions/factory.go:101: Failed to watch *v1.MachineConfigPool: failed to list *v1.MachineConfigPool: parsing time "2033-08-12 01:47:54 +0000 UTC" as "2006-01-02T15:04:05Z07:00": cannot parse " 01:47:54 +0000 UTC" as "T" 2023-08-15T05:04:05.304139210Z W0815 05:04:05.304088 1 reflector.go:533] github.com/openshift/client-go/machineconfiguration/informers/externalversions/factory.go:101: failed to list *v1.ControllerConfig: parsing time "2033-08-12 01:47:54 +0000 UTC" as "2006-01-02T15:04:05Z07:00": cannot parse " 01:47:54 +0000 UTC" as "T" 2023-08-15T05:04:05.304139210Z E0815 05:04:05.304121 1 reflector.go:148] github.com/openshift/client-go/machineconfiguration/informers/externalversions/factory.go:101: Failed to watch *v1.ControllerConfig: failed to list *v1.ControllerConfig: parsing time "2033-08-12 01:47:54 +0000 UTC" as "2006-01-02T15:04:05Z07:00": cannot parse " 01:47:54 +0000 UTC" as "T"           
      
      
      

            jkyros@redhat.com John Kyros
            jkyros@redhat.com John Kyros
            Sergio Regidor de la Rosa Sergio Regidor de la Rosa
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: