summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Tritz <mtritz@us.ibm.com>2017-07-25 09:55:40 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-07-25 19:07:36 +0000
commit137ddddda23a26faffcc79d8e323ce2cbeb19e84 (patch)
treee2cab1cff897484cd37d5bd938408e5ea27b6c02
parent1bd65ac80c0c11062300574e198d36f7c5c6f2a6 (diff)
downloadopenpower-pnor-code-mgmt-137ddddda23a26faffcc79d8e323ce2cbeb19e84.tar.gz
openpower-pnor-code-mgmt-137ddddda23a26faffcc79d8e323ce2cbeb19e84.zip
Activation: Reset service file booleans after activation
During the activation process, two booleans are used to keep track of the state of service files that are called as a part of the process. These booleans are left "true" at the end of the process and the activated image is still subscribed to systemd signals (to be addressed in openbmc/openbmc#1843), so the second half of activation runs again upon the state change of any service file. At that time, we attempt to set the value of an ActivationProgress parameter that doesn't exist, crashing the application. This commit simply resets the booleans to false at the end of activation, resolving this crash. Resolves openbmc/openbmc#1984 Change-Id: I6f77778c2d44c10757dd4aca5e846b9e09596957 Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
-rwxr-xr-xactivation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/activation.cpp b/activation.cpp
index 428a256c3..fd238d0c8 100755
--- a/activation.cpp
+++ b/activation.cpp
@@ -149,6 +149,11 @@ auto Activation::activation(Activations value) ->
activationBlocksTransition.reset(nullptr);
activationProgress.reset(nullptr);
+ squashfsLoaded = false;
+ rwVolumesCreated = false;
+
+ //TODO: openbmc/openbmc#1843: Unsubscribe from systemd signals.
+
return softwareServer::Activation::activation(
softwareServer::Activation::Activations::Active);
}
OpenPOWER on IntegriCloud