Open ava-affine opened 1 week ago
Does this apply to multiple instances on the host where unitctl
is executed, or to multiple instances over a network?
It should apply for any control socket that unitctl can reach.
At the moment unitctl
knows how to access control sockets over TCP and via a file socket.
If the user sets up some number of proxies for instances over the network then we shouldn't refuse to operate on them.
Just want to drop a quick note here on implementation:
Currently the CLI has a global flag for specifying a control socket when there are multiple Unit instances detected. This needs to be refactored to accept either a single socket or a list of sockets.
Additionally, code will be needed in main.rs to apply the specified cli command to each provided control socket. Perhaps socket should be an argument to each command in the cmd submodule. Existing commands should be checked to make sure that they arent manually handling the control socket flag.
unitctl import
andunitctl execute
should be able to send configuration snippets to a configurable list of Unit instances. Currently when multiple Unit instances exist on a hostunitctl
will ask for clarification on which control socket/endpoint to use. This should be extended to support a list. Under no circumstances shouldunitctl
automatically broadcast to many Unit instances without a specific invocation from the user.