User story #9290
Add an API endpoint to call rudder-remote-run
We want to be able to call rudder-remote-run from API, with a class parameter.
The first version will be limited to nodes directlyreachable from the root server (i.e: nodes behind a relay can't get the command, and we must return an error for them).
There is actually two endpoints to do:
- one synchrone, which is directed to ONE node with a class parameter, start rudder-remote-run, wait for the execution, and send the command output in the API call answer. So API call is blocking, and can block for long time. The output may not be streamed - it would be better, but it is not mandatory
- one asynchrone, that only take the class parameter as argument, and start the command on all node directly under the server, but just send back a "ACK, I started rudder-remote-run on these nodes".
The second method would be better if it can akso take a group id as parameter, and return which nodes didn't get the command (because for ex. behind a relay).
The second method is not prioritary and can be made in an other ticket.
#3 Updated by Vincent MEMBRÉ over 1 year ago
Work in progess here: https://github.com/VinceMacBuche/rudder/commit/018e410bb3ee457425b8a1743819f79c9e4425bf
#4 Updated by Vincent MEMBRÉ over 1 year ago
Work in progess here: https://github.com/VinceMacBuche/rudder/commit/312f2681a3c779b4de823a4e53d72c207ed2f6e9