diff --git a/perl-xCAT/xCAT/NodeRange.pm b/perl-xCAT/xCAT/NodeRange.pm index 66df2c45c..3c01fb005 100644 --- a/perl-xCAT/xCAT/NodeRange.pm +++ b/perl-xCAT/xCAT/NodeRange.pm @@ -611,19 +611,7 @@ sub noderange { %nodes = map { $_ => 1 } noderange($start,$verify,$exsitenode,%options); my %innernodes = map { $_ => 1 } noderange($middle,$verify,$exsitenode,%options); set_arith(\%nodes,$op,\%innernodes); - $op=","; - if ($end =~ m/^,-/) { - $op = ",-"; - $end =~ s/^,-//; - } elsif ($end =~ m/^@/) { - $op = "@"; - $end =~ s/^@//; - } else { - $end =~ s/^,//; - } - my %endnodes = map { $_ => 1 } noderange($end,$verify,$exsitenode,%options); - set_arith(\%nodes,$op,\%endnodes); - return sort(keys %nodes) + $range = $end; } my $op = ","; @@ -632,7 +620,8 @@ sub noderange { @elems = split(/(@(?![^\(]*?\)))/,$range); # only split on @ when no , are present (inner recursion) } - while (my $atom = shift @elems) { + while (defined(my $atom = shift @elems)) { + if ($atom eq '') { next; } if ($atom eq ',') { next; } diff --git a/perl-xCAT/xCAT/ServiceNodeUtils.pm b/perl-xCAT/xCAT/ServiceNodeUtils.pm index 242ccbf08..5bcf6508b 100644 --- a/perl-xCAT/xCAT/ServiceNodeUtils.pm +++ b/perl-xCAT/xCAT/ServiceNodeUtils.pm @@ -355,7 +355,7 @@ sub getSNList $servicenodetab->close; foreach my $node (@nodes) { - if ($service eq "") # want all the service nodes + if (! defined ($service) || ($service eq "")) # want all the service nodes { push @servicenodes, $node->{node}; } diff --git a/xCAT-genesis-scripts/bin/bmcsetup b/xCAT-genesis-scripts/bin/bmcsetup index 2cca4e2e9..a3336706a 100755 --- a/xCAT-genesis-scripts/bin/bmcsetup +++ b/xCAT-genesis-scripts/bin/bmcsetup @@ -54,6 +54,11 @@ if [ "$IPMIMFG" == 2 ]; then #IBM for p in $BMCPORT; do ipmitool -d $idev raw 0xc 1 1 0xc0 $p > /dev/null ipmitool -d $idev raw 0x04 0x12 0x09 0x01 0x18 0x${p}1 0x00 > /dev/null + CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'` + while [ "$CURBMCPORT" -ne "$BMCPORT" ]; do + sleep 1 + CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'` + done let idev=idev+1 done fi @@ -67,7 +72,12 @@ if [ "$IPMIMFG" == 2 ]; then #IBM let idev=0 for p in $BMCPORT; do ipmitool -d $idev raw 0xc 1 1 0xc0 $p > /dev/null - let idev=idev+1 + CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'` + while [ "$CURBMCPORT" -ne "$BMCPORT" ]; do + sleep 1 + CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'` + done + let idev=idev+1 done fi fi @@ -84,8 +94,17 @@ elif [ "$IPMIMFG" == 20301 ] ; then let idev=0 for p in $BMCPORT; do ipmitool -d $idev raw 0xc 1 1 0xc0 $p > /dev/null - NEWPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0|awk '{print $2}'` - sleep 10 + # after this change, we need to watch and wait to see that it + # actually takes effect. On port change, the service processor + # does not migrate the network configuration over + # so we might be halfway through setting up when the net config + # reverts to dhcp then static, which setting a static ip for is + # considered invalid + CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'` + while [ -z "$CURBMCPORT" -o 0"$CURBMCPORT" -ne "$BMCPORT" ]; do + sleep 1 + CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'` + done let idev=idev+1 done diff --git a/xCAT-server/lib/xcat/plugins/kit.pm b/xCAT-server/lib/xcat/plugins/kit.pm index f16b15676..8bacb467e 100644 --- a/xCAT-server/lib/xcat/plugins/kit.pm +++ b/xCAT-server/lib/xcat/plugins/kit.pm @@ -2427,7 +2427,6 @@ sub rmkitcomp my %rsp; push@{ $rsp{data} }, "kitcomponent $kitcompdep basename does not exist"; xCAT::MsgUtils->message( "E", \%rsp, $callback ); - return 1; } my $kitcompdepname = get_highest_version('kitcompname', 'version', 'release', @entries); @@ -2486,7 +2485,7 @@ sub rmkitcomp foreach my $kitcomponent (keys %kitcomps) { my @kitcompscripts = split( ',', $kitcomps{$kitcomponent}{postbootscripts} ); foreach my $kitcompscript ( @kitcompscripts ) { - if ( $osimagescript =~ /^$kitcompscript$/ ) { + if ( $osimagescript =~ /^$kitcompscript/ ) { $match = 1; last; }