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

HCP applies featureset-guarded manifests when bootstrapping CVO

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 4.18.0
    • HyperShift
    • Moderate
    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      CVO manifests contain some feature-gated ones:

      • since at least 4.16, there are feature-gated ClusterVersion CRDs
      • UpdateStatus API feature is delivered through DevPreview (now) and TechPreview (later) feature set

      We observed HyperShift CI jobs to fail when adding DevPreview-gated deployment manifests to CVO, which was unexpected. Investigating further, we discovered that HyperShift applies them:

      error: error parsing /var/payload/manifests/0000_00_update-status-controller_03_deployment-DevPreviewNoUpgrade.yaml: error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{".ReleaseImage":interface {}(nil)}
      

      But even without these added manifests, this happens for existing ClusterVersion CRD manifests present in the payload:

      $ ls -1 manifests/*clusterversions*crd.yaml
      manifests/0000_00_cluster-version-operator_01_clusterversions-CustomNoUpgrade.crd.yaml
      manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml
      manifests/0000_00_cluster-version-operator_01_clusterversions-DevPreviewNoUpgrade.crd.yaml
      manifests/0000_00_cluster-version-operator_01_clusterversions-TechPreviewNoUpgrade.crd.yaml
      

      In a passing HyperShift CI job, the same log shows that all four manifests are applied instead of just one:

      customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io created
      customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured
      customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured
      customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured
      

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

      4.18

      How reproducible:

      Always

      Steps to Reproduce:

      1. inspect the cluster-version-operator-*-bootstrap.log of a HyperShift CI job

      Actual results:

      customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io created
      customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured
      customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured
      customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io configured
      

      = all four ClusterVersion CRD manifests are applied

      Expected results:

      customresourcedefinition.apiextensions.k8s.io/clusterversions.config.openshift.io created
      

      = ClusterVersion CRD manifest is applied just once

      Additional info

      I'm filing this card so that I can link it to the "easy" fix https://github.com/openshift/hypershift/pull/5093 which is not the perfect fix, but allows us to add featureset-gated manifests to CVO without breaking HyperShift. It is desirable to improve this even further and actually correctly select the manifests to be applied for CVO bootstrap, but that involves non-trivial logic similar to one used by CVO and it seems to be better approached as a feature to be properly assessed and implemented, rather than a bugfix, so I'll file a separate HOSTEDCP card for that.

              afri@afri.cz Petr Muller
              afri@afri.cz Petr Muller
              Jie Zhao Jie Zhao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: