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

[2061723] Prevent new DataImportCron to manage DataSource if multiple DataImportCron pointing to same DataSource

XMLWordPrintable

    • Storage Core Sprint 219, Storage Core Sprint 220
    • Medium

      Description of problem:
      Prevent DataSource being managed by other DataImportCron if multiple DataImportCron pointing to same DataSource

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

      How reproducible:
      Always

      Steps to Reproduce:
      1. Create two dataimportcrons pointing to same datasource
      $ oc get dic
      NAME AGE
      rhel8-image-import-cron 35m
      rhel8-image-import-cron2 29m

      Actual results:
      The datasource is managed by the second dic
      $ oc get das -o yaml
      apiVersion: v1
      items:

      • apiVersion: cdi.kubevirt.io/v1beta1
        kind: DataSource
        metadata:
        creationTimestamp: "2022-03-08T11:33:27Z"
        generation: 4
        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.0
        cdi.kubevirt.io/dataImportCron: rhel8-image-import-cron2 <====
        name: rhel8
        namespace: default
        resourceVersion: "8762731"
        uid: a7ae4b44-4357-4a9b-8f08-d1bb5221bf76
        spec:
        source:
        pvc:
        name: rhel8-67f0ea617157
        namespace: default
        status:
        conditions:
      • lastHeartbeatTime: "2022-03-08T11:34:56Z"
        lastTransitionTime: "2022-03-08T11:34:56Z"
        message: DataSource is ready to be consumed
        reason: Ready
        status: "True"
        type: Ready
        kind: List
        metadata:
        resourceVersion: ""
        selfLink: ""

      Expected results:
      Got some warning message that prevent two dic point to same datasource

      Additional info:

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

              Created:
              Updated:
              Resolved: