]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
agent/node-proxy: fix wrong host name used in data endpoint
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 30 Jan 2024 16:38:31 +0000 (16:38 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Tue, 30 Jan 2024 17:02:40 +0000 (17:02 +0000)
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 <gabrioux@ibm.com>
(cherry picked from commit 224dd36df9c57e2162407ea0b98598f401884060)

src/pybind/mgr/cephadm/agent.py

index 68495d3bc061f473c5dee37201a397e3801d4317..5fbf309c544cb216c81a69ca318f968338862d74 100644 (file)
@@ -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)