Bug #14391
closedOnly one Node below a Rudder server can be run through remote run API
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.
Updated by Alexis Mousset over 5 years ago
- Related to User story #14403: When running Rudder through applyConfig API on the root server, tmp directory is not the system one added
Updated by François ARMAND over 5 years ago
- Subject changed from Policy generation hook "60-trigger-node-update" does not work when root is in the list of updated nodes to Policy generation hook "60-trigger-node-update" only works on the first node of the list
- Assignee set to François ARMAND
- Target version set to 4.1.21
Updated by François ARMAND over 5 years ago
- Status changed from New to In progress
Updated by François ARMAND over 5 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Alexis Mousset
- Pull Request set to https://github.com/Normation/rudder-packages/pull/1807
Updated by François ARMAND over 5 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-packages|ee204140027bbf1d1848cea0d4de4ab4f5502f08.
Updated by François ARMAND over 5 years ago
- Subject changed from Policy generation hook "60-trigger-node-update" only works on the first node of the list to API remote run only works on the first node of a list
The problem was on a python script that was only processing first item of a list.
Updated by François ARMAND over 5 years ago
- Related to Bug #14551: Remote run is broken on centos7 because of selinux added
Updated by Vincent MEMBRÉ over 5 years ago
- Subject changed from API remote run only works on the first node of a list to API remote run works only on one Node of a Rudder server
Updated by Vincent MEMBRÉ over 5 years ago
- Subject changed from API remote run works only on one Node of a Rudder server to Only one Node below a Rudder server can be run through remote run API
Updated by Vincent MEMBRÉ over 5 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 4.1.21, 4.3.11 and 5.0.9 which were released today.