[09:20] <johnflux> Hey all
[09:22] <JohnFlux> Upstart added various functions to get the properties of jobs
[09:22] <JohnFlux> various dbus functions, I mean
[09:22] <JohnFlux> but they don't seem to actually work :-)  I just get permission denied
[09:24] <JohnFlux> As a random example:
[09:24] <JohnFlux> qdbus --system com.ubuntu.Upstart /com/ubuntu/Upstart/jobs/networking author
[09:24] <JohnFlux> Error: org.freedesktop.DBus.Error.AccessDenied
[09:24] <JohnFlux> Rejected send message, 2 matched rules; type="method_call", sender=":1.72" (uid=1000 pid=6687 comm="qdbus) interface="(unset)" member="author" error name="(unset)" requested_reply=0 destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init"))
[09:24] <JohnFlux> same even running as root
[09:25] <filip> hi, I am trying to create an upstart based system, and I have a little problem here:
[09:28] <filip> http://pastebin.com/m1a164ddb how is this consistent?
[09:29] <mbiebl> JohnFlux: how does your /etc/dbus-1/system.d/Upstart.conf look like?
[09:31] <JohnFlux> mbiebl, http://pastebin.com/m2f97827d
[09:32] <mbiebl> JohnFlux: if you want to give a certain user full access, you can copy the user=root section
[09:33] <JohnFlux> mbiebl, but it doesn't work even if I do  sudo qdbus..
[09:34] <JohnFlux> root@.. # qdbus --system com.ubuntu.Upstart /com/ubuntu/Upstart getAllJobs
[09:34] <JohnFlux> Error: org.freedesktop.DBus.Error.AccessDenied
[09:35] <mbiebl> works for me
[09:35] <JohnFlux> mbiebl, :-/
[09:40] <JohnFlux> mbiebl, could it be anything to do with it saying com.ubuntu.Upstart0_6   in the config file, when I don't see that in qdbus ?
[09:40] <mbiebl> try this: sudo dbus-send --print-reply --system --dest=com.ubuntu.Upstart /com/ubuntu/Upstart com.ubuntu.Upstart0_6.GetAllJobs
[09:40] <JohnFlux> mbiebl, that worked
[09:40] <mbiebl> that should even work as non-root
[09:41] <JohnFlux> mbiebl, it prints lots of entries
[09:41] <JohnFlux>       object path "/com/ubuntu/Upstart/jobs/alsa_2dmixer_2dsave"
[09:41] <JohnFlux> etc
[09:41] <mbiebl> there you go
[09:44] <JohnFlux> take: qdbus --system com.ubuntu.Upstart /com/ubuntu/Upstart/jobs/networking description
[09:44] <JohnFlux> mbiebl, how do I do that with dbus-send ?
[09:45] <mbiebl> JohnFlux: do you want to read a property?
[09:45] <JohnFlux> mbiebl, right
[09:46] <Keybuk> JohnFlux: the Upstart0_6 bit is only the interface definition
[09:46] <Keybuk> all the paths are unversioned
[09:47] <JohnFlux> Keybuk, I think I'm having two separate problems.  The first is how do I view a property. The second problem is that it ends up with two possibilities for some reason, so fails because of that
[09:48] <Keybuk> properties are done with the standard D-Bus properties interface
[09:48] <Keybuk> you send something like
[09:48] <JohnFlux> qdbus --system com.ubuntu.Upstart /com/ubuntu/Upstart GetAllJobsError: org.freedesktop.DBus.Error.AccessDenied
[09:48] <JohnFlux> Rejected send message, 2 matched rules; type="method_call", sender=":1.104" (uid=0 pid=7182 comm="qdbus) interface="(unset)" member="GetAllJobs" error name="(unset)" requested_reply=0 destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")
[09:48] <JohnFlux> (note the "2 matched rules"
[09:48] <JohnFlux> )
[09:48] <Keybuk> org.freedesktop.DBus.Properties.Get with the object path and interface
[09:48] <Keybuk> or it is the property name and interface?
[09:49] <Keybuk> JohnFlux: what was the command you used for that?
[09:49] <JohnFlux> qdbus --system com.ubuntu.Upstart /com/ubuntu/Upstart GetAllJobs
[09:49] <Keybuk> you missed out the interface
[09:50] <Keybuk> qdbus --system com.ubuntu.Upstart /com/ubuntu/Upstart com.ubuntu.Upstart0_6.GetAllJobs
[09:50] <Keybuk> maybe
[09:51] <JohnFlux> okay I think that is working:  qdbus: I don't know how to display an argument of type 'ao'
[09:51] <JohnFlux> which I think means it's working okay
[09:51] <JohnFlux> but why is there an ambiguity?
[09:51] <Keybuk> there isn't
[09:51] <Keybuk> there's just a strict security policy
[09:51] <Keybuk> you are talking to the init daemon after all ;)
[09:52] <Keybuk> you can fiddle in /etc/dbus-1/system.d/Upstart.conf and relax it
[09:52] <Keybuk> if you were root, that would be allowed
[09:52] <JohnFlux> I am root
[09:52] <JohnFlux> it's not allowed :P
[09:53] <Keybuk> may be a qdbus bug then
[09:55] <Keybuk> sending messages without an interface is generally considered bad form anyway
[09:55] <Keybuk> the dbus upstream dbus-send thing doesn't even permit it
[09:55] <JohnFlux> Keybuk, hum, so my app needs to hard code in the upstart version? :-(
[09:56] <Keybuk> yes
[09:56] <Keybuk> your app is hardcoding the upstart version anyway
[09:56] <Keybuk> you're using a pre-release interface that's subject to change
[09:57] <Keybuk> that's why the 0_6 is there
[09:57] <JohnFlux> okay that's fair enough
[09:57] <JohnFlux> any idea when it will be finalised?
[09:57] <Keybuk> 1.0
[09:57] <JohnFlux> I'm continually looking at adding upstart support to KDE System Monitor
[09:59] <Keybuk> shouldn't be hard
[09:59] <Keybuk> you can get the version property of /com/Ubuntu/Upstart
[09:59] <Keybuk> and just support multiple versions
[10:00] <Keybuk> ie.
[10:00] <Keybuk> for upstart_interface in ("0_6", "0_7", ...):
[10:01] <Keybuk>     upstart.Get("com.ubuntu.Upstart%s" % upstart_interface, "version", interface="org.freedesktop.DBus.Properties")
[10:01] <Keybuk> whichever one succeeds is the supported interface for this version of upstart
[10:02] <JohnFlux> Keybuk, that could work
[10:04] <Keybuk> http://upstart.ubuntu.com/wiki/DBusInterface
[10:04] <Keybuk> I almost documented it
[10:05] <JohnFlux> Keybuk, could you add command line examples? :)
[10:05] <JohnFlux> Keybuk, It's very complicated to print out the value of a property
[10:05] <JohnFlux> Keybuk, also, how do I get the PID of a job? :)
[10:06] <Keybuk> that's a good idea
[10:06] <JohnFlux> a quick grep of that page shows no "pid" string
[10:06] <Keybuk> PID of a job -> it's the processes property of an instance
[10:06] <Keybuk> so something like
[10:06] <Keybuk> GetJobByName() -> to get the job
[10:06] <Keybuk> GetInstance() -> to get a running instance
[10:06] <Keybuk> Get() -> to get the processes array
[10:07] <Keybuk> wing-commander scott% dbus-send --type=method_call --print-reply --system --dest=com.ubuntu.Upstart /com/ubuntu/Upstart/jobs/dbus/_ org.freedesktop.DBus.Properties.Get string:com.ubuntu.Upstart0_6.Instance string:processes
[10:07] <Keybuk> method return sender=:1.0 -> dest=:1.151 reply_serial=2
[10:07] <Keybuk>    variant       array [
[10:07] <Keybuk>          struct {
[10:07] <Keybuk>             string "main"
[10:07] <Keybuk>             int32 1090
[10:07] <Keybuk>          }
[10:07] <Keybuk>       ]
[10:08] <JohnFlux> cool, that works for me too :-)
[10:08] <JohnFlux> as a normal user
[10:08] <JohnFlux> so "1090" is the pid, right?
[10:08] <Keybuk> yes
[10:08] <Keybuk> right
[10:08] <Keybuk> I tried fairly hard to make sure that all the "read"y things are usable as ordinary users
[10:08] <mbiebl> Keybuk: you are planning a 0.7 :-)
[10:08] <Keybuk> you only need to be root to change
[10:08] <Keybuk> mbiebl: yes
[10:09] <mbiebl> would you mind blogging about your new roadmap?
[10:10] <Keybuk> I don't have a roadmap yet
[10:10] <mbiebl> hm, ok
[10:10] <JohnFlux> Keybuk, offtopic a bit, but I recently added support for showing the memory usage of a process to system activity
[10:10] <JohnFlux> Keybuk, http://img199.imageshack.us/img199/2900/ksysguarddetails4.png
[10:10] <JohnFlux> Keybuk, it's pretty cool imho :-)
[10:11] <mbiebl> Keybuk: I know you don't like #ifdefs, but the introduction of __abort_msg in libnih bumped the glibc dependency to 2.11 if I see that correctly
[10:12] <Keybuk> JohnFlux: the private library bit of C++ apps always scares me
[10:12] <Keybuk> it's the relocation tables
[10:12] <ion> johnflux: /me suggests 3.6&nbsp;MB (assuming it’s using a HTML renderer).
[10:12] <Keybuk> mbiebl: only if you build against glibc 2.11
[10:12] <Keybuk> and only if your glibc is configured strangely
[10:12] <Keybuk> (afaik __abort_msg isn't a versioned symbol for glibc - it's a private one)
[10:12] <JohnFlux> ion, actually I was thinking of making it a non-breakable half space
[10:12] <mbiebl> Keybuk: well, it seems I can't compile libnih with 2.10
[10:13] <JohnFlux> ion, I'm not sure if I can do that in html
[10:13] <Keybuk> mbiebl: should be able to.  you trying 1.0.1 ?
[10:13] <mbiebl> lemme try again
[10:13] <Keybuk> it's a weak reference anyway, your glibc can be missing it entirely and things still work
[10:14] <ion> johnflux: &#x2009;
[10:15] <ion> johnflux: Sorry, that wasn’t nonbreakable. (Oh, and &thinsp; would be a better name for the same thing anyway.)
[10:15] <JohnFlux> ion, I think there might be a 0-width nonbreakable character
[10:17] <ion> johnflux: CSS: .nobr { white-space: nowrap; } and then <span class="nobr">...</span>
[10:17] <JohnFlux>   ah maybe 202F
[10:17] <JohnFlux> NARROW NO-BREAK SPACE
[10:17] <JohnFlux> ion, maybe your way is better though :-D
[10:17] <JohnFlux> since they are already in a span anyway
[10:22] <mbiebl> http://paste.debian.net/59231/
[10:22] <mbiebl> Keybuk: I'm at revision 1031
[10:23] <mbiebl> libc is 2.10.2-5
[10:23] <JohnFlux> ion, your way worked nicely - thanks :-)
[10:27] <Keybuk> mbiebl: I just renamed __abort_msg to _x_abort_msg and it worked for me
[10:27] <Keybuk> (in the code)
[10:28] <mbiebl> Keybuk: have you pushed those changes?
[10:28] <Keybuk> yes
[10:29] <Keybuk> huh
[10:29] <Keybuk> looks like lp is weirdly out of date
[10:29] <Keybuk> if I pull from lp via ssh, I have -r 1036
[10:29] <Keybuk> but if I pull via http, I have 1031
[10:29] <Keybuk> let me try forcing a push again
[10:29] <mbiebl> yep, that's what I get
[10:31] <Keybuk> ok
[10:31] <Keybuk> try pulling now
[10:31] <Keybuk> I've forced a push again
[10:31] <Keybuk> http://bazaar.launchpad.net/~scott/libnih/trunk/revision/1033 being the important commit ;)
[10:46] <mbiebl> Keybuk: make passes, make check is running but it takes looong
[10:47] <Keybuk> test_node ?
[10:48] <mbiebl> that one almost killed my poor laptop :-)
[10:49] <Keybuk> it's always been a big one
[10:49] <Keybuk> and since it's basically really stress testing the code that interfaces init to the rest of the system, I feel it deserves really thorough testing :p
[10:49] <mbiebl> ok, all tests passed
[10:52] <Keybuk> sweet
[10:52] <mbiebl> no, on to trying this --with-local-libnih option
[10:52] <mbiebl> how is that supposed to work?
[10:53] <Keybuk> basically
[10:53] <Keybuk> bzr branch lp:libnih
[10:53] <Keybuk> bzr branch lp:upstart
[10:53] <Keybuk> cd libnih ; autoreconf ; ./configure ; make
[10:53] <Keybuk> cd ../upstart ; autoreconf ; ./configure --with-local-libnih=../libnih ; make
[10:53] <mbiebl> trying...
[10:55] <mbiebl> Keybuk: http://paste.debian.net/59235/
[10:56] <mbiebl> sorry, German locale
[10:56] <mbiebl> but I guess you get the error
[10:57] <mbiebl> upstart bzr is at -r1228 fwiw
[11:01] <mbiebl> Keybuk: that one is better http://paste.debian.net/59237/
[11:01] <mbiebl> I guess it's a quoting problem
[11:02] <mbiebl> -I"\"/home/michael/bzr/libnih\"" looks suspiocious
[11:07] <mbiebl> http://paste.debian.net/59238/ fixes it for me
[11:09] <Keybuk> oh, hmm
[11:09] <Keybuk> wonder what I was thinking there
[11:09] <Keybuk> probably -D ;)
[11:12] <Keybuk> (and I wonder why it works here)
[11:12] <mbiebl> oh
[11:13] <mbiebl> interesting
[11:13] <Keybuk> gcc difference maybe
[11:13] <Keybuk> it only needs to be -I"..."
[11:13] <Keybuk> the "\"...\"" thing is for when you do -Dsomethingdir="\"...\""
[14:21] <pilch> Helo. My upstart/init is telling me, "Failed to connect to to socket /com/ubuntu/upstart: connection refused". Any suggestions on what to read to fix this? I don't know where /com/ubuntu comes from...
[14:23] <pilch> I'm perfectly happy being pointed to the correct FM to RT...
[14:24] <Keybuk> upstart isn't telling you that
[14:24] <Keybuk> now tell us what is telling you that
[14:26] <pilch> The only way I am able to boot my system is by booting with init=/bin/bash. After remounting rw, I attempted to run "init 1" which then tells me that error.
[14:26] <mbiebl> pilch: which distro?
[14:26] <pilch> just upgraded to ubuntu/lucid
[14:27] <pilch> there is no "/com/ubuntu" directory. I'm assuming something creates it? Not sure what...
[14:28] <Keybuk> pilch: if you do init=/bin/bash, you're not running Upstart
[14:28] <pilch> keybuk: is it possible to transition from bash to upstart? 
[14:29] <Keybuk> pilch: exec /sbin/init
[14:29] <pilch> ah. ok. Let me try that.
[14:31] <pilch> Ah, thank you. Now at least I can see what's going on while upstart is, uh, starting up. It had previously been hanging on a blank screen when I would try to boot up normally.
[14:32] <pilch> hmm. It appears to be stuck on the if-up.d/upstart script. It's running initctl emit net-device-up IFACE=lo ADDRFAM=inet METHOD=loopback
[14:34] <pilch> any idea why that command would hang?
[14:34] <Keybuk> pilch: update your lucid install
[14:35] <pilch> meh. I did... hmm, maybe dpkg-reconfigure will work now.
[14:36] <Keybuk> that was an NM bug that was fixed
[14:36] <pilch> oohh. well, let me try again and see if it grabs an update...
[14:40] <pilch> ooh, fun. A TeX upgrade is included...
[14:42] <pilch> well, hopefully this will solve it... off to reboot.
[15:08] <pilch> Hmm. No. It still hangs.
[15:09] <pilch> :/
[15:20] <mbiebl> Keybuk: interesting. Apparently sysvinit used SIGUSR1 to reopen /dev/initctl
[15:21] <mbiebl> just wondered, why the Debian init scripts send a kill -USR1 1
[15:21] <mbiebl> mountall.sh, to be precise
[15:35] <lnieves> Hello, I was wondering if anybody could point me in the right direction about trying to solve LP#328881
[15:35] <lnieves> which deals with the issue of boot logging
[15:40] <lnieves> what I know so far: the handler for the "console" stanza is system_setup_console() in init/system.c
[15:41] <Keybuk> lnieves: what do you mean by "solve" ?
[15:42] <lnieves> there should be a case CONSOLE_LOGGED or something similar, which is missing
[15:42] <lnieves> I mean, try to implement the "console logged" stanza, which is ignored
[15:43] <lnieves> and by that, add the boot logging, which has been missing since long time ago
[15:43] <Keybuk> console logged was removed deliberately
[15:43] <lnieves> https://bugs.launchpad.net/upstart/+bug/328881
[15:44] <Keybuk> you already pointed at the wishlist bug
[15:45] <lnieves> So, is there no plan or intention to solve that bug/wishlist?
[15:45] <lnieves> maybe i misunderstood
[15:46] <Keybuk> the bug is open, so there's an intention to solve it
[15:46] <Keybuk> there's no plan though
[15:46] <Keybuk> other than "find a way to log output of jobs, even while the root filesystem is read-only, that doesn't cause other problems"
[15:47] <lnieves> i see.
[15:48] <lnieves> OK, so, I'm a right that the place to start thinking about changing is in init/systeḿ.c ?
[15:53] <sadmac2> lnieves: sounds like a plan
[15:56] <lnieves> OK, another question. The (in)famous bootlogd manages to somehow get the output from jobs and send them to /var/log/boot
[15:57] <Keybuk> lnieves: certainly that's where the change would begin
[15:57] <Keybuk> lnieves: no it doesn't
[15:57] <lnieves> so, **in principle** it would be possible to "borrow" code from bootlogd?
[15:57] <lnieves> no? I thought it did
[15:58] <lnieves> some people pointed to bootlogd as a workaround for the lack of boot logging in upstart
[16:00] <Keybuk> no, bootlogd does something really quite different
[16:01] <lnieves> in which way?
[16:02] <Keybuk> in every way
[16:06] <lnieves> do you care to elaborate?
[16:07] <Keybuk> do you know how bootlogd works?
[16:10] <lnieves> no, if i knew I would not be asking, would i?
[16:13] <lnieves> But, never mind. I have the source code for both projects, so I can look it up myself.
[16:14] <lnieves> I was just trying to get an idea quicker than it would have taken me to surf through the source code.
[16:15] <lnieves> I'll give it a try and you'll certainly know when/if I succeed or when/If I have more "structured" doubts about the changes.
[16:15] <lnieves> cheers!
[16:26] <Keybuk> "hi, I don't know anything, but I'm going to solve the world - could you tell me how?"
[16:29] <sadmac2> Keybuk: I was him once. Come to think of it I still don't know anything. Still, I'm very close to curing cancer.
[22:00] <Keybuk> sadmac: at least he didn't ask for help programming in C
[22:58] <ion> keybuk: http://www.youtube.com/watch?v=ReOw_2f4lpY
[23:52] <sadmac> woohoo! one bug left and I can submit all this shit!
[23:53] <sadmac> Keybuk: several bloody months later, libnih /will/ grow that parser I promised.
[23:53] <sadmac> this is the most hard-fought 435 lines of my career