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

[4.18] VMSnapshot 'InProgress' and Failing for a VM with InstanceType and Preference

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • CNV v4.18.0
    • CNV v4.18.0
    • Storage Platform
    • None
    • Quality / Stability / Reliability
    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • CNV v4.18.0.rhel9-264
    • Storage Core Sprint 262, Storage Core Sprint 263
    • None

      Description of problem:

      Can't snapshot a VM with InstanceType and Preference

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

      4.18

      How reproducible:

      Always

      Steps to Reproduce:

      1. Create a VM with InstanceType
      
      2. Create a Snapshot
      
      $ cat snap.yaml 
      apiVersion: snapshot.kubevirt.io/v1beta1
      kind: VirtualMachineSnapshot
      metadata:
        name: snapp-larryy
      spec:
        source:
          apiGroup: kubevirt.io
          kind: VirtualMachine
          name: fedora-pink-fowl-56
      

      Actual results:

      VMSnapshot fails
      
      $ oc get vmsnapshot 
      NAME           SOURCEKIND       SOURCENAME            PHASE        READYTOUSE   CREATIONTIME   ERROR
      snap-larry     VirtualMachine   fedora-pink-fowl-56   Failed       false                       
      snapp-larryy   VirtualMachine   fedora-pink-fowl-56   InProgress   false                       
      
      VM YAML (in attempt to create snap-larry)
      $ oc get vm fedora-pink-fowl-56 -oyaml apiVersion: kubevirt.io/v1
      kind: VirtualMachine
      metadata:
        annotations:
          kubevirt.io/latest-observed-api-version: v1
          kubevirt.io/storage-observed-api-version: v1
        creationTimestamp: "2024-11-14T13:04:17Z"
        finalizers:
        - kubevirt.io/virtualMachineControllerFinalize
        - snapshot.kubevirt.io/snapshot-source-protection
        generation: 2
        name: fedora-pink-fowl-56
        namespace: default
        resourceVersion: "3101414"
        uid: 45dfa549-8eba-446e-a68f-74af099df625
      spec:
        dataVolumeTemplates:
        - metadata:
            creationTimestamp: null
            name: fedora-pink-fowl-56-volume
          spec:
            sourceRef:
              kind: DataSource
              name: fedora
              namespace: openshift-virtualization-os-images
            storage:
              resources:
                requests:
                  storage: 32Gi
              storageClassName: ocs-storagecluster-ceph-rbd-virtualization
        instancetype:
          kind: virtualmachineclusterinstancetype
          name: u1.small
          revisionName: fedora-pink-fowl-56-u1.small-v1beta1-4d265fab-aa83-45bc-b986-b7460b20eb3a-1
        preference:
          kind: virtualmachineclusterpreference
          name: fedora
          revisionName: fedora-pink-fowl-56-fedora-v1beta1-110e8a5e-5456-4b91-88f1-b653a988c9ec-1
        runStrategy: Always
        template:
          metadata:
            creationTimestamp: null
            labels:
              network.kubevirt.io/headlessService: headless
          spec:
            architecture: amd64
            domain:
              devices:
                autoattachPodInterface: false
                interfaces:
                - macAddress: 02:e6:8b:00:00:01
                  masquerade: {}
                  name: default
              machine:
                type: pc-q35-rhel9.4.0
              resources: {}
            networks:
            - name: default
              pod: {}
            subdomain: headless
            volumes:
            - dataVolume:
                name: fedora-pink-fowl-56-volume
              name: rootdisk
            - cloudInitNoCloud:
                userData: |
                  #cloud-config
                  chpasswd:
                    expire: false
                  password: jk45-qitu-n84f
                  user: cloud-user
              name: cloudinitdisk
      status:
        conditions:
        - lastProbeTime: null
          lastTransitionTime: "2024-11-14T13:05:15Z"
          status: "True"
          type: Ready
        - lastProbeTime: null
          lastTransitionTime: null
          message: All of the VMI's DVs are bound and not running
          reason: AllDVsReady
          status: "True"
          type: DataVolumesReady
        - lastProbeTime: null
          lastTransitionTime: null
          status: "True"
          type: LiveMigratable
        - lastProbeTime: null
          lastTransitionTime: null
          status: "True"
          type: StorageLiveMigratable
        - lastProbeTime: "2024-11-14T13:06:05Z"
          lastTransitionTime: null
          status: "True"
          type: AgentConnected
        created: true
        desiredGeneration: 2
        observedGeneration: 2
        printableStatus: Running
        ready: true
        runStrategy: Always
        snapshotInProgress: snap-larry
        volumeSnapshotStatuses:
        - enabled: true
          name: rootdisk
        - enabled: false
          name: cloudinitdisk
          reason: Snapshot is not supported for this volumeSource type [cloudinitdisk]
       

      Expected results:

      Snapshot is ReadyToUse

      Additional info:

      Logs from the virt-controller:
      
      $ oc logs -n openshift-cnv virt-controller-9c574ccd5-khftz
      
      E1114 13:23:53.844496       1 util.go:72] "Unhandled Error" err="Operation cannot be fulfilled on virtualmachinesnapshots.snapshot.kubevirt.io \"snapp-larryy\": the object has been modified; please apply your changes to the latest version and try again" logger="UnhandledError" 
      
      {"component":"virt-controller","level":"info","msg":"Adding VM snapshot finalizer to fedora-pink-fowl-56","pos":"source.go:120","timestamp":"2024-11-14T13:23:53.857939Z"} 
      
      E1114 13:23:53.921655       1 util.go:72] "Unhandled Error" err="controllerrevisions.apps \"snapp-larryy-u1.small-v1beta1-4d265fab-aa83-45bc-b986-b7460b20eb3a-1\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>" logger="UnhandledError"

              akalenyu Alex Kalenyuk
              jpeimer@redhat.com Jenia Peimer
              Jenia Peimer Jenia Peimer
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: