from ceph.deployment.service_spec import TracingSpec, ServiceSpec
from .service_registry import register_cephadm_service
from mgr_util import build_url
+from cephadm import utils
if TYPE_CHECKING:
from ..module import CephadmOrchestrator
daemon_spec.deps = self.get_dependencies(self.mgr)
return daemon_spec
+ manages_own_next_action = True
+
+ def choose_next_action(
+ self,
+ scheduled_action: utils.Action,
+ daemon_type: Optional[str],
+ spec: Optional[ServiceSpec],
+ curr_deps: List[str],
+ last_deps: List[str],
+ ) -> utils.Action:
+ """Given the scheduled_action, service spec, daemon_type, and
+ current and previous dependency lists return the next action that
+ this service would prefer cephadm take.
+ """
+ action = super().choose_next_action(
+ scheduled_action, daemon_type, spec, curr_deps, last_deps
+ )
+ # changes to jaeger-agent deps affect the way the unit.run for
+ # the daemon is written, which we rewrite on redeploy, but not
+ # on reconfig.
+ if action is utils.Action.RECONFIG:
+ action = utils.Action.REDEPLOY
+ return action
+
@register_cephadm_service
class JaegerCollectorService(CephadmService):