erikhhello 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
erikhIt doesn't seem I can specify a specific command for restart or reload events -- but maybe I'm missing something in the docs.00:54
axisysI got it working.. there was a ``-f'' switch to run devmon in foreground.. that did the trick02:33
axisyserikh: https://improvise.wordpress.com/2012/05/30/run-devmon-using-upstart-script/02:34
axisyserikh: oops.. wrong window.. 02:34
SpamapSerikh: unfortunately you can't customize reload/restart in upstart yet06:10
SpamapSerikh: 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:11
SpamapSerikh: 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.06:12
mrvnmoin. 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 job11:23
xnoxmrvn: what's the upstart version? recently it started to spew per job logs.11:28
mrvnwhatever version that is12:09
mrvn/var/log/upstart is empty12:10
mrvnUnder Lucid I get "init: Handling startup event" and tons of tons of other evnts. Those have disapeared too.12:11
xnoxjodh: ^^^^12:21
xnoxmrvn: based on the http://upstart.ubuntu.com/cookbook/#debugging can you try adding both '--verbose' and '--debug' and check the syslog?12:25
* xnox is guessing here.12:26
mrvnsyslog isn't running so /var/log/syslog isn't any help12:37
xnoxslangasek: might know. I haven't done upstart debugging much yet. I've debugged individual jobs, but that's past boot. 12:39
mrvnI've used --debug / --verbose under lucid but with precise upstart simply stoped outputing anything.12:44
xnoxThere is a bug that /var/log/upstart is missing on cloud images. https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/99010212:47
xnoxbut I don't see a bug about what you describe.12:47
mrvnI've got the dir, it just is empty.12:47
jodhmrvn: are you running upstart on a system with no initramfs?14:29
jodhmrvn: the error you get occurs when upstart fails to create a pty, possibly due to /dev/pts not being mounted.14:29
slangasekthat was about to be my question :)14:29
jodhmrvn: 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:30
jodhmrvn: the fix for this issue is for upstart to mount /dev and /dev/pts itself.14:31
mrvnjodh: /dev/pts is mounted, the messages persist14:33
jodhmrvn: how many messages do you get? you should get 1 / job that is failing to be logged.14:36
mrvnsounds about right14:37
jodhmrvn: so does the system boot? have you tried booting with '--no-log'?14:37
mrvn--no-log hides the problem. But I would rather have it fixed.14:45
jodhwell, 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
mrvnposix_openpt() is triggering it. It sets errno=2 (No such file or directory).14:47
mrvncrw-rw-rw- 1 root tty    5, 2 May 30 16:43 ptmx14:48
mrvndevpts on /dev/pts type devpts (rw,gid=5,mode=0620)14:48
mrvnThe question is why? What else does it try to open?14:48
erikhSpamapS: thanks for your advice.14:48
mrvnAnd 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:49
jodhmrvn: is this a standard Ubuntu Precise x86/amd64 system?14:53
mrvnnot quite14:53
mrvnit boots via nfs-root, which requires some changes14:53
jodhmrvn: changes to what?14:54
mrvne.g. mountall doesn't work so I have to mount stuff myself.14:54
jodhmrvn: 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:55
mrvnThe error should come for any job with "console output" in it right?14:57
jodhmrvn: 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.html14:59
mrvnOk, one more thing to the PTY problem: If I "telinit u" to restart ubuntu then the problem goes away.16:32
mrvnWhy isn't it enough to mount /dev?16:33
SpamapSmrvn: telinit u loses a lot of state in upstart16:45
SpamapSmrvn: not advisable on a running system16:46
kevmoHi 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
mrvnkevmo: some form of netboot or initramfs based system18:07
kevmoNot doing a netboot.   not sure what initramfs us18:10
qkslvrwolfIs there a way to start an upstart job on desktop-start and connect to the display?18:21
qkslvrwolfI'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.18:24
=== Md_ is now known as Md
JanCqkslvrwolf: you would have to start it from inside the X session so that you know what display to connect to?20:46
qkslvrwolfJanC: I got it working, just not as cleanly as I'd like20:53
qkslvrwolfI actually used lubuntu autostart20:53
JanChm, I wonder if the display manager passes DISPLAY=foo with the desktop-session-start event...20:54
qkslvrwolfthat's good thought21:17
qkslvrwolfthat would be nice21:17
qkslvrwolfalthough it would also need to pass the magic cookie or whatever21:18
qkslvrwolfunless I ran this as a user upstart job21:18
qkslvrwolfwhich I could also look into21:18
qkslvrwolfI would prefer to do it with upstart because then it would (theoreticlly) work for any version of ubuntu.21:18
JanCyou could emit your own event on session startup and pass all variables you need21:22
sorenqkslvrwolf: Do you actually need a real X server?22:36
sorenqkslvrwolf: Why not just use xvfb?22:37
sorenqkslvrwolf: Or, if you ever need to connect to it, use xpra.22:38

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