summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/cephadm/inventory.py
diff options
context:
space:
mode:
authorSebastian Wagner <sewagner@redhat.com>2022-01-05 10:26:01 +0100
committerGitHub <noreply@github.com>2022-01-05 10:26:01 +0100
commit2a450f68a168b0a300fe2d7417ebf991e8c7fbc1 (patch)
tree3e37f8b793748d4578f0b572879059630a325973 /src/pybind/mgr/cephadm/inventory.py
parentMerge pull request #44367 from sebastian-philipp/osd-count-fix-again (diff)
parentcephadm: add enhanced scan option to agent's volume gatherer (diff)
downloadceph-2a450f68a168b0a300fe2d7417ebf991e8c7fbc1.tar.xz
ceph-2a450f68a168b0a300fe2d7417ebf991e8c7fbc1.zip
Merge pull request #44266 from adk3798/http-reconfig
mgr/cephadm: reconfig agents over http Reviewed-by: Sebastian Wagner <sewagner@redhat.com>
Diffstat (limited to 'src/pybind/mgr/cephadm/inventory.py')
-rw-r--r--src/pybind/mgr/cephadm/inventory.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pybind/mgr/cephadm/inventory.py b/src/pybind/mgr/cephadm/inventory.py
index ee8f164ab47..da4673cd88c 100644
--- a/src/pybind/mgr/cephadm/inventory.py
+++ b/src/pybind/mgr/cephadm/inventory.py
@@ -512,6 +512,9 @@ class HostCache():
self.agent_counter[host] = int(j.get('agent_counter', 1))
self.metadata_up_to_date[host] = False
self.agent_keys[host] = str(j.get('agent_keys', ''))
+ agent_port = int(j.get('agent_ports', 0))
+ if agent_port:
+ self.agent_ports[host] = agent_port
self.mgr.log.debug(
'HostCache.load: host %s has %d daemons, '
@@ -706,6 +709,8 @@ class HostCache():
j['agent_counter'] = self.agent_counter[host]
if host in self.agent_keys:
j['agent_keys'] = self.agent_keys[host]
+ if host in self.agent_ports:
+ j['agent_ports'] = self.agent_ports[host]
self.mgr.set_store(HOST_CACHE_PREFIX + host, json.dumps(j))