aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/template/power/ipmitool.tmpl
diff options
context:
space:
mode:
authorQiLiang <liangqi1@huawei.com>2016-10-14 06:11:07 +0800
committerQiLiang <liangqi1@huawei.com>2016-10-15 05:28:32 +0800
commitfaed52cdedf1b067c3f39d49827cb843d55edd45 (patch)
tree8d34ec4e9e44167b067b30713bf231eff4fdfc58 /deploy/template/power/ipmitool.tmpl
parentc85cae06ce80e7090b707974a50ab32de4aec28b (diff)
Add recovery scripts
- add recovery shell scripts - add boot-recovery role to stop services during system boot which could cause boot pending - configure nfs mount in /etc/fstab cause system boot pending, so mount nfs during ansible-playbook run. - kill mysqld before mysql recovery, running mysqld may cause mysql recover failure JIRA: COMPASS-474 Change-Id: I0f6f0ee935fbe3fbbe28a451a02decfb01a6165b Signed-off-by: QiLiang <liangqi1@huawei.com>
Diffstat (limited to 'deploy/template/power/ipmitool.tmpl')
-rw-r--r--deploy/template/power/ipmitool.tmpl30
1 files changed, 17 insertions, 13 deletions
diff --git a/deploy/template/power/ipmitool.tmpl b/deploy/template/power/ipmitool.tmpl
index a297e001..048e997a 100644
--- a/deploy/template/power/ipmitool.tmpl
+++ b/deploy/template/power/ipmitool.tmpl
@@ -40,19 +40,23 @@ for i in {1..5}; do
fi
done
sleep 1
-for i in {1..5}; do
- if ipmitool -I $interface -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis bootdev pxe >/dev/null 2>&1
- then
- break
- elif [[ i -lt 5 ]]
- then
- sleep 1
- else
- log_error "set $ipmiIp pxe fail"
- exit 1
- fi
-done
-sleep 1
+
+if [[ "\$DEPLOY_RECOVERY" != "true" ]]; then
+ for i in {1..5}; do
+ if ipmitool -I $interface -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis bootdev pxe >/dev/null 2>&1
+ then
+ break
+ elif [[ i -lt 5 ]]
+ then
+ sleep 1
+ else
+ log_error "set $ipmiIp pxe fail"
+ exit 1
+ fi
+ done
+ sleep 1
+fi
+
for i in {1..5}; do
if ipmitool -I $interface -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis power reset >/dev/null 2>&1
then