/srv/irclogs.ubuntu.com/2010/02/09/#upstart.txt

johnfluxHey all09:20
=== johnflux is now known as JohnFlux
JohnFluxUpstart added various functions to get the properties of jobs09:22
JohnFluxvarious dbus functions, I mean09:22
JohnFluxbut they don't seem to actually work :-)  I just get permission denied09:22
JohnFluxAs a random example:09:24
JohnFluxqdbus --system com.ubuntu.Upstart /com/ubuntu/Upstart/jobs/networking author09:24
JohnFluxError: org.freedesktop.DBus.Error.AccessDenied09:24
JohnFluxRejected 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
JohnFluxsame even running as root09:24
filiphi, I am trying to create an upstart based system, and I have a little problem here:09:25
filiphttp://pastebin.com/m1a164ddb how is this consistent?09:28
mbieblJohnFlux: how does your /etc/dbus-1/system.d/Upstart.conf look like?09:29
JohnFluxmbiebl, http://pastebin.com/m2f97827d09:31
mbieblJohnFlux: if you want to give a certain user full access, you can copy the user=root section09:32
JohnFluxmbiebl, but it doesn't work even if I do  sudo qdbus..09:33
JohnFluxroot@.. # qdbus --system com.ubuntu.Upstart /com/ubuntu/Upstart getAllJobs09:34
JohnFluxError: org.freedesktop.DBus.Error.AccessDenied09:34
mbieblworks for me09:35
JohnFluxmbiebl, :-/09:35
JohnFluxmbiebl, 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
mbiebltry this: sudo dbus-send --print-reply --system --dest=com.ubuntu.Upstart /com/ubuntu/Upstart com.ubuntu.Upstart0_6.GetAllJobs09:40
JohnFluxmbiebl, that worked09:40
mbieblthat should even work as non-root09:40
JohnFluxmbiebl, it prints lots of entries09:41
JohnFlux      object path "/com/ubuntu/Upstart/jobs/alsa_2dmixer_2dsave"09:41
JohnFluxetc09:41
mbieblthere you go09:41
JohnFluxtake: qdbus --system com.ubuntu.Upstart /com/ubuntu/Upstart/jobs/networking description09:44
JohnFluxmbiebl, how do I do that with dbus-send ?09:44
mbieblJohnFlux: do you want to read a property?09:45
JohnFluxmbiebl, right09:45
KeybukJohnFlux: the Upstart0_6 bit is only the interface definition09:46
Keybukall the paths are unversioned09:46
JohnFluxKeybuk, 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 that09:47
Keybukproperties are done with the standard D-Bus properties interface09:48
Keybukyou send something like09:48
JohnFluxqdbus --system com.ubuntu.Upstart /com/ubuntu/Upstart GetAllJobsError: org.freedesktop.DBus.Error.AccessDenied09:48
JohnFluxRejected 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
Keybukorg.freedesktop.DBus.Properties.Get with the object path and interface09:48
Keybukor it is the property name and interface?09:48
KeybukJohnFlux: what was the command you used for that?09:49
JohnFluxqdbus --system com.ubuntu.Upstart /com/ubuntu/Upstart GetAllJobs09:49
Keybukyou missed out the interface09:49
Keybukqdbus --system com.ubuntu.Upstart /com/ubuntu/Upstart com.ubuntu.Upstart0_6.GetAllJobs09:50
Keybukmaybe09:50
JohnFluxokay I think that is working:  qdbus: I don't know how to display an argument of type 'ao'09:51
JohnFluxwhich I think means it's working okay09:51
JohnFluxbut why is there an ambiguity?09:51
Keybukthere isn't09:51
Keybukthere's just a strict security policy09:51
Keybukyou are talking to the init daemon after all ;)09:51
Keybukyou can fiddle in /etc/dbus-1/system.d/Upstart.conf and relax it09:52
Keybukif you were root, that would be allowed09:52
JohnFluxI am root09:52
JohnFluxit's not allowed :P09:52
Keybukmay be a qdbus bug then09:53
Keybuksending messages without an interface is generally considered bad form anyway09:55
Keybukthe dbus upstream dbus-send thing doesn't even permit it09:55
JohnFluxKeybuk, hum, so my app needs to hard code in the upstart version? :-(09:55
Keybukyes09:56
Keybukyour app is hardcoding the upstart version anyway09:56
Keybukyou're using a pre-release interface that's subject to change09:56
Keybukthat's why the 0_6 is there09:57
JohnFluxokay that's fair enough09:57
JohnFluxany idea when it will be finalised?09:57
Keybuk1.009:57
JohnFluxI'm continually looking at adding upstart support to KDE System Monitor09:57
Keybukshouldn't be hard09:59
Keybukyou can get the version property of /com/Ubuntu/Upstart09:59
Keybukand just support multiple versions09:59
Keybukie.10:00
Keybukfor upstart_interface in ("0_6", "0_7", ...):10:00
Keybuk    upstart.Get("com.ubuntu.Upstart%s" % upstart_interface, "version", interface="org.freedesktop.DBus.Properties")10:01
Keybukwhichever one succeeds is the supported interface for this version of upstart10:01
JohnFluxKeybuk, that could work10:02
Keybukhttp://upstart.ubuntu.com/wiki/DBusInterface10:04
KeybukI almost documented it10:04
JohnFluxKeybuk, could you add command line examples? :)10:05
JohnFluxKeybuk, It's very complicated to print out the value of a property10:05
JohnFluxKeybuk, also, how do I get the PID of a job? :)10:05
Keybukthat's a good idea10:06
JohnFluxa quick grep of that page shows no "pid" string10:06
KeybukPID of a job -> it's the processes property of an instance10:06
Keybukso something like10:06
KeybukGetJobByName() -> to get the job10:06
KeybukGetInstance() -> to get a running instance10:06
KeybukGet() -> to get the processes array10:06
Keybukwing-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:processes10:07
Keybukmethod return sender=:1.0 -> dest=:1.151 reply_serial=210:07
Keybuk   variant       array [10:07
Keybuk         struct {10:07
Keybuk            string "main"10:07
Keybuk            int32 109010:07
Keybuk         }10:07
Keybuk      ]10:07
JohnFluxcool, that works for me too :-)10:08
JohnFluxas a normal user10:08
JohnFluxso "1090" is the pid, right?10:08
Keybukyes10:08
Keybukright10:08
KeybukI tried fairly hard to make sure that all the "read"y things are usable as ordinary users10:08
mbieblKeybuk: you are planning a 0.7 :-)10:08
Keybukyou only need to be root to change10:08
Keybukmbiebl: yes10:08
mbieblwould you mind blogging about your new roadmap?10:09
KeybukI don't have a roadmap yet10:10
mbieblhm, ok10:10
JohnFluxKeybuk, offtopic a bit, but I recently added support for showing the memory usage of a process to system activity10:10
JohnFluxKeybuk, http://img199.imageshack.us/img199/2900/ksysguarddetails4.png10:10
JohnFluxKeybuk, it's pretty cool imho :-)10:10
mbieblKeybuk: 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 correctly10:11
KeybukJohnFlux: the private library bit of C++ apps always scares me10:12
Keybukit's the relocation tables10:12
ionjohnflux: /me suggests 3.6 MB (assuming it’s using a HTML renderer).10:12
Keybukmbiebl: only if you build against glibc 2.1110:12
Keybukand only if your glibc is configured strangely10:12
Keybuk(afaik __abort_msg isn't a versioned symbol for glibc - it's a private one)10:12
JohnFluxion, actually I was thinking of making it a non-breakable half space10:12
mbieblKeybuk: well, it seems I can't compile libnih with 2.1010:12
JohnFluxion, I'm not sure if I can do that in html10:13
Keybukmbiebl: should be able to.  you trying 1.0.1 ?10:13
mbiebllemme try again10:13
Keybukit's a weak reference anyway, your glibc can be missing it entirely and things still work10:13
ionjohnflux:  10:14
ionjohnflux: Sorry, that wasn’t nonbreakable. (Oh, and   would be a better name for the same thing anyway.)10:15
JohnFluxion, I think there might be a 0-width nonbreakable character10:15
ionjohnflux: CSS: .nobr { white-space: nowrap; } and then <span class="nobr">...</span>10:17
JohnFlux  ah maybe 202F10:17
JohnFluxNARROW NO-BREAK SPACE10:17
JohnFluxion, maybe your way is better though :-D10:17
JohnFluxsince they are already in a span anyway10:17
mbieblhttp://paste.debian.net/59231/10:22
mbieblKeybuk: I'm at revision 103110:22
mbiebllibc is 2.10.2-510:23
JohnFluxion, your way worked nicely - thanks :-)10:23
Keybukmbiebl: I just renamed __abort_msg to _x_abort_msg and it worked for me10:27
Keybuk(in the code)10:27
mbieblKeybuk: have you pushed those changes?10:28
Keybukyes10:28
Keybukhuh10:29
Keybuklooks like lp is weirdly out of date10:29
Keybukif I pull from lp via ssh, I have -r 103610:29
Keybukbut if I pull via http, I have 103110:29
Keybuklet me try forcing a push again10:29
mbieblyep, that's what I get10:29
Keybukok10:31
Keybuktry pulling now10:31
KeybukI've forced a push again10:31
Keybukhttp://bazaar.launchpad.net/~scott/libnih/trunk/revision/1033 being the important commit ;)10:31
mbieblKeybuk: make passes, make check is running but it takes looong10:46
Keybuktest_node ?10:47
mbieblthat one almost killed my poor laptop :-)10:48
Keybukit's always been a big one10:49
Keybukand 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 :p10:49
mbieblok, all tests passed10:49
Keybuksweet10:52
mbieblno, on to trying this --with-local-libnih option10:52
mbieblhow is that supposed to work?10:52
Keybukbasically10:53
Keybukbzr branch lp:libnih10:53
Keybukbzr branch lp:upstart10:53
Keybukcd libnih ; autoreconf ; ./configure ; make10:53
Keybukcd ../upstart ; autoreconf ; ./configure --with-local-libnih=../libnih ; make10:53
mbiebltrying...10:53
mbieblKeybuk: http://paste.debian.net/59235/10:55
mbieblsorry, German locale10:56
mbieblbut I guess you get the error10:56
mbieblupstart bzr is at -r1228 fwiw10:57
mbieblKeybuk: that one is better http://paste.debian.net/59237/11:01
mbieblI guess it's a quoting problem11:01
mbiebl-I"\"/home/michael/bzr/libnih\"" looks suspiocious11:02
mbieblhttp://paste.debian.net/59238/ fixes it for me11:07
Keybukoh, hmm11:09
Keybukwonder what I was thinking there11:09
Keybukprobably -D ;)11:09
Keybuk(and I wonder why it works here)11:12
mbiebloh11:12
mbieblinteresting11:13
Keybukgcc difference maybe11:13
Keybukit only needs to be -I"..."11:13
Keybukthe "\"...\"" thing is for when you do -Dsomethingdir="\"...\""11:13
=== ev_ is now known as ev
pilchHelo. 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:21
pilchI'm perfectly happy being pointed to the correct FM to RT...14:23
Keybukupstart isn't telling you that14:24
Keybuknow tell us what is telling you that14:24
pilchThe 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
mbieblpilch: which distro?14:26
pilchjust upgraded to ubuntu/lucid14:26
pilchthere is no "/com/ubuntu" directory. I'm assuming something creates it? Not sure what...14:27
Keybukpilch: if you do init=/bin/bash, you're not running Upstart14:28
pilchkeybuk: is it possible to transition from bash to upstart? 14:28
Keybukpilch: exec /sbin/init14:29
pilchah. ok. Let me try that.14:29
pilchAh, 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:31
pilchhmm. 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=loopback14:32
pilchany idea why that command would hang?14:34
Keybukpilch: update your lucid install14:34
pilchmeh. I did... hmm, maybe dpkg-reconfigure will work now.14:35
Keybukthat was an NM bug that was fixed14:36
pilchoohh. well, let me try again and see if it grabs an update...14:36
pilchooh, fun. A TeX upgrade is included...14:40
pilchwell, hopefully this will solve it... off to reboot.14:42
pilchHmm. No. It still hangs.15:08
pilch:/15:09
mbieblKeybuk: interesting. Apparently sysvinit used SIGUSR1 to reopen /dev/initctl15:20
mbiebljust wondered, why the Debian init scripts send a kill -USR1 115:21
mbieblmountall.sh, to be precise15:21
lnievesHello, I was wondering if anybody could point me in the right direction about trying to solve LP#32888115:35
lnieveswhich deals with the issue of boot logging15:35
lnieveswhat I know so far: the handler for the "console" stanza is system_setup_console() in init/system.c15:40
Keybuklnieves: what do you mean by "solve" ?15:41
lnievesthere should be a case CONSOLE_LOGGED or something similar, which is missing15:42
lnievesI mean, try to implement the "console logged" stanza, which is ignored15:42
lnievesand by that, add the boot logging, which has been missing since long time ago15:43
Keybukconsole logged was removed deliberately15:43
lnieveshttps://bugs.launchpad.net/upstart/+bug/32888115:43
Keybukyou already pointed at the wishlist bug15:44
lnievesSo, is there no plan or intention to solve that bug/wishlist?15:45
lnievesmaybe i misunderstood15:45
Keybukthe bug is open, so there's an intention to solve it15:46
Keybukthere's no plan though15:46
Keybukother than "find a way to log output of jobs, even while the root filesystem is read-only, that doesn't cause other problems"15:46
lnievesi see.15:47
lnievesOK, so, I'm a right that the place to start thinking about changing is in init/systeḿ.c ?15:48
sadmac2lnieves: sounds like a plan15:53
lnievesOK, another question. The (in)famous bootlogd manages to somehow get the output from jobs and send them to /var/log/boot15:56
Keybuklnieves: certainly that's where the change would begin15:57
Keybuklnieves: no it doesn't15:57
lnievesso, **in principle** it would be possible to "borrow" code from bootlogd?15:57
lnievesno? I thought it did15:57
lnievessome people pointed to bootlogd as a workaround for the lack of boot logging in upstart15:58
Keybukno, bootlogd does something really quite different16:00
lnievesin which way?16:01
Keybukin every way16:02
lnievesdo you care to elaborate?16:06
Keybukdo you know how bootlogd works?16:07
lnievesno, if i knew I would not be asking, would i?16:10
lnievesBut, never mind. I have the source code for both projects, so I can look it up myself.16:13
lnievesI was just trying to get an idea quicker than it would have taken me to surf through the source code.16:14
lnievesI'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
lnievescheers!16:15
Keybuk"hi, I don't know anything, but I'm going to solve the world - could you tell me how?"16:26
sadmac2Keybuk: I was him once. Come to think of it I still don't know anything. Still, I'm very close to curing cancer.16:29
=== Md_ is now known as Md
Keybuksadmac: at least he didn't ask for help programming in C22:00
ionkeybuk: http://www.youtube.com/watch?v=ReOw_2f4lpY22:58
sadmacwoohoo! one bug left and I can submit all this shit!23:52
sadmacKeybuk: several bloody months later, libnih /will/ grow that parser I promised.23:53
sadmacthis is the most hard-fought 435 lines of my career23:53

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