#upstart 2006-10-02
<Admiral_Chicago> is there a specific page I can visit so I can learn more about ReadAhead and more specific stuff about upstart/teardown
<Admiral_Chicago> i have the idea of how they work, i would like more of the tech details
#upstart 2006-10-03
* x4NothinKx is back
<_ion> Thanks a lot for the information. I really appreciate that.
<x4NothinKx> :)
<kalium1> hi
<kalium1> need help from a staffer
#upstart 2006-10-04
<johnnybuoy> does anyone know about a good documentation for upstart?
<Seveas> johnnybuoy, the source code ;)
<johnnybuoy> :D
<johnnybuoy> thanks!
!alindeman:*! Hi all.  A rotation server just hiccuped; we're looking into it
<Keybuk> http://enterprise.linux.com/enterprise/06/09/18/1623244.shtml
* ..[topic/#upstart:Keybuk] : Upstart 0.2.7 | http://upstart.ubuntu.com/ | http://upstart.ubuntu.com/doc/getting-started.html | https://wiki.ubuntu.com/UpstartDesignChanges | irc logs: http://people.ubuntu.com/~fabbione/irclogs | http://www.lugradio.org/episodes/61 | http://enterprise.linux.com/enterprise/06/09/18/1623244.shtml
<thom> Keybuk: you sly dog, sneaking gratuitous self-agrandisement onto linux.com ;-)
<smlgb1> Hi there. Did anybody of you try to install upstart on gentoo yet?
<Keybuk> smlgb1: I believe there have been several attempts, at least one of which was successful
<Keybuk> thom: and getting paid for it, too ;)
<smlgb1> is there some online resource to check it out? I am trying for over a day now, but i cannot get it to do the right thing...
<thom> Keybuk: you can buy me a beer at uds then
<Keybuk> heh
<Keybuk> thom: you're definitely coming?
<Keybuk> cool
<Keybuk> smlgb1: no idea, I don't know if anyone's written it down yet
<smlgb1> ok, thanks. gotta keep trying.
<wasabi_> Keybuk: sponsorship accepted. ;0
<wasabi_> Yay for me!
<wasabi_> I'm going to start writing up a ton of various use cases of complicated upstart event stuff, and start blowing out flow charts.
<Keybuk> wasabi_: yeah, I saw a few weeks ago
<Keybuk> I guess the mails finally went out then
<wasabi_> Yeah.
<wasabi_> whiprush sent in another recommendation because I'll be working on some directory integration stuff too
<wasabi_> He didn't know you already had.
<madduck> Keybuk: can you do s@/boot/grub/menu.lst@& (or if using grub2 - /boot/grub/grub.cfg)@ in the README?
<madduck> bounce from a user forthcoming
<Keybuk> madduck: err, -v ?
<madduck> Keybuk: yeah, this is 0.1.1
<madduck> Keybuk: if it does not apply anymore, all the better
<Keybuk> I didn't understand the sed
<Keybuk> and yeah, there's no README.Debian anymore in 0.2+
<Keybuk> I suspect Debian will want to keep it though, unless you install upstart as /sbin/init
<madduck> kinda. i am not maintainer anymore, it's up to mbiebl now. :)
<mbiebl> Keybuk: 0.2.7 is currently in NEW again because of the new binary packages.
<Keybuk> oh right, fair enough
<mbiebl> It also replaces /sbin/init.
<Keybuk> how did you package it?  ubuntu-style?
<Keybuk> cool
<Keybuk> shiny
<mbiebl> It's based on your packages.
<mbiebl> I want to keep it as close as possible.
<mbiebl> sysvinit has been split up and other packages which still depedended on sysvinit have mostly been fixed.
<Keybuk> could you use -Xdebian1 in your revisions, not just -1 though
<madduck> yeah, this was pretty painless. i meant to blog about the whole process.
<mbiebl> (bluez-utils being the most important one which still remains)
<Keybuk> otherwise I'll have to blacklist it from the Ubuntu sync/merge process
<Keybuk> which won't do either of us favours
<madduck> Keybuk: why not try to stay in sync?
<Keybuk> I don't mind if they don't differ
<madduck> mbiebl: ?
<mbiebl> Good question, still debian/control has to differ because of the different replaces.
<madduck> mbiebl: then i guess it should really be -Xdebian1
<mbiebl> Also pere chose to name sysvutils sysvinit-utils.
<madduck> i think ubuntu will follow this choice of name, right Keybuk ?
<Keybuk> we will in edgy+1, yeah
<Keybuk> obviously we're frozen now
<mbiebl> Keybuk: I already thought about naming them -Xdebian1. But I don't always copy debian/ on a new release of the Ubuntu package.
<mbiebl> I copied them for 0.2.5 and then only synced in the necessary changes.
<Keybuk> the main problem is if you, for what ever reason, race ahead of us
<Keybuk> you do 0.3.0-1, so do we, but they differ
<Keybuk> and you need to fix something, and do 0.3.0-2
<Keybuk> Debian now has a higher version than Ubuntu, so our sync process will try and override our version with yours
<Keybuk> which would be bad
<Keybuk> the sync process recognises XubuntuY and XdebianY
<mbiebl> Hm, right.
<Keybuk> the former as an "Ubuntu patched version of a Debian-maintained package"
<Keybuk> and the latter as a "Debian patched version of an Ubuntu-maintained package"
<Keybuk> so it'd know not to override our version with a XdebianY
<mbiebl> I just found it odd to name them -Xdebian1 also if they are not directly based on the corresponding Ubuntu version.
<Keybuk> without that, I'd need to blacklist upstart from the sync process to avoid us suddenly ending up with the debian packages
<Keybuk> name them -0debian1 then?
<Keybuk> we use that in Ubuntu when we don't base things on the Debian version
<Keybuk> it's not important though, if you don't want to use patches/merge.ubuntu.com etc.
<Keybuk> or get diffs from the PTS
<mbiebl> How do you usually handle syncs between Debian/Ubuntu?
<mbiebl> Do you copy the Debian changelog?
<mbiebl> Even if the packages evolve differently for some time.
<Keybuk> if we branch the package, we add our entries to the top of the changelog
<Keybuk> so you see -2ubuntu2, -2ubuntu1, -2, -1 etc.
<Keybuk> then if we merge in Debian again, we add the new Debian at the top
<Keybuk> (and a ubuntu1 for the merge)
<Keybuk> -3ubuntu1, -3, -2ubuntu2, -2ubuntu1, -2, -1
<Keybuk> if we abandon our patches, we sync the Debian version and drop the changelog diff
<mbiebl> Ok, then I'll try to adopt a corresponding versioning scheme with -XdebianY for the Debian package.
<Keybuk> if not, don't worry too much :)
<Keybuk> I'm the guy that does the sync/merge stuff, so I'd quickly hit a button if I saw upstart in there ;)
<mbiebl> Keybuk: The only issues I currently have with upstart on Debian is, that console-setup/console-tools don't work properly during boot up.
<mbiebl> I know that you had the same problems on Edgy already, so maybe you could give me some pointers how you fixed that.
<Keybuk> "don't work properly" ?
<mbiebl> Font and keyboard are not setup during bootup.
<Keybuk> with usplash?
<mbiebl> Without.
<Keybuk> Debian uses setupcon?
<mbiebl> I can, it's optionally.
<mbiebl> s/I/It/
<Keybuk> does adding "console output" to rcS/rc2 help?
<Keybuk> it "just works" here, don't really know much about it
<Keybuk> I know Kamion spent ages transitioning us to setupcon
<Keybuk> I assumed Debian had done the same before, he tends to prefer to keep us matched to Debian
<mbiebl> I'll check that. I just know, that /etc/init.d/console-setup works when run from sysvinit, but not from upstart.
<Keybuk> assuming you just copied the ubuntu jobs, you've probably got a silent startup with no console output
<mbiebl> Right.
<Keybuk> if whatever sets the console up just uses fd 0/1/2, then it won't do anything
<mbiebl> Ah, so why does it work on Ubuntu then? It also uses the silent startup.
<mbiebl> Have the changed the init scripts/setupcon?
<Keybuk> we just call "setupcon -k --force"
<Keybuk> it seems to dtrt here
<Keybuk> oh, the -k is just if usplash is running
<Keybuk> anyway, gym time, gotta run
!Rez:*! Hi all!  You may notice some bots around the net attempting to exploit a bug in some routers (whereby they crash on a malformed DCC SEND string).  We're doing our best to mitigate the visibility of these bots, but if you're still being affected (i.e., disconnected) by them, please consider connecting to freenode on a non-IRC port, such as 8001.  Thanks!
#upstart 2006-10-05
<rich3krow> hi, upstartians.  Has the subject of addressing the rpm package "initscripts" cropped up somewhere?  I'd be happy to have a pointer to it.
<rich3krow> or the subject of upstart on say fedora core 5?
<Md> I do not remember reading anything about upstart and RPM-based distributions
<Md> except that so far the red hat people are still looking at upstart and waiting to see if it will be adopted by others or crash and burn
<rich3krow> I expect a lot of people are doing that.
<rich3krow> What would be great is to have a parallel implementation so one could choose to do either.  Say, "init 7" or "init 8" or "init 9" would be the upstart equivalent of inits 1, 3, and 5
<rich3krow> i believe [789]  are unused
<rich3krow> much like if your kernel crashes, grub will let you use a former kernel, replete with its modules
<rich3krow> well, i really need to read an in-depth doc and/or implementation, guess I should (1) d/l 6.10 of Ubuntu (I saw my first Ubuntu billboard Sunday!  Going north on 101 toward SF) and (2) inspect if
<rich3krow> it
<Luna-Tick> Hello all. I'm looking at my bootchart and seem to have 2 x 5secs where the processor and disk do absolutely nothing. It seems that this could be to do with fsck. A copy of my bootchart can be found here https://wiki.ubuntu.com/LaptopTestingTeam/DellInspiron510m?action=AttachFile&do=get&target=bootchart-edgy-20060920-7.png
<Luna-Tick> I'm running Edgy Beta
<Keybuk> good morning
<uhmmm> so.. is this upstart likely to change our linux lives?
<Keybuk> upstart is like a change of toothpaste
<Keybuk> the benefit is feeling fresher throughout the day
<uhmmm> great answer
<uhmmm> now I know what to expect from it
<Keybuk> heh, could you be more specific with your question?
<Keybuk> it's sufficiently broad that it's difficult to answer
<Keybuk> the change for users are that their system is a little more flexible to their needs
<Keybuk> the change for developers is that it's much easier to make the system more flexible
<gebi> hi all :)
<gebi> i've a question regarding upstart, whats the intended mechanism in upstart to preserve starting services
<_ion> Preserve?
<gebi> e.g just because a server has a graka i don't won't the x server to be started
<gebi> haven't read about that in the upstart doku
<gebi> _ion: on preserve is wrong, 'keep from starting' would be better, sorry
<_ion> 1) Don't install X to a server, 2) i proposed a "disabled" stanza to the job description syntax, but i think Keybuk has something better in mind.
<gebi> hmm...
<gebi> disable in the job description would really be suboptimal, just look at the (imho) mess with /etc/defaults/<service> (disable=yes) and such things
<gebi> _ion: would upstart support different "profiles"? (where profiles mean something like a runleve)
<gebi> suppose a user only want consolen login, or console + network access, but no daemons started (or only gpm and things needed to work with console) and ssh
<Keybuk> these are all things we're still designing
<Keybuk> what do you think would work best?
<gebi> thats a bit complicated in a event based system imho, because what if a user is in "consolen mode" but now want to start into "graphic mode" (without reloading the graphic card modules)
<gebi> idea: every so called profile consists of a file with event filters, if an event gets filtered by the rules of the profile it is saved by upstart und replayed if the user decided to switch to another profile (same for the new profile, if the event is also filtered in the new profile it is saved again)
<gebi> but this aproach needs strict definitions which events are supposed do what, and imho also something like virtual events
<_ion> What is a virtual event?'
<gebi> e.g network daemons, pretty any network daemon has the same requirements (the network should be present and useable + maybe a loaded firewall), so to repetly define all such things is waste of time and divert the system because a few scripts won't get it right
<gebi> a virtual event would something like: daemons-up which depends on a network card beeing useable + firewall loaded, this is the main event every daemon should depend on
<gebi> the main point, for event filters to be usefull in this case you need one event every daemon depends on
<gebi> another "problem" where the event based system simply doesn't work (imho) is if the user want's to start a specific daemon, upstart needs to figure out the right dependencies and if they are not satisfied needs to print why exactly the daemon can't be started
<Keybuk> job "dependencies" are an interesting exercise
<Keybuk> do you just depend on another job
<Keybuk> or should you be able to say "apache can't start until a network card is up"
<gebi> the second one, solaris is the best example in this respect (imho)
<gebi> it might be possibel to use events as dependencies but this needs a more formal description on what type of events and what arguments a service depends (and no coding of this dependencies into a code section)
<rich3krow> "Apache can't start until a network card is up"  but but but
<rich3krow> what if I only want to use apache for local web development and I only want to use 127.0.0.1?
<rich3krow> Oh, Keybuk has gone to bed
<_ion> That's just a matter of configuration.
<_ion> In that case the network interface you want apache to wait for would be 'lo'. :-)
<rich3krow> hm, I don't even know how lo is brought up, I should dig a little.
* x4NothinKx wants to support the upstart-project
<rich3krow> Well, ok, lo comes up in the same way any interface comes up.  In the redhat scheme /etc/initd/network looks through files /etc/sysconfig/network-scripts, and ifcfg-lo is one of them, and it has ONBOOT=yes
#upstart 2006-10-06
<rowanjl> I've got a question, I'm not familiar with how Linux boots so be warned:
<rowanjl> What controls the output during the boot?
<Keybuk> various different pieces
<rowanjl> mm
<Keybuk> obviously init is initially responsible for setting stdout of the scripts it runs
<rowanjl> yeah
<Keybuk> the scripts are then responsible for actually outputting stuff
<Keybuk> often they use the LSB functions for that
<Keybuk> and those functions may know that a graphical splash screen is running
<rowanjl> Which gives it the uniform look?
<rowanjl> I mean
<Keybuk> or that the script's stdout is not /dev/console, so write to /dev/console explicitly
<Keybuk> the LSB functions
<rowanjl> Item name...     [OK|FAILED|...
<Keybuk> /lib/lsb/init-functions
<rowanjl> hmm
<Keybuk> often overriden by /etc/lsb-base-logging.sh
<rowanjl> You ever notice how the image overlay often disappears to early?
<Keybuk> yes, usplash times out if it doesn't receive something in a certain time period
<rowanjl> ahh, I see
<rowanjl> I guess that makes sense, untill my mother uses it ;)
<rowanjl> She was scared the first time that happened... pretty sad
<Keybuk> yeah
<Keybuk> mostly it's when your disk gets checked that it disappears
<Keybuk> so you can see the disk check output underneath
<rowanjl> On my computer it happens while X is loading
<rowanjl> Or just before
<Keybuk> yeah, there's a brief blank before it switches to X
<Keybuk> has to be, as it has to clear up the console
<Keybuk> sadly the Linux VT layer sucks
<Keybuk> it's not possible to change VT settings unless it's the current VT
<rowanjl> Hmm
<Md> Keybuk: are you sure? I remember using e.g. setleds ... < /dev/tty2
<rowanjl> I worry about these things sometimes, how can they be polished...
<rowanjl> There's all this fuss about Linux for Desktops, but is that really what we need?
<rowanjl> A desktop OS is better off booting right into its graphical layer
<Keybuk> Md: some bits work, most don't -- see setupcon for some hacks
<Keybuk> we can't change the console font and keymap while usplash is running without chvt'ing to a text screen
<Keybuk> rowanjl: why?  no other desktop OS boots directly into graphical
<rowanjl> No major ones
<rowanjl> ;)
<Keybuk> name one
<rowanjl> Syllable
<Keybuk> at what point does it start the full graphical?
<Keybuk> an x86 doesn't boot into graphical
<Keybuk> so at some point, you have to do a flip
<rowanjl> No your right, but it IS different to Linux
<rowanjl> because it was never indented to have a console
<Keybuk> the Linux console is just hysterical
<rowanjl> pardon? :/
<Keybuk> we could get rid of it easily, and just start X on the framebuffer on the first VT, etc.
<Keybuk> sorry, historical ;)
<rowanjl> heh
<rowanjl> I know I'd miss the console, but I guess a real desktop Linux variant would replace it
<Keybuk> there isn't anything to gain from getting rid of t
<Keybuk> sure, it makes you feel fluffy, but there's no improvement
<Keybuk> and it means that there's no quick escape to a login prompt when you break X :)
<rowanjl> true :P
<rowanjl> but it also means people will pay us to fix their Linux boxes :P
<Keybuk> we have to have a text VT when we boot, because that's what the host architecture gives us
<rowanjl> You could do what Windows does, have a Safe Boot option.
<Keybuk> sure, we can have all that
<Keybuk> but there's still no reason to get rid of a text console
<rowanjl> Most of us do now anyhow
<rowanjl> Well, there is, Users like polish, textmode isn't polished
<Keybuk> but users won't even know it's there
<rowanjl> but there are probably better ways to hide it
<Keybuk> "hide" ?
<rowanjl> hide the console
<Keybuk> why does it need to be hidden?
<rowanjl> like I was saying before, it is often visible when it doesn't really need to be
<rowanjl> because end users are not geeks.
<Keybuk> at the moment, it does need to be visible at those moments
<Keybuk> we slowly, but surely, fix those
<rowanjl> yeah
<Keybuk> ideally when X starts, the splash screen would just be replaced by X
<rowanjl> yep
<Keybuk> but we can't do that right now, because we can't reset the console underneath
<Keybuk> that's a code limitation, that should be fixable in the long term
<rowanjl> mm
* rowanjl remembers Red Hat 5.2 booting...
<rowanjl> now that was pretty bad
<rowanjl> everythings come a long way since
* Keybuk just made sure that there was a spec for that for uds-mv
#upstart 2006-10-07
<SXan> Howdy
<SXan> Does anybody here know how to write a service rule where more than one event is required to bring a service up?  I can find no documentation on this.
!alindeman:*! Hi all.  One of our servers seems to be having trouble; we're going to pull it from rotation pending further information
#upstart 2006-10-08
<Zoffix> Hi, I've heard that the reason I can't find /etc/inittab is because I have Upstart, how can I make my system boot in text mode as oposed to graphical mode?
#upstart 2007-10-03
* Starting logfile irclogs/upstart.log
<mmInd> Hi all, I'm trying to get my system to not start up with X running (change default runlevel?)  I found somewhere online where they created an inittab, but I'm just wondering what the "correct" way of doing this is?
<mmInd> or should I just modify /etc/rc3.d/* and make an /etc/inittab to default to 3?
<mmInd> hmmm..IRC logs suggest this channel isn't used much...
<mmInd> k, well I guess I'll just do the later.
<Keybuk> people never stick around :)
<ion_> At least he sticked around for 30 minutes instead of e.g. 3, like some people. :-)
<Keybuk> heh
<Keybuk> true
#upstart 2007-10-04
<mbiebl> Keybuk: hi, how's work going on upstart?
<mbiebl> I guess you are pretty busy atm with the upcoming release
<Keybuk> mbiebl: still blocking on working out what direction to tak eit
<mbiebl> Why not implement some non-controversial stuff first.
<Keybuk> such as?
<mbiebl> I'd love to see pid file monitoring e.g.
<Keybuk> but you wouldn't get to see it for a while
<Keybuk> since the rest of the code is in an intermediate state
<mbiebl> what about branching off from 0.3.8 for that?
<mbiebl> IIRC also stuff like umask, chroot etc. is not implemented yet. 
<Keybuk> that stuff's always been implemented
<mbiebl> ah sorry, I mixed it up with an option to run the job as a different user...
<Keybuk> that's never going to be implemented :p
<mbiebl> lol
<Keybuk> the closest to that planned is having users other than root own jobs
<Keybuk> (and having them listen in on that user's and root's events)
<Keybuk> the problem at the moment for me is until I've decided what to do with Upstart, I don't really have much motivation to work on it
<mbiebl> So an option like start-stop-daemons --chuid won't be in upstart. Would have been handy because some sysv init scripts seems to use that functionality
<Keybuk> mbiebl: exec su user -c ...
<mbiebl> yeah, but a separate chuid stanza for that would be "nicer". 
<Keybuk> reimplementing all of su in upstart is "nicer" ?
<Keybuk> mbiebl: what are your thoughts on the mail I sent to upstart-devel?
<mbiebl> I'll have to read it again first.
<mbiebl> I can't promise though, that I can contribute something useful to the discussion which will help you :-)
<mbiebl> Another area, upstart is currently lacking imho, is a flexible output/logging system.
<mbiebl> Might be worth looking at. What was the outcome of the logd issue? 
<mbiebl> Is something like syslog-ng an valuable alternative for that?
<Keybuk> maybe
<Keybuk> I haven't looked into it
#upstart 2008-09-29
<ace_suares> hi there !
<ace_suares> I just wanted to know how to add a 'event' to upstart 
<ace_suares> i made a fiel and tried 'start thatfile' but that said unkonown job
<ace_suares> ping foolano
<ace_suares> Scott James ?
<mbiebl> ace_suares: you can explicitely "create" events with "initctl emit"
<mbiebl> ace_suares: and there are implicit events that are connected to a life-cycle of a upstart job
<mbiebl> which is defined via /etc/event.d/jobname
#upstart 2008-10-02
<Keybuk> /lib/init/jobs.d ?
<sadmac2> Keybuk: no
<Keybuk> why not?
<sadmac2> Keybuk: its configuration info. Its distro-set, but its still configuration info.
<Keybuk> why is it configuration?
<Keybuk> better question
<Keybuk> what changes can/should someone be able to make
<sadmac2> Keybuk: depends on who someone is
<Keybuk> you'd never take the apache job and change it to exec squid ;P
<sadmac2> Keybuk: but you might change its default nice level
<Keybuk> which would result in external package manager change
<Keybuk> and pain
<sadmac2> hmm?
<mbiebl> Keybuk: I like the idea of /lib/init/jobs.d
 * notting likes the idea of a directory that stays in place for more than one release 
<sadmac2> bah!
<sadmac2> we should be using a relational fs and tagging our config files rather than relying on path
<Keybuk> notting: not 1.0 yet
<sadmac2> Keybuk: I'm running into some interesting problems with dependency solving\
#upstart 2008-10-03
<sadmac2> Keybuk: around?
#upstart 2009-09-28
<x-warrior> I'm was wondering if with upstart the bootchart works correctly? Some process now start with upstart in /etc/init but I was looking and bootchart just logs rc is this correct?
<blueyed> What can I do about a process with status "start/killed"? The process id appears to be wrong from the beginning.. (can I use expect fork and expect daemon together? - seems like I have to)
<blueyed> pidfile support is not implemented yet, is it?
<blueyed> It appears I can neither start or stop a "start/killed" process?!
<sadmac2> blueyed: what would you think expect fork and expect daemon together would do?
<blueyed> expect 3 forks?! :)
<sadmac2> blueyed: holy shit, what are you running?
<blueyed> freenet
<blueyed> they have a run.sh, which calls a wrapper.
<blueyed> also I have to call it using "sudo", but that's not a fork already, is it?
<sadmac2> blueyed: sudo may fork. su I'm pretty sure doesn't.
<blueyed> ok. But to try it I need to reset the process somehow. It's not running anymore, but upstart ignores it/me.
<sadmac2> blueyed: interesting. sounds like you may have wedged upstart somehow.
<blueyed> yes.. any idea how to fix/debug this?
<sadmac2> blueyed: without restarting... well you can core the process and post that in a launchpad bug. that at least gives us something to look at
<sadmac2> blueyed: be sure to list the exact package version of upstart you have (include the binary/debug symbols themselves if you built it yourself)
<blueyed> sadmac2: will do.. how do I trigger a core?
<sadmac2> blueyed: gcore
<sadmac2> hmm, coring pid 1 could be interesting... be prepared for strangeness
<blueyed> sadmac2: bug 438313
<blueyed> https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/438313
<sadmac2> blueyed: when you run stop, the job moves to stop/killed
<sadmac2> blueyed: which is correct...
<sadmac2> although I think it should progress out of the killed state
<blueyed> yes.. and stop should exit after all.
<sadmac2> ah. yes. its wedged
<sadmac2> blueyed: are you using a standard ubuntu package? if so attach the exact version installed.
<sadmac2> oh, you did
<sadmac2> never mind
<blueyed> sadmac2: should I attach the run.sh script, too?
<sadmac2> blueyed: hold on to it. dunno that its necessary just yet.
<blueyed> sure. I won't remove it in the next days. Thanks for your help!
#upstart 2009-09-29
<jasonlife> I'm testing Ubuntu 9.10 and it has upstart 0.6.3.    I'd like to disable jobs in /etc/init/, Is there any recommended way to do this?
<jasonlife> Any doc or command?
<mbiebl> jasonlife: there is currently no elegant, non-destructive way to do this
<mbiebl> you can either remove the file
<mbiebl> or comment out the "start on" lines
<mbiebl> inside the jobs
<Esmil> mv <job>.conf <job>.disabled works too
<jasonlife> thanks guys..
<mbiebl> or that
<mbiebl> jasonlife: https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/94065
<mbiebl> fwiw
<jasonlife> thanks
<ion> Better comment out the start on line. If you delete it, it might reappear when upgrading.
<ion> i think
<mbiebl> ion: not with dpkg ;-)
<ion> Ok, good to know.
<mbiebl> ion: to reinstall missing conffiles you need dpkg's --force-confmiss option
<ion> Alright
#upstart 2009-09-30
<lcapriotti> hi, what would be the best option to start an interactive script at boot with upstart?
<lcapriotti> ie something similar to 'su -c "/usr/bin/ascript" -l' ?
<sadmac2> lcapriotti: you would need to run it with the console output stanza
<lcapriotti> ... any online examples ?
<lcapriotti> tks btw
<sadmac2> start on startup
<sadmac2> console output
<sadmac2> exec /usr/bin/ascript
<sadmac2> ^^there's an example :)
<lcapriotti> cool, it works :) tks a lot
<lcapriotti> now for a more advanced one: what if I need to stop usplash before the script?
<sadmac2> lcapriotti: you would add:
<sadmac2> pre-start exec /whatever/thing/controls/usplash --stop
<sadmac2> or something to that effect
<sadmac2> not an Ubuntu guy ;)
<lcapriotti> nice, seems easy once you know what you are doing ;)
<Keybuk> or add "on starting your-script" to /etc/init/usplash.conf ;)
<Keybuk> pre-start exec stop usplash
<Keybuk> would work too
<lcapriotti> I prefer not to modify a system script, I'll go for "pre-start exec stop usplash"
<lcapriotti> tks a million to both of you!
<sadmac2> np
<milanbv> Keybuk: Hi again!
<milanbv> I've finally come to working on upstart support in the stb without having had the occasion to talk with you about it :-)
<milanbv> ...and sadly it doesn't seem we share the same availability hours
<Keybuk> stb?
<milanbv> system-tools-backends -;)
<Keybuk> ah right
<milanbv> have you seen bug 435935?
<Keybuk> no, I haven't seen that bug
<milanbv> that's basically about implementing a rough upstart support, so that services-admin can be shipped in Karmic without breaking things
<milanbv> I have a patch that works with init.d scripts in Karmic (not upstart jobs yet)
<milanbv> I'd need some feedback to know if that's good enough that I can release the stb 2.8.2, so that it can go into Karmic
<Keybuk> Karmic is almost past Beta
<milanbv> yeah, but that one kind of problematic
<milanbv> we can't break services-admin more than it is now :-)
<milanbv> sorry, my network connection is really bad
<milanbv> (public WiFi, not even allowed to use IRC directly)
<milanbv> did you say something since 21:48?
<ion> Hi Keybuk :-)
<Keybuk> hi
<ion> Is there a way to subscribe to all current and future Upstart blueprints in Launchpad?
<Keybuk> probably not
<Keybuk> blueprint is very underdeveloped
<Keybuk> I don't even use it now
<ion> Any interesting decisions/news/something from LPC? :-)
<ion> The most recent news at the linuxplumbersconf.org: LPC Registration opens 7:30AM PT Wednesday (come early!)
<Keybuk> haha
<Keybuk> no, it wasn't a great conf this time
<Keybuk> casey and I hung out a bit
<Keybuk> bounced a few ideas
<ion> Has anyone came up with a good name for the âlike while, but start on starting and stop on stoppedâ stanza for upstart+1 yet? :-)
<Keybuk> nope
<Keybuk> but I am going to get rid of pre-start, post-stop, etc. from the state machine :p
<ion> Why?
<Keybuk> because we don't need them anymore
<Keybuk> the blocking stuff added to events really gets rid of the need
<Keybuk> so, let's say we simplify a job down to just a process, and events
<Keybuk> we have
<Keybuk>  [ pre-start event ] [ post-start event ] [ pre-stop event ] [ post-stop event ]
<Keybuk>                      [ process being run here              ]
<Keybuk> how would we do a pre-start script?
<Keybuk> easy!
<Keybuk>   on job pre-start
<Keybuk>   task
<Keybuk>   exec ...
<Keybuk> that would block the pre-start event, so block the process being run ;)
<Keybuk> which is exactly what we want
<ion> In that case, it would be nice to be able to put multiple job definitions to a single file, so youâd have the stuff that e.g. does mkdir -p /var/run/dbus in the same file as the stuff that runs dbus.
<ion> Ah, i might have misunderstood. It would still be possible to have pre-start, post-stop stuff in the job definition, it would be just an abstraction that works based on those events?
<Keybuk> exactly!
<Keybuk> even better, it'd be possible to put *any* custom sub-job in the definition
<Keybuk> if we make that really easy, and work well
<sadmac> Keybuk: the only downside is the hideous things I know people will do with this :)
<Keybuk> sadmac: they can do them already
<sadmac> Keybuk: on started pre-start job
<Keybuk> just in separate job files ;)
<Keybuk> sadmac: I kinda like that <g>
<Keybuk>   while apache pre-start
<Keybuk> (while the apache pre-start script is running)
<ion> :-)
<sadmac> that one's ok
<sadmac> actually there'd be no started pre-start, since that would imply a started started, which would imply a started started started...
<Keybuk> or pre-start implies pre-start pre-start implies pre-start pre-start pre-start
<Keybuk>   on portmap pre-start pre-start pre-start pre-start
<Keybuk> we should rename that to "turtle"
<ion> âwhileâ for âstart on started, stop on stoppingâ; the Old English word âhwileâ for âstart on starting, stop on stoppedâ
<sadmac> Keybuk: rename which?
<Keybuk>   on portmap turtle turtle turtle turtle turtle turtle turtle turtle
<Keybuk> turtles all the way!
<sadmac> gdb.fail++
<sadmac> Keybuk: ah
<ion> âsurroundingâ?
<sadmac> ion: you mean as a name for "before"?
<ion> Iâm not sure i like âbeforeâ. It only means, well, before, which is only the starting point.
<sadmac> ion: me neither, we've been trying to rename it for months :)
<sadmac> Keybuk: actually, we may not need before anymore with the new model
<sadmac> Keybuk: while dbus / while dbus running
<Keybuk> something like that yeah
#upstart 2009-10-01
<sadmac> ion, Keybuk: `precludes`?
<ion> keeps from happening; prevents; makes impossible? :-P
<sadmac> ion: antiprecludes?
<sadmac> :P
<ion> run-this-shit-before-running-that-shit turtle
<sadmac> ion, Keybuk: permits
<sadmac> ugh, sounds too security-ish
<Keybuk> leverages
<Keybuk> synergises
<sadmac> Keybuk: then business analysts will try to use upstart to save money
<ion> There should be an ENTERPRISE stanza.
<Keybuk> monetises!
<sadmac> ion: upstart is too simple to contain one. We're going to implement a java/netbeans framework on top of upstart for users needing that.
<Keybuk> upstart.NET
<sadmac> ion, Keybuk : precedes
<Keybuk> still implies an order
<sadmac> Keybuk: we want to imply an order, just a nesting/stacking order rather than a temporal one.
<Keybuk> below
<Keybuk> above
<Keybuk> ;)
<ion> The Enterprise version of Upstart should use XML config files. And XSLT somewhere.
<sadmac> ion: files? fuck no
<sadmac> ion: Upstart-EE pulls its configuration off the ESB in SOAP form from the service configuration servelet
 * sadmac did time in IT
<sadmac> ion: this lets you keep your job definitions in oracle apps
<sadmac> (abcdefgish (abcdish (EXP 'a 'b 'x 'x 'c)) (efgish (EXP 'e 'f 'x 'x 'x 'g)))
<sadmac> Its been a long week. This is what's come of it ^^
<sadmac> I consider myself one who dislikes lisp, but I do so love S-expressions
<ion> keybuk: It would be nice if cron jobs could spout any crap into std{out,err} but the admin would only get the output as email if the job returned a non-zero value. Upstart should behave that way when it implements cron functionality. :-)
<sadmac2> ion: would you care for a pony as well?
<sadmac2> :)
<ion> sadmac: A kitchen sink would be just fine.
<sadmac2> wouldn't it, though?
<ion> From now on, iâll be using http://johan.kiviniemi.name/software/releases/e2croncheck to run e2fsck for my serverâs partitions weekly.
<sadmac2> ion: I'll be using ferrets, but good luck to you
<Md> ion: I am not sure... cron jobs are often used for reporting non-error conditions too
<ion> How about a stanza that sets the behavior for the job?
#upstart 2009-10-02
<ion> Itâs awesome you can run ârestart gdmâ from an X terminal and still have gdm come back up, as opposed to âservice gdm restartâ back when gdm was an init.d service. :-P
<Keybuk> :p
<ion> Of course, setsid or screen worked as a workaround, but nevertheless.
 * Ng curious why -n isn't the default for start/stop
<Keybuk> because that would be wrong
<ion> Indeed
<Ng> I'm assuming that start is an appropriate command to use as a substitude for /etc/init.d/blah start
<Ng> if it is, then -n should be the default because init scripts don't block forever, right? :)
<ion> init.d scripts block until they inform you about whether the action you requested succeeded.
<Ng> perhaps the upstart jobs for eucalyptus are just Wrong[tm], but it kinda seems like it's a bit of a gamble which services will return be to a prompt when I do start foo, and which will just wait forever
<Keybuk> Ng: start doesn't block forever either
<Keybuk> start only blocks until the service is *running*
<Keybuk> and that's why -n isn't the default
<Keybuk> start dbus
<Keybuk> start hal
<Keybuk> works
<Keybuk> start -n dbus
<Keybuk> start -n hal
<Keybuk> doesn't
<Keybuk> (dbus isn't yet listening when you try and start hal)
<Ng> Keybuk: how does it determine the running state?
<Ng> I'm just curious because I did "start eucalyptus-cloud" and I want my shell prompt back ;)
<Keybuk> Ng: exec() caused a close-on-exec file descriptor to be closed
<Keybuk> briefly looking here, but the eucalyptus jobs seem to have code to poll the service until it's actually running
<Keybuk> so I assume because eucalyptus is still starting
<Ng> hmm
<Ng> fair enough
<Ng> that's quite annoying, but clearly not your problem :)
<Keybuk> if you look at /etc/init/eucalyptus-cloud.conf you'll see it has a post-start script
<Keybuk> mdz has put that in there deliberately
<Ng> it all starts up fine if you just let it, or at least it did in jaunty when the init scripts just forked everything off and let it sort itself out
<Ng> but that's not your problem, so I will take my whining elsewhere. thanks :)
<Ng> oh! there was one other tiny little whine I wanted to raise before filing a bug :)
<Keybuk> I think you're probably supposed to use "start eucalyptus" looking at it
<Ng> I was wondering if the output from start/stop/status could be made a little more verbose
<wasabi_> Oh looky!
<wasabi_> We're actually using upstart now!
<Ng> (mainly so it would explicitly say what the current state is, atm i think it's prone to interpretation)
<Keybuk> it does explicitly say?
<Keybuk> warcraft scott% status dbus
<Keybuk> dbus start/running, process 821
<wasabi_> This is very refreshing.
<wasabi_> To see all these .conf files.
<wasabi_> Though somehow fsck runs twice on boot for me. Once after the file systems are mounted.
<wasabi_> And then it fails.
<Keybuk> wasabi_: odd.
<Ng> Keybuk: I was thinking that just sprinkling in a few more words would make it much clearer.. "dbus is running as process 821"
<Keybuk> Ng: the status output is intended to be grep/sedable
<wasabi_> Guessing the mount process is kicked off by a successful fsck
<wasabi_> And it mounts things other than the devices that was fscked
<wasabi_> 'guessing'.
<Keybuk> Ng: not sure I follow though, maybe I'm used to it, but it seems fairly clear
<Keybuk> the only confusing bits come when you get post-start scripts ;)
<Keybuk> eucalyptus-cloud start/post-start, (post-start) process 821
<Keybuk> do you see something like that?
<Keybuk> actually, I think that's even clear now
<Keybuk> eucalyptus-cloud start/post-start, process 821
<Keybuk> no?
<ion> keybuk: How about cmd="$(eval start --sh foo)"; eval "$cmd"; printf "%s, %s\n" "$upstart_status" "$upstart_pid"? :-P
<Ng> Keybuk: so like just now I had it stopped and it said "eucalyptus-cloud: stop/waiting"
<Keybuk> ion: ?
<Keybuk> Ng: right...
<ion> Whoops, cmd="$(start --sh foo)"
<Keybuk> Ng: that seems to be clearly "it's stopped, and I'm waiting for you tell me otherwise" ?
<ion> An alternative to seding the start output: have it output sh commands that set environment variables
<Keybuk> ion: dbus-send is your friend ;)
<Ng> Keybuk: isn't it always waiting to be told something? I was wondering if maybe there could be "stopping" and "stopped"
<Keybuk> ion: 
<Keybuk> warcraft scott% sudo dbus-send --address=unix:abstract=/com/ubuntu/upstart --type=method_call --print-reply /com/ubuntu/Upstart/jobs/dbus/_ org.freedesktop.DBus.Properties.Get string:com.ubuntu.Upstart0_6.Instance string:processes
<Keybuk> method return sender=(null sender) -> dest=(null destination) reply_serial=1
<Keybuk>    variant       array [
<Keybuk>          struct {
<Keybuk>             string "main"
<Keybuk>             int32 821
<Keybuk>          }
<Keybuk>       ]
<Keybuk> --
<Keybuk> <g>
<ion> I wish dbus-send could output data in format one can easily parse from a sh script. :-P
<Keybuk> Ng: no, the only two times it's ever only waiting for commands are "waiting" and "running"
<Keybuk> ion: you could write such a tool
<ion> Sure
<Keybuk> Ng: it's a bit subtle
<Keybuk> for example
<Keybuk> consider the state "stop/running" :)
<Keybuk> and "start/waiting"
<Keybuk> they do exist, they're just a bit brief
<Ng> stop/running makes no sense to my human eyes ;)
<Keybuk> sure
<Keybuk> someone told the service to be stopped
<Keybuk> but it's still running
<Ng> I know what you mean, but I am a simple human wanting to know what my services are doing
<ion> ng: Goal: stop, status: running
<Ng> I'm all for a seddable/greppable interface, but maybe some extra words would help
<Keybuk> simple humans can use the nice GUI I'll write one day ;)
<Ng> I'm a simple human on a server :)
<Keybuk> Ng: though if you can come up with output that makes sense, I'm all ears ;)
<Keybuk> the problem is that words like "starting" and "stopping" are *VERY* specific in Upstart world
<Keybuk> so having upstart use them badly would be confusing
<Keybuk> I guess you'd want
<Keybuk> status --dummy dbus
<Keybuk> dbus is running
<Keybuk> status --dummy apache
<Keybuk> apache will be stopped
<Keybuk> status --dummy hal
<Keybuk> hal will be started
<Keybuk> status --dummy obby
<Keybuk> obby is being restarted
<Keybuk> ?
<Ng> that seems better, although "will be" makes me wonder what those are conditional upon
<Keybuk> (along with "is not running", those are probably the basic meta-states)
<ion> gdm: goal=start status=running process=42 â how about that for both humans and parsing?
<Keybuk> Ng: if you do "start apache" (or someone else does)
<Keybuk> then it'd be "is being restarted" :p
<Ng> how abouy just having an option that spits out machine-readable status, otherwise plain english on the assumption that a simple human wants to know if something is broken?
<Ng> "foo is running as process N", "foo is not running", "foo is starting", "foo is stopping" kidna thing
<Keybuk> it depends on how much information you think the single humans want to know
<Keybuk> I could kill both birds with one stone
 * Keybuk has AN IDEA
<Keybuk> how about, if it's running (and your on a suitable terminal)
<Keybuk> the entire text is GREEN
<Keybuk> and if it's falling over or stopped or whatever it's RED
<Keybuk> and if it's restarting, it's ORANGE
<Keybuk> then you can glance at the colour, and not read the scary text ;)
<Ng> colour is good for me, I have advanced terminals and no vision defects
<Ng> I suspect there is a middle ground that just adapts what you have to be more definitive
<Ng> what about changing the tense of the first state bit?
<Ng> start->started, stop->stopped
<Ng> "stopped/waiting" seems clearer than "stop/waiting"
<Keybuk> again, those are very specific words in upstart parlance
<Keybuk> a job can be stop/stopped
<Keybuk> and start/stopped
<Keybuk> so, you'd have the very very strange output
<Keybuk>   started/stopped
<Keybuk> and
<Keybuk>   stopped/started
<Keybuk> ;)
<Ng> start/stopped is very strange output
<Ng> imho
<Keybuk> actually that's very meaningful
<Keybuk> it tells you that the service is going to be restarted, most likely as a result of a job with "... on stopped YOURJOB" in its conf
<ion> Iâm still proposing saying âthis is the *goal* and this is the *status*â in the output. :-P
<Ng> if I read a bunch of upstart docs. I hope I'm not seeming obtuse, I'm deliberately tryign to be a busy sysadmin who loves the idea of upstart, but hasn't read the docs
<Keybuk> but yes
<Keybuk> I do appreciate your point ;)
<Keybuk> the current status command outputs the exact upstart goal/state combo
<Keybuk> it should simplify that
<Keybuk> you don't need to know the difference between start/starting, start/spawned, start/started & start/running (or stop/stopping, stop/killed, stop/stopped & stop/waiting)
<Keybuk> not unless you're debugging anyway
<Ng> yeah
<Ng> I definitely want to be able to choose to see those
<Keybuk> the simplified model actually makes this simpler anyway
<Ng> but mostly I just want someone to hug me and tell me apache is running properly ;)
<Keybuk> since it reduces the states to starting, started, stopping & stopped anyway
<Keybuk> (intermediate states)
<Keybuk> Ng: I guess you do want to know whether apache is still starting or not
<Ng> sure
<Ng> and by "sure" I mean "definitely, that's the kind of newfangled awesomeness I want from upstart"
<Keybuk> could you file an upstream bug?
<Ng> with pleasure, although it'll be the other side of hometime and dinner :)
<Keybuk> np
<Ng> thanks :)
<PovAddict> can I use upstart on debian? :]
<sadmac2> PovAddict: be our guest :)
<sadmac2> PovAddict: they don't ship it yet (soon) but there's no reason it won't work if you want to hammer it in there yourself.
<Keybuk> no hammer required
<Keybuk> I believe it's as simple as apt-get install upstart
<sadmac2> Keybuk: really? I thought they just decided to use it.
<Keybuk> sadmac2: it's been installable for yeras
<Keybuk> the decision was about it being the default
<sadmac2> ahh, debian. Is there anything they won't make pluggable?
<sadmac2> I guess if you ship two completely different kernels, shipping two init systems isn't a stretch
<wasabi_> expect fork. What's that do?
<wasabi_> Tracks down the pid's using ptrace?
<wasabi_> Also... why do we still spawn recovery consoles asking for the root password?
<wasabi_> Since we don't even set a root password.
<wasabi_> That would seem braindead at this point.
<ion> Huh? My recovery anything doesnât as for root password.
<wasabi_> root@station-1:~# sulogin
<wasabi_> Give root password for maintenance
<wasabi_> (or type Control-D to continue):
<wasabi_> Oh maybe it only does it if you have one. :)
<ion> Well, duh :-)
<wasabi_> Brain fart from a time long past.
#upstart 2009-10-03
<Keybuk> ion: around?
<Keybuk> ion: s'ok, I had a URL for your __abort_msg patch
<Keybuk> that was 404ing
<Keybuk> but I see you filed a bug and put it there
<Keybuk> Ng: you never filed that bug :)
<milki__> what can "/etc/init.conf" be used for? are there any global settings for upstart?
#upstart 2009-10-04
<ion> We are the knights who say NIH
#upstart 2010-10-05
<ellyjones> Morning all. Is there a way to retrieve a job's status (exited normally or abnormally) inside a post-stop command?
#upstart 2010-10-06
<warly> Hello, what is the equivalent of doing sh -x /etc/init.d/<script> with upstart?
<ion> warly: Add to the beginning of the script section of interest:
<ion> exec >/path/to/log 2>&1
<ion> set -x
<warly> ion: thanks
<ion> ellyjones: The environment variables listed in stopped(7) should be available in the post-stop script.
<ion> ellyjones: RESULT is probably what youâre after.
<ellyjones> ion: thanks :)
<Stevee> hello, is anything known about the development process or a possible release date of the next upstart version ?
<ion> Itâs Being Developedâ¢ and the release date is When Itâs Doneâ¢. :-P
<Stevee> wow, that are really great news ....
<ion> ellyjones: Scratch that, they in fact arenât. Letâs see...
<Stevee> upstart is a great tool a great project, but i hate this kind of closed development process ...
<ellyjones> (I ended up wrapping the job in a script instead)
<ion> ellyjones: What will definitely work is another job that has âtaskâ, âstart on stopped fooâ, âscript â¦ (do something with "$RESULT") â¦ end scriptâ. Perhaps Keybuk knows how to do that without an auxiliary job.
<ellyjones> I phrased it as: if ! $CMD; then $CLEANUP; fi and just made it a script
<ion> stevee: Many of us agree. Keybuk is the one to talk about that.
<Stevee> never mind, thanks ion
#upstart 2011-10-03
* jhunt changed the topic of #upstart to: 'Upstart 1.3 "Concordia" | http://upstart.at/ | http://upstart.ubuntu.com/cookbook/ | Post to mailing list if no response here: http://bit.ly/ooeNVv'
* jhunt changed the topic of #upstart to: Upstart 1.3 "Concordia" | http://upstart.at/ | http://upstart.ubuntu.com/cookbook/ | Post to mailing list if no response here: http://bit.ly/ooeNVv
<TJ__> if i want to upstart something when dbus is started, the syntax would be: start on started dbus      right ?
<jhunt> right
<TJ__> thanks
<reed> how would I cd to a directory and execute a command as user "nobody"?
<ion> exec su -s /bin/sh -ec 'cd /path; exec "$0" "$@"' username -- command arg arg
<ion> probably
<reed> that works, and I found the command chdir
<ion> I wasnât sure whether su changes the directory. Probably not without --login.
#upstart 2011-10-04
<pmjdebruijn> hi all
<pmjdebruijn> somehow my raid isn't being properly assembled, I get a /dev/md127
<pmjdebruijn> it is possible that the config isn't present yet, since we do a netboot, which needs to sync the configs first
<pmjdebruijn> the problem is as I've had before dependancies between upstart jobs, and sysv jobs
<pmjdebruijn> I'm wondering whether converting the mdadm sysv script would be a good idea
<pmjdebruijn> I basically need the mdadm script to depend on a custom upstart job
<dcorbin_work> Can I call exit from an upstart script safely?  Do the values indicate success/failure?
<jhunt> pmjdebruijn: if you're running ubuntu, you might want to raise a bug with full details.
<jhunt> dcorbin_work: yes. See http://upstart.ubuntu.com/cookbook/#standard-environment-variables (see EXIT_STATUS)
<dcorbin_work> jhunt: thanks
<dcorbin_work> jhunt: That documents what upstart sets.   Not what my upstart script should do to clearly indicate failure. (at least, that's how I see it)
<savid> How can I emulate start-stop-daemon's "-c <user>:<group>" option in upstart?
<jhunt> dcorbin_work: 0 success, anything else is failure unless you override it: "man 5 init" and search for "normal exit".
<jhunt> dcorbin_work: normal exit is for respawning of services though.
<dcorbin_work> I think I've found another way to do what I want, but what I was trying to do was "check for a pre-condition", and fail if it wasn't there.
<dcorbin_work> job A has "start on starting B".  I want to be sure A is completely up before B starts.  If I have a post-start script that checks to make sure A is completely up, is that adequate?  Will a start request for B wait until all processors of "on starting B" have finished?
<dcorbin_work> How can I see all the events that init is triggering?
<jhunt> dcorbin_work: your job A/B example doesn't make sense - which job starts first? "start on started X" (not "starting") might do what you want?
<dcorbin_work> jhunt: for B to run, A must be up.  But, just because A is started, doesn't mean B should start
<jhunt> still not clear exactly what you're trying to do. I have to go now, but if please feel free to post further details to the upstart-devel mailing list at the link in the topic.
<jhunt> In answer to one of your other questions: http://upstart.ubuntu.com/cookbook/#obtaining-a-list-of-events
<savid> Does anyone know how can I emulate start-stop-daemon's "-c <user>:<group>" option in upstart?
<savid> basically, change the user and group of the running process?
<hallyn_> interesting - so pre-start stanzas only run when there's a job to actually kill?  if you have a job with only a pre-start and pre-stop, then pre-stop does nothing...
<hallyn_> SpamapS: ^ perhaps that should be 
<hallyn_> mentioned in the cookbook?
#upstart 2011-10-05
<SpamapS> hallyn_: yeah that would be good
<dcorbin_work> When a job has a script in it, is there some way to see the stdout/stderr of that script?
<dcorbin_work> :q
<dcorbin_work> I have an upstart job that is trying to use environment variables inside of a shell script.  It /looks/ like my variable references ${FOO} are being translated to "" by upstart.  I'm at a loss here.
<jhunt> dcorbin_work: http://upstart.ubuntu.com/cookbook/#see-the-environment-a-job-runs-in
<jhunt> dcorbin_work: http://upstart.ubuntu.com/cookbook/#environment-variables
<dcorbin_work> jhunt: I looked through all of those.  None of those confirm or even describe if all environment variables references in the script are processed by upstart rather than the shell.
<dcorbin_work> let me give you a pastebin
<dcorbin_work> http://pastebin.com/uKBuQhTA  : I'm finding things improved if I use "\$" instead of "$"
<dcorbin_work> But, the escaping only works if it's inside double-quotes. Weird
<jhunt> that's not a complete .conf file. Why are you using bash? I'm rather intrigued by what you're trying to do since there are very few reasons to use a while loop in a job like that.
<dcorbin_work> jhunt: I was using bash because I find it impossible to get useful information about a failing script out of upstart.  I didn't know dash existed until this morning, and I don't know what's different.
<dcorbin_work> That top part was the entirety of a post-start script
<jhunt> "man dash" - seriously, you shouldn't need to use bash. There's a section in the cookbook if you insist, but I'd recommend against it.
<dcorbin_work> What I'm trying to do, is poll the server to be until it is actually finished coming up.
<jhunt> that doesn't fit upstarts model; the server daemon needs a .conf file so that when the server is ready, the "started JOB=<server>" event will be emitted. You can then write a job that uses that to trigger further actions if required.
<dcorbin_work> I will probably drop it before I'm done,  I did "man dash", but I don't find it "small and absorbable'
<jhunt> it's a lot smaller than "man bash" :)
<jhunt> Most of the syntax is the same.
<dcorbin_work> We're starting a jboss server.  It completes the launching fairly quickly, but everything is not fully deployed and ready at that time.
<dcorbin_work> I agree that polling is "not desireable".
#upstart 2011-10-06
<Slapshot|Linux> Hi, I am having trouble getting my upstart to run at boot. Any help would be great.
<pmjdebruijn> jhunt: we're using a heavily customized setup
<pmjdebruijn> where we synchronize configurations
<pmjdebruijn> in an upstart job
<pmjdebruijn> but parallization of the rc sysv init seems to be problematic
<pmjdebruijn> in the past I just upstartified the packages and be done with it
<pmjdebruijn> but for complexer init scripts this is well a pain and very error sensitive
<pmjdebruijn> we're actually doing a migration to ubuntu (from debian)
<pmjdebruijn> but in our custom setup, upstart seems to make this very painful
<jhunt> ??? I don't understand what the problem is? If you have specifics, please can you post to the mailing list or raise bugs if you think you've found one?
<pmjdebruijn> it's not really a bug
<pmjdebruijn> ideally my problem would be solved if I could depend the sysv rc upstart job on another upstart job
<pmjdebruijn> but if I do that my whole init breaks
<pmjdebruijn> I tried that before
<pmjdebruijn> system won't reboot anymore
<pmjdebruijn> I guess I might mail to the mailing list if I have time to workout my case
<jhunt> are you saying that existing sysv scripts fail to run correctly when started by upstart?
<pmjdebruijn> no sorry
<pmjdebruijn> sysv works
<pmjdebruijn> but it runs to soon
<pmjdebruijn> it should only run _after_ another upstart job
<pmjdebruijn> which synchronizes the local configuration from a remote host
<pmjdebruijn> but it's being parallized
<pmjdebruijn> so stuff isn't starting because there is no configuration yet
<pmjdebruijn> we're talking about network bootend hosts he
<pmjdebruijn> here*
<jhunt> you really need to migrate your sysv job to upstart then. There is a way to do what you want though...
<jhunt> 1) disable the sysv job by removing the sym links.
<pmjdebruijn> yeah
<pmjdebruijn> it's just that the sysv script is _very_ complex
<jhunt> 2) create an upstart job "wrapper" for it that does "start on event-i-need" and "exec /etc/init.d/my-sysv-service"
<pmjdebruijn> oh
<pmjdebruijn> lol
<pmjdebruijn> that's an idea
<pmjdebruijn> it's a horrible hack
<pmjdebruijn> but that would work though
<pmjdebruijn> for nagios-nrpe I created a real upstart job
<pmjdebruijn> which is just requires a trivial patch
<pmjdebruijn> but your suggestion would work for everything
<pmjdebruijn> jhunt: thanks for that suggestion
<pmjdebruijn> jhunt: btw, just implemented the wrappers
<pmjdebruijn> jhunt: it seems to work nicely
<pmjdebruijn> jhunt: thanks for the tip
<jhunt> np. of course you'll need to ensure that the sysv sym links don't get re-instated if the packages get updated say.
<pmjdebruijn> that's not an issue
<pmjdebruijn> it's a ramdisk based setup
<pmjdebruijn> so it's static
<pmjdebruijn> everytime we update the ramdisks, we also have a QA phase (which should catch that)
#upstart 2011-10-09
<umonkey> hello.  what do I do if upstart thinks a job is running when it's not?  I can't restart it, "stop name" just hangs.
<JanC> umonkey: if you mean a temporary fix, there is a script somewhere that forks until it has the PID that upstart thinks should exist
<JanC> the real fix is to fix the job configuration and reboot, of course
<ion> The real fix is to fix Upstartâs fork tracking code. Thatâs in the pipeline somewhere. Poke Keybuk. :-P
<JanC> ion: right, but that's not something most users can do  ;)
<ion> http://heh.fi/tmp/workaround-upstart-snafu
<ion> workaround-upstart-snafu 12345, where 12345 is the pid Upstart thinks the job has.
<JanC> and most jobs can be written to work with the current upstart
<ion> yeah
#upstart 2012-10-01
<mp___> hi, porting some stuff from runit. question: runit will let me manage services as a non-root user without using sudo. assume that upstart doesn't?
<mp___> also, is there a way in upstart to send an arbitrary signal to a currently running process? eg, I need to send USR2 to unicorn to get it to reload
<mp___> (HUP will make it drop connections, which is not what I want. USR2 is closer to a 'graceful' restart')
#upstart 2012-10-02
<j4m3s> SpamapS, you around?
<j4m3s> is it possible to specify how many times a program will fork for the expect stanza?
<SpamapS> j4m3s: I am now, sorry, whats up?
<SpamapS> j4m3s: no, you can do 1 (expect fork) or 2 (expect daemon)
<SpamapS> j4m3s: any reasonable program should only ever fork that many times to become the eventual master process anyway
<j4m3s> bigcouch forks 33 times before 
<SpamapS> I doubt that
<SpamapS> j4m3s: those are probably threads
<SpamapS> the advice in the cookbook isn't entirely accurate.. I'm convinced the clone bits need to be re-evaluated
<j4m3s> well i used the cookbook to determine the fork count
<j4m3s> SpamapS, this is what i have so far
<j4m3s> http://pastie.org/private/okibfp83s2oi5lb6emag
<SpamapS> j4m3s: erts should have a "don't daemonize" flag somewhere..
<SpamapS> err, not erts, but erl
<j4m3s> SpamapS, so if i start a process in pre-start and i want to stop it in post-stop, but it's not being killed. what am i doing wrong? http://pastie.org/private/apk4xedro2xtrbinygsg 
<SpamapS> j4m3s: that looks like it should, in theory, work
<j4m3s> because it tells me it stop the job, and the main process is stopped but the other one still exists
<SpamapS> j4m3s: btw, your start on is crap.   "runlevel [2345]" is what you want (Unless you're on a release of Ubuntu before 11.10, then you want 'net-device-up IFACE=whateveryourethXis'
<j4m3s> lol
<SpamapS> j4m3s: pgrep isn't exactly an exact science
<SpamapS> j4m3s: perhaps log the pid you try to kill
<j4m3s> SpamapS, can you tell me if this variable usage is not allowed in upstart 0.6.5? http://pastie.org/private/wk1pteb9vmdkbmepkicq
<j4m3s> specifically line 21 & 22
<j4m3s> ie. it works with line 22 and doesn't work with line 21
<SpamapS> j4m3s: there is no expansion in env statements, even in the latest upstart
<j4m3s> SpamapS, that answers that! thx again!
<j4m3s> SpamapS, does that mean i couldn't do var=$foo:/usr/bin ; env PATH=$var ?
<SpamapS> j4m3s: correct, that will not work
<j4m3s> SpamapS, will variable expansion work in an exec stanza?
<SpamapS> j4m3s: yes
<SpamapS> exec and script are fine
<SpamapS> and start/stop on too
<SpamapS> and instance
<j4m3s> SpamapS, so i am trying to use $EMU in the exec and it's not being set properly any ideas? http://pastie.org/private/ti12eytjhg23h07evyohww
<SpamapS> j4m3s: in a script statement, you don't want to say 'env XXX...'
<SpamapS> j4m3s: just XXX=...
<SpamapS> j4m3s: and you don't need to export it
<j4m3s> SpamapS, ok gotcha
<SpamapS> j4m3s: as the shell that you're setting it in, is the one evaluating the exec line
<j4m3s> SpamapS, can you have two execs in a script statement?
<SpamapS> j4m3s: sure, but only one will happen because exec replaces the current process
<SpamapS> j4m3s: you can background stuff tho
<SpamapS> foo1 & exec foo2
<j4m3s> SpamapS, is it possible to do something like TMP=`env VAR=$foo` within a script statement?
<j4m3s> SpamapS, is there another way i can set an environment variable in that shell that can handle variable expansion?
<j4m3s> SpamapS, http://pastie.org/private/df0a1urpr2ajq1dslzjaq
#upstart 2012-10-04
<telmich> good day
<telmich> I'm trying to find out why my init script is not executed on shutdown on centos 6.3 which seems to use upstart - can you give me a pointer on how to debug this
<telmich> the chkconfig output and the init script is placed at http://home.schottelius.org/~nico/unix/linux/centos/
<jodh> telmich: firstly, why aren't you writing an Upstart job then? :-)
<jodh> telmich: I suspect your problem is that you have not created a lock file for your SysV service. Take a look at RedHats /etc/rc and I think you'll find you need to create /var/lock/subsys/$service. This is totally RH-specific behaviour - nothing to do with Upstart btw.
<telmich> jodh: found the bug - it's in centos - but I'm not actually interested in using upstart, it "has just been placed there" by centos
<telmich> jodh: yep, that's what I found ~5 minutes ago - but good to have this verified
<SpamapS> jodh: how's stateful re-exec looking? No show-stoppers?
<SpamapS> jodh: I've been running your PPA on my two quantal boxes since the call for testing. No troubles that I've seen yet.
<jodh> SpamapS: alas, it won't make it into quantal. The tests are not complete yet and I've discovered an issue that needs resolving before it's made generally available. The plan is to get it into 'R' as early as possible.
<SpamapS> jodh: cool. Any chance R will also see a fix for the old dead-pid bug?
<jodh> SpamapS: difficult to say at this stage. I'd certainly like to see that issue resolved. There's an idea for me to run an Upstart dev workshop session @ UDS that might encourage more contributions so we can work though the TODO list faster :)
<gyre007> how does upstart compare to runit ? can I use upstart as a service supervisor ?
<jodh> gyre007: Upstart is a service supervisor. See: http://upstart.ubuntu.com/ and http://upstart.ubuntu.com/cookbook/.
<gyre007> cool jodh, how does it compare to runit...we are in a process of deciding whether to go with upstart or runit...i read that upstart is not working properly in EC2 ....
<jodh> gyre007: I've never used runinit. What EC2 problem are you referring to?
<gyre007> some people are saying that upstart has troubles with reloading configs ? because of the networkFS nature of EC2
<gyre007> that inotify has some problems with it...
<SpamapS> gyre007: thats nonsense
<jodh> gyre007: sorry, I don't know what you mean. There are no problems with inotify and upstart that I'm aware of.
<SpamapS> gyre007: EC2 is not a network FS
<gyre007> well I dont know I havent tried it...thats why I came here to ask....as I said we are in a process of deciding which tool to use...
<SpamapS> gyre007: can you please point me where these rumors are being spread so I can help them find the truth
<gyre007> SpamapS, its not NFS....but the FS has a "etwork" nature
<gyre007> SpamapS, on Quora
<SpamapS> gyre007: EC2 uses block devices attached to VMs. Those block devices have regular file systems running on them, and inotify works great.
<SpamapS> gyre007: inotify is also not *required* for upstart to work
<SpamapS> gyre007: it makes things convenient, but you can also just 'sudo initctl reload-configuration' and boom.. new configuration
<SpamapS> gyre007: this might be a good reason for me to finally join Quora ;)
<gyre007> :)
<gyre007> one more thing...does it restart the service if it crashes
<SpamapS> gyre007: yes
<SpamapS> gyre007: fairly configurable.. but it may give up.. so its just a convenience, you'll want something smarter if you need it to apply complex logic
<SpamapS> gyre007: 'man 5 init' and read 'respawn' and 'respawn limit'
<gyre007> it may give up :)...in what situations ?
<SpamapS> gyre007: when the respawn limits are reached
<gyre007> I see...reading up now...interesting
<SpamapS> gyre007: also 'normal exit' is important
<gyre007> i see...does upstart use init script or does it completely ignore them ?
<jodh> gyre007: it supports SysV services as well as its own "jobs". I strongly recommend having a read through the Upstart Cookbook.
<gyre007> yeah will do...its quite massive though :)....looks bigger than the bible mate
<jodh> gyre007: it does need a bit of a restructure. For the hyper-terse overview, read "man 5 init" (which is still "the" Bible for Upstart).
#upstart 2012-10-07
<gyre008> when I change upstart job definition do I have to reload the service or will upstart notice it automatically ?
<ion> Upstart will notice it, but it will actually apply when the job is stopped and started again.
<gyre008> I see
<gyre008> cheers ion 
#upstart 2013-09-30
<jodh`> Plaese can one of the devs review lp:~jamesodhunt/upstart/bypass-quiesce-logic-for-pid1 ?
#upstart 2013-10-01
<jodh> xnox: can you review lp:~jamesodhunt/upstart/bypass-quiesce-logic-for-pid1 today please? I'd really like to get this into the package this morning if possible.
<modafinil> I'm trying to have an upstart job that uses setuid/setgid have a pre-start script that runs as root -- I think the way to do this is dropping permissions in my script
<modafinil> Is there a better way?
<modafinil> it's a pain to do this with sudo (which I guess would work) because I'm running some bash specific stuff, and a two line script block
#upstart 2013-10-02
<PaulePanter> Hi. Any idea, how with Ubuntu 12.04 there can be nothing in `/var/log/dmesg`, but reboots with Ctrl + Alt + Del are logeed in `/var/log/wtmp`?
<PaulePanter> I cannot look at the screen as this is a remote server.
<PaulePanter> # more /var/log/upstart/udev-fallback-graphics.log
<PaulePanter> FATAL: Error inserting vesafb (/lib/modules/3.8.0-31-generic/initrd/vesafb.ko): No such device
<PaulePanter> Sorry probably wrong channel.
<PaulePanter> So how can I tell upstart to log the errors from initramfs somewhere?
<PaulePanter> http://paste.ubuntu.com/6183185/
<PaulePanter> I have no access to the screen and just network. I can ping, but SSH does not work.
<jodh> PaulePanter: upstart doesn't run in the initramfs.
<PaulePanter> Even stranger then, why some files in `/var/log/upstart` are written and nothing else.
<xnox> PaulePanter: because rootfs got mounted RW and upstart started to execute?
<xnox> PaulePanter: or it's from previous boots.
<PaulePanter>  /var was not separate and on / , so at least `/var/log/dmesg` should have been written.
<tseliot> hi all, do you know how to make sure that an upstart job starts before lightdm does?
<tseliot> apparently "login-session-start" is too late
<jodh> tseliot: "start on starting lightdm"
<tseliot> ah, as simple as that? Thanks
<jodh> tseliot: yes :)
<tseliot> great :)
<xnox> tseliot: e.g. ubiquity job does that. And that's for a system job.
<tseliot> thanks
<tseliot> jodh, xnox: is there a way to start a job on log out?
<xnox> tseliot: yes, but it will be a user session job, not a system one.
<tseliot> xnox: as long as it works
<keruom> Hi all. This must be obvious but I can not find a good answer for it - suppose I want to have a service A that depends on another service B-  if service B is not running there is no point in running service A. I would use "start on started B".
<keruom> But is there anything that prevents me from calling "initctl start A" when the B is not running?
<xnox> tseliot: "start on session-end" i think should kick a job upon logout (.... which could be shutdown, reboot)
<keruom> as I can see it right now, there isn't a way how to do it. The only solution would be to put some checks in "pre-start" but it seems redundant and ugly for me. I believe upstart must have something to handle this.
<xnox> tseliot: man 7 session-end, you have a TYPE variable which can be "shutdown" or "logout" if you care about that.
<tseliot> xnox: does that work in 12.04?
<xnox> tseliot: no, that's saucy only.
<xnox> tseliot: there is no upstart user sessions in prior releases.
<tseliot> too bad, I really need a solution for 12.04
<xnox> tseliot: there should be something from gnome-session, where things are run on logout or some such.
<xnox> tseliot: what do you want / need?
<xnox> actually?
<tseliot> xnox: I need to run some programs (with root privileges) as soon as I log out
<xnox> not sure that at all makes sense security-wise. What are you doing?
<tseliot> xnox: disable the discrete graphics card
<xnox> tseliot: ah.
<xnox> tseliot: checkout lightdm's "# session-cleanup-script = Script to run when quitting a user session (runs as root)"
<xnox> would that work for you?!
<tseliot> xnox: are you suggesting that I get the code from there and use it in 12.04?
<xnox> tseliot: lightdm can be configured to run scripts on logout.
<tseliot> ah
<xnox> tseliot: i'm telling you to look into lightdm's capabilities, cause upstart is of no use to you.
<xnox> tseliot: similarly you probably want to look into lightdm's setup as well, instead of going upstart way.
<tseliot> xnox: right, I think it's a good idea. Thanks
<xnox> tseliot: there are many other setup scripts as well in lightdm, for display, greeter, etc.
<tseliot> right
<tseliot> I'll have a look at them, thanks
<keruom> anobody ^^
<keruom> anybody pls ^^ ?
<xnox> keruom: correct way to check if a service can be run is in pre-start, and abort then with non-zero exit code. Or just make your exec fail, and well it should fail if the conditions are not right.
<xnox> keruom: it's perfectely acceptable to run $ initctl start A, and for A to fail to start.
<xnox> keruom: also read the upstart cookbook.
<xnox> linked from the topic.
<xnox> there are plenty of things that will fail to run, when manually triggered with $ initctl start A, when it's dependencies are not actually satisfied.
<keruom> xnox: aha, I thought that there should be some more automatic test for this case
<xnox> keruom: if root wants to start something, one should be able to. And we never assume that it will actually succeed, it may or it may not.
<xnox> keruom: you can do this $ initctl emit started JOB='B'
<xnox> which will trigger starting all jobs that depend on B =)
<keruom> xnox: ok :) but I don't believe a normal admin would remember to do it this way
<keruom> xnox: sure, root can start what ever he wants to, but not through upstart scripts, if there is a hard dependency :) (or with --force or something)
<xnox> keruom: upstart is not a dependency based system. it has no dependency resolution. there are no hard dependencies. only events, and reacting to events (either start or stop)
<xnox> similarly init.d scripts, despite declaring LSB headers & dependencies, one can always just execute them directly and see what happens, e.g. $ service foo start
<keruom> xnox: yeah, that's what I learned
<keruom> xnox: sadly :)
<xnox> keruom: you can do "start B" in the A.conf pre-start, to enforce a dependency ;-)
<xnox> to get the semantics of if B fails to start, A will not start either. Or otherwise check status of B in A's pre-start. See examples in the cookbook, for cases where such strong guards are wanted.
<keruom> xnox: ok, thanks, I just thought there could be a better way. But you are right, since it is event based, it doesn't make much sense
<keruom> but it is btw hard to debug your upstart configuration than, isn't it?
<loa> hello
<loa> i created upstart job under ubuntu
<loa> sudo start mjpg-streamer works well
<loa> stop mjpg-streamer too
<loa> but it don't start after system start
<loa> i will show you code of it if you want
<loa> here it is http://pastebin.com/fBez4Rap
<loa> i have ubuntu 13.10
<loa> what can i check? or maybe i need add my job somewhere
<loa> ?
<keruom> xnox: ^^ that's what I am talking about :)
#upstart 2013-10-03
<xnox> keruom: not really, no. We have logs available for all jobs in /var/log/upstart/$job.log and if one cranks up debugging, one can see all events arriving and what triggered which jobs.
<xnox> if there is a race one does typically need logs from a failed condition & a good one, to spot the race. But that's what is usually done anyway.
#upstart 2013-10-04
<eh> Hi, can anyone assist me with upstart problem?
<eh> I am writing a upstart script to start emacs daemon
<eh> However, stopping through initctl does not work.
#upstart 2013-10-05
<jaha> can anyone help me get session jobs enabled in 13.04
<jaha> i followed the instructions to enable the "tech preview" of user sessions by uncommenting irc://irc.freenode.net:6667/#ubuntuÂ in /etc/upstart-xesseions, restrated and nothing changed
#upstart 2014-09-29
<lnykryn> diky!
<staykov> hey is there a way to continue a job even if an pre-start or script line fails?
<staykov> i dont see anything the cookbook
#upstart 2014-09-30
<JanC> staykov: just make sure that it doesn't "fail"?
<JanC> e.g. by adding "|| true" to the command
<JanC> (in a script)
<LBV_User> hi all, my (somewhat) first time with upstart... where can I find a simple documentation on how to create an job? I need to autostart autossh...
#upstart 2014-10-01
<undata> hi, I'm running my upstart job as a user in the audio group; however, when my job tries to play sound via shelling out to aplay, it says permission denied
<undata> when I run the same job (a python program) by hand, I can use aplay
<undata> what am I doing wrong?
<undata> making the user's primary group audio "solved" it
<undata> though that's not ideal
#upstart 2014-10-02
<gblazer> Hi there, I have an upstart script for Unicorn. I just upgraded Ubuntu and Upstart, and now it doesn't work because upstart has a new expect stanza that I didn't use. Can anyone help out with `expect fork` or `expect daemon` for Unicorn?
#upstart 2015-09-28
<fannagoganna> Hi, getting an error when I am using gunicorn to start a flask webapp, it looks like my user environment is not getting properly imported, Traceback (most recent call last):
<fannagoganna>   File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 473, in spawn_worker
<fannagoganna>     worker.init_process()
<fannagoganna>   File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 100, in init_process
<fannagoganna>     self.wsgi = self.app.wsgi()
<fannagoganna>   File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 115, in wsgi
<fannagoganna>     self.callable = self.load()
<fannagoganna>   File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 33, in load
<fannagoganna>     return util.import_app(self.app_uri)
<fannagoganna>   File "/usr/lib/python2.7/dist-packages/gunicorn/util.py", line 362, in import_app
<fannagoganna>     __import__(module)
<fannagoganna>   File "/mnt/software/sources/tanim_flask_app/app/__init__.py", line 54, in <module>
<fannagoganna>     from app import models, views, views_google, views_mendeley
<fannagoganna>   File "/mnt/software/sources/tanim_flask_app/app/views_mendeley.py", line 9, in <module>
<fannagoganna> Sorry for the spam, let me try again
<fannagoganna> Traceback (most recent call last):
<fannagoganna>   File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 473, in spawn_worker
<fannagoganna>     worker.init_process()
<fannagoganna>   File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 100, in init_process
<fannagoganna>     self.wsgi = self.app.wsgi()
<fannagoganna>   File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 115, in wsgi
<fannagoganna>     self.callable = self.load()
<fannagoganna>   File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 33, in load
<fannagoganna>     return util.import_app(self.app_uri)
<fannagoganna>   File "/usr/lib/python2.7/dist-packages/gunicorn/util.py", line 362, in import_app
<fannagoganna>     __import__(module)
<fannagoganna>   File "/mnt/software/sources/tanim_flask_app/app/__init__.py", line 54, in <module>
<fannagoganna>     from app import models, views, views_google, views_mendeley
<fannagoganna> Hi, getting an error when I am using gunicorn to start a flask webapp, it looks like my user environment is not getting properly imported, Traceback (most recent call last):
<fannagoganna> here is the link, http://pastebin.ca/3177390
<fannagoganna> I found a workaround on my Linux Mint 17.2 box, by running "sudo apt-get install python-requests-oauthlib," although I don't know why gunicorn launched with upstart could not see my user installed python packages.
#upstart 2015-10-01
<zennist> hi, how can I start other upstart jobs from one upstart job?
<zennist> the idea is that I have a job that runs instances - I want another job that on machine restart automatically start some default instances of the previous job
#upstart 2015-10-02
<gregpol> hey guys, I added âkill timeout 620â  into /etc/init/job.conf  to make it sending SIGKILL in 620 sec instead of 5 as default but it does not do the job. Any thoughts?
#upstart 2016-10-07
<Joy> hi there. how do i debug a failure of the "rc" task to proceed from the start/starting phase?
<Joy> i get this in the verbose log
<Joy>  [    7.350295] init: rc-sysinit goal changed from stop to start
<Joy>  [    7.350332] init: rc-sysinit state changed from waiting to starting
<Joy>  [    7.363147] init: rc-sysinit state changed from starting to pre-start
<Joy>  [    7.363379] init: rc-sysinit state changed from pre-start to spawned
<Joy>  [    7.363773] init: rc-sysinit main process (1375)
<Joy>  [    7.364232] init: rc-sysinit state changed from spawned to post-start
<Joy>  [    7.364347] init: rc-sysinit state changed from post-start to running
<Joy>  [    7.720749] init: rc goal changed from stop to start
<Joy>  [    7.720848] init: rc state changed from waiting to starting
<Joy>  [    7.723587] init: rc-sysinit goal changed from start to stop
<Joy>  [    7.723678] init: rc-sysinit state changed from running to pre-stop
<Joy>  [    7.723768] init: rc-sysinit state changed from pre-stop to stopping
<Joy>  [    7.760079] init: rc-sysinit state changed from stopping to killed
<Joy>  [    7.760184] init: Sending TERM signal to rc-sysinit main process (1375)
<Joy>  [    7.770977] init: rc-sysinit main process (1375) exited normally
<Joy>  [    7.771035] init: rc-sysinit state changed from killed to post-stop
<Joy>  [    7.771221] init: rc-sysinit state changed from post-stop to waiting
 * AnrDaemon facepalmsâ¦
<AnrDaemon> Don't you have access to some kind of pastebin service?
<Joy> surely i wasn't interrupting a lively debate with a dozen extra lines
