From 78b926e43ab0d523205b223ed17ef1c3560e9607 Mon Sep 17 00:00:00 2001 From: baigk Date: Wed, 21 Oct 2015 09:26:40 +0800 Subject: bug fix: support impi 2.0 and delete compass core default ip and gw when baremetal deploy JIRA: COMPASS-107 Change-Id: Id1654a3551029be18e1884a488291eb3fa46d1ca Signed-off-by: baigk --- deploy/template/power/ipmitool.tmpl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'deploy/template/power') diff --git a/deploy/template/power/ipmitool.tmpl b/deploy/template/power/ipmitool.tmpl index 5d2630af..73278e45 100644 --- a/deploy/template/power/ipmitool.tmpl +++ b/deploy/template/power/ipmitool.tmpl @@ -1,6 +1,7 @@ source \${COMPASS_DIR}/util/log.sh #set default_ipmiUser=$getVar('ipmiUser', '') #set default_ipmiPass=$getVar('ipmiPass', '') +#set default_ipmiVer=$getVar('ipmiVer', '2.0') #set hosts=$getVar('hosts', []) #set fail_list="" #for host in $hosts @@ -20,8 +21,15 @@ exit 1 #set ipmiIp=$host.get('ipmiIp', '') #set ipmiUser=$host.get('ipmiUser', $default_ipmiUser) #set ipmiPass=$host.get('ipmiPass', $default_ipmiPass) +#set ipmiVer=$host.get('ipmiVer', $default_ipmiVer) +#if $ipmiVer == '2.0' + #set interface='lanplus' +#else + #set interface='lan' +#end if + for i in {1..5}; do - if ipmitool -I lan -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis bootdev pxe >/dev/null 2>&1 + if ipmitool -I $interface -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis bootdev pxe >/dev/null 2>&1 then break elif [[ i -lt 5 ]] @@ -34,7 +42,7 @@ for i in {1..5}; do done sleep 1 for i in {1..5}; do - if ipmitool -I lan -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis power reset >/dev/null 2>&1 + if ipmitool -I $interface -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis power reset >/dev/null 2>&1 then break elif [[ i -lt 5 ]] -- cgit 1.2.3-korg