Fix(slurm): resolve KeyError control_host in slurmdbd config templates#5765
Conversation
Summary of ChangesHello, 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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
1007a7e
into
GoogleCloudPlatform:release-candidate
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.confbecause 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, theinstall_slurmdbd_conffunction attempts to format theslurmdbd_conf_tpltemplate using.format(**conf_options). Since the template contains the{control_host}placeholder, but "control_host" was omitted from the localconf_optionsdictionary, aPython KeyError: 'control_host'was thrown.This error halted the setup scripts midway, preventing
slurmctldfrom starting and causing overall integration tests (such as htc-slurm-v6) to fail under Cloud Build.Fix Applied
Added the
"control_host": lkp.control_hostkey-value pair to the localconf_optionsdictionary inside theinstall_slurmdbd_conffunction inconf.py. This ensures that all required placeholders inslurmdbd_conf_tplrender successfully on controller bootstrap.