Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1513831 - Stopping stateless VMs will timeout and task will fail when using ovirt_vms module
Summary: Stopping stateless VMs will timeout and task will fail when using ovirt_vms m...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ansible
Version: 4.1.7
Hardware: All
OS: Linux
high
medium
Target Milestone: ovirt-4.2.3
: ---
Assignee: Ondra Machacek
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-16 04:40 UTC by nijin ashok
Modified: 2018-06-28 07:05 UTC (History)
5 users (show)

Fixed In Version: ansible-2.5.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-28 07:05:54 UTC
oVirt Team: Infra
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3245411 None None None 2017-11-20 04:51:41 UTC
Github ansible ansible pull 32955 None None None 2017-11-16 08:55:06 UTC

Description nijin ashok 2017-11-16 04:40:27 UTC
Description of problem:

Currently, the module is waiting for the stateless snapshot to go none while stopping a stateless VM. However, this condition will never happen as the stateless snapshot id will become active when the stateless snapshot is removed. So it will be in this loop indefinitely and finally will timeout after the timeout period.

For example, 354db0cf is the active snapshot before starting the VM.

engine=# select snapshot_id,description from snapshots where vm_id = 'd47d6843-a2d4-4ed7-80cf-493f9c3b0288';
             snapshot_id              | description 
--------------------------------------+-------------
 354db0cf-fbbf-4c2c-9273-1d0fa1bc5b2b | Active VM

After starting the VM, 354db0cf, will be the stateless snapshot.

engine=# select snapshot_id,description from snapshots where vm_id = 'd47d6843-a2d4-4ed7-80cf-493f9c3b0288';
             snapshot_id              |    description     
--------------------------------------+--------------------
 59e7f639-07c3-41f4-889a-aaa79ffd21ee | Active VM
 354db0cf-fbbf-4c2c-9273-1d0fa1bc5b2b | stateless snapshot

Then if we shut down the VM, 354db0cf will become active again.

engine=# select snapshot_id,description from snapshots where vm_id = 'd47d6843-a2d4-4ed7-80cf-493f9c3b0288';
             snapshot_id              | description 
--------------------------------------+-------------
 354db0cf-fbbf-4c2c-9273-1d0fa1bc5b2b | Active VM
(1 row)

As per the current code, it will wait for 354db0cf to go none which will never happen.



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

rhevm-4.1.7.6-0.1.el7.noarch
ansible-2.3.2.0-2.el7.noarch.rpm

How reproducible:

100%

Steps to Reproduce:

1. Start a stateless VM.

2. Try to stop using ovirt_vms module.

      - name: Shutting down VM
        ovirt_vms:
           auth: "{{ ovirt_auth }}"
           name: testvm
           state: stopped


3. It will fail with a timeout error.

Actual results:

Stopping stateless VM is not working.

Expected results:

Stopping stateless VM should work.

Additional info:

Comment 1 nijin ashok 2017-11-16 04:41:17 UTC
I have sent a PR here https://github.com/ansible/ansible/pull/32955

Comment 2 Martin Perina 2018-01-03 12:01:28 UTC
Will be part of Ansible 2.5.0

Comment 3 Martin Perina 2018-04-13 11:58:29 UTC
Moving to ON_QA, Ansible 2.5 is required by engine 4.2.3

Comment 4 Eyal Edri 2018-04-18 09:32:18 UTC
Should this be part of an ET if we ended up dropping Ansible ET from RHV?

Comment 5 Martin Perina 2018-04-19 12:08:20 UTC
(In reply to Eyal Edri from comment #4)
> Should this be part of an ET if we ended up dropping Ansible ET from RHV?

Ansible Engine 2.5 is already out, so we don't have any errata to attach them to. I started a thread with Ansible team how to deal with 2.5.1 and future versions

Comment 6 Lucie Leistnerova 2018-04-20 11:58:29 UTC
Stateless VM stopped successfully.

verified in ansible 2.5.0 with ovirt-engine-4.2.3.2-0.1.el7.noarch


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