Bug 1352966 - Allow disk to be plugged/unplugged to a VM through diskattachment REST API
Summary: Allow disk to be plugged/unplugged to a VM through diskattachment REST API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.0.1
: 4.0.1.1
Assignee: Tal Nisan
QA Contact: Carlos Mestre González
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-05 15:32 UTC by Tal Nisan
Modified: 2016-08-04 13:30 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-08-04 13:30:28 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: blocker+
rule-engine: planning_ack+
amureini: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 60234 0 master MERGED core: Change VmDevice plugged property to a primitive boolean 2016-07-07 12:11:41 UTC
oVirt gerrit 60252 0 master MERGED core: Include disk plugged status in DiskVmElement 2016-07-07 13:05:56 UTC
oVirt gerrit 60253 0 master MERGED restapi: Support disk plug/unplug to VM 2016-07-11 10:57:18 UTC
oVirt gerrit 60254 0 master MERGED Add the 'active' flag to DiskAttachment, this indicates whether the disk is active on the VM it's attached to 2016-07-07 13:12:28 UTC
oVirt gerrit 60336 0 ovirt-engine-4.0 MERGED core: Change VmDevice plugged property to a primitive boolean 2016-07-07 15:30:06 UTC
oVirt gerrit 60337 0 ovirt-engine-4.0 MERGED core: Include disk plugged status in DiskVmElement 2016-07-07 15:30:12 UTC
oVirt gerrit 60338 0 model_4.0 MERGED Add the 'active' flag to DiskAttachment, this indicates whether the disk is active on the VM it's attached to 2016-07-07 14:29:58 UTC
oVirt gerrit 60360 0 ovirt-engine-4.0.1 MERGED core: Change VmDevice plugged property to a primitive boolean 2016-07-11 11:07:04 UTC
oVirt gerrit 60361 0 ovirt-engine-4.0.1 MERGED core: Include disk plugged status in DiskVmElement 2016-07-11 11:06:57 UTC
oVirt gerrit 60452 0 ovirt-engine-4.0 MERGED restapi: Support disk plug/unplug to VM 2016-07-11 13:44:43 UTC
oVirt gerrit 60508 0 ovirt-engine-4.0.1 MERGED restapi: Support disk plug/unplug to VM 2016-07-11 14:11:13 UTC

Description Tal Nisan 2016-07-05 15:32:58 UTC
Description of problem:
Add the option to plug/unplug a disk that is connected to a VM through:
api/vms/{vm_id}/diskattachments/{disk_id}

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Red Hat Bugzilla Rules Engine 2016-07-05 15:45:24 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 2 Allon Mureinik 2016-07-14 15:36:01 UTC
Tal - not sure if this is just documented in the REST documentation already or requires a specific treatment, but flagging as requires-doctext? just to be on the safe side. If it's redundant, feel free to set - instead.

Comment 3 Carlos Mestre González 2016-07-15 12:15:14 UTC
Hi Tal,

I went through all our test plan for this test. There's only a case that fails for the new API.

According to the case, changing the interface of a paused vm (in this case, because the connection from the host to the storage domain was blocked via iptables) should succeed, but it fails with:

<fault>
<detail>
[Cannot edit Virtual Disk. At least one of the VMs is not down.]
</detail>
<reason>Operation Failed</reason>
</fault>

do we have our test cases wrong or it should actually work? Rest of the cases work, so I only need to understand this issue before mark it as verified.

Comment 4 Tal Nisan 2016-07-18 16:56:19 UTC
Hey Carlos,
I don't think this should succeed, if I remember correctly an interface can only be changed if a VM is down.
Can you please verify with a 3.6 setup just to be 100% sure?

Comment 5 Carlos Mestre González 2016-07-20 11:50:28 UTC
Hi Tal,

I tested on 3.6 and you remember correctly, as with 4.0 changing the interface doesn't work if the vm is in status paused (only when is down). I thought that was a change in features that the new disk attachments had.

Anyway, I'll update our automation tests.

Setting this bug to verify.


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