Bug 1561006

Summary: VM activation should fail on engine validation when the VM lease domain is not active
Product: [oVirt] ovirt-engine Reporter: Eyal Shenitzky <eshenitz>
Component: BLL.StorageAssignee: Eyal Shenitzky <eshenitz>
Status: CLOSED CURRENTRELEASE QA Contact: Kevin Alon Goldblatt <kgoldbla>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: amureini, bugs, ebenahar, eshenitz, tnisan, ylavi
Target Milestone: ovirt-4.2.3Flags: rule-engine: ovirt-4.2+
ylavi: exception+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-10 06:30:59 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 Eyal Shenitzky 2018-03-27 12:34:48 UTC
Description of problem:

When having a VM with a lease on a non-active storage domain, the VM failed to run with the following error:

2018-03-27 15:29:27,350+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ForkJoinPool-1-worker-12) [] EVENT_ID: VM_DOWN_ERROR(119), VM vm_lease_on_sd1_disk_sd2 is down with error. Exit message: Failed to acquire lock: No space left on device.

This error is thrown by san-lock.

A validation is missing to prevent from the VM from running while the storage domain lease status is not active.

Version-Release number of selected component (if applicable):
master_4.3.0 - from commit 31641e61500473e24fe78c8eb9df0e043350a55c

How reproducible:
100%

Steps to Reproduce:
1. Create a VM with a disk based on storage domain [A] and a lease based on 
storage domain [B] 
2. Deactivate storage domain [B]
3. Run the VM

Actual results:
The VM failed to run with the above error

Expected results:
The engine should not allow to start the VM and add a proper message to the user

Additional info:

Comment 1 Sandro Bonazzola 2018-04-18 11:09:04 UTC
All referenced patches have been merged, should this bug move to modified?

Comment 2 Kevin Alon Goldblatt 2018-05-08 11:25:55 UTC
Verified with the following code:
------------------------------------------------
ovirt-engine-4.2.3.5-0.1.el7.noarch
vdsm-4.20.27.1-1.el7ev.x86_64

Verified with the following scenario:
------------------------------------------------
Steps to Reproduce:
1. Create a VM with a disk based on storage domain [A] and a lease based on 
storage domain [B] 
2. Deactivate storage domain [B]
3. Run the VM

The VM now fails to run with the correct error below:
2018-05-08 14:19:39,463+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-3) [93d5c8f2-9c8d-466b-bd63-d273e906d3c5] EVENT_ID: USER_FAILED_RUN_VM(54), Failed to run VM vm1 due to a failed validation: [Cannot run VM. The VM lease storage domain (iscsi_2) status is not active.] (User: admin@internal-authz).


Moving to VERIFIED

Comment 3 Sandro Bonazzola 2018-05-10 06:30:59 UTC
This bugzilla is included in oVirt 4.2.3 release, published on May 4th 2018.

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