Bug 1739487 - [Automate] Post-migration playbook doesn't wait for IP address to be inventoried
Summary: [Automate] Post-migration playbook doesn't wait for IP address to be inventoried
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: V2V
Version: 5.11.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: GA
: 5.11.0
Assignee: Fabien Dupont
QA Contact: Shveta
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On: 1739247
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-09 12:35 UTC by Fabien Dupont
Modified: 2019-12-13 14:54 UTC (History)
4 users (show)

Fixed In Version: 5.11.0.21
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1772642 (view as bug list)
Environment:
Last Closed: 2019-12-13 14:54:52 UTC
Category: ---
Cloudforms Team: V2V
Target Upstream Version:
Embargoed:
dmetzger: mirror+


Attachments (Terms of Use)

Description Fabien Dupont 2019-08-09 12:35:43 UTC
Description of problem:

The method that launches the pre/post-migration playbook doesn't check if the IP address of the VM is present in the inventory. For post-migration, the IP address can take some time to appear once the VM is started: the RHV agent needs to collect it, then CloudForms needs to refresh its inventory.

If the IP address isn't present, the Ansible Playbook service template will use its default, i.e. localhost. The consequence is that the playbook is run with the ManageIQ appliance as only host in the inventory. Depending on the playbook tasks, this could irremediably break the appliance.

How reproducible: depends on inventory refresh

Steps to Reproduce:
1. Create a migration plan with a post-migration playbook
2. Start the migration plan

Actual results:
The post migration playbook is run with only localhost in inventory

Expected results:
The playbook launcher waits for the IP address to be present before starting the playbook.

Additional info:

Comment 3 CFME Bot 2019-08-16 18:17:08 UTC
New commit detected on ManageIQ/manageiq-content/ivanchuk:

https://github.com/ManageIQ/manageiq-content/commit/e0803ee37f51377874b8109de5124c44ca2bcccf
commit e0803ee37f51377874b8109de5124c44ca2bcccf
Author:     tina <tfitzger>
AuthorDate: Fri Aug 16 12:43:33 2019 -0400
Commit:     tina <tfitzger>
CommitDate: Fri Aug 16 12:43:33 2019 -0400

    Merge pull request #560 from fdupont-redhat/v2v_wait_for_ip_ansible_playbook_launch

    V2v wait for ip ansible playbook launch

    (cherry picked from commit f1b641ba294837497c49237791db37474670e117)

    https://bugzilla.redhat.com/show_bug.cgi?id=1739487

 content/automate/ManageIQ/Transformation/Ansible.class/__methods__/launchplaybookasaservice.rb | 35 +-
 content/automate/ManageIQ/Transformation/Ansible.class/__methods__/launchplaybookasaservice.yaml | 2 +
 content/automate/ManageIQ/Transformation/StateMachines/Ansible.class/transformationplaybook.yaml | 1 +
 spec/content/automate/ManageIQ/Transformation/Ansible.class/__methods__/launchplaybookasaservice_spec.rb | 25 +-
 4 files changed, 44 insertions(+), 19 deletions(-)

Comment 4 Shveta 2019-08-27 02:01:54 UTC
ansible post migration playbooks works fine in 5.11.0.21.20190821214526_b0060d0

Comment 5 Fabien Dupont 2019-11-14 18:27:24 UTC
It would be great to backport it to CFME 5.10

Comment 6 Sudhir Mallamprabhakara 2019-11-14 19:13:57 UTC
ack for backport.


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