Bug 2088472
| Summary: | Golden Images import cron jobs are not getting updated on upgrade to 4.11 | ||
|---|---|---|---|
| Product: | Container Native Virtualization (CNV) | Reporter: | Oren Cohen <ocohen> |
| Component: | Storage | Assignee: | Arnon Gilboa <agilboa> |
| Status: | CLOSED ERRATA | QA Contact: | Yan Du <yadu> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 4.11.0 | CC: | alitke, cnv-qe-bugs, mocohen, yadu |
| Target Milestone: | --- | ||
| Target Release: | 4.11.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | CNV v4.11.0-478 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-09-14 19:34:26 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 2102349 | ||
| Bug Blocks: | |||
After upgrade CNV v4.10 to CNV v4.11.0-560, all the cronjobs are updated to 4.11 image (virt-cdi-importer-container-v4.11.0-59)
apiVersion: batch/v1
kind: CronJob
----------------------8<-----------------------
app.kubernetes.io/component: storage
app.kubernetes.io/managed-by: cdi-controller
app.kubernetes.io/part-of: hyperconverged-cluster
app.kubernetes.io/version: 4.11.0
cdi.kubevirt.io/dataImportCron: openshift-virtualization-os-images.centos-stream8-image-cron
name: centos-stream8-image-cron-49e5e706
namespace: openshift-cnv
ownerReferences:
- apiVersion: cdi.kubevirt.io/v1beta1
blockOwnerDeletion: true
controller: true
kind: CDI
name: cdi-kubevirt-hyperconverged
uid: 99478e82-bd72-4432-b36f-2ebf8c359ee4
resourceVersion: "5815684"
uid: bd00cb4e-71af-4eab-9982-e3072ed820b2
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:3e67ebdde21b50407f5fd4b07347dcf0d9009a9deaeef377c0d0caa21e78e41a
imagePullPolicy: IfNotPresent
name: cdi-source-update-poller
----------------------8<-----------------------
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Virtualization 4.11.0 Images security and bug fix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:6526 |
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: