Bug 1575081 - VMs will fail to start in a cluster which is having display network having name greater than 15 characters
Summary: VMs will fail to start in a cluster which is having display network having na...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.1.11
Hardware: All
OS: Linux
high
medium
Target Milestone: ovirt-4.2.4
: ---
Assignee: Leon Goldberg
QA Contact: msheena
URL:
Whiteboard:
: 1576329 (view as bug list)
Depends On:
Blocks: 1576329 1576337
TreeView+ depends on / blocked
 
Reported: 2018-05-04 17:28 UTC by nijin ashok
Modified: 2022-07-09 09:55 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1576329 1576337 (view as bug list)
Environment:
Last Closed: 2018-06-27 10:02:26 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3452321 0 None None None 2018-05-21 13:04:45 UTC
Red Hat Product Errata RHSA-2018:2071 0 None None None 2018-06-27 10:03:53 UTC
oVirt gerrit 90925 0 'None' MERGED backend: xmlbuilder: use vdsmName for display network 2020-10-29 20:19:00 UTC
oVirt gerrit 90926 0 'None' MERGED backend: xmlbuilder: use vdsmName for display network 2020-10-29 20:19:01 UTC

Description nijin ashok 2018-05-04 17:28:33 UTC
Description of problem:

If the network name is greater than 15 characters, the original name of the network will be converted into a different name. So the bridge and libvirt networks will be created with this name.

However, the display parameters of the VMs xml is still passed with the original name instead of  "vdsmName".

In the test below the original network name is TEST-RHV-TEST-MGMTNTWRK and vdsmName is vdsm-on26fe7839b6cc4.

displayNetwork is  passed as TEST-RHV-TEST-MGMTNTWRK

2018-05-04 13:04:47,865-04 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.CreateVDSCommand] (org.ovirt.thread.pool-6-thread-30) [d9e55245-9830-4a41-ad27-1f6cdbc3a37d] VM {memGuaranteedSize=256, smpThreadsPerCore=1, cpuType=Haswell-noTSX, vmId=ae1fa9b0-c42d-47ba-a966-6ff7c7afa0e7, acpiEnable=true, vmType=kvm, smp=1, smpCoresPerSocket=1, emulatedMachine=pc-i440fx-rhel7.3.0, smartcardEnable=false, guestNumaNodes=[{memory=512, cpus=0, nodeIndex=0}], transparentHugePages=true, displayNetwork=TEST-RHV-TEST-MGMTNTWRK, vmName=test_vm, .....display=qxl, timeOffset=0, nice=0, maxMemSize=2048, maxMemSlots=16, bootMenuEnable=false, memSize=512}


In the vdsm log.

        <graphics autoport="yes" defaultMode="secure" passwd="*****" passwdValidTo="1970-01-01T00:00:01" port="-1" tlsPort="-1" type="spice">
            <channel mode="secure" name="main" />
            <channel mode="secure" name="inputs" />
            <channel mode="secure" name="cursor" />
            <channel mode="secure" name="playback" />
            <channel mode="secure" name="record" />
            <channel mode="secure" name="display" />
            <channel mode="secure" name="smartcard" />
            <channel mode="secure" name="usbredir" />
            <listen network="vdsm-TEST-RHV-TEST-MGMTNTWRK" type="network" />
        </graphics>

Because of this, VM will fail to start with the error below.

2018-05-04 22:34:48,963+0530 ERROR (vm/ae1fa9b0) [virt.vm] (vmId='ae1fa9b0-c42d-47ba-a966-6ff7c7afa0e7') The vm start process failed (vm:632)
Traceback (most recent call last):
  File "/usr/share/vdsm/virt/vm.py", line 563, in _startUnderlyingVm
    self._run()
  File "/usr/share/vdsm/virt/vm.py", line 2021, in _run
    self._connection.createXML(domxml, flags),
  File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 123, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 941, in wrapper
    return func(inst, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3777, in createXML
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: Network not found: no network with matching name 'vdsm-TEST-RHV-TEST-MGMTNTWRK'

The libvirt network is created as vdsm-on26fe7839b6cc4 and not vdsm-TEST-RHV-TEST-MGMTNTWRK.

virsh -r net-list
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 ;vdsmdummy;          active     no            no
 vdsm-on26fe7839b6cc4 active     yes           yes
 vdsm-ovirtmgmt       active     yes           yes

The same issue happens in 4.2 as well but it fails before it reaches to libvirtd. Below is logged in vdsm on 4.2.


2018-05-04 19:46:57,591+0530 ERROR (vm/a3275b32) [virt.vm] (vmId='a3275b32-8ec7-4a03-966d-ead19d89e1d0') Failed to setup device spice (vm:2617)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py", line 2614, in _setup_devices
    dev_object.setup()
  File "/usr/lib/python2.7/site-packages/vdsm/virt/vmdevices/graphics.py", line 92, in setup
    displaynetwork.create_network(display_network, self.vmid)
  File "/usr/lib/python2.7/site-packages/vdsm/virt/displaynetwork.py", line 26, in create_network
    display_device = _display_device(netname)
  File "/usr/lib/python2.7/site-packages/vdsm/virt/displaynetwork.py", line 35, in _display_device
    return net_api.network_northbound(netname)
  File "/usr/lib/python2.7/site-packages/vdsm/network/api.py", line 100, in network_northbound
    return netswitch.configurator.net2northbound(network_name)
  File "/usr/lib/python2.7/site-packages/vdsm/network/netswitch/configurator.py", line 438, in net2northbound
    is_legacy = net_attr['switch'] == legacy_switch.SWITCH_TYPE
TypeError: 'NoneType' object has no attribute '__getitem__'


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

rhevm-4.1.11.2-0.1.el7.noarch

How reproducible:

100%

Steps to Reproduce:

Create a display network which is having characters greater than 15 characters and start the VM o this cluster.


Actual results:

Wrong network name is passed to the vdsm for the display parameter.

Expected results:

Pass correct information to the vdsm.

Additional info:

Comment 4 RHV bug bot 2018-05-24 23:53:25 UTC
WARN: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found non-acked flags: '{'rhevm-4.2.z': '?'}', ]

For more info please contact: rhv-devops: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found non-acked flags: '{'rhevm-4.2.z': '?'}', ]

For more info please contact: rhv-devops

Comment 5 msheena 2018-05-27 14:32:37 UTC
Hi, what is the next step for this bug? I noticed it was opened on 4.1.11 but the patch for 4.1 is ABANDONED, and 4.2 is MERGED.. Either needs to be closed as a duplicate of "Bug 1576329" which is verified on 4.2.4, or backport to 4.1, or move the bug to 4.2 so I can verify.

Comment 6 Alona Kaplan 2018-06-04 12:07:07 UTC
verified on ovirt-engine-4.2.4-0.1.el7.noarch 
with vdsm-4.20.28-1.el7ev.x86_64

Comment 7 Alona Kaplan 2018-06-04 12:07:25 UTC
*** Bug 1576329 has been marked as a duplicate of this bug. ***

Comment 10 errata-xmlrpc 2018-06-27 10:02:26 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/RHSA-2018:2071

Comment 11 Franta Kust 2019-05-16 13:05:19 UTC
BZ<2>Jira Resync


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