Bug 1895934 - dataVolumeTemplates and DataVolume - apiVersion mismatch
Summary: dataVolumeTemplates and DataVolume - apiVersion mismatch
Keywords:
Status: CLOSED DUPLICATE of bug 1853352
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.7.0
Assignee: Tomas Jelinek
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-09 13:28 UTC by Ruth Netser
Modified: 2021-01-08 15:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-14 11:26:24 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Ruth Netser 2020-11-09 13:28:09 UTC
Description of problem:
Created PVC, DataVolume apiVersion is cdi.kubevirt.io/v1beta1
Created VM from cloned PVC, dataVolumeTemplates DataVolume apiVersion is cdi.kubevirt.io/v1alpha1

Version-Release number of selected component (if applicable):
OCP 4.6.1, CNV 2.5.0

How reproducible:
100%

Steps to Reproduce:
** Create a PVC from the UI using "with data upload form" (tested with golden image ns)

Created PVC, DV apiVersion is cdi.kubevirt.io/v1beta1

** Create a VM using the above PVC (as golden image attached to a template)
Created VM, dataVolumeTemplates DataVolume apiVersion is cdi.kubevirt.io/v1alpha1


Expected results:
Consistent api version between the source PVC and target data volume in dataVolumeTemplates

Additional info:
======= PVC ======
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  annotations:
    cdi.kubevirt.io/storage.pod.restarts: '0'
    cdi.kubevirt.io/storage.pod.ready: 'false'
    pv.kubernetes.io/bind-completed: 'yes'
    cdi.kubevirt.io/storage.upload.target: ''
    cdi.kubevirt.io/storage.condition.bound.message: ''
    cdi.kubevirt.io/storage.condition.running.message: Upload Complete
    cdi.kubevirt.io/storage.condition.bound: 'true'
    cdi.kubevirt.io/storage.condition.running: 'false'
    cdi.kubevirt.io/storage.uploadPodName: cdi-upload-rhel8
    pv.kubernetes.io/bound-by-controller: 'yes'
    cdi.kubevirt.io/storage.pod.phase: Succeeded
    cdi.kubevirt.io/storage.condition.running.reason: Completed
    cdi.kubevirt.io/storage.condition.bound.reason: ''
  selfLink: >-
    /api/v1/namespaces/openshift-virtualization-os-images/persistentvolumeclaims/rhel8
  resourceVersion: '13025828'
  name: rhel8
  uid: 0ce89797-d5c8-46cc-a5f6-f23bb1eda8ac
  creationTimestamp: '2020-11-09T11:08:00Z'
  managedFields:
    - manager: kube-controller-manager
      operation: Update
      apiVersion: v1
      time: '2020-11-09T11:08:00Z'
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            'f:pv.kubernetes.io/bind-completed': {}
            'f:pv.kubernetes.io/bound-by-controller': {}
        'f:spec':
          'f:volumeName': {}
        'f:status':
          'f:accessModes': {}
          'f:capacity':
            .: {}
            'f:storage': {}
          'f:phase': {}
    - manager: virt-cdi-controller
      operation: Update
      apiVersion: v1
      time: '2020-11-09T11:09:05Z'
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            'f:cdi.kubevirt.io/storage.condition.bound': {}
            'f:cdi.kubevirt.io/storage.condition.running': {}
            'f:cdi.kubevirt.io/storage.uploadPodName': {}
            'f:cdi.kubevirt.io/storage.pod.phase': {}
            .: {}
            'f:cdi.kubevirt.io/storage.pod.ready': {}
            'f:cdi.kubevirt.io/storage.condition.running.reason': {}
            'f:cdi.kubevirt.io/storage.condition.bound.reason': {}
            'f:cdi.kubevirt.io/storage.upload.target': {}
            'f:cdi.kubevirt.io/storage.pod.restarts': {}
            'f:cdi.kubevirt.io/storage.condition.bound.message': {}
            'f:cdi.kubevirt.io/storage.condition.running.message': {}
          'f:labels':
            .: {}
            'f:app': {}
          'f:ownerReferences':
            .: {}
            'k:{"uid":"bcff5023-7cc6-4214-973d-9795610edecc"}':
              .: {}
              'f:apiVersion': {}
              'f:blockOwnerDeletion': {}
              'f:controller': {}
              'f:kind': {}
              'f:name': {}
              'f:uid': {}
        'f:spec':
          'f:accessModes': {}
          'f:resources':
            'f:requests':
              .: {}
              'f:storage': {}
          'f:storageClassName': {}
          'f:volumeMode': {}
  namespace: openshift-virtualization-os-images
  ownerReferences:
    - apiVersion: cdi.kubevirt.io/v1beta1
      kind: DataVolume
      name: rhel8
      uid: bcff5023-7cc6-4214-973d-9795610edecc
      controller: true
      blockOwnerDeletion: true
  finalizers:
    - kubernetes.io/pvc-protection
  labels:
    app: containerized-data-importer
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 5Gi
  volumeName: pv8
  storageClassName: nfs
  volumeMode: Filesystem
status:
  phase: Bound
  accessModes:
    - ReadWriteMany
    - ReadWriteOnce
  capacity:
    storage: 5Gi


