2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-20 17:32:15 +00:00

fix(xcat-core): the OpenEmbedded metadata check fails on the bootnic service

The OpenEmbedded metadata check failed in test_installed_network with
'xcat-genesis-bootnic.service' missing from the expected set. The
xcat-genesis-network recipe installs and enables genesis-bootnic and
its unit since the Genesis DHCPv6 boot nic fix, and the test still
expected only xcat-genesis-duid.service.

The test now expects both services, and asserts that the bootnic
script is installed and that its unit runs it before NetworkManager.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
Daniel Hilst
2026-11-09 09:28:10 -03:00
parent 7ee57ff62e
commit 38f4e4e2e9
+8 -1
View File
@@ -376,8 +376,15 @@ class GenesisMetadata(unittest.TestCase):
self.assertEqual(service["Service"]["ExecStart"], "/usr/libexec/xcat/genesis-duid")
self.assertEqual(set(service["Unit"]["Before"].split()),
{"NetworkManager.service", "xcat-genesis-network-state.service"})
# genesis-bootnic writes the connection profiles that keep DHCPv6 on the boot nic, so
# NetworkManager has to start after it.
self.installed(data, root, "libexecdir", "xcat/genesis-bootnic", 0o755)
bootnic = self.unit(self.installed(data, root, "systemd_system_unitdir",
"xcat-genesis-bootnic.service", 0o644))
self.assertEqual(bootnic["Service"]["ExecStart"], "/usr/libexec/xcat/genesis-bootnic")
self.assertIn("NetworkManager.service", bootnic["Unit"]["Before"].split())
self.assertEqual(self.words(data, "SYSTEMD_SERVICE:" + data.getVar("PN")),
{"xcat-genesis-duid.service"})
{"xcat-genesis-duid.service", "xcat-genesis-bootnic.service"})
def test_installed_hardware_providers(self):
data, root = self.install("xcat-genesis-hardware-control")