[00:54] 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] 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] I got it working.. there was a ``-f'' switch to run devmon in foreground.. that did the trick [02:34] erikh: https://improvise.wordpress.com/2012/05/30/run-devmon-using-upstart-script/ [02:34] erikh: oops.. wrong window.. [02:52] np [06:10] erikh: unfortunately you can't customize reload/restart in upstart yet [06:11] 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] 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] 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] mrvn: what's the upstart version? recently it started to spew per job logs. [12:08] precise [12:09] whatever version that is [12:10] /var/log/upstart is empty [12:11] Under Lucid I get "init: Handling startup event" and tons of tons of other evnts. Those have disapeared too. [12:21] jodh: ^^^^ [12:25] 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] syslog isn't running so /var/log/syslog isn't any help [12:38] true. [12:39] slangasek: might know. I haven't done upstart debugging much yet. I've debugged individual jobs, but that's past boot. [12:44] I've used --debug / --verbose under lucid but with precise upstart simply stoped outputing anything. [12:47] There is a bug that /var/log/upstart is missing on cloud images. https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/990102 [12:47] but I don't see a bug about what you describe. [12:47] I've got the dir, it just is empty. [14:29] mrvn: are you running upstart on a system with no initramfs? [14:29] mrvn: the error you get occurs when upstart fails to create a pty, possibly due to /dev/pts not being mounted. [14:29] that was about to be my question :) [14:30] 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] mrvn: the fix for this issue is for upstart to mount /dev and /dev/pts itself. [14:33] jodh: /dev/pts is mounted, the messages persist [14:36] mrvn: how many messages do you get? you should get 1 / job that is failing to be logged. [14:37] sounds about right [14:37] mrvn: so does the system boot? have you tried booting with '--no-log'? [14:45] --no-log hides the problem. But I would rather have it fixed. [14:47] 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] posix_openpt() is triggering it. It sets errno=2 (No such file or directory). [14:48] crw-rw-rw- 1 root tty 5, 2 May 30 16:43 ptmx [14:48] devpts on /dev/pts type devpts (rw,gid=5,mode=0620) [14:48] The question is why? What else does it try to open? [14:48] SpamapS: thanks for your advice. [14:49] 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] mrvn: is this a standard Ubuntu Precise x86/amd64 system? [14:53] not quite [14:53] it boots via nfs-root, which requires some changes [14:54] mrvn: changes to what? [14:54] e.g. mountall doesn't work so I have to mount stuff myself. [14:55] 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] The error should come for any job with "console output" in it right? [14:59] 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] Ok, one more thing to the PTY problem: If I "telinit u" to restart ubuntu then the problem goes away. [16:33] Why isn't it enough to mount /dev? [16:45] mrvn: telinit u loses a lot of state in upstart [16:46] mrvn: not advisable on a running system [18:07] 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] kevmo: some form of netboot or initramfs based system [18:10] Not doing a netboot. not sure what initramfs us [18:10] is [18:21] Is there a way to start an upstart job on desktop-start and connect to the display? [18:24] 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. === Md_ is now known as Md [20:46] qkslvrwolf: you would have to start it from inside the X session so that you know what display to connect to? [20:53] JanC: I got it working, just not as cleanly as I'd like [20:53] I actually used lubuntu autostart [20:54] hm, I wonder if the display manager passes DISPLAY=foo with the desktop-session-start event... [21:17] that's good thought [21:17] that would be nice [21:18] although it would also need to pass the magic cookie or whatever [21:18] unless I ran this as a user upstart job [21:18] which I could also look into [21:18] I would prefer to do it with upstart because then it would (theoreticlly) work for any version of ubuntu. [21:22] you could emit your own event on session startup and pass all variables you need [22:36] qkslvrwolf: Do you actually need a real X server? [22:37] qkslvrwolf: Why not just use xvfb? [22:38] qkslvrwolf: Or, if you ever need to connect to it, use xpra.