Skip to content

Conversation

@thomasbeaudry
Copy link
Collaborator

@thomasbeaudry thomasbeaudry commented Jul 5, 2025

Summary by CodeRabbit

  • New Features

    • Added a new default configuration for workstation nodes.
    • Introduced a new user servers group with role attributes in the inventory.
  • Bug Fixes

    • Updated host IP and name mappings in the hosts template.
  • Chores

    • Upgraded Slurm to version 24.05.1.
    • Updated Slurmd configuration options for compute and workstation nodes.
    • Expanded and reorganized inventory groups and hosts.
    • Enabled Slurm-related tasks in automation scripts.
    • Improved Slurm service configuration for resource management and scheduling.

@coderabbitai
Copy link

coderabbitai bot commented Jul 5, 2025

Walkthrough

This update revises Slurmd configuration files, updates host inventory and templates, introduces a new workstation config, and modifies Ansible tasks for role-based config deployment. The Slurm version is upgraded to 24.05.1, and the systemd service is tuned for process priority. Host groupings and attributes are also reorganized.

Changes

File(s) Change Summary
files/default.slurmd.computenode Updated SLURMD_OPTIONS: new conf-server, node features, and weight parameters.
files/default.slurmd.workstation Added: new default Slurmd config for workstations with specific options and comments.
inventory Hosts reorganized; new workstations, computenodes, and userservers group with attributes added.
roles/common/tasks/main.yml Uncommented import of slurm.yml tasks, activating Slurm-related automation.
roles/common/tasks/slurm.yml Added libncurses6 dependency, privilege escalation, conditional config deployment, and systemd ExecStart tuning.
roles/common/templates/hosts.j2 Updated host entry: IP now maps to dnpus01.douglas.rtss.qc.ca instead of cicus04.
vars/slurm.yml Upgraded slurm_version from 23.02.2 to 24.05.1.

Sequence Diagram(s)

sequenceDiagram
    participant Ansible
    participant Host
    participant Systemd

    Ansible->>Host: Detect group (workstations/computenodes)
    Ansible->>Host: Copy respective slurmd config file
    Ansible->>Host: Install dependencies (incl. libncurses6)
    Ansible->>Host: Update slurmd.service ExecStart (nice -n 19)
    Ansible->>Systemd: Restart slurmd service
    Host->>Systemd: slurmd starts with new config and priority
Loading

Poem

Slurm marches on with version anew,
Nodes and workstations, configs in queue.
Hosts reshuffled, priorities set high,
With Ansible’s touch, the clusters comply.
Compute and control, all finely tuned—
In this update, harmony’s resumed!
🚀


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
roles/common/tasks/main.yml (1)

18-18: Gate the Slurm role to the relevant host groups

Importing slurm.yml unconditionally will run Slurm setup on every host that receives the common role—workstations, user-servers, but also nodes where Slurm is not expected (e.g. bastion, storage).
Add a when: guard (or apply the role only to computenodes, workstations, userservers) to avoid needless package installs and long playbook runs.

- {import_tasks: slurm.yml, tags: slurm}
+ {import_tasks: slurm.yml, tags: slurm, when: "'slurm' in group_names"}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c0b666e and 9b3a800.

📒 Files selected for processing (7)
  • files/default.slurmd.computenode (1 hunks)
  • files/default.slurmd.workstation (1 hunks)
  • inventory (2 hunks)
  • roles/common/tasks/main.yml (1 hunks)
  • roles/common/tasks/slurm.yml (3 hunks)
  • roles/common/templates/hosts.j2 (1 hunks)
  • vars/slurm.yml (1 hunks)
🔇 Additional comments (13)
roles/common/templates/hosts.j2 (1)

30-36: Ensure all aliases & IPMI rows reflect the new hostname

You replaced cicus04 with dnpus01 on the main row, but the IPMI/-mgmt entry on line 36 still references cicus04-mgmt. Verify that:

  1. The management address is correct for dnpus01.
  2. There are no stale cicus04 aliases elsewhere that could confuse name resolution.

A mismatched /etc/hosts pair can break tools that rely on deterministic forward/reverse look-ups.

vars/slurm.yml (1)

