From 5998f072ea0c431f593b867338c6885ea74d708d Mon Sep 17 00:00:00 2001 From: Paul-Emile Element Date: Tue, 11 Sep 2018 11:28:25 -0400 Subject: [PATCH] synchronize file update in sysinv agent This modification adds a synchronization decorator to the file update function of the sysinv agent. This will ensure that the operation does not happen concurrently with the 'runtime manifest apply' or the 'agent audit' function. Otherwise, a race condition may happen and cause manifest corruption or failure to properly handle alarms. Closes-Bug: #1791969 Change-Id: If9b6baf1608850bad0e3830ebe8345f7dc68ef62 Signed-off-by: Paul-Emile Element --- sysinv/sysinv/sysinv/sysinv/agent/manager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sysinv/sysinv/sysinv/sysinv/agent/manager.py b/sysinv/sysinv/sysinv/sysinv/agent/manager.py index 6e7382bc2c..3869685d5b 100644 --- a/sysinv/sysinv/sysinv/sysinv/agent/manager.py +++ b/sysinv/sysinv/sysinv/sysinv/agent/manager.py @@ -1292,6 +1292,7 @@ class AgentManager(service.PeriodicService): return + @utils.synchronized(LOCK_AGENT_ACTION, external=False) def iconfig_update_file(self, context, iconfig_uuid, iconfig_dict): """Configure the iiconfig_uuid, by updating file based upon iconfig_dict.