Bug 996554 - vmHotPlugNic changing card status plugged/unplugged
vmHotPlugNic changing card status plugged/unplugged
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm (Show other bugs)
x86_64 Linux
unspecified Severity high
: ---
: 3.3.0
Assigned To: Nobody's working on this, feel free to take it
Depends On:
  Show dependency treegraph
Reported: 2013-08-13 08:34 EDT by Giuseppe Vallarelli
Modified: 2013-08-13 09:47 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-13 09:43:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
vdsm logs (581.18 KB, text/x-log)
2013-08-13 08:34 EDT, Giuseppe Vallarelli
no flags Details

  None (edit)
Description Giuseppe Vallarelli 2013-08-13 08:34:38 EDT
Created attachment 786134 [details]
vdsm logs

Description of problem:

Changing the card status (unplugged and then plugged) causes the following problem in vdsm:

Unplugging the vnic:

Thread-47308::DEBUG::2013-08-13 14:19:38,674::BindingXMLRPC::974::vds::(wrapper) client []::call vmHotunplugNic with ({'nic': {'nicModel': 'pv', 'macAddr': '00:1a:4a:86:b8:b6', 'linkActive': 'true', 'network': 'rhevm', 'custom': {}, 'filter': 'vdsm-no-mac-spoofing', 'specParams': {}, 'deviceId': 'd4d50759-e05e-46e5-a80c-5b4906fb9d6b', 'address': {'bus': '0x00', ' slot': '0x09', ' domain': '0x0000', ' type': 'pci', ' function': '0x0'}, 'device': 'bridge', 'type': 'interface'}, 'vmId': '2385f03d-474d-4496-a466-bf3bf75c776b'},) {}
Thread-47308::DEBUG::2013-08-13 14:19:38,675::vm::3181::vm.Vm::(hotunplugNic) vmId=`2385f03d-474d-4496-a466-bf3bf75c776b`::Hotunplug NIC xml: <interface type="bridge">
        <address bus="0x00" domain="0x0000" function="0x0" slot="0x09" type="pci"/>
        <mac address="00:1a:4a:86:b8:b6"/>
        <model type="virtio"/>
        <source bridge="rhevm"/>
        <filterref filter="vdsm-no-mac-spoofing"/>
        <link state="up"/>

Thread-47308::DEBUG::2013-08-13 14:19:38,796::BindingXMLRPC::981::vds::(wrapper) return vmHotunplugNic with {'status': {'message': 'Done', 'code': 0}

Plugging it back:

Thread-47315::DEBUG::2013-08-13 14:19:45,097::BindingXMLRPC::974::vds::(wrapper) client []::call vmHotplugNic with ({'nic': {'nicModel': 'pv', 'macAddr': '00:1a:4a:86:b8:b6', 'linkActive': 'true', 'network': 'rhevm', 'custom': {}, 'filter': 'vdsm-no-mac-spoofing', 'specParams': {}, 'deviceId': 'd4d50759-e05e-46e5-a80c-5b4906fb9d6b', 'address': {'bus': '0x00', ' slot': '0x09', ' domain': '0x0000', ' type': 'pci', ' function': '0x0'}, 'device': 'bridge', 'type': 'interface'}, 'vmId': '2385f03d-474d-4496-a466-bf3bf75c776b'},) {}
Thread-47315::DEBUG::2013-08-13 14:19:45,098::vm::2991::vm.Vm::(hotplugNic) vmId=`2385f03d-474d-4496-a466-bf3bf75c776b`::Hotplug NIC xml: <interface type="bridge">
        <address  domain="0x0000"  function="0x0"  slot="0x09"  type="pci" bus="0x00"/>
        <mac address="00:1a:4a:86:b8:b6"/>
        <model type="virtio"/>
        <source bridge="rhevm"/>
        <filterref filter="vdsm-no-mac-spoofing"/>
        <link state="up"/>

Thread-47315::DEBUG::2013-08-13 14:19:45,311::libvirtconnection::101::libvirtconnection::(wrapper) Unknown libvirterror: ecode: 1 edom: 0 level: 2 message: An error occurred, but the cause is unknown
Thread-47315::ERROR::2013-08-13 14:19:45,311::vm::2996::vm.Vm::(hotplugNic) vmId=`2385f03d-474d-4496-a466-bf3bf75c776b`::Hotplug failed
Traceback (most recent call last):
  File "/usr/share/vdsm/vm.py", line 2994, in hotplugNic
  File "/usr/share/vdsm/vm.py", line 824, in f
    ret = attr(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/vdsm/libvirtconnection.py", line 76, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 399, in attachDevice
    if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self)
libvirtError: An error occurred, but the cause is unknown
Thread-47315::DEBUG::2013-08-13 14:19:45,312::BindingXMLRPC::981::vds::(wrapper) return vmHotplugNic with {'status': {'message': 'An error occurred, but the cause is unknown', 'code': 49}}

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

Version     : 4.12.0
Release     : 52.gitce029ba.el6ev

Version 3.3.0-0.14.master.el6ev 

How reproducible:
Having a running vm

Steps to Reproduce:
1. Unplug a vnic
2. Replug the same vnic

Actual results:

Error while executing action Edit VM Interface properties: Failed to activate VM Network Interface.

Expected results:

Vnic should be plugged without problems.
Comment 1 Martin Pavlik 2013-08-13 09:43:14 EDT
Hi Giuseppe,

this is expected behavior, since you used VM with no operating system (OS) installed, hotplug feature need support from OS side.

From design page http://www.ovirt.org/Features/Design/DetailedHotPlugNic

This feature will be restricted to operating systems that support this action – Windows7, Windows7 x64, Windows2008, Windows2008 x64, Windows2008R2 x64, RHEL5, RHEL5 x64, RHEL6 and RHEL6 x64 

Actually later on this restriction to certain OSes was removed, however support for hotplug from OS side is required.
Comment 2 Giuseppe Vallarelli 2013-08-13 09:47:27 EDT
Hi Martin thanks for the explanation, from the error message that is not clear that is not supported.

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