[18:54] is there anyway to tell upstart a pid has changed? [20:01] hello. what's the recommended way of outputting stdout and stderr of my daemon to a specific file? (not /var/log/upstart/daemon.log) [20:07] redirect ater the process to the file [20:07] after* [20:08] app 1>> stdout.log 2>> stderr.log [20:11] jY: I'm trying that but upstart is still writing to /var/log/upstart/daemon.log [20:11] do I need to specify any particular value for "console"? [20:11] i know the default is "log", and I also tried "output" [20:19] jY: change pid how? after initial started event? [20:20] redondos: there should be an example somewhere, one sec. [20:20] xnox: haproxy on a reload changes pids [20:20] which causes upstart to freak out [20:22] jY: 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:23] jY: and have some other job to reload haproxy, or do full restarts instead. [20:23] redondos: to redirect output you should be able to use "logger" [20:23] xnox: i take it now means it's not in the version in ubuntu 12.04? [20:23] jY: no, not in 12.04. [20:24] ok thanks [20:25] jY: is there a bug open against haproxy? [20:25] xnox: no but i've talked to some of the devs and they said its the way it is [20:25] jY: haproxy package that is on launchpad? [20:25] jY: well, ubuntu can patch haproxy and/or change configs and/or upstream patches to get it fixed. [20:26] ok [20:27] jY: 12.04 will have 3 more years of support and 2 more point releases..... [20:28] jY: in precise haproxy is not using upstart job, is it? [20:28] nope [20:28] we tried haproxy to make restarts quick if it dies [20:28] i mean we tried upstart [20:32] jY: reload doesn't actually reload haproxy. [20:33] jY: it suppose to dump every server's state, from source code. [20:33] ya [20:33] jY: it looks like the only way to restart haproxy is to actually "stop and start" it again. [20:33] jY: what job / conf file did you use for haproxy? [20:33] well stop will kill in flight connections [20:34] if you reload it will wait till they all finish then close the process [20:34] i think it's like how apache does it [20:34] jY: there is "sig_soft_stop" on SIGUSR1 [20:34] it's just a simple job that does like a exec haproxy -db -f conf.file [20:35] jY: -sf [20:35] Send FINISH signal to the pids in pidlist after startup. The [20:35] processes which receive this signal will wait for all sessions [20:35] to finish before exiting. This option must be specified last, [20:35] followed by any number of PIDs. Technically speaking, SIGTTOU [20:35] and SIGUSR1 are sent. [20:36] -sf is what we use [20:36] to reload it [20:36] jY: so in pre-stop, you could just send those two signals. [20:36] jY: or you can create a job to do that for you. [20:37] but with pre-stop then it won't think haproxy is up [20:37] when it is [20:37] right? [20:37] jY: pre-stop is executed upon "restart haproxy", so you will get a graceful restart instead of tear everything down. [20:38] ok i'll give it a try [20:38] jY: alternative is to patch haproxy, to install / call functions which do SIGTTOU & SIGUSR1 at the moment, and make SIGHUP do that. [20:39] jY: 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:40] jY: i'd be happy to see that upstart job of yours included in ubuntu =) [20:41] xnox: ok let me pastebin it [20:42] http://pastebin.com/V6wy7qfQ [20:42] jY: you write pid file to still be able to use /etc/init.d ? [20:44] for monit