summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2018-04-03 14:33:52 -0500
committerGunnar Mills <gmills@us.ibm.com>2018-04-09 14:55:49 +0000
commit90f8e690e852bcb22f75b0fc61299ab6eb4b4b0d (patch)
treef58749f92740f6b7b56a5aa7c334b65ddbb8375a
parent36379b993791d743d39b3aee659c3d8d0fa51620 (diff)
downloadphosphor-webui-90f8e690e852bcb22f75b0fc61299ab6eb4b4b0d.tar.gz
phosphor-webui-90f8e690e852bcb22f75b0fc61299ab6eb4b4b0d.zip
Wait for 10 seconds before rebooting
After the image is active wait 10 seconds before rebooting if "activate and reboot" was selected. We had an issue, https://github.com/openbmc/openbmc/issues/2764, that a system could brick if the system reboots before the service to set the U-Boot variables is complete. Wait 10 seconds before rebooting to ensure this service is complete. This issue is fixed in newer images, but the user may be updating from an older image that does not that have this fix. Tested: Verified the system waits 10 seconds after the image becomes active before rebooting. Change-Id: I00115680cca14e50814e44c302d6134aca242d3f Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
-rw-r--r--app/configuration/controllers/firmware-controller.js26
1 files changed, 18 insertions, 8 deletions
diff --git a/app/configuration/controllers/firmware-controller.js b/app/configuration/controllers/firmware-controller.js
index 618cad8..50cff28 100644
--- a/app/configuration/controllers/firmware-controller.js
+++ b/app/configuration/controllers/firmware-controller.js
@@ -22,7 +22,8 @@ window.angular && (function (angular) {
'Constants',
'$interval',
'$q',
- function ($scope, $window, APIUtils, dataService, $location, $anchorScroll, Constants, $interval, $q) {
+ '$timeout',
+ function ($scope, $window, APIUtils, dataService, $location, $anchorScroll, Constants, $interval, $q, $timeout) {
$scope.dataService = dataService;
//Scroll to target anchor
@@ -123,14 +124,23 @@ window.angular && (function (angular) {
});
}).then(function(state){
if($scope.activate.reboot){
- APIUtils.bmcReboot(function(response){}, function(error){
- $scope.displayError({
- modal_title: 'Error during BMC reboot',
- title: 'Error during BMC reboot',
- desc: JSON.stringify(error.data),
- type: 'Error'
+ // 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
+ // the U-Boot variables is complete. Wait 10 seconds before rebooting
+ // to ensure this service is complete. This issue is fixed in newer images, but
+ // the user may be updating from an older image that does not that have this fix.
+ // TODO: remove this timeout after sufficient time has passed.
+ $timeout(function() {
+ APIUtils.bmcReboot(function(response){}, function(error){
+ $scope.displayError({
+ modal_title: 'Error during BMC reboot',
+ title: 'Error during BMC reboot',
+ desc: JSON.stringify(error.data),
+ type: 'Error'
+ });
});
- });
+ }, 10000);
}
});
});
OpenPOWER on IntegriCloud