Bug 1239153 - Stateless VM snapshot gets deleted when user shuts down VM in a Manual Pool type
Summary: Stateless VM snapshot gets deleted when user shuts down VM in a Manual Pool type
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.3
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Shmuel Melamud
QA Contact: sefi litmanovich
URL:
Whiteboard:
Depends On:
Blocks: 1248377 1248379
TreeView+ depends on / blocked
 
Reported: 2015-07-03 18:54 UTC by Javier Coscia
Modified: 2019-08-15 04:52 UTC (History)
14 users (show)

Fixed In Version: ovirt-3.6.0-4
Doc Type: Bug Fix
Doc Text:
Previously, when a virtual machine from a Manual Pool was shut down, its stateless snapshot was removed automatically, while the virtual machine was still assigned to the user. This issue was resolved and now for virtual machines from a Manual Pool the stateless snapshot is removed automatically only when the virtual machine is manually returned to the pool by an administrator. For virtual machines from an Automatic Pool the stateless snapshot is removed automatically on virtual machine shutdown, as usual.
Clone Of:
: 1248377 1248379 (view as bug list)
Environment:
Last Closed: 2016-03-09 21:09:15 UTC
oVirt Team: Virt
mgoldboi: Triaged+


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:0376 normal SHIPPED_LIVE Red Hat Enterprise Virtualization Manager 3.6.0 2016-03-10 01:20:52 UTC
oVirt gerrit 43383 master MERGED core: Keep stateless snapshot on VM down for VMs from manual pool Never
oVirt gerrit 44326 ovirt-engine-3.5 MERGED core: Keep stateless snapshot on VM down for VMs from manual pool Never

Description Javier Coscia 2015-07-03 18:54:10 UTC
Stateless VM snapshot gets deleted when user shuts down VM in a Manual Pool type


Description of problem:

When user shuts down a VM from a Manual Pool, the snapshot created gets deleted without the intervention of the admin user, meaning, the admin user won't put the VM into the pool again leaving the VM ready for the user to re-take it and continue with his work later.

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

RHEV-M: rhevm-3.5.3.1-1.4.el6ev.noarch
RHEV-H: Red Hat Enterprise Virtualization Hypervisor release 6.6 (20150603.0.el6ev)
vdsm: vdsm-4.16.20-1.el6ev.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create a Windows VM, install the required software on it and sysprep
2. Make a template from the previous VM
3. Make a Pool based on the earlier template
        - Select template
        - Define the Pool name
        - Define the VM count
        - Define Manual as type
        - Under initial run, configure a domain
        - USB support: enable
4. Once the VMs are created, the admin starts them and completes the sysprep procedure
5. Once it is done, the admin user shuts them off
6. Define the amount of pre-started VMs
7. The system creates the required snapshots and starts the pre-started VMs
8. Set up permissions on the pool to a users group

Actual results:

After the initial configuration, if a user shuts down a VM, and the admin user doesn't move back the VM to the pool, the system deletes the snapshot and keeps the permissions between the user and the VM. When the user starts the VM back, there is no new data on the image which was previously written. Also, it doesn't create a new snapshot for the VM which leaves the VM to use the base image.

Expected results:

In a manual pool type, if the admin user doesn't return back the VM to the pool, the written snapshot should retain the information and boot back from it till the VM gets back to the pool, in that case the snapshot should be deleted. The base image should not be used on these operations.

Additional info:

Will add relevant logs (engine.log and vdsm.log)

Comment 5 Shmuel Melamud 2015-07-12 12:28:40 UTC
Simpler way to reproduce:

1. Create a VM and add a disk to it.
2. Create a template based on the VM above.
3. Create a Manual Pool based on the template above.
4. Enter User Portal.
5. Take a VM from the Pool and run it.
6. Return back to Admin Portal.
7. Ensure the user have taken ownership on the VM and new snapshot was created.
8. Shutdown the VM.

Actual result:

The snapshot is deleted after the VM goes down.

Expected result:

The snapshot is preserved after the VM goes down. It is deleted only after admin removes user's permission on the VM.

Comment 9 sefi litmanovich 2015-10-13 11:46:51 UTC
Verified on rhevm-3.6.0-0.18.el6.noarch according to steps in comment 5:

1. Create a VM and add a disk to it.
2. Create a template based on the VM above.
3. Create a Manual Pool based on the template above.
4. Enter User Portal.
5. Take a VM from the Pool and run it.
6. Return back to Admin Portal.
7. Ensure the user have taken ownership on the VM and new snapshot was created.
8. Shutdown the VM.

Got the expected results:

After shutting down the vm, snapshot still exits and user permission still exists.
After removing the user permission, snapashot is deleted.

Comment 12 errata-xmlrpc 2016-03-09 21:09:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://rhn.redhat.com/errata/RHEA-2016-0376.html


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