#upstart 2007-03-26
<azriel> anyone around?
<azriel> well, i was reading an article and upstart was mentioned, but nothing about the status of it, i was wondering if its already being used by default in ubuntu
<mbiebl> http://upstart.ubuntu.com/
<EruditeHermit> hi, when I installed upstart on my debian box, it seemed to start everything sequentially like sysvinit
<EruditeHermit> is there something I need to do to make it start htem in parallel?
<wasabi> Yes, you need to rewrite every single init script on your system.
<wasabi> Get busy!
* Starting logfile irclogs/upstart.log
<Fuzzy76> are there any newer documentation regarding the implementation plan mentioned half way down on http://www.netsplit.com/blog/articles/2006/08/26/upstart-in-universe ?
<Fuzzy76> the goals seemed to have been missed, so I was just wondering what the current roadmap looked like :)
<sadleder> Fuzzy76: have a look at http://people.ubuntu.com/~fabbione/irclogs/upstart-2007-03-16.html, Keybuk answered on that question there
<Fuzzy76> So if I understand correctly, there will be a separate repository for packages with upstart jobs, and if I add that, my Feisty will use those?
<sadleder> Fuzzy76: that's how I understand it
* Md trolls debian-devel...
<cortana> Md: optimism ;)
<cortana> though i'd like to see lenny switch too 
<sadleder> mbiebl: hi, are you trying to keep differences to other distributions (e. g. ubuntu) in jobs small?
<mbiebl> sadleder: the current package in experimental is basically identical with the one in feisty.
<mbiebl> So, sure, I want to keep the difference as small as possible.
<sadleder> mbiebl: I just wondered why upstart-jobs is not a branch from replacement-initscripts
<mbiebl> sadleder: this is just a repo for my to toy around.
<sadleder> mbiebl: ok
<mbiebl> It's nothing official.
<sadleder> mbiebl: the bootchart you pointed me to looked impressive
<mbiebl> I probably shouldn't have put it on my public web site ;-)
<sadleder> ;-) 
<sadleder> mbiebl: just found it on a search for a toy to play with ;-)
<tale_> why isn't the concurrency setting turned on by default on feisty?
<tale_> I saw it on digg in a performance tips blog that someone had posted.
<tale_> they said to set it to shell
<tale_> instead of none
<tale_> I saw one guy in the comments that said it made his system boot slower
<tale_> I thought concurrency was going to be enabled with upstart for this release.  Of course, I don't know that much about upstart.
<tale_> Either everyone is asleep or nobody knows the answer.  Which is it?  :-)
<darx> greetings folks :)
<darx> how can i remove an application from running at the startup?
#upstart 2007-03-27
<AlexExtreme> tale_, the native upstart boot on feisty isn't enabled because the scripts haven't been written yet :) the developers decided to spend more time testing rather than just rush it to get it in. it will definitely be in feisty+1
<fruell> hallo
<sadleder> Keybuk: nomeata proposes "Instance-Capable Init Scripts" http://www.joachim-breitner.de/blog/archives/231-Debian-Ideas-Instance-Capable-Init-Scripts.html
<sadleder> Keybuk: this could easily be done with different options per instance in upstart, if daemons support it
<Keybuk> sadleder: I don't agree that it's as easy as he claims
<sadleder> Keybuk: what do you mean?
<Keybuk> well, take apache for example; you'd have to write a new apache configuration, and arrange directories for different pid/scoreboard files, log files, etc.
<sadleder> well, sure, applications have to provide full support for that, but the upstart side could provide it.
<Keybuk> it doesn't really seem like a useful thing to provide though?
<Keybuk> every application would need the different options passed, and have different ways of finding out how many "instances" it needs
<Keybuk> some might need to iterate a directory, some might have them all in one file, some might need entire directory structures, etc.
<Keybuk> and tbh, since you've got to reconfigure the daemon anyway, why not copy the event.d file while you're at it?
<sadleder> so you mean putting in a new event file is just enough.
<sadleder> might be
<sadleder> so just ignore what i said
<AlexExtreme> Keybuk, did you see my post to the mailing list about disabling/enabling jobs? what did you think to my idea?
<mbiebl> AlexExtreme: afaik Keybuk is averse to symlinks ;-)
<Keybuk> allergic is the usual word :)
<_ion> ln -s . this_dir
<AlexExtreme> hmm :)
<Keybuk> "." is a link anyway
#upstart 2007-03-29
<Keybuk> http://www.ctrlaltdel-online.com/comic.php?d=20070328] 
<Keybuk> http://www.ctrlaltdel-online.com/comic.php?d=20070328
<Keybuk> even
<Keybuk> nice to see humour being made of a major setback to software development
<sadleder> Keybuk: there was an email on upstart-devel "full upstart in feisty?" which i cannot find in the archive
<Keybuk> sadleder: archiver probably having a bad day
<Keybuk> (reported to SA)
<sadleder> Keybuk: just wondered
* Keybuk skims through the new GPL-3 draft
<Keybuk> I still don't see what this licence offers the ordinary developer that the GPL-2 doesn't
<cwillu> question:  I'm running upstart on feisty, with some instance jobs set to respawn.  how do I find out what the original args were to the instance?  it seems like I don't receive them on respawn
<Keybuk> bug, please file
* cwillu sighs
<cwillu> well, first, I need to write a workaround I guess, I doubt I'll see a bug fix in the next 8 hours :)
<cwillu> brb
<Keybuk> Subject: 	Your Amazon.co.uk order has dispatched
<Keybuk> oh dear
<Keybuk> there goes all my productivity for at least a week!
<sadleder> Keybuk: what did you order?
<Keybuk> Command & Conquer 3
<AlexExtreme> my productivity has gone down since I got this new TV tuner :p
#upstart 2007-03-30
<obsidian> hi
<obsidian> anyone knows the sda hda problem under feisty?
<obsidian> udev f$@ks up
#upstart 2008-03-24
<brendan_> anyone around for a (hopefully) easy question?
<brendan_> well.... i'll just throw it out here, in hopes that someone takes note. :)
<brendan_> i'm using upstart inside a xen domU
<brendan_> (aside: works great, very happy with it)
<brendan_> however, i've noticed something wierd when using the "console output" stanza
<brendan_> if the script runs during the startup phase (ie, "start on startup") then everything works great
<brendan_> if i switch to runlevel 2 (by calling /sbin/runlevel --set=2) then i start getting the "staircase effect" for anything starting up afterwards
<brendan_> i've tried setting "stty onclr", but it doesn't work. (capturing the output of stty -a shows that the setting has been set)
<brendan_> obviously, this is just a nit-picky display issue since there is no functional problem with upstart running
<brendan_> but i was hoping someone had an idea of something else i could try
<brendan_> i can run "tput hpa 0" to reset the line to the left everytime before i echo something out, but that only works for things i intentionall echo
<brendan_> STDERR output still ends up with the staircase effect
<brendan_> any ideas?
<keesj> brendan_: perhaps it  is a tty that gets started on runlevel 2 , the replacement inits do grep /etc/inittab and do perform kinky actions
<brendan_> would upstart itself be doing that behind the scenes?
<keesj> yes, can be 
<brendan_> the only scripts upstart is running are the ones i've placed in event.d - the ones that call external scripts in init.d have all been replaced
<keesj> in that case I guess not. I have no idea :p
<brendan_> heh. drat
<keesj> but apparently you do use the "compatible" scripts. As I understand it "runlevel" really is a system v scripts
<brendan_> is there a better way to switch the runlevel?
<brendan_> or is the idea that runlevels will disappear completely with upstart eventually?
<keesj> the whole concept of runlevels as numbers is "system 5 init"
<keesj> brendan_: I am not a developer of upstart so I can not say
<keesj> but yes. the idea is to let event perform the right actions
<brendan_> kreesj: ah. thanks
#upstart 2008-03-26
<keesj> hi
<keesj> how is halt/shutown to be implemented?
<brendan_> keesj: here's what i do on rc0/shutdown:
<brendan_> # rc0 - runlevel 0 compatibility
<brendan_> #
<brendan_> # This task runs the old sysv-rc runlevel 0 ("halt/poweroff") scripts with
<brendan_> # the decision as to whether to halt or power off the system left up to the
<brendan_> # script (and thus /etc/default/poweroff).
<brendan_> start on runlevel 0
<brendan_> console output
<brendan_> script
<brendan_>   echo "Sending all processes the TERM signal"
<brendan_>   killall5 -15
<brendan_>   sleep 5
<brendan_>   echo "Sending all processes the KILL signal"
<brendan_>   killall5 -9
<brendan_>   sleep 1
<brendan_>   /sbin/halt -f -p
<brendan_> end script
<brendan_> you might want a little more in there than that, of course
<AlexExtreme> if you have that in a script called 'shutdown', you can make other scripts stop before that ones gets to run by putting 'stop on starting shutdown' in them
<jdong> keesj: shutdown has to be implemented by you
<jdong> in short
<jdong> I do similar to brendan_, hook the sysv shutdown/reboot handlers into shutdown or reboot jobs.
<mdales> I'm doing some tests, and just wanted this confirmed if possible - when a job with respawn fails and is restarted, there's no stopped failed signal emitted is there?
<mdales> it's only when it's failed a number of times and upstart gives up that the stopped failed is emitted?
<keesj> jdong: thank , I was afraid of that 
<keesj> I don't have sysv installed at al , no shutdown etc :p
<keesj> and the shutdown/halt are booth provided by the upstart sysv compatibility layer
<brendan_> mdales: i believe so. you could put a sleep in your event script then watch initctl status to see the event status as it's respawning
<brendan_> keesj: you could just have shutdown and reboot as shell scripts that would call "initctl start shutdown" "initctl start restart" and just write event scripts for those
<keesj> but what command would perform the "real" shudown/reboot
<keesj> I guess I really need to understand how that works. thanks for the help
<brendan_> oh right, you'd be missing halt
<brendan_> duh
<brendan_> doing too many things at once, sorry :)
<keesj> :p
#upstart 2008-03-28
<twb> Is it because upstart gets confused when it's not PID 1 that Ubuntu's bootchart starts within initramfs (rather than with init=/sbin/bootchartd)?
<jdong> twb: no, it's useful to factor in the time spent in initramfs too
<twb> initramfs runs before init?
<jdong> twb: as we found a few weeks ago, for example, one developer's laptop spends nearly half its bootup in initramfs
<jdong> twb: correct. initramfs runs before / is even mounted, much less an init daemon exists
<twb> You're right, I was confused
<keesj> hello twb
<keesj> I am VERY interested in profiling the bootsequence, die you get bootchart runnning?
<twb> keesj: I have it running on Debian Lenny...
<keesj> and that uses upstart?
<keesj> let me put it differently , can i "bootchart" upstart?
<twb> keesj: that's broadly my question.
<keesj> twb: My feeling is no. 
<Amaranth> keesj: i don't see why not, you just have to start it in initramfs and have a stop task at the end of boot
<Amaranth> keesj: jdong's upstart scripts for ubuntu work with bootchart
<AlexExtreme> you can bootchart upstart with native scripts in the normal way you would start bootchart (init=/path/to/bootchart on kernel command line), i've done it
<Amaranth> AlexExtreme: but then you don't chart initramfs time
<AlexExtreme> mmm, true
<Amaranth> which for me is 10 seconds of a 32 second boot :P
<AlexExtreme> if you're using it with initramfs you don't need to have a stop task for it, bootchart will stop in it's normal way
<AlexExtreme> hehe
<AlexExtreme> i wasn't using initramfs with mine though
<Amaranth> no, you still need a stop task
<AlexExtreme> really? why wouldn't the way bootchart stops itself work?
<Amaranth> me and jdong found that out when i got a 12 minute bootchart that took 10 minutes to convert from svg to png :P
<AlexExtreme> it waits until gdm, kdm, xdm or getty starts
<AlexExtreme> mmm... :P
<Amaranth> http://www.realistanew.com/random/hardy-20080317-3.png <--initramfs time is important to measure :P
<AlexExtreme> mm, yeah
<Amaranth> after that boot we spent awhile trying to maximize disk throughput throughout the process as you can see it seeking most of the time there
<AlexExtreme> http://alex-smith.me.uk/files/bootchart-ud.png << insane boot time using upstart native scripts on a custom (LFS based) distro with a custom kernel ;)
<Amaranth> ended up with a boot that has a more consistent throughput but a lower max throughput and thus takes the same amount of time to boot :P
<Amaranth> wow
<Amaranth> except you don't start anything :P
<Amaranth> would still take my system 13 seconds or so though, since 10 seconds is lost in initramfs :P
<AlexExtreme> well, it booted up to a getty with networking enabled
<Amaranth> yeah
<AlexExtreme> http://alex-smith.me.uk/files/bootcharts/bootchart-upstart3.png << that's a better one from when I was getting upstart on frugalware, which doesn't use initramfs
<AlexExtreme> so stick about 10 secs on for initramfs and you a bit less than your bootchart
<AlexExtreme> *get a
<Amaranth> that's a weird chart
<Amaranth> your high disk usage was at the end of boot
<AlexExtreme> about where gdm starts
<Amaranth> http://www.realistanew.com/random/hardy-20080317-10.png
<Amaranth> that boot is with readahead disabled and i still peak at beginning
<AlexExtreme> probably something screwed up that i've done then :p
<Amaranth> also i seem to start about 3x as many things :P
<AlexExtreme> pff, i like my simplicity ;)
<Amaranth> i suspect i can get this thing down to 20 seconds easily if i fix my initramfs problems and get rid of stuff i don't use from startup
<Amaranth> which is really exciting because with sysvinit 45 seconds was crazy fast :P
<AlexExtreme> with sysv on that system i was getting 29 seconds
<Tv> hi. how do i handle a package that's removed but not purged?
<ion_> tv: This is #upstart, btw. :-)
<Tv> yeah i mean it's event.d
<Tv> i don't want to keep respawning on exec /usr/bin/does-not-exist-anymore
<ion_> Well, you could always purge the package. ;-)
<keesj> thanks for the help guys . i was not able to read earlyer
#upstart 2008-03-29
<Keybuk> \o/ Colin committed my D-Bus patch
<Keybuk> sadmac2: does Fedora have Python 2.5?
<AlexExtreme> Keybuk, it does
<Keybuk> cool
<keesj> Keybuk: d-bus support in upstart?
<keesj> btw. I have some 'theory' questions
<keesj> I have two jobs who "start on startup". wich is started first
<keesj> I have this behaviour where the second jobs only gets started once the first is "done"
<keesj> hmm .let me first think , this sounds like two questions
<Keybuk> keesj: yeah, I'm playing with D-Bus at the moment 
<Keybuk> both jobs started by the same event will be started at the same time
<keesj> so two forks one after the other?
<Keybuk> right
<keesj> hmm, my scripts are quite large and I don't have  dev/fd/  entries. spawing the first /bin/sh migh also take some time. 
<keesj> the basic idea is "main -> event_poll -> job_handle_event -> job_change_goal("start") -> job_change_state
<keesj> "
<keesj> and job_change_state will call job_run_process . 
<keesj> I have no clue how big the defailt buffers are 
<Keybuk> err, me neither ;)
<Keybuk> a page I think
<Keybuk> I probably picked something sensible like that
<Keybuk> it's all handled properly anyway
<Keybuk> if you don't have /dev/fd, it'll be passed on the command-line
<Keybuk> in which case you'll hit the maximum command line length before anything else
<Keybuk> that's quite small
<keesj> food time :p
#upstart 2009-03-23
<iamthelostboy> hi :)  I think I asked this once before, but what is the best way to start an X app from an upstart job?  exec xinit program doesnt seem to be working, though I can xinit program from console..
<iamthelostboy> never mind.. i figured out my daftness..
<iamthelostboy> actually, i want to start a process and when it is running, emit an event to kick off another job..
<iamthelostboy> the process will stay running, so i cant just put the emit after the command, and I cant put a &, because the job is set to respawn..
<iamthelostboy> any ideas?
<sadmac> iamthelostboy: there's already such an event
<sadmac> iamthelostboy: started foojob
<iamthelostboy> hey... now thats easy :)
<iamthelostboy> im sure I tried that once before.. obviously not though..
<iamthelostboy> will the started event be fired as soon as that job is begun?  The second job really requires the application started by the first to be running.. 
<iamthelostboy> in our current setup of boot scripts, there is a wait, which I'm sure we could put in..
<sadmac> iamthelostboy: its as soon as upstart determines the job to be running. in 0.5 there's a few ways to postpone that. Also I think it waits for post-start to finish
<iamthelostboy> i suppose the ideal way would be to have the first application emit the event when it is at a ready state...
<sadmac> put in a wait foo in the post-start script or if you have 0.5 use the appropriate expect value
<iamthelostboy> its using ubuntu 8.04, which is quite a lot earlier than 0.5 i think
<sadmac> yeah. that won't do it
<iamthelostboy> post-start scripts only get run when the process ends? so if i run the command through exec, it will not get run until that process ends, but if it isnt run through exec, it would get run pretty quickly?
<sadmac> it runs after the process is spawned
<sadmac> unless your job is a task not a service
<iamthelostboy> no.. its an application, i think..
<sadmac> iamthelostboy: do you have a service or respawn stanza?
<iamthelostboy> respawn
<sadmac> ok so that should be a service...
<iamthelostboy> oh..
<sadmac> whihc means post-start should get run after the process is spawned
<iamthelostboy> ill go try it
<iamthelostboy> awesome..
<keesj> iamthelostboy: X session live on an other planet, I you want to start something for the current user in the X11 session I think you need to use "X sessions" to do that. 
<keesj> but that said I think I would be nice if for example the program that listend to dbus (the gnome volume manager for example) could react on the upstart-events
#upstart 2009-03-24
<sadmac2> songbird = fail
<iamthelostboy> hi.. if I emit an event with 1 or more arguments, can i use the arguments in a job? like if arg1; then else ...
<sadmac> iamthelostboy: I believe they get put into the environment as $1, $2, ...etc
<iamthelostboy> cool.. i was starting to look through the source, but im not so good at that..
<iamthelostboy> ill give it a go
#upstart 2009-03-25
<iamthelostboy> perfect
<iamthelostboy> thanks :)
<sadmac> Keybuk: ping
<Keybuk> hello
<sadmac> Keybuk: ah, you're around :)
<Keybuk> briefly
<Keybuk> what's up?
<sadmac> Keybuk: so what's been moving with upstart? I've been distracted for awhile so I haven't even seen if you've pushed code in awhile
<Keybuk> busy coding on it ;)
<Keybuk> no pushes though
<sadmac> keeping all the fun to yourself yet again :)
<Keybuk> I'm doing what all the cool people (ie. git users) do
<Keybuk> code in private, then rework all the commits before pushing
<Keybuk> mostly just because I keep changing function names and filenames
<Keybuk> and that kind of thing is hell for a revision control system
<sadmac> there's a NetworkManager Sucks flamewar on fedora-devel, which got me thinking about replacing NM with a series of upstart jobs
<sadmac> what do you think?
<Keybuk> NM is just fine the way it is
<sadmac> eh. probably.
<Keybuk> Upstart is just a service manager
<sadmac> I know
<Keybuk> you'd still need the mechanism daemon and policy agent of NM
<sadmac> but what occurs to me is so is NM
<Keybuk> just that NM would use Upstart's service manager for things like wpa, dhclient, etc.
<Keybuk> which I've already talked to dcbw about
<sadmac> it occured to me awhile ago actually that reimplementing our sysvinit network service in Upstart would probably be most of NM
<Keybuk> NM has a lot more know-how about things
<sadmac> that and it introduces some service relationships that we don't have now (the 'network' state is up when ANY of the 'interface' states are up EXCEPT the 'lo' interface..)
<sadmac> did you do any of that writeup/documentation stuff you wanted done?
<Keybuk> not yet
<sadmac> damn. that means I have to do coursework now instead of hacking on stuff.
<Keybuk> I apologize, but the problem was not a network one at all.  The
<Keybuk> problem was that the NetworkManager did not have dependencies
<Keybuk> installed correctly, and turned out to be related to a peculiar
<Keybuk> yum/Anaconda install scenario.
<Keybuk> -- 
<Keybuk> so it wasn't even an NM problem? :p
<sadmac> Keybuk: wrong thread I'm guessing.
<sadmac> Keybuk: its the System Config Tools Cleanup Project thread
<sadmac> Keybuk: someone wanted to remove the system-config-network gui (which hasn't changed since like 1993) and people were like OMG THEY'RE GONNA MAKE US USE NETWORMANAGER!!!!!!
#upstart 2009-03-26
<Keybuk> sadmac: the upstart clock is a well-known bug - see todo ;)
<Keybuk> though already fixed in my branch
<Keybuk> timerfd ftw
#upstart 2009-03-27
<sadmac> Keybuk: cool
#upstart 2009-03-28
<ion_> I made a small skeleton for a web app. It doesnât do anything yet, except for allowing one to sign up and log in. But the implementation of that single feature is *awesome*. :-P http://test.heh.fi/
#upstart 2009-03-29
<keesj> ion_: over the top would be a more apropriate description :p
<ion_> :-)
<keesj> but it worked for me using myopenid
<ion_> keesj: Btw, i recommend not using <foo>.myopenid.com as the identifier, but http://<your-personal-website>/ instead, by adding the needed OpenID metadata to the index page. That way, youâll be able to switch OpenID providers at will, while preserving your identifier. Also, itâs cooler to log in using your website URL. :-P https://www.myopenid.com/help, heading âUsing your own URLâ
<keesj> but you use about 3 different websites to get this working rpx yahoo google query api...
<ion_> I use the Yahoo UI CSS for the layout, jQuery from Googleâs CDN for my own JavaScript stuff and rpxnow JavaScript (which depends on neither of Yahoo UI or jQuery) for the log in popup.
<ion_> *None* of those three are required for logging in. :-)
<keesj> ion_: I am a geek but just spent 15 minutes getting it working , registering dns entries and other stuff :p
<ion_> keesj: The OpenID delegation?
<keesj> yes the dns based verification that you are the domain owner...
<ion_> keesj: An URL for information about that feature, please?
<keesj> http://www.paste-it.net/public/yc34b3d/
<ion_> Huh. I donât remember having to do anything like that. Iâll take a look whether myopenid complains about such.
<ion_> Ah, now i get it. I added â*.openid        CNAME   myopenid.com.â, which handles the thing.
<ion_> That feature is not required for simple delegation, btw.
<keesj> works now:P
<keesj> I rulez!
<ion_> :-)
<Esmil> I'm getting this error when booting with upstart's init:
<Esmil> init: Failed to spawn rsS main process: unable to set oom adjustment: No such file or directory
<Esmil> init: Unable to set root directory: No such file or directory
<Esmil> Do I need another script to mount / before running init or what happens?
<Keybuk> Esmil: it's a bug
<Keybuk> you need /proc mounted before init runs
<Keybuk> e.g. by initramfs
<Esmil> Keybuk: Ahh ok. Thanks
<keesj> yes , what I did is renamed init to upstart and in /sbin/init mount /proc ... exec upstart
<Esmil> keesj: Yes, I just tried something similar. Thanks anyway
<Esmil> + and it works
<Esmil> Now I just need to figure out how to get past the rcS script. start on stopped rcS doesn't seem to work anymore
<Esmil> Hmm.. how come initctl status writes - and _ as '_2d' or something similar?
<ion_> Just normal character escaping.
<Esmil> Ok
<Esmil> Is there something written on how to write jobs? Something like start on runlevel 2 doesn't seem to work anymore
<Esmil> Also I don't see the init daemon connected to my system dbus. I thought upstart was supposed to do that
<Esmil> Ahh sorry. Found the bug report
<keesj> Esmil: just normal dbus/upstart problem
#upstart 2010-03-30
<ct529> Hi guys!
<ct529> I would like to know whether by using upstart it is possible to create two separate users, one user that starts a series of srvices at login (user that carries out development) and a user that does not start the same services, so that the machine has maximum performances ot run the code
<ct529> is it possible? it was not possible using the previous init.d based process
#upstart 2010-03-31
<thaper> I am trying to start upstart from /init and it works but it runs in the foreground and i have no console ... any help is appreciated
<thaper> exec upstart 3
<thaper> is the last command in /init
<thaper> well i do have a console but is controlled by upstart so it just has upstart messages if i use exec /sbin/init --debug 3
<thaper> last command in /init is "exec /sbin/init --debug 3
<thaper> using ubuntu 9.10
<thaper> right .,.. so i get a console when i ssh into machine and "initctl start tty1". So, why doesnt that just start when i "exec /sbin/init 3" ?
<sadmac2> thaper: what's in your tty job definition?
<thaper> 1 sec
<thaper> respawn
<thaper> exec /sbin/getty -8 38400 tty1
<thaper> start on stopped rc RUNLEVEL=[2345]
<thaper> stop on runlevel [!2345]
<thaper> not in that order
<thaper> i didnt change the tty job definition at all
<sadmac2> which did you change?
<thaper> none 
<thaper> i didnt change any of them
<thaper> I am just running "exec /sbin/init 3" from /init ... it is the last command
<thaper> when i ssh into the machine ... "initctl list" shows all jobs "stop/waiting"
<thaper> when i "initctl start tty1" a login prompt apears on the machine
<sadmac2> idk what /init is
<sadmac2> this is likely a distro-specific question, in which case it would be inappropriate for this channel anyway
<thaper> it is just a script
<thaper> that runs a few commands that need to be run before /sbin/init
<thaper> the kernel jumps there before /sbin/init
<thaper> so i start /sbin/init as the last command in /init
<sadmac2> this likely has a lot to do with your distro's deployment of upstart and not upstart proper, and also doesn't sound like the right way of doing whatever it is you're trying to do.
<thaper> hmmmmmm it works fine with the sysvinit...
<thaper> it works with gentoo sysvuinit
<thaper> i need to get this working because i want to run it on any distro that uses upstart
<thaper> thank you fr your hep though
<thaper> help
<thaper> heheheeh
<thaper> what is upstart proper ?
<thaper> that i would like to know
<thaper> do you have a link ?
<thaper> thanks sadmac2
<thaper> well i looked into the source and if upstart is not pid1 then telinit runs and then upstart becomes pid1 so there  should be no problem with starting /sbin/init from a script
<thaper> wonder why it hangs though
<thaper> thanks sadmac2 fixed with "start on startup" in tty1.conf
<Keybuk> mbiebl: are you going to Debconf?
<Keybuk> JanC: are you?
<mbiebl> Keybuk: probably not 
<sadmac> been too long since I conference'd. Hopefully I'll make it to FUDCon F14
<Keybuk> TOMCAT!
<sadmac> Keybuk: wtf is tomcat?
<Keybuk> an F-14
<sadmac> Keybuk: or a Java app server (*shudder*). What are you getting at?
<Keybuk> I'm just amused that Fedora release numbering now co-incides with US Air Force plane designations
<Keybuk> clearly F14 has to have some Top Gun inspired codename
<Keybuk> Fedora 14 "Maverick" or something
<sadmac> Keybuk: none of the clever ones like that seem to get through the naming process
<sadmac> Keybuk: We really wanted 11's code name to be "goes to"
<mbiebl> Keybuk: I'm running a copy of the latest lucid bits on an older laptop
<mbiebl> And during boot I get those kernel messages
<mbiebl> http://paste.debian.net/66811/
<mbiebl> Disk access is pretty slow 
<mbiebl> When I disable ureadahead it seems I can't reproduc these problems
<Keybuk> no idea on that one
<Keybuk> all ureadahead does is trace or read
<mbiebl> I'm not sure if it is really ureadahead or just some weird side effect
<mbiebl> But I never see those problems on my Debian installation
<sadmac> I hate disks
<mbiebl> I was scared pretty bad when I noticed that, thought my harddisk is dying
<mbiebl> Keybuk: just found this https://bugs.launchpad.net/ubuntu/+source/linux/+bug/285892
<mbiebl> so it's most likely not an ureadahead bug :-)
<mbiebl> And I do have as SAMSUNG drive
<sadmac> cscope may have the worst UI ever
<sadmac> Keybuk: could I get your thoughts on nih_error's design? had some quick ideas for improvement and wanted to make sure I hadn't missed anything important
<Keybuk> let me know your thoughts first ;)
<Keybuk> the only real aim I had was
<Keybuk> - you shouldn't need to initialise an error to catch one
<Keybuk> - you shouldn't need to pass something to a function to get an error back
<Keybuk> - errors should be switch() able
<sadmac> Keybuk: well, first there's your documentation assertion that you must check the return value of the function to determine if an error was raised.
<sadmac> Keybuk: a design where you might "check" whether an error was raised introduces its own problems (or at least temptations to create them)
<sadmac> Keybuk: I actually like a rather radical alternate assertion: Return value is UNDEFINED if an error was raised.
<Keybuk> then you can't do
<Keybuk> if (! function_call (..))
<Keybuk> {
<Keybuk>   /* handle error */
<Keybuk> }
<sadmac> Keybuk: no, you're forced to do:
<sadmac> foo = function_call (..)
<sadmac> if (got_error)
<sadmac> ...
<sadmac> Keybuk: but there's more evil I have in store
<sadmac> Keybuk: I'd like to be able to do something like this:
<sadmac> nihe_(function_call (...))
<sadmac>  /* go on ignoring errors */
<sadmac> where nihe_ is a macro that would do:
<sadmac> ({ ret = function_call (..);
<sadmac> if (got_error)
<sadmac>     return /* return is undefined, so stuff something here to shut up GCC */
<sadmac> ret; })
<sadmac> Keybuk: thereby giving us most of try/catch without any stack tricks whatsoever.
<sadmac> Keybuk: nih_local still works, etc.
#upstart 2010-04-01
<sadmac> Keybuk, ion: http://screwyouenterpriseedition.blogspot.com/
<ion> sadmac: Hah
#upstart 2011-03-28
<shaatar> hey all, I am trying to write an upstart service (/etc/init/*.conf file). I basically want to be able to say "start flashpolicy" and execute a command that works from the command line. What I have so far is this: http://www.privatepaste.com/45189f0858
<shaatar> however, it does not work and I get a "start: Job failed to start."
<JanC> shaatar: does this service need networking or something like that?
<JanC> or a filesystem to be mounted, etc...
<shaatar> JanC: yes, I suppose it does. It's accepts TCP connections over port 843 and returns a static xml file
<ion> Or the root filesystem to be mounted in readwrite mode
<JanC> then you are starting it way too early
<shaatar> i see, I need to require some other services
<JanC> shaatar: http://upstart.ubuntu.com/cookbook/ might be useful (it's a work-in-progress still, but some info you need is there already)
<shaatar> I haven't actually tested this on boot yet, however. I am just trying to run $ start flashpolicy. Wouldn't networking have already loaded? Unless I am misunderstanding this.
<shaatar> JanC: thanks, I was looking at that, I shall look into it some more.
<shaatar> should my command be in a script stanza?
<JanC> you are right that networking is probably up by that time, yes
<shaatar> I will require it anyways, better safe than sorry.
<JanC> maybe something is wrong with the command you run?
<ion> Anything in the daemonâs logs? Anything in its output? (exec >/tmp/flashpolicy.out 2>&1 before running the service)
<shaatar> ion: Like this? root@dev:/etc/init# >/tmp/flashpolicy.out 2>&1
<shaatar> root@dev:/etc/init# start flashpolicy
<ion> No, in the script section of the job.
<ion> exec >/tmp/flashpolicy.out 2>&1
<shaatar> JanC: I can run the command copy + pasted into the command line.
<shaatar> AH I see, sorry about that
<shaatar> hmm, interesting, it says "erlexec: HOME must be set"
<shaatar> looks like more of an erlang configuration issue. what user does upstart execute commands as?
<ion> root
<shaatar> interesting, the command definitely runs as root from bash. looks like google has some info on this error though, thanks all!
<ion> I use âexec su -c 'exec â¦' usernameâ for an Erlang service.
<ion> The PAM session sets HOME etc.
<shaatar> where username is just some other user, say, a user I create called flashpolicy?
<ion> for instance
<shaatar> exec su -c 'exec rl -pa /opt/flashpolicy/ebin -noshell -noinput -detached -flashpolicy logfile_path '"/var/log/flashpolicy/"' -run flashpolicy_app start'
<shaatar> does that look good? except for my *erl typo
<shaatar> ah, that appears to have at least run the command, excellent!
<shaatar> thank you muchly
<ion> You have mismatched quotes.
<ion> exec su -c 'exec "$0" "$@"' username -- erl -pa â¦ should take care of it.
<shaatar> I do?
<ion> Might as well add -s. exec su -s /bin/sh -c 'exec "$0" "$@"' username -- erl -pa â¦
<shaatar> gotcha
<shaatar> what does "$0" "$@"' do?
<ion> # su -s /bin/sh -c 'printf "|%s|" exec "$0" "$@"' ion -- foo bar 'baz quux'
<ion> |exec||foo||bar||baz quux|
<shaatar> Ah, I see
<shaatar> one last q: 'username', replace that with an actual username? I don't think so based on what I understand of su
<ion> Yes, whatever user you want to service to run as.
<shaatar> ah, understood
<shaatar> i need to learn more about su then :P
#upstart 2011-03-29
<Cyrus> Is upstart going to support running a job as a user outside of a simple su -c thing?
<Cyrus> Similar to SMF really.
<JanC> Cyrus: why would that be useful?
<Cyrus> Well, currently I'm using SMF to manage all of my Rails/Ruby instances and they each run as a different user.
<Cyrus> If they die for whatever reason, SMF brings them right back up. 
<Cyrus> I'd like to see if Upstart can do that too.
<Cyrus> Makes it dead easy to run in production.
<JanC> I guess that should be possible by passing the user through environment variables
<JanC> and using the 'instance' stanza of course
#upstart 2011-03-30
<jMCg> ion: the above syntax should be a little better documented. http://upstart.ubuntu.com/cookbook/#run-a-job-as-a-different-user 
<Md> mezcalero: what is the point of /run/lock/ ?
<Md> oops
#upstart 2011-04-01
<[diablo]> MaddaGaska, you or me take the lead?
<MaddaGaska> diablo: Happy for you to.
<[diablo]> OK
<[diablo]> guys, we have a problem with libvirt starting prior to multipath in Ubuntu 10.04 
<[diablo]> so our LVM pool is not being started 
<[diablo]> how can we please modify the start on runlevel [2345] so that it checks that multipath is running (but this is not an upstart job)
<JanC> somehow you need an upstart event that the libvirt upstart job can wait for
<soren> [diablo]: So, for instance, extend the multipath init script to call: "initctl emit multipath-up"
<soren> [diablo]: ...and add that to your libvirt job's "start" line.
<soren> "that" being "and multipath-up".
<[diablo]> hi soren , just reading
<[diablo]> MaddaGaska, is the one actually with the box
<[diablo]> MaddaGaska, can you test that please
<MaddaGaska> Sounds worth a shot. Have just tried something recommended in a libvirt reported bug with an iSCSI device not coming up, server is still rebooting.
<MaddaGaska> And when I say 'still rebooting', I may mean that I've bricked it. Oh well, I wanted to do a reinstall today, and there's one elft.
<MaddaGaska> *left
<MaddaGaska> Trying it on server 2 now.
<[diablo]> k
<MaddaGaska> libvirt job should then say: start on started multipath-up ?
<JanC> you probably want more than only that
<MaddaGaska> Possibly... though it doesn't state any dependencies in its default- it simply states runlevels 2345, and multipath-tools theoretically starts at the same run levels according to its init.d...
<MaddaGaska> So based on that I don't think we'll run into dependency problems as it's not guaranteed to start before or after any specific services at runlevel 2 normally?
<MaddaGaska> Ah well... libvirt started but we're still running into the same problem so apparently that's not where the issue lies.
<MaddaGaska> Thanks soren/JanC
<MaddaGaska> (Rearrange in desired order of precedence)
<JanC> MaddaGaska: oh, and you want "start on multipath-up"
<JanC> not "start on started multipath-up"
<MaddaGaska> JanC: Yeah, that's what I put after rereading one of the upstart help pages.
<MaddaGaska> (Upstart Intro, cook book, and best practises)
<JanC> also, maybe you need to wait for the multipath device to be ready
<MaddaGaska> I'm assuming I got that bit right because otherwise libvirt wouldn't have started at all... hoping not to have to resort to an ugly hack here like just restarting libvirt when it finishes booting.
<JanC> (I missed part of the discussion, so not sure when the event is emitted)
<MaddaGaska> This may be true...
<MaddaGaska> I've put the initctl command just before the exit 0 at the end of /etc/init.d/multipath-tools
<MaddaGaska> So yeah, it could be taking its time actually bringing up the specific multipath device
<JanC> I've never used multipath, but isn't there some way to "hook" into it, e.g. when a device comes up or goes down?
<MaddaGaska> Good question... I'll dive into the man page
<JanC> something similar to /etc/network/if-up.d/upstart etc.
<MaddaGaska> The only thing related to it I can find is /etc/multipath.conf, and I can't find anything in there to fire triggers when it brings up a device
<MaddaGaska> I've raised this in OFTC:/#virt as well, but it seems to be asleep.
<MaddaGaska> Hmm... is there an upstart event when the system is ready for user logon?
<MaddaGaska> Not for when a user logs on, because this server will be unattended.
<MaddaGaska> Okay. solved with a dirty hack in libvirt's upstart script to make it sleep for 30 seconds before starting.
<JanC> isn't there an udev event when the device becomes available?
<MaddaGaska> Possibly... I'll see if I can get it to show me one...
<MaddaGaska> Is there a replacement for the command 'initctl events'?
<MaddaGaska> To show events in real time?
<MaddaGaska> According to the upstart-udev-bridge, it's not to be relied on. Is there any best-practise reason not to ensure it is up by means of, for example, calling vgdisplay -s on the expected volume group, then sleeping for a second if it's not up?
<MaddaGaska> e.g. while [ ! vgdisplay -s ] ; do ; sleep 1 ; done
<MaddaGaska> *with the vg name after -s
<JanC> MaddaGaska: I think the "not to be relied on" phrase is about the fact that somewhere in the future 'upstart-udev-bridge' will be replaced by built-in upstart functionality (without guarantees that things will keep working exactly the same)
 * MaddaGaska nods
<MaddaGaska> That was my reading of it too, hence my reluctance to use it- because if it changes then suddenly we have a pair of kvm hosts that don't actually bring up their guests automatically.
<JanC> I assume that would only happen after a release upgrade though
<MaddaGaska> Hmm... fair point, we're on an LTS release so it wouldn't be a problem for a couple of years...
<JanC> MaddaGaska: now that I think about it, you need to wait until *LVM* is ready, which will be somewhere after multipath is started, so indeed that's where you need to hook into or what you need to monitor or whatever
<MaddaGaska> Yup, that's what I've done in a slightly hackish way
<MaddaGaska> while ! vgdisplay -s vms
<MaddaGaska> do
<MaddaGaska>  sleep 0.5
<MaddaGaska> done
<MaddaGaska> In the pre-start script
<MaddaGaska> So it shouldn't actually bring up libvirt until it sees the storage group it wants.
<MaddaGaska> Although I'll check the /etc/init- I'm not sure whether LVM is run as an upstart service?
<MaddaGaska> Bingo
<JanC> mdadm is still a sysvinit script it seems...
<MaddaGaska> That's lvm's?
<MaddaGaska> So, in absence of libvirt actually allowing time for a logical volume group to come up, does this look like a reasonable workaround to you? 
<JanC> it looks reasonable, although I would expect there is some way to handle this with udev-originating events too
<MaddaGaska> That would be a better way to do it, thinking about it... but I think I'll work with this as an acceptable workaround as I've spent most of today trying to get it working.
<MaddaGaska> Thanks for your help.
<SpamapS> shaatar: you may want to try piping the command to logger to see if it is printing out errors
<SpamapS> oh hahahaha
<SpamapS> I love when that happens
 * SpamapS was scrolled back 24 hours
 * SpamapS vows to implement a big red "you are scrolled back" reminder indicator for irssi..
#upstart 2012-03-26
<jY> i get a pid by running status resque-web but that pid isn't running anymore.. and stop just hangs since there is no pid.. and start hangs also
<jY> anyway to clean it up without restarting?
<jY> i'm trying to get a resque-web up and running in rvm with sudo.. here is the process tree output with a status http://pastie.org/3672811
<jY> if I stop the service the ruby process stays running.. i have expect daemon in my conf
<jY> it does a double fork accourding to strace
#upstart 2012-03-27
<SpamapS> jY: sudo is not advisable for this as it may end up starting a pam session.
<SpamapS> jY: also the double fork is only for when they fork *and exit*
<SpamapS> jY: what you probably want is no expect line at all, since the rvm bash will stay running until killed
<tzafrir_laptop> stupid question: why does dh_installinit need to avoid installing the init.d script if it installs the upstart init file?
<tzafrir_laptop> Can't upstart just ignore the init.d script in this case?
<soren> tzafrir_laptop: That won't stop people from running it.
<tzafrir_laptop> I suppose making start-stop-daemon detect this and warn or whatever has been suggested before, right?
<macnix> is there a way to create & control upstart jobs as a regular system user?
<macnix> I keep getting the dbus error message whenever I use start/stop as anyone else but root
<macnix> ideally, each app has will have its own regular user, it will create upstart jobs as that user and it will be able to start/stop them, no admin privileges required
<tzafrir_laptop> macnix, (nobody else answers, so I'll pick this up) I recall this has been a wishlist item for quite some time,
<tzafrir_laptop> but I'm not familiar with upstart
<macnix> tzafrir_laptop thanks, got an answer in #ubuntu-server
<rlaager> I have this recurring problem where trying to stop services results in "Unknown instance". It happened across several releases of Ubuntu, with multiple different services (SSH, upstart jobs for daemons I've written myself).
<rlaager> With SSH, it's virtually guaranteed to happen every time I want to stop it (since I do so infrequently), but I can't reproduce this on demand. In other words, I can start...stop...start...stop services right in a row to my heart's content and it's fine. What should I be doing to debug this?
#upstart 2012-03-28
* jodh changed the topic of #upstart to: Upstart 1.5 | http://upstart.ubuntu.com/cookbook/ | Post to mailing list if no response here: http://bit.ly/ooeNVv
<khani3s> Hi
<khani3s> And yes, I am having problem with a upstart script
<khani3s> First I am using ubuntu oneric and I activate User Jobs
<khani3s> And my first question is, when i put a script on my $HOME/.init it should be autostarted ?
<khani3s> going back to init.d =D
#upstart 2012-03-29
<exarkun> Where is the upstart documentation?  I found the man pages (particularly the socket-event and upstart-socket-bridge pages), but they're incomplete (at least, they don't tell me enough to do what I want to do).  I found a wiki, <http://upstart.ubuntu.com/wiki/>, with a lot of broken links and no apparent mentions of socket events.  What am I missing?
<exarkun> I'd rather know where to find comprehensive documentation.  But if someone knows how socket events work and wants to just explain them to me, that'd be useful too.
<exarkun> It seems to have something to do with an UPSTART_FDS environment variable, but I don't see any explanation of its contents anywhere.
#upstart 2012-03-31
<qknight--> hi
<qknight-->       startOn = "started network-interfaces and started upsmon";
<qknight--> compared to 
<qknight-->       startOn = "started network-interfaces and upsmon";
<qknight--> what would be correct?
<qknight--> network-interfaces and upsmon are upstart targets (but on nixos)
<qknight--> when i put in the first line it starts both services (upsd, when network-interfaces and upsmon were started)
<qknight--> but the latter case upsd was not started
<JanC> qknight: does NixOS use a tool to create upstart jobs?  or where dus that "startOn = ..." come from?
<JanC> s/dus/does/
<JanC> anyway, in the first case the two events separated by "and" are "started network-interfaces" and "started upsmon", in the second case the events are "started network-interfaces" and "upsmon"
<JanC> and if there isn't anything issuing an explicit "upsmon" event (e.g. from a script), it's unlikely that that start condition will ever happen
#upstart 2013-03-25
<stgraber> jodh: hey, so I have a fix for ssh-agent and im-config under user sessions
<stgraber> jodh: as I told slangasek on Friday, there's one small feature we may want to look at to make those things cleaner
<stgraber> jodh: in some cases Xsession sets variables for its internal use. Upstart needs those and currently inherits them fine, but then there's no way of removing them from the environment of future child processes
<stgraber> (you can't "initctl unset-env" an inherited variable)
<jodh> stgraber: ok - could you raise a bug for that? How have you worked around it btw?
<stgraber> jodh: I haven't, we just end up having a few weird environment variables in the session...
<stgraber> stgraber@castiana:~$ env | grep PHASE
<stgraber> IM_CONFIG_PHASE=1
<stgraber> for example
<jodh> stgraber: yeah, that's annoying :(
<slangasek> stgraber, jodh: annoying yes, but seems low-impact?
<stgraber> yeah, it's a bug we need to fix but not 13.04-critical at all. Just something we should look into for upstart 1.9
#upstart 2013-03-28
<lnykryn> not quite sure if this is correct place to ask, but did you use some newer autoconf in last version of libnih? https://bugzilla.redhat.com/show_bug.cgi?id=925821
<xnox> lnykryn: we recommend running autoreconf -f -i before starting the configure/build.
<lnykryn> xnox: yes, I will do that, but my primary question was more about "official upstream solution"
<xnox> lnykryn: I'm uploaded libnih in Debian and Ubuntu and I am upstream developer of upstart. We did switch to running autoreconf as part of daily builds & packages in Ubuntu.
<xnox> lnykryn: I think we will continue releasing tarballs with generated autofoo, but there is no pressing need to release libnih at the moment.
<xnox> s/uploaded/uploader/
<lnykryn> xnox: ok
<tobin> can someone here shed some light on an upstart issue I'm having. Im trying to run a script at startup (after networking is up), which seems to work, and then when the host gets a shutdown signal, run the script again, with a different arg
<tobin> https://gist.github.com/joshuatobin/5eb21e379f377825044b
<tobin> The shutdown part is where i keep running into issues. I've tried various methods with stop on starting network-services etc
<tobin> but the scrip never seems to get called before networking is shutdown
<marrusl> tobin, you also tried "start on deconfiguring-networking" iirc.  I thought that would work since that's supposed to be a hook.
<tobin> yeah. I've tried a bunch of different incantations 
<jodh> tobin: you mentioned on #ubuntu-server that your problem was due to 'virtual networking devices'?
<tobin> jodh: no I just thought maybe that could be a contributing factor
<jodh> tobin: so, does the log file I mentioned exist?
<tobin> it does not
<tobin> Looking to see how to change kernel options now with ec2
<tobin> so i can get better logging
<jodh> tobin: there is a chance the system is shutting down too fast for the job to run to completion. You could convince yourself of that by adding a sleep before the call to "do_stop" in /etc/init.d/sendsigs.
<tobin> yeah. it seems to shutdown crazy fast (and reboot)
<tobin> thanks jodh i'll give that a shot as well
<marrusl> so I guess tobin's job might be blocking deconfiguring-networking, but deconfiguring-networking being blocked won't block shutdown from continuing?
<SpamapS> marrusl: it will
<marrusl> yeah, i couldn't figure out why that wasn't working for him then.
<SpamapS> tobin: your post-stop must finish for deconfiguring-networking to return to the shutdown scripts
<tobin> The post-stop should be running before network is removed right, in theory?
<tobin> in my script that is
<SpamapS> tobin: I'm not sure if the kill timeout applies to post-stops .. You might want to split this into two tasks
<SpamapS> tobin: since these are definitely tasks, not a single job
<tobin> okay. Logging isn't working either in post-stop to >> /tmp/upstart.log
<tobin> works fine in pre-start
<SpamapS> tobin: well just let 'console log' do its thing, it will log to /var/log/upstart/$jobname.log
<tobin> SpamapS: okay. gothca
<tobin> SpamapS: so if i create a task to stop. would the logic be 'start on started deconfiguring-network'?
<SpamapS> tobin: start on deconfinguring-networking
<SpamapS> tobin: and the 'task' keyword is critical
<tobin> okie
<tobin> thanks i'll try that
<SpamapS> tobin: also your script needs to be careful about not taking forever. I think, actually, because of how 'deconfiguring-networking' stops the whole process.. anything that starts on it *MUST* exit in a reasonable time or shutdown will never happen.
<tobin> okay good to know. 
 * SpamapS would love to have an extra keyword for tasks, like 'task seconds 5' to just kill off a task after 5 seconds
<tobin> SpamapS: any other suggestions other than deconfiguring-network? I still can't seem to get the shutdown bits in the right order. https://gist.github.com/joshuatobin/3205a6b89d6ea01298c0
<SpamapS> tobin: this is very wrong
<SpamapS> start on (local-filesystems and net-device-up IFACE!=lo)
<SpamapS> tobin: I know you see it in other jobs, but its a bug almost always
<tobin> okay. that one works. its the start on deconfiguring 
<tobin> so either way running exec on shutdown keeps screwing me
<SpamapS> tobin: what do you want to do before the network is down?
<tobin> run my script, which deletes an A record from route53
<tobin> ./ec2_set_hostname.py stop does this
<SpamapS> tobin: this should work.. http://paste.ubuntu.com/5655866/
<SpamapS> tobin: also for the 'start' use 'start on runlevel [2345]' (though with ec2 instances I'm pretty sure the one you have is fine)
<SpamapS> tobin: just a thought, btw, I would do the manipulation of EC2 from outside the instance. Your scheme is really prone to errors. CloudFormation might be interesting to you.
#upstart 2013-03-29
<nocturn> Hi, I'm writing an upstart config for a python application, what is the best way to not run the app as root?
<xnox> nocturn: http://upstart.ubuntu.com/cookbook/#setuid
<nocturn> Thank you xnox
<eydaimon> i'm not able to compile this on fedora 18. I've tried every single version down to 1.5
<eydaimon> STDERR: nih-dbus-tool:type.c:86: Not reached assertion failed in type_const
<eydaimon> /bin/sh: line 4: 25053 Aborted                 /usr/bin/nih-dbus-tool --package=upstart --mode=object --prefix=control --default-interface=com.ubuntu.Upstart0_6 --output=com.ubuntu.Upstart.c ../dbus/com.ubuntu.Upstart.xml
<eydaimon> anyone nkow?
<xnox> eydaimon: which libnih are you using?
<eydaimon>  /usr/bin/nih-dbus-tool --version
<eydaimon> nih-dbus-tool (libnih 1.0.2)
<eydaimon> hmm
<eydaimon> odd I checked the version
<eydaimon> well, it's high enough according to the docs
<xnox> eydaimon: I'd recommend using libnih from lp:~upstart-devel/libnih/nih
<xnox> eydaimon: it fixes  LP: #776532, LP: #777097, LP: #834813, LP: #1123588
<xnox> https://bugs.launchpad.net/libnih/+bug/776532
<xnox> https://bugs.launchpad.net/libnih/+bug/777097
<xnox> https://bugs.launchpad.net/libnih/+bug/834813
<xnox> https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1123588
<eydaimon> oie
<xnox> among a few other bugs.
<eydaimon> where do I get upstart-devel?
<xnox> bzr branch lp:~upstart-devel/libnih/nih
<eydaimon> there's no tarball with that?
<eydaimon> I assume I will have to use --with-local-libnih ?
<xnox> or you can fetch the tarball + diff.gz from the downloads section of https://launchpad.net/ubuntu/+source/libnih/1.0.3-4ubuntu16
<xnox> eydaimon: we really should make a new libnih release. I will poke a few people about it.
<eydaimon> thanks
<eydaimon> I compiled, installed it, yet still get errors
<eydaimon> trying to find the actual error now )
<eydaimon>   CC     control.o
<eydaimon> control.c: In function âcontrol_register_allâ:
<eydaimon> control.c:381:2: error: âcontrol_interfacesâ undeclared (first use in this function)
<eydaimon> that's with upstart 1.8 and the libnih I just compiled 
<eydaimon> http://pastebin.com/FsVdQRNQ
<eydaimon> any ideas?
<eydaimon> i actually don't see it declared anywhere
<eydaimon> [root@localhost upstart-1.8]# grep -ri control_interfaces *
<eydaimon> ChangeLog:      as control_interfaces
<eydaimon> init/control.c:                                control_interfaces, NULL));
<eydaimon> must be from some lib which doesn't exist?
<eydaimon> xnox: still around?
<xnox> please file a bug, and we will look into it.
<eydaimon> I don't have time to wait for a response so it's not really worth my time to file it unless it's very easy. Link to file?
<eydaimon> xnox: well, maybe you guys are fast. Where do I file ticket?
<eydaimon> https://bugs.launchpad.net/upstart
<xnox> https://bugs.launchpad.net/upstart/+filebug
<xnox> yeah.
 * xnox should look into getting fedora / rhel / opensuse daily builds going.
<eydaimon> I'm going to include the virtualbox image in the bug
<eydaimon> maybe that will help
<eydaimon> http://static.stasiak.at/fedora-18-x86-1.box
<eydaimon> with vagrant (vagrantup.com)
<eydaimon> xnox: https://bugs.launchpad.net/upstart/+bug/1162072
<eydaimon> I gave full steps to reproduce
#upstart 2013-03-30
<eydaimon> xnox: it's difficult to debug upstart when things are failing to start
<eydaimon> is there a way to see a log or something?
<eydaimon> the link in this FAQ piece is broken: http://upstart.ubuntu.com/faq.html#native-jobs-where
<eydaimon> console output
<eydaimon> perhaps
<eydaimon> no, didn't seem to work
<eydaimon> oh, really old version on this host
<eydaimon> and it doesn't install on Centos 6.2 either
<xnox> eydaimon http://upstart.ubuntu.com/cookbook/ is a better resource.
<xnox> And booting with --verbose
#upstart 2014-03-24
<julian37> hi, I'm using upstart to daemonize a tool that doesn't appear to support any signals for reloading its configuration. can I disable the "reload" command for this service or let upstart know some other way that sending a signal to that process is futile?
<mikedevita> has anyone gotten virtualbox or some sort of virtualization working in the latest rel of FN?
#upstart 2014-03-25
<CameronNemo> Hey I was wondering how to evaluate a command in env=
<CameronNemo> I mean env VAR=
<CameronNemo> Nevermind. new goal.
<CameronNemo> How do I use an instance variable to set the uid
<CameronNemo> So: instance $USER, setuid $USER
<ryao> Is there a guide to running upstart scripts? I just want to have it start daemon tools which was installed by a userland package manager.
<marcoceppi> hey everyone, question about emits
<marcoceppi> if I'm starting a job, is that when it emits an even, or can I tap in to that job stopping?
#upstart 2014-03-28
<marianogg9> hi guys
<marianogg9> is there a stanza to set the ulimit?
<jodh> marianogg9: Yes, the 'limit' stanza - see http://upstart.ubuntu.com/cookbook/#limit and init(5).
<marianogg9> thanks jodh
<sleepycat> I have an upstart service stuck in stop/killed state, and it looks like some combination of forks has screwed things up. The ps command shows nothing is running but upstart won't let me start this thing again. How can I convince Upstart that this job is dead (without restarting the server)?
<jodh> sleepycat: see http://upstart.ubuntu.com/cookbook/#expect, http://upstart.ubuntu.com/cookbook/#implications-of-misspecifying-expect, http://upstart.ubuntu.com/cookbook/#recovery-on-misspecification-of-expect. If you are unlucky, I'm afraid you cannot force upstart to forget about that job until a reboot occurs.
<jodh> sleepycat: however, if you simply need to fix the job and restart that service, you may be able to fix the syntax in the original .conf, then copy it to new.conf, remove the 'start on' (to avoid it starting on next boot) and manually "sudo start new".
<jodh> sleepycat: note that with the advent of user sessions you can test a job using a session init (as root) "sudo init --user --confdir /tmp/init/" and if the job fails for whatever reason, just kill that secondary upstart instance. Repeat and once fully tested, deploy to /etc/init/.
<jodh> sleepycat: or use a VM / container of course.
<sleepycat> jodh: Hmm. OK, I think the new job thing is a good idea.
<sleepycat> jodh: Thanks!
#upstart 2014-03-30
<lxuser_> hi. i'm running ubuntu saucy/13.10, and I have a problem with getty instances hogging the cpu. cmdline args are `/sbin/getty -8 38400 tty<num>`.  also,  running ltrace -p shows that they are looping on `__ctype_b_loc() = <some address>; read(0, "", 1) = 0`. is this a known issue? any fix?  trying here because I got no help in #ubuntu
#upstart 2015-03-23
<xerxas> Hi all !
<xerxas> I want to have a service that start N instance of another service , but I want to be able to restart each instance individually. It kind of works, but once I restart a single service individually, restart the-global-service doesn't work anymore 
<snappy> I have this problem where i start a daemonized python program which double forks. I think upstart has got some incorrect PID tracking.
<snappy> when i try to start/stop the service, it just freezes
<snappy> i don't get any logging for the service in /var/log/upstart -- not sure how to debug this to be honest
<snappy> when i start the daemon manually by running the commands
<snappy> it works without a hitch
<BLZbubba> what does upstart do with zombie processes?  I have a bunch of dead java processes owned by init.  init is supposed to clean them up nicely.  I'm using version 1.12.1-0ubuntu4.2 (default in ubuntu 14.04)
#upstart 2015-03-24
<dstarh> anyone know to what location upstart will log errors when it fails to start the application it's attempting to start?
<dstarh> taking a script from https://gist.github.com/dstarh/62e9b5f7fb10e821ae72  to https://gist.github.com/dstarh/a76eba3a3673d9c49b4e so I can redirect where stderr goes and it won't start with the second script
<gansbrest> hi. is there a way to delay start event in upstart. If my process needs more time to bootstrap, pull some things ( docker example, when it runs - it needs to pull image from the registry and only then start it ). All other dependent services needs to be notified only after serivce was fully started, not only the process
<JanC> you can emit a custom event
<JanC> or do all the preparing in a pre-start
<joshumax> Hi. I had a question regarding the future of upstart and upstart maintenance/security patches... Now that systemd is replacing upstart on Ubuntu, will the Upstart team still maintain Upstart for the foreseeable future?
<JanC> joshumax: Ubuntu 14.04 LTS with upstart has 5 years of support, so the foreseeable future is at least until April 2019
<gansbrest> is there a way to start a service on multiple events
<gansbrest> like if I emit custom events from my services A B C
<gansbrest> and I want service D to depend on A B C custom events
<joshumax> JanC: Thanks, that gives me plenty of time to switch over
#upstart 2015-03-25
<BLZbubba> anyone here familiar with how zombie processes work?
<JanC> they don't work  :P
<JanC> https://en.wikipedia.org/wiki/Zombie_process
<gansbrest> when I do sudo reboot
<gansbrest> which signal is sent to processes managed by upstart?
#upstart 2015-03-27
<yossarianuk> hi - I have made an upstart script to start a meteor app  - in /etc/init/meteor.conf -> it works fine using 'service meteor start/stop'
<yossarianuk> but it doesn't start on boot
<yossarianuk> how can I troubleshoot why this is
<afournier> yossarianuk: http://upstart.ubuntu.com/cookbook/#command-line-options
<afournier> yossarianuk: http://upstart.ubuntu.com/cookbook/#add-verbose-or-debug-to-the-kernel-command-line
<yossarianuk> afournier: thank you 
<yossarianuk> afournier: I have seemed to sort it my removing all start deps except runlevel 2 -5 
<yossarianuk> works now.
<yossarianuk> really liking the respawn function !
<yossarianuk> its a shame systemd won....
<afournier> i never used systemd, and i will never go, i hope :p
<afournier> s/go/do/
<yossarianuk> afournier: if you want to run ubuntu 15.04+ you will have to use it.
<afournier> yossarianuk: i only use gentoo with OpenRC, and OpenEmbedded with upstart
<yossarianuk> afournier: of course I forgot other distros use upstart also.
<afournier> indeed OpenEmbedded does not natively but i wrote a layer to add upstart to it
<afournier> anyway i think i will have to use systemd one day...
<afournier> meanwhile if i can avoid it...
#upstart 2016-03-28
<kenrestivo> having a devil of a time trying to debug jobs that depend on a task job, and they're just not running
<kenrestivo> there's one job, a bunch of other ones depend upon it, and none of the other ones are running.
<kenrestivo> the job passes the validation test
<kenrestivo> :/
#upstart 2016-03-31
<vanch> Hello! what option should I use to start screen in upstart?
<vanch> I'm using now 
<vanch> setuid ubuntu
<vanch> setgid ubuntu
<vanch> script
<vanch>     exec /usr/bin/screen -DmS name command
<vanch> end script
<vanch> -dmS
#upstart 2016-04-01
<corentin> hello
<corentin> any clue what could be the reason for service myservice start to just hang and do nothing else?
<corentin> myservice for now is just "touch /tmp/blah" so it is not responsible for the hanging
<corentin> I'm running this on a ubuntu headless server 14.04
<corentin> same for start and stop
<corentin> checked my config file with init-checkconf, it says syntax ok
<gerow> corentin: might help if you paste your actual upstart script somewhere
#upstart 2018-03-30
<kiogcvcq> .-.            .-.
<kiogcvcq> /   \          /   \
<kiogcvcq> |   _ \        / _   |
<kiogcvcq> ;  | \ \      / / |  ;
<kiogcvcq> \  \ \ \_.._/ / /  /
<kiogcvcq> '. '.;'    ';,' .'
<kiogcvcq> './ _    _ \.'
<kiogcvcq> .'  a __ a  '.
<kiogcvcq> '--./ _,   \/   ,_ \.--'
<kiogcvcq> ----|   \   /\   /   |----
<kiogcvcq> .--'\   '-'  '-'    /'--.
<kiogcvcq> _>.__  -- _.-  `;
<kiogcvcq> .' _     __/     _/
<kiogcvcq> /    '.,:".-\    /:,
<kiogcvcq> |      \.'   `""`'.\\
<kiogcvcq> '-,.__/  _   .-.  ;|_
<kiogcvcq> /` `|| _/ `\/_  \_|| `\
<kiogcvcq> |    ||/ \-./` \ / ||   |
<kiogcvcq> \   ||__/__|___|__||  /
<kiogcvcq> \_ |_Happy Easter_| /
<kiogcvcq> jgs .'  \ =  _= _ = _= /`\
<kiogcvcq> /     `-;----=--;--'   \
<kiogcvcq> \    _.-'        '.    /
<kiogcvcq> `""`              `""`
<kiogcvcq> L0DE AND CHRON FROM #LRH & L0DE RADIO HOUR (IRC.EFNET.ORG) WANTED TO SAY HAPPY EASTER!!
<kiogcvcq> JanC dgw inara DzAirmaX hallyn bn_work xnox m1dnight_ AnrDaemon balkamos mniip broder Trevinho ubuntulo1 PaulePanter kaylindris puhuri Necrosan cschneid_
