[12:23] <ajohnstone> Can anyone explain why such a simple upstart fails to write to /tmp/? https://gist.github.com/4387936 
[12:26] <ajohnstone> Updated gist here... https://gist.github.com/4387977
[12:30] <ajohnstone> upstart 1.5-0ubuntu7  - if that makes any difference?
[14:46] <JanC> ajohnstone: I'm not sure why it doesn't write to /tmp/ but your "service" exits immediately and thus will get into a respawn loop?
[14:47] <ajohnstone> JanC: How can I debug what is going on better?
[14:48] <ajohnstone> I've noticed on occassion it hanging to stop/start the service... I assume this to be in a respawn loop?
[14:49] <JanC> that job file makes no sense at all, so I assume what you are really trying to do is something else?
[14:50] <ajohnstone> Yup, was trying to go back to bare basics to work out what the hell is going on
[14:51] <JanC> this doesn't look like "bare basics" equivalent to any real world type of job
[14:51] <JanC> you might want to use a "console log" stanza and not use redirects for you echos
[14:53] <ajohnstone> When using console log or console output neither seemed to get pipped to syslog.
[14:54] <ajohnstone> What I'm really trying to run. https://gist.github.com/4388880 The pre-start script never executes.
[14:54] <JanC> 'console log' logs to a file in /var/log/upstart/
[14:54] <ajohnstone> Arr, stupid me:P
[14:56] <JanC> the "start on startup" in there might make it start before /tmp/ is available?
[14:57] <JanC> you also have 2 "respawn" stanzas and two "stop on" stanzas, only the last one will be used
[14:59] <JanC> ajohnstone: did you read the cookbook yet?  (see /topic )
[14:59] <ajohnstone> tbh, skimmed it somewhat
[15:07] <ajohnstone> Is it possible to capture the status event and execute a script before status?
[15:08] <JanC> no (there is some talk about that, I think, but currently it doesn't exist)
[15:12] <ajohnstone> JanC: Thanks for your help so far, much appreciated. Hope you had a good Christmas.
[15:21] <JanC> hm, looks like there is a graphite-carbon package in Ubuntu
[15:21] <JanC> which has a sysvinit script that might give you some inspiration
[15:22] <JanC> (or which you might prefer to use)
[15:25] <ajohnstone> It doesn't support instances I don't believe, think I looked at it already.
[15:26] <ajohnstone> Ends up with python being pegged to a single core, so need to balance the traffic.
[15:40] <SpamapS> ajohnstone: are you sure the pre-start never runs? perhaps /opt/graphite is not a directory?
[15:40] <SpamapS> ajohnstone: try 'initctl log-priority info'
[15:40] <ajohnstone> It does exist, I have removed that check previously.
[15:41] <ajohnstone> On that machine it does not have "/var/log/upstart" btw
[15:42] <SpamapS> ajohnstone: and really.. console log is what you want.. logging to /var/log/upstart/jobname-instance.log with built in rotation is a nice win :)
[15:42] <SpamapS> oh
[15:42] <SpamapS> create that dir
[15:42] <SpamapS> its part of the upstart pkg IIRC
[15:43] <ajohnstone> Heh, now I fee silly :) Permission denied: '/opt/graphite/storage/log/carbon-cache/carbon-cache-e/console.log
[15:44] <ajohnstone> Thanks for both your help :D
[15:46] <SpamapS> :)
[16:21] <JanC> hm, seems like Canonical uses graphite too?
[16:23] <ajohnstone> Its pretty good, at peak was doing 1.2 million stats a second, across haproxy, 3 carbon-cache and 2 relay servers. Very handy when you can change the charts around and contrast different things.
[16:29] <JanC> not sure what they use it for, but they are listed on the "who is using graphite" page  ☺
[16:30] <JanC> together with some companies that probably have way more stats/charts than them  ☺