Bug 1417965 - VM Hostname not displaying when RHV has FQDN
Summary: VM Hostname not displaying when RHV has FQDN
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.9.0
Assignee: Moti Asayag
QA Contact: Ilanit Stein
Whiteboard: rhev
Depends On:
Blocks: 1449273 1523405
TreeView+ depends on / blocked
Reported: 2017-01-31 14:07 UTC by Ian Tewksbury
Modified: 2018-03-06 15:46 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1449273 1523405 (view as bug list)
Last Closed: 2018-03-06 15:46:57 UTC
Category: ---
Cloudforms Team: RHEVM
Target Upstream Version:
istein: needinfo+

Attachments (Terms of Use)
RHV screenshot with FQDN (305.73 KB, image/png)
2017-01-31 14:07 UTC, Ian Tewksbury
no flags Details

Description Ian Tewksbury 2017-01-31 14:07:41 UTC
Created attachment 1246264 [details]
RHV screenshot with FQDN

Description of problem:

RHV has the FQDN for my VMs but that is not showing as Hostname filed in CFME.

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


How reproducible:

I can reproduce in Red Hat Consulting Lab in IAD. Let me know if someone needs access to see.

Steps to Reproduce:
1. Connect CFME to a RHV provider
2. Install RHV tools on VM
3. Verify FQDN is populated for VM in RHV
4. Go to CFME, no Hostname is listed for VM

Actual results:

No hostname in CFME for VM that has FQDN in RHV.

Expected results:

If RHV has the FQDN for a VM then that should be populated as the Hostname in CFME.

Additional info:

Attached screen shots of RHV and CFME.

Comment 5 Ilanit Stein 2017-02-16 20:47:58 UTC
Tested it on CFME-,
For A VM that run on RHV-4.0.6, and has FQDN (host name), 
and it's FQDN is seen in RHV webadmin,
on CFME, in VM details window, "hostnames" field is empty.

Comment 6 Ian Tewksbury 2017-02-16 20:52:50 UTC

Wahoo, I am not crazy!

Comment 7 Moti Asayag 2017-02-20 13:40:03 UTC
The ovirt gem doesn't read the hostname value from the ovirt-engine response, therefore it isn't being persisted to CFME.

For v3, using ovirt gem, the field is reported under:

For v4, using ovirt-engine-sdk-ruby, the field is reported under:

On CFME side, vm's hostname is persisted per network/vm nic, however for the ovirt-engine it is reported once per host.

Therefore it will be kept on CFME db for the first recorded nic/network/ip.

Comment 8 CFME Bot 2017-04-02 20:32:41 UTC

Comment 10 CFME Bot 2017-04-03 19:07:52 UTC
New commit detected on ManageIQ/ovirt/master:

commit 83abcc98e1d2de3b56a24fcb86baa698f63e767c
Author:     Moti Asayag <masayag@redhat.com>
AuthorDate: Sun Apr 2 16:17:58 2017 +0300
Commit:     Moti Asayag <masayag@redhat.com>
CommitDate: Sun Apr 2 23:24:41 2017 +0300

    RHV VM not retrieving FQDN
    The PR adds the ability to retrieve the FQDN when it is reported by the
    VM's guest agent.

 lib/ovirt/vm.rb | 3 +++
 1 file changed, 3 insertions(+)

Comment 13 Moti Asayag 2017-04-24 08:58:56 UTC
Still ON_DEV

OVirt PR was merged.

Waiting for manageiq-gems-pending PR [1] to be merged, to include ovirt's gem with the fix for this bug. 

Next, manageiq-providers-ovirt PR could be merged.

[1] https://github.com/ManageIQ/manageiq-gems-pending/pull/127
[2] https://github.com/ManageIQ/manageiq-providers-ovirt/pull/7

Comment 14 Juan Hernández 2017-04-25 14:29:03 UTC
The pull request to use the new version of the 'ovirt' gem has been moved to th manageiq-providers-ovirt repository:

  Use version 0.16.0 of the 'ovirt' gem

Comment 15 CFME Bot 2017-04-25 15:38:45 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/master:

commit b57698ba9b875f9d1709c71a8d39c92d250634e4
Author:     Moti Asayag <masayag@redhat.com>
AuthorDate: Sun Apr 2 22:43:44 2017 +0300
Commit:     Moti Asayag <masayag@redhat.com>
CommitDate: Thu Apr 13 11:17:42 2017 +0300

    RHV VM not saving FQDN
    The PR allows to save the FQDN when it is reported by the VM's
    guest agent.

 .../manageiq/providers/redhat/infra_manager/refresh/parse/parser.rb  | 5 +++++
 .../redhat/infra_manager/refresh/parse/strategies/vm_inventory.rb    | 3 +++
 .../providers/redhat/infra_manager/refresh/refresher_3_1_spec.rb     | 2 +-
 .../providers/redhat/infra_manager/refresh/refresher_4_1_spec.rb     | 1 +
 .../providers/redhat/infra_manager/refresh/refresher_3_1.yml         | 2 +-
 5 files changed, 11 insertions(+), 2 deletions(-)

Comment 19 Ilanit Stein 2017-11-02 18:43:04 UTC
Verified on CFME-

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