Bug 1772642

Summary: [Automate] Post-migration playbook doesn't wait for IP address to be inventoried
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: V2VAssignee: Fabien Dupont <fdupont>
Status: CLOSED ERRATA QA Contact: Shveta <sshveta>
Severity: urgent Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: urgent    
Version: 5.11.0CC: bthurber, fdupont, pvauter, simaishi, smallamp
Target Milestone: GAKeywords: ZStream
Target Release: 5.10.13   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.13.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1739487 Environment:
Last Closed: 2019-12-03 06:55:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: V2V Target Upstream Version:
Embargoed:

Comment 2 CFME Bot 2019-11-14 19:46:46 UTC
New commit detected on ManageIQ/manageiq-content/hammer:

https://github.com/ManageIQ/manageiq-content/commit/b1f0448a763acf94eca3b9b06e8c65226c62156e
commit b1f0448a763acf94eca3b9b06e8c65226c62156e
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)

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

 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-11-21 00:07:09 UTC
Hi Fabien, 

I created a migration plan with pre and post migration playbooks.
Premigration playbook ran fine . Migration plan passed and VM is migrated .

I have two questions : 
1) How can I verify that post-migration playbook waited for IP before starting.
2) Post migration log shows error "fatal: [10.8.59.87]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: connect to host 10.8.59.87 port 22: Connection timed out", "unreachable": true}"

Appliance : https://10.8.198.220
Migration plan :  plan_nhhSR.
All logs can be seen there.

Please check once.

Comment 5 Shveta 2019-11-21 00:08:36 UTC
could post migration playbook failure be related to https://bugzilla.redhat.com/show_bug.cgi?id=1772641?
I have created and applied credentials to the playbook too .

Comment 6 Fabien Dupont 2019-11-21 15:03:14 UTC
I think the test is successful because the host you see in the Ansible playbook log isn't "localhost". This means that the playbook has a real IP address in the inventory.
I have no idea of the reason why the post-migration playbook failed. The connection timed out. Can the CloudForms appliance connect to the VM ? Is the destination network accessible ?

Comment 7 Shveta 2019-11-21 18:29:27 UTC
Yes the post migration shows IP and not localhost.
Debugging why post migration failed separately .

Verified in 5.10.13.0.20191119151058_31d9a94

Comment 9 errata-xmlrpc 2019-12-03 06:55:43 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/RHBA-2019:4047