Skip to content

Upgrade Slurm version to 25.11.2#5237

Draft
AdarshK15 wants to merge 1 commit intoGoogleCloudPlatform:developfrom
AdarshK15:slurm-upgrade
Draft

Upgrade Slurm version to 25.11.2#5237
AdarshK15 wants to merge 1 commit intoGoogleCloudPlatform:developfrom
AdarshK15:slurm-upgrade

Conversation

@AdarshK15
Copy link
Member

upgrading Slurm version to 25.11.2, python to 3.12 and ansible to 8.7.0.

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
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 updates the Slurm image build process by upgrading the core Slurm version to 25.11.2, along with its Python dependency to 3.12 and Ansible to 8.7.0. These changes ensure compatibility with newer software versions and streamline the build environment setup, adjusting the Ansible installation method and the source repository for Slurm-GCP configurations.

Highlights

  • Slurm Version Upgrade: The Slurm version used for building images has been upgraded to 25.11.2.
  • Python Version Update: The Python version used in the build process has been updated from 3.8 to 3.12.
  • Ansible Version Update: The Ansible version installed during the build has been upgraded from 6.7.0 to 8.7.0.
  • Build Script Adjustments: The prep-for-slurm-build.sh script was modified to reflect the new Python and Ansible versions and to enable system-wide Ansible installation.
  • Ansible Pull Repository: The ansible-pull command now references a different GitHub repository for fetching Slurm-GCP configurations.
Changelog
  • community/examples/hpc-build-slurm-image.yaml
    • Updated the build_from_git_ref variable to 'slurm-25.11.2'.
    • Changed the install_ansible setting from 'false' to 'true'.
    • Modified the prep-for-slurm-build.sh script to install 'python3.12' and 'python3.12-pip' instead of 'python38'.
    • Updated the 'alternatives --set python3' command to point to 'python3.12'.
    • Upgraded the ansible pip package installation from '6.7.0' to '8.7.0'.
    • Removed the 'selinux' pip package installation.
    • Changed the ansible-pull command's repository URL from 'GoogleCloudPlatform/slurm-gcp' to 'AdarshK15/slurm-gcp'.
Activity
  • No human activity has been recorded for this pull request yet.
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
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

This pull request upgrades the Slurm version to 25.11.2, Python to 3.12, and Ansible to 8.7.0 in the hpc-build-slurm-image example. While the version upgrades are welcome, several issues need to be addressed. Most critically, the example now points to a personal GitHub fork for slurm-gcp, which must be changed back to the official repository to align with consistency guidelines. Additionally, there's a redundant Ansible installation that should be cleaned up, and a potentially required Python package for SELinux has been removed, which might cause problems during the image build.

set -e -o pipefail
ansible-pull \
-U https://github.com/GoogleCloudPlatform/slurm-gcp -C $(vars.build_from_git_ref) \
-U https://github.com/AdarshK15/slurm-gcp -C $(vars.build_from_git_ref) \
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The ansible-pull command is now pulling from a personal GitHub fork (AdarshK15/slurm-gcp) instead of the official GoogleCloudPlatform/slurm-gcp repository. This should be reverted to the official repository to ensure the image is built from the correct and trusted source. Personal forks should not be used in examples.

              -U https://github.com/GoogleCloudPlatform/slurm-gcp -C $(vars.build_from_git_ref) \
References
  1. To maintain consistency and trust across blueprints, all components, including the main repository for ansible-pull, should be fetched from the official GoogleCloudPlatform/slurm-gcp repository rather than personal forks.

settings:
# Do not create Ansible virtual env; Install system wide Ansible below.
install_ansible: false
install_ansible: true
Copy link
Contributor

Choose a reason for hiding this comment

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

high

Setting install_ansible: true causes the install_ansible.sh script to run, which installs Ansible in a virtual environment. However, the prep-for-slurm-build.sh runner script also installs Ansible system-wide. This is redundant and can lead to conflicts. The comment on line 41 also states "Do not create Ansible virtual env". To avoid redundancy and align with the intended system-wide installation, this should be set to false.

      install_ansible: false

python3 -m pip install pip --upgrade
python3 -m pip install ansible==6.7.0
python3 -m pip install selinux
python3 -m pip install ansible==8.7.0
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The python3 -m pip install selinux command was removed. The slurm-gcp Ansible playbook may require Python bindings for SELinux to manage file contexts correctly on the local machine. If this is required, it should be restored to prevent potential issues during the image build.

          python3 -m pip install ansible==8.7.0
          python3 -m pip install selinux

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.

1 participant