Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-18498

[2088472] Golden Images import cron jobs are not getting updated on upgrade to 4.11

XMLWordPrintable

    • Storage Core Sprint 220, Storage Core Sprint 221
    • High
    • No

      Description of problem:
      When CNV is being upgraded from 4.10 to 4.11, the CronJobs resources are staying the same as in 4.10, and referring to virt-cdi-importer image of the previous version, rather than the current (upgraded) one.

      $ oc get csv
      NAME DISPLAY VERSION REPLACES PHASE
      kubevirt-hyperconverged-operator.v4.11.0 OpenShift Virtualization 4.11.0 kubevirt-hyperconverged-operator.v4.10.1 Succeeded

      $ oc get clusterversion
      NAME VERSION AVAILABLE PROGRESSING SINCE STATUS
      version 4.11.0-0.ci-2022-05-16-202609 True False 19h Cluster version is 4.11.0-0.ci-2022-05-16-202609

      $ oc get cj centos-stream8-image-cron-ccd4c750 -o yaml
      apiVersion: batch/v1
      kind: CronJob
      metadata:
      creationTimestamp: "2022-05-12T15:48:20Z"
      generation: 1
      labels:
      app.kubernetes.io/component: storage
      app.kubernetes.io/managed-by: cdi-controller
      app.kubernetes.io/part-of: hyperconverged-cluster
      app.kubernetes.io/version: 4.10.1 # <-- NOTE THE VERSION WASN'T UPDATED
      cdi.kubevirt.io/dataImportCron: openshift-virtualization-os-images.centos-stream8-image-cron
      name: centos-stream8-image-cron-ccd4c750
      namespace: openshift-cnv
      ownerReferences:

      • apiVersion: cdi.kubevirt.io/v1beta1
        blockOwnerDeletion: true
        controller: true
        kind: CDI
        name: cdi-kubevirt-hyperconverged
        uid: a3cdcb47-33ab-493d-9d72-a6e14c35201f
        resourceVersion: "15783003"
        uid: c7a5151c-433c-4b87-94e4-e94aa7e53cd3
        spec:
        concurrencyPolicy: Forbid
        failedJobsHistoryLimit: 0
        jobTemplate:
        metadata:
        creationTimestamp: null
        spec:
        backoffLimit: 2
        template:
        metadata:
        creationTimestamp: null
        spec:
        containers:
      • command:
      • /usr/bin/cdi-source-update-poller
      • -ns
      • openshift-virtualization-os-images
      • -cron
      • centos-stream8-image-cron
      • -url
      • docker://quay.io/containerdisks/centos-stream:8
        image: registry.redhat.io/container-native-virtualization/virt-cdi-importer@sha256:218f34e846ce4bcede87261d712bf130f6158b405b443cdf6491026d12f1f348 # <-- this refers to an 4.10.1 image.
        imagePullPolicy: IfNotPresent
        name: cdi-source-update-poller
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        dnsPolicy: ClusterFirst
        restartPolicy: Never
        schedulerName: default-scheduler
        securityContext: {}
        serviceAccount: cdi-cronjob
        serviceAccountName: cdi-cronjob
        terminationGracePeriodSeconds: 0
        ttlSecondsAfterFinished: 0
        schedule: 24 5/12 * * *
        successfulJobsHistoryLimit: 0
        suspend: false
        status:
        lastScheduleTime: "2022-05-19T05:24:00Z"

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

      How reproducible:
      Always

      Steps to Reproduce:
      1. Install CNV 4.10.1 with enableCommonBootImageImport feature gate enabled.
      2. Upgrade to CNV 4.11.0
      3. Note that all CronJob resources in openshift-cnv namespace are the same as in 4.10.1

      Actual results:
      DataImport CronJobs are using old version of virt-cdi-importer image.

      Expected results:
      The CronJobs should be refreshed on upgrade by CDI, referring to virt-cdi-importer image shipped in the upgraded version.

      Additional info:

              agilboa@redhat.com Arnon Gilboa
              ocohen@redhat.com Oren Cohen
              Yan Du Yan Du
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: