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

Bug 1576729

Summary: XML based hot-(un)plug of disks and nics
Product: [oVirt] ovirt-engine Reporter: Arik <ahadas>
Component: BLL.VirtAssignee: Arik <ahadas>
Status: CLOSED CURRENTRELEASE QA Contact: Israel Pinto <ipinto>
Severity: low Docs Contact:
Priority: high    
Version: 4.2.3CC: ahadas, bugs
Target Milestone: ovirt-4.2.5Keywords: CodeChange
Target Release: 4.2.5Flags: rule-engine: ovirt-4.2+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-31 15:28:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Arik 2018-05-10 09:16:39 UTC
Generate the XML for hot-plugging a disk on the engine side (engine XML).

Comment 1 Arik 2018-05-10 09:17:37 UTC
High priority since we want to have it before upgrading VDSM to python 3.

Comment 2 Yaniv Kaul 2018-05-14 15:58:55 UTC
Severity...?

Comment 3 Arik 2018-05-14 16:11:06 UTC
It's just a CodeChange, doesn't solve any particular problem.

Comment 4 Arik 2018-07-02 16:11:29 UTC
We discovered a gap: UpdateVmInterfaceVDSCommand has not been changed to leverage engine xml.

Comment 5 Israel Pinto 2018-07-03 11:07:52 UTC
Verify with:
Engine:
Software Version:4.2.5-0.1.el7ev
Host:
OS Version:RHEL - 7.5 - 8.el7
Kernel Version:3.10.0 - 862.6.3.el7.x86_64
KVM Version:2.10.0 - 21.el7_5.4
LIBVIRT Version:libvirt-3.9.0-14.el7_5.6
VDSM Version:vdsm-4.20.33-1.el7ev

Hot plug/Hot unplug XMLs:
DISK:
2018-07-03 13:54:13,542+0300 INFO  (jsonrpc/0) [api.virt] START hotplugDisk(params={'xml': '<?xml version="1.0" encoding="UTF-8"?><hotplug><devices><disk snapshot="no" type="file" device="disk"><target dev="sda" bus="scsi"></target><source file="/rhev/data-center/136178c6-1728-4d5e-ac0f-c3f2f25da457/b7878594-8ac3-4f51-af08-4e67914c82a9/images/b06e0e82-9833-4b95-83e9-a5f9889f8fff/d7a30a9b-9895-4453-8809-79f6662028fb"></source><driver name="qemu" io="threads" type="raw" error_policy="stop" cache="none"></driver><alias name="ua-b06e0e82-9833-4b95-83e9-a5f9889f8fff"></alias><address bus="0" controller="0" unit="1" type="drive" target="0"></address><serial>b06e0e82-9833-4b95-83e9-a5f9889f8fff</serial></disk></devices><metadata xmlns:ovirt-vm="http://ovirt.org/vm/1.0"><ovirt-vm:vm><ovirt-vm:device devtype="disk" name="sda"><ovirt-vm:poolID>136178c6-1728-4d5e-ac0f-c3f2f25da457</ovirt-vm:poolID><ovirt-vm:volumeID>d7a30a9b-9895-4453-8809-79f6662028fb</ovirt-vm:volumeID><ovirt-vm:imageID>b06e0e82-9833-4b95-83e9-a5f9889f8fff</ovirt-vm:imageID><ovirt-vm:domainID>b7878594-8ac3-4f51-af08-4e67914c82a9</ovirt-vm:domainID></ovirt-vm:device></ovirt-vm:vm></metadata></hotplug>', 'vmId': '29b5a94d-4e74-4f1e-864d-b4c7f523964b'}) from=::ffff:10.35.161.176,57428, flow_id=7e60deff, vmId=29b5a94d-4e74-4f1e-864d-b4c7f523964b (api:46)

NIC:
2018-07-03 13:52:38,976+0300 INFO  (jsonrpc/1) [api.virt] START hotplugNic(params={'xml': '<?xml version="1.0" encoding="UTF-8"?><hotplug><devices><interface type="bridge"><model type="virtio"></model><link state="up"></link><source bridge="ovirtmgmt"></source><alias name="ua-2b3896aa-ad89-4334-a9d9-4bae31d5c0bb"></alias><mac address="00:1a:4a:16:10:6a"></mac><filterref filter="vdsm-no-mac-spoofing"></filterref><bandwidth></bandwidth></interface></devices><metadata xmlns:ovirt-vm="http://ovirt.org/vm/1.0"><ovirt-vm:vm><ovirt-vm:device mac_address="00:1a:4a:16:10:6a"><ovirt-vm:custom></ovirt-vm:custom></ovirt-vm:device></ovirt-vm:vm></metadata></hotplug>', 'vmId': '29b5a94d-4e74-4f1e-864d-b4c7f523964b'}) from=::ffff:10.35.161.176,57428, flow_id=3bb2421e, vmId=29b5a94d-4e74-4f1e-864d-b4c7f523964b (api:46)


Hot unplug:
Disk:
2018-07-03 13:59:53,836+0300 INFO  (jsonrpc/5) [api.virt] START hotunplugDisk(params={'xml': '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><hotunplug><devices><disk><alias name="ua-b06e0e82-9833-4b95-83e9-a5f9889f8fff"/></disk></devices></hotunplug>', 'vmId': '29b5a94d-4e74-4f1e-864d-b4c7f523964b'}) from=::ffff:10.35.161.176,57428, flow_id=1abac679-b833-4e0e-b08b-ccba5031bdb0, vmId=29b5a94d-4e74-4f1e-864d-b4c7f523964b (api:46)

Nic:
2018-07-03 13:56:09,452+0300 INFO  (jsonrpc/6) [api.virt] START hotunplugNic(params={'xml': '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><hotunplug><devices><interface><alias name="ua-2b3896aa-ad89-4334-a9d9-4bae31d5c0bb"/></interface></devices></hotunplug>', 'vmId': '29b5a94d-4e74-4f1e-864d-b4c7f523964b'}) from=::ffff:10.35.161.176,57428, flow_id=651af221, vmId=29b5a94d-4e74-4f1e-864d-b4c7f523964b (api:46)

Both actions present the XML כםר NIC and Disk

Comment 6 Sandro Bonazzola 2018-07-31 15:28:36 UTC
This bugzilla is included in oVirt 4.2.5 release, published on July 30th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.5 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.