mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-19 17:02:15 +00:00
cd67199463
xcatroot writes the netplan of the booted system from the interface it found, and it always wrote "dhcp4: true". An IPv6-only node has no DHCPv4 server, so it reached its login prompt with no address: Ubuntu 24.04.5 reported "[FAILED] Failed to start systemd-networkd-w... Wait for Network to be Configured." and "[FAILED] Failed to start xcatpostinit.service", and the node answered no ssh. The address is already on the kernel command line, in the static form dracut takes. xcat_static_ip6_fields reads it and the netplan carries the address, the prefix and a default route through the gateway. A node whose command line holds an IPv4 form keeps dhcp4, because the fields are read only from a bracketed literal. Captured by xCAT-test/bats/ipv6_xcatroot_netplan.bats. Reading the fields by cutting on the first colon, which is what an IPv6 literal breaks, fails the three parsing assertions and leaves the four refusals passing. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>