Project

General

Profile

Actions

Bug #7238

closed

service rudder-agent stop -> stay running

Added by Francois BAYART about 9 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Agent
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

I had a doubt with "service rudder-agent stop" so I made a simple test : try "service rudder-agent stop" during cf-execd is running.

step1 wait to have cf-execd running
like this :
20580 ? Ssl 0:00 /var/rudder/cfengine-community/bin/cf-execd
20666 ? S 0:00 \_ sh -c "/var/rudder/cfengine-community/bin/cf-agent" -f failsafe.cf && "/var/rudder/cfengi
20667 ? S 0:00 \_ /var/rudder/cfengine-community/bin/cf-agent -f failsafe.cf

step 2 run service rudder-agent stop
root@pv2-971de:~# service rudder-agent stop
rudder-agent20682: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent20685: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent20686: [INFO] Halting CFEngine Community cf-serverd...
rudder-agent20690: [OK] CFEngine Community cf-serverd stopped after 2 seconds
rudder-agent20691: [INFO] Halting CFEngine Community cf-execd...
rudder-agent20726: [OK] CFEngine Community cf-execd stopped after 13 seconds

All is okay ! ...

step 3 observe cf-execd
20666 ? S 0:00 sh -c "/var/rudder/cfengine-community/bin/cf-agent" -f failsafe.cf && "/var/rudder/cfengine-c
20667 ? Rs 0:01 \_ /var/rudder/cfengine-community/bin/cf-agent -f failsafe.cf

step4 observe cf-execd run cf-serverd
20666 ? S 0:00 sh -c "/var/rudder/cfengine-community/bin/cf-agent" -f failsafe.cf && "/var/rudder/cfengine-c
20736 ? Ss 0:06 \_ /var/rudder/cfengine-community/bin/cf-agent -Dfrom_cfexecd
20910 ? S 0:00 \_ /var/rudder/cfengine-community/bin/cf-serverd

+wait ... and +

20666 ? S 0:00 sh -c "/var/rudder/cfengine-community/bin/cf-agent" -f failsafe.cf && "/var/rudder/cfengine-c
20736 ? Ss 0:06 \_ /var/rudder/cfengine-community/bin/cf-agent -Dfrom_cfexecd
21068 ? S 0:00 \_ /var/rudder/cfengine-community/bin/cf-execd
21067 ? Ss 0:00 /var/rudder/cfengine-community/bin/cf-serverd <== welcome back my friend

step5 observe cf-execd run cf-execd
if you have good eyes you have see PID 21068 in the previous step

21067 ? Ss 0:00 /var/rudder/cfengine-community/bin/cf-serverd
21227 ? Ss 0:00 /var/rudder/cfengine-community/bin/cf-execd <== welcome back Sir !

Actions #1

Updated by Vincent MEMBRÉ about 9 years ago

  • Assignee set to Matthieu CERDA

I think it is launched again by rudder-agent cron, to prevent any launch you should use rudder-agent disable command (who puts a flag file /opt/rudder/etc/diabled-agent file, preventin g agent startup)

Mathieu, what do you think of that issue ?

Do have any more idea about why rudder-agent is still running (5 min delay) after it was 'stopped'?

Actions #2

Updated by Francois BAYART about 9 years ago

Vincent MEMBRÉ wrote:

I think it is launched again by rudder-agent cron, to prevent any launch you should use rudder-agent disable command (who puts a flag file /opt/rudder/etc/diabled-agent file, preventin g agent startup)

Mathieu, what do you think of that issue ?

Do have any more idea about why rudder-agent is still running (5 min delay) after it was 'stopped'?

My fix for this issue and #7237
https://gist.github.com/frbayart/4e1bf257690ba2298460

Actions #3

Updated by Benoît PECCATTE over 8 years ago

  • Target version set to 3.0.16
Actions #4

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 3.0.16 to 3.0.17
Actions #5

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 3.0.17 to 302
Actions #6

Updated by Alexis Mousset over 8 years ago

  • Target version changed from 302 to 3.1.12
Actions #7

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 3.1.12 to 3.1.13
Actions #8

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 3.1.13 to 3.1.14
Actions #9

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.14 to 3.1.15
Actions #10

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.15 to 3.1.16
Actions #11

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.16 to 3.1.17
Actions #12

Updated by Benoît PECCATTE about 8 years ago

  • Assignee deleted (Matthieu CERDA)
Actions #13

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.17 to 3.1.18
Actions #14

Updated by Vincent MEMBRÉ almost 8 years ago

  • Target version changed from 3.1.18 to 3.1.19
Actions #15

Updated by Jonathan CLARKE over 7 years ago

  • User visibility set to Getting started - demo | first install | level 1 Techniques
  • Priority set to 0
Actions #16

Updated by François ARMAND over 7 years ago

  • Severity set to Major - prevents use of part of Rudder | no simple workaround
Actions #17

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.19 to 3.1.20
Actions #18

Updated by Alexis Mousset over 7 years ago

  • Status changed from New to Rejected

We removed the management of cf-execd and cf-serverd from system techniques so this will not happen again (in 4.0+), Closing.

The cron job will still try to restart them though (but it is the intended behavior, you you disable the agent to prevent it from starting.

Actions

Also available in: Atom PDF