@@ -683,7 +683,6 @@ async def _parallel_deploy_and_remove(
683683 removed_conflict_daemons , conflict_hosts_altered = self .remove_given_daemons (conflicts )
684684 if removed_conflict_daemons :
685685 r = True
686- self .mgr .spec_store .mark_needs_configuration (spec .service_name ())
687686 hosts_altered .update (conflict_hosts_altered )
688687 daemons_placed , daemon_deployed_hosts , daemon_place_fails = await self .deploy_given_daemons (to_deploy )
689688 if daemons_placed :
@@ -692,12 +691,7 @@ async def _parallel_deploy_and_remove(
692691 removed_daemons , removed_daemon_hosts = self .remove_given_daemons (to_remove )
693692 if removed_daemons :
694693 r = True
695- self .mgr .spec_store .mark_needs_configuration (spec .service_name ())
696694 hosts_altered .update (conflict_hosts_altered )
697- if self .mgr .spec_store .needs_configuration (spec .service_name ()):
698- svc = service_registry .get_service (spec .service_type )
699- svc .config (spec )
700- self .mgr .spec_store .mark_configured (spec .service_name ())
701695 return (r , hosts_altered , daemon_place_fails )
702696
703697 async def _deploy_and_remove_all (
@@ -734,6 +728,11 @@ async def _deploy_and_remove_all(
734728 if placement_failures :
735729 self .mgr .set_health_warning ('CEPHADM_DAEMON_PLACE_FAIL' , f'Failed to place { len (placement_failures )} daemon(s)' , len (
736730 placement_failures ), placement_failures )
731+ for spec in specs :
732+ if self .mgr .spec_store .needs_configuration (spec .service_name ()):
733+ svc = service_registry .get_service (spec .service_type )
734+ svc .config (spec )
735+ self .mgr .spec_store .mark_configured (spec .service_name ())
737736 if self .mgr .use_agent :
738737 # can only send ack to agents if we know for sure port they bound to
739738 altered_hosts = set ([h for h in altered_hosts if (h in self .mgr .agent_cache .agent_ports and not self .mgr .cache .is_host_draining (h ))])
@@ -971,6 +970,9 @@ def has_interface_for_vip(host: str, sspec: ServiceSpec) -> bool:
971970 warnings )
972971 raise OrchestratorError (msg )
973972
973+ if slots_to_add or daemons_to_remove :
974+ self .mgr .spec_store .mark_needs_configuration (spec .service_name ())
975+
974976 return slots_to_add , daemons_to_remove , rank_map
975977
976978 def gather_conflicting_daemons_for_service (self , spec : ServiceSpec ) -> List [orchestrator .DaemonDescription ]:
0 commit comments