Uploaded image for project: 'OpenShift Hive'
  1. OpenShift Hive
  2. HIVE-3060

ClusterSync: resource not recreated when version changes

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • openshift-4.22
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • None
    • None
    • None

      From https://github.com/openshift/hive/issues/2839

      See discussion in https://github.com/openshift/hive/pull/2840

      Repro:

      • I have multiple versions of a CRD
      • I have a syncset with resources including an instance at one version
      • I edit the syncset to change that instance to a different version

      Expected: CR on the spoke is deleted and recreated immediately.
      Actual: CR on the spoke is deleted, but not recreated until the next reconcile is triggered.

      I experimented with this by duplicating the schema for clusterimageset, making the second copy's spec.versions[].name: v2 and changing v1's storage: false. (The result is that etcd will always get v2.)

      Then I used a syncset like:

      apiVersion: hive.openshift.io/v1
      kind: SyncSet
      metadata:
        name: myss
      spec:
        clusterDeploymentRefs:
        - name: efried
        resourceApplyMode: Sync
        resources:
        - apiVersion: hive.openshift.io/v1
          kind: ClusterImageSet
          metadata:
            name: myimgset
          spec:
            releaseImage: foo
      

      and twiddled the SyncSet's spec.resources[].apiVersion between hive.openshift.io/v1 and hive.openshift.io/v2.

              Unassigned Unassigned
              efried.openshift Eric Fried
              None
              None
              Mingxia Huang Mingxia Huang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: