To test Racker without a special hardware we need a QEMU test
environment which sets up an IPMI emulator.
Add a script to configure and run ipmi_sim and add the plumbing for
QEMU VM management. Only the functionality Racker needs is tested.
It behaves like an IPMI-compatible rack with a TOR switch for the
public network on the secondary NICs and a second switch for the
rack-internal network for the primary NICs and the BMCs. The management
node has swapped cables so that the primary NIC and BMC is on the
public network and the secondary NIC can manage the rack-internal
network for DHCP/PXE.
The script creates two bridges, the public one with NAT for the TAP
devices for the secondary NIC, the internal one without NAT for the
TAP devices of the primary NIC and the BMC veth devices. The BMC veth
pair has one part moved to a new network namespace where dhclient runs
for the DHCP configuration of the BMC IP address. Because dhclient is
potentially modifying the root filesystem, a mount namespace is also
created with an overlayfs to protect the real /etc/resolv.conf.
To test Racker without a special hardware we need a QEMU test environment which sets up an IPMI emulator. Add a script to configure and run ipmi_sim and add the plumbing for QEMU VM management. Only the functionality Racker needs is tested. It behaves like an IPMI-compatible rack with a TOR switch for the public network on the secondary NICs and a second switch for the rack-internal network for the primary NICs and the BMCs. The management node has swapped cables so that the primary NIC and BMC is on the public network and the secondary NIC can manage the rack-internal network for DHCP/PXE. The script creates two bridges, the public one with NAT for the TAP devices for the secondary NIC, the internal one without NAT for the TAP devices of the primary NIC and the BMC veth devices. The BMC veth pair has one part moved to a new network namespace where dhclient runs for the DHCP configuration of the BMC IP address. Because dhclient is potentially modifying the root filesystem, a mount namespace is also created with an overlayfs to protect the real /etc/resolv.conf.