aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/template
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2016-02-16 00:09:04 +0800
committerJustin chi <chigang@huawei.com>2016-03-15 08:54:03 +0000
commite20b4009b43e1c762640d90673e3765894503efa (patch)
tree7c52bc46972d67be2e95ff62f13b7785bdaed9a0 /deploy/template
parentb356fbbd72be5814f870bfc1e42a97c68a0fdeab (diff)
power on the server before pxe using ipmitool
JIRA: COMPASS-314 Change-Id: Iff6910412217a7daff3e93370075747abcd3ac38 Signed-off-by: baigk <baiguoku@huawei.com> (cherry picked from commit 85308a67a409694de2eca3f89ef3fbcc390416a9)
Diffstat (limited to 'deploy/template')
-rw-r--r--deploy/template/power/ipmitool.tmpl14
1 files changed, 13 insertions, 1 deletions
diff --git a/deploy/template/power/ipmitool.tmpl b/deploy/template/power/ipmitool.tmpl
index 73278e45..a297e001 100644
--- a/deploy/template/power/ipmitool.tmpl
+++ b/deploy/template/power/ipmitool.tmpl
@@ -27,7 +27,19 @@ exit 1
#else
#set interface='lan'
#end if
-
+for i in {1..5}; do
+ if ipmitool -I $interface -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis power on >/dev/null 2>&1
+ then
+ break
+ elif [[ i -lt 5 ]]
+ then
+ sleep 1
+ else
+ log_error "$ipmiIp power on fail"
+ exit 1
+ 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