Bug #7238
closedservice rudder-agent stop -> stay running
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 !
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'?
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
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.0.16 to 3.0.17
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.0.17 to 302
Updated by Alexis Mousset over 8 years ago
- Target version changed from 302 to 3.1.12
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.1.12 to 3.1.13
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.13 to 3.1.14
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.14 to 3.1.15
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.15 to 3.1.16
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.16 to 3.1.17
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.17 to 3.1.18
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.18 to 3.1.19
Updated by Jonathan CLARKE over 7 years ago
- User visibility set to Getting started - demo | first install | level 1 Techniques
- Priority set to 0
Updated by François ARMAND over 7 years ago
- Severity set to Major - prevents use of part of Rudder | no simple workaround
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.19 to 3.1.20
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.