Skip to content

Fix SELinux issue in hpc-build-slurm-image blueprint#5266

Merged
AdarshK15 merged 1 commit intoGoogleCloudPlatform:developfrom
AdarshK15:fix-selinux
Feb 23, 2026
Merged

Fix SELinux issue in hpc-build-slurm-image blueprint#5266
AdarshK15 merged 1 commit intoGoogleCloudPlatform:developfrom
AdarshK15:fix-selinux

Conversation

@AdarshK15
Copy link
Copy Markdown
Member

This PR fixes a deployment failure in hpc-build-slurm-image.yaml where startup script fails to disable SELinux because selinux module is not found in the Python3 environment for Rocky Linux 8 image.

Changes:

  • Upgraded Ansible to 8.7.0: Provides ansible-core 2.15. Slurm 25.11.2 requires ansible-core >= 2.15.
  • Upgraded Python to 3.12: Required to support Ansible 8.7.0.

Part of this fix was delivered in slurm-gcp PR.

Submission Checklist

NOTE: Community submissions can take up to 2 weeks to be reviewed.

Please take the following actions before submitting this pull request.

  • Fork your PR branch from the Toolkit "develop" branch (not main)
  • Test all changes with pre-commit in a local branch #
  • Confirm that "make tests" passes all tests
  • Add or modify unit tests to cover code changes
  • Ensure that unit test coverage remains above 80%
  • Update all applicable documentation
  • Follow Cluster Toolkit Contribution guidelines #

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @AdarshK15, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical deployment failure within the hpc-build-slurm-image blueprint. The core problem stemmed from an incompatibility preventing the selinux Python module from being found, which is essential for disabling SELinux during startup. The solution involves updating the Python runtime and Ansible version to ensure proper module availability and compatibility with Slurm's requirements.

Highlights

  • SELinux Issue Resolution: Fixed a deployment failure in the hpc-build-slurm-image.yaml blueprint where the startup script failed to disable SELinux due to the selinux module not being found in the Python environment for Rocky Linux 8.
  • Python Version Upgrade: Upgraded the Python version used in the build process from Python 3.8 to Python 3.12, which is required to support the new Ansible version.
  • Ansible Version Upgrade: Upgraded Ansible from version 6.7.0 to 8.7.0, providing ansible-core 2.15 to meet the requirements of Slurm 25.11.2.
Changelog
  • community/examples/hpc-build-slurm-image.yaml
    • Updated Python installation from python38 to python3.12 and included python3.12-pip.
    • Changed the default Python 3 alternative to python3.12.
    • Upgraded the installed Ansible version from 6.7.0 to 8.7.0.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request successfully addresses the SELinux deployment failure by upgrading the environment to Python 3.12 and Ansible 8.7.0. These upgrades ensure compatibility with the latest Slurm playbooks and provide a more robust environment for the image build process. The inclusion of the selinux Python module is critical for Ansible's SELinux management tasks, and its installation within the upgraded Python 3.12 environment resolves the reported issue. The changes are consistent with the Cluster Toolkit's move towards newer Python and Ansible versions as seen in the repository's internal installation scripts.

@AdarshK15 AdarshK15 marked this pull request as ready for review February 23, 2026 05:46
@AdarshK15 AdarshK15 requested review from a team and samskillman as code owners February 23, 2026 05:46
@mufaqam-gcl mufaqam-gcl added the release-bugfix Added to release notes under the "Bug fixes" heading. label Feb 23, 2026
@mufaqam-gcl mufaqam-gcl self-assigned this Feb 23, 2026
@AdarshK15 AdarshK15 merged commit 1151e46 into GoogleCloudPlatform:develop Feb 23, 2026
17 of 85 checks passed
@AdarshK15 AdarshK15 deleted the fix-selinux branch March 15, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-bugfix Added to release notes under the "Bug fixes" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants