From: Guillaume Abrioux Date: Tue, 30 Jan 2024 16:38:31 +0000 (+0000) Subject: agent/node-proxy: fix wrong host name used in data endpoint X-Git-Tag: v18.2.4~314^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c44758cb525dac45d89671f499a4e8dfaa7135af;p=ceph.git agent/node-proxy: fix wrong host name used in data endpoint data['cephx']['name'] will return something like: node-proxy.hostname123 the prefix "node-proxy." has the be removed otherwise there will be a mismatch between what is actually expected. Signed-off-by: Guillaume Abrioux (cherry picked from commit 224dd36df9c57e2162407ea0b98598f401884060) --- diff --git a/src/pybind/mgr/cephadm/agent.py b/src/pybind/mgr/cephadm/agent.py index 68495d3bc061f..5fbf309c544cb 100644 --- a/src/pybind/mgr/cephadm/agent.py +++ b/src/pybind/mgr/cephadm/agent.py @@ -264,7 +264,7 @@ class NodeProxyEndpoint: self.validate_node_proxy_data(data) if 'patch' not in data.keys(): raise cherrypy.HTTPError(400, 'Malformed data received.') - host = data['cephx']['name'] + host = data['cephx']['name'][11:] self.mgr.node_proxy_cache.save(host, data['patch']) self.raise_alert(data)