• [^] # Re: systemd a bon dos

    Posté par (site web personnel) . En réponse au journal et ce qui devait arriver, arriva .... Évalué à 10. Dernière modification le 08 novembre 2012 à 03:23.

    pourquoi ne pas corriger la conception défectueuse de HAProxy

    Quelle conception défectueuse ? En quoi le fait d'envoyer des signaux à un process pour déclencher une action (ici s’arrêter proprement) poserait un problème. Comme tout daemon pouvant être chrooté, HAProxy est susceptible de ne pas pouvoir relire sa config. Un reload consiste donc à remplacer le process proprement par un autre en essayant de ne pas droper de clients au passage.

    Un peu plus lin dans le man on a :

     - SIGUSR1
     Tells the daemon to stop all proxies and exit once all sessions
     are closed. It is often referred to as the "soft-stop" signal.
     - SIGTTOU
     Tells the daemon to stop listening to all sockets. Used inter-
     nally by -sf and -st.
     - SIGTTIN
     Tells the daemon to restart listening to all sockets after a
     SIGTTOU. Used internally when there was a problem during hot
     reconfiguration.
     - SIGINT and SIGTERM
     Both signals can be used to quickly stop the daemon.
     - SIGHUP
     Dumps the status of all proxies and servers into the logs.
     Mostly used for trouble-shooting purposes.
     - SIGQUIT
     Dumps information about memory pools into the logs. Mostly used
     for debugging purposes.
     - SIGPIPE
     This signal is intercepted and ignored on systems without
     MSG_NOSIGNAL.
    
    

    Bref, tu peux utiliser les signaux pour piloter ton daemon. Quel défaut de conception !