Skip to content

Support Managed Lustre for A3 HighGPU Slurm clusters. The Lustre client is compiled and installed using DKMS because a pre-compiled client module package for the TCPX kernel does not currently exist in the Artifact Registry.#5974

Open
shivam222 wants to merge 1 commit into
GoogleCloudPlatform:developfrom
shivam222:shivambansl_a3h_lustre

Conversation

@shivam222

Copy link
Copy Markdown
Contributor

Description

This PR transitions the A3 HighGPU (a3-highgpu-8g) Slurm blueprint from using Filestore to using Managed Lustre as the primary network storage.

Because the A3 HighGPU nodes utilize a specialized linux-gcp-tcpx kernel that currently lacks pre-compiled Lustre client packages in the Artifact Registry, this PR introduces DKMS fallback logic to compile the client from source

Testing

Used the on demand capacity to launch the cluster and executed the NCCL tests against it.

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 #

@shivam222
shivam222 requested a review from a team as a code owner July 20, 2026 05:46
@github-actions github-actions Bot added the external PR from external contributor label Jul 20, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 A3 HighGPU Slurm blueprint to utilize Managed Lustre as the primary network storage solution. To ensure compatibility with the specialized tcpx kernel used in these environments, the changes include a robust fallback installation method using DKMS, ensuring the Lustre client can be built from source when standard pre-compiled binaries are missing. These updates also include necessary configuration adjustments to the deployment blueprints and test suites to support the new storage architecture.

Highlights

  • Storage Migration: Transitioned the A3 HighGPU Slurm blueprint from Filestore to Managed Lustre for improved network storage performance.
  • DKMS Fallback Implementation: Introduced a DKMS-based fallback mechanism to compile the Lustre client from source when pre-compiled packages are unavailable for the specialized tcpx kernel.
  • Infrastructure Updates: Updated deployment blueprints and daily test configurations to include Managed Lustre and Private Service Access modules.
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 the 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 counterproductive. 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.

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.

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

Copy link
Copy Markdown
Contributor

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 updates the A3 High GPU Slurm blueprint to use Managed-Lustre instead of Filestore, including adding a script to install Lustre client modules for the TCPX kernel. Additionally, the Lustre client installation scripts are updated to fallback to DKMS installation if pre-compiled modules are not found. The review feedback highlights critical issues with error handling in these shell scripts, where toggling set +e/set -e or using compound commands in || lists can silently mask installation failures. It is recommended to refactor these into standard if ! ... blocks to ensure robust error propagation.

Comment on lines +356 to +364
set +e
apt-get install -y lustre-client-modules-${TCPX_KERNEL_VERSION}
if [ $? -ne 0 ]; then
echo "Pre-compiled package lustre-client-modules-${TCPX_KERNEL_VERSION} not found. Installing via DKMS for ${TCPX_KERNEL_VERSION}..."
apt-get install -y dkms lustre-client-modules-dkms lustre-client-utils
echo "Building DKMS modules specifically for ${TCPX_KERNEL_VERSION}..."
dkms autoinstall -k "${TCPX_KERNEL_VERSION}"
fi
set -e

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Toggling set +e and set -e globally is risky and can mask failures. Because set +e is active during the entire fallback block, any failure in apt-get install -y dkms ... or dkms autoinstall will be silently ignored, and the script will continue. Using if ! command; then keeps set -e active for all commands inside the then block, ensuring that any failure during the DKMS fallback installation or build will immediately fail the script with an error.

            if ! apt-get install -y lustre-client-modules-${TCPX_KERNEL_VERSION}; then
              echo "Pre-compiled package lustre-client-modules-${TCPX_KERNEL_VERSION} not found. Installing via DKMS for ${TCPX_KERNEL_VERSION}..."
              apt-get install -y dkms lustre-client-modules-dkms lustre-client-utils
              echo "Building DKMS modules specifically for ${TCPX_KERNEL_VERSION}..."
              dkms autoinstall -k "${TCPX_KERNEL_VERSION}"
            fi

Comment on lines +64 to +67
apt install -y "lustre-client-modules-$(uname -r)" lustre-client-utils || {
echo "Pre-compiled package lustre-client-modules-$(uname -r) not found. Attempting install via lustre-client-modules-dkms..."
apt install -y dkms lustre-client-modules-dkms lustre-client-utils
} || (echo "Error finding Lustre module packages, Lustre package may not exist for this kernel version" && exit 1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

In Bash, when a compound command (like { ... }) is part of an || list, set -e is disabled for all commands inside that block. If apt install -y dkms ... fails, it won't trigger an immediate exit. Additionally, the error handler uses (echo ... && exit 1) which runs in a subshell and may not behave as expected depending on the shell environment. Using standard if ! ... blocks avoids subshells and inheritance issues, making the code much more readable and robust.

Suggested change
apt install -y "lustre-client-modules-$(uname -r)" lustre-client-utils || {
echo "Pre-compiled package lustre-client-modules-$(uname -r) not found. Attempting install via lustre-client-modules-dkms..."
apt install -y dkms lustre-client-modules-dkms lustre-client-utils
} || (echo "Error finding Lustre module packages, Lustre package may not exist for this kernel version" && exit 1)
if ! apt install -y "lustre-client-modules-$(uname -r)" lustre-client-utils; then
echo "Pre-compiled package lustre-client-modules-$(uname -r) not found. Attempting install via lustre-client-modules-dkms..."
if ! apt install -y dkms lustre-client-modules-dkms lustre-client-utils; then
echo "Error finding Lustre module packages, Lustre package may not exist for this kernel version" >&2
exit 1
fi
fi

Comment on lines +64 to +67
apt install -y "lustre-client-modules-$(uname -r)" lustre-client-utils || {
echo "Pre-compiled package lustre-client-modules-$(uname -r) not found. Attempting install via lustre-client-modules-dkms..."
apt install -y dkms lustre-client-modules-dkms lustre-client-utils
} || (echo "Error finding Lustre module packages, Lustre package may not exist for this kernel version" && exit 1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

In Bash, when a compound command (like { ... }) is part of an || list, set -e is disabled for all commands inside that block. If apt install -y dkms ... fails, it won't trigger an immediate exit. Additionally, the error handler uses (echo ... && exit 1) which runs in a subshell and may not behave as expected depending on the shell environment. Using standard if ! ... blocks avoids subshells and inheritance issues, making the code much more readable and robust.

Suggested change
apt install -y "lustre-client-modules-$(uname -r)" lustre-client-utils || {
echo "Pre-compiled package lustre-client-modules-$(uname -r) not found. Attempting install via lustre-client-modules-dkms..."
apt install -y dkms lustre-client-modules-dkms lustre-client-utils
} || (echo "Error finding Lustre module packages, Lustre package may not exist for this kernel version" && exit 1)
if ! apt install -y "lustre-client-modules-$(uname -r)" lustre-client-utils; then
echo "Pre-compiled package lustre-client-modules-$(uname -r) not found. Attempting install via lustre-client-modules-dkms..."
if ! apt install -y dkms lustre-client-modules-dkms lustre-client-utils; then
echo "Error finding Lustre module packages, Lustre package may not exist for this kernel version" >&2
exit 1
fi
fi

@aslam-quad aslam-quad removed the external PR from external contributor label Jul 20, 2026
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