Bug 1659806

Summary: Moving storage domain to maintenance during disk upload/download is allowed
Product: [oVirt] ovirt-engine Reporter: Avihai <aefrat>
Component: BLL.StorageAssignee: Fedor Gavrilov <fgavrilo>
Status: CLOSED CURRENTRELEASE QA Contact: Yosi Ben Shimon <ybenshim>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: bugs, frolland, tnisan
Target Milestone: ovirt-4.3.2Keywords: Automation
Target Release: 4.3.2.1Flags: rule-engine: ovirt-4.3+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.2.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-19 10:05:24 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
Relevant logs none

Description Avihai 2018-12-16 16:20:25 UTC
Created attachment 1514877 [details]
Relevant logs

Description of problem:
Moving storage domain to maintenance during disk upload/download is allowed.

I would expect the engine to block this operation during disk upload/download that uses that storage domain.

Version-Release number of selected component (if applicable):
ovirt-engine-4.3.0-0.2.master.20181128141347.git38908dd.el7.noarch
ovirt-imageio-proxy-1.5.0-0.201811281219.git5b3278f.el7.noarch
ovirt-imageio-daemon-1.5.0-0.201811281219.git5b3278f.el7.noarch
vdsm 4.30.3-46.git8e4df87.el7.noarch

How reproducible:
100%

Steps to Reproduce (Webadmin):
1. Start disk upload/download 
2. Try to move the disk's storage domain to maintenance.


Actual results:
Moving storage domain to maintenance during disk upload/download is allowed and upload/download proceed with the domain in maintenance status.

Expected results:
Moving storage domain to maintenance during disk upload/download should not be allowed.


Additional info:

Comment 1 Yosi Ben Shimon 2019-03-17 13:35:44 UTC
Tested on:
ovirt-engine-4.3.2.1-0.1.el7.noarch

Tried both download and upload.
The message appeared in the UI when tried to deactivate the storage domain is:
"Error while executing action: Cannot deactivate Storage. Please pause or cancel all active disk uploads and downloads first."

From the engine log:
2019-03-17 15:27:06,453+02 WARN  [org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOv
fUpdateCommand] (default task-37) [66b93b35-55cb-428b-871b-35503fd7ee9a] Validation of action 'Deactivat
eStorageDomainWithOvfUpdate' failed for user admin@internal-authz. Reasons: VAR__TYPE__STORAGE__DOMAIN,V
AR__ACTION__DEACTIVATE,ERROR_CANNOT_DEACTIVATE_STORAGE_DOMAIN_DURING_UPLOAD_OR_DOWNLOAD

Moving to VERIFIED

Comment 2 Sandro Bonazzola 2019-03-19 10:05:24 UTC
This bugzilla is included in oVirt 4.3.2 release, published on March 19th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.