Skip to content

fix(netboot): correct SELinux settings and firewalld cleanup - #7970

Merged
dhilst merged 5 commits into
xcat2:masterfrom
VersatusHPC:fix/netboot-profile-shell-selinux
Oct 23, 2026
Merged

dhilst merged 5 commits into
xcat2:masterfrom
VersatusHPC:fix/netboot-profile-shell-selinux

Conversation

@viniciusferrao

Copy link
Copy Markdown
Member

EL netboot postinstall scripts turn SELINUX=permissive into an invalid
assignment. Some also use Bash conditionals under /bin/sh, leaving firewalld
enabled when the shell is dash.

Set enforcing and permissive settings to SELINUX=disabled and use POSIX
firewalld checks across the affected profiles and their aliases. Preserve
comments and unrelated service links.

Older bubblewrap releases reject a symlink mount destination. Bind Bash over
the resolved shell path without changing the profile cases.
Match the complete enforcing or permissive setting. Preserve comments and
whitespace, and do not change unrelated lines or create a missing policy
file.
Execute all affected owners and their aliases in isolated image roots. Check
policy contents and metadata, missing files, repeated runs and host
sentinels. Run the cases in Ubuntu and EL CI.
Use separate test commands under /bin/sh. Remove regular files and symlinks,
including dangling links, while retaining absent entries and directories.
Execute each profile through /bin/sh. Check both firewalld entries as
regular files, valid links, dangling links, directories and missing paths.
Preserve unit targets, unrelated links and the older profiles without this
cleanup.
@viniciusferrao
viniciusferrao requested a review from dhilst October 21, 2026 23:03
@dhilst
dhilst merged commit f4f89c0 into xcat2:master Oct 23, 2026
3 checks passed
dhilst added a commit to VersatusHPC/xcat-core that referenced this pull request Oct 23, 2026
Twelve conflicts, all from xcat-core/xcat2#7970 landing.

Eleven are the one sed line in the netboot postinstall profiles, where xcat2#7970 and
this branch replaced the same line with different patterns. Master's wins: it
anchors on optional leading blanks and preserves a trailing comment, which this
branch's `s/^SELINUX=.*$/SELINUX=disabled/` would have eaten. This branch's own
postinstall_selinux_config.bats asserts "the comment that names permissive keeps
its text", so the better pattern is the one its test already wanted -- 6 of 6
pass on master's version. What master's pattern does not catch is a value
outside enforcing|permissive, which nothing here tests and no stock config
ships.

The twelfth is .github/workflows/xcat_test.yml: master added a step to the
existing job and this branch adds a whole selinux_policy_test job after it.
Resolved as the union, with master's step where it put it; the file still parses
and names three jobs.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
dhilst added a commit to VersatusHPC/xcat-core that referenced this pull request Oct 23, 2026
Clean against the master that now carries xcat-core/xcat2#7968, xcat2#7970, xcat2#7971, xcat2#7975,
xcat2#7978 and xcat2#7980. xcat2#7968 touches buildrpms.pl and release_repository.t as this
branch does, in disjoint regions -- the locking sites here, createrepo_dir,
index_repo and sign_repo_dir there -- which a review of xcat2#7968 measured before it
landed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants