Bug 1522832 - Hot-plug of a VM lease task hang forever when power-off the VM before lease creation finished
Summary: Hot-plug of a VM lease task hang forever when power-off the VM before lease c...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.1.9
: ---
Assignee: Eyal Shenitzky
QA Contact: Elad
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-06 14:29 UTC by Eyal Shenitzky
Modified: 2021-09-09 12:54 UTC (History)
7 users (show)

Fixed In Version: ovirt-engine-4.1.9
Clone Of:
Environment:
Last Closed: 2018-01-24 10:41:03 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.1+
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 85168 0 master MERGED core: Prevent retry lease hotplag in case of failure. 2020-03-11 07:55:37 UTC
oVirt gerrit 85419 0 ovirt-engine-4.1 MERGED core: Prevent retry lease hotplug in case of failure. 2020-03-11 07:55:37 UTC

Description Eyal Shenitzky 2017-12-06 14:29:40 UTC
Description of problem:
When VM is powered off during update that includes addition of a VM lease,
The hot-plug action will fail because the VM is in state 'Down'.

This occurs the VM powered off before that the lease created successfully,   
therefore, the hot-plug which take place at the end of the lease creation will fail and the task will hang forever because there the engine will retry to hotplug the lease endlessly.

Engine Log:

2017-12-06 15:08:40,214+02 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.HotPlugLeaseVDSCommand] (EE-ManagedThreadFactory-engine-Thread-291) [2b47f957] Failed in 'HotPlugLeaseVDS' method
2017-12-06 15:08:40,223+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engine-Thread-291) [2b47f957] EVENT_ID: VDS_BROKER_COMMAND_FAILURE(10,802), VDSM h1 command HotPlugLeaseVDS failed: Virtual machine does not exist: {'vmId': u'e6a2c125-209d-4c9c-ac23-a94c6f4ad895'}
2017-12-06 15:08:40,224+02 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.HotPlugLeaseVDSCommand] (EE-ManagedThreadFactory-engine-Thread-291) [2b47f957] Command 'org.ovirt.engine.core.vdsbroker.vdsbroker.HotPlugLeaseVDSCommand' return value 'StatusOnlyReturn [status=Status [code=1, message=Virtual machine does not exist: {'vmId': u'e6a2c125-209d-4c9c-ac23-a94c6f4ad895'}]]'
2017-12-06 15:08:40,224+02 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.HotPlugLeaseVDSCommand] (EE-ManagedThreadFactory-engine-Thread-291) [2b47f957] HostName = h1
2017-12-06 15:08:40,224+02 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.HotPlugLeaseVDSCommand] (EE-ManagedThreadFactory-engine-Thread-291) [2b47f957] Command 'HotPlugLeaseVDSCommand(HostName = h1, LeaseVDSParameters:{hostId='1223b76b-d48c-4de2-863b-5aa273addf06', vmId='e6a2c125-209d-4c9c-ac23-a94c6f4ad895'})' execution failed: VDSGenericException: VDSErrorException: Failed to HotPlugLeaseVDS, error = Virtual machine does not exist: {'vmId': u'e6a2c125-209d-4c9c-ac23-a94c6f4ad895'}, code = 1
2017-12-06 15:08:40,224+02 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.HotPlugLeaseVDSCommand] (EE-ManagedThreadFactory-engine-Thread-291) [2b47f957] FINISH, HotPlugLeaseVDSCommand, log id: 40050e20
2017-12-06 15:08:40,224+02 ERROR [org.ovirt.engine.core.bll.storage.lease.AddVmLeaseCommand] (EE-ManagedThreadFactory-engine-Thread-291) [2b47f957] Failure in hot plugging a lease to VM e6a2c125-209d-4c9c-ac23-a94c6f4ad895, message: EngineException: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: VDSGenericException: VDSErrorException: Failed to HotPlugLeaseVDS, error = Virtual machine does not exist: {'vmId': u'e6a2c125-209d-4c9c-ac23-a94c6f4ad895'}, code = 1 (Failed with error noVM and code 1)
2017-12-06 15:08:40,277+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engine-Thread-291) [2b47f957] EVENT_ID: HOT_PLUG_LEASE_FAILED(1,220), Failed to hot plug lease to the VM vm1. The VM is running without a VM lease.

Version-Release number of selected component (if applicable):
4.2.1 - from commit 098fe088d7b89aa9fe5f9a4b24d17d2705fc5d5e

How reproducible:
100%

Steps to Reproduce:
1. Create a VM with disk and set the resume behavior to Kill
2. Run the VM
3. Add a lease to the VM and power-off the VM immediately after

Actual results:
The task for hotplug the lease remains forever.


Expected results:
The hotplug should failed and the task should end nicely

Additional info:

Comment 1 Allon Mureinik 2017-12-06 17:02:29 UTC
(In reply to Eyal Shenitzky from comment #0)

> Version-Release number of selected component (if applicable):
> 4.2.1 - from commit 098fe088d7b89aa9fe5f9a4b24d17d2705fc5d5e
So this is a regression compared to 4.1.z, right?

Comment 2 Eyal Shenitzky 2017-12-07 05:22:31 UTC
Actually no, this is just another scenario that I found while working on the other VM leases bugs.
This is not a regression.

Comment 3 Elad 2018-01-22 15:04:59 UTC
Powered off a VM while lease hotplug. After few seconds the task cleared and VM start succeeded. 

Used:
rhevm-4.1.9.1-0.1.el7.noarch
vdsm-4.19.45-1.el7ev.x86_64

Comment 4 Sandro Bonazzola 2018-01-24 10:41:03 UTC
This bugzilla is included in oVirt 4.1.9 release, published on Jan 24th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.1.9 release, published on Jan 24th 2018, it has been closed with a resolution of CURRENT RELEASE.

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


Note You need to log in before you can comment on or make changes to this bug.