Project

General

Profile

Actions

Question #7218

closed

3 x /opt/rudder/bin/perl process at the same time

Added by Francois BAYART over 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
2
Category:
Agent
Target version:
-
Regression:

Description

I thought it was not possible to have more than one "rudder-agent" at the same time, but my "ps fax" said it's possible. As you know my nodes are very light (RAM 512Mo, single ARM core) so complex perl script are not my friend.

This processes (below) were on the same time, the first come from my own command in crontab where I run "rudder agent run", the 2 others are the official rudder processes.

In resume 3 perl process for inventory in the same time...

7912 ?        Ss     0:00      \_ /bin/sh -c PYTHONPATH=/usr/local/lib/python3.4/site-packages/ /usr/bin/python3 /usr/local/lib/python3.4/site-packages/amoobiptc/main.py | /usr/bin/logger -t PTC
7915 ? S 0:09 \_ /usr/bin/python3 /usr/local/lib/python3.4/site-packages/amoobiptc/main.py
7986 ? S 0:00 | \_ /bin/sh /opt/rudder/share/commands/agent-run
7998 ? S 0:04 | \_ /var/rudder/cfengine-community/bin/cf-agent -KC
8679 ? S 0:00 | \_ sh -c /opt/rudder/bin/run-inventory --version | /bin/grep '[0-9]\.[0-9]' | /bin/sed 's%.*(\([0-9]\+\)\.\([0-9]\+\).*).*%\1\2%'
8680 ? S 0:00 | \_ /bin/sh /opt/rudder/bin/run-inventory --version
8689 ? R 0:03 | | \_ /opt/rudder/bin/perl -I /opt/rudder/lib/perl5 /opt/rudder/bin/fusioninventory-agent --config=none --version
8681 ? S 0:00 | \_ /bin/grep [0-9]\.[0-9]
8682 ? S 0:00 | \_ /bin/sed s%.*(\([0-9]\+\)\.\([0-9]\+\).*).*%\1\2%
7916 ? S 0:00 \_ /usr/bin/logger -t PTC
4113 ?        Ss     0:09 /var/rudder/cfengine-community/bin/cf-serverd
9032 ? S 0:00 \_ sh -c "/var/rudder/cfengine-community/bin/cf-promises" -c "/var/rudder/cfengine-community/inputs/promises.cf"
9033 ? S 0:04 \_ /var/rudder/cfengine-community/bin/cf-promises -c /var/rudder/cfengine-community/inputs/promises.cf
9207 ? S 0:00 \_ sh -c /opt/rudder/bin/run-inventory --version | /bin/grep '[0-9]\.[0-9]' | /bin/sed 's%.*(\([0-9]\+\)\.\([0-9]\+\).*).*%\1\2%'
9208 ? S 0:00 \_ /bin/sh /opt/rudder/bin/run-inventory --version
9218 ? R 0:05 | \_ /opt/rudder/bin/perl -I /opt/rudder/lib/perl5 /opt/rudder/bin/fusioninventory-agent --config=none --version
9209 ? S 0:00 \_ /bin/grep [0-9]\.[0-9]
9210 ? S 0:00 \_ /bin/sed s%.*(\([0-9]\+\)\.\([0-9]\+\).*).*%\1\2%
4118 ? Ss 0:07 /var/rudder/cfengine-community/bin/cf-execd
8691 ? S 0:00 \_ sh -c "/var/rudder/cfengine-community/bin/cf-promises" -c "/var/rudder/cfengine-community/inputs/promises.cf"
8692 ? S 0:13 \_ /var/rudder/cfengine-community/bin/cf-promises -c /var/rudder/cfengine-community/inputs/promises.cf
9219 ? S 0:00 \_ sh -c /opt/rudder/bin/run-inventory --version | /bin/grep '[0-9]\.[0-9]' | /bin/sed 's%.*(\([0-9]\+\)\.\([0-9]\+\).*).*%\1\2%'
9220 ? S 0:00 \_ /bin/sh /opt/rudder/bin/run-inventory --version
9229 ? R 0:05 | \_ /opt/rudder/bin/perl -I /opt/rudder/lib/perl5 /opt/rudder/bin/fusioninventory-agent --config=none --version
9221 ? S 0:00 \_ /bin/grep [0-9]\.[0-9]
9222 ? S 0:00 \_ /bin/sed s%.*(\([0-9]\+\)\.\([0-9]\+\).*).*%\1\2%
Actions #1

Updated by Matthieu CERDA over 8 years ago

  • Assignee set to Benoît PECCATTE
  • Priority changed from N/A to 2

Thanks for the report François !

Giving to BPE for evaluation !

Actions #2

Updated by Benoît PECCATTE over 8 years ago

  • Assignee changed from Benoît PECCATTE to Francois BAYART

Thee reasons here:

  • the last one is the one that is launched normally once a day
  • the second one is just a call used to retrieve the version (since it could have been provided by the system and old versions have some specific parameters)
    this one is done in the system technique in inventory/1.0/fusionAgent.st line 176
  • The first one is due to the fact that rudder agent run is a command that remove lock detection, since it has been made for people who want to force a run, so it ignores the fact that there is another one currently running

Maybe we should add an option to rudder agent to change this behavior.

What do you think ?

Actions #3

Updated by Benoît PECCATTE almost 8 years ago

  • Status changed from New to Resolved

Question answered a long time ago, feel free to reopen if something is still missing

Actions

Also available in: Atom PDF