Skip to content

Add support for DualStack (IPv4/IPv6) networks#5206

Open
DomiKoPL wants to merge 5 commits intoGoogleCloudPlatform:developfrom
DomiKoPL:dualstacksupport
Open

Add support for DualStack (IPv4/IPv6) networks#5206
DomiKoPL wants to merge 5 commits intoGoogleCloudPlatform:developfrom
DomiKoPL:dualstacksupport

Conversation

@DomiKoPL
Copy link
Member

@DomiKoPL DomiKoPL commented Feb 6, 2026

Summary

This Pull Request introduces support for dual-stack (IPv4/IPv6) networking across the VPC and Slurm v6 controller modules. These changes allow users to provision networks with IPv6 capabilities and ensure that the Slurm controller instance is correctly configured to utilize the assigned network stack.

Changes

modules/network/vpc

  • Added subnetwork_stack_type and subnetwork_ipv6_access_type variables.
  • Updated default subnetwork and custom subnetwork logic to include these parameters, allowing for IPV4_IPV6 configuration.
  • Added subnetwork_stack_type output to expose the configuration of the primary subnetwork.
  • Updated README.md documentation to include the new input parameters.

community/modules/scheduler/schedmd-slurm-gcp-v6-controller

  • Added subnetwork_stack_type variable.
  • Updated the controller instance resource to apply the stack_type to its primary network interface.
  • Updated README.md to include the new input variable.

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 #

This change enables the configuration of IPv6 for VPC subnetworks. It introduces
new variables to define the stack type and IPv6 access type, allowing for the
creation of dual-stack (IPv4/IPv6) networks.

- Added 'subnetwork_stack_type' and 'subnetwork_ipv6_access_type' variables.
- Added 'subnetwork_stack_type' output variable.
- Updated the default primary subnetwork configuration to utilize these settings.
- Updated README.md with the new input and output parameters and usage details.
This change enables the Slurm v6 controller to support dual-stack (IPv4/IPv6)
networking by introducing the 'subnetwork_stack_type' variable. This
parameter is applied to the controller's primary network interface to
ensure alignment with the underlying VPC configuration.

- Added 'subnetwork_stack_type' variable to the controller module.
- Updated the controller instance resource to apply the stack type to its
  primary network interface.
- Updated README.md to include the new input variable.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @DomiKoPL, 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 significantly enhances the networking capabilities of the system by integrating dual-stack (IPv4/IPv6) support. It allows users to provision VPCs and their subnetworks with IPv6, and ensures that the Slurm controller instances can correctly leverage these advanced network configurations. The changes provide greater flexibility and future-proofing for network deployments without altering existing IPv4-only setups.

Highlights

  • Dual-stack Networking Support: Introduced support for dual-stack (IPv4/IPv6) networking in the VPC module, allowing for more flexible network configurations.
  • VPC Module Enhancements: Added subnetwork_stack_type and subnetwork_ipv6_access_type variables to the VPC module, enabling configuration of IPv6 capabilities for subnetworks.
  • Slurm Controller Integration: Updated the Slurm v6 controller module to utilize the new subnetwork_stack_type variable, ensuring the controller instance can be provisioned with the correct network stack.
  • Documentation Updates: README files for both the VPC and Slurm controller modules have been updated to reflect the new input and output parameters.
Changelog
  • community/modules/scheduler/schedmd-slurm-gcp-v6-controller/README.md
    • Added documentation for the new subnetwork_stack_type input variable.
  • community/modules/scheduler/schedmd-slurm-gcp-v6-controller/controller.tf
    • Modified the google_compute_instance_from_template resource to apply var.subnetwork_stack_type to the primary network interface's stack_type attribute.
  • community/modules/scheduler/schedmd-slurm-gcp-v6-controller/variables_controller_instance.tf
    • Introduced a new variable subnetwork_stack_type of type string with a default value of IPV4_ONLY.
  • modules/network/vpc/README.md
    • Updated the input variables section to include subnetwork_stack_type and subnetwork_ipv6_access_type.
    • Added subnetwork_stack_type to the outputs documentation.
  • modules/network/vpc/main.tf
    • Updated the local default primary subnetwork configuration to include stack_type and ipv6_access_type based on the new variables.
  • modules/network/vpc/outputs.tf
    • Added a new output subnetwork_stack_type to expose the stack type of the primary subnetwork.
  • modules/network/vpc/variables.tf
    • Added a new variable subnetwork_stack_type of type string with a default value of IPV4_ONLY.
    • Added a new variable subnetwork_ipv6_access_type of type string with a default value of null.
Activity
  • No human activity has been recorded on 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 introduces dual-stack (IPv4/IPv6) support, which is a valuable addition. The implementation is mostly correct, but I've identified a critical issue in one of the module outputs that would cause a deployment failure. Additionally, there are opportunities to improve robustness by adding validation for the new variables, as was intended in the pull request description. I've also included some minor suggestions to improve documentation consistency.

@DomiKoPL DomiKoPL changed the title Dualstacksupport Add support for DualStack (IPv4/IPv6) networks Feb 10, 2026
@DomiKoPL DomiKoPL marked this pull request as ready for review February 10, 2026 09:25
@DomiKoPL DomiKoPL requested review from a team and samskillman as code owners February 10, 2026 09:25
@arpit974 arpit974 self-requested a review February 11, 2026 04:26
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