/srv/irclogs.ubuntu.com/2013/11/06/#upstart.txt

jYis there anyway to tell upstart a pid has changed?18:54
redondoshello. what's the recommended way of outputting stdout and stderr of my daemon to a specific file? (not /var/log/upstart/daemon.log)20:01
jYredirect ater the process to the file20:07
jYafter*20:07
jYapp 1>> stdout.log 2>> stderr.log20:08
redondosjY: I'm trying that but upstart is still writing to /var/log/upstart/daemon.log20:11
redondosdo I need to specify any particular value for "console"?20:11
redondosi know the default is "log", and I also tried "output"20:11
xnoxjY: change pid how? after initial started event?20:19
xnoxredondos: there should be an example somewhere, one sec.20:20
jYxnox: haproxy on a reload changes pids20:20
jYwhich causes upstart to freak out20:20
xnoxjY: that's evil. and needs investigation. you can now specify a custom reload signal, such that you could make "reload" send a harmless signal.20:22
xnoxjY: and have some other job to reload haproxy, or do full restarts instead.20:23
xnoxredondos: to redirect output you should be able to use "logger"20:23
jYxnox: i take it now means it's not in the version in ubuntu 12.04?20:23
xnoxjY: no, not in 12.04.20:23
jYok thanks20:24
xnoxjY: is there a bug open against haproxy?20:25
jYxnox: no but i've talked to some of the devs and they said its the way it is20:25
xnoxjY: haproxy package that is on launchpad?20:25
xnoxjY: well, ubuntu can patch haproxy and/or change configs and/or upstream patches to get it fixed.20:25
jYok20:26
xnoxjY: 12.04 will have 3 more years of support and 2 more point releases.....20:27
xnoxjY: in precise haproxy is not using upstart job, is it?20:28
jYnope20:28
jYwe tried haproxy to make restarts quick if it dies20:28
jYi mean we tried upstart20:28
xnoxjY: reload doesn't actually reload haproxy.20:32
xnoxjY: it suppose to dump every server's state, from source code.20:33
jYya20:33
xnoxjY: it looks like the only way to restart haproxy is to actually "stop and start" it again.20:33
xnoxjY: what job / conf file did you use for haproxy?20:33
jYwell stop will kill in flight connections20:33
jYif you reload it will wait till they all finish then close the process20:34
jYi think it's like how apache does it20:34
xnoxjY: there is "sig_soft_stop" on SIGUSR120:34
jYit's just a simple job that does like a exec haproxy -db -f conf.file20:34
xnoxjY:        -sf <pidlist>20:35
xnox              Send  FINISH  signal  to  the pids in pidlist after startup. The20:35
xnox              processes which receive this signal will wait for  all  sessions20:35
xnox              to  finish  before  exiting. This option must be specified last,20:35
xnox              followed by any number of PIDs.  Technically  speaking,  SIGTTOU20:35
xnox              and SIGUSR1 are sent.20:35
jY-sf is what we use20:36
jYto reload it20:36
xnoxjY: so in pre-stop, you could just send those two signals.20:36
xnoxjY: or you can create a job to do that for you.20:36
jYbut with pre-stop then it won't think haproxy is up20:37
jYwhen it is20:37
jYright?20:37
xnoxjY: pre-stop is executed upon "restart haproxy", so you will get a graceful restart instead of tear everything down. 20:37
jYok i'll give it a try20:38
xnoxjY: alternative is to patch haproxy, to install / call functions which do SIGTTOU & SIGUSR1 at the moment, and make SIGHUP do that.20:38
xnoxjY: or you can create "haproxy-reload.conf" task, script, which does "status haproxy | grep -q start/running && then get pid and send SIGTTOU and SIGUSR1 to the main process.20:39
xnoxjY: i'd be happy to see that upstart job of yours included in ubuntu =)20:40
jYxnox: ok let me pastebin it20:41
jYhttp://pastebin.com/V6wy7qfQ20:42
xnoxjY: you write pid file to still be able to use /etc/init.d ?20:42
jYfor monit20:44

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!