Hide Forgot
Description of problem: When executing domain.update() on a domain which is not attached to any datacenter an error is thrown: >>> sd.update() Traceback (most recent call last): File "<input>", line 1, in <module> File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/brokers.py", line 16793, in update headers={"Correlation-Id":correlation_id} File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/proxy.py", line 78, in update return self.request('PUT', url, body, headers) File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/proxy.py", line 118, in request persistent_auth=self._persistent_auth) File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/proxy.py", line 146, in __doRequest persistent_auth=persistent_auth File "/usr/lib/python2.7/site-packages/ovirtsdk/web/connection.py", line 134, in doRequest raise RequestError, response RequestError: status: 409 reason: Conflict detail: Cannot edit Storage. The relevant Storage Domain's status is Unknown." while the relevant storage domain's status is well known to oVirt engine: >>> sd.get_status().get_state() 'unattached' Version-Release number of selected component (if applicable): vt14.4 How reproducible: 100% Steps to Reproduce: 1.detach a storage domain 2. try to update this domain from api: sd = api.storagedomains.get($STORAGE_NAME) sd.update() Actual results: a wrong and misleading error message Expected results: should change to "Cannot edit Storage. The relevant Storage Domain's status is unattached." Additional info:
Apparently what is happening here is that the backend "UpdateStorageDomainCommand" is getting the status of the storage domain using the "StorageDomain.getStatus()" method, but this is implemented as "getStoragePoolIsoMapData().getStatus()" which, if I understand correctly, is valid only when the storage command is attached to a data center.
(In reply to Juan Hernández from comment #1) > Apparently what is happening here is that the backend > "UpdateStorageDomainCommand" is getting the status of the storage domain > using the "StorageDomain.getStatus()" method, but this is implemented as > "getStoragePoolIsoMapData().getStatus()" which, if I understand correctly, > is valid only when the storage command is attached to a data center. Yup. Should be rethought in 3.6.0
this is an automated message. oVirt 3.6.0 RC3 has been released and GA is targeted to next week, Nov 4th 2015. Please review this bug and if not a blocker, please postpone to a later release. All bugs not postponed on GA release will be automatically re-targeted to - 3.6.1 if severity >= high - 4.0 if severity < high
Response body from PUT on api/storagedomains/{sd_id} <storage_domain> <name>nfs_x</name> </storage_domain> status: 409 <fault> <detail>[Cannot edit Storage. The relevant Storage Domain's status is Unattached.]</detail> <reason>Operation Failed</reason> </fault>
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2016-1743.html