Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1693322

Summary: [downstream clone - 4.2.8-4] usb forwarding does not work on VMs/templates created in 3.6 after upgrading to 4.2.7
Product: Red Hat Enterprise Virtualization Manager Reporter: RHV bug bot <rhv-bugzilla-bot>
Component: ovirt-engineAssignee: Steven Rosenberg <srosenbe>
Status: CLOSED ERRATA QA Contact: Liran Rotenberg <lrotenbe>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.2.7CC: abpatil, fdelorey, gveitmic, obockows, rbarry, Rhev-m-bugs, rhodain, sborella, srosenbe
Target Milestone: ovirt-4.2.8-4Keywords: ZStream
Target Release: ---Flags: lsvaty: testing_plan_complete-
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In this release, redirection device types are no longer set to unplugged and can now obtain the proper address from the domain xml when supported or from the host when they are not supported.
Story Points: ---
Clone Of: 1663616 Environment:
Last Closed: 2019-04-23 08:45:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1663616    
Bug Blocks:    

Description RHV bug bot 2019-03-27 14:35:33 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1663616 +++
======================================================================

Description of problem:
usb forwarding does not work on VMs/templates created in 3.6 after upgrading to 4.2.7

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

How reproducible:
always at customer site

Steps to Reproduce:
1. have vm/pool/template created in RHEV 3.6 with usb redirection enabled
2. upgrade to 4.2.7 and change compatibility level to 4.2


Actual results:
after vm/pool/template will gain 4.2 compatibility level usb redirection will stop working

Expected results:
after vm/pool/template will gain 4.2 compatibility level usb redirection will be working

Additional info:
when you disable usb redirectio and enable again it start working again

(Originally by Marian Jankular)

Comment 3 RHV bug bot 2019-03-27 14:35:38 UTC
To clarify, is this VMs, pools, templates, or all? The test case you provided works, but trying to ensure all scenarios are covered

(Originally by Ryan Barry)

Comment 4 RHV bug bot 2019-03-27 14:35:40 UTC
It was reported that all of them are affected, i.e. VMs, Pools and templates.

(Originally by Olimp Bockowski)

Comment 5 RHV bug bot 2019-03-27 14:35:41 UTC
Re-targeting to 4.3.1 since it is missing a patch, an acked blocker flag, or both

(Originally by Ryan Barry)

Comment 7 RHV bug bot 2019-03-27 14:35:44 UTC
WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{'rhevm-4.3-ga': '?'}', ]

For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{'rhevm-4.3-ga': '?'}', ]

For more info please contact: rhv-devops

(Originally by rhv-bugzilla-bot)

Comment 8 RHV bug bot 2019-03-27 14:35:45 UTC
Verified on:
ovirt-engine-4.3.1.1-0.1.el7.noarch

Steps:
1. Deploy RHV 4.1.
2. Create VM, VM from a template, and a pool.
3. Set console to SPICE and enabled usb redirection.
4. Run the VMs ( Also have some down VMs).
5. Upgrade to 4.2 and change compatibility level to 4.2.
6. Upgrade to 4.3 and change compatibility level to 4.3.
7. Reboot the running VMs, Start the down VMs.
8. Check the USB redirection running in the engine:

# /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select type, device, address, is_managed, is_plugged, alias from vm_device_view where vm_id in (select vm_guid from vm_static where vm_name='<VM_NAME>') and device='spicevmc';"

In the result check for USB devices, type=redir, set with address, is_managed and is_plugged set to true and the device has alias.

Results:
The above VMs that were made in 4.1 with USB redirection, after moving to 4.3 without a reboot:
  type   |  device  |                      address                      | is_managed | is_plugged |  alias   
---------+----------+---------------------------------------------------+------------+------------+----------
 redir   | spicevmc | {type=usb, bus=0, port=4}                         | t          | t          | redir3
 redir   | spicevmc | {type=usb, bus=0, port=3}                         | t          | t          | redir2
 redir   | spicevmc | {type=usb, bus=0, port=1}                         | t          | t          | redir0
 redir   | spicevmc | {type=usb, bus=0, port=2}                         | t          | t          | redir1
 channel | spicevmc | {type=virtio-serial, bus=0, controller=0, port=3} | f          | t          | channel2
