Bug 1352966

Summary: Allow disk to be plugged/unplugged to a VM through diskattachment REST API
Product: [oVirt] ovirt-engine Reporter: Tal Nisan <tnisan>
Component: BLL.StorageAssignee: Tal Nisan <tnisan>
Status: CLOSED CURRENTRELEASE QA Contact: Carlos Mestre González <cmestreg>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: amureini, bugs, tnisan
Target Milestone: ovirt-4.0.1Flags: rule-engine: ovirt-4.0.z+
rule-engine: blocker+
rule-engine: planning_ack+
amureini: devel_ack+
rule-engine: testing_ack+
Target Release: 4.0.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-04 13:30:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.