2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-21 19:22:05 +00:00

Allow IPoIB MAC addresses for provisioning via IPoIB

Examples:

EFI Boot MAC address: 20:b8:ce:f6:03:00:31:33:3e
OS MAC address: b8:ce:f6:31:33:3e
This commit is contained in:
Markus Hilger 2023-01-16 17:35:58 +01:00
parent 65b5c72e63
commit 172678ac87

View File

@ -610,7 +610,7 @@ sub addnode
$hname = $node;
} #Default to hostname equal to nodename
unless ($mac) { next; } #Skip corrupt format
if ($mac !~ /^[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){5,7}$|^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5,7}$/)
if ($mac !~ /^[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){5,8}$|^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5,8}$/)
{
$callback->(
{
@ -764,8 +764,8 @@ sub addnode
$hostname = $1 . "-hf" . $count;
}
}
} elsif (length($mac) == 23) { # 8 bytes of mac address
# Currently the only thing that has 8 bytes is an infiniband
} elsif (length($mac) == 23 || length($mac) == 26) { # 8 or 9 bytes of mac address
# Currently the only thing that has 8 or 9 bytes is an infiniband
# or infiniband like device, which is type 32 (0x20).
$hardwaretype = 32;
}