Bug 1489632 - OpenStack infrastructure hosts have ip_address assigned to hostname
Summary: OpenStack infrastructure hosts have ip_address assigned to hostname
Keywords:
Status: CLOSED DUPLICATE of bug 1400314
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: cfme-future
Assignee: Tzu-Mainn Chen
QA Contact: Ola Pavlenko
URL:
Whiteboard:
Depends On:
Blocks: 1511957
TreeView+ depends on / blocked
 
Reported: 2017-09-08 01:32 UTC by Robb Manes
Modified: 2022-03-13 14:25 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-27 15:42:56 UTC
Category: Bug
Cloudforms Team: Openstack
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Robb Manes 2017-09-08 01:32:47 UTC
Description of problem:
Using an OpenStack infrastructure provider, the "hostname" field is always set to the IP address, not the hostname of the host.

$ curl -k -u admin:smartvm https://cfme-env/api/hosts/1000000000111 | python -mjson.tool
{
    "actions": [
	{
	    "href": "https://cfme-env/api/hosts/1000000000111",
	    "method": "post",
	    "name": "edit"
	}
    ],
---------------
    "hostname": "192.168.1.2",
    "href": "https://cfme-env/api/hosts/1000000000111",
    "hypervisor_hostname": "prod-compute-host.example.com",
    "id": 1000000000633,
    "ipaddress": "192.168.1.2",
---------------
    "vmm_product": "rhel (Nova Compute hypervisor)",
    "vmm_vendor": "redhat"
}

In other providers this field is the genuine hostname, such as OVirt or RHEV I believe after reviewing their gems.  I didn't see if 'hostname' field is set this way in the event it's behind a load balancer or something similar, but as it appears not I thought I'd submit the PR anyway.

The impact of this is reports showing the name of the host only provide an IP address, not the actual hostname, which is necessary for capacity reporting to the end customer.

Upstream PR is here - if this is in error please feel free to shut it down with an explanation as to why the IP should also be the hostname:

https://github.com/ManageIQ/manageiq-providers-openstack/pull/94

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

How reproducible:
Every time

Steps to Reproduce:
1. Add OpenStack infrastructure provider
2. View hostname

Actual results:
Hostname and IP address are always the same.

Expected results:
Hostname should be the hostname of the host, not the address.

Thanks!

Comment 2 Robb Manes 2017-09-08 01:45:19 UTC
Improperly opened PR, sorry about that.  Link is:

https://github.com/ManageIQ/manageiq-providers-openstack/pull/95

Comment 3 Robb Manes 2017-09-27 15:42:56 UTC

*** This bug has been marked as a duplicate of bug 1400314 ***


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