Project

General

Profile

Actions

Bug #14391

closed

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

Added by François ARMAND almost 6 years ago. Updated over 5 years ago.

Status:
Released
Priority:
N/A
Category:
System integration
Target version:
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.


Related issues 2 (0 open2 closed)

Related to Rudder - User story #14403: When running Rudder through applyConfig API on the root server, tmp directory is not the system oneReleasedFrançois ARMANDActions
Related to Rudder - Bug #14551: Remote run is broken on centos7 because of selinuxRejectedActions
Actions #1

Updated by Alexis Mousset almost 6 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
Actions #2

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

Updated by François ARMAND almost 6 years ago

  • Status changed from New to In progress
Actions #4

Updated by François ARMAND almost 6 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
Actions #5

Updated by François ARMAND almost 6 years ago

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

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.

Actions #7

Updated by François ARMAND over 5 years ago

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

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
Actions #9

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
Actions #10

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.

Actions

Also available in: Atom PDF