Bug 1580478 - Vdsm should support hotunplug by Alias
Summary: Vdsm should support hotunplug by Alias
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Core
Version: 4.20.23
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.2.4
: ---
Assignee: Francesco Romani
QA Contact: Israel Pinto
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-21 14:48 UTC by Francesco Romani
Modified: 2018-06-26 08:43 UTC (History)
1 user (show)

Fixed In Version: vdsm-4.20.28-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-26 08:43:03 UTC
oVirt Team: Virt
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 91390 0 ovirt-4.2 MERGED virt: vm: hotunplug by alias 2020-05-14 13:22:49 UTC
oVirt gerrit 91391 0 ovirt-4.2 MERGED vm: make hotunplugMemory use new-style API 2020-05-14 13:22:49 UTC

Description Francesco Romani 2018-05-21 14:48:42 UTC
Description of problem:
Engine > 4.2.3 wants to send a simplified XML to identify a device to hotunplug.
Engine wants to send something like

<?xml version='1.0' encoding='UTF-8'?>
<hotplug>
  <devices>
    <interface>
      <alias name="something">
    </interface>
  </devices>
</hotplug>

Instead of the full XML currently required. A RFE is being filed against libvirt to natively support this, but until that is implemented, Vdsm should fill the gap and
1. retrieve a valid device XML out of alias
2. feed it to libvirt to hotunplug the device

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

How reproducible:
100%

Steps to Reproduce:
1. send minimal XML as per example above in the hotunplug request for NICs, Drives, memory
2. 
3.

Actual results:
Hotunplug will fail

Expected results:
Hotunplug should succeed

Additional info:
Vdsm must keep working to <= 4.1 Engines as before

To verify:
- not regression: check hotunplug works fine with NICs, Drives, memory, with Engine 4.1 or earlier
- proper verification: with updated Engine (version to be added), check hotunplug works fine with NICs, drives, memory

Comment 1 Israel Pinto 2018-06-04 09:22:14 UTC
Verify with:
Engine: 4.2.4-2
Host: vdsm-4.20.29-1.el7ev


I checked hot unplug for Nic, Disk, Memory, CPU:

From vdsm log:
Hotunplug NIC xml: <?xml version='1.0' encoding='utf-8'?>
<interface type="bridge">
    <address bus="0x00" domain="0x0000" function="0x0" slot="0x09" type="pci" />
    <mac address="00:1a:4a:16:10:ef" />
    <model type="virtio" />
    <source bridge="ovirtmgmt" />
    <filterref filter="vdsm-no-mac-spoofing" />
    <link state="up" />
    <alias name="ua-ced08abd-8e44-4c2c-8018-3cd4fbde254e" />
</interface>


Hotunplug disk xml: <?xml version='1.0' encoding='utf-8'?>
<disk device="disk" snapshot="no" type="block">
    <address bus="0" controller="0" target="0" type="drive" unit="1" />
    <source dev="/rhev/data-center/mnt/blockSD/7624cec9-1ec5-4feb-a04b-8362bc501206/images/560c0fcd-2101-4a7d-bba0-8007365009a2/7d09e9a3-03a3-4228-bdcb-15332ca60d4b" />
    <target bus="scsi" dev="sda" />
    <serial>560c0fcd-2101-4a7d-bba0-8007365009a2</serial>
    <driver cache="none" error_policy="stop" io="native" name="qemu" type="raw" />
    <alias name="scsi0-0-0-1" />
</disk>

Hotunplug memory xml: <?xml version='1.0' encoding='utf-8'?>
    <memory model="dimm">
    <target>
        <size unit="KiB">917504</size>
        <node>0</node>
    </target>
    <alias name="dimm1" />
    <address base="0x108000000" slot="1" type="dimm" />
    </memory>

CPU hotunplg: No XML (checked with DEV no XML)
 setNumberOfCpus(numberOfCpus='1') from=::ffff:10.35.163.152,57822, flow_id=4faced4b, vmId=35269181-eae5-4a78-afb9-c2ebeab9540f (api:46)

PASS

Comment 2 Sandro Bonazzola 2018-06-26 08:43:03 UTC
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.4 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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