Bug 1911590 - RFE - Block VM creation with sata disk and ioThreadsPolicy settings
Summary: RFE - Block VM creation with sata disk and ioThreadsPolicy settings
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 2.6.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: 4.8.0
Assignee: Itamar Holder
QA Contact: Israel Pinto
URL:
Whiteboard: libvirt_CNV_INT
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-30 07:46 UTC by chhu
Modified: 2024-03-22 07:08 UTC (History)
3 users (show)

Fixed In Version: hco-bundle-registry-container-v4.8.0-347 virt-operator-container-v4.8.0-58
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 14:22:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
describe_rhel8-deep-anglerfish (6.11 KB, text/plain)
2020-12-30 07:47 UTC, chhu
no flags Details
openshift-cnv_rhel8-deep-anglerfish.xml (6.50 KB, text/plain)
2020-12-30 07:48 UTC, chhu
no flags Details
pv-disk-nfs-rhel.yaml (304 bytes, text/plain)
2020-12-30 07:49 UTC, chhu
no flags Details
pv-dv-nfs-rhel.yaml (296 bytes, text/plain)
2020-12-30 07:49 UTC, chhu
no flags Details
rhel8.yaml (6.47 KB, text/plain)
2020-12-30 07:50 UTC, chhu
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt pull 4949 0 None closed [virt-launcher]: Issue an error for disk with DedicatedIOThread and SATA bus 2021-05-19 11:37:19 UTC
Red Hat Issue Tracker CNV-9845 0 None None None 2024-03-22 03:08:57 UTC
Red Hat Product Errata RHSA-2021:2920 0 None None None 2021-07-27 14:24:23 UTC

Description chhu 2020-12-30 07:46:28 UTC
Description of problem:
Failed to add sata disk to VM which with virtio disk,
CNV create the VM yaml file with ioThreadsPolicy: shared,
but sata disk don't support iothread in libvirt.

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

How reproducible:
100%

Steps to Reproduce:
1. Login to web console, Project: openshift-cnv, Create a VM.
Click "Virtualization" -> Virtual Machines 
-> Create: Virtual Machine with Wizard, 
Select a template: "Red Hat Enterprise Linux 8.0 + VM" -> Next, 
Boot source type: Import via URL (creates PVC) Import URL: http://s3-qe-cn-storage.usersys.redhat.com/libvirt-CI-resources/RHEL-8.3-x86_64-latest.qcow2
Persitent Volume Claim size: 12 GiB 
Advanced: 
Storage class: manual Access mode: Single User(RWO) Click Next, 
Project: openshift-cnv Virtual Machine Name: rhel8-deep-anglerfish
Flavor: Small 1 CPU| 2 GiB Memory Storage: 2 Disks 
Workload profile: server Boot source: Boot from disk ***
Select: Start this virtual machine after creation 
Click "Customize virtual machine": 
-> Networking: Name: default, click "Next" 
-> Storage: "Next" -> Advanced: "Next" 
-> Review: "Create Virtual Machine

2.Create the PV, check the PV is created, and Bound to PVC. The DV is 100.0% Succeeded.
#oc create -f pv-dv-nfs-rhel.yaml

3. Login to VM, check the interface, touch file in VM.

4. On VM page, click "Disks" -> "Add Disk", add a sata disk.
   Add Disk: Source: Blank(create PVC); Name: disk-0; 
   Size: 2 GiB; interface: sata; Type: Disk; Storage Class: manual; 
   Volume Mode: Filesystem; Access Mode: RWO

5. Create PV for new added disk: pv-disk-nfs-rhel.yaml, check the PV is created, and Bound to PVC. The DV is 100.0% Succeeded.
# oc create -f pv-disk-nfs-rhel.yaml

6. Restart the VM, the VM is failed to start, get error:

# oc get vmi
NAME                          AGE    PHASE       IP             NODENAME
rhel8-deep-anglerfish         3m4s   Scheduled   10.131.0.48    intel-e52650-16-4.englab.nay.redhat.com

