Bug 1247144 - Can't update storage domain via REST API in case that the storage domain's 'containsUnregisteredEntities' property is true
Can't update storage domain via REST API in case that the storage domain's 'c...
Status: CLOSED CURRENTRELEASE
Product: oVirt
Classification: Community
Component: ovirt-engine-core (Show other bugs)
3.5
Unspecified Unspecified
high Severity high
: ---
: 3.5.5
Assigned To: Idan Shaby
Aharon Canan
storage
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-27 08:27 EDT by Idan Shaby
Modified: 2016-02-10 13:22 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-09 07:00:13 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
amureini: ovirt_requires_release_note-


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 44024 master MERGED core: move containsUnregisteredEntities to StorageDomainDynamic Never
oVirt gerrit 44140 ovirt-engine-3.5 MERGED core: move containsUnregisteredEntities to StorageDomainDynamic Never

  None (edit)
Description Idan Shaby 2015-07-27 08:27:33 EDT
Description of problem:
In case that the property 'containsUnregisteredEntities' of a storage domain is true, one cannot update any field of the domain via the rest api.

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

How reproducible:
100%

Steps to Reproduce:
1. Detach a storage domain that contains a vm disk from the dc (that will set 'containsUnregisteredEntities' to true).
2. Attach it to the dc.
3. Try to update any updatable property of this domain via the REST API. For example, its name:
http://localhost:8080/api/storagedomains/<sd_id>
<storage_domain>
<name>sd_new</name>
</storage_domain>

Actual results:
Error code 400.
The message is:
Cannot edit Storage. Can only update the following fields: name, description, comment, wipe after delete, low space threshold, and critical space threshold.

Expected results:
One should be able to update the storage domain via the REST API.

Additional info:
Comment 1 Allon Mureinik 2015-07-27 08:32:18 EDT
This existed since 3.5.0. Proposing it for 3.5.5, but we need Aharon and Yaniv's input.
Comment 2 Allon Mureinik 2015-07-28 09:18:30 EDT
Patch was merged to master.
Idan - please backport to the ovirt-engine-3.5 branch.
Comment 3 Aharon Canan 2015-10-06 08:41:49 EDT
Verified using the following versions:
---------------------------------------
rhevm-3.5.5-0.1.el6ev.noarch - running on Rhel6.7
vdsm-4.16.27-1.el7ev.x86_64 - running on Rhel7.1

1. VM with disk on SD1
2. detach SD1
3. attach SD1 again to the DC
4. try to set new SD name 

<storage_domain>
<name>sd_new</name>
</storage_domain>

works fine

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