======= VM ======
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
  annotations:
    kubevirt.io/latest-observed-api-version: v1alpha3
    kubevirt.io/storage-observed-api-version: v1alpha3
    name.os.template.kubevirt.io/rhel8.3: Red Hat Enterprise Linux 8.0 or higher
  selfLink: >-
    /apis/kubevirt.io/v1alpha3/namespaces/default/virtualmachines/fed8-template-gi
  resourceVersion: '13055867'
  name: fed8-template-gi
  uid: 4a0b0c0b-d77c-44bb-870c-4b71bebc8f81
  creationTimestamp: '2020-11-09T11:24:57Z'
  generation: 1
  managedFields:
    - apiVersion: kubevirt.io/v1alpha3
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            .: {}
            'f:name.os.template.kubevirt.io/rhel8.3': {}
          'f:labels':
            'f:vm.kubevirt.io/template.version': {}
            'f:os.template.kubevirt.io/rhel8.3': {}
            'f:vm.kubevirt.io/template.namespace': {}
            'f:app': {}
            .: {}
            'f:vm.kubevirt.io/template.revision': {}
            'f:workload.template.kubevirt.io/server': {}
            'f:flavor.template.kubevirt.io/tiny': {}
            'f:vm.kubevirt.io/template': {}
        'f:spec':
          .: {}
          'f:dataVolumeTemplates': {}
          'f:running': {}
          'f:template':
            .: {}
            'f:metadata':
              .: {}
              'f:labels':
                .: {}
                'f:flavor.template.kubevirt.io/tiny': {}
                'f:kubevirt.io/domain': {}
                'f:kubevirt.io/size': {}
                'f:os.template.kubevirt.io/rhel8.3': {}
                'f:vm.kubevirt.io/name': {}
                'f:workload.template.kubevirt.io/server': {}
            'f:spec':
              .: {}
              'f:domain':
                .: {}
                'f:cpu':
                  .: {}
                  'f:cores': {}
                  'f:sockets': {}
                  'f:threads': {}
                'f:devices':
                  .: {}
                  'f:disks': {}
                  'f:interfaces': {}
                  'f:networkInterfaceMultiqueue': {}
                  'f:rng': {}
                'f:machine':
                  .: {}
                  'f:type': {}
                'f:resources':
                  .: {}
                  'f:requests':
                    .: {}
                    'f:memory': {}
              'f:evictionStrategy': {}
              'f:hostname': {}
              'f:networks': {}
              'f:terminationGracePeriodSeconds': {}
              'f:volumes': {}
      manager: Mozilla
      operation: Update
      time: '2020-11-09T11:24:56Z'
    - apiVersion: kubevirt.io/v1alpha3
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            'f:kubevirt.io/latest-observed-api-version': {}
            'f:kubevirt.io/storage-observed-api-version': {}
        'f:status': {}
      manager: virt-controller
      operation: Update
      time: '2020-11-09T11:24:57Z'
  namespace: default
  labels:
    app: fed8-template-gi
    flavor.template.kubevirt.io/tiny: 'true'
    os.template.kubevirt.io/rhel8.3: 'true'
    vm.kubevirt.io/template: rhel8-server-tiny-v0.11.3
    vm.kubevirt.io/template.namespace: openshift
    vm.kubevirt.io/template.revision: '1'
    vm.kubevirt.io/template.version: v0.12.3
    workload.template.kubevirt.io/server: 'true'
spec:
  dataVolumeTemplates:
    - apiVersion: cdi.kubevirt.io/v1alpha1
      kind: DataVolume
      metadata:
        creationTimestamp: null
        name: fed8-template-gi-rootdisk-bgkgp
      spec:
        pvc:
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 5Gi
          volumeMode: Filesystem
        source:
          pvc:
            name: rhel8
            namespace: openshift-virtualization-os-images
  running: false
  template:
    metadata:
      creationTimestamp: null
      labels:
        flavor.template.kubevirt.io/tiny: 'true'
        kubevirt.io/domain: fed8-template-gi
        kubevirt.io/size: tiny
        os.template.kubevirt.io/rhel8.3: 'true'
        vm.kubevirt.io/name: fed8-template-gi
        workload.template.kubevirt.io/server: 'true'
    spec:
      domain:
        cpu:
          cores: 1
          sockets: 1
          threads: 1
        devices:
          disks:
            - disk:
                bus: virtio
              name: cloudinitdisk
            - bootOrder: 1
              disk:
                bus: virtio
              name: rootdisk
          interfaces:
            - masquerade: {}
              model: virtio
              name: nic-0
          networkInterfaceMultiqueue: true
          rng: {}
        machine:
          type: pc-q35-rhel8.2.0
        resources:
          requests:
            memory: 1536Mi
      evictionStrategy: LiveMigrate
      hostname: fed8-template-gi
      networks:
        - name: nic-0
          pod: {}
      terminationGracePeriodSeconds: 180
      volumes:
        - cloudInitNoCloud:
            userData: |
              #cloud-config
              user: cloud-user
              password: 48yc-j8hc-hhcs
              chpasswd:
                expire: false
          name: cloudinitdisk
        - dataVolume:
            name: fed8-template-gi-rootdisk-bgkgp
          name: rootdisk

Comment 1 Ruth Netser 2020-11-09 13:30:23 UTC
@Adam, can you please advise about to the impact of this bug?

Comment 2 Yaacov Zamir 2020-11-09 13:32:31 UTC
Notes:

We have a PR for this:
https://github.com/openshift/console/pull/6739 

We didn't merge because:
"this code should work with 2.4 as well, lets make sure we really really need it"

Comment 3 Yaacov Zamir 2020-11-09 13:45:11 UTC
Note: "console kubevirt plugin" version 4.7 does need to support cnv 2.4.

Comment 4 Yaacov Zamir 2020-12-14 11:26:24 UTC

*** This bug has been marked as a duplicate of bug 1853352 ***


Note You need to log in before you can comment on or make changes to this bug.