Description of problem: Trying to activate an active domain through REST returns HTTP 400 response, claiming the domain is inaccessible. Request sent: https://gadi-rhevm.qa.lab.tlv.redhat.com/api/datacenters/ae912477-ecfb-411a-843f-1512ee48f0b3/storagedomains/c699614c-134c-4d3c-a6de-53ce023a0f53/activate application/xml <action> <async>false</async> <grace_period> <expiry>10</expiry> </grace_period> </action> response: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <action> <async>false</async> <grace_period> <expiry>10</expiry> </grace_period> <status> <state>failed</state> </status> <fault> <reason>Operation Failed</reason> <detail>[Cannot activate Storage. The relevant Storage Domain is inaccessible. -Please handle Storage Domain issues and retry the operation.]</detail> </fault> </action> Version-Release number of selected component (if applicable): rhevm-3.1.0-12.el6ev.noarch How reproducible: 100% Steps to Reproduce: 1. Send a REST request to activate an already active storage domain Actual results: HTTP 400 response: Expected results: Response should reflect the status of the domain - e.g. "Domain already active" Additional info:
please attach full engine log.
Created attachment 605585 [details] engine logs relevant lines in the log: 2012-08-20 09:01:20,169 INFO [org.ovirt.engine.core.bll.LoginUserCommand] (ajp-/127.0.0.1:8009-2) Running command: LoginUserCommand internal: false. 2012-08-20 09:01:20,218 WARN [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8009-2) calling GetConfigurationValueQuery (ApplicationMode) with null version, using default general for version 2012-08-20 09:01:20,281 INFO [org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand] (ajp-/127.0.0.1:8009-2) [281b8597] Lock Acquired to object EngineLock [exclusiveLocks= key: e24980ad-9f5a-4f2b-b5cb-5ed09224f9c8 value: STORAGE , sharedLocks= ] 2012-08-20 09:01:20,281 WARN [org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand] (ajp-/127.0.0.1:8009-2) [281b8597] CanDoAction of action ActivateStorageDomain failed. Reasons:VAR__TYPE__STORAGE__DOMAIN,VAR__ACTION__ACTIVATE,ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL 2012-08-20 09:01:20,281 INFO [org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand] (ajp-/127.0.0.1:8009-2) [281b8597] Lock freed to object EngineLock [exclusiveLocks= key: e24980ad-9f5a-4f2b-b5cb-5ed09224f9c8 value: STORAGE , sharedLocks= ] 2012-08-20 09:01:20,295 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8009-2) Operation Failed: [Cannot activate Storage. The relevant Storage Domain is inaccessible. -Please handle Storage Domain issues and retry the operation.] 2012-08-20 09:01:20,295 INFO [org.ovirt.engine.core.bll.LogoutUserCommand] (ajp-/127.0.0.1:8009-2) [7c275e45] Running command: LogoutUserCommand internal: false. 2012-08-20 09:01:57,646 INFO [org.ovirt.engine.core.bll.LoginUserCommand] (ajp-/127.0.0.1:8009-10) Checking if user admin@internal is an admin, result true
*** Bug 854469 has been marked as a duplicate of this bug. ***
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.
I get 409 conflict response, but similar body: <action> <status> <state>failed</state> </status> <fault> <reason>Operation Failed</reason> <detail>[Cannot activate Storage. The relevant Storage Domain is inaccessible. -Please handle Storage Domain issues and retry the operation.]</detail> </fault> </action> Will fix detail element.
After discussion with Allon decided to allow the operation - do nothing with a proper audit log alert. We now have a 200 OK response.
(In reply to Vered Volansky from comment #7) > After discussion with Allon decided to allow the operation - do nothing with > a proper audit log alert. We now have a 200 OK response. this is inconsistent with other resources in the system, take vm for instance, it fails with CDA message "vm cannot be started, it already running".
Accepted comment #8, patch is revised accordingly: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <action> <status> <state>failed</state> </status> <fault> <reason>Operation Failed</reason> <detail>[Cannot activate Storage. The relevant Storage Domain's status is Active. -Please handle Storage Domain and retry the operation.]</detail> </fault> </action>
ovirt 3.4.0 alpha has been released
Verified, returned a 409 error with a proper message: HTTP/1.1 409 Conflict <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <action> <async>false</async> <grace_period> <expiry>10</expiry> </grace_period> <status> <state>failed</state> </status> <fault> <reason>Operation Failed</reason> <detail>[Cannot activate Storage. The relevant Storage Domain's status is Active.]</detail> </fault> </action>
Closing as part of 3.4.0