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