system.shutdown unusable #7833
Labels
Bug
broken, incorrect, or confusing behavior
fixed-pls-verify
fix is linked, bug author to confirm fix
help-wanted
Community help is needed to resolve this
severity-low
4th level, cosemtic problems, work around exists
Milestone
The system.shutdown execution module looks unusable in its current form on probably any GNU/Linux distribution.
Looking at salt/modules/system.py, the 'shutdown' command is called without any provision for user-specified parameters. It doesn't have '-h now' hard-coded either.
Happy to supply a patch (which would likely be trivial), but I'm not sure which approach was intended. I see we have support for 'halt' (which is generally effectively the same as "shutdown -h now", so I guess supporting parameters is the way to go.
However, if adding parameters for shutdown, why not add them to halt, reboot, etc as well? Having them only for shutdown would seem inconsistent. Then again, if you're accepting parameters, is there actually any advantage to calling:
salt 'some-instance' system.shutdown -h now
over
salt 'some-instance' cmd.run shutdown -h now
(other than having to type one character less)? Maybe it can all disappear?
In short, it doesn't work currently, but I don't know how you would like to see it fixed. :)
The text was updated successfully, but these errors were encountered: