Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for SELinux disabled in Ansible tasks #1162

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

ajdecon
Copy link
Collaborator

@ajdecon ajdecon commented Apr 22, 2022

Summary

In tasks that interact with SELinux, add a check so we skip the task if SELinux is fully disabled (rather than just in permissive mode). Closes #1159.

Test plan

Before

Turned up a virtual Slurm cluster with two CentOS controller nodes, so that we hit the following task:

- name: Allow mysql to read libaio.so.1
  sefcontext:
    target: '/lib64(/.*)?'
    setype: mysqld_db_t
    state: present

One controller node was configured with SELinux in permissive mode, the second with SELinux disabled.

On the node with SELinux in permissive mode, the task executes successfully, but on the node with SELinux disabled, it fails with the error:

fatal: [virtual-mgmt01]: FAILED! => {"changed": false, "msg": "SELinux is disabled on this host."}

After

After making these changes, the relevant tasks execute successfully.

Other tests

All existing CI tests should pass.

In tasks that interact with SELinux, add a check so we skip the task if
SELinux is fully disabled (rather than just in permissive mode)
@ajdecon ajdecon requested review from dholt and supertetelman April 22, 2022 22:21
@ajdecon ajdecon merged commit 90a7aa7 into NVIDIA:master Apr 26, 2022
@ajdecon ajdecon deleted the selinux-disabled-fix branch April 26, 2022 17:34
@ajdecon ajdecon mentioned this pull request Apr 26, 2022
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.

Playbook fails during slurm installation, msg: SELinux is disabled on this host
2 participants