Bug 1619461 - [v2v] Post migration playbook cannot find hostname/IP address and runs against localhost
Summary: [v2v] Post migration playbook cannot find hostname/IP address and runs agains...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.9.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: cfme-future
Assignee: Brett Thurber
QA Contact: Kedar Kulkarni
URL:
Whiteboard: v2v
Depends On: 1626503
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-20 22:44 UTC by Kedar Kulkarni
Modified: 2019-03-06 22:09 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-06 22:09:49 UTC
Category: ---
Cloudforms Team: V2V
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Kedar Kulkarni 2018-08-20 22:44:03 UTC
Description of problem:
Post migration playbook cannot find hostname/IP address and runs against localhost. Then I checked the VM in RHV and found out that the VM did not show IP address associated with it in the UI. 
Installed rhevm guest agent as outlined in this https://access.redhat.com/solutions/261763 and VM did show the IP address in UI. And if I would run the playbook  now, it can get the correct IP address from VM and execute play successfully.

Version-Release number of selected component (if applicable):
5.9.4.4

How reproducible:
100%

Steps to Reproduce:
1.Create a VM without rhvm-guest-agent installed in VMware
2.Migrate it and have pre and post migration playbook services attached to migration


Actual results:
Pre-migration playbook runs correctly, while post-migration cannot, as it can't find IP address and falls back to run against localhost.


Expected results:
Post migration playbook should run successfully against migrated VM and not run against localhost.

Additional info:
I have tested running migration with rhel7-server vm with and without guest tools and found out, if I had the guest tools installed, the IP address of the VM will be available for playbook to execute.

Comment 2 Fabien Dupont 2018-08-21 07:03:54 UTC
This is the expected behavior from a playbook point of view.

The IP address is provided to RHV by the guest agent. In CloudForms, the IP address is coming from the inventory, which is limited to what information RHV provides. So, if the guest agent is not installed, RHV doesn't have the IP, hence CloudForms doesn't have it either.

About the fact that it runs against localhost, it is also on purpose because we consider that we can run a playbook even if the VM is down. It's then the responsibility of the playbook writer to ensure it can run in a limited context.

As you pointed out, the question here is "how do we ensure that the guest agent is installed during the migration process ?"

Comment 14 Fabien Dupont 2019-03-06 22:09:49 UTC
The only remaining issue is on virt-v2v side and is tracked here. The CloudForms behavior is normal. Closing as NOTABUG


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