2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-26 04:12:17 +00:00

fix(xcat-test): the SELinux diskless case cannot find an iPXE node boot config

selinux_cn_diskless_disabled_by_design looks for the boot configuration of the
compute node in three places: the xnba node directory, pxelinux.cfg by node
name, and petitboot. A node with netboot=ipxe has its script in
/tftpboot/xcat/ipxe/nodes/<node>.uefi instead, which the list does not name, so
the case reports

  BOOTCFG-BAD: the node has no boot configuration
  BOOTCFG-BAD: no boot configuration carries selinux=0

and fails on every iPXE cell. xcat54-cn of el10-x86_64-devel is netboot=ipxe, so
build 78 of xcat-test-el10-x86_64 failed there after its other checks passed:
the node reported SELinux disabled and the case still could not confirm the flag
reached the boot configuration.

Both path lists now name the iPXE script, the UEFI one first, which is the file
a UEFI client fetches. nodeset/ipxe_secureboot_shim.sh already reads that path.

The paths stay absolute, so the check still fails when no boot configuration
carries selinux=0.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
Daniel Hilst
2026-11-07 20:15:32 -03:00
parent a5a8c5444c
commit cdb8187cbc
+2 -2
View File
@@ -61,7 +61,7 @@ cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-net
check:rc==0
check:output=~SELinux is disabled
check:output=~cannot label its RAM root
cmd:sh -c 'ok=0; seen=0; for f in /tftpboot/xcat/xnba/nodes/$$CN /tftpboot/pxelinux.cfg/$$CN /tftpboot/petitboot/$$CN; do [ -f "$f" ] || continue; seen=1; if grep -q "selinux=0" "$f"; then ok=1; echo "BOOTCFG-OK: $f"; else echo "BOOTCFG-NOFLAG: $f"; fi; done; [ "$seen" = 1 ] || echo "BOOTCFG-BAD: the node has no boot configuration"; [ "$ok" = 1 ] || echo "BOOTCFG-BAD: no boot configuration carries selinux=0"'
cmd:sh -c 'ok=0; seen=0; for f in /tftpboot/xcat/ipxe/nodes/$$CN.uefi /tftpboot/xcat/ipxe/nodes/$$CN /tftpboot/xcat/xnba/nodes/$$CN /tftpboot/pxelinux.cfg/$$CN /tftpboot/petitboot/$$CN; do [ -f "$f" ] || continue; seen=1; if grep -q "selinux=0" "$f"; then ok=1; echo "BOOTCFG-OK: $f"; else echo "BOOTCFG-NOFLAG: $f"; fi; done; [ "$seen" = 1 ] || echo "BOOTCFG-BAD: the node has no boot configuration"; [ "$ok" = 1 ] || echo "BOOTCFG-BAD: no boot configuration carries selinux=0"'
check:output=~BOOTCFG-OK:
check:output!~BOOTCFG-BAD:
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
@@ -200,7 +200,7 @@ check:rc==0
cmd:nodeset $$CN osimage=$$STATELITE
check:rc==0
check:output=~SELinux is disabled
cmd:sh -c 'grep -rh "selinux=0" /tftpboot/xcat/xnba/nodes/$$CN /tftpboot/pxelinux.cfg/$$CN /tftpboot/petitboot/$$CN 2>/dev/null | wc -l'
cmd:sh -c 'grep -rh "selinux=0" /tftpboot/xcat/ipxe/nodes/$$CN.uefi /tftpboot/xcat/ipxe/nodes/$$CN /tftpboot/xcat/xnba/nodes/$$CN /tftpboot/pxelinux.cfg/$$CN /tftpboot/petitboot/$$CN 2>/dev/null | wc -l'
check:rc==0
check:output!~^0$
cmd:chdef -t node -o $$CN selinux=