Project

General

Profile

Bug #14391

Only one Node below a Rudder server can be run through remote run API

Added by François ARMAND 3 months ago. Updated about 1 month ago.

Status:
Released
Priority:
N/A
Category:
System integration
Target version:
Severity:
User visibility:
Effort required:
Priority:
0

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.


Related issues

Related to Rudder - Bug #14403: When running Rudder through applyConfig API on the root server, tmp directory is not the system oneNewActions
Related to Rudder - Bug #14551: Remote run is broken on centos7 because of selinuxNewActions

Associated revisions

Revision ee204140 (diff)
Added by François ARMAND 3 months ago

Fixes #14391: Policy generation hook \"60-trigger-node-update\" only works on the first node of the list

History

#1

Updated by Alexis MOUSSET 3 months ago

  • Related to Bug #14403: When running Rudder through applyConfig API on the root server, tmp directory is not the system one added
#2

Updated by François ARMAND 3 months 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
#3

Updated by François ARMAND 3 months ago

  • Status changed from New to In progress
#4

Updated by François ARMAND 3 months 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
#5

Updated by François ARMAND 3 months ago

  • Status changed from Pending technical review to Pending release
#6

Updated by François ARMAND about 2 months 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.

#7

Updated by François ARMAND about 2 months ago

  • Related to Bug #14551: Remote run is broken on centos7 because of selinux added
#8

Updated by Vincent MEMBRÉ about 1 month 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
#9

Updated by Vincent MEMBRÉ about 1 month 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
#10

Updated by Vincent MEMBRÉ about 1 month 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.

Also available in: Atom PDF