Bug 1538228

Summary: ost: fix 007_sd_reattach.deactivate_storage_domain - test fails when we try to deactivate a domain with running tasks
Product: [Community] ovirt-system-tests Reporter: Dafna Ron <dron>
Component: GeneralAssignee: Yaniv Kaul <ykaul>
Status: CLOSED WORKSFORME QA Contact: Lukas Svaty <lsvaty>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.0CC: bugs
Target Milestone: milestone3Flags: dron: planning_ack?
dron: devel_ack?
dron: testing_ack?
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-24 11:49:13 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 Dafna Ron 2018-01-24 16:37:48 UTC
Description of problem:

We are get false failures on test 007_sd_reattach.deactivate_storage_domain. 
the test fails because we are trying to deactivate a domain with running tasks. 

Since this is a known issue I am opening a bug to fix the test and prevent false failures. 

Here is the latest build: 
http://jenkins.ovirt.org/job/ovirt-master_change-queue-tester/5076/


018-01-24 09:12:01,070-05 WARN  [org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand] (default task-30) [87107c27-275d-4fee-a456-013615e817cc] Validation of action 'DeactivateStorageDomainWithOvfUpdate' f
ailed for user admin@internal-authz. Reasons: VAR__TYPE__STORAGE__DOMAIN,VAR__ACTION__DEACTIVATE,ERROR_CANNOT_DEACTIVATE_DOMAIN_WITH_TASKS
2018-01-24 09:12:01,071-05 INFO  [org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand] (default task-30) [87107c27-275d-4fee-a456-013615e817cc] Lock freed to object 'EngineLock:{exclusiveLocks='[2b834f56-9
469-4c01-98bf-531d41812fe4=STORAGE]', sharedLocks='[3e20e50b-4536-4f03-9bd3-7f02d321e734=POOL]'}'
2018-01-24 09:12:01,075-05 DEBUG [org.ovirt.engine.core.common.di.interceptor.DebugLoggingInterceptor] (default task-30) [87107c27-275d-4fee-a456-013615e817cc] method: runAction, params: [DeactivateStorageDomainWithOvfUpdate, DeactivateSt
orageDomainWithOvfUpdateParameters:{commandId='df244508-5d1c-4485-82e6-11bc426072bc', user='null', commandType='Unknown'}], timeElapsed: 70ms
2018-01-24 09:12:01,079-05 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-30) [] Operation Failed: [Cannot deactivate Storage while there are running tasks on this Storage.
-Please wait until tasks will finish and try again.]

Comment 1 Allon Mureinik 2018-01-28 21:43:03 UTC
Ala, shouldn't we at least get better logs for this now?

Comment 2 Ala Hino 2018-01-29 08:47:57 UTC
We log the details of the running async taks when moving the SPM to maintenance.

I added a patch, https://gerrit.ovirt.org/#/c/86866/, to log the details of the running async tasks when de-activating storage domains.

Comment 4 Yaniv Kaul 2019-10-24 11:49:13 UTC
I'm hoping this is fixed by now...