# oc describe vmi rhel8-deep-anglerfish
......
Message:               server error. command SyncVMI failed: "LibvirtError(Code=67, Domain=10, Message='unsupported configuration: IOThreads not available for bus sata target sda')"
......

7. Check the VM is shutoff and the disk xml is as below:
# oc rsh virt-launcher-rhel8-deep-anglerfish-ptcqb
sh-4.4# virsh list --all
 Id   Name                                  State
------------------------------------------------------
 -    openshift-cnv_rhel8-deep-anglerfish   shut off

sh-4.4# virsh dumpxml openshift-cnv_rhel8-deep-anglerfish|grep disk -A 8
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' iothread='1'/>
      <source file='/var/run/kubevirt-ephemeral-disks/cloud-init-data/openshift-cnv/rhel8-deep-anglerfish/noCloud.iso'/>
      <target dev='vda' bus='virtio'/>
      <alias name='ua-cloudinitdisk'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' iothread='1'/>
      <source file='/var/run/kubevirt-private/vmi-disks/rootdisk/disk.img'/>
      <target dev='vdb' bus='virtio'/>
      <boot order='1'/>
      <alias name='ua-rootdisk'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' iothread='1'/>
      <source file='/var/run/kubevirt-private/vmi-disks/disk-0/disk.img'/>
      <target dev='sda' bus='sata'/>
      <alias name='ua-disk-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

8. Check the VM yaml file. There is "ioThreadsPolicy: shared", thus the disk xml with iothread part, but the sata disk don't support iothread in libvirt.

Actual results:
In step6, failed to restart VM.

Expected results:
In step6, restart VM successfully.

Additional info:
- rhel8.yaml
- describe_rhel8-deep-anglerfish
- openshift-cnv_rhel8-deep-anglerfish.xml
- pv-dv-nfs-rhel.yaml
- pv-disk-nfs-rhel.yaml

Comment 1 chhu 2020-12-30 07:47:44 UTC
Created attachment 1743170 [details]
describe_rhel8-deep-anglerfish

Comment 2 chhu 2020-12-30 07:48:13 UTC
Created attachment 1743171 [details]
openshift-cnv_rhel8-deep-anglerfish.xml

Comment 3 chhu 2020-12-30 07:49:08 UTC
Created attachment 1743173 [details]
pv-disk-nfs-rhel.yaml

Comment 4 chhu 2020-12-30 07:49:38 UTC
Created attachment 1743174 [details]
pv-dv-nfs-rhel.yaml

Comment 5 chhu 2020-12-30 07:50:14 UTC
Created attachment 1743175 [details]
rhel8.yaml

Comment 6 Israel Pinto 2020-12-30 13:30:56 UTC
Kubevirt should block the creation of vm with sata disk and iothreads since it not supported 
right now the user is getting the error from libvirt and not from kuvevirt.
Libvirt error message:
Message:               server error. command SyncVMI failed: "LibvirtError(Code=67, Domain=10, Message='unsupported configuration: IOThreads not available for bus sata target sda')"

Comment 7 Israel Pinto 2021-05-26 17:02:41 UTC
Step:
1. Create vm with disk bus: sata and ioThreadsPolicy: shared , see vm spec
2. Start vm

Test with UI Results: 
server error. command SyncVMI failed: "LibvirtError(Code=67, Domain=10, Message='unsupported configuration: IOThreads not available for bus sata target sda')"


