Bug 1755394 - [SSP] - VMI fails to start if input tablet device 'bus' attribute is not provided
Summary: [SSP] - VMI fails to start if input tablet device 'bus' attribute is not prov...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 2.2.0
Assignee: Karel Šimon
QA Contact: Ruth Netser
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-25 12:18 UTC by Ruth Netser
Modified: 2020-01-30 16:27 UTC (History)
7 users (show)

Fixed In Version: hyperconverged-cluster-operator-container-v2.2.0-3 virt-operator-container-v2.2.0-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-30 16:27:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:0307 0 None None None 2020-01-30 16:27:26 UTC

Description Ruth Netser 2019-09-25 12:18:05 UTC
Description of problem:
Creating a VMI with input device 'tablet', but without specifying 'bus' attribute (not mandatory), would fail.
The VMI will not start.

ksimon : Enabling of usb device is done before the check if tablet has a usb bus; if tablet doesn't contain usb bus, usb controller is never enabled.

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


How reproducible:
100%

Steps to Reproduce:
1. Create VMI from yaml:

---
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachineInstance
metadata:
  labels:
    special: tabletpc-empty
  name: tabletpc-empty
spec:
  domain:
    devices:
      inputs:
      - type: tablet
        name: tablet0
      disks:
      - disk:
          bus: virtio
        name: containerdisk
      - disk:
          bus: virtio
        name: cloudinitdisk
    machine:
      type: ""
    resources:
      requests:
        memory: 1024M
  terminationGracePeriodSeconds: 0
  volumes:
  - containerDisk:
      image: kubevirt/fedora-cloud-container-disk-demo
    name: containerdisk
  - cloudInitNoCloud:
      userData: |-
        #cloud-config
        password: fedora
        chpasswd: { expire: False }
    name: cloudinitdisk

2. Check the VMI status
oc get vmi


Actual results:

VMI fails to start

$ oc get vmi
NAME              AGE       PHASE  
tabletpc-empty    34m       Failed       


Expected results:

VMI should be created with the default bus (usb)

Additional info:

$ oc describe vmi tabletpc-empty
Name:         tabletpc-empty
Namespace:    default
Labels:       kubevirt.io/nodeName=host-172-16-0-18
              special=tabletpc-empty
Annotations:  kubevirt.io/latest-observed-api-version=v1alpha3
              kubevirt.io/storage-observed-api-version=v1alpha3
API Version:  kubevirt.io/v1alpha3
Kind:         VirtualMachineInstance
Metadata:
  Creation Timestamp:  2019-09-25T11:36:19Z
  Finalizers:
    foregroundDeleteVirtualMachine
  Generation:        3039
  Resource Version:  1169350
  Self Link:         /apis/kubevirt.io/v1alpha3/namespaces/default/virtualmachineinstances/tabletpc-empty
  UID:               b16629f0-df88-11e9-9289-fa163e7e99b4
Spec:
  Domain:
    Devices:
      Disks:
        Disk:
          Bus:  virtio
        Name:   containerdisk
        Disk:
          Bus:  virtio
        Name:   cloudinitdisk
      Inputs:
        Name:  tablet0
        Type:  tablet
      Interfaces:
        Bridge:
        Name:  default
    Features:
      Acpi:
        Enabled:  true
    Firmware:
      Uuid:  e0f367a7-b27a-49c9-8356-27e888867716
    Machine:
      Type:  q35
    Resources:
      Requests:
        Cpu:     100m
        Memory:  1024M
  Networks:
    Name:  default
    Pod:
  Termination Grace Period Seconds:  0
  Volumes:
    Container Disk:
      Image:              kubevirt/fedora-cloud-container-disk-demo
      Image Pull Policy:  Always
    Name:                 containerdisk
    Cloud Init No Cloud:
      User Data:  #cloud-config
password: fedora
chpasswd: { expire: False }
    Name:  cloudinitdisk
Status:
  Conditions:
    Last Probe Time:       <nil>
    Last Transition Time:  <nil>
    Message:               cannot migrate VMI with a bridge interface connected to a pod network
    Reason:                InterfaceNotLiveMigratable
    Status:                False
    Type:                  LiveMigratable
  Interfaces:
    Ip Address:      10.130.0.166
    Name:            default
  Migration Method:  BlockMigration
  Node Name:         host-172-16-0-18
  Phase:             Failed
  Qos Class:         Burstable
Events:
  Type     Reason            Age                 From                            Message
  ----     ------            ----                ----                            -------
  Normal   SuccessfulCreate  34m                 virtualmachine-controller       Created virtual machine pod virt-launcher-tabletpc-empty-g2r24
  Warning  SyncFailed        34m (x25 over 34m)  virt-handler, host-172-16-0-18  server error. command SyncVMI failed: "LibvirtError(Code=67, Domain=20, Message='unsupported configuration: Can't add USB input device. USB bus is disabled')"
  Warning  SyncFailed        29m (x7 over 29m)   virt-handler, host-172-16-0-18  failed to detect VMI pod: dial unix /var/run/kubevirt/sockets/b16629f0-df88-11e9-9289-fa163e7e99b4_sock: connect: connection refused

Comment 1 Fabian Deutsch 2019-09-25 17:35:02 UTC
Martin, wdyt?

Comment 2 Karel Šimon 2019-09-26 08:54:40 UTC
This PR will fix it: https://github.com/kubevirt/kubevirt/pull/2742

Comment 3 Fabian Deutsch 2019-09-26 09:00:33 UTC
Does htis bug happen with VMs created from the UI or templates?

Comment 7 Martin Sivák 2019-10-02 12:24:28 UTC
The fix was merged to upsteam kubevirt as https://github.com/kubevirt/kubevirt/pull/2742

Comment 12 Ruth Netser 2019-12-04 13:18:23 UTC
VMI creation with input device 'tablet', but without specifying 'bus' attribute, succeeds (using the above yaml).

# oc get vmi
NAME                  AGE    PHASE     IP            NODENAME
tabletpc-empty        12m    Running   10.129.1.75   working-slgsd-master-0

dumpxml - bus is using the default ('usb'):

    <input type='tablet' bus='usb'>
      <alias name='ua-tablet0'/>
      <address type='usb' bus='0' port='1'/>
    </input>


Verified on:
# oc get csv -n openshift-cnv
NAME                                      DISPLAY                                    VERSION   REPLACES                                  PHASE
kubevirt-hyperconverged-operator.v2.2.0   Container-native virtualization Operator   2.2.0     kubevirt-hyperconverged-operator.v2.1.0   Succeeded
local-storage-operator.v4.3.3             Local Storage                              4.3.3     local-storage-operator.v4.3.0             Succeeded

Comment 14 errata-xmlrpc 2020-01-30 16:27:15 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, 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/RHEA-2020:0307


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