Bug 1389491 - [beta1] Region field links to https://localhost.localdomain when during global/remote replication
Summary: [beta1] Region field links to https://localhost.localdomain when during globa...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: GA
: 5.8.0
Assignee: Nick Carboni
QA Contact: Alex Newman
URL:
Whiteboard: replication
Depends On:
Blocks: 1396523
TreeView+ depends on / blocked
 
Reported: 2016-10-27 17:51 UTC by cwyatt
Modified: 2018-01-19 21:19 UTC (History)
7 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1396523 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:46:57 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Region field (180.14 KB, image/png)
2016-10-27 17:51 UTC, cwyatt
no flags Details
redirect link (25.92 KB, image/png)
2016-10-27 17:52 UTC, cwyatt
no flags Details

Description cwyatt 2016-10-27 17:51:48 UTC
Created attachment 1214696 [details]
Region field

Description of problem:
On the global region if you go to the VM details page and click the Region field, it defaults to using the hostname of the remote region. However, the UI will allow you to enter an IP (not a hostname) of a remote appliance. So then when you click the Region field it redirects you to something like https://localhost.localdomain/vm_infra/show/3000000000040

Version-Release number of selected component (if applicable):
5.7.0.7-beta1.20161025153249_9376fbd

How reproducible:
100%

Steps to Reproduce:
1. Set up global/remote regions using IP for remote database
2. Navigate to a VM 
3. Click the link in the Region field

Actual results:


Expected results:


Additional info:

Comment 2 cwyatt 2016-10-27 17:52:24 UTC
Created attachment 1214697 [details]
redirect link

Comment 4 Harpreet Kataria 2016-10-27 19:57:59 UTC
Gregg,

UI calls model method https://github.com/ManageIQ/manageiq/blob/master/app/models/miq_region.rb#L223 to determine the Remote region link from VM summary screen.
Can you please look into this BZ, doesnt look like a UI issue.

Please send it back to me if it turns out to be UI issue.

Thanks,
~Harpreet

Comment 5 Nick Carboni 2016-11-17 23:02:24 UTC
It is possible that this was only meant to work when a routable hostname was set for the remote UI server (which was not the case here), but I made a fix to unset the hostname when it looks like "localhost" so that we can fall back to using the IP. This was this has at least a chance of working out of the box.

https://github.com/ManageIQ/manageiq/pull/12732

Comment 6 CFME Bot 2016-11-18 13:56:27 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/d53a031dd1aa9578f8f8b6bb023ba4ad702eee13

commit d53a031dd1aa9578f8f8b6bb023ba4ad702eee13
Author:     Nick Carboni <ncarboni>
AuthorDate: Thu Nov 17 17:53:01 2016 -0500
Commit:     Nick Carboni <ncarboni>
CommitDate: Thu Nov 17 17:59:42 2016 -0500

    Unset the server hostname when it matches /.*localhost.*/
    
    This hostname is not routable so it makes no sense to expose it
    as the access point for the server.
    
    Calls to methods like MiqRegion#remote_ui_hostname will now properly
    fallback to using the IP address rather than returning something like
    "localhost.localdomain" and nearly ensuring the caller's failure.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1389491

 app/models/miq_server.rb | 1 +
 1 file changed, 1 insertion(+)


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