Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1144845

Summary: [WebAdmin] Detaching a detached domain is allowed
Product: Red Hat Enterprise Virtualization Manager Reporter: Ori Gofen <ogofen>
Component: ovirt-engine-webadmin-portalAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: Elad <ebenahar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: acanan, amureini, ecohen, eedri, gklein, iheim, lsurette, rbalakri, Rhev-m-bugs, scohen, tnisan, yeylon
Target Milestone: ---Flags: scohen: Triaged+
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: org.ovirt.engine-root-3.5.0-14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-16 19:08:37 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:
Attachments:
Description Flags
vdsm+engine logs none

Description Ori Gofen 2014-09-21 13:35:13 UTC
Created attachment 939763 [details]
vdsm+engine logs

Description of problem:

When commencing a several detach domain operations at once,UI doesn't compare his "detaching" pending jobs with the one's that are executed by the user while this operations occur.

It results in operation duplicity which gives also a weird and confusing error on UI's message dialogue:
"Failed to detach Storage Domain nfs_1 to Data Center Default. (User: admin)"

The operation is of-course successful,its the duplicity job that failed
engine's log:


2014-09-21 16:19:54,487 ERROR [org.ovirt.engine.core.bll.storage.DetachStorageDomainFromPoolCommand] (org.ovirt.thread.pool-6-thread-48) [6b829f04] Command org.ovirt.engine.core.bll.storage.DetachStorageDomainFromPoolCommand throw Vdc Bll exception. With error message VdcBLLException: org.ovirt.engine.core.vdsbroker.irsbroker.IrsOperationFailedNoFailoverException: IRSGenericException: IRSErrorException: Domain is not member in pool: u'pool=b5d5ff30-b4e3-45b3-98ec-d137fd17ac4c, domain=1e5a371b-cb81-4bf8-862e-7d135bf1a123' (Failed with error StorageDomainNotMemberOfPool and code 375)
2014-09-21 16:19:54,515 INFO  [org.ovirt.engine.core.bll.storage.DetachStorageDomainFromPoolCommand] (org.ovirt.thread.pool-6-thread-48) [6b829f04] Command [id=524cbd50-b877-42d2-a6b6-8fc6c3861418]: Compensating CHANGED_STATUS_ONLY of org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap; snapshot: EntityStatusSnapshot [id=storagePoolId = b5d5ff30-b4e3-45b3-98ec-d137fd17ac4c, storageId = 1e5a371b-cb81-4bf8-862e-7d135bf1a123, status=Maintenance].
2014-09-21 16:19:54,527 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-6-thread-48) [6b829f04] Correlation ID: 6b829f04, Job ID: abdcced3-0426-416f-9cd3-b0b699e7725a, Call Stack: null, Custom Event ID: -1, Message: Failed to detach Storage Domain nfs_1 to Data Center Default. (User: admin)


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

How reproducible:
100%

Steps to Reproduce:
1.have 3 domains in maintenance
2.select all of them and detach them together
3.detach the last 2 domains again

Actual results:
misleading UI message

Expected results:
Engine should grey out the option to detach a domains which have a pending detach operations

Additional info:

Comment 1 Maor 2014-09-24 09:42:39 UTC
You can still get the same result using the REST.
On detach the Storage Domain should be locked so the user will not be able to detach the Storage Domain.
On multiple detach, it might take a few moments till the last Storage Domain gets locked, but that will still should not fail the operation as Ori mentioned.

I tried to reproduce the scenario to see if I get also a failure audit log, but it didn't reproduced. It might be a race issue, although the outcome of it is simply a faulty audit log which will be with a successful one. (and also represents a scenario that actually happened)

Comment 2 Eyal Edri 2014-09-29 13:05:20 UTC
allon, is this a new feature for 3.5? or was inteded to postpone to 3.6 or 3.5.1?

Comment 3 Allon Mureinik 2014-09-29 14:27:56 UTC
(In reply to Eyal Edri from comment #2)
> allon, is this a new feature for 3.5? or was inteded to postpone to 3.6 or
> 3.5.1?
No, it's an old (unnoticed) bug in an old feature (probably there since 3.0).
It should be solved for RHEV 3.5.0 - I removed the FutureFeature keyword (seems to have been added by mistake).

Comment 4 Maor 2014-10-01 12:37:46 UTC
The fix should now present the following message as part of the CDA phase:
"Error while executing action: Cannot detach Storage. Related operation is currently in progress. Please try again later."

Comment 5 Eyal Edri 2014-10-07 07:12:29 UTC
this bug status was moved to MODIFIED before engine vt5 was built,
hence moving to on_qa, if this was mistake and the fix isn't in,
please contact rhev-integ

Comment 6 Elad 2014-10-14 06:35:54 UTC
Trying to detach a storage domain while this domain is already in a detachment operation is blocked with on CDA:

	
	
	
Operation Canceled
Error while executing action:

Action 1:

    Cannot detach Storage. Related operation is currently in progress. Please try again later.

Action 2:

    Cannot detach Storage. Related operation is currently in progress. Please try again later.



Verified using rhev3.5 vt5

Comment 7 Allon Mureinik 2015-02-16 19:08:37 UTC
RHEV-M 3.5.0 has been released, closing this bug.