KillingSpark / rustysd

A service manager that is able to run "traditional" systemd services, written in rust
MIT License
495 stars 15 forks source link

Missing control commands #39

Open KillingSpark opened 4 years ago

KillingSpark commented 4 years ago

This is a list of control commands that I think should be supported in the future. Some of these are straight forward, and only miss code in the control interface parts. Others need more code / changes to the code that manipulates the unit set.

Start/stop differences

Starting and stopping of units currently behaves differently with respect to how unsatisfied dependencies are handled.

  1. Starting units: Currently the user has to start units one by one themselves
  2. Stopping units: Currently stopping a unit will always stop all units that depend on it.

These should have two extra commands which should make the semantics clearer:

  1. stop
  2. stop-all
  3. start
  4. start-all

Start newly loaded units

After reloading units, there should be a way to start all units, that have never been started.

  1. start-all-new

General queries about possible consequences of actions

Additionally there should be more queries available

  1. To start unit A, which other units need to be started
  2. To stop unit A, which other units need to be stopped
  3. To remove unit A, which other units need to be removed
  4. To remove unit A, which other units need to be stopped
KillingSpark commented 4 years ago

Stop and restart now behave consistently, only starting/stopping one unit, or reporting an error that explains why the operation cannot be done. Recursively starting only some units needs some work, the current code walks the whole unit-graph which might be undesirable.

The queries only need a little refactoring and then should be trivially supportable by the control interface.

KillingSpark commented 4 years ago

with 1d7d1279aaf686393598a5fd6f181f12b07e36e7 the whole start/stop differences section should be done.