Project

General

Profile

Actions

Bug #44923

closed

mgr/dashboard: standby mgr redirects to a IP address instead of a FQDN URL

Added by Ernesto Puerta almost 6 years ago. Updated 8 months ago.

Status:
Resolved
Priority:
High
Category:
-
Target version:
% Done:

0%

Source:
Q/A
Backport:
nautilus, octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v16.0.0-546-g0b18f60706
Released In:
v16.2.0~2892
Upkeep Timestamp:
2025-07-15T01:15:48+00:00

Description

Only when the dashboard server_address is left to the default localhost (0.0.0.0 or ::) the stand-by ceph-mgr's dashboard redirects to a FQDN hostname. However, if the dashboard address is bound to a specific interface (192.0.2.1 for the active mgr, 192.0.2.2 for the stand-by mgr), then only that IP address is used:

# curl http://192.0.2.2:8443
This resource can be found at <a href='http://192.0.2.1:8443/'>http://192.0.2.1:8443/</a>.

Or:

# ceph mgr services
{
    "dashboard": "http://192.0.2.1:8443/",
    "prometheus": "http://x.ceph-mgr.example.com:9283/" 
}

That full URI (including hostname) is provided by the dashboard serve() -> self.set_uri() and uses python socket.getfqdn().

Given that under containerized deployments the internal and external IP address will likely differ from the external ones, we should avoid returning a useless IP and either use, by default, the retrieved hostname or a configured one.

Additionally, returning IP address 'breaks' the seamless failover, as the browser cannot ensure that the IP address and the FQDN are the same web service (since HTTP servers may use the hostname part in the HTTP GET request to redirect to different virtual servers from the same IP:port).

OPEN QUESTION: would it be desirable that the mgr itself deals with this matter for all services? That way ceph-mgr modules only need to provide (schema, port, URL path) (while the hostname part is guessed by the ceph-mgr).


Related issues 3 (0 open3 closed)

Related to Dashboard - Bug #42664: mgr/{dashboard,prometheus}: Fix hostname in `ceph mgr services`ResolvedPatrick Seidensal

Actions
Copied to Dashboard - Backport #45019: nautilus: mgr/dashboard: standby mgr redirects to a IP address instead of a FQDN URLResolvedVolker TheileActions
Copied to Dashboard - Backport #45020: octopus: mgr/dashboard: standby mgr redirects to a IP address instead of a FQDN URLResolvedVolker TheileActions
Actions #1

Updated by Ernesto Puerta almost 6 years ago

  • Related to Bug #42664: mgr/{dashboard,prometheus}: Fix hostname in `ceph mgr services` added
Actions #2

Updated by Ernesto Puerta almost 6 years ago

  • Description updated (diff)
Actions #3

Updated by Lenz Grimmer almost 6 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 34452
Actions #4

Updated by Lenz Grimmer almost 6 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Assignee set to Ernesto Puerta
Actions #5

Updated by Volker Theile almost 6 years ago

  • Copied to Backport #45019: nautilus: mgr/dashboard: standby mgr redirects to a IP address instead of a FQDN URL added
Actions #6

Updated by Volker Theile almost 6 years ago

  • Copied to Backport #45020: octopus: mgr/dashboard: standby mgr redirects to a IP address instead of a FQDN URL added
Actions #7

Updated by Nathan Cutler almost 6 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions #8

Updated by Ernesto Puerta almost 5 years ago

  • Project changed from mgr to Dashboard
  • Category changed from 146 to 190
Actions #9

Updated by Upkeep Bot 8 months ago

  • Merge Commit set to 0b18f60706e4f85ce15b318755e6f94725241af4
  • Fixed In set to v16.0.0-546-g0b18f60706
  • Released In set to v16.2.0~2892
  • Upkeep Timestamp set to 2025-07-15T01:15:48+00:00
Actions

Also available in: Atom PDF