Signed-off-by: Adam King <adking@redhat.com>
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}.')
# 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: