Bug 1507214 - VM lease creation doesn't occur properly during VM shutdown
Summary: VM lease creation doesn't occur properly during VM shutdown
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: General
Version: 4.1.6.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.1.9
: ---
Assignee: Eyal Shenitzky
QA Contact: Avihai
URL:
Whiteboard:
Depends On:
Blocks: 1481691
TreeView+ depends on / blocked
 
Reported: 2017-10-28 11:32 UTC by Alex Kaouris
Modified: 2018-01-24 10:41 UTC (History)
5 users (show)

Fixed In Version: ovirt-engine-4.1.9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-24 10:41:18 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.1+


Attachments (Terms of Use)
Engine log file (1.12 MB, application/x-gzip)
2017-10-28 11:32 UTC, Alex Kaouris
no flags Details
vdsm log of host where VM is running (1.66 MB, application/x-gzip)
2017-10-28 11:34 UTC, Alex Kaouris
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 85137 0 master MERGED core: update VM lease even if running configuration needed 2020-10-24 05:38:02 UTC
oVirt gerrit 85572 0 ovirt-engine-4.1 MERGED core: update VM lease even if running configuration needed 2020-10-24 05:38:02 UTC

Description Alex Kaouris 2017-10-28 11:32:58 UTC
Created attachment 1344675 [details]
Engine log file

Description of problem:
While attempting to enable the VM leases for a specific VM I am receiving an error that the lease cannot be hot plug and that the VM is running without a lease. 

The errors in engine dashboard are the following: 
Failed to hot plug lease to the VM Generic_win10. The VM is running without a VM lease.
VDSM v1.iv command HotPlugLeaseVDS failed: Virtual machine does not exist: {'vmId': u'b297e986-a820-47b2-a684-fea2978458ab'}

Version-Release number of selected component (if applicable):
engine version: 4.1.6.2

How reproducible:
Always

Steps to Reproduce:
1.While shutdown, edit VM and enable lease to a data storage domain (gluster replica 3)
2.Start VM
3.You receive the error while the storage domains lists a lease for the VM (at engine dashboard -> storage -> leases)

Actual results:
Seems that lease is assigned but an error is displayed

Expected results:
The lease should be assigned without giving an error

Additional info:
No HA tests have been performed to confirm if the lease is actually active

Comment 1 Alex Kaouris 2017-10-28 11:34:39 UTC
Created attachment 1344677 [details]
vdsm log of host where VM is running

vdsm log of host where VM is running

Comment 2 Alex Kaouris 2017-10-28 20:15:47 UTC
Seems that the above rises when enabling the VM leases on a VM and then starting the VM without waiting first the task of enabling the lease to complete. 

Seems that the below resolves the issue: 

1. Remove the VM lease.
2. Restart ovirt-engine service(I did this since the engine was continuing to log that was not able to enable the lease)
3. Enable VM lease and wait until the this task is completed (shown at GUI -> Tasks). This might take even a minute or more. 
4. Start the VM. No more errors.

Comment 3 Avihai 2018-01-16 09:55:41 UTC
verified on 4.1.9-0.2.el7

Comment 4 Sandro Bonazzola 2018-01-24 10:41:18 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.