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:
Created attachment 1214697 [details] redirect link
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
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
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(+)