Skip to content

Multi NIC support & cluster ID fix for Slurm controller#5563

Merged
rahimkhan19 merged 3 commits into
GoogleCloudPlatform:developfrom
rahimkhan19:multi-nic-address-support
May 21, 2026
Merged

Multi NIC support & cluster ID fix for Slurm controller#5563
rahimkhan19 merged 3 commits into
GoogleCloudPlatform:developfrom
rahimkhan19:multi-nic-address-support

Conversation

@rahimkhan19

@rahimkhan19 rahimkhan19 commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

This Pull Request introduces support for configuring additional network interfaces on the Slurm controller, resolves potential cluster ID mismatches during the controller setup, and fixes Terraform output errors encountered when using an existing Google Cloud Storage (GCS) bucket

Key Changes
Support for Additional Network Interfaces: Updates the controller configuration and variable definitions (in community/modules/scheduler/schedmd-slurm-gcp-v6-controller/controller.tf and variables_controller_instance.tf) to include a dynamic block for network_interface. This allows the controller to connect to multiple networks (such as a primary HPC network and a secondary VPN network) as specified in var.additional_networks.

Cluster ID Mismatch Resolution: Modifies the initialization logic in community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/setup.py to automatically remove the cached cluster ID file (/var/spool/slurm/clustername) during setup. This prevents "CLUSTER ID MISMATCH" errors that occur in multi-cluster environments when a controller is recreated while the database retains the old registration.

Bucket Output Fix: Adjusts community/modules/scheduler/schedmd-slurm-gcp-v6-controller/outputs.tf to reference module.slurm_files.bucket_name instead of module.bucket[0]. This resolves "Unsupported attribute" errors that occur when create_bucket is set to false, ensuring Terraform can successfully output the bucket name even when using pre-existing infrastructure.

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 #

@rahimkhan19 rahimkhan19 requested a review from a team as a code owner April 28, 2026 12:11
@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 enhances the Slurm controller configuration by introducing support for multiple network interfaces and improving the robustness of the cluster initialization process. These changes ensure better network flexibility and prevent state-related errors during controller recreation, leading to a more stable deployment experience.

Highlights

  • Multi-NIC Support: Added a dynamic network_interface block to the controller configuration, enabling support for multiple network interfaces via the new additional_networks variable.
  • Cluster ID Mismatch Fix: Implemented logic in the setup script to remove the clustername file during initialization, preventing ID mismatches when the controller is recreated.
  • Output Updates: Refined output definitions for the Slurm bucket to improve reliability and conditional handling.
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.

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.

@github-actions github-actions Bot added the external PR from external contributor label Apr 28, 2026
@rahimkhan19 rahimkhan19 added the release-bugfix Added to release notes under the "Bug fixes" heading. label Apr 28, 2026

@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 adds support for additional network interfaces to the Slurm controller and includes a fix in the setup script to prevent cluster ID mismatches by removing the clustername file. It also updates bucket-related outputs for better consistency. Feedback was provided regarding a redundant ternary operator in the slurm_bucket output, which can be simplified since the module already evaluates to an empty list when not created.

Comment thread community/modules/scheduler/schedmd-slurm-gcp-v6-controller/outputs.tf Outdated

@kvenkatachala333 kvenkatachala333 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Implementation wise LGTM, please ensure all slurm tests are passed before merging

@LAVEEN LAVEEN left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. I see a3 high test is failing. Please make sure its not due to this change.

@rahimkhan19 rahimkhan19 merged commit 5bcef44 into GoogleCloudPlatform:develop May 21, 2026
43 of 74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external PR from external contributor 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