Bug 2003996 - ovirt_snapshot module fails to delete snapshot when there is a "Next Run configuration snapshot"
Summary: ovirt_snapshot module fails to delete snapshot when there is a "Next Run conf...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.4.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.5.0
: 4.5.0
Assignee: Arik
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-14 09:43 UTC by Marian Jankular
Modified: 2022-05-31 14:49 UTC (History)
6 users (show)

Fixed In Version: ovirt-engine-4.5.0
Doc Type: Bug Fix
Doc Text:
Previously, snapshots that represent VM next-run configuration were reported by ovirt-ansible but their type was missing and they could not be removed. In this release, snapshots that represent VM next-run configuration are not reported to clients, including ovirt-ansible.
Clone Of:
Environment:
Last Closed: 2022-05-26 16:23:11 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-43640 0 None None None 2021-09-14 09:48:28 UTC
Red Hat Product Errata RHSA-2022:4711 0 None None None 2022-05-26 16:23:42 UTC
oVirt gerrit 116705 0 master MERGED rest-api: skip next-run snapshots 2021-09-19 19:47:12 UTC

Description Marian Jankular 2021-09-14 09:43:41 UTC
Description of problem:
ovirt_snapshot module fails to delete snapshot when there is a "Next Run configuration snapshot"

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

How reproducible:
everytime

Steps to Reproduce:
1. make sure there is Next Run configuration snapshot for the vm as well as regular snapshot
2. try to delete the regular snapshot

Actual results:
TASK [Delete snapshots] *******************************************************************************************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is "[Cannot remove Snapshot. The operation is only allowed for regular snapshots.]". HTTP response code is 409.
failed: [localhost] (item=VM1) => {"ansible_loop_var": "item", "changed": false, "item": "VM1", "msg": "Fault reason is \"Operation Failed\". Fault detail is \"[Cannot remove Snapshot. The operation is only allowed for regular snapshots.]\". HTTP response code is 409."}

Expected results:
regular snapshot will be deleted, module will not attempt to delete "Next Run configuration snapshot"

Additional info:

Comment 4 Nisim Simsolo 2022-05-02 18:43:24 UTC
Verified:
ovirt-engine-4.5.0.5-0.7.el8ev
vdsm-4.50.0.13-1.el8ev.x86_64
qemu-kvm-6.2.0-11.module+el8.6.0+14707+5aa4b42d.x86_64
libvirt-daemon-8.0.0-5.module+el8.6.0+14480+c0a3aa0f.x86_64

Verification scenario:
1. Run VM 
2. Create 3 snapshots.
3. increase VM memory, CPUs and change VM HA configuration (in order to create "next run configuration" snapshot). make sure delta icon now appears next to VM. Keep VM running.
4. Observe VM snapshots, verify "next run configuration" snapshot is now filtered. Verify actions are available for any of the snapshots (create, delete, clone and make template).
5. While VM is running, delete the 2nd snapshot.
   Verify snapshot deleted and no error observed (engine.log and vdsm.log)
6. clone 3rd snapshot. 
   Verify clone created, run cloned VM and verify VM is running.
7. make template from 1st snapshot.
   Verify template created. create new VM from template, verify VM created, run VM and verify VM is running.
8. Restart the VM and verify changes made before the restart are now effective.

Comment 9 errata-xmlrpc 2022-05-26 16:23:11 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 (Moderate: RHV Manager (ovirt-engine) [ovirt-4.5.0] security update), 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://access.redhat.com/errata/RHSA-2022:4711


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