(5 rows)

After the reboot:

  type   |  device  |                      address                      | is_managed | is_plugged |                  alias                  
---------+----------+---------------------------------------------------+------------+------------+-----------------------------------------
 redir   | spicevmc | {type=usb, bus=0, port=4}                         | t          | t          | ua-adf66511-2c1f-47c0-9e77-565772892abc
 redir   | spicevmc | {type=usb, bus=0, port=3}                         | t          | t          | ua-444ee508-e0fb-4839-9047-220bbc2bebcb
 redir   | spicevmc | {type=usb, bus=0, port=1}                         | t          | t          | ua-00505a62-7f17-4166-be78-b1c394985550
 redir   | spicevmc | {type=usb, bus=0, port=2}                         | t          | t          | ua-1f85b62f-774e-4ba2-8e40-2954c8635fc4
 channel | spicevmc | {type=virtio-serial, bus=0, controller=0, port=3} | f          | t          | channel2
(5 rows)

Note: The fix is in 4.3, if the VM is rebooted in 4.2, a manual workaround will be needed: Disable USB redirection and enable it again

(Originally by Liran Rotenberg)

Comment 17 Liran Rotenberg 2019-04-18 10:12:27 UTC
Verified on:
ovirt-engine-4.2.8.6-0.1.el7ev.noarch

Steps:
1. Deploy RHV 4.1.
2. Create VM, VM from a template, and a pool.
3. Set console to SPICE and enabled usb redirection.
4. Run the VMs ( Also have some down VMs).
5. Upgrade to 4.2 and change compatibility level to 4.2.
6. Reboot the running VMs, Start the down VMs.
7. Check the USB redirection running in the engine:

# /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select type, device, address, is_managed, is_plugged, alias from vm_device_view where vm_id in (select vm_guid from vm_static where vm_name='<VM_NAME>') and device='spicevmc';"

In the result check for USB devices, type=redir, set with address, is_managed and is_plugged set to true and the device has alias.

Results:
The above VMs that were made in 4.1 with USB redirection, after moving to 4.2 without a reboot:
  type   |  device  |                      address                      | is_managed | is_plugged |  alias   
---------+----------+---------------------------------------------------+------------+------------+----------
 channel | spicevmc | {bus=0, controller=0, type=virtio-serial, port=3} | f          | t          | channel2
 redir   | spicevmc | {bus=0, type=usb, port=3}                         | t          | t          | redir2
 redir   | spicevmc | {bus=0, type=usb, port=2}                         | t          | t          | redir1
 redir   | spicevmc | {bus=0, type=usb, port=1}                         | t          | t          | redir0
 redir   | spicevmc | {bus=0, type=usb, port=4}                         | t          | t          | redir3
(5 rows)

After the reboot:

  type   |  device  |                      address                      | is_managed | is_plugged |                  alias                  
---------+----------+---------------------------------------------------+------------+------------+-----------------------------------------
 redir   | spicevmc | {type=usb, bus=0, port=3}                         | t          | t          | ua-c3ea6c80-5483-4ec2-997f-fd39192042b2
 channel | spicevmc | {type=virtio-serial, bus=0, controller=0, port=3} | f          | t          | channel2
 redir   | spicevmc | {type=usb, bus=0, port=2}                         | t          | t          | ua-1bb7eb9d-4123-45ac-86f3-e68ab54ce6af
 redir   | spicevmc | {type=usb, bus=0, port=4}                         | t          | t          | ua-241e6e54-fe64-42b6-a1c3-d1a4da6e0f69
 redir   | spicevmc | {type=usb, bus=0, port=1}                         | t          | t          | ua-7b84e92f-d8be-4b71-844e-b846da018195
(5 rows)

Comment 19 errata-xmlrpc 2019-04-23 08:45:33 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/RHBA-2019:0802

Comment 20 Daniel Gur 2019-08-28 13:14:06 UTC
sync2jira

Comment 21 Daniel Gur 2019-08-28 13:18:22 UTC
sync2jira