Skip to content

Commit 31c110f

Browse files
authored
Fix for ConfigurePatching getting stuck in transitioning (#154)
1 parent cc08163 commit 31c110f

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/core/src/service_interfaces/LifecycleManagerArc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ def execution_start_check(self):
108108

109109
# Signalling take-over of core state by auto-assessment after safety checks for any competing process
110110
self.update_core_sequence(completed=False)
111+
# Refresh status file in memory to be up-to-date
112+
self.status_handler.load_status_file_components()
111113
else:
112114
# Logic for all non-Auto-assessment operations
113115
extension_sequence = self.read_extension_sequence()

src/core/src/service_interfaces/LifecycleManagerAzure.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ def execution_start_check(self):
9696

9797
# Signalling take-over of core state by auto-assessment after safety checks for any competing process
9898
self.update_core_sequence(completed=False)
99+
# Refresh status file in memory to be up-to-date
100+
self.status_handler.load_status_file_components()
99101
else:
100102
# Logic for all non-Auto-assessment operations
101103
extension_sequence = self.read_extension_sequence()

src/core/src/service_interfaces/StatusHandler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __init__(self, env_layer, execution_config, composite_logger, telemetry_writ
6969
self.__configure_patching_auto_assessment_error_count = 0 # All errors relating to auto-assessment configuration.
7070

7171
# Load the currently persisted status file into memory
72-
self.__load_status_file_components(initial_load=True)
72+
self.load_status_file_components(initial_load=True)
7373

7474
# Tracker for reboot pending status, the value is updated externally(PatchInstaller.py) whenever package is installed. As this var is directly written in status file, setting the default to False, instead of Empty/Unknown, to maintain a true bool field as per Agent team's architecture
7575
self.is_reboot_pending = False
@@ -490,7 +490,7 @@ def __json_try_get_key_value(json_body, key, default_value=""):
490490
except KeyError:
491491
return default_value
492492

493-
def __load_status_file_components(self, initial_load=False):
493+
def load_status_file_components(self, initial_load=False):
494494
""" Loads currently persisted status data into memory.
495495
:param initial_load: If no status file exists AND initial_load is true, a default initial status file is created.
496496
:return: None

0 commit comments

Comments
 (0)