]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: kick serve loop if new metadata makes all hosts metadata up to date 42384/head
authorAdam King <adking@redhat.com>
Thu, 23 Sep 2021 16:41:52 +0000 (12:41 -0400)
committerAdam King <adking@redhat.com>
Fri, 24 Sep 2021 11:23:51 +0000 (07:23 -0400)
Signed-off-by: Adam King <adking@redhat.com>
src/pybind/mgr/cephadm/agent.py
src/pybind/mgr/cephadm/serve.py

index b99e7e9bdc49784c94c778019e65c2bf3755425f..d43f639264855b225f4a5464a8fe969ef6952b86 100644 (file)
@@ -187,7 +187,12 @@ class HostData:
                 self.mgr.cache.update_host_devices(host, ret.devices)
 
             if up_to_date:
+                was_out_of_date = not self.mgr.cache.all_host_metadata_up_to_date()
                 self.mgr.cache.metadata_up_to_date[host] = True
+                if was_out_of_date and self.mgr.cache.all_host_metadata_up_to_date():
+                    self.mgr.log.info(
+                        'New metadata from agent has made all hosts up to date. Kicking serve loop')
+                    self.mgr._kick_serve_loop()
                 self.mgr.log.info(
                     f'Received up-to-date metadata from agent on host {host}.')
 
index 49d254e6b4f497df6817bcf9a2d24a12db9ba22c..f8d4398b56f6b379082d8f517d18ed6fb6af33dd 100644 (file)
@@ -605,6 +605,7 @@ class CephadmServe:
         # end up stuck between wanting metadata to be up to date to apply specs
         # and needing to apply the agent spec to get up to date metadata
         if self.mgr.use_agent and not self.mgr.cache.all_host_metadata_up_to_date():
+            self.log.info('Metadata not up to date on all hosts. Skipping non agent specs')
             try:
                 specs.append(self.mgr.spec_store['agent'].spec)
             except Exception as e: