Skip to content

Fix(slurm): resolve KeyError control_host in slurmdbd config templates#5765

Merged
SwarnaBharathiMantena merged 1 commit into
GoogleCloudPlatform:release-candidatefrom
SwarnaBharathiMantena:swarnabm/htc_slurm_munge_validation_2
Jun 11, 2026
Merged

Fix(slurm): resolve KeyError control_host in slurmdbd config templates#5765
SwarnaBharathiMantena merged 1 commit into
GoogleCloudPlatform:release-candidatefrom
SwarnaBharathiMantena:swarnabm/htc_slurm_munge_validation_2

Conversation

@SwarnaBharathiMantena

Copy link
Copy Markdown
Contributor

Description

This PR resolves a template rendering bug in the SchedMD Slurm v6 controller startup setup. During cluster provisioning, the Slurm Database Daemon setup failed to compile slurmdbd.conf because the {control_host} formatting key was missing from the configuration options context, causing the automated cluster deployment tests to abort.

Root Cause

In modules/scheduler/schedmd-slurm-gcp-v6-controller/files/conf.py, the install_slurmdbd_conf function attempts to format the slurmdbd_conf_tpl template using .format(**conf_options). Since the template contains the {control_host} placeholder, but "control_host" was omitted from the local conf_options dictionary, a Python KeyError: 'control_host' was thrown.

This error halted the setup scripts midway, preventing slurmctld from starting and causing overall integration tests (such as htc-slurm-v6) to fail under Cloud Build.

Fix Applied

Added the "control_host": lkp.control_host key-value pair to the local conf_options dictionary inside the install_slurmdbd_conf function in conf.py. This ensures that all required placeholders in slurmdbd_conf_tpl render successfully on controller bootstrap.

@SwarnaBharathiMantena SwarnaBharathiMantena requested a review from a team as a code owner June 11, 2026 06:44
@SwarnaBharathiMantena SwarnaBharathiMantena added the release-bugfix Added to release notes under the "Bug fixes" heading. label Jun 11, 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 addresses a template rendering failure during the provisioning of the SchedMD Slurm v6 controller. By ensuring the 'control_host' variable is correctly passed to the configuration template, the fix prevents runtime errors that previously halted the Slurm Database Daemon setup and caused automated integration tests to fail.

Highlights

  • Bug Fix: Resolved a KeyError in the Slurm Database Daemon configuration template rendering process.
  • Configuration Update: Added the missing 'control_host' key to the configuration options dictionary in the install_slurmdbd_conf function.
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 install_slurmdbd_conf function in conf.py to include the control_host key, mapped to lkp.control_host, within the conf_options dictionary. No review comments were provided, and I have no feedback to provide as the change is correct and straightforward.

@SwarnaBharathiMantena SwarnaBharathiMantena merged commit 1007a7e into GoogleCloudPlatform:release-candidate Jun 11, 2026
21 of 83 checks passed
mikhailpovolotskiy pushed a commit to mikhailpovolotskiy/cluster-toolkit that referenced this pull request Jun 14, 2026
ksaishree pushed a commit to ksaishree/cluster-toolkit that referenced this pull request Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-bugfix Added to release notes under the "Bug fixes" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants