From: Redouane Kachach Date: Tue, 17 May 2022 15:26:39 +0000 (+0200) Subject: mgr/cephadm: stripping out / from the end of the url X-Git-Tag: v18.0.0~868^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=17032f6be22e9efc3e199d7e35091025bfaae965;p=ceph.git mgr/cephadm: stripping out / from the end of the url Fixes: https://tracker.ceph.com/issues/55638 Signed-off-by: Redouane Kachach --- diff --git a/src/pybind/mgr/cephadm/services/monitoring.py b/src/pybind/mgr/cephadm/services/monitoring.py index 6bde0cc3e8c1..0bd388f461fc 100644 --- a/src/pybind/mgr/cephadm/services/monitoring.py +++ b/src/pybind/mgr/cephadm/services/monitoring.py @@ -148,7 +148,7 @@ class AlertmanagerService(CephadmService): proto = None # http: or https: url = mgr_map.get('services', {}).get('dashboard', None) if url: - dashboard_urls.append(url) + dashboard_urls.append(url.rstrip('/')) p_result = urlparse(url) proto = p_result.scheme port = p_result.port @@ -164,7 +164,7 @@ class AlertmanagerService(CephadmService): continue assert dd.hostname is not None addr = self._inventory_get_fqdn(dd.hostname) - dashboard_urls.append(build_url(scheme=proto, host=addr, port=port)) + dashboard_urls.append(build_url(scheme=proto, host=addr, port=port).rstrip('/')) for dd in self.mgr.cache.get_daemons_by_service('snmp-gateway'): assert dd.hostname is not None