Skip to content

Conversation

@hehe7318
Copy link
Contributor

Description of changes

  • Give systemctl poweroff --force the sudoer permission to fix the ubuntu24 self termination issue

Checklist

  • Make sure you are pointing to the right branch.
  • If you're creating a patch for a branch other than develop add the branch name as prefix in the PR title (e.g. [release-3.6]).
  • Check all commits' messages are clear, describing what and why vs how.
  • Make sure to have added unit tests or integration tests to cover the new/modified code.
  • Check if documentation is impacted by this change.

Please review the guidelines for contributing and Pull Request Instructions.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hehe7318 hehe7318 requested review from a team as code owners May 21, 2025 22:36
@hehe7318 hehe7318 enabled auto-merge (squash) May 21, 2025 22:42
Cmnd_Alias SLURM_COMMANDS = <%= node['cluster']['slurm']['install_dir'] %>/bin/scontrol, <%= node['cluster']['slurm']['install_dir'] %>/bin/sinfo
Cmnd_Alias SLURM_HOOKS_COMMANDS = <%= node_virtualenv_path %>/bin/slurm_suspend, <%= node_virtualenv_path %>/bin/slurm_resume, <%= node_virtualenv_path %>/bin/slurm_fleet_status_manager
Cmnd_Alias SHUTDOWN = /usr/sbin/shutdown
Cmnd_Alias SYSTEMCTL_POWEROFF = /usr/bin/systemctl poweroff --force
Copy link
Contributor

Choose a reason for hiding this comment

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

I have verified that there is no risk for privilege escalation, i.e. the user can only execute the precisely specified command, cannot even add extra options.

So the change is safe from a security standpoint.

Cmnd_Alias SLURM_COMMANDS = <%= node['cluster']['slurm']['install_dir'] %>/bin/scontrol, <%= node['cluster']['slurm']['install_dir'] %>/bin/sinfo
Cmnd_Alias SLURM_HOOKS_COMMANDS = <%= node_virtualenv_path %>/bin/slurm_suspend, <%= node_virtualenv_path %>/bin/slurm_resume, <%= node_virtualenv_path %>/bin/slurm_fleet_status_manager
Cmnd_Alias SHUTDOWN = /usr/sbin/shutdown
Cmnd_Alias SYSTEMCTL_POWEROFF = /usr/bin/systemctl poweroff --force
Copy link
Contributor

@gmarciani gmarciani May 27, 2025

Choose a reason for hiding this comment

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

The respective test must be adapted. I will add it in a dedicated PR

@hehe7318 hehe7318 merged commit cc2aeb2 into aws:release-3.13 May 27, 2025
35 of 41 checks passed
gmarciani added a commit to gmarciani/aws-parallelcluster-cookbook that referenced this pull request May 28, 2025
…ubuntu24 self termination issue (aws#2959)"

This reverts commit cc2aeb2.
gmarciani added a commit that referenced this pull request May 28, 2025
…ubuntu24 self termination issue (#2959)"

This reverts commit cc2aeb2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants