[14:40] any way I can tell uptstart to load init files in a given path? [14:40] include directive of sorts [14:43] crankharder: what are you trying to achieve? [14:44] I want puppet to set up and configure a directory full of init scripts [14:44] I can't tell puppet to monitor /etc/init since it'll delete all the scripts that puppet doesn't own [14:44] so if upstart monitored /etc/init/puppet just like /etc/init we'd be good to go [14:45] crankharder: it does [14:45] heh, hmm. ok [14:47] jodh: https://gist.github.com/crankharder/4fa79577333ca89bd546 [14:47] seems to not like that job [14:52] crankharder: What does 'init-checkconf .conf' say? [14:52] $ init-checkconf resque_worker_50.conf [14:52] ERROR: file resque_worker_50.conf does not exist [14:53] crankharder: init-checkconf '/full/path/to/file.conf' [14:56] crankharder: your 'start on' should probably be 'start on runlevel [2345]' and your 'stop on' is currently wrong (unless you are emitting shutdown somewhere?) - it should be 'stop on runlevel [016]'. [14:57] crankharder: also, you don't need to do your own redirection/logging - upstart does it for you, logging all job output to /var/log/upstart/. [14:57] had some perms issue, but now getting this: [14:57] $ init-checkconf /etc/init/puppet/resque_worker_50.conf [14:57] ERROR: failed to ask Upstart to check conf file [14:57] /etc/init/puppet is 755 and the job is 744 [14:57] jodh: okay, those points may be fair -- but I have the same job (named differently) in /etc/init and it works [14:58] crankharder: what distro version is this? [14:58] ubuntu 12.04 [14:59] I get this too: [14:59] $ init-checkconf /etc/init/resque_worker_5.conf [14:59] ERROR: failed to ask Upstart to check conf file [14:59] for someone not in my nested path [14:59] something [15:01] crankharder: copy the file to /tmp, ensure it is readable, then 'init-checkconf -d /tmp/foo.conf' [15:01] crankharder: if that still fails, I'm guessing you have a dbus issue - is dbus-launch available? [15:04] crankharder: your job can also use use 'setuid', 'setgid' and 'chdir' to simplify the main job to be just 'exec rake environment resque:work QUEUE=high,medium RAILS_ENV=production PIDFILE=/tmp/resque_worker_50.pid VERBOSE=1' I think. [15:04] crankharder: putting pid files in /tmp looks like a bad idea btw. [15:06] yea, looks like dbus issues. no, i dont have dbus-launch [15:08] output here: https://gist.github.com/crankharder/1ee1e4cb50cc8353a3e4 [15:09] it's a bit weird init-checkconf doesn't work on scripts in /etc/init/ ? -- maybe this isn't the issue? [15:20] crankharder: maybe copy your job to a desktop system with a full dbus setup and run init-checkconf on it there. I wonder if you have any odd whitespace chars in that job - copied from windows maybe? [15:21] so, testing on a more barebones ubuntu 12.04 isntance I have w/o my jobs in it... installing dbus-launch now [15:21] crankharder: another way to check the job without using init-checkconf is: sudo initctl log-priority debug;sudo touch /etc/init/foo.conf;sudo initctl log-priority message' and look at dmesg/syslog to see what messages upstart logged about foo. [15:22] $ init-checkconf /etc/init/acpid.conf │ [15:22] ERROR: failed to ask Upstart to check conf file [15:22] -d shows samee waiting for dbus issues [15:23] crankharder: init-checkconf won't work unless dbus-launch works. [15:24] not really familliar with dbus launch. define works? https://gist.github.com/crankharder/53351450db600a15252e [15:26] crankharder: let's forget init-checkconf - I've run it locally and your job as pasted is syntactically valid. I've given you another option above to syntax check anyway. I suspect the job on disk is not the same as pasted - it might contain '\r's or similar if you copied it from a windows machine maybe? [15:27] crankharder: try the technique above and see what upstart logs to the system log - it will tell you where it is failing to parse the job. [15:29] okay, so i'm on a new system w/o my custom jobs and I still see the same issue. It's not related to my custom job. [15:29] crankharder: which issue? the job or init-checkconf? [15:29] https://gist.github.com/crankharder/cd04bcb4d80259ba58d3 [15:29] crankharder: 'sudo status puppet/tty6' [15:30] okay, that works [15:32] unfortunately I see nothing in syslog or dmesg from this: sudo initctl log-priority debug ; sudo touch /etc/init/cron.conf ; sudo initctl log-priority message [15:33] crankharder: are you by chance running in a cloud environment that uses overlayfs? [15:33] i'm running ubuntu in virtualbox... but i dont know what overlayfs is, so certainly didn't set tha tup [15:34] crankharder: mount|grep overlay [15:34] nothing [15:38] okay, I removed all my custom init scripts and moved tty6 into this puppet path. giving my unknown job puppet/tty6 on this system (but it worked on the more barebones one) [15:38] crankharder: this makes no sense - your system sounds broken. [15:39] /etc/init/puppet is 755 on both /etc/init/puppet/tty6.conf is 744 on both [15:41] I can test this at different points as puppet sets up the system to see if that helps [15:43] jodh: thanks for the help -- i'll post here if I can track down what change makes this break [15:44] crankharder: you said this job runs fine in /etc/init/ but not in /etc/init/puppet/ - is that now resolved now you know how to start a job in a sub-directory? [15:45] the subdirectory thing works on a box that hasn't had all my puppet configs (lots of them) applied. same version of ubuntu tho [15:45] so I assume it's something puppet is configuring that's causing this [15:48] crankharder: I'd certainly make sure you have a pristine server environment available (ie no puppet) for testing the basic upstart jobs. [17:04] I've got an UpStart task that I'd like to print a message to the console once run.. 'start job' should produce something on the users screen.. How can I do this? I've tried 'console output' [17:07] CharlieSu: at boot "console output" will print to the active console / boot messages. If run interractively it will print where-ever it's run. [17:31] xnox: doesn't seem to be doing that for me.. I just use "logger 'message'" right? [17:38] CharlieSu: no, just do "echo" [17:38] logger will go whever logger logs, e.g. syslog. [17:39] CharlieSu: "console " stanza controls where job's stdout and stderr is redirected, default is "log" which is under /var/log/upstart/, "output" is to normal stdout and etc. === JanC_ is now known as JanC