Bug 1847410

Summary: Waiting for IP address is very long after migration
Product: Red Hat CloudForms Management Engine Reporter: Fabien Dupont <fdupont>
Component: V2VAssignee: Fabien Dupont <fdupont>
Status: CLOSED ERRATA QA Contact: Nandini Chandra <nachandr>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.11.6CC: akarol, bthurber, ngupta, simaishi
Target Milestone: GAKeywords: ZStream
Target Release: 5.11.7Flags: simaishi: cfme-5.11.z+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.7.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-06 14:32:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: V2V Target Upstream Version:
Embargoed:

Description Fabien Dupont 2020-06-16 10:32:30 UTC
Description of problem:

When a migration is at the state "Waiting for IP address" for the post migration playbook, it can be because the inventory is not refreshed. The inventory is refreshed while waiting for the new VM to appear. But, during that refresh, it is likely that RHV will not report the IP addresses of the VM, because the RHV Guest Agent is not started yet.

Unfortunately, updates to RHV Guest Agent reported data don't trigger any event on RHV side, so CloudForms cannot know a new refresh is needed. The IP addresses will only be found with the next full refresh, increasing the migration time.

It would then be useful to run a new targeted refresh from time to time, as it consumes little resources.

Comment 2 Fabien Dupont 2020-06-16 10:36:45 UTC
https://github.com/ManageIQ/manageiq/pull/20278

Comment 3 Fabien Dupont 2020-06-18 20:44:20 UTC
https://github.com/ManageIQ/manageiq/pull/20292

Comment 4 CFME Bot 2020-06-22 21:10:20 UTC
New commit detected on ManageIQ/manageiq/ivanchuk:

https://github.com/ManageIQ/manageiq/commit/3642376e4805d1ecf95da8920ede0ec63d022b1d
commit 3642376e4805d1ecf95da8920ede0ec63d022b1d
Author:     Adam Grare <agrare>
AuthorDate: Thu Jun 18 21:22:55 2020 +0000
Commit:     Satoe Imaishi <simaishi>
CommitDate: Mon Jun 22 21:09:12 2020 +0000

    Merge pull request #20292 from fdupont-redhat/v2v_refresh_while_waiting_for_ip_address_2

    Do targeted refresh when waiting for IP address

    (cherry picked from commit 6fb4121896dd47bd089eba3a8072991d1ba6aed3)

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

 app/models/infra_conversion_job.rb | 8 +
 spec/models/infra_conversion_job_spec.rb | 22 +-
 2 files changed, 28 insertions(+), 2 deletions(-)

Comment 5 CFME Bot 2020-06-22 21:15:22 UTC
New commit detected on ManageIQ/manageiq/jansa:

https://github.com/ManageIQ/manageiq/commit/262bc6fcd286d3608c54384fea8ef3d7297197d2
commit 262bc6fcd286d3608c54384fea8ef3d7297197d2
Author:     Adam Grare <agrare>
AuthorDate: Thu Jun 18 21:22:55 2020 +0000
Commit:     Satoe Imaishi <simaishi>
CommitDate: Mon Jun 22 21:10:53 2020 +0000

    Merge pull request #20292 from fdupont-redhat/v2v_refresh_while_waiting_for_ip_address_2

    Do targeted refresh when waiting for IP address

    (cherry picked from commit 6fb4121896dd47bd089eba3a8072991d1ba6aed3)

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

 app/models/infra_conversion_job.rb | 8 +
 spec/models/infra_conversion_job_spec.rb | 22 +-
 2 files changed, 28 insertions(+), 2 deletions(-)

Comment 8 Fabien Dupont 2020-07-15 08:29:25 UTC
The steps to verify are:

1. Create a migration plan from VMware to RHV:
   - The VM must be up and have an IP address reported in CloudForms inventory.
   - The plan must set a post-migration playbook.
2. Run the migration plan.

You should observe that the step "Waiting for IP address" is not overly long.

Comment 11 Nandini Chandra 2020-07-23 00:31:23 UTC
Verified in 5.11.7.1

Comment 14 errata-xmlrpc 2020-08-06 14:32:55 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 (Critical: CloudForms 5.0.7 bug fix and enhancement update), 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/RHSA-2020:3358