Bug 1339308 - stateless vms fail to start - stateless snapshot is locked forever
Summary: stateless vms fail to start - stateless snapshot is locked forever
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backend.Core
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ovirt-4.0.0-rc
: 4.0.0
Assignee: Liron Aravot
QA Contact: sefi litmanovich
Depends On:
TreeView+ depends on / blocked
Reported: 2016-05-24 16:11 UTC by sefi litmanovich
Modified: 2016-07-05 07:59 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Consequence: Pre-started VMs in Pools as well as stateless VMs couldn't be started. The attempt to start them caused creation of snapshot that remained in state "LOCKED". This prevented VM from being deleted. Fix: Result: fixed
Clone Of:
Last Closed: 2016-07-05 07:59:29 UTC
oVirt Team: Virt
rule-engine: ovirt-4.0.0+
rule-engine: blocker+
rule-engine: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+

Attachments (Terms of Use)
engine + vdsm logs (7.84 MB, application/x-tar)
2016-05-26 07:17 UTC, sefi litmanovich
no flags Details
engine log 05.06.2016 (13.41 MB, application/x-gzip)
2016-06-05 10:54 UTC, sefi litmanovich
no flags Details

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1294350 0 unspecified CLOSED pre starting vms in pool fail with stateless snapshot stuck in locked state 2021-02-22 00:41:40 UTC
oVirt gerrit 57688 0 None None None 2016-05-27 10:20:25 UTC

Internal Links: 1294350

Description sefi litmanovich 2016-05-24 16:11:46 UTC
Description of problem:
Hi, it appears that the bug that was resolved on 3.6.3 has re appeared in https://bugzilla.redhat.com/show_bug.cgi?id=1294350
This is basically the same bug

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

How reproducible:

Steps to Reproduce:
1. Create vm pool with prestarted vms, or a stateless vm.
2. start vm or wait for prestarted vms to start.

Actual results:

Start vm fails leaving the stateless snapshot locked.

Expected results:

vm start successfully with a working stateless snapshot

Comment 1 Red Hat Bugzilla Rules Engine 2016-05-25 07:17:23 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Tomas Jelinek 2016-05-25 10:48:38 UTC
could you please provide the logs?

Comment 3 sefi litmanovich 2016-05-26 07:16:36 UTC
Yes, sorry about that. I am attaching engine.log and SPM's vdsm.log, the vm created in this flow is a stateless vm (not from pool) name 'test-stateless', creation on '2016-05-26 10:00:16,386'.
you can see that the snapshot creation is called for and reported as successful but nothing happens and no error is reported as well:

2016-05-26 10:00:41,881 INFO  [org.ovirt.engine.core.bll.ConcurrentChildCommandsExecutionCallback] (DefaultQuartzScheduler2) [2a28988f] Command 'CreateAllSnapshotsFromVm' id: '4e53fb30-e549-4323-8e9f-3c08e1550942' child commands '[ec76854
8-4186-4c0a-996e-1dc4a1dd9fa5]' executions were completed, status 'SUCCEEDED'
2016-05-26 10:00:41,881 INFO  [org.ovirt.engine.core.bll.ConcurrentChildCommandsExecutionCallback] (DefaultQuartzScheduler2) [2a28988f] Command 'CreateAllSnapshotsFromVm' id: '4e53fb30-e549-4323-8e9f-3c08e1550942' Updating status to 'SUCC
EEDED', The command end method logic will be executed by one of its parent commands.

Had to remove the vm by removing all entries in DB and deleting from storage.

Comment 4 sefi litmanovich 2016-05-26 07:17:45 UTC
Created attachment 1161760 [details]
engine + vdsm logs

Comment 5 Liron Aravot 2016-05-29 08:52:42 UTC
this issue was fixed by change Ia1405b6010cfebc5cdbe4ac8c87822ea6fc0fd72 (https://gerrit.ovirt.org/#/c/57826/), which was included in the master branch before the ovirt-engine-4 branch was created but after the latest build (as i see in the tags).
so, it should be fixed in the next 4 build, the patch added in the tacker isn't relevant for that issue.

Comment 6 sefi litmanovich 2016-06-05 10:51:39 UTC
Tried to verify, works with regular stateless vm flow.
Failed with vm pool flow:
1. Create vm pool.
2. Give some user permissions on the pool.
3. Allocate a vm from the pool with that user.

In this case I still get the same behaviour.. stateless snapshot is created and stuck on locked disk forever.
Putting back to assigned because I think this should be included in this bug, if someone thinks otherwise let me know, I will verify it for 'normal' stateless vm and open a bug specific for vm pools vms.

Comment 7 sefi litmanovich 2016-06-05 10:54:14 UTC
Created attachment 1164866 [details]
engine log 05.06.2016

Comment 8 sefi litmanovich 2016-06-05 11:32:24 UTC
Verifying as this bug concerns only the flow of starting a stateless vm as admin, the other bug concerns allocating a vm as user (from user portal - https://bugzilla.redhat.com/show_bug.cgi?id=1342795 )

Comment 9 Sandro Bonazzola 2016-07-05 07:59:29 UTC
oVirt 4.0.0 has been released, closing current release.

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