/srv/irclogs.ubuntu.com/2013/02/08/#upstart.txt

stgraberdbus start/running, process 2028600:01
stgrabergnome-session start/running, process 2032300:01
stgrabernautilus start/running, process 2032100:01
stgrabercompiz start/running, process 2032200:01
stgrabergnome-settings-daemon start/running, process 2032000:01
stgraberupstart-event-bridge start/running, process 2028700:01
stgraberthat's a reasonable hybrid which gives me a working session, with the only problem that the session indicator doesn't show anything00:01
stgraberalright, I have it in a packagable form, will push that to a PPA00:13
stgraberslangasek: packaged and uploaded, will do a quick test on another machine and if it works as well as it does on mine, I'll send a mail to the team (for now) with a couple of notes on the problems I've spotted and had to workaround00:28
stgraber(in short, our environment handling needs more work)00:28
slangasekstgraber: sweet, nice going00:53
xnoxgnome-session starts /etc/xdg/autostart/*.desktop (if conditions apply) last time I poked seb & pitti about it they didn't want to transition all of those to upstart jobs, cause then you'd want a bridge anyway to continue maintain support for those.10:49
xnoxinstead they wanted to transition _some_ of them to upstart jobs (the long running/idle/useful for events)10:50
xnoxwhich I understand as the once that are shipped by default ;-)10:50
marcoceppiI need some help writing an upstart script for some ruby processes16:41
marcoceppiRight now the show up in ps as starting but then just disappear and respawn, all but one are non-forking so I'm not sure why it's so circular16:41
jodhmarcoceppi: have you read http://upstart.ubuntu.com/cookbook/#expect (specifically http://upstart.ubuntu.com/cookbook/#how-to-establish-fork-count)?17:20
marcoceppijodh: I did, it forks 47 times :\17:23
marcoceppiReally not sure how to convey that to upstart17:23
jodhmarcoceppi: it sounds rather broken. Is there any way you could arrange for a way for the main process to send SIGSTOP to itself? This is a facility to handle such unusual applications and indicates to Upstart that the process which sent itself SIGSTOP is the master (see init(5) for further details).17:25
jodhmarcoceppi: presumably most of those forks are starting worker processes? If not, it's very broken.17:26
marcoceppijodh: I'm not sure, if it helps I'm trying to get sidekiq to run via upstart. So it's creating works17:27
jodhmarcoceppi: sorry, never used it. You might find there is a way to run it in the foreground (and ideally stop it starting working processes until some later time).17:28
marcoceppijodh: when I run the process normally, it never detaches from console, none of them do17:29
marcoceppiAt least not by default. But when I remove the expect upstart doesn't exhibit the same results as when I run the command as my user17:29
jodhmarcoceppi: ? In which case, it may well be failing to understand the environment upstart runs it in. See http://upstart.ubuntu.com/cookbook/#see-the-environment-a-job-runs-in and http://upstart.ubuntu.com/cookbook/#checking-how-a-service-might-react-when-run-as-a-job.17:30
marcoceppijodh:  thanks for the links, I'll start there17:30
jodhmarcoceppi: good luck!17:31
marcoceppiWell, that doesn't really work well.18:51
SpamapSmarcoceppi: perhaps the code is doing something clever like checking to see if stdin is a tty, and if it is, don't detach?19:46
marcoceppiSpamapS: Probably, I'm not sure how to skirt around that. The application stores it's own "pid" file to they can track each other. Any way to tell upstart to use that files contents?19:47
SpamapSmarcoceppi: yeah, if you just use the pre-start and post-stop19:49
SpamapSmarcoceppi: you can't use respawn then19:49
SpamapSmarcoceppi: and the pid won't be shown.. you're just using upstart to coordinate the job with other events at that point19:49
SpamapSmarcoceppi: Its pretty silly if it can't just run in the foreground19:50
marcoceppiSpamapS: I agree19:50
marcoceppiAs far as googling around I found foreman for ruby/rails that can create upstart scripts for your processes, which might be something I explore. Can't find any of the generated outputs from that though19:51
SpamapSmarcoceppi: it should not be difficult...19:56
SpamapSmarcoceppi: if it is.. the thing is overly complicated anyway19:57
marcoceppiI would have hoped not19:57
marcoceppiSpamapS: so how can I mimic a tty? I've tried playing with the console options but those don't seem to yield the results I wanted20:00
marcoceppiIf it helps, there are the three files I've created: https://gist.github.com/marcoceppi/474156720:05
xnoxwhat are you trying to start?20:06
marcoceppiRails, sidekiq, and clockwork20:08
marcoceppiFrom the command line, I use bundle which preloads a bunch of environment variables then executes the command based on options supplied20:09
xnoxbundle is culprit here, but it's a pain to replicate what bundler does.20:12
marcoceppiTo me, this just seems like an extremely trivial thing, all the previous upstart scripts I've made for other software have been so straight forward. But this whole convoluded forking business, does it fork does it not what is it doing and I can't seem to figure out where to even start20:12
xnoxbundler does ugly &  crazy stuff despite looking innocent.20:12
marcoceppixnox: I figured, ugh this silly rails stuff has to be so complicated20:12
xnoxmarcoceppi: here http://serverfault.com/questions/327965/how-to-start-a-rake-task-using-upstart people complain about bundler20:14
xnoxit works with rvm-shell (that one does less hacks)20:14
marcoceppiI guess I'll have to install rvm-shell20:15
xnoxthere is also http://ddollar.github.com/foreman/20:16
marcoceppiI've seen people mention it. This isn't my project but I might see how hard it would be to put in upstream20:17
marcoceppiSpamapS: xnox if it's any conselation. I got foreman to work, but foreman export upstart's scripts also fail20:40
SpamapSmarcoceppi: doh20:58
SpamapSruby: why you so bad20:58

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