Bug 1484863 - Cannot start HA VM (lease) after snapshot preview / preview+commit
Summary: Cannot start HA VM (lease) after snapshot preview / preview+commit
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.2.0
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.2.2
: 4.2.2.1
Assignee: Eyal Shenitzky
QA Contact: Evelina Shames
URL:
Whiteboard:
Depends On:
Blocks: 1532577
TreeView+ depends on / blocked
 
Reported: 2017-08-24 12:31 UTC by Elad
Modified: 2018-03-29 11:13 UTC (History)
6 users (show)

Fixed In Version: ovirt-engine-4.2.2.1
Doc Type: If docs needed, set a value
Doc Text:
until this fix, when a snapshot was previewed the VM lease was ignored. Now if the snapshot or the VM contains a lease, it will be ignored. 1.VM snapshot and the active snapshot has a lease on the same/different domain: - while previewing: use the active snapshot lease - while undoing the preview: revert to use the active snapshot lease - while committing the preview: use the lease that used in the preview 2.VM has a lease on the active snapshot but doesn't have a lease on the snapshot: - while previewing: no lease will be used in the preview - while undoing the preview: revert to use the active snapshot lease - while committing the preview: the active snapshot lease will be removed and the VM will use the lease that used in the preview 4.VM doesn't have a lease on the active snapshot but does has a lease on the snapshot: - while previewing: new VM lease will create on the snapshot lease domain - while undoing the preview: the created lease will be removed - while committing the preview: the VM will use the lease that used in the preview
Clone Of:
Environment:
Last Closed: 2018-03-29 11:13:59 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.2+
ylavi: exception+


Attachments (Terms of Use)
logs from engine and host (899.32 KB, application/x-gzip)
2017-08-24 12:31 UTC, Elad
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 86105 0 master MERGED core: introduce VM leases and snapshots integration 2020-03-04 12:53:10 UTC
oVirt gerrit 87480 0 ovirt-engine-4.2 MERGED core: introduce VM leases and snapshots integration 2020-03-04 12:53:10 UTC
oVirt gerrit 87586 0 master MERGED core: fix NPE while restore stateless VM 2020-03-04 12:53:09 UTC

Description Elad 2017-08-24 12:31:53 UTC
Created attachment 1317665 [details]
logs from engine and host

Description of problem:
While a high availability VM that has a lease on the storage is in snapshot preview, or after snapshot restore, the VM cannot be started, its lease is reported as invalid state forever.


Version-Release number of selected component (if applicable):
ovirt-engine-4.2.0-0.0.master.20170823165744.git116f435.el7.centos.noarch
vdsm-4.20.2-104.git5f512b9.el7.centos.x86_64

How reproducible:
Always, encountered in automation during execution of 
https://polarion.engineering.redhat.com/polarion/redirect/project/RHEVM3/workitem?id=RHEVM-18162

Steps to Reproduce:
1. Create a VM with a disk a lease on the storage (both on NFS in my case)
2. Create a snapshot for the VM containing the disk and the VM configuration (default)
3. Preview / Preview+commit the snapshot
4. Start the VM

Actual results:
The VM cannot be started:


2017-08-24 15:17:37,171+03 WARN  [org.ovirt.engine.core.bll.RunVmCommand] (default task-15) [54e74743-cd5d-4883-8ca2-4e15ca0018e4] Validation of action 'RunVm' failed for user admin@internal-authz. Reasons: VAR__ACTION__RUN,VAR__TYPE__VM,ACTION_TYPE_FAILED_INVALID_VM_LEASE

Expected results:
HA VM with a lease on the storage should be runnable in snapshot preview and after snapshot restore

Additional info:
logs from engine and host

Comment 1 Allon Mureinik 2017-08-28 12:10:58 UTC
If the fix is reasonable, this probably deserves a zstream patch too

Comment 2 Yaniv Kaul 2017-10-25 08:45:35 UTC
Tal - any updates on this?

Comment 3 Tal Nisan 2017-11-01 12:51:19 UTC
Not currently, it's in the queue

Comment 4 Yaniv Kaul 2017-11-16 07:44:39 UTC
(In reply to Tal Nisan from comment #3)
> Not currently, it's in the queue

Is this a blocker for oVirt GA? It is marked as such and has urgent severity. Where is it in the Q?

Comment 5 Allon Mureinik 2017-11-16 08:20:22 UTC
(In reply to Yaniv Kaul from comment #4)
> (In reply to Tal Nisan from comment #3)
> > Not currently, it's in the queue
> 
> Is this a blocker for oVirt GA? It is marked as such and has urgent
> severity. Where is it in the Q?

This is neither urgent nor a blocker.

Comment 6 Tal Nisan 2017-12-27 13:26:56 UTC
A workaround will be to edit the VM to remove the lease and then select the lease storage domain again to create a new one

Comment 7 Allon Mureinik 2018-02-21 09:17:12 UTC
Eyal - I think you filled in the doctext in the environment box by mistake.

Comment 8 Evelina Shames 2018-02-26 07:44:57 UTC
Verified.
ovirt-enginge: 4.2.2.1-0.1.el7
vdsm: 4.20.19-1.el7ev.noarch

Comment 9 Sandro Bonazzola 2018-03-29 11:13:59 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.


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