xcat-core icon indicating copy to clipboard operation
xcat-core copied to clipboard

Support of two NICs for PXE boot / diskless deployment

Open langeseb opened this issue 11 months ago • 0 comments
trafficstars

Hey all!

We have encountered some issues using 2 different NICs for the pxe-boot. Reason: We have two NICs on two separate switchstacks in our servers due to redundancy. During boot, we can't tell which NIC has the active uplink. Description of issue: Therefore you can setup both NICs in the boot order (BIOS), switching to the second NIC after a timeout. On the other side, this must be setup within the xcat database in order recognize both NICs for xnba netboot. You can setup with chdef myNode mac="firstNICsMAC|secondNICsMAC" two MAC adresses in the xcat database in order to have them recognized by the DHCP deamon. Then, you setup your node with nodeset myNode osimage and makedhcp myNode. This generates the required entries in the dhcp.leases file in /var/lib/dhcpd/dhcpd.leases. The makedhcp writes two blocks in the leases file host myNode { .... firstNICsMAC ...} and host myNode { .... secondNICsMAC ...}. After that, you have to restart the dhcp service with systemctl restart dhcpd. The issue is, that the dhcp service will complain about two entries for the same host and will overwrite the file, deleting the second entrie. Suggested solution: The entries made by makedhcp command should have different host identifieres in the leases file. I've tested it manually: renaming myNode in e.g. myNode_N1 and the second entry in the leases file accordingly will not be deleted by the dhcpd restart. The rest of the function block can have the identical entries (e.g. hostname), only the identifier of the block must be unique. With that adaption the leases will be given for both MAC adresses during boot. Cheers Sebastian

langeseb avatar Dec 09 '24 09:12 langeseb