#upstart 2007-07-24
<JK455> hi
<JK455> i let a question, if someone has the answer :) :
<JK455> is there something that will not allow me to use Upstart as a kernel module loader ? (according to me not, but ..)
<JK455> i mean, module loading can be done with scritp, so Upstart could do it right ?
<AlexExtreme> yes
#upstart 2007-07-25
<highvoltage> hi, if I create an inittab on feisty, will it be used?
* Starting logfile irclogs/upstart.log
#upstart 2009-07-20
<PuffTheMagic> does upstart have dbus bindings:?
#upstart 2009-07-21
<mbiebl> PuffTheMagic: 0.6 has a dbus interface
<mbiebl> dbus bindings is something slightly different :-)
<PuffTheMagic> is it possible to build upstart with out dbus or does it strictly rely on it
<mbiebl> libdbus is used for the internal ipc
<mbiebl> it's not possible to build without it
<PuffTheMagic> ok so the Palm Pre uses upstart for init... but I dont see anything upstart related in /etc/dbus-1/*.d/
<PuffTheMagic> can someone help me get get my userland setup so I can talk to upstart from another program
 * JamesB192 suposes it might be using 0.3.x or 0.5.x in all likelyhood in which case no dbus support.
 * JamesB192 has not read anything about it.
<Keybuk> PuffTheMagic: as far as I know, the Palm Pre uses Upstart 0.3.8
<PuffTheMagic> damn... so pre dbus
<Keybuk> yeah, it's a couple of years old
<Keybuk> haven't been able to get through to any of the Palm webOS developers
<sadmac> ahh, take-it-and-go open source. Not just for the BSD license any more!
 * ion posted to http://thread.gmane.org/gmane.comp.version-control.git/123658 as well
<Stevee> hello
<Stevee> i'm one of the developers of a linux based firewall distribution
<Stevee> and we want to replace sysvinit with upstart in our next version
<Stevee> i've compiled upstart like the tutorial on the upstart webpage
<Stevee> but it doesn't work correctly
<Stevee> at first rcS is starting, and also the scripts
<Stevee> but at the switch to the runlevel the system is freazing
<Stevee> when i use init=/bin/bash and use /sbin/init or /sbin/telinit plus runlevel i always get the same error message
<Stevee> Failed to connect to socket /come/ubuntu/upstart: Connection refused
<Stevee> oh i'm sorry the error message is
<Stevee> Failed to connect to socket /com/ubuntu/upstart: Connection refused
<plautrba> Stevee: do you have any tty jobs? 
<Stevee> yes i have tty jobs for upstart
<Stevee> but can i use the example scripts from 3.11 also in 6.1 ?
<plautrba> almost yes but it has to be in /etc/init/with .conf suffix
<plautrba> i've started with tty9.conf with "start on startup"
<Stevee> oh, i miss the .conf suffix
<Stevee> okay, maybe thats the problem
<Stevee> mhm, made no difference
<Stevee> the system feezed again
<Stevee> after the execution of all rcS scripts
<mbiebl> Stevee: which version of upstart ?
<Stevee> the newest one 0.6.1
<mbiebl> could you pastebin the jobs files in /etc/init/*.conf
<Stevee> yes, no probelm
<mbiebl> Stevee: you can also try to run upstart in debug mode
<Stevee> just a  moment
<mbiebl> add "--debug" to the kernel command line
<Stevee> mhm, how i chan do that
<mbiebl> depends on the boot loader
<mbiebl> with grub it's pretty easy
<Stevee> after init=/sbin/init --debug ?
<mbiebl> yeah
<Stevee> a question only one job can be at startup or ?
<Keybuk> as many as you want
<plautrba> Stevee: anotherproblem i had was that in fedore is not /etc/init.d/rc but  /etc/rc.d/rc
<plautrba> Stevee: it's called from rc.conf
<Stevee> yes that was my fitst problem
<Stevee> in our distribution we also have no /etc/init.d/rcS
<Stevee> so i had to change to exec /etc/init.d/rc S in the jobfiles
<plautrba> /etc/init.d/rcS is for me /ert/rc.sysinit
<Stevee> okay, now i can switch between the tty
<Stevee> on tty1 is the boot process, but its freezed again
<Stevee> on tty2 to tty6 i got a login promt
* Keybuk changed the topic of #upstart to: Upstart 0.6.2 "Buggrit, millennium hand and shrimp" | http://upstart.ubuntu.com/
<Stevee> do i need a jobfile for the runlevels ?
<sadmac> Stevee: if you want to use them for anything
<sadmac> Stevee: should be possible to have one job file cover them all now.
<Stevee> like the rc.conf in the current ubuntu developement version ?
<Stevee> karmic ?
<Stevee> okay, once again, all scripts from rcS are finished
<Stevee> but no runlevel change
<Stevee> but i've got 6 tty's
<sadmac> Stevee: what aren't you seeing in terms of runlevel change?
<Stevee> the problem is nothing
<Stevee> i got the echo from the last rcS script
<Stevee> and than nothing on the tty1
<sadmac> hm
<Stevee> on the other tty's i got a login promt
<Stevee> how can exec /etc/sulogin on tty2 or an other tty ?
<sadmac> don't think you can
<Stevee> mhm
<Stevee> thats bad
<sadmac> why would you?
<Stevee> to get into the test system
<Stevee> at it is alpha 2
<Stevee> on other tty's i got a login promt but we have no users and passwords at the moment
<_|ms|_> hi guys
<_|ms|_> I need some help with the integration of upstart
<sadmac> go ahead
<_|ms|_> I don't want to use the compat sysv mode :D
<_|ms|_> and I'm searching for some advice how to do the "new" mode :D
<_|ms|_> there are only very few example scripts...
<sadmac> well there's not too much of a set way of doing it. You can look at what ubuntu has on launchpad
<_|ms|_> I already have :D
<_|ms|_> well, what I already have done:
<_|ms|_> ./configure ... && make && make install
<_|ms|_> and now, do I only have to put the *.conf files to /etc/init?
<_|ms|_> seems too easy to me :D
#upstart 2009-07-22
<voxadam> I see it mentioned that Upstart is going to support timed and scheduled jobs replacing cron but I don't see any Blueprints/specs for it in Launchpad, on the wiki or in the bugtracker, and the last mention of it on uostart-devel was two years ago. Has this functionality been abandon?
<ion> There have been more pressing things to do.
<voxadam> I can appreciate that. Are timed and scheduled events still planned?
<ion> Yes. Probably not yet for the next major release (0.10), though.
<ion> Unless Keybuk has other ideas
<Keybuk> ion: main piece of work there is the parser
<keesj> Hi
<Keybuk> hey, how goes it?
<keesj> I am doing alright. Thanks for looking at the ini.conf patch
<Keybuk> keesj: that's ok, sorry I didn't recognise your e-mail address
<Keybuk> it came through to me as the commit message with your bzr address
 * Keybuk has just about finally unburied himself from Launchpad e-mail
<Keybuk> two years worth of bugs, commits, merge requests, build logs, etc.
<Keybuk> tip: if you ever become a manager, don't try and hang on to development ;-)
<keesj> last time I started put time in upstart I hit the dbus version problem and I didn't want to upgrade the system yet
<Keybuk> keesj: the 1.2.15 dep?
<Keybuk> 1.2.16 is out now, which fixes a whole bunch of bugs
<keesj> the bug you found in dbus and sent a patch to them
<keesj> yes, but there other components using dbus so I can' easly do it
<Keybuk> oh right, it should be entirely backwards compatible with other things in 1.2.x though
<Keybuk> you could always build 1.2.16 statically (but not install)
<Keybuk> then point upstart's build at it, so it'll statically link to it
<Keybuk> I think it's something like
<Keybuk> dbus$ ./configure --disable-shared
<Keybuk> upstart$ ./configure DBUS_CFLAGS="-I../dbus" DBUS_LIBS="../dbus/libdbus.a -lpthread -lrt"
<sadmac> Keybuk: all the testcases in upstart list the .o files of the code they're testing as libraries and link statically, rather than just listing the .c files as additional sources. What does that accomplish?
<Keybuk> sadmac: doesn't make any difference to the output?
<Keybuk> it does mean you're testing the built .o files, of course
<Keybuk> though in practice, they'd get re-used anyway
<sadmac> Keybuk: I'd have to look at the output to make sure. In theory it should be functionally identical
<sadmac> I don't see what /interesting/ differences you'd get out of that, if any.
<Keybuk> just style mostly
<Keybuk> _SOURCES for a test are the test
<Keybuk> under nih it links the library
<sadmac> Keybuk: might be nice to have libnih provide some M4 macros around that. Its a bit confusing at times.
<sadmac> UD?
<Keybuk> Urban Dictionary
<sadmac> oh yes
<sadmac> I have a notoriously monotone friend, and we sometimes have him read UD definitions to us for amusement
<mbiebl> Keybuk: would you mind moving dist_man_MANS = man/nih-dbus-tool.1 inside the if INSTALL_HI endif?
<Keybuk> it's probably a bug that it isn't ;)
<Keybuk> patch me!
<mbiebl> lp oder directly via email?
 * sadmac fixes a small leak in Keybuk
<Keybuk> mbiebl: your preference
<Keybuk> LP means I'm less likely to forget about it
<mbiebl> ok then
<Keybuk> should I vanish before you send it
<Keybuk> mbiebl: how's getting Upstart 0.6 into Debian going?
 * Keybuk noticed sid was still on 0.4
<Keybuk> err 0.3
<mbiebl> upload today or tomorrow
<Keybuk> sweet
<Keybuk> mbiebl: I don't think the extra bit of your patch is necessary
<Keybuk> automake is smart enough to see dist_* inside an if
<Keybuk> so patch2 will dtrt anyway
<mbiebl> Keybuk: sure?
<Keybuk> yeah
<Keybuk> I rely on that elsewhere
<Keybuk> m4/Makefile.am for example
<mbiebl> tried it, and it wasn't included
<mbiebl> oh, m4 files have a special meaning
<mbiebl> you don't need to add them to dist files at all
<mbiebl> they will end up in the dist tarball in any case
<mbiebl> the man page won't
<Keybuk> that seems like a bug
<Keybuk> dist shouldn't change depending on configure options
<mbiebl> well, that's how it is unfortunately
<Keybuk> DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
<Keybuk>         $(srcdir)/Makefile.in
<Keybuk> it's included in DIST here
<Keybuk> oh, hah
<Keybuk> but dist_man_MANS never gets defined
<Keybuk> silly Automake
<Keybuk> is definitely automake bug ;)
<mbiebl> yeah
<Keybuk> it's trying to do the right thing, but failing
<mbiebl> that's why you need the workaround with the variable defined outside of the NIH_INSTALL scope
<mbiebl> Keybuk: dist_man_MANS = $(manpages) and EXTRA_DIST = $(manpages) is doubled
<mbiebl> just a minor nit though
<mbiebl> Keybuk: still around?
#upstart 2009-07-23
<mbiebl> Keybuk: I added you on CC on the kfreebsd port email
<mbiebl> Hope you don't mind
<Keybuk> nope, no problem
<mbiebl> hm, upstart 0.6.2 fails to compile on ia64
<sadmac> mbiebl: oh well. guess we just can't have ia64 anymore. What a cryin shame.
<sadmac> :)
<mbiebl> sadmac: don't you support RHEL on ia64?
<sadmac> mbiebl: don't crush my dreams!
<Keybuk> ooh, I felt something there
<Keybuk> hmm, nope, just wind
<Keybuk> thought for a second I might have cared about ia64
<Keybuk> ;-)
<sadmac> ia64 = EPIC fail
<Keybuk> and if you tell me it fails to build on sparc, or pa-risc, or some other toy architecture I really will get sarcastic
<Keybuk> I swear that most of these architectures only exist for the purposes of running Debian buildds for these architectures
<sadmac> mbiebl: what's it bitching about?
<Keybuk> ptrace
<sadmac> Keybuk: oh just wait'll we start pushing into the secondary arches :)
<sadmac> Keybuk: dealt with System-Z much?
<sadmac> m41nphr4m3 FTW
<Stevee> hello, i've just a simple question: how can echo something on the console
<Stevee> as example: Starting service xyz.....
<Stevee> with upstart
<mbiebl> Stevee: Add "console output" to your job file
<mbiebl> And then you can add a pre-start script echo "foo" end script
<Stevee> okay, inside the job file console output
<Stevee> and echo "foo" in the pre-start
<mbiebl> yeah
<Stevee> okay, thank you very much
<mbiebl> the output won't go to a virtual terminal though
<mbiebl> So you'll have to switch to ttyN
<Stevee> okay, so my next question how do i get ttyN
<Stevee> i have job files for that
<Stevee> and they are started
<Stevee> but i can't switch between the tty's
<Stevee> so what went wrong ?
<Stevee> or what dependencies are for ttyN
<mbiebl> CTRL+ALT+FN ?
#upstart 2009-07-24
<Keybuk> wow
<Keybuk> I just totally came up with a use case for a "cool feature" I've been unable to justify for ages
<ion> Please elaborate. :-)
<Keybuk> the ability to specify names of jobs on the command line
<Keybuk> either to be force-started or disabled
<sadmac> I don't follow...
<sadmac> do jobs have names? job classes have names...
<sadmac> I should say "will they." They have them now
<Keybuk> a good question ;-)
<sadmac> Keybuk: AAR, what are you on about?
<Keybuk> I'm not entirely sure myself
<Keybuk> it must be Friday
<sadmac> why...yes...it is...
<tomwe> hello. what is the latest version of upstart that supports dbus-1.2.14?
<ion> Better question to ask: what is the latest version of dbus that supports upstart-0.6.2 :-P
<tomwe> i know, but i have a problem with latest dbus
<tomwe> ok found it: 0.5.3.. i hope it is not too old
#upstart 2009-07-25
<sadmac2> hooray for internet!
#upstart 2009-07-26
<Stevee> hello, i've a question on upstart and udevd
<Stevee> on startup, the kernel file systems got mounted
<Stevee> and on started mount-kernel-filesystems ok
<Stevee> the udev startd
<Stevee> sorry starts
<Stevee> but i got after Root initialized an error message
<Stevee> /proc/sys/kernel/hotplug: No such file or directory
<Stevee> because /proc is not mounted yet
<Stevee> also it seems that udevd freezes
<Stevee> are there example scripts/jobs for upstart 0.6.2
<Stevee> i only found for 0.3.9 one
<sepeth> hi, when I am compiling upstart-0.3.9, i got this: 
<sepeth> wire.c:120: error: 'INT_MIN' undeclared (first use in this function)
<sepeth> wire.c:120: error: (Each undeclared identifier is reported only once
<sepeth> wire.c:120: error: for each function it appears in.)
<sepeth> wire.c:120: error: 'INT_MAX' undeclared (first use in this function)
<sepeth> wire.c: In function 'upstart_pop_unsigned':
<sepeth> wire.c:196: error: 'UINT_MAX' undeclared (first use in this function)
<sepeth>  
<sepeth> I simply included limits.h in wire.c, and then it is successfully compiled, and all tests are passed
<ion> Why not 0.6.2? :-)
<sepeth> hmm, thanks. my distribution has 0.3.9 as a latest, but i can inform them.
<Stevee> good evening, i've a problem with upstart 0.6.2 and udev
<Stevee> when i mount tmpfs with " mount -n -t tmpfs tmpfs /dev -o mode=755 " upstart freezes at the udev job
<Stevee> if i remove thes command from my job file, every thing works fine
<Stevee> but i get error messages, because the filesystem is read only
<Stevee> has anybode an idea ?
<Stevee> oh sorry, has anybody an idea, what the problem is ?
<Stevee> so it is better
<ion> http://en.wikipedia.org/wiki/DRAKON http://sage.com.ua/screens/UDPChatServerDRAKON.png
#upstart 2010-07-27
<ion> http://slashdot.org/submission/1292828/Elite-Group-to-Reboot-the-Web-in-Case-of-Terrorism
<sipa1024> hello, i have an upstart job that i want start after a particular cryptdisk is started
<sipa1024> is that possible?
<sipa1024> sorry, nvm
#upstart 2010-07-28
<mrvn_> moin.
<mrvn_> How do I tell upstart to stop foo before rc is stopped but only for runlevels 0 and 6?
<mrvn_> With "stop on ((starting rc and runlevel [!2345]) or runlevel [2345])" in foo why does rc no longer start?
<mbiebl> mrvn_: is that starting rc or stopping rc?
<mrvn_> starting.
<mrvn_> The system comes up, starts foo and rc stays stuck in "starting" and getties don't appear.
<mbiebl> mrvn_: you said: " before rc is stopped"
<mrvn_> rc is started on every runlevel change.
<mrvn_> The background is that we start a kvm instance on boot and stop it on reboot. But while the kvm instance is shutting down the rc job kills all processes.
<mrvn_> The rc job has to be delayed until the kvm job has finished stoping.
<mrvn_> It looks like the above statement makes the rc job wait for a "stoped foo" event but for runlevel=2 that never comes.
<mbiebl> mrvn_: right stop on starting foo, will block foo until the job is stopped
<mrvn_> But "stop on ((starting rc and runlevel [!2345]) or runlevel [2345])" in foo makes rc block.
<mrvn_> Is there a way to emit an event and wait till all jobs waiting for that event have finished processing it?
<mrvn_> Is there a command to simulate what upstart would do for an event?
<mbiebl> mrvn_: haven't tested, if that works: stop on starting rc RUNLEVEL=[06]
<mrvn_> will do later. Need to finish something with higher priority currently.
<mrvn_> mbiebl: Thanks, works.
#upstart 2010-07-29
<frederickjh> I have a program that is using settings in /etc/security/limits.d/<program>.conf to give it real time priorities. This is not working on boot with upstart but restarting the service after boot allows it to star with real time priorities. I see in the list of started processes a polkitd that is started by dbus. Is the polkitd what needs to be running before my job starts?  I do not see a upstart job for this so how do I make it wait til
<[diablo]> evening 
<[diablo]> anyone running Ubuntu 10.04 here please?
<[diablo]> ah, forget it, just answered my own untold question :-)
#upstart 2010-07-30
<KjetilK> feels like a FAQ, but I couldn't find an answer: I have an upstart job on MythBuntu 10.04 that depends on services started by a couple of custom init.d-scripts, and it seemed like the obvious thing to do was just to emit an event in the init.d script and check for it in the upstart job, but that did not seem to do the trick
<KjetilK> do I need to rewrite the init.d scripts to upstart jobs, or is there a quicker fix?
<KjetilK> hmmm, I certainly didn't emit the event correctly, but the question still stands, what's the best way to do this?
<KjetilK> s/best/quickest/ # actually...
#upstart 2010-07-31
<KjetilK> I got a bit further with my problem yesterday, but I could use a hand in translating this init.d-script to an upstart job: http://dolot.kipdola.com/wiki/Install_SASC-NG#Init_script (BTW, if anyone is in doubt, what I'm doing is legal here)
<KjetilK> there is the runsasc script, which I suppose I could just exec
<KjetilK> (the runsasc script is elsewhere on the same page)
<KjetilK> there is a lot of additional complexity in there though, with timeouts and stuff, that is quite magical to me, and also I don't know if its needed under upstart, and also if there are better ways to deal with the insertion of the dvbloopback kernel module
<ion> Is the module related to hardware? If yes, udev should autoload it. If not, it could be loaded with modprobe in a pre-start script.
<ion> Something like this should work for starters:
<ion> exec runsasc  # no forking here
<ion> post-start script
<ion>   until [ -e /tmp/SASC_COMPLETE ] ...
<ion>   (if timeout occurred) exit 1
<ion> end script
<ion> Based on that, Upstart should handle the stopping when needed.
<ion> Remember to rm -f /tmp/SASC_COMPLETE in pre-start script.
<KjetilK> ion, ok, nice!
<KjetilK> the module is only loosely related to hardware, in that it sets up a loopback device for a video stream that comes from hardware
<KjetilK> so, I guess pre-start is better
<KjetilK> hmmm, loading the driver is a large part of what runsasc does
<KjetilK> perhaps I should try to do everything in the upstart job
<KjetilK> hmmm, or perhaps not...
<ion> Instead of the polling for the file, it might be better to use e.g. inotify. Incidentally, i wrote <http://github.com/ion1/wait-for-file> a couple of years ago, but that doesnât support a timeout. OTOH, is the timeout really necessary?
<ion> If runsasc fails, wonât it just return with a non-zero exit value?
<KjetilK> I have no idea why they are using the timeout, this is too magic for me...
<KjetilK> hmmm, it seems runsasc kills itself if it fails...
<KjetilK> hmmm, perhaps I should try to write a minimal upstart job first, not looking too much at what runsasc does
<KjetilK> and if that doesn't work, go from there...
<KjetilK> runsasc has a lot of sleeps, is that a workaround for not having a proper event-based startup system?
<KjetilK> i.e., something that could be done better with upstart?
<ion> If it does any amount of preparation and then finally execs a single, independent server, thereâs no need to split it. If it runs two independent services, it would be a good idea to create two jobs.
<KjetilK> AFAICS, it just inserts a module, then starts a single daemon
<KjetilK> but it seems to sit around and wait for things to come up
<KjetilK> looks like those who wrote this had some problems they solved by doing this, but I don't know...
<KjetilK> anyway, bbiab, gotta put the kid to bed :-)
 * cwillu_at_work drops a hint about how he'd like to be able to run scripts as a user via "user <foo>" :p
#upstart 2010-08-01
<ion> cwillu: Still in TODO. :-) It might make it into 0.10, which Keybukâs been working on full-time for a while now.
#upstart 2011-07-25
<danolj> morning
<danolj> so how do I make it so that respawn doesn't go into effect after a stop has been issued?
<JanC> it should never do that AFAIK
<JanC> danolj: maybe somehow it crashes?
<danolj> http://pastebin.com/xu9P54ig
<danolj> that's the upstart script for our redis instance
<danolj> in the pre-stop script the CLI line tells the server to shutdown gracefully
<danolj> in the redis logs it is indeed shutting down as expected, however, upstart/init simply starts things up again
<danolj> exit status problem perhaps?
<JanC> maybe, although I thought that doesn't matter in case you use 'stop'
<danolj> JanC: yes, that is what the docs say, but I've yet to figure out why it continues to restart after stop
<danolj> okay, here is what is happening
<danolj> by asking redis to shutdown gracefully, init sees that it has "died" and restarts it
<danolj> so if I remove the 'cli shutdown' command, all is good, however, it sure would be nice to stop things gracefully
<JanC> danolj: you can tell upstart what other exit statuses / signals are allowed to stop it?
<danolj> JanC: not sure I understand what you're saying
<JanC> danolj: I was referring to the "normal exit" stanza
<danolj> okay, let me go read about it 
<danolj> JanC: thank you for that pointer, allowing 'TERM' as a valid exit status fixed the problem
<danolj> er, not problem, rather provided a reasonable solution
<danolj> Thank you
#upstart 2011-07-26
<fbond> Hi.  The default umask for upstart services seems to be 0.  Wouldn't it be safer to default to 0022?
<fbond> Hm, I do see JOB_DEFAULT_UMASK is 022, but I have a process that is creating directories with mode 777.
<fbond> Nevermind, problem with the daemon ...
#upstart 2011-07-31
<loconut> hello
<loconut> anyone home?
#upstart 2012-07-24
<ianawilson> hi everyone. I'm having trouble with a simple upstart script for sentry (django sentry)
<ianawilson> the conf is really, really simple
<ianawilson> https://gist.github.com/3169891
<ianawilson> but when I run
<ianawilson> service sentry start
<ianawilson> it hangs, appearing to do nothing
<ianawilson> i can ^C it, but then it thinks the process is running. stopping it hangs as well.
<ianawilson> the service never seems to start
#upstart 2012-07-25
<danielc27882> I've removed some upstart configuration files, is it possible to have upstart reload its config (So I can kill the tasks)?
<danielc27882> .. without having to reboot the machine?
<ion> Stop the running jobs, i think they should disappear.
<danielc27882> they keep restarting..
<ion> Whatâs the command you ran to stop them?
<danielc27882> well, i just removed the files from /etc/init/, then killed the processes 
<ion> Try âstopâ.
<danielc27882> ok, will try
<ion> The jobs were configured for respawning upon the process dying.
<danielc27882> ok, thanks, should have thought of that myself :)
#upstart 2012-07-27
<dan2003> Hi, Im having some trouble trying to implement a service at shutdown. I need to dump mysql tables to .db files, so have tried top use start on stopping mysql. My service runs but mysql gets stopped before it has a chance to dump the tables, how can i prevent mysql from actually stopping untill my service has finished (without hacking the mysql scripts?)
<dan2003> and also - if it was to take a while - is there some way to ensure the machine doesn't just switch off before its finished?
<jodh> dan2003: I think you'll have to tweak /etc/init.d/sendsigs. search for mysql in that file.
<dan2003> ok, thanks
#upstart 2013-07-22
<SpamapS> xnox: flirting with a 5-digit LP bug eh? ;) Nice work on the reload signal stanza :)
<xnox> SpamapS: i think i did get a 4-digit one last year in installer, need to check =))))
<xnox> SpamapS: but yeah, needs review from jodh, as the dbus unit tests are a bit crazy. They fork a dbus server & client and make them talk to each other from a single source-code......
<SpamapS> I love that
<SpamapS> but, I'm a fan of fakes :)
<xnox> jodh: any comments / help with above dbus tests for https://code.launchpad.net/~xnox/upstart/reload-signal/+merge/176099 are appreciated =)
<daguz> stupid user question:  how does upstart track a process?  i'm trying to get it to start a process (redis) and only as root.  I can get it to start but not status nor shutdown.  Simply the script says exec redis-server config.file .   The pid file is created in /var/run/ .   
<xnox> daguz: "redis upstart" gives me https://gist.github.com/bdotdub/714533
<xnox> daguz: but looking at the jobs, this one is better https://gist.github.com/twoolie/4617553
<daguz> I'll try the second one.  I tried a number of versions I saw when searching.      
<jodh> xnox: ack - I'll take a look tomorrow.
<xnox> cool.
#upstart 2013-07-23
<methods2> is there an upstart event that fires before normal daemons launch ? 
#upstart 2013-07-24
<jodh> xnox: !?!... http://paste.ubuntu.com/5906905/
<xnox> jodh: i honestly swear i have no idea. I did the break-lock from my end, try again?
 * jodh breathes sigh of relief
<jodh> xnox: works now, thanks :)
<jodh> xnox: did you interrupt a push or something?
<xnox> Narf! =)
#upstart 2013-07-26
<teeceepee> hi my job is stuck at stop/waiting
<teeceepee> and when I stop it i get unknown start
<teeceepee> how do I kill it
<teeceepee> anyhelp
#upstart 2014-07-24
<rjr> I'm running upstart 1.5 on Ubuntu Precise. I created a job in /etc/init. It showed up in initctl show-config and things seemed to be working ok for a few minutes, and then I noticed it was no longer picking up changes (e.g. no matter what I set 'start on' and 'stop on' to, initctl show-config still used the old values)
<rjr> I've removed the files from /etc/init and they still show up in show-config (and when I query dbus directly with com.ubuntu.Upstart0_6.GetAllJobs)
<rjr> or rather, one of the files I removed no longer shows up, but the other one still does.
<rjr> I've added and removed other files just to verify the inotify job is still picking things up. It just won't get rid of this one entry.
<rjr> I suspect it had to do with setting the 'expect fork/daemon' setting wrong as I've seen a few other reports of similar issues
<rjr> got it. It was https://bugs.launchpad.net/upstart/+bug/406397   I resolved my issue by spawning a process with the right pid and letting upstart reap it.
<rjr> Always fun when someone reinvents the wheel and makes it square instead.
<checkers> hi, I'd like to run mkfs on a particular device before local filesystems are mounted. Is the Right Way to implement this as an upstart job that has 'start on starting local-filesystems'?
<checkers> I feel like this one-time command is a bit of a weird fit for a job-based system, is there some 'just run this script' thing I can do without needing to modify OS dist files?
<om26er> Hi! I need help with this upstart job http://bazaar.launchpad.net/~phablet-team/address-book-service/trunk/view/head:/upstart/address-book-service.conf
<om26er> initctl seems to not be able to stop the service on my phone, it does print that the service stopped but it actually keeps running
<jodh> om26er: what does 'status address-book-service' show? maybe the binary is forking and therefore not being tracked correctly by upstart. Anything in ~/.cache/upstart/address-book-service.log?
<xnox> om26er: which of the two upstarts are you stopping it with? and which upstart is the job running on?
<xnox> om26er: compare $ adb shell status address-book-service
<xnox> om26er: with $ adp shell sudo -u phablet -i status address-book-service
<om26er> xnox, the one as phablet user reports the other just says 'Unknown job'
<xnox> om26er: so, try stopping with e.g. $ adb shell sudo -u phablet -i stop address-book-service
<xnox> om26er: if it keeps running, then either the job<->daemon are buggy.
<xnox> om26er: or the service is otherwise activated e.g. direct invocation or like via dbus
<om26er> xnox, yeah it says 'address-book-service stop/waiting' but the service keeps running with the same pid
<om26er> also address-book-service.log doesn't have anything
<om26er> jodh, ^
<om26er> xnox, on desktop where upstart job is not used, the service does get started when its dbus interface it poked
<xnox> om26er: probably the job never started via upstart...
<xnox> om26er: try this -> kill the address-book-service, check that none are running.
<om26er> xnox, it respawns instantly
<xnox> om26er: start via upstart and stop via upstart, and verify that service is running and stops.
<xnox> om26er: kill it harder =) e.g. kill -9 
<xnox> om26er: and e.g. remove the dbus activation service file, to prevent things from spawning it.
<om26er> xnox, kill -9 and -3 respawns, I can try removing the dbus service file to check
<om26er> since the service only supports one instance, initctl thinks it was able to start the service after I stop and start it but in reality only the old instance keeps running
<om26er> xnox, yes, deleting the dbus activation service file did the trick
<om26er> now start/stop works with upstart
<xnox> om26er: well you need to choose one or the other.
<xnox> om26er: a few services that tedg wrote do "$ start job" in their dbus activation file.
<xnox> om26er: such that it's always run under upstart.
<xnox> om26er: when ubuntu transitions to systemd that race will be gone, as dbus activated services are running as systemd units - just like the rest of the jobs.
<om26er> xnox, ok, I'll take this to the address-book-service developer and figure out a solution with him
<om26er> xnox, is there any example project where tedg did that ?
<xnox> om26er: i can't remember of the top of my head. just browse dbus activation files on the phone and look those that launch wrappers that ultimately call $ start job
<om26er> xnox, alright, thanks 
#upstart 2014-07-25
<fluter> hi
#upstart 2015-07-24
<wolverineav> hi, quick question - i have some old scripts that do 'update-rc.d <service-name> disable' to disable the service to come up after reboot. i can't find a similar command in initctl
#upstart 2015-07-25
<Fare> hi
<Fare> how do I tell upstart to NOT put .pid files in my ~/
<Fare> for upstart-dbus-bridge  and upstart-file-bridge
#upstart 2016-07-25
<twb> I haven't edited an upstart job in a long time
<twb> I have one that says:
<twb> exec su supybot -s /bin/sh -c 'exec supybot --allow-default-owner /var/lib/supybot/supybot.conf'
<twb> If I want to run savelog /var/log/irc/messages.log first, can I put a second "exec" line in there?
<twb> Or... IIRC I do something like 'exec start \n <shell script> \n exec stop"
<AnrDaemon> twb: You can remove that abomination of exec first.
<twb> Aha "pre-start exec"
<AnrDaemon> And use setuid to change EUID of the job.
<twb> Note that this is an ancient host running upstart 0.6.5 and I'm not allowed to upgrade
<AnrDaemon> *sigh*
<twb> I don't see "setuid" mentioned in init(5) so I'm just gonna slap a "pre-start exec savelog" in there, and run away
<twb> OK, it's working good enough for government work
<twb> Thanks for your help & sorry to grief you with an ancient version :-(
<AnrDaemon> Hate those systems. >.<
#upstart 2016-07-27
<django566> Hello everyone, is anyone here?
<django566> JOIN /linux
#upstart 2016-07-28
<AnrDaemon> That's a â¦ whole level of absurd. http://pastebin.com/yaRvyUPh
#upstart 2016-07-30
<lucas_ai> I made a simple service and put it in /etc/init.d/potentialstudio ... why am I getting this error: Failed to start potentialstudio.service: Unit potentialstudio.service not found. 
<lucas_ai> I made a simple service and put it in /etc/init.d/potentialstudio ... why am I getting this error: Failed to start potentialstudio.service: Unit potentialstudio.service not found. 
<lucas_ai> I made a simple service and put it in /etc/init/potentialstudio.conf ... why am I getting this error: Failed to start potentialstudio.service: Unit potentialstudio.service not found.
#upstart 2017-07-26
<Schnabeltierchen> hi guys, is here the right place for init.d related things? aka upstart?
<hallyn> init.d is not upstart...
#upstart 2017-07-29
<guest087662> I guess upstart is dead?
