Forum: Cfengine Help
Subject: CFEngine hang on a custom service restart
Author: yrouxel
Link to topic: https://cfengine.com/forum/read.php?3,20265,20265#msg-20265
Hello,
I am using cfegine 3.0.5p1 on CentOS 5.5.
We have developped a specific service to be installed through a rpm package on
a CentoOS host. The package installation and configuration files specification
run fine, but when it comes to the command section restarting the service the
package has installed, cf-agent hangs on the restart command line, once the
process has started.
commands :
guichet_bas_configured_ok::
"/sbin/service guichet-bas restart";
It is as if the command line never returns. Furthermore, As cf-agent is
hanging, I can verify that the service is correctly started. To finish the
cf-agent execution, I must kill it explicitly through a kill command as a a
ctrl-C key stroke does not work. The service is killed with cf-agent.
Of course, when executed in bash shell, this command line works fine, and the
service is correctly started when the command returns.
The promises file is launched through a cf-agent -Kvf guichet.cf command.
In the log the last line is :
cf3 -> Excuting '/sbin/service guichet-bas restart' ... (timeout= ....)
cf3 -> (Setting umask to 77)
Setting explicitly the umask and a timeout in contain body does not change
anything, nor do uid guid .
With a -d 2 option we get this as the last lines :
Unappending
-> Excuting '/sbin/service guichet-bas restart' ... (timeout= ....)
Unappending -> Excuting '/sbin/service guichet-bas restart' ... (timeout=
....)
-> (Setting umask to 77)
Unappending -> (Setting umask to 77)
Unix_cf_popensetuid(/sbin/service guichet-bas restart, r, -1, -1)
When I install a standard service such as syslog, everything works fine.
I have no idea of a way to solve that major issue (to say the least ...)
Are there some pitfalls when launching a service through cf-agent ?
Thanks in advance for your help.
Regards
Yann Rouxel
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine