From: Sebastian Wagner Date: Wed, 5 Jan 2022 09:27:21 +0000 (+0100) Subject: Merge pull request #44193 from adk3798/agent-upgrade X-Git-Tag: v17.1.0~136 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bcae00e5d4f7d9a2fe2914883184cfd0848d12b1;p=ceph.git Merge pull request #44193 from adk3798/agent-upgrade mgr/cephadm: speed up upgrade when using agent Reviewed-by: John Mulligan Reviewed-by: Sebastian Wagner --- bcae00e5d4f7d9a2fe2914883184cfd0848d12b1 diff --cc src/pybind/mgr/cephadm/agent.py index 728e59c25ed8,e537e5978b73..c61eb74d83fa --- a/src/pybind/mgr/cephadm/agent.py +++ b/src/pybind/mgr/cephadm/agent.py @@@ -362,13 -352,16 +362,19 @@@ class CephadmAgentHelpers self.mgr.cache.agent_counter[host] = 1 elif increment: self.mgr.cache.agent_counter[host] = self.mgr.cache.agent_counter[host] + 1 + payload: Dict[str, Any] = {'counter': self.mgr.cache.agent_counter[host]} + if new_config: + payload['config'] = new_config message_thread = AgentMessageThread( - host, self.mgr.cache.agent_ports[host], {'counter': self.mgr.cache.agent_counter[host]}, self.mgr) + host, self.mgr.cache.agent_ports[host], payload, self.mgr) message_thread.start() + def _request_ack_all_not_up_to_date(self) -> None: + self.mgr.agent_helpers._request_agent_acks( + set([h for h in self.mgr.cache.get_hosts() if + (not self.mgr.cache.host_metadata_up_to_date(h) + and h in self.mgr.cache.agent_ports and not self.mgr.cache.messaging_agent(h))])) + def _agent_down(self, host: str) -> bool: # if host is draining or drained (has _no_schedule label) there should not # be an agent deployed there and therefore we should return False