Only reboot BMC if it is BMC image activation
Some internal testing found that when a server image is
uploaded and activated, the BMC reboots. This is because
the reboot variable defaults to true and it is not manipulated
in the server image activate code path, but it shares the
common activate image code path with the BMC which look at this
variable to determine if it should reboot the BMC.
Testing: Verified server image activate did not result in BMC
rebooting. Verified when option to reboot BMC after BMC update,
that BMC rebooted. Verified when option to not reboot BMC after
BMC update, that BMC did not reboot.
Resolves openbmc/openbmc#3188
Change-Id: Ib2f6b9cb6af27c11ad0f5c6fc33f161ac3ffa611
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/app/configuration/controllers/firmware-controller.js b/app/configuration/controllers/firmware-controller.js
index 5ebf6ce..f5f0541 100644
--- a/app/configuration/controllers/firmware-controller.js
+++ b/app/configuration/controllers/firmware-controller.js
@@ -125,7 +125,8 @@
type: 'Error'
});
}).then(function(state){
- if($scope.activate.reboot){
+ // Only look at reboot if it's a BMC image
+ if($scope.activate.reboot && ($scope.activate_image_type == 'BMC')){
// Despite the new image being active, issue,
// https://github.com/openbmc/openbmc/issues/2764, can cause a
// system to brick, if the system reboots before the service to set