Debian: clean machine-id generated during installation

The Debian installations are generating the same machine-id if using
the same BUILD_ID. This ID is used to generate the value of random
MACs for SRIOV's VF interfaces, since it is the same across the same
BUILD_ID the network cards are generating the exact same MAC if the
NIC is on the same pci-slot across multiple nodes

This change removes the existing files so each installation's systemd
can generate an exclusive value

Test Plan (Debian)
[PASS]  install multiple nodes and verify that each one contains an
        exclusive /etc/machine-id content
[PASS]  reboot node to validate that machine-id does not change on
        subsequent boots

Closes-Bug: 1995505

Signed-off-by: Andre Kantek <andrefernandozanella.kantek@windriver.com>
Change-Id: I702d1cc0353d0d19149fdd1ac1ec4bd16e674119
This commit is contained in:
Andre Kantek 2022-11-02 12:21:48 -03:00
parent 5ee4654b4d
commit 1d82d29073

View File

@ -2557,6 +2557,11 @@ EOF
fi
fi
# Clean machine-id file, it needs to be generated after install.
# It must be unique per installation because it is used to generate
# random MACs for SR-IOV VFs, among other resources.
find / -name machine-id | xargs rm -fv
true
%end