Bug 2090331
| Summary: | Ansible ovirt_vm module should fail if snapshot_name doesn't exist | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Juan Orti Alcaine <jortialc> |
| Component: | ovirt-ansible-collection | Assignee: | Martin Necas <mnecas> |
| Status: | CLOSED ERRATA | QA Contact: | Barbora Dolezalova <bdolezal> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 4.4.10 | CC: | ahadas, apinnick, dfodor, gdeolive, mavital, mperina |
| Target Milestone: | ovirt-4.5.1 | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | ovirt-ansiblle-collection-2.0.5 | Doc Type: | Bug Fix |
| Doc Text: |
The ovirt_vm Ansible module displays an error message if a non-existent snapshot is used to clone a VM.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-07-14 12:55:59 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Verified in ovirt-ansible-collection-2.1.0-1.el8ev.noarch 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 (RHV Engine and Host Common Packages 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/RHBA-2022:5584 Due to QE capacity, we are not going to cover this issue in our automation |
Description of problem: When cloning a VM from a snapshot, if the snapshot indicated in 'snapshot_name' in the 'ovirt_vm' module doesn't exist, the task doesn't fail and the VM is cloned without disks. IMO if the user is indicating snapshot_vm and snapshot_name, the task should fail if the snapshot is not found. Version-Release number of selected component (if applicable): ovirt-ansible-collection-1.6.6-1.el8ev.noarch How reproducible: Always Steps to Reproduce: 1. Run some tasks like these to make a snapshot and clone a VM from it. I've intentionally used an incorrect snapshot_name to reproduce the issue: ~~~ - name: Create {{ vm_name }} snapshot redhat.rhv.ovirt_snapshot: auth: "{{ ovirt_auth }}" vm_name: "{{ vm_name }}" description: "{{ vm_name }}_snap" use_memory: no register: snapshot - name: Clone VM from snapshot redhat.rhv.ovirt_vm: auth: "{{ ovirt_auth }}" snapshot_vm: "{{ vm_name }}" snapshot_name: "{{ vm_name }}_NON_EXISTING" # <---- name: "{{ vm_name }}_backup" state: present ~~~ Actual results: VM is cloned but without disks. No errors running the playbook. Expected results: A failure in the ovirt_vm task indicating that the snapshot doesn't exist. Additional info: