[00:54] <erikh> hello friends, I have a simple question -- I'm managing a daemon that needs a somewhat complicated set of signals to do a graceful restart (unicorn, for what it's worth). How would I accomplish this in upstart?
[00:54] <erikh> It doesn't seem I can specify a specific command for restart or reload events -- but maybe I'm missing something in the docs.
[02:33] <axisys> I got it working.. there was a ``-f'' switch to run devmon in foreground.. that did the trick
[02:34] <axisys> erikh: https://improvise.wordpress.com/2012/05/30/run-devmon-using-upstart-script/
[02:34] <axisys> erikh: oops.. wrong window.. 
[02:52] <erikh> np
[06:10] <SpamapS> erikh: unfortunately you can't customize reload/restart in upstart yet
[06:11] <SpamapS> erikh: one thing you can do is write a small daemon to translate HUP to whatever you want. restart is always stop/start in upstart..and I doubt that will change.
[06:12] <SpamapS> erikh: probably best to just scold the unicorn devs for not handling HUP properly if they don't, and use a separate program to send the occasional SIGUSR1 or whatever is the "graceful" thing when you need that.
[11:23] <mrvn> moin. Can anyone help me get upstart to talk? I have  --debug --verbose in the kernel command line but all I get is [   46.171081] init: Failed to create pty - disabling logging for job
[11:28] <xnox> mrvn: what's the upstart version? recently it started to spew per job logs.
[12:08] <mrvn> precise
[12:09] <mrvn> whatever version that is
[12:10] <mrvn> /var/log/upstart is empty
[12:11] <mrvn> Under Lucid I get "init: Handling startup event" and tons of tons of other evnts. Those have disapeared too.
[12:21] <xnox> jodh: ^^^^
[12:25] <xnox> mrvn: based on the http://upstart.ubuntu.com/cookbook/#debugging can you try adding both '--verbose' and '--debug' and check the syslog?
[12:26]  * xnox is guessing here.
[12:37] <mrvn> syslog isn't running so /var/log/syslog isn't any help
[12:38] <xnox> true.
[12:39] <xnox> slangasek: might know. I haven't done upstart debugging much yet. I've debugged individual jobs, but that's past boot. 
[12:44] <mrvn> I've used --debug / --verbose under lucid but with precise upstart simply stoped outputing anything.
[12:47] <xnox> There is a bug that /var/log/upstart is missing on cloud images. https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/990102
[12:47] <xnox> but I don't see a bug about what you describe.
[12:47] <mrvn> I've got the dir, it just is empty.
[14:29] <jodh> mrvn: are you running upstart on a system with no initramfs?
[14:29] <jodh> mrvn: the error you get occurs when upstart fails to create a pty, possibly due to /dev/pts not being mounted.
[14:29] <slangasek> that was about to be my question :)
[14:30] <jodh> mrvn: for now, either arrange to have an initramfs or boot with '--no-log'. If /dev/pts gets mounted at a later part of the boot (by mountall), those pesky messages will disappear (and you'll see logs in /var/log/upstart/ potentially).
[14:31] <jodh> mrvn: the fix for this issue is for upstart to mount /dev and /dev/pts itself.
[14:33] <mrvn> jodh: /dev/pts is mounted, the messages persist
[14:36] <jodh> mrvn: how many messages do you get? you should get 1 / job that is failing to be logged.
[14:37] <mrvn> sounds about right
[14:37] <jodh> mrvn: so does the system boot? have you tried booting with '--no-log'?
[14:45] <mrvn> --no-log hides the problem. But I would rather have it fixed.
[14:47] <jodh> well, we need to understand what is triggering it for you as the only scenario I am aware of is where there is no initramfs.
[14:47] <mrvn> posix_openpt() is triggering it. It sets errno=2 (No such file or directory).
[14:48] <mrvn> crw-rw-rw- 1 root tty    5, 2 May 30 16:43 ptmx
[14:48] <mrvn> devpts on /dev/pts type devpts (rw,gid=5,mode=0620)
[14:48] <mrvn> The question is why? What else does it try to open?
[14:48] <erikh> SpamapS: thanks for your advice.
[14:49] <mrvn> And it still doesn't help in getting upstart debug messages back to the console. They now seem to silently disapear in dmesg and later in syslog.
[14:53] <jodh> mrvn: is this a standard Ubuntu Precise x86/amd64 system?
[14:53] <mrvn> not quite
[14:53] <mrvn> it boots via nfs-root, which requires some changes
[14:54] <jodh> mrvn: changes to what?
[14:54] <mrvn> e.g. mountall doesn't work so I have to mount stuff myself.
[14:55] <jodh> mrvn: I think you should raise a bug on this with full details. Ultimately, if posix_openpt() fails, there isn't much Upstart can do aside from disabling job logging for the job in question. And thats exactly what it does.
[14:57] <mrvn> The error should come for any job with "console output" in it right?
[14:59] <jodh> mrvn: actually, no - it'll be for every job that either doesn't specify "console" or does specify "console log" explicitly. See http://upstart.ubuntu.com/cookbook/#console-log, http://upstart.ubuntu.com/cookbook/#command-line-options, http://ifdeflinux.blogspot.co.uk/2012/05/job-logging-in-upstart-big-upstart.html
[16:32] <mrvn> Ok, one more thing to the PTY problem: If I "telinit u" to restart ubuntu then the problem goes away.
[16:33] <mrvn> Why isn't it enough to mount /dev?
[16:45] <SpamapS> mrvn: telinit u loses a lot of state in upstart
[16:46] <SpamapS> mrvn: not advisable on a running system
[18:07] <kevmo> Hi all, I created an upstart conf file in /etc/init/ and want to modify it, but the changes revert back to the original after a reboot.  Also, if I delete the file, it comes back after a reboot.  What am I missing here?
[18:07] <mrvn> kevmo: some form of netboot or initramfs based system
[18:10] <kevmo> Not doing a netboot.   not sure what initramfs us
[18:10] <kevmo> is
[18:21] <qkslvrwolf> Is there a way to start an upstart job on desktop-start and connect to the display?
[18:24] <qkslvrwolf> I'm attempting to start selenium grid no virtual machines.  I'd like to do this via upstart, but I need a way to allow the grid process access to the display.
[20:46] <JanC> qkslvrwolf: you would have to start it from inside the X session so that you know what display to connect to?
[20:53] <qkslvrwolf> JanC: I got it working, just not as cleanly as I'd like
[20:53] <qkslvrwolf> I actually used lubuntu autostart
[20:54] <JanC> hm, I wonder if the display manager passes DISPLAY=foo with the desktop-session-start event...
[21:17] <qkslvrwolf> that's good thought
[21:17] <qkslvrwolf> that would be nice
[21:18] <qkslvrwolf> although it would also need to pass the magic cookie or whatever
[21:18] <qkslvrwolf> unless I ran this as a user upstart job
[21:18] <qkslvrwolf> which I could also look into
[21:18] <qkslvrwolf> I would prefer to do it with upstart because then it would (theoreticlly) work for any version of ubuntu.
[21:22] <JanC> you could emit your own event on session startup and pass all variables you need
[22:36] <soren> qkslvrwolf: Do you actually need a real X server?
[22:37] <soren> qkslvrwolf: Why not just use xvfb?
[22:38] <soren> qkslvrwolf: Or, if you ever need to connect to it, use xpra.