From faed52cdedf1b067c3f39d49827cb843d55edd45 Mon Sep 17 00:00:00 2001 From: QiLiang Date: Fri, 14 Oct 2016 06:11:07 +0800 Subject: 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 --- deploy/template/power/ipmitool.tmpl | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'deploy/template') 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 -- cgit 1.2.3-korg