Bug 1491010 - [ovirt-ansible-roles] ovirt-vm-infra: When VM already exists in environment, role should left that VM in the same running state
Summary: [ovirt-ansible-roles] ovirt-vm-infra: When VM already exists in environment, ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-ansible-roles
Version: 4.1.6
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.2.2
: ---
Assignee: Ondra Machacek
QA Contact: Petr Kubica
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-12 18:32 UTC by Petr Kubica
Modified: 2019-05-16 13:22 UTC (History)
3 users (show)

Fixed In Version: ovirt-ansible-vm-infra-1.1.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-15 18:00:33 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ansible ansible issues 27382 0 None closed ovirt_vms: state:present shouldn't start VM if off 2020-10-17 09:39:56 UTC
Red Hat Product Errata RHEA-2018:1534 0 None None None 2018-05-15 18:01:05 UTC

Description Petr Kubica 2017-09-12 18:32:17 UTC
Description of problem:
When VM already exists in environment, role should left that VM in the same running state (so for example, in stopped state)

User can have some VMs down for a good reason (VM was created before by this role and variables are still present in playbook), role should only add VMs from templates and configure them or update these existing VMs.

If user will want run them or change their running state, he will use 'state' variable.

example of some good reason:
- VM as backup old databases, 
- VM using same IP as another VM or same MAC
- Security reason
...

Version-Release number of selected component (if applicable):
ovirt-ansible-roles-1.0.3-1.el7ev.noarch
ansible-2.3.2.0-2.el7.noarch

Comment 1 Ondra Machacek 2017-09-14 06:51:33 UTC
This has been tracked upstream in https://github.com/ansible/ansible/issues/27382, and will be in Ansible 2.4. Please re-verify with Ansible 2.4, once released.

Comment 3 Ondra Machacek 2017-09-20 18:01:17 UTC
The default state of the VM is running for ovirt-vm-infra role. If user don't want to touch the VM state just make sure it's present', he should change state to present. If he want to make sure the VMs are stopped, he should change state to stopped.

Comment 4 Petr Kubica 2018-01-29 13:10:50 UTC
I think that default state for ovirt-vm-infra should be present, not running

Comment 5 Ondra Machacek 2018-01-29 13:18:42 UTC
I can be. Let's change it, so we'll be consistent with the recent change in ovirt_vms module. Either move this bug back to ASSIGNED or create new one, thanks.

Comment 7 Petr Kubica 2018-03-07 16:34:08 UTC
Verified in
ansible-2.5.0-0.3.rc1.el7ae.noarch
ovirt-ansible-vm-infra-1.1.5-1.el7ev.noarch

Comment 12 errata-xmlrpc 2018-05-15 18:00:33 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://access.redhat.com/errata/RHEA-2018:1534

Comment 13 Franta Kust 2019-05-16 13:07:54 UTC
BZ<2>Jira Resync


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