/srv/irclogs.ubuntu.com/2006/11/23/#upstart.txt

=== cortana [n=sam@62-31-146-25.cable.ubr12.azte.blueyonder.co.uk] has joined #upstart
=== j_ack [n=rudi@p508D8D3D.dip0.t-ipconnect.de] has joined #upstart
=== wasabi__ [n=wasabi@cpe-76-184-95-8.tx.res.rr.com] has joined #upstart
=== yankees26 [n=james@ool-182c6007.dyn.optonline.net] has joined #upstart
=== wasabi_ [n=wasabi@ubuntu/member/wasabi] has joined #upstart
=== wasabi__ [n=wasabi@cpe-76-184-95-8.tx.res.rr.com] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== Keybuk [n=scott@quest.netsplit.com] has joined #upstart
=== fatal_ [i=gem@gamezone.fatal.se] has left #upstart []
AlexExtremewoah11:15
AlexExtremelaunchpad's design totally doesn't work in internet explorer ;)11:16
Keybukwhich lp design?11:17
AlexExtremei mean11:18
AlexExtremethe page layout11:18
AlexExtremethe CSS11:18
AlexExtremeon launchpad.net11:19
Keybukreally?  intersting11:20
KeybukI would have thought they tested that11:20
Keybukwhat's broken about it?11:20
AlexExtremeumm11:21
AlexExtremein the menu at the top left11:21
AlexExtremewhen you move your mouse over it, it drops down, but there's spaces between all the menu items11:21
AlexExtremealso some things appear misaligned11:22
Keybukheh11:22
AlexExtremeshould i file a launchpad bug report?11:22
Keybukthere's a new UI coming soon anyway11:22
AlexExtremeoh ok11:22
AlexExtrememaybe file an IE bug instead ;)11:22
AlexExtremebbl11:23
=== CTCP BWAHAHA reply from Keybuk:
=== lastnode [n=lastnode@unaffiliated/mahangu] has joined #upstart
AlexExtremeKeybuk: one comment about the graph on the ReplacementInitscripts wiki page - shouldn't the line from "logging daemon" come from started rather than stopped?02:10
AlexExtremebbl again02:12
=== sadleder [n=sadleder@p50813004.dip0.t-ipconnect.de] has joined #upstart
=== Artanicus [i=kuitunej@lehtori.cc.tut.fi] has left #upstart []
=== wasabi__ [n=wasabi@cpe-76-184-95-8.tx.res.rr.com] has joined #upstart
=== mbiebl [n=michael@e180080017.adsl.alicedsl.de] has joined #upstart
=== sadleder [n=sadleder@p50813004.dip0.t-ipconnect.de] has left #upstart []
=== jonduf [n=jon@c-69-180-29-178.hsd1.ga.comcast.net] has joined #upstart
=== ivoks [n=ivoks@ubuntu/member/ivoks] has joined #upstart
=== j_ack [n=rudi@p508D91CE.dip0.t-ipconnect.de] has joined #upstart
=== yankees26 [n=yankees2@ool-182c6007.dyn.optonline.net] has joined #upstart
mbieblAlexExtreme: what about syslog-ng, did you investigate it any further if it could replace logd?05:54
AlexExtremenah, i haven't had the chance - school work's been getting in the way and of course it's more important05:55
mbieblnp05:55
mbieblWhen you mentioned it, I gave it a quick try and defined a new source like unix-stream("/com/ubuntu/upstart/logd");05:56
mbieblBut that didn't work out.05:56
mbieblsyslog-ng seems to expect a real file there.05:57
AlexExtremeok05:57
AlexExtremei'll take a look later once i've done homework05:57
Keybukmbiebl: you forget the \0 on the front06:00
Keybukthe socket is in the abstract namespace, so it's \0/com/ubuntu/upstart/logd06:00
AlexExtremembiebl: could you test that then? I mean if it works then great, we have a logd replacement ;)06:04
=== yankees26 [n=yankees2@ool-182c6007.dyn.optonline.net] has joined #upstart
yankees26sorry (accidental cmd+q)06:07
Keybukyou'd need to cope with the additional bit of logd protocol06:08
KeybukSOCKET PROTOCOL06:08
Keybuk       logd listens on a unix(7) stream  socket  in  the  abstract  namespace,06:08
Keybuk       bound to /com/ubuntu/upstart/logd.06:08
Keybuk       init(8) opens a new connection for each job that is to be logged, bind06:08
Keybuk       ing the socket to the standard input, output and error file descriptors06:08
Keybuk       for the job.06:08
Keybuk       Before  running the job, it sends the job name on the socket so that it06:08
Keybuk       can be logged along with the messages.  This is sent as a  size_t  that06:08
Keybuk       contains  the length of the name to read, followed by that many charac06:08
Keybuk       ter bytes.  The NULL terminator is not sent as part of the protocol, it06:09
Keybuk       is up to the receiver to add that if required.06:09
Keybuk       Further  information  about  the  job,  such as its description, can be06:09
Keybuk       obtained by opening an ordinary connection to the  init(8)  daemon  and06:09
Keybuk       querying it using the name received.06:09
Keybuk--06:09
Keybuk(yes, it has a man page, don't look shocked <g>)06:09
AlexExtremesaying "have a look at man <whatever>" would have been simpler ;)06:09
yankees26hehe06:09
Keybukit's only in 0.3.0, which isn't packaged yet06:10
AlexExtremegood point06:10
AlexExtremebtw did you see my comment about the graph on the ReplacementInitscripts wiki page?06:10
KeybukI did06:11
Keybukyou're right06:11
Keybukthere's lots of bugs in that actually06:11
Keybukit was just a brain dump to at least write something :)06:11
AlexExtremelike that empty oval in the middle of nowhere :)06:11
Keybukthat's deliberate06:12
Keybukit meant something06:12
Keybukunfortunately I did the graph before upstart got the ability (in my mind) to track states06:12
AlexExtremeah06:12
=== yankees26 [n=yankees2@ool-182c6007.dyn.optonline.net] has joined #upstart
AlexExtremeok06:12
Keybukso I have no idea how I'd redraw it now, dotty isn't good at those06:12
yankees26sorry once again06:12
AlexExtremelast question: there are a lot of things pointing to "multiuser". that's an event, right? if so, how do you have events generated once several things have been done?06:15
mbieblKeybuk: I tried with @, \0 and nothing on the front.06:16
mbieblThe error is always: Error binding socket; addr='AF_UNIX(0/com/ubuntu/upstart/logd)', error='No such file or directory (2)'06:16
Keybukprobably needs doing inside the code then06:16
Keybukabstract namespace unix sockets are a bit ... interesting :p06:16
Keybukplus Linux specific afaik06:16
KeybukAlexExtreme: it was in that draft (which is old)06:17
AlexExtremeAF_UNIX(0/com/ubuntu/upstart/logd) << that looks wrong, it seems to ignore the \06:17
Keybukin reality, it'll just be a flag and we'll make all the jobs parallel again06:17
AlexExtremeok, cool06:17
Keybukbut I've not even written the spec for flags yet06:17
Keybukor, in fact, states06:17
KeybukI AM TEH SUCK06:17
AlexExtremelol06:17
Keybukhttp://upstart.ubuntu.com/wiki/EventStructure06:18
Keybukhttp://upstart.ubuntu.com/wiki/GoalChangeEvent06:18
Keybuk^ so far06:18
AlexExtrememakes sense06:21
KeybukI will try and write more tomorrow06:21
Keybukthis week has not been good for me :-/  too much jet lag and conf exhaustion06:21
wasabi__#06:22
wasabi__#06:22
wasabi__The arguments are not appended to binaries the job executes directly, scripts must be used for that.06:22
KeybukI really need to get the stuff wasabi_ and I discussed over very hot thai down06:22
wasabi__^ Except for special "exec $1" syntax?06:22
Keybukwasabi_: sssh :)  we decided not to tell anyone about that trick <g>06:22
wasabi__that thai was fucking hot. holy shit.06:22
thomheh. yeah06:22
AlexExtremelol06:23
AlexExtremebtw, what could be done about having the ability to enable/disable services? i mean, currently, if a file is in event.d, it will be used06:27
yankees26you could have a simple conf file somewhere (or something like that)06:28
yankees26kinda like a blacklist file06:28
AlexExtremembiebl: try putting \\0 at the start to see if that makes syslog-ng actually realise that the \ is there06:28
wasabi__We did some talking about white/blacklist files, for profile stuff. Probably need to talk about that more.06:28
wasabi__ya know, single-user mode, etc.06:29
AlexExtremeyeah06:29
mbieblAlexExtreme: doesn't help :-/06:29
AlexExtremestill exactly the same error?06:29
mbieblyep06:29
AlexExtremethen i'll write in something hardcoded to be able to specify an upstart source06:30
AlexExtremegimme a few mins06:30
yankees26or in the actual file in event.d you have something like disable on startup06:32
mbieblyankees26: this wouldn't be good from a package maintainer pov.06:33
AlexExtremeyeah06:33
mbieblHaving to mangle files is fragile06:33
AlexExtremebasically, modifying the event file is not an option06:33
KeybukAlexExtreme: you probably want that anyway, to get the job name06:33
wasabi__It is an option.06:33
wasabi__Three way merge. Etc.06:33
wasabi__dish time!06:34
AlexExtremebecause if the package providing the job file is upgraded, it would be overwritten06:34
yankees26mbiebl: true06:34
KeybukAlexExtreme: three way merge06:34
AlexExtremehmm well, the problem there: frugalware for example doesn't have any sort of capability for merging files06:34
Keybukucs, etc.06:34
AlexExtremeor am i talking BS? :)06:34
Keybukthe thought was to ship a standard upstart tool that would merge config files06:35
wasabi__I suspect if we go down the "profile" path, we'll have to do this too.06:36
wasabi__And it'll take care of it.06:36
AlexExtremeso, in a package's upgrade scriptlet you could run an upstart-provided tool that would merge them?06:36
Keybukright06:36
Keybukpackages could install to /usr/share/upstart/... or something, and just run "update-event.d"06:36
wasabi__[default] \n*=on\ndisableme=off06:36
AlexExtremek, sound's good06:36
wasabi__[single-user] *=off\nsvc1=on06:36
mbieblSo, update-event.d would create a link to /etc/event.d/?06:37
wasabi__That being a fairly easy file to update, compared to job files.06:37
Keybukmbiebl: maybe.  or copy it06:38
KeybukI have a mild allergy to symlinks06:38
AlexExtremewhy's that?06:38
KeybukI try and edit them06:39
Keybukand end up editing non-config-files06:39
Keybukor you end up with the hideous apache style configuration, where the editable config file is in one directory, symlinked to another right alongside06:39
Keybukor worse, the Debian udev style, where the config files are just one level up06:39
mbieblMaybe doesn't look nice, but it has it's pros06:41
Keybuksuch as?06:41
mbieblE.g. if you want to disable a udev rule, you can remove the symlink06:41
mbieblI guess in Ubuntu you have to move the *.rules files somewhere else.06:42
Keybukrm /etc/udev/rules.d/...06:42
Keybuksame command ;)06:42
mbieblAnd if you want it back?06:42
Keybukget it out of the package again06:43
mbieblNot that easy.06:43
Keybukwhy not?06:43
mbieblapt-get install --reinstall will not get the file back.06:44
mbieblYou'd have to download the deb and extract the file06:44
Keybukdpkg --force-confmiss --install ...06:44
yankees26what about a custom .rules?06:45
Keybukyou could also just edit the file and comment bits out06:45
AlexExtremebleh, i can't think right now. i'll look at syslog-ng some other time06:46
yankees26turkey clogging your brain?06:47
mbieblKeybuk: Imho both approaches have pros and cons, it's basically a matter of taste ;-)06:47
Keybukindeed06:47
mbieblAnd we know that it is hard to argue about that ;-)06:47
Keybukmy favourite phrase during UDS was "it's my bikeshed!"06:47
AlexExtremembiebl: want to try metalog? that can handle sockets AFAIK06:48
AlexExtremehttp://metalog.sourceforge.net06:48
thomKeybuk: GREEN!06:48
AlexExtremethe only problem with it is that it seems to be unmaintained - the last change was 22 months ago06:49
Keybukthe truth is that I haven't put more than minimal thought into the config file problem yet06:49
Keybukwe briefly discussed it at UDS06:49
yankees26ugh, you guys are making me wanna look through upstart code (and in other words, hurt my brain)06:49
Keybukthe upstart code is nice06:50
mbieblAlexExtreme: never tried metalog06:50
yankees26it'd still hurt my brain Keybuk :P06:50
AlexExtremeyankees26: it's better than this syslog-ng code *shudder*06:50
yankees26i start doing header file searches for functions and thats when it gets painful :P06:50
yankees26AlexExtreme: never looked at syslog-ng code06:51
yankees26(nor do i plan to :P)06:51
AlexExtremethe indentation in it is absolutely disgusting, it's completely unreadable06:51
yankees26i care a lot about indentatio06:51
yankees26n06:51
Keybukindentation is easy, one TAB per indent ;)06:51
yankees26i spent like 5 minutes reindenting one of my nirvana perl modules06:51
AlexExtremeKeybuk: exactly how i like it :)06:52
yankees26i have it set for 4 spaces but it acts like a normal tab (set softtabstop=4 ftw)06:53
mbieblAnd spaces for alignment ;-)06:54
yankees26alignment of what (i've never really fiddled with .vimrc)06:54
Keybukspaces for alignment is ... irritatingly hard to get right in an editor06:54
=== Keybuk usually doesn't bother
yankees26TO GOOGLE FOR ALIGNMENT! ('cause im dumb and confused ;P)06:55
mbieblyankees26: e.g. function arguments, that span over multiple lines.06:55
mbieblThey should be indented by spaces06:56
Keybukyeah, ideally you'd have06:56
yankees26ah like: int my_extremely_painful_function( int a, string  adfadsfasdfasdf,06:56
Keybuk^I^Isome_function (arg1,06:57
Keybuk^I^I               arg2);06:57
Keybukwhereas most editors (including emacs) will do:06:57
yankees26ah06:57
Keybuk^I^Isome_function (arg1,06:57
Keybuk^I^I^I     arg2);06:57
yankees26ya06:57
yankees26(my example was too long :P thanks for typing that ;P)06:57
Keybukit's almost certainly possible to get emacs to do that with some lithp06:58
Keybukbut my lithp-fu is not strong06:58
yankees26im gonna find out how in vim07:00
yankees26(hopefully)07:00
AlexExtremehmm. "At the time we started, it was common for a Linux distribution to boot in a mere two or three minutes." Frugalware starts in 40 seconds! </boasting-session>07:01
AlexExtremesorry, i had to say that ;)07:01
yankees26arch takes me 26 :P07:01
yankees26;)07:01
yankees26seconds that is :P07:01
AlexExtremearch?!07:01
=== AlexExtreme doesn't like arch ;)
yankees26dont act like you dont know where pacman came from :P07:02
Keybukedgy is around 35s07:02
mbieblDepends on what services you start and how much sanity checking they do.07:02
=== AlexExtreme drags out some old bootcharts
AlexExtremehttp://frugalware.org/~alex/bootchart-sysvinit.png - i was wrong, it's 30 seconds ;)07:03
mbieblTried initng some time ago and was able to reduce my boot time to 18 sec.07:03
yankees26i still win ;)07:03
yankees26ok i lose now07:03
mbieblStill it took quite some time until gdm was up.07:03
AlexExtremeyeah, the reason for that is that because things start in parallel there's more disk access and cpu usage going on which makes it a little slower07:04
mbieblBut to be honest, bootup time is not so important for me.07:04
AlexExtremei found that with Runit, i had the services starting in parallel yet gdm still took the same amount of time to start07:04
mbieblService supervision is much more important e.g.07:04
yankees26off the top of my head i start: syslog-ng, network, hal, dbus, portmap, fam, alsa, mpd, crond, and then gdm goes07:04
yankees26i should try that bootchard thing07:05
AlexExtremembiebl: yes, but faster boot time is always nicer ;)07:05
KeybukAlexExtreme: on a processor like that, it should be faster than 30 :p07:05
mbieblAlexExtreme: but suspend to disk is getting more and more reliable07:06
yankees26this is why i wanna try upstart when i do lfs07:06
KeybukAlexExtreme: you've got a few dead spots07:06
AlexExtremeyeah i know07:06
mbieblYou can't beat s2disk ;-)07:06
AlexExtremeheh07:06
wasabi__When I think of "profiles" I think of :07:06
wasabi__http://upstart.ubuntu.com/wiki/Profiles07:06
AlexExtremeKeybuk: well, this machine is limited in speed because of the hard disk, really. it's about 3 years old. i need to upgrade to SATA II sometime07:07
AlexExtremeah well07:08
AlexExtremehttp://frugalware.org/~alex/bootchart-runit.png << runit got 2 seconds improvement07:08
AlexExtremeanyway, i've gotta go07:08
AlexExtremedinner's ready :)07:08
AlexExtremebtw wasabi__, looks good. quite easy to understand for the average user in my opinion07:09
yankees26'cause im unaware of most upstart syntax07:10
yankees26what are the *=y do?07:10
mbieblI guess it means, all available jobs are "activated"07:11
yankees26ok07:11
wasabi__the "current profile" is something that is simply set once, and the bits on the job that track whether they are enabled or disabled are just set when switched to it.07:13
wasabi__so you can pass "default" on the kernel command line, and it just applies those rules to enabled/disable jobs07:13
mbieblwasabi_: What about creating directories in /etc/even.t/profiles/(default|single|foo)07:14
wasabi__And the file is distributed basically exactly as shown. Two levels.07:14
mbiebland linking the to be activated jobs in there.07:14
wasabi__no linking. =(07:15
mbieblWhy not?07:15
mbieblWould be more fool-prof07:16
mbieblIf the one profiles get's corrupted: bad07:18
mbieblIf the editor makes a syntax error: bad07:18
mbieblBesides, it's harder to manage from withing package maintainer scripts.07:19
wasabi__i'd hope no package maintainer script would ever touch it07:19
wasabi__I'm a bit tired of symlink farms.07:20
wasabi__Also they can't represent *07:20
mbieblThat's surely is true07:21
wasabi__We also had an idea of "flags"... some arbitrary strings you could pass to init on boot... to disable things. I'm not sure where we went with that. It was between bofs.07:21
wasabi__Keybuk: ?07:22
Keybuk"corridor bof"07:22
KeybukI quite liked the flags idea07:22
wasabi__i seem to have forgotten it07:23
Keybukjust a bunch of "on" or "off" values, jobs could elect to only run if a flag was on or off07:23
Keybukso you could have "if networking" in a network-device-added task07:24
wasabi__ahh.07:24
Keybukif you turn the networking flag off, that doesn't happen07:24
wasabi__So, on a kernel line, you could have networking=off, and they wouldn't run.   But what would turn networking on in the common case?07:25
wasabi__or would you call the flag no-networking07:25
Keybuksomething like that07:25
wasabi__"if not no-networking"07:25
Keybukit got fused in my head with the jobs-can-be-states idea, and I need to write that down first07:25
KeybukI did at least write all my notes down this time07:26
KeybukI just have pages of them07:26
mbieblwasabi_:  Should we add the idea with the profile directories + symlinks as alternative proposal to the wiki?07:30
Keybuksure, it's a wiki, fill it :)07:30
mbieblIIRC it's basically what gentoo uses today.07:30
Keybukyou need to register to be able to edit pages, as usual07:31
mbieblAnother one is borrowed from initng.07:31
yankees26ugh, bootchart's dependency of java annoys me :(07:31
AlexExtremeyankees26: well07:31
AlexExtremethe actual script doesn't need java07:31
mbieblThere, a single file represents a profile.07:31
yankees26i run a java free system07:31
yankees26and yes, that is how much i hate java07:31
Keybukright, off for dinner, l8r07:31
mbieblAnd you can include files07:31
yankees26have fun eating Keybuk07:31
AlexExtremejust download it and run the log it creates through the chart creatorr on bootchart's site07:31
AlexExtremeKeybuk: have fun07:31
yankees26AlexExtreme: so java is what takes the log and creates the chart07:32
yankees26so really i dont need java, hmmm....07:32
AlexExtremeyeah07:32
AlexExtremejust download the script from bootchart's site, stick it in /sbin, run the log through the generator on their site07:33
yankees26will do07:33
mbieblAlexExtreme: I thought java was only needed to generate the graph from the log file.07:33
yankees26hence i can do it from the website07:33
yankees26not java :D07:33
yankees26and keep my java free system07:33
AlexExtremembiebl: i know, that's what i'm saying07:33
mbieblAlexExtreme: I'm a bit slow atm ;-)07:34
AlexExtremeheh07:34
AlexExtremewoah07:34
AlexExtremei just found a gawping security hole in cherokee (it's a webserver)07:34
mbieblbbl07:35
AlexExtremeit's htpasswd validation is totally broken - i put in a username that isn't listed in the passwd file and no password, it let me in07:35
AlexExtremecya mbiebl07:35
yankees26bye mbiebl07:35
yankees26AlexExtreme: do i only need a certain script from the src tarball?07:36
yankees26thats prebuilt?07:37
AlexExtremewait, let me find it07:37
yankees26ok, thanks07:38
AlexExtremeget the source tarball07:39
AlexExtremecopy the bootchartd script from the script dir to /sbin and chmod 755 it07:39
yankees26ok07:39
AlexExtremeand copy the bootchartd.conf file from the script dir to /etc and chmod 644 it07:40
yankees26ok07:40
yankees26then at boot i set init to init=/sbin/bootchartd, right?07:42
AlexExtremeyep07:42
yankees26where is the log file afterwards?07:42
AlexExtreme/var/log07:44
yankees26bootchart.tgz?07:44
AlexExtremeyep07:44
yankees2624 seconds :D07:45
yankees26http://fhatsoft.googlepages.com/bootchart.png07:47
yankees26have fun admiring :P07:47
AlexExtremeheh07:48
AlexExtremebrb07:48
yankees26ok07:49
AlexExtremeback07:51
yankees26welcome back07:52
yankees26one more seinfeld disc left before i've finished season 7 ;D07:52
yankees26brb: i'm gonna get some lunch07:56
yankees26brb08:13
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== Md_ [i=md@freenode/staff/md] has joined #upstart
=== Md_ is now known as Md
=== yankees26 [n=james@ool-182c6007.dyn.optonline.net] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== theCore [n=alex@modemcable128.255-131-66.mc.videotron.ca] has joined #upstart
=== mbiebl [n=michael@e180080017.adsl.alicedsl.de] has joined #upstart
=== yankees26 [n=yankees2@ool-182c6007.dyn.optonline.net] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart

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