charmed-hpc / hpc-libs

A collection of charm libraries for authoring HPC charms 📖🖋️
https://charmhub.io/hpc-libs
Apache License 2.0
0 stars 3 forks source link

[Enhancement]: Add `scontrol` function that calls scontrol on host #29

Closed NucciTheBoss closed 1 month ago

NucciTheBoss commented 1 month ago

The slurmctld operator relies on scontrol for various operations such as triggering the reload of the Slurm configuration without being required to hard restart the slurmctld service.

It can be a simple method definition like we have for systemctl, mungectl, and snap, and raise SlurmOpsError if there are any issues encountered when performing operations on Slurm.

NucciTheBoss commented 1 month ago

scontrol is also already aliased as well by the Slurm snap so we don't need to worry about the slurm.scontrol vs scontrol difference.