Bug 1958811

Summary: VM creation fails on API version mismatch
Product: OpenShift Container Platform Reporter: Ruth Netser <rnetser>
Component: Console Kubevirt PluginAssignee: Yaacov Zamir <yzamir>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.8CC: aos-bugs, cwilkers, gouyang, sbennert
Target Milestone: ---Keywords: Regression
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 23:07:32 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:

Description Ruth Netser 2021-05-10 08:11:51 UTC
Description of problem:
VM creation fails on API version mismatch:
"the API version in the data (kubevirt.io/v1) does not match the expected API version (kubevirt.io/v1alpha3)"

Version-Release number of selected component (if applicable):
OCP 4.8.0-fc.2

How reproducible:
100%

Steps to Reproduce:
1. Create a VM from the wizards

Actual results:
When trying to create the VM, action fails on:
"the API version in the data (kubevirt.io/v1) does not match the expected API version (kubevirt.io/v1alpha3)"

Expected results:
VM creation should succeed

Additional info:
=========================
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  annotations:
    vm.kubevirt.io/validations: |
      [
        {
          "name": "minimal-required-memory",
          "path": "jsonpath::.spec.domain.resources.requests.memory",
          "rule": "integer",
          "message": "This VM requires more memory.",
          "min": 1073741824
        }
      ]
    name.os.template.kubevirt.io/fedora34: Fedora 32 or higher
  labels:
    app: fed-vm
    vm.kubevirt.io/template: fedora-server-tiny
    vm.kubevirt.io/template.revision: '1'
    vm.kubevirt.io/template.version: v0.14.0
    os.template.kubevirt.io/fedora34: 'true'
    flavor.template.kubevirt.io/tiny: 'true'
    workload.template.kubevirt.io/server: 'true'
    vm.kubevirt.io/template.namespace: openshift
  name: fed-vm
  namespace: default
spec:
  dataVolumeTemplates:
    - metadata:
        name: fed-vm-rootdisk-18yop
      spec:
        pvc:
          accessModes:
            - ReadWriteMany
          resources:
            requests:
              storage: 15Gi
          storageClassName: ocs-storagecluster-ceph-rbd
          volumeMode: Block
        source:
          registry:
            url: 'docker://kubevirt/fedora-cloud-container-disk-demo'
  running: true
  template:
    metadata:
      annotations:
        vm.kubevirt.io/flavor: tiny
        vm.kubevirt.io/os: fedora
        vm.kubevirt.io/workload: server
      labels:
        kubevirt.io/domain: fed-vm
        kubevirt.io/size: tiny
        vm.kubevirt.io/name: fed-vm
        os.template.kubevirt.io/fedora34: 'true'
        flavor.template.kubevirt.io/tiny: 'true'
        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: default
          networkInterfaceMultiqueue: true
          rng: {}
        machine:
          type: pc-q35-rhel8.4.0
        resources:
          requests:
            memory: 1Gi
      evictionStrategy: LiveMigrate
      hostname: fed-vm
      networks:
        - name: default
          pod: {}
      terminationGracePeriodSeconds: 180
      volumes:
        - cloudInitNoCloud:
            userData: |
              #cloud-config
              user: fedora
              password: fedora
              chpasswd:
                expire: false
          name: cloudinitdisk
        - dataVolume:
            name: fed-vm-rootdisk-18yop
          name: rootdisk

Comment 1 Guohua Ouyang 2021-05-12 07:44:24 UTC
*** Bug 1959695 has been marked as a duplicate of this bug. ***

Comment 3 Guohua Ouyang 2021-05-18 13:25:18 UTC
Verified on master

Comment 4 Chandler Wilkerson 2021-05-19 14:53:27 UTC
*** Bug 1961436 has been marked as a duplicate of this bug. ***

Comment 5 Tal Nisan 2021-05-24 13:24:51 UTC
*** Bug 1962099 has been marked as a duplicate of this bug. ***

Comment 8 errata-xmlrpc 2021-07-27 23:07:32 UTC
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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security 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-2021:2438