vm spec:
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  annotations:
    kubemacpool.io/transaction-timestamp: '2021-05-26T16:58:22.440434961Z'
    kubevirt.io/latest-observed-api-version: v1
    kubevirt.io/storage-observed-api-version: v1alpha3
    name.os.template.kubevirt.io/fedora34: Fedora 32 or higher
    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
        }
      ]
  resourceVersion: '1674283'
  name: fed-iotest
  uid: f367ba69-c16e-4224-b098-e20d1e9aeabd
  creationTimestamp: '2021-05-26T16:48:08Z'
  generation: 6
  managedFields:
    - apiVersion: kubevirt.io/v1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            .: {}
            'f:name.os.template.kubevirt.io/fedora34': {}
            'f:vm.kubevirt.io/validations': {}
          'f:labels':
            'f:vm.kubevirt.io/template.version': {}
            '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/small': {}
            'f:os.template.kubevirt.io/fedora34': {}
            'f:vm.kubevirt.io/template': {}
        'f:spec':
          .: {}
          'f:dataVolumeTemplates': {}
          'f:template':
            .: {}
            'f:metadata':
              .: {}
              'f:annotations': {}
              'f:labels': {}
            'f:spec':
              .: {}
              'f:domain':
                .: {}
                'f:cpu':
                  .: {}
                  'f:cores': {}
                  'f:sockets': {}
                  'f:threads': {}
                'f:devices':
                  .: {}
                  'f:disks': {}
                  'f:interfaces': {}
                  'f:networkInterfaceMultiqueue': {}
                  'f:rng': {}
                'f:ioThreadsPolicy': {}
                '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: '2021-05-26T16:56:05Z'
    - apiVersion: kubevirt.io/v1alpha3
      fieldsType: FieldsV1
      fieldsV1:
        'f:spec':
          'f:running': {}
      manager: virt-api
      operation: Update
      time: '2021-05-26T16:56:14Z'
    - 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':
          .: {}
          'f:created': {}
          'f:volumeSnapshotStatuses': {}
      manager: virt-controller
      operation: Update
      time: '2021-05-26T16:58:22Z'
  namespace: default
  finalizers:
    - k8s.v1.cni.cncf.io/kubeMacPool
  labels:
    app: fed-iotest
    flavor.template.kubevirt.io/small: 'true'
    os.template.kubevirt.io/fedora34: 'true'
    vm.kubevirt.io/template: fedora-server-small
    vm.kubevirt.io/template.namespace: openshift
    vm.kubevirt.io/template.revision: '1'
    vm.kubevirt.io/template.version: v0.14.0
    workload.template.kubevirt.io/server: 'true'
spec:
  dataVolumeTemplates:
    - metadata:
        creationTimestamp: null
        name: fed-iotest-rootdisk-smmhx
      spec:
        pvc:
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 30Gi
          storageClassName: hostpath-provisioner
          volumeMode: Filesystem
        source:
          http:
            url: >-
             <URL to image>
  running: true
  template:
    metadata:
      annotations:
        vm.kubevirt.io/flavor: small
        vm.kubevirt.io/os: fedora
        vm.kubevirt.io/workload: server
      creationTimestamp: null
      labels:
        flavor.template.kubevirt.io/small: 'true'
        kubevirt.io/domain: fed-iotest
        kubevirt.io/size: small
        os.template.kubevirt.io/fedora34: 'true'
        vm.kubevirt.io/name: fed-iotest
        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: sata
              name: rootdisk
          interfaces:
            - macAddress: '02:1f:8c:00:00:09'
              masquerade: {}
              model: virtio
              name: default
          networkInterfaceMultiqueue: true
          rng: {}
        ioThreadsPolicy: shared
        machine:
          type: pc-q35-rhel8.4.0
        resources:
          requests:
            memory: 2Gi
      evictionStrategy: LiveMigrate
      hostname: fed-iotest
      networks:
        - name: default
          pod: {}
      terminationGracePeriodSeconds: 180
      volumes:
        - cloudInitNoCloud:
            userData: |
              #cloud-config
              user: fedora
              password: tblx-ebq9-ftbx
              chpasswd:
                expire: false
          name: cloudinitdisk
        - dataVolume:
            name: fed-iotest-rootdisk-smmhx
          name: rootdisk
status:
  created: true
  volumeSnapshotStatuses:
    - enabled: false
      name: cloudinitdisk
      reason: Volume type has no StorageClass defined
    - enabled: false
      name: rootdisk
      reason: >-
        No VolumeSnapshotClass: Volume snapshots are not configured for this
        StorageClass [hostpath-provisioner] [rootdisk]

Comment 10 errata-xmlrpc 2021-07-27 14:22: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 Virtualization 4.8.0 Images), 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:2920


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