/srv/irclogs.ubuntu.com/2009/12/08/#upstart.txt

=== robbiew is now known as robbiew_
=== juergbi_ is now known as juergbi
=== [2]sassyn is now known as sassyn
=== ev1 is now known as ev
=== ev1 is now known as ev
=== robbiew_ is now known as robbiew
=== [3]sassyn is now known as sassyn
mistergibsonis this the channel for ubuntu networking stuff?20:30
xopahHello could someone help me in a matter where I have hard to connect to a multiple SSID WLAN network?20:32
Keybukxopah: that has nothing to do with Upstart, sorry20:37
ionTwo persons from totally different parts thought this channel has something to do with networkingithin a couple of minutes? Interesting occurrence.20:45
ionnetworking within20:45
xopahkeybuk: could you please point me in the right direction?20:48
xopahWher shuld I turn?20:48
sadmacxopah: #ubuntu would be a good next stop20:49
xopahion: we were recommended to go here from #ubuntu ...20:49
sadmacKeybuk: ^^WTF?!?20:49
xopahsadmac: thanks. I'll try there again.20:50
sadmacxopah: np20:50
sadmachmm. Is #ubuntu having troll problems?20:50
* sadmac imagine's Scott's "you're making absolutely no sense" face20:52
YounderI am having problems with programs due to a pygtk not beeing seen20:52
Younderthere are multiple python versions and it worked under gentoo20:53
sadmacYounder: how does this relate to upstart?20:53
* sadmac begins to get a sinking feeling20:54
Youndersorry I'll go back to the python group.. take my chances20:55
=== robbiew is now known as robbiew-afk
=== robbiew-afk is now known as robbiew_
* Keybuk wonders whether there's a channel mode flag20:58
Keybukto refuse entry to people also in #ubuntu20:58
sadmacKeybuk: wouldn't that block, say, you for example?20:58
Keybukno20:58
KeybukI'm not in #ubuntu20:58
sadmacKeybuk: heh. maybe I don't understand #ubuntu20:59
* sadmac is in #fedora20:59
KeybukUbuntu is where users go to ask questions20:59
Keybukerr #ubuntu20:59
sadmacKeybuk: yeah. so is #fedora. I like to meet the people21:00
Keybukwe have more users than you21:00
Keybuka LOT more users21:00
Keybukthey whine more too21:00
sadmacKeybuk: yeah, I don't know that I'd like to meet /your/ users. Ours troll more than yours I'd imagine though21:00
Keybukat least yours might know something of what they're talking about :p21:00
sadmacKeybuk: actually I think 3/4 of the people giving help at any time in #fedora just have irssi set up to periodically say "www.justfuckinggoogleit.com"21:01
ionsadmac: Just for fun, join #ubuntu for a minute. It’ll be an... interesting experience. :-P21:01
ion“I visited #ubuntu shortly and survived”21:02
sadmacKeybuk: again though, if you do have so many more users, wouldn't you also be blocking half the relevant portion of the internet?21:02
* raphael__ wonders how #ubuntu, #fedora and #debian compare21:02
sadmacion: My God, its full of stars!21:02
ionIt’s full of trolls and the blind trying to lead the blind! rather.21:03
sadmac#debian is nearly as big and not 1/10 as noisy21:03
nottingion: that doesn't help me delineate between the three21:04
sadmacion: they seem to be under the impression that they're linux users of some kind21:04
sadmacfrom what I've heard, #debian has all /their/ advice macro'd to "go install Ubuntu"21:04
raphael__sadmac: don't think so, it's usually /msg dpkg foo21:05
sadmacraphael__: the users know what dpkg is? sounds like a nice place.21:07
Keybuksadmac: dpkg is a bot on #debian21:07
* raphael__ wonders how long Keybuk is going to wait before setting mode +m to stop this offtopic conversation :)21:07
sadmacKeybuk: oic21:08
Keybukraphael__: this channel rarely gets on-topic :p21:08
raphael__Keybuk: but from what I've seen off-topic conversations don't last this long ;)21:08
sadmacKeybuk: fine. on topic: I'm finally edging near a workable nih_parse, which is, of course, making me want to replace nih_error while I'm at it :)21:08
YounderYes, it would be terrible if that actual users of upstart got a say :)21:09
sadmacYounder: what are you talking about?21:10
Keybuksadmac: what were you going to change?21:11
YounderWell at present the boot process, to me at any rate, is very confused. I can't see where sysv ends and upstart begins.21:11
sadmacKeybuk: probably not change so much as a new mechanism, along the lines of the lisp condition/restart thing that I've poked at a few times21:11
KeybukYounder: depends which distro you look at21:12
Younderubuntu 9.1021:12
sadmacKeybuk: it would also make a nice replacement for nih_log while we're at it (probably with no API change there)21:12
Keybukmost actual Linux distributions tend to have the Upstart /sbin/init daemon run the SysV-style rc scripts (/etc/init.d)21:12
Keybuksome distributions (like Ubuntu) do far more in a Upstart native way than others (like Fedora)21:13
Keybukembedded Linux platforms (Chrome OS, Palm Web OS, Maemo, etc.) often use Upstart entirely natively21:13
KeybukYounder: read you read "man runlevel" ?21:13
Keybuksadmac: I know I'm going to regret this, but ... explain? :p21:13
sadmacnotting: since I'm thinking of it, when do you want 0.6 tagged into rawhide? Will you just do it yourself when initscripts is ready?21:14
KeybukYounder: that should be "man 7 runlevel"21:14
sadmacKeybuk: basically there is a function/macro called nih_sig()21:14
YounderKeybuk, sure, but gtk is not on any runlevel. Tomcat and apache, however, are.21:14
KeybukYounder: that's because GTK+ has nothing to do with Upstart21:14
Keybukand Upstart has nothing to do with GTK+ either21:14
Keybukmy toaster is also not on any runlevel21:15
sadmacKeybuk: if (some_error) nih_sig (TYPE_OF_ERROR, &some_info, &some_more_info);21:15
nottingsadmac: hrm. i haven't looked at the other apps. so i'll probably work on it tomorrow or thursday21:15
Keybukyet I can still make toasted goodness21:15
Keybuksadmac: that's basically how nih_error behaves, no?21:15
Younderand ubuntu has nothing to with upstart either..?21:15
sadmacKeybuk: well, what nih_sig does is interesting21:15
YounderThey just created it21:15
KeybukYounder: Ubuntu uses Upstart, yes21:15
michashi, I am trying to debug some ubuntu init.d scripts by adding some echo lines. Unfortunately they print nowhere. :( If I understood everything right, upstart is the one who emulates old init and executes the scripts. - Is there a way to make that echo output visible?21:16
ionYounder is clearly a troll. Let’s not feed it anymore. :-P21:16
YounderI guess what I wnat to know is: is there a reference manual for upstart?21:16
sadmacKeybuk: nih_sig runs a handler for the error, which is a function pointer registered beforehand21:16
KeybukYounder: plenty, start at "man upstart" on your system?21:17
sadmacKeybuk: that function runs right away, and either 1) corrects the error (notice the args passed by ref) 2) longjmps, or 3) aborts21:17
Keybukah21:17
Keybukmore like dpkg-style21:17
YounderKeybuk, info?21:17
Keybukyou have ohshit()21:17
raphael__btw, what's all the nih_foo? I saw it on ureadahead and seemed like it is being used in other places, but it's sort of strange that it doesn't seem to be a shlib21:17
sadmacKeybuk: never seen dpkg code21:18
Keybukohshit calls any registered error handlers and longjmps back up21:18
Keybukraphael__: it is in lucid21:18
Youndernever mind21:18
sadmacKeybuk: the nih_log thing comes in under the "corrects the error" option. nih_log just calls nih_sig (LOG_EVENT_$LEVEL, log_text)21:19
Keybukoh, I see where you're going with that21:19
sadmacKeybuk: the default handler does just what nih_log does now, but because there's a handler stack, the log line is now also a sort of tracepoint when you're debugging21:19
Keybukit'd be nice if you could thwart the error ;)21:19
sadmacKeybuk: yeah, that too21:20
Keybuke.g. if you raise ENOFILE, an error handler could increase the rlimit, then make you try again21:20
sadmacKeybuk: precisely the idea21:20
Keybukbut then that requires while loops and stuff ;)21:20
Keybukwhile (some_syscall (...) < 0)21:20
ionYeah, the condition/restart thing is powerful.21:20
Keybuk  nih_sig (...)21:20
Keybukie. assume that nih_sig solves the problem or longjmps you out21:20
Keybukthis is basically how dpkg works21:21
sadmacKeybuk: I'm pulling apart libunwind now to see if it has anything to make some of the uglies around longjmp21:21
ionMore powerful than plain exceptions.21:21
KeybukI spent a long time maintaining dpkg21:21
Keybuknih_error was originally written for dpkg2 ;)21:21
Keybukit doesn't behave the same way for a reason21:21
sadmacion: and, ironically, easier to do in C21:21
Keybuka *lot* of problems with dpkg were caused by errant error handlers21:21
sadmacKeybuk: I think it can be made cleaner than it has been.21:22
sadmacI'll play with it if I get to it. right now I want to get the parser standing up so I can finish the early triggers stuff and push some of it.21:23
michashi, I am trying to debug some ubuntu init.d scripts by adding some echo lines. Unfortunately they print nowhere. :( If I understood everything right, upstart is the one who emulates old init and executes the scripts. - Is there a way to make that echo output visible? (Any hint?)21:26
sadmacmichas: add a line to the jobs that says "console output"21:26
michassadmac, well, it is an old init.d script. IIRC "console output" works only in the real upstart scripts.21:27
michasthe first "log_action_begin_msg" prints, but any further echo or log doesn't print anymore. I assume it ist upstart filtering the output or something...21:28
sadmacmichas: that's going to depend on how upstart is being used to run sysv scripts in ubuntu. you'll have to ask in an ubuntu related channel21:29
ionmichas: If the script sources /lib/lsb/init-functions, try log_action_msg "foo" or something like that.21:29
Keybukstill won't work ;)21:30
Keybukmichas: write to a different file, e.g.  echo blah blah >> /dev/my.log21:30
michasion, it does use init-function. the first log message works. the second does not. - that's why I suspect upstart.21:30
Keybuknothing to do with upstart per se21:31
KeybukUbuntu has a "no messages on console during boot" policy21:31
ionmichas: Please ignore what i said and do what Keybuk said. :-)21:31
Keybukthey get hidden with extreme prejudice21:31
michasKeybuk, ok, that will surely do. but I'm still wordering wtf is goin on there. ;)21:31
Keybukmichas: there are ways to make them appear21:34
Keybukyou can add "console output" to /etc/init/rc.conf and /etc/init/rc-sysinit.conf21:34
Keybukand something like console=tty1 to your kernel command-lien21:34
Keybukmaking sure not to run usplash21:34
Keybukthat brings most of them back21:34
michasah, thanks, that looks good. I'll try that.21:35
Keybukbut if it doesn't work, try #ubuntu ;)21:35
ion:-D21:35
michasallright, I'll do. thanks.21:36
michasone last real upstart question: ist there a way to do something like "start on *" f.e. to monitor all events?21:38
Keybukno21:39
ionWhy would you want that?21:39
Keybuksuch a thing would match itself, for a start21:39
Keybukincluding its own stopped event ;)21:39
Keybukif you instanced it, you'd end up with a fork bomb21:39
michasI just started to read about all the upstart stuff. And then I wondered what events will happen at a startup on my system.21:40
sadmacthere used to be a way to dump them as they happened, but we removed it.21:41
sadmackind of a dangerous thing. People do horrible things when you give them access to that sort of thing from shell scripts.21:42
michas:) ok, guess you are right. :)21:42
Keybukyou can still see them with --verbose21:42
Keybukthere's thousands in the startup of a typical ubuntu system21:43
michaswhere do I have to put that --verbose?21:43
ionkeybuk: --verbose or --debug?21:43
Keybukmichas: kernel command-line21:43
Keybukion: I tend to recommend --verbose these days21:43
ionAlright21:43
Keybuk--debug adds things you generally don't want to see21:43
sadmacmichas: you could also systemtap them out if you have a recent enough version and a little elbow grease to apply21:44
* sadmac makes a note to add stap tracepoints to upstart for doing that sort of thing21:44
michasare those options documented anywhere?21:45
Keybukmichas: no21:46
michasok :)21:46
Keybuk(unless you count "init --help" :p)21:46
michasoops. too easy.21:47
michasok, thanks a lot. (That current upstart/rc mix in ubuntu is quite confusing, once things don't work as expected... Hope, they switch to upstart completely soon.)21:55

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