2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-09-10 20:28:44 +00:00

Add a workaround for wrong hwaddr

Sometimes the client sends 20: before the address,
adapt to cope
This commit is contained in:
Jarrod Johnson
2020-04-14 10:04:50 -04:00
parent e040d24bb4
commit f851be0c26

View File

@@ -821,7 +821,7 @@ sub addnode
}
my @hwtypes;
if ($hardwaretype == 1) {
@hwtypes = (1, 132);
@hwtypes = (1, 132, 133);
} else {
@hwtypes = ($hardwaretype);
}
@@ -834,6 +834,11 @@ sub addnode
$localname .= "-infinibandcompatname";
$localmac = substr($mac, 0, 8) . ":03:00" . substr($mac, 8);
}
if ($hwtype == 133) {
$hwtype = 32;
$localname .= "-infinibandcompatname20";
$localmac = "20:" . substr($mac, 0, 8) . ":03:00" . substr($mac, 8);
}
print $omshell "new host\n";
print $omshell "set name = \"$localname\"\n";
print $omshell "set hardware-address = " . $localmac . "\n";