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

Bug 1598372

Summary: Error message "Failed to plug disk X to VM Y" when running HA VM with disk right after its (VM) creation
Product: [oVirt] ovirt-engine Reporter: Yosi Ben Shimon <ybenshim>
Component: BLL.StorageAssignee: Eyal Shenitzky <eshenitz>
Status: CLOSED CURRENTRELEASE QA Contact: Yosi Ben Shimon <ybenshim>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.5.1CC: bugs, ebenahar, ratamir
Target Milestone: ovirt-4.3.0Flags: rule-engine: ovirt-4.3+
Target Release: 4.3.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.0_alpha Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-13 07:48:12 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
Run VM error message none

Description Yosi Ben Shimon 2018-07-05 08:51:34 UTC
Description of problem:
An error message appears in the engine log when trying to run an HA VM with disk right after its creation.
The error says that it fails to hotplug the disk but actually it succeeded.
* Note that when the VM is NOT HA, when clicking on the "Run" button, an error message appears in the UI says that the disk is locked and can't run the VM.

Version-Release number of selected component (if applicable):
ovirt-engine-4.2.5-0.1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create an HA VM with disk reside on iscsi SD and lease on same domain
2. Right after the creation - click on "run" button to start the vm.
3.

Actual results:
The next error appears in the engine log:

2018-07-05 11:34:49,539+03 INFO  [org.ovirt.engine.core.bll.storage.disk.AddDiskCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-77) [a1573c22-fd17-4930-860e-ed28e2e314f0] Ending command 'org.ovirt.engine.core.bll.storage.disk.AddDiskCommand' successfully.
2018-07-05 11:34:49,602+03 INFO  [org.ovirt.engine.core.bll.storage.disk.HotPlugDiskToVmCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-77) [50ed14df] Lock Acquired to object 'EngineLock:{exclusiveLocks='[1134fa5b-c1d2-4c8d-95d5-c62fac07e9fa=VM_DISK_BOOT, 224db3de-b363-4e52-a2df-96a0159a242f=DISK]', sharedLocks='[1134fa5b-c1d2-4c8d-95d5-c62fac07e9fa=VM]'}'
2018-07-05 11:34:49,608+03 WARN  [org.ovirt.engine.core.bll.storage.disk.HotPlugDiskToVmCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-77) [50ed14df] Validation of action 'HotPlugDiskToVm' failed for user admin@internal-authz. Reasons: VAR__ACTION__HOT_PLUG,VAR__TYPE__DISK,ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL,VAR__VM_STATUS__POWERING_UP
2018-07-05 11:34:49,610+03 INFO  [org.ovirt.engine.core.bll.storage.disk.HotPlugDiskToVmCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-77) [50ed14df] Lock freed to object 'EngineLock:{exclusiveLocks='[1134fa5b-c1d2-4c8d-95d5-c62fac07e9fa=VM_DISK_BOOT, 224db3de-b363-4e52-a2df-96a0159a242f=DISK]', sharedLocks='[1134fa5b-c1d2-4c8d-95d5-c62fac07e9fa=VM]'}'
2018-07-05 11:34:49,633+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engineScheduled-Thread-77) [50ed14df] EVENT_ID: USER_FAILED_HOTPLUG_DISK(2,001), Failed to plug disk t5_Disk1 to VM t5 (User: admin@internal-authz).
2018-07-05 11:34:49,646+03 INFO  [org.ovirt.engine.core.bll.storage.disk.image.AddImageFromScratchCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-77) [a1573c22-fd17-4930-860e-ed28e2e314f0] Ending command 'org.ovirt.engine.core.bll.storage.disk.image.AddImageFromScratchCommand' successfully.

Expected results:

Additional info:

Comment 1 Eyal Shenitzky 2018-07-08 10:11:41 UTC
(In reply to Yosi Ben Shimon from comment #0)
> Description of problem:
> An error message appears in the engine log when trying to run an HA VM with
> disk right after its creation.
> The error says that it fails to hotplug the disk but actually it succeeded.
> * Note that when the VM is NOT HA, when clicking on the "Run" button, an
> error message appears in the UI says that the disk is locked and can't run
> the VM.

When running HA VM, the validation for the disks statuses is disabled because we want to run the VM even if there is no SPM.

Comment 2 Yosi Ben Shimon 2018-08-19 13:36:44 UTC
Created attachment 1476905 [details]
Run VM error message

Comment 3 Yosi Ben Shimon 2018-08-19 13:37:47 UTC
Tested using:
ovirt-engine-4.3.0-0.0.master.20180815091554.gitd5455ea.el7.noarch

Actual result:
The VM failed to run with a message (see attached screenshot):
"Cannot run VM. Invalid VM lease. Please note that it may take few minutes to create the lease."

and an error in the engine log:

2018-08-19 16:30:23,176+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-109) [fd478606-4ce3-4ab9-a3af-4b0c75a38cb8] EVENT_
ID: USER_FAILED_RUN_VM(54), Failed to run VM test_VM due to a failed validation: [Cannot run VM. Invalid VM lease. Please note that it may take few minutes to create th
e lease.] (User: admin@internal-authz).
2018-08-19 16:30:23,176+03 WARN  [org.ovirt.engine.core.bll.RunVmCommand] (default task-109) [fd478606-4ce3-4ab9-a3af-4b0c75a38cb8] Validation of action 'RunVm' failed 
for user admin@internal-authz. Reasons: VAR__ACTION__RUN,VAR__TYPE__VM,ACTION_TYPE_FAILED_INVALID_VM_LEASE


Moving to VERIFIED

Comment 4 Sandro Bonazzola 2018-11-02 14:38:34 UTC
This bugzilla is included in oVirt 4.2.7 release, published on November 2nd 2018.

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

Comment 5 Sandro Bonazzola 2018-11-02 15:05:26 UTC
Closed by mistake, moving back to qa -> verified

Comment 6 Sandro Bonazzola 2019-02-13 07:48:12 UTC
This bugzilla is included in oVirt 4.3.0 release, published on February 4th 2019.

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