Skip to content

Updating from Rocky8 plain images to Rocky9#5736

Merged
sudheer-quad merged 14 commits into
GoogleCloudPlatform:developfrom
LAVEEN:rocky9plainupgrade
Jun 9, 2026
Merged

Updating from Rocky8 plain images to Rocky9#5736
sudheer-quad merged 14 commits into
GoogleCloudPlatform:developfrom
LAVEEN:rocky9plainupgrade

Conversation

@LAVEEN

@LAVEEN LAVEEN commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

This PR upgrades the default Rocky Linux image versions from Rocky 8 to Rocky 9 for several blueprints align with the latest supported OS versions and take advantage of modern image families.

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, 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 focuses on modernizing the infrastructure by upgrading base OS images to Rocky 9 and transitioning Slurm authentication to the more secure Native Authentication standard. It also significantly expands the toolkit's capabilities by adding several new infrastructure modules and improving GKE management, telemetry reliability, and TPU topology handling.

Highlights

  • OS Upgrade: Upgraded Rocky 8 images to Rocky 9 across various example blueprints.
  • Slurm Authentication: Introduced Slurm Native Authentication as a secure alternative to MUNGE, with a deprecation path for MUNGE-based setups.
  • New Modules: Added new modules for Cloud Run, Redis, DNS Managed Zones, Global Static IPs, Kubernetes Namespaces, and IAP policies.
  • Telemetry Improvements: Enhanced telemetry flushing with atomic flags and fatal hooks to ensure reliable event reporting on failures.
  • GKE Enhancements: Added support for vertical pod autoscaling, improved network interface handling, and integrated ML Diagnostics support.
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.

@LAVEEN LAVEEN changed the base branch from main to develop June 3, 2026 07:00
@LAVEEN LAVEEN added the release-improvements Added to release notes under the "Improvements" heading. label Jun 3, 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 introduces Slurm Native Authentication as the new secure standard (deprecating MUNGE), integrates Google Cloud ML Diagnostics into GKE TPU blueprints, adds several new modules (including Cloud Run, Redis, and IAP Policy), and enhances GKE Cluster Autoscaling and job submission. The review identified several critical improvements to prevent runtime errors and security vulnerabilities: adding a guard against empty values in GKE node affinity match expressions, verifying that autoscaling limits are iterable to avoid panics, using safe dictionary access in mig_flex.py to prevent KeyError, wrapping shell variables in double quotes in helm-upgrade to prevent command injection, and guarding against division-by-zero when calculating cores per socket in util.py.

I am having trouble creating individual review comments. Click here to see my feedback.

pkg/orchestrator/gke/scheduling.go (111-118)

high

If values is empty (e.g., when isTopologyMerge is false and v is empty), appending it to MatchExpressions with NodeSelectorOpIn will generate an invalid Kubernetes manifest that will be rejected by the API server. Add a guard to skip appending if values is empty.

		if len(values) == 0 {
			continue
		}

		term.MatchExpressions = append(
			term.MatchExpressions,
			corev1.NodeSelectorRequirement{
				Key:      k,
				Operator: corev1.NodeSelectorOpIn,
				Values:   values,
			},
		)

pkg/config/autoscaling.go (92-94)

medium

To prevent potential panics when parsing invalid or malformed user configurations, ensure that limitsVal is verified to be an iterable type (list, set, or tuple) before returning it for element iteration.

	if !ok || limitsVal.IsNull() || !limitsVal.IsKnown() || (!limitsVal.Type().IsListType() && !limitsVal.Type().IsSetType() && !limitsVal.Type().IsTupleType()) {
		return nil, cty.Value{}, false, nil
	}

community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/mig_flex.py (223)

medium

If mig_list does not contain the "items" key (e.g., when no MIGs are found), accessing mig_list["items"] directly will raise a KeyError. Use .get("items", []) to handle this case safely.

  for mig in mig_list.get("items", []):

community/modules/management/helm-upgrade/main.tf (36)

security-medium medium

To adhere to the repository's security guidelines and prevent potential command injection or shell metacharacter splitting, always wrap variables and interpolated strings in double quotes instead of single quotes when executing shell commands via local-exec.

        ${join(" ", [for v in var.set_values : "--set \"${v.name}=${v.value}\""])}

community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/util.py (2078)

medium

To enforce defensive programming and prevent potential division-by-zero errors when calculating cores_per_socket, ensure that threads_per_core is guaranteed to be at least 1.

        threads_per_core = max(1, getThreadsPerCore(template))

@LAVEEN LAVEEN changed the title Upgrading Rocky8 plain images to Rocky9 Updating Blueprints for Rocky8 plain images to Rocky9 Jun 8, 2026
@LAVEEN LAVEEN changed the title Updating Blueprints for Rocky8 plain images to Rocky9 Updating from Rocky8 plain images to Rocky9 Jun 8, 2026
@LAVEEN LAVEEN marked this pull request as ready for review June 9, 2026 08:44
@LAVEEN LAVEEN requested a review from a team as a code owner June 9, 2026 08:44
@sudheer-quad sudheer-quad merged commit a9d48cd into GoogleCloudPlatform:develop Jun 9, 2026
18 of 85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-improvements Added to release notes under the "Improvements" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants