Actions
Bug #14391
closedOnly one Node below a Rudder server can be run through remote run API
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:
Description
The hook /opt/rudder/etc/hooks.d/policy-generation-finished/60-trigger-node-update does not work when root is on the list (or at least, not for nodes after root).
Reproduce: get a node id, then:
- on node: watch rudder agent history n 2 on root:
export RUDDER_NUMBER_NODES_UPDATED="1" export RUDDER_NODE_IDS="f9c44f97-ff95-4e92-ab47-355513c0445e" /opt/rudder/etc/hooks.d/policy-generation-finished/60-trigger-node-update> works!
export RUDDER_NUMBER_NODES_UPDATED="2" export RUDDER_NODE_IDS="root f9c44f97-ff95-4e92-ab47-355513c0445e" /opt/rudder/etc/hooks.d/policy-generation-finished/60-trigger-node-update> trigger not fired.
And:
export RUDDER_NUMBER_NODES_UPDATED="1" export RUDDER_NODE_IDS="root" /opt/rudder/etc/hooks.d/policy-generation-finished/60-trigger-node-update
==> run not started on root.
What is even more surprising is that (and I have witness): if I directly start the remore run for root in interactive with output visible, with:
curl -X POST http://localhost/rudder/relay-api/remote-run/nodes -d 'asynchronous=false' -d 'keep_output=true' -d "nodes=root"
I do have what seems to be an run, but it does not actually do anything (I tested with a "touch" on a file: with the remote run by curl, the file is not created. With "rudder agent run -u", the file is created). Yep.
And more strange: I do have the report appearing in the output of curl, that's just mystic.
Actions