/srv/irclogs.ubuntu.com/2008/03/18/#upstart.txt

Absortohello! I'm running Gutsy and unable to get a text mode login with Ctrl-Alt-F[1..6]. Help!01:28
Keybukheh @ Absorto12:30
Keybukthat's actually the most logical bug to blame on Upstart in a while12:30
Keybukbetter than last week when someone filed a bug on Upstart for muting their sound card when they switched to a VT12:30
AlexExtremehaha12:30
ion_He even had a whopping five minutes of patience!12:30
Keybuk(I *love* the fact that sound card stops when you switch VT12:32
Keybuk it proves that Linux is really starting to get the underlying architecture correct)12:32
ion_Yeah12:33
ion_Unfortunately, that feature hasn't been ported to my drivers yet.12:34
ion_We'd still have time to make that feature consistent by the Hardy release. Could boast about it in the release notes.12:35
* Keybuk tries to work out what the dbus marshalling code should actually look like13:54
Keybukit'd be nice if a method just looked likt14:52
Keybukint14:52
Keybukdbus_job_start (Job *job,14:53
Keybuk                char **env)14:53
Keybuk{14:53
Keybuk    /* do stuff to start the job, or nih_error_raise */14:53
Keybuk}14:53
Keybukand there was auto-generated wrapper code to marshal the function call, and generate the reply14:53
Keybuknot sure how to handle errors though14:54
Keybuksince NihError and DBusError don't quite 1:1 match14:58
sadmac2Keybuk: that reminds me. We've had to patch nih so that it would recognize rpm tempfiles as package manager files (and thus upstart would ignore them in event.d)15:16
sadmac2do you want that upstream?15:16
Keybukyeah, definitely15:16
jdongKeybuk: if I am not careful, is it possible to end up with a circular start-stop relationship? :D15:17
Keybukjdong: sure15:17
Keybukfoo:15:17
Keybuk  start on stopped bar15:17
Keybuk  stop on started bar15:17
Keybukbar:15:17
Keybuk  start on stopped foo15:17
Keybuk  stop on started foo15:17
jdongcool :)15:18
jdongKeybuk: a less silly question, are there any plans/ideas for revamping initramfs with something upstart related?15:18
Keybukgeneral idea is that /sbin/init in the initramfs is upstart15:18
Keybukand you copy the bits of /etc/event.d you want in too15:18
jdongKeybuk: it seems like rigth now more than 1/3 of my bootup is in initramfs and I can't help but think it can be done more efficiently15:19
Keybukhand-over by reexec, it would pass the job configuration over as "deleted jobs"15:19
jdongsounds cool15:19
Keybukso the upstart in the real system would know the status/pid/etc. of those started in initramfs15:19
jdongwhat's the Ubuntu timeline for having more stuff done by Upstart? Next cycle?15:19
Keybukyeah15:20
jdongawesome, I really look forward to it. Hacking my Hardy box to boot off upstart has been one of the more exciting things I've done recently15:20
jdongKeybuk: also, what kinds of files are ignored in event.d?15:20
sadmac2Keybuk: check your email. you have a patch15:21
Keybukjdong: hidden files, backup files, swap files, RCS control files and packaging debris15:21
jdongKeybuk: very nice15:21
jdongKeybuk: does Upstart understand subdirectory structure in event.d?15:22
Keybukyes15:22
jdongdoes it have any special meaning, or can I arbitrarily use it to organize my job files?15:22
Keybukarbitrary organisation15:22
Keybukthe /etc/event.d/foo/bar/baz file defines a job called foo/bar/baz15:22
jdongcool15:22
jdongKeybuk: also, is there a way for sysv jobs to interact with upstart, such as automatic firing of events for when sysv jobs start/stop?15:23
jdongother than hacking /etc/init.d/rc :)15:23
Keybukwhy is not hacking rc important?15:24
KeybukI'd just hack rc to emit sysv-started and sysv-stopped at appropriate times15:24
jdongKeybuk: just wondering if there's any standardized way yet. I have no problem hacking rc if that's the right way(tm)15:24
sadmac2jdong: that's how we're doing it in Fedora15:24
jdongKeybuk: could this also be an upstart-compat-sysv feature for Intrepid?15:25
jdongsadmac2: yeah, I'll do that locally  for now15:25
sadmac2Keybuk: I'm thinking that some time very shortly after 0.5 NetworkManagerDispatcher could be replaced entirely by upstart.15:33
sadmac2brb moving desk15:40
KeybukI can't decide which is better17:01
Keybukchanging NihError to have some kind of dbus-compatible error string17:01
Keybukor having a look-up table to convert between NihError enums and DBusError strings17:01
Keybukthought-of-the-day17:55
Keybukshould the Start() method return immediately, or not return until the service is running/task is finished?17:56
=== kylem_ is now known as kylem
ion_keybuk: I’m not familiar enough with how dbus APIs generally behave to give an opinion.22:06
Keybukme neither22:06
Keybukyou basically expose objects22:06
Keybukobjects have interfaces22:06
Keybukinterfaces have methods22:06
Keybukso that's all well and good22:06
KeybukUpstart has JobConfigs and Jobs22:06
Keybuk(or Jobs and Instances, depending on the direction I'm explaining from :p)22:06
Keybukso in theory, these should map well22:07
Keybukwe'd have a /com/ubuntu/Upstart object with a com.ubuntu.Upstart.Manager interface22:07
Keybukthat has a FindByName(String name) -> (Object) method22:08
Keybukobviously that's going to return a Job object22:08
Keybukto start a Job, you need to find or create an Instance, then start that Instance22:09
Keybukit can fail because you didn't supply enough parameters to identify an Instance22:09
Keybukit can fail because the Instance was already started22:09
Keybukif you start a job, you probably want to also be notified of its goal and status changes (initctl does anyway)22:10
Keybukand you want to be notified when it is actually started, or the starting failed22:10
ion_Yeah22:10
Keybukthe goal and status changes are clearly Signals22:11
Keybukyou have to tell D-Bus that you want a signal, so this wouldn't work:22:11
Keybuk  job = FindByName("apache")22:11
Keybuk  instance = job.Start(...)22:11
Keybuk  dbus.AddMatch(instance, "StatusChanged")22:12
Keybuksince you have a race between the Start and the AddMatch where you'll miss signals22:12
ion_Yep22:12
ion_Fix dbus API? :-P22:12
Keybukyou only want the signals from the instance you're going to start22:12
Keybukyou don't care about the other running apache instances22:12
Keybuk(and jobs don't have goals or status anyway)22:13
Keybukwe could expose the entire process to the client, and let it do the hard work22:15
* ion_ envisions the DBus API taking a Ruby-style block, which is executed *after* the object is created but *before* the command has been sent, i.e. instance = job.Start(...) {|it| dbus.AddMatch(it, "StatusChanged") }22:15
Keybukbut I think that's generally bad22:15
Keybukso my idea was to have a magic D-Bus "request" object22:17
Keybuk  job = FindByName("apache")22:17
Keybuk  request = job.Start(...)22:17
Keybuk  dbus.AddMatch(request, "StatusChanged")22:17
Keybuk  request.Go()22:17
ion_Yeah, that would be equivalent (without the syntactic sugar). :-)22:17
Keybukthough I guess it should be StartRequest(...)22:30
Keybuksince Start() would do it without an intermediate object22:30
Keybukand almost everything other than initctl will just use Start()22:32

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