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:
https://github.com/ManageIQ/manageiq-content/pull/560#issuecomment-520327162
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(-)
ansible post migration playbooks works fine in 5.11.0.21.20190821214526_b0060d0
It would be great to backport it to CFME 5.10
ack for backport.