@@ -1640,7 +1640,7 @@ def start(
16401640 self ._save_activation ()
16411641
16421642 with _debug_log_message ("Starting activation" ):
1643- self ._start_activation (debug = debug , use_git = use_git )
1643+ self ._start_activation (all_site_configs , debug = debug , use_git = use_git )
16441644
16451645 with _debug_log_message ("Update and activate central rabbitmq changes" ):
16461646 create_rabbitmq_new_definitions_file (paths .omd_root , rabbitmq_definitions [omd_site ()])
@@ -1931,7 +1931,9 @@ def _check_snapshot_creation_permissions(self, site_id):
19311931 )
19321932
19331933 @tracer .instrument ("start_activation" )
1934- def _start_activation (self , * , debug : bool , use_git : bool ) -> None :
1934+ def _start_activation (
1935+ self , all_site_configs : SiteConfigurations , * , debug : bool , use_git : bool
1936+ ) -> None :
19351937 self ._log_activation (use_git = use_git )
19361938 assert self ._activation_id is not None
19371939 job = ActivateChangesSchedulerBackgroundJob (self ._activation_id )
@@ -1943,6 +1945,7 @@ def _start_activation(self, *, debug: bool, use_git: bool) -> None:
19431945 site_snapshot_settings = self ._site_snapshot_settings ,
19441946 prevent_activate = self ._prevent_activate ,
19451947 source = self ._source ,
1948+ all_site_configs = all_site_configs ,
19461949 debug = debug ,
19471950 use_git = use_git ,
19481951 ),
@@ -2323,6 +2326,7 @@ def _sync_and_activate(
23232326 site_snapshot_settings : Mapping [SiteId , SnapshotSettings ],
23242327 file_filter_func : FileFilterFunc ,
23252328 source : ActivationSource ,
2329+ all_site_configs : SiteConfigurations ,
23262330 * ,
23272331 debug : bool ,
23282332 prevent_activate : bool ,
@@ -2350,7 +2354,7 @@ def _sync_and_activate(
23502354 setthreadtitle ("cmk-activate-changes" )
23512355
23522356 activate_changes = ActivateChanges ()
2353- activate_changes .load (list (active_config . sites ))
2357+ activate_changes .load (list (all_site_configs ))
23542358 activate_changes .load_changes_until (activation_id , site_snapshot_settings .keys ())
23552359
23562360 if is_free ():
@@ -2377,7 +2381,7 @@ def _sync_and_activate(
23772381 debug = debug ,
23782382 )
23792383 clean_remote_sites_certs (
2380- kept_sites = list (get_all_replicated_sites (activation_sites (active_config . sites )))
2384+ kept_sites = list (get_all_replicated_sites (activation_sites (all_site_configs )))
23812385 )
23822386
23832387 active_tasks = ActiveTasks (
@@ -2653,6 +2657,7 @@ class ActivateChangesSchedulerJobArgs(BaseModel, frozen=True):
26532657 site_snapshot_settings : Mapping [SiteId , SnapshotSettings ]
26542658 prevent_activate : bool
26552659 source : ActivationSource
2660+ all_site_configs : SiteConfigurations
26562661 debug : bool
26572662 use_git : bool
26582663
@@ -2665,6 +2670,7 @@ def activate_changes_scheduler_job_entry_point(
26652670 args .site_snapshot_settings ,
26662671 args .prevent_activate ,
26672672 args .source ,
2673+ args .all_site_configs ,
26682674 args .debug ,
26692675 args .use_git ,
26702676 )
@@ -2689,6 +2695,7 @@ def schedule_sites(
26892695 site_snapshot_settings : Mapping [SiteId , SnapshotSettings ],
26902696 prevent_activate : bool ,
26912697 source : ActivationSource ,
2698+ all_site_configs : SiteConfigurations ,
26922699 debug : bool ,
26932700 use_git : bool ,
26942701 ) -> None :
@@ -2709,6 +2716,7 @@ def schedule_sites(
27092716 str (version .edition (paths .omd_root ))
27102717 ].sync_file_filter_func ,
27112718 source ,
2719+ all_site_configs ,
27122720 debug = debug ,
27132721 prevent_activate = prevent_activate ,
27142722 use_git = use_git ,
0 commit comments