diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index bad32fab5..b746ba7c5 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -5918,6 +5918,10 @@ sub getipmicons { $ipmicons->{node}->[0]->{bmcuser}->[0]=$argr->[2]; $ipmicons->{node}->[0]->{bmcpass}->[0]=$argr->[3]; my $ipmisess = xCAT::IPMI->new(bmc=>$argr->[1],userid=>$argr->[2],password=>$argr->[3]); + if ($ipmisess->{error}) { + xCAT::SvrUtils::sendmsg([1,$ipmisess->{error}],$cb,$argr->[0],%allerrornodes); + return; + } $ipmisess->{ipmicons} = $ipmicons; $ipmisess->{cb} = $cb; $ipmisess->subcmd(netfn=>0x6,command=>0x38,data=>[0x0e,0x04],callback=>\&got_channel_auth_cap_foripmicons,callback_args=>$ipmisess); diff --git a/xCAT-server/share/xcat/cons/ipmi b/xCAT-server/share/xcat/cons/ipmi index a9b23096a..aef116ee6 100755 --- a/xCAT-server/share/xcat/cons/ipmi +++ b/xCAT-server/share/xcat/cons/ipmi @@ -48,6 +48,10 @@ sub getans { $bmc = $rsp->{node}->[0]->{bmcaddr}->[0]; $username = $rsp->{node}->[0]->{bmcuser}->[0]; $password = $rsp->{node}->[0]->{bmcpass}->[0]; + if (exists $rsp->{node}->[0]->{error}) { + my $error = $rsp->{node}->[0]->{error}->[0]; + print $error."\n"; + } } } my $cmdref={