2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

bmcdiscover node name when serial or mtm and mac not available

This commit is contained in:
Mark Gurevich 2019-10-17 15:08:09 -04:00
parent 94fcb1a9d6
commit aa93414e69

View File

@ -1160,8 +1160,10 @@ sub bmcdiscovery_ipmi {
$mtm = '' if ($mtm =~ /^0+$/);
$serial = '' if ($serial =~ /^0+$/);
unless (($mtm or $serial) or $ipmac{$ip}) {
xCAT::MsgUtils->message("W", { data => ["BMC Type/Model and/or Serial and MAC Address is unavailable for $ip"] }, $::CALLBACK);
# To constract a node name need either mac or both mtm and serial
# Exit if mac AND one of mtm or serial is missing
if (!($mtm and $serial) and !$ipmac{$ip}) {
xCAT::MsgUtils->message("W", { data => ["BMC Type/Model and Serial or MAC Address is unavailable for $ip"] }, $::CALLBACK);
return;
}
@ -1292,8 +1294,10 @@ sub bmcdiscovery_openbmc{
$mtm = '' if ($mtm =~ /^0+$/);
$serial = '' if ($serial =~ /^0+$/);
unless (($mtm or $serial) or $ipmac{$ip}) {
xCAT::MsgUtils->message("W", { data => ["Could not obtain Valid Model Type and/or Serial Number and MAC Address for BMC at $ip"] }, $::CALLBACK);
# To constract a node name need either mac or both mtm and serial
# Exit if mac AND one of mtm or serial is missing
if (!($mtm and $serial) and !$ipmac{$ip}) {
xCAT::MsgUtils->message("W", { data => ["BMC Type/Model and Serial or MAC Address is unavailable for $ip"] }, $::CALLBACK);
return;
}