1-1: Confirm compatibility before jumping to Slurm 24.05.1

24.x introduces cgroup-v2 & burst-buffer changes. Make sure:
• Munge, plugins and accounting DB are upgraded in lock-step.
• Config syntax (e.g. SchedulerParameters) didn’t deprecate options you still set elsewhere.

If you haven’t run a dry-run cluster upgrade, do so before merging.

files/default.slurmd.computenode (1)

11-11: Verify the --conf string syntax

Slurmd expects comma-separated key-value pairs (no spaces).
'Feature=computenode Weight=1' might be parsed as two arguments and fail to override node attributes.

-SLURMD_OPTIONS="-Z --conf-server dnpus01.douglas.rtss.qc.ca --conf 'Feature=computenode Weight=1'"
+SLURMD_OPTIONS="-Z --conf-server dnpus01.douglas.rtss.qc.ca --conf 'Feature=computenode,Weight=1'"

Test with slurmd -C on a node before rolling cluster-wide.

files/default.slurmd.workstation (1)

11-11: Possible parsing issue in workstation override

Same spacing problem as the compute config:

-SLURMD_OPTIONS="-Z --conf-server dnpus01.douglas.rtss.qc.ca --conf 'Gres=gpu:geforce Feature=workstation Weight=50'"
+SLURMD_OPTIONS="-Z --conf-server dnpus01.douglas.rtss.qc.ca --conf 'Gres=gpu:geforce,Feature=workstation,Weight=50'"

Without the commas, Slurmd may ignore everything after the first space. Confirm on a test workstation.

inventory (4)

22-22: New workstation added.

Addition looks correct and follows naming convention.


69-70: Host additions and reorganization.

The additions of dnpws26 and repositioning of cichm01 are consistent with the inventory structure.


73-77: New compute nodes added.

The addition of ciccs01 through ciccs05 follows the existing naming pattern and aligns with the Slurm configuration updates.


84-86: New userservers group with NIS roles.

The userservers group with master/slave NIS roles is well-structured and aligns with the updated Slurm configuration that references these servers.

roles/common/tasks/slurm.yml (5)

23-23: Added libncurses6 dependency.

Good addition to ensure all required dependencies are installed.


40-40: Added privilege escalation for file check.

Correct addition since checking system files may require elevated privileges.


107-119: Conditional configuration deployment by node type.

Excellent implementation of role-based configuration. The conditional copying based on group membership ensures appropriate slurmd configuration for workstations and compute nodes.


124-130: Added nice value tuning for slurmd process.

The nice value of 19 sets lowest priority for slurmd, which may impact daemon responsiveness. Verify this is the intended behavior for your workload requirements.


134-135: Added execstart tag for selective execution.

Good practice to enable targeted task execution during deployment.

Copy link
Contributor

Choose a reason for hiding this comment

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

why did the (encrypted) munge key get removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it wasn't removed, but it's different from the one that's in the playbook (I did a diff on the munge.keys = and saw that they were different when i was refactoring this PR since i had to remove a bunch of stuff).

- name: enable slurmd
systemd: state=restarted enabled=true name=slurmd daemon_reload=yes
tags:
- execstart
Copy link
Contributor

Choose a reason for hiding this comment

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

better tag here with slurm?

@gdevenyi
Copy link
Contributor

gdevenyi commented Jul 7, 2025

Take a look at https://github.com/ottok/debcraft

I was able to very easily build deb files which we can use to make our own repo, just download, unpack and it does the rest (uses docker)

DEB_BUILD_OPTIONS="parallel=12" ./debcraft/debcraft.sh build --pull --clean --skip-sources --distribution noble slurm-24.11.5/

Just need to figure out which deb files we need for our setup since it builds lots of stuff.

@thomasbeaudry
Copy link
Collaborator Author

Take a look at https://github.com/ottok/debcraft

I was able to very easily build deb files which we can use to make our own repo, just download, unpack and it does the rest (uses docker)

DEB_BUILD_OPTIONS="parallel=12" ./debcraft/debcraft.sh build --pull --clean --skip-sources --distribution noble slurm-24.11.5/

Just need to figure out which deb files we need for our setup since it builds lots of stuff.

cool will do

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.

3 participants