]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: replace _calc_daemon_deps call in agent.py
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 9 Mar 2026 18:57:05 +0000 (14:57 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 26 Mar 2026 13:31:38 +0000 (09:31 -0400)
Replace the use of _calc_daemon_deps in agent.py with direct call to the
method that _calc_daemon_deps uses. This avoids a bunch of redundant
calls just to get the service class (that we already have) and removes a
use of a rarely used "helper" function.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/cephadm/agent.py

index 50cca83a9eb90db014706aca533291a871ffe0ae..d767f1b24b57f94d60e36c57e5d0eb0d47131c36 100644 (file)
@@ -972,7 +972,7 @@ class CephadmAgentHelpers:
             return down
         try:
             spec = self.mgr.spec_store.active_specs.get(CephadmAgent.TYPE, None)
-            deps = self.mgr._calc_daemon_deps(spec, CephadmAgent.TYPE, agent.daemon_id)
+            deps = CephadmAgent.sorted_dependencies(self.mgr, spec, CephadmAgent.TYPE)
             last_deps, last_config = self.mgr.agent_cache.get_agent_last_config_deps(host)
             if not last_config or last_deps != deps:
                 # if root cert is the dep that changed, we must use ssh to reconfig