]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #44193 from adk3798/agent-upgrade
authorSebastian Wagner <sewagner@redhat.com>
Wed, 5 Jan 2022 09:27:21 +0000 (10:27 +0100)
committerGitHub <noreply@github.com>
Wed, 5 Jan 2022 09:27:21 +0000 (10:27 +0100)
mgr/cephadm: speed up upgrade when using agent

Reviewed-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Sebastian Wagner <sewagner@redhat.com>
1  2 
src/pybind/mgr/cephadm/agent.py

index 728e59c25ed846ede6d43e28d0f7d72727effae2,e537e5978b7397ff884c6b65acfe1a8a42b95bb7..c61eb74d83fa370b0a73c402591433657c1dcea0
@@@ -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