/srv/irclogs.ubuntu.com/2011/02/08/#upstart.txt

djszapiKeybuk: btw, I am not sure I understand your implementation00:02
djszapiI mean the bootlogd of the sysvinit is much longer.00:03
djszapiI understand you just open the /dev/kmsg up for writing, but... ;)00:03
djszapihttp://svn.savannah.nongnu.org/viewvc/sysvinit/trunk/src/bootlogd.c?root=sysvinit&view=markup00:04
Keybukright00:08
Keybukbootlogd is a really complicated thing that never works00:08
Keybukit *tries* to work by redirecting console output into itself with an ioctl00:08
Keybuk(assumedly into a tty)00:08
Keybukand then buffering that output internally until a filesystem is available (by constantly trying to write)00:08
Keybukand then finally once a filesystem is available, flushing out, and then carrying on writing00:08
Keybukthe thing is00:08
Keybukbootlogd rarely works00:09
Keybukbecause it relies on a whole massive stack of things that generally you don't have in the earliest phases of boot00:09
Keybukso I cheated :p00:09
Keybukmy patch makes init stuff its output into the kernel's own log system00:09
djszapirotfl ;)00:09
Keybuk(the same one that printk() uses in the kernel)00:09
Keybukthat's already buffered by the kernel00:09
Keybukand you can change the size of that buffer on the command-line if it overflows00:09
Keybukand there are well understood mechanisms for getting the data out (dmesg)00:10
Keybukor for flushing and writing to files after (klogd)00:10
Keybuketc.00:10
Keybukthe only thing it needs is /dev/kmsg, which tends to exist fairly early00:10
Keybukthanks to devtmpfs :)00:10
Keybuk(where fairly early is before userspace)00:10
djszapiyou might want to mention these information on the mailing list before others start asking or to just englighten others about the differences.00:10
Keybukif people ask, I shall answer00:11
djszapilet me ask it there :P00:11
djszapiso it needs devtmpfs...mg.00:12
djszapi* I mean mmh00:12
djszapiso what happens before mounting that ?00:12
djszapi'it *tries* to work by redirecting console output into itself with an ioctl' and 'bootlogd rarely works' -> sounds hilarious in a way ;)00:13
djszapiI mean it is so old stuff, I would expect it is quite stable.00:14
SpamapSKeybuk: could this same trick be used for bug #328881 ? or.. did I miss where you said thats the whole point?00:41
SpamapSKeybuk: I know the plan for that bug (logging job output) is to use a ring buffer inside upstart.. which I think would be preferrable..00:43
Keybukdjszapi: before that, it'll probably just fail to log00:43
Keybukbut since /dev will be one of the very first things you create ...00:43
KeybukSpamapS: right, it's quite different00:44
djszapiKeybuk: sounds about bad :)00:44
KeybukI don't think we want to dump job output into dmesg ;)00:44
djszapibut the bootlogd implementation depends on the /dev too as long as it tries to write it, thus...can be tolerated :P00:45
Keybukyeah00:45
Keybukbootlogd actually usually depends on /dev *and* /dev/pts00:46
Keybukand in many situations, /dev/pts might be one of the very last things you setup (since nominally, you don't need it until you come to fiddling with xterms)00:46
Keybuk(you could always mknod /dev/kmsg in your initramfs, if you have one :p)00:47
djszapiyeah, I see.00:48
djszapi*giggles*00:48
djszapifine with me then, I do not just understand why that hackery exists at all :P00:48
Keybukbecause this is not a solved problem00:48
djszapihuh ?00:49
Keybukdoing anything (such as logging) during boot00:49
Keybukit's not a solved problem00:49
Keybukso hackery is required00:49
djszapiwell.....00:49
djszapidid you see the mail in 2002 about it on the kernel mailing list ? :)00:50
Keybuk"it"00:52
Keybukand my god, you expect me to remember an LKML mail from 9 years ago?!00:52
Keybukhave you SEEN the traffic on that list?! :p00:52
djszapiwell you should ;)00:52
djszapihehe :P00:52
Keybukno, I really shouldn't00:52
Keybuk:p00:52
djszapimuhah00:52
djszapiwell it was interesting thread in fact.00:53
djszapitargetting the issue we are talking about :)00:53
djszapibut anyway...3 am, ty again ninis :)00:53
seventoesis su the only way to run jobs as unprivileged users right now?04:54
seventoesHow do i figure out which rule caused this message?05:20
seventoesstart: Rejected send message, 1 matched rules; type="method_call"05:20

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