diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2018-04-06 12:00:07 -0500 |
---|---|---|
committer | Adriana Kobylak <anoo@us.ibm.com> | 2018-04-06 12:02:16 -0500 |
commit | e24fd6f7deadddc2867b2c417590da0ff093e5e2 (patch) | |
tree | ff5809933b0001bcff05a97c13095d6451abf282 | |
parent | 2225fda1dbe6e5fe87c009174d941369ab7e7b3a (diff) | |
download | phosphor-bmc-code-mgmt-e24fd6f7deadddc2867b2c417590da0ff093e5e2.tar.gz phosphor-bmc-code-mgmt-e24fd6f7deadddc2867b2c417590da0ff093e5e2.zip |
Revert "Wait for obmc-flash-bmc-updateubootvars@.service"
This reverts commit 4c3edc911ba880f7643f15679018c436aa94e0aa
The code now blocks until the updateubootvars service completes
(https://gerrit.openbmc-project.xyz/#/c/9418/) so there is no
need to monitor this service anymore.
Tested: Verified that the activation still waits for the env vars
to be upated before completing the activation process:
Apr 06 16:58:07 witherspoon systemd[1]: Started Store read-only images 84fb16be to BMC storage.
Apr 06 16:58:07 witherspoon systemd[1]: Starting Set U-Boot environment variable...
Apr 06 16:58:08 witherspoon systemd[1]: Started Set U-Boot environment variable.
Apr 06 16:58:08 witherspoon systemd[1]: Starting Updates the u-boot variable to point BMC version to 84fb16be...
Apr 06 16:58:11 witherspoon systemd[1]: Started Updates the u-boot variable to point BMC version to 84fb16be.
Apr 06 16:58:11 witherspoon phosphor-image-updater[1919]: BMC activation has ended - BMC reboots are re-enabled.
Change-Id: I6b98c2136948ddd251c4070f697ce1eda66214d6
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
-rw-r--r-- | activation.cpp | 56 | ||||
-rw-r--r-- | activation.hpp | 4 |
2 files changed, 20 insertions, 40 deletions
diff --git a/activation.cpp b/activation.cpp index ee0bcf8..dbfe030 100644 --- a/activation.cpp +++ b/activation.cpp @@ -115,37 +115,31 @@ auto Activation::activation(Activations value) -> Activations } else if (rwVolumeCreated == true && roVolumeCreated == true) { - if (ubootEnvVarsUpdated == false) - { - activationProgress->progress(90); + activationProgress->progress(90); - if (!redundancyPriority) - { - redundancyPriority = std::make_unique<RedundancyPriority>( - bus, path, *this, 0); - } - } - else + if (!redundancyPriority) { - activationProgress->progress(100); + redundancyPriority = + std::make_unique<RedundancyPriority>(bus, path, *this, 0); + } - activationBlocksTransition.reset(nullptr); - activationProgress.reset(nullptr); + activationProgress->progress(100); - rwVolumeCreated = false; - roVolumeCreated = false; - ubootEnvVarsUpdated = false; - Activation::unsubscribeFromSystemdSignals(); + activationBlocksTransition.reset(nullptr); + activationProgress.reset(nullptr); - // Remove version object from image manager - Activation::deleteImageManagerObject(); + rwVolumeCreated = false; + roVolumeCreated = false; + Activation::unsubscribeFromSystemdSignals(); - // Create active association - parent.createActiveAssociation(path); + // Remove version object from image manager + Activation::deleteImageManagerObject(); - return softwareServer::Activation::activation( - softwareServer::Activation::Activations::Active); - } + // Create active association + parent.createActiveAssociation(path); + + return softwareServer::Activation::activation( + softwareServer::Activation::Activations::Active); } } else @@ -177,7 +171,6 @@ auto Activation::requestedActivation(RequestedActivations value) { rwVolumeCreated = false; roVolumeCreated = false; - ubootEnvVarsUpdated = false; if ((value == softwareServer::Activation::RequestedActivations::Active) && (softwareServer::Activation::requestedActivation() != @@ -229,8 +222,6 @@ void Activation::unitStateChange(sdbusplus::message::message& msg) auto rwServiceFile = "obmc-flash-bmc-ubirw.service"; auto roServiceFile = "obmc-flash-bmc-ubiro@" + versionId + ".service"; - auto ubootVarsServiceFile = - "obmc-flash-bmc-updateubootvars@" + versionId + ".service"; if (newStateUnit == rwServiceFile && newStateResult == "done") { @@ -244,21 +235,14 @@ void Activation::unitStateChange(sdbusplus::message::message& msg) activationProgress->progress(activationProgress->progress() + 50); } - if (newStateUnit == ubootVarsServiceFile && newStateResult == "done") - { - ubootEnvVarsUpdated = true; - } - - if (newStateUnit == rwServiceFile || newStateUnit == roServiceFile || - newStateUnit == ubootVarsServiceFile) + if (newStateUnit == rwServiceFile || newStateUnit == roServiceFile) { if (newStateResult == "failed" || newStateResult == "dependency") { Activation::activation( softwareServer::Activation::Activations::Failed); } - else if ((rwVolumeCreated && roVolumeCreated) || // Volumes were created - (ubootEnvVarsUpdated)) // Environment variables were updated + else if (rwVolumeCreated && roVolumeCreated) // Volumes were created { Activation::activation( softwareServer::Activation::Activations::Activating); diff --git a/activation.hpp b/activation.hpp index 51756f2..50f5338 100644 --- a/activation.hpp +++ b/activation.hpp @@ -311,10 +311,6 @@ class Activation : public ActivationInherit /** @brief Tracks whether the read-only volume has been created as * part of the activation process. **/ bool roVolumeCreated = false; - - /** @brief Tracks if the service that updates the U-Boot environment - * variables has completed. **/ - bool ubootEnvVarsUpdated = false; }; } // namespace updater |