Bug 2153726

Summary: [RFE] On the Dashboard -> Cluster -> Monitoring page, source url of prometheus is in format http://hostname:9095 which doesn't work when you click.
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Yalcin <yalbayra>
Component: CephadmAssignee: Redouane Kachach Elhichou <rkachach>
Status: CLOSED ERRATA QA Contact: Mohit Bisht <mobisht>
Severity: low Docs Contact: Akash Raj <akraj>
Priority: unspecified    
Version: 5.2CC: aasharma, adking, akraj, ceph-eng-bugs, cephqe-warriors, epuertat, milverma, mobisht, msaini, nia, rkachach, tserlin, vereddy
Target Milestone: ---Keywords: FutureFeature
Target Release: 6.1Flags: rkachach: needinfo-
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ceph-17.2.6-16.el9cp Doc Type: Bug Fix
Doc Text:
.The generated Prometheus URL is now accessible Previously, if a host did not have an FQDN, the Prometheus URL generated would be _http://_host-shortname_:9095_, and it would be inaccessible. With this fix, if no FQDN is available, the host IP is used over the shortname. The URL generated for Prometheus is now in a format that is accessible, even if the host Prometheus is deployed on a service that has no FQDN available.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-15 09:16:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2192813    

Description Yalcin 2022-12-15 10:12:56 UTC
Description of problem: On the Dashboard -> Cluster -> Monitoring page, source url of prometheus is in format http://hostname:9095 which doesn't work when you click because it's not fully qualified. It works fine if you manually change it to FQDN like http://fqdn:9095. If the cluster is bootstrapped using the --allow-fqdn-hostname option and the server OS is built using the fqdn (ie hostname returns the fqdn) then the link is rendered correctly.


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

How reproducible:
By deploying services using short hostnames without --allow-fqdn-hostname option and server OS was built using short hostname (hostname command returns shortname, not fqdn)

Steps to Reproduce:
1. Deploy services using short hostnames
2. Check Dashboard -> Cluster -> Monitoring page if the prometheus url built using shortname or FQDN
3.

Actual results:
Dashboard -> Cluster -> Monitoring page, source url of prometheus is in format http://shortname:9095

Expected results:
Dashboard -> Cluster -> Monitoring page, source url of prometheus is in format http://fqdn:9095

Additional info:

Comment 11 Redouane Kachach Elhichou 2023-01-23 12:26:35 UTC
I submitte the following Upstream fix candidate: https://github.com/ceph/ceph/pull/49836

Comment 13 Redouane Kachach Elhichou 2023-03-31 12:29:31 UTC
Hi @yalbayra 

Just to understand a little bit and to get more context :)

1) Did the customer test the fix?
2) which release did they use to test it?
3) Why the customer is complaining about https when prometheus in 5.3 is plain http only?

Right now, for 5.3 we can't do much as AFAIK. The fix consists on using IPs because we don't have any procedure to migrate a cluster using short-names to fqdns automatically.

For 7.0 we will study the possibility of adding fqdn dynamically for already deployed hosts (user will need to add it by hand).

Comment 26 Adam King 2023-06-06 13:12:34 UTC
*** Bug 2209384 has been marked as a duplicate of this bug. ***

Comment 28 errata-xmlrpc 2023-06-15 09:16:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Red Hat Ceph Storage 6.1 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:3623