]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: stripping out / from the end of the url
authorRedouane Kachach <rkachach@redhat.com>
Tue, 17 May 2022 15:26:39 +0000 (17:26 +0200)
committerAdam King <adking@redhat.com>
Wed, 18 May 2022 19:47:45 +0000 (15:47 -0400)
Fixes: https://tracker.ceph.com/issues/55638
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit 17032f6be22e9efc3e199d7e35091025bfaae965)

src/pybind/mgr/cephadm/services/monitoring.py

index 239c24bab096b13a131ffe887a8cab1fb82befba..888ffa3d262b5087982b5edcee16fa4ecf1de633 100644 (file)
@@ -139,7 +139,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
@@ -155,7 +155,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