Bug 1541769

Summary: Live storage migration, with the target domain configured to be backup, is allowed
Product: [oVirt] ovirt-engine Reporter: Elad <ebenahar>
Component: BLL.StorageAssignee: Tal Nisan <tnisan>
Status: CLOSED CURRENTRELEASE QA Contact: Elad <ebenahar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.1.4CC: bugs, lveyde, tnisan
Target Milestone: ovirt-4.2.2Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-29 11:11:15 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:
Bug Depends On:    
Bug Blocks: 1291165    
Attachments:
Description Flags
logs none

Description Elad 2018-02-04 15:31:29 UTC
Created attachment 1391007 [details]
logs

Description of problem:
There is no validation, for live storage migration, if the target domain is configured to be a backup domain. Therefore, live storage migration is allowed for such scenario and it's being completed successfully, which leaves a running VM with an attached disk that resides on a backup storage domain.

Version-Release number of selected component (if applicable):
rhvm-4.2.1.4-0.1.el7.noarch
vdsm-4.20.17-1.el7ev.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Have 2 storage domains, one with backup=false and the other with backup=true
2. Create a VM with a disk resides on the domain configured with backup=false
3. Start the VM, wait for it to be Up and move its disk to the domain which was configured with backup=true

Actual results:
Live storage migration is initiated


Expected results:
Live storage migration should be blocked

Additional info:
Domain db01428b-6609-4599-8ca5-ce78fe5f4a74 was updated with its backup parameter to true (the actual parameter name that was updated is not mentioned in this log message, filed a separate bug on that - bug 1541768):

2018-02-04 17:06:33,021+02 INFO  [org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand] (default task-5) [] Running command: UpdateStorageDomainCommand internal: false. Entities affected :  ID: db01428b-6609-4599-8ca5-ce78fe5f4a74 Type: StorageAction group EDIT_STORAGE_DOMAIN_CONFIGURATION with role type ADMIN



Live storage migration with dstDomainId='db01428b-6609-4599-8ca5-ce78fe5f4a74', is initiated even though this domain is configured with backup to true.

2018-02-04 17:12:52,154+02 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.SyncImageGroupDataVDSCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-65) [ad265bb9-41e7-453e-92eb-b548640f8b13] START, SyncImageGroupDataVDSCommand( SyncImageGroupDataVDSCommandParameters:{storagePoolId='aa0b1185-8bf0-4ca4-978b-c6b7df55140c', ignoreFailoverLimit='false', storageDomainId='eb77e17e-1bdf-43aa-8901-65a4f329c976', imageGroupId='ddf06a44-bc5c-4b13-9668-2886e991613b', dstDomainId='db01428b-6609-4599-8ca5-ce78fe5f4a74', syncType='INTERNAL'}), log id: 4888ca91

Comment 1 Elad 2018-02-19 12:30:17 UTC
Live migration is blocked in case the target domain is backup.

2018-02-19 14:28:55,858+02 WARN  [org.ovirt.engine.core.bll.storage.lsm.LiveMigrateDiskCommand] (default task-14) [88f76e58-9b14-45d4-83f9-1728830963f8] Validation of action 'LiveMigrateDisk' failed for user admin@internal-authz. Reasons: VAR__ACTION__MOVE,VAR__TYPE__DISK,ACTION_TYPE_FAILED_VM_DISKS_ON_BACKUP_STORAGE


Used:
rhvm-4.2.2-0.1.el7.noarch

Comment 2 Sandro Bonazzola 2018-03-29 11:11:15 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.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.