config/controllerconfig/debian
Lucas Ratusznei Fonseca 741a103817 Fix IPv6 DHCP lease not being delivered and causing upgrade to fail
Entries in the dnsmasq.hosts file are created for non-controller nodes
based on existing leases in the dnsmasq.leases file. At the start of the
upgrade, the leases file is copied from the N-1 release and contains the
mgmt addresses that where given through DHCP, so the hosts file ends up
with the mgmt addresses and this works for IPv4. While bringing lease
entries to the hosts file, the MAC addresses of the entries are compared
to the mgmt_mac of the hosts to determine if they are to be included,
but for IPv6 there is no MAC field, causing the entries to be left out.
This change makes mgmt address be included in the dnsmasq.hosts file
directly from the database while hosts are being deployed during
upgrade, so both IPv4 and IPv6 mgmt addresses are present without having
to rely on the previous leases.
Also, an additional filter was put in place so that only leases which
belong to the pxeboot network are imported to the hosts file. The
hostnames for such entries are going back to pxeboot-N, effectively
reverting https://review.opendev.org/c/starlingx/config/+/927213.
During host deploy stage, the pxeboot interface for the non-controller
nodes ends up with no address, since only static mgmt addresses are
served. Additional scripts were introduced to renew the pxeboot
interface DHCP lease during the activate stage.

Test plan

System: STANDARD, 2 controllers, 2 storages, 1 compute

Setup 01: IPv4, mgmt0 interface as ethernet assigned mgmt and cluster-
          host networks, pxeboot unassigned.
Setup 02: IPv4, pxeboot0 interface as ethernet assigned to pxeboot
          network, mgmt0 as VLAN on top of pxeboot0 assigned to mgmt,
          cluster0 as VLAN on top of pxeboot0 assigned to cluster-host
Setup 03: IPv6, pxeboot0 interface as ethernet assigned to pxeboot
          network, mgmt0 as VLAN on top of pxeboot0 assigned to mgmt,
          cluster0 as VLAN on top of pxeboot0 assigned to cluster-host
Setup 04: IPv4, mgmt0 interface as bonding assigned mgmt and cluster-
          host networks, pxeboot unassigned.
Setup 05: IPv6, pxeboot0 interface as bonding assigned to pxeboot
          network, mgmt0 as VLAN on top of pxeboot0 assigned to mgmt,
          cluster0 as VLAN on top of pxeboot0 assigned to cluster-host

[PASS] Upgrade Setup 01 from N-1 to N in VirtualBox
[PASS] Upgrade Setup 02 from N-1 to N in VirtualBox
[PASS] Upgrade Setup 03 from N-1 to N in VirtualBox
[PASS] Upgrade Setup 04 from N-1 to N in VirtualBox
[PASS] Upgrade Setup 05 from N-1 to N in VirtualBox

Note: deploy activate stage fails when 06-drbd-update-secure-config.sh
is executed, for reasons unrelated to this fix.

[PASS] Fresh install Setup 01 in VirtualBox
[PASS] Fresh install Setup 02 in VirtualBox
[PASS] Fresh install Setup 03 in VirtualBox

Story: 2010940
Task: 50995
Change-Id: I01aaf3bb54b689eef01710f2e4c60ee34dbf0920
Signed-off-by: Lucas Ratusznei Fonseca <lucas.ratuszneifonseca@windriver.com>
2024-09-13 16:52:16 -03:00
..
deb_folder Fix IPv6 DHCP lease not being delivered and causing upgrade to fail 2024-09-13 16:52:16 -03:00
meta_data.yaml Update debian package versions to use git commits 2023-02-10 20:11:06 +00:00