From 137ddddda23a26faffcc79d8e323ce2cbeb19e84 Mon Sep 17 00:00:00 2001 From: Michael Tritz Date: Tue, 25 Jul 2017 09:55:40 -0500 Subject: 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 --- activation.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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); } -- cgit v1.2.1