/srv/irclogs.ubuntu.com/2007/02/13/#upstart.txt

mbieblMy idea would be to distinguish between to different events: one being the root filesystem is availabe (basically everything besides /usr)12:32
mbiebland the second being that the complete filesystem is mounted.12:32
mbieblA small helper programm should figure out from parsing /etc/fstab which mount points have to be mounted for the first event12:33
mbiebland then runs initctl emit root-fs-mounted12:33
AStormmbiebl, exactly12:33
mbiebland when all filesystems are mounted emit the second event.12:34
AStormYes, that's the plan and that's what I do.12:34
AStormI mount the systems in parallel too12:34
AStorm(some time savings?)12:34
mbieblYou'd have to benchmark that, if it is really worth it.12:35
AStormThat's why just after fsck is done iff the fs is not a subpartition, it is mounted12:35
AStormthe fsck is bound to the mount12:35
AStormand the exact sequence is precalculated externally by a bash script12:36
AStorm(could embed it and launch on runtime, possibly)12:36
AStorm(but it probably requires something from /usr)12:36
_iondeps() { grep -v '^[[:space:] ] *#' /etc/fstab | while read fs mp rest; do case "$MOUNTPOINT" in "${mp%/}"/*) echo "$mp"; esac; done }; MOUNTPOINT=/usr/share deps12:37
_ionThis should work, i think.12:37
_ion(for all other mountpoints than / itself)12:39
mbiebl_ion: I'd reverse it: everything besides /usr12:40
mbiebl(Maybe /opt should be excluded too)12:41
_ionHmm. That function is supposed to give an answer to "i'm supposed to mount $MOUNTPOINT now; what mountpoints do i need to wait for first?"12:41
mbieblHm, but you couldn't use that expression in a "start on bla" stanza12:43
mbieblImo jobs should depend on either the root-fs being mount or everything (which includes network mounts) being mounted.12:44
_ionThis is what i was thinking:12:44
_ion/etc/event.d/fsck:12:45
AStormGood, but actually I don't have to ask that12:45
AStormI know the sequence beforehand.12:45
AStormAnd yes, they do that (at least here)12:45
_ionstart on block-device-added blahblah12:45
_ionscript12:45
AStormThey dep upon started mount-filesystems12:45
_ion    # do the magic12:45
AStormThat's one script, yes.12:45
AStormBut then, you don't want to mount it yet12:45
_ion    if that was successful: 12:46
AStormYou don't know what the user wants :>12:46
_ion        initctl emit filesystem-checked "$MOUNTPOINT"12:46
_ionend script12:46
_ion/etc/event.d/mount:12:46
AStormautomounting has to have another table anyway12:46
_ionstart on filesystem-checked12:46
_ionscript12:46
_ion    deps() { ... }12:46
_ion    waitfor="$(deps)"12:46
_ion    # wait for stuff if they're not already mounted12:47
_ion    mount blahblah "$MOUNTPOINT" blahblah12:47
_ion    On success, emit filesystem-mounted -eMOUNTPOINT12:47
_ionend script12:47
AStorm:>12:47
AStormI actually do something like that, but in a script when setting the sequence.12:48
AStormIt fscks them in this order too12:48
_ionI don't think there should be a predefined order or sequence.12:48
_ionThings should be done based on events, starting from when the devices appear.12:49
AStormThe sequence is limited to a single disc.12:50
AStorm(so as to not thrash and seek excessively)12:50
AStormLet me see...12:50
AStormOk, doable, just a slight mod. I'll publish the scripts a bit later.12:50
AStormthe thing is I launch "do-fsck thatdisc"12:51
AStormActually, do-mount thatdisc12:51
AStormand this thing orders the mounts properly12:52
_ionTo avoid thrashing, you should have something like:12:52
_ion/etc/event.d/fsck:12:52
_ion...12:52
_ionscript12:52
_ion    physdev=$(get the physical device name from somewhere)12:52
AStormfsck is just before mounting, so no problem12:52
AStormBut then, the mount point ordering.. hmm12:52
_ion    watershed -i "fsck-$physdev" fsck "$DEVNAME"12:52
AStormI'd have to separate fsck from mounting. Will do that12:53
_ion    On success, initctl emit filesystem-checked -eMOUNTPOINT12:53
_ionend script12:53
AStormSo, I'll have to wait on all fsck's to finish12:53
_ionAnd that's all you need to do, still no need to define a sequence.12:53
AStormwhich kind of destroys the event baseness12:53
AStormI don't have no watershed :P12:54
AStorms/don't//12:54
AStormbut I have my own script checking the devices.12:54
AStormOk, BBL12:55
_ionwait12:55
_ionThe watershed source is in the diff.gz at https://launchpad.net/ubuntu/+source/udev/103-0ubuntu1212:56
AStormI don't need it12:56
AStormthere's sysfs, uh12:56
AStormand udevinfo12:57
_ionAre you going to implement your own locking for the fscks to avoid thrashing?12:57
AStormNo, I'll use event dependencies for it.12:57
AStorm:>12:57
_ionSo you're going to have multiple fsck jobs, multiple mount jobs etc?12:58
AStormExactly. Multiple instances of fsck job.12:58
_ionI mean multiple fsck files in /etc/event.d12:58
AStormNo.12:59
AStormParameters work ok :P12:59
_ionI'm not sure i understand how you're going to implement the thrashing-avoiding functionality then.01:00
AStormsimple01:00
AStormlaunch "fsck-disc thedisc"01:00
AStorm(on block-device-added probably, or maybe by hand by another script)01:00
AStormthis will detect (or load from a file) what partitions are on that drive01:01
_ionAnd that script implements the locking, no?01:01
AStormWhat locking? You don't need it, you scan the partitions in random order :>01:01
_ionWell, let's say i run:01:01
AStormbecause, as you can see, no multiple partitions from the same drive can happen01:01
AStorm(even counting dm or raid, because I'm a bit smarter when checking for "same device")01:02
_ionAh, i was indeed thinking that the fsck job would be triggered for each partition, but if it's only triggered for each physical device, it should work. True.01:03
AStormI wonder how to do that vgscan/mdscan thing with udev events01:04
AStormand esp. vgchange01:04
AStormThese things will probably generate their own events, or none at all.01:05
AStormWell, could do them in another step altogether, that will waste a bit of time maybe...01:05
AStormEhh, if I could just listen for some "stopped" events...01:06
AStormand I do mean listen. Not run something on them.01:06
AStorme.g. the physical group is on devices x, y and z01:07
AStormwe want to wait until fscking on these devices ends and launch our own01:07
AStormand another is on devices a and b01:08
AStormwait on these too before fscking, but independent from x, y or z01:08
_ionPersonally i'd make something emit an event for each *partition* (also LVM partitions etc.) and make the fsck job start on that, figure out the physical device and implement locking based on that.01:14
AStormHack, hack I say!01:16
AStorm:>01:16
AStormThe locking should be based on an event happening01:16
AStorm(e.g. stopped fsck-disc somedrive)01:16
AStormBut you can't just wait on an event in a script01:17
AStorminitctl should be extended to support that01:18
AStorme.g. initctl wait stopped xyzzy01:18
_ionI fail to see where the hack is.01:20
AStormI'd have to sleep on a file or something01:20
AStormor still sleep waiting for an event01:20
_ionIn order to do what?01:21
AStormHow would the other partition jobs know that I'm not scanning the device?01:21
AStormTell them on pipe? :P01:21
AStormalso, race condition galore01:21
_ionOne instance: watershed -i fsck-physdev-sda fsck /dev/sda101:22
_ionAnother instance: watershed -i fsck-physdev-sda fsck /dev/volumegroup/foo01:22
AStormYes, and?01:22
AStormand /dev/vg/x is on sda101:22
AStorm:>01:22
_ionThird instance: watershed -i fsck-physdev-sdb fsck /dev/sdb101:22
_ionThe first thing and the third thing are run simultaneously and the second one will block until the first is done.01:22
AStormHow would the different watershed instances communicate?01:22
AStormOr are they smarter than that, somehow detecting that the device is in use?01:23
AStormor do they poll?01:23
_ionThey use /var/lib/watershed as a state directory, there are state files based on the ID (fsck-physdev-sda for example).01:24
AStormOr create a lock? (race condition possible...)01:24
_ionI haven't looked at the implementation.01:24
AStormAha, locks.01:24
AStormthe process returns when it created the lock, right?01:24
_ionI don't see how there could be a race condition.01:24
_ionThat's the point of locks: to avoid race conditions. :-)01:24
AStormI'd have to wait on it to create the lock, can't run x of them in parallel01:24
AStormYes, but two things at the same time can try to create the lock :>01:25
AStormBoth will fail, or just the one?01:25
AStorm(that's fcntl for ya)01:25
_ionOne will succeed, one will block01:25
_ionThe point of watershed is that you run x of them in parallel and they handle the locking under the surface.01:25
AStormGood. Unless the kernel is broken, you say?01:26
AStormI can do such locking myself too :P01:26
AStormman flock01:26
_ionWell, the kernel could be broken and poop turnips, but that's a kernel bug and not something one should work around in a totally unrelated program.01:26
AStormor course, this requires write access to some dir01:26
_ionNaturally you could implement locking yourself, i just mentioned an already available tool.01:27
AStormpreferably not /var, as that could get mounted before we remove the lock01:27
AStormsome special state directory would be best01:31
_ionwatershed allows you to change the default with a command line parameter.01:32
_ionFor non-root users, it's ~/.watershed01:33
AStormYes yes, that's nice, but the default should be good too.01:33
AStormI mean the root's default.01:33
AStormBut then, why watershed when I can go with flock? :>01:33
_ion/var/run/watershed is exactly the right default. :-) If it needs to be used before /var is mounted, it's a pretty special use case.01:33
AStorm(and a bit of sysfs scanning)01:34
_ionWhoops, /var/lib/watershed01:34
_ionArgh, brainfart. It's /var/run/watershed of course.01:35
AStormThe most convenient way would be to place a symlink on / device01:35
AStormHmm. flock on a file will it be, then01:42
AStormThough I'd prefer waiting on an event.01:42
AStorm(e.g. initctl wait)01:42
_ionAfter actually looking at watershed's source (as it has no man pages ;-) ), that's not its purpose after all.01:52
_ionThen there's dotlockfile(1)01:54
=== j_ack_ [n=rudi@p508D8281.dip0.t-ipconnect.de] has joined #upstart
=== cables [n=cables@65-78-17-184.c3-0.nwt-ubr2.sbo-nwt.ma.cable.rcn.com] has joined #upstart
=== Bourne [n=djzn@201.46.50.142] has joined #upstart
Bournehi... how do I turn off scripts using upstart, just like the way Sysvinit command used to do?02:48
_ionWhat do you mean by that?02:49
_ion'initctl stop jobname' stops an upstart job02:49
_ion('stop jobname' works as well)(02:49
Bourneyou know02:49
Bournein ubuntu breezy02:49
Bourneyou wanted to disable the scripts02:49
Bournejust issued sysvinit02:49
cablesBreezy uses init, not Upstart02:49
cablesEdgy uses upstart02:49
_ioncables: Yes and no.02:50
Bourneand a in that window of sysinit, you just disable that02:50
cables_ion, how's that?02:50
Bournehow to do it with upstart02:50
Bournecoz this is way slow02:50
Bournethis is like XP... loading 89 default services02:50
cablesBourne, http://en.wikipedia.org/wiki/Upstart02:51
_ionFeisty will be the first Ubuntu release that actually contains upstart jobs (other than basic tty ones). And even that hasn't been implemented yet. In any Ubuntu release you're currently using, pretty much everything is still started by sysvrc scripts.02:51
cablesBourne,  read it. It's backwards compatible with sysvinit, so it will run your init scripts.02:51
cablesBourne, _ion, I believe that Breezy actually just has the regular init, though...02:51
cablesBourne, sorry, misunderstood your previous message to mean that you use breezy currently.02:52
Bourneno02:52
Bournei used to02:52
Bournei just got back into the linux thing02:52
Bourneand noticed that a lot of the thigns aren't there anymore02:53
cablesBourne, Upstart is backwards compatible with sysvinit, you can configure it the same way...02:53
Bourneswitching to xubuntu desktop now02:53
BourneGNOME got way toooo slow02:53
Bourneeven on this fast computer02:53
=== cables [n=cables@65-78-17-184.c3-0.nwt-ubr2.sbo-nwt.ma.cable.rcn.com] has left #upstart ["Leaving"]
Bournecables: i can't find a command here.... 02:54
=== cables [n=cables@65-78-17-184.c3-0.nwt-ubr2.sbo-nwt.ma.cable.rcn.com] has joined #upstart
Bournecables: to call upstart and disable services... is there one?02:55
Bournecables: i can't find a command here.... 02:55
Bournecables: to call upstart and disable services... is there one?02:55
_ionYou don't have services started by upstart, other then the sysvrc scripts and some ttys.02:55
Bournehow do I disable services...02:56
Bournethat is all i want to know02:56
Bournejust a command...02:56
cables_ion, Isn't upstart just basically emulating sysvinit at this point?02:56
_ionbourne: You're using xubuntu, right? Applications  System  Services02:57
_ioncables: Yes.02:57
Bourneubuntu. yeah, i tried that already and disabled services.... 02:57
Bournebut I feel there's a whole bunch in the background02:57
cablesBourne, if it's still running slow, then that's clearly not the solution...02:57
Bournei mean... 02:57
Bournethe Teardown stuff in ubuntu page02:58
Bournetalks about 30 unusable scripts02:58
Bournetheir not listed in the Applications System Services02:58
Bournehttp://wiki.ubuntu.com/Teardown02:58
Bournewell03:01
BourneI can replace upstart then03:01
Bournethats the only choice left03:01
_ionWtf?03:01
Bourneas if I mark sysvinit to install, ubuntu takes out upstart in the software list03:01
Bourneit does... if you go there and select sysvinit, it marks, but it reds out upstart, saying it's going to be removed03:02
cablesBourne, you don't WANT to install sysvinit.03:02
_ionWhy the frell would you want to do that?03:02
Bournecables: what's the reason for that?03:02
Bournecoz just the thought of upstart be loading a PCMCIA or Server stuff annoys me03:03
cablesBourne, Upstart is just running sysvinit scripts now.03:03
cablesBourne, so you just need to change those with a tool like "sysv-rc-conf"03:03
Bourneoh yeah03:03
Bournetha command still works?03:04
cablesUpstart isn't actually being used as anything more than sysvinit in Edgy Eft03:04
cablesBourne, if you install it... "sudo aptitude install sysv-rc-conf"03:04
_ionProgrammers: http://johan.kiviniemi.name/blag/2007/02/13/structure-and-interpretation-of-computer-programs/04:05
=== int0x0c [n=ben@128.164.102.43] has joined #upstart
AStorm_ion, great, thanks!05:21
AStormSmell of LISP... double plus then for functional programming.05:24
=== Wimpog [n=Volodya@pool-141-154-153-110.wma.east.verizon.net] has joined #upstart
=== cables [n=cables@65-78-17-184.c3-0.nwt-ubr2.sbo-nwt.ma.cable.rcn.com] has joined #upstart
cablesWimpog, have you asked your question?05:27
Wimpogpreparing it now05:27
=== cables [n=cables@65-78-17-184.c3-0.nwt-ubr2.sbo-nwt.ma.cable.rcn.com] has left #upstart ["Leaving"]
WimpogGUYS, I need some help. I just installed Ubuntu server Edgy. AND THERE IS NOT /etc/inittab. GUYS from #ubuntu said it is by default like that.  I want to know if there is some kind of equivalent of inittab in Edgy and if yes, where is it and what is it called?05:27
_ion/etc/event.d05:28
Wimpog"/etc/event.d" is a directory05:28
_ionIndeed.05:28
WimpogI'm looking for some kind of equivalent of inittab05:29
_ionPlease elaborate on what you're trying to achieve.05:29
Wimpogsay I want to change the boot level05:30
=== ben_ [n=ben@161.253.17.231] has joined #upstart
Wimpognormally you just edit /etc/inittab05:30
_ionOk, the compatibility jobs in /etc/event.d currently do parse /etc/inittab to find out the default runlevel. Create /etc/inittab and add the line id:N:initdefault: where N is the default runlevel you want.05:33
AStormOr, modify the default job instead :-)05:35
AStormhmm... what about adding a pipe to upstart?05:36
_ionThat too, but then you'd need to change the number in four places, i think. :-)05:36
AStormI like those Plan9-ish programs that only require echo :>05:36
AStormBut then, initctl is adequate too.05:36
AStormThere could be some proc-alike filesystem for the jobs :P05:36
AStormMaybe I'll write something with FUSE. Later.05:37
=== Wimpog [n=Volodya@pool-141-154-153-110.wma.east.verizon.net] has left #upstart []
=== ben_ [n=ben@161.253.46.176] has joined #upstart
=== ben_ [n=ben@161.253.47.141] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== Keybuk [n=scott@quest.netsplit.com] has joined #upstart
_ionHi Keybuk03:22
Keybukheyhey03:22
_ionI moved the branch to my own server, since i keep having strange problems with launchpad.net (connections stalling until timeout), https://code.launchpad.net/~ion/+branch/libnih/watch-delayed03:22
_ionAlso: https://code.launchpad.net/~ion/+branch/upstart/watch-delayed03:23
Keybukoh, cool, launchpad lets you "move" branches now?03:23
_ionOh, i'm not saying the fault is with launchpad. I've had such problems with many overseas servers.03:24
_ionWell, i renamed the old one to watch-delayed-old and then created a new one that mirrors the branch at my server. :-)03:24
Keybukahh03:24
Keybukok03:24
_ionHas there already been work to switch things from sysvrc to upstart 0.3.5 jobs?03:32
_ionFor feisty, that is.03:32
Keybukyeah, need to start publishing that soon03:33
KeybukI'm not sure it'll actually make it for feisty as default now03:33
Keybukkeep finding nasty bugs03:33
_ionCool03:33
Keybukso I'm gonna just publish it and let everyone hack on it03:33
Keybukwhat do you think is the best way to publish?  bzr archive?03:33
_ionYeah, i'd like to test it, perhaps find bugs to fix. Yeah, bzr sounds good.03:33
_ionBtw, is upstart going to go to the initramfs for feisty?03:35
Keybukno03:35
=== mbiebl [n=michael@e180113107.adsl.alicedsl.de] has joined #upstart
mbieblKeybuk: I guess you already noticed and I tell you nothing new:03:39
mbieblThe sulogin job file in feisty doesn't parse03:39
Keybukoh?  I didn't notice that03:39
mbieblIt still uses start instead pre-start03:39
Keybukd'oh03:40
mbieblDo I need the complex-event-spec patch for the [^x]  syntax?03:42
Keybukno03:44
Keybukthat's just using plain upstart03:44
Keybukarguments to events are compared with fnmatch03:44
mbieblah, ok03:45
=== ben_ [n=ben@161.253.47.141] has joined #upstart
Keybukhttps://code.launchpad.net/~keybuk/+branch/upstart/replacement-initscripts04:04
_ion\o/04:05
Keybukit's nowhere near complete, yet04:05
=== j_ack [n=rudi@p508D9A3F.dip0.t-ipconnect.de] has joined #upstart
ben_Thanks Keybuk!04:09
Keybukbeen trying to think how to do the "mount and unmount block device" type things04:10
Keybukeither they need to be two jobs04:10
Keybukbut there's also a certain elegance to them just being one job04:10
=== j_ack [n=rudi@p508D9A3F.dip0.t-ipconnect.de] has joined #upstart
Keybukwas thinking about adding a kind of syntax:04:20
Keybuk  instance04:20
Keybuk  start on block-device-added sd*04:20
Keybuk  stop on block-device-removed $104:20
Keybukie. if the argument to "stop on" is $[0-9] * then it matches the equivalent argument in whatever event started it04:21
_ionThat would be nice.04:22
_ionWill the block-device-added event have 'sda' or 'sda1' as the parameter?04:23
Keybukdepends which got added :p04:23
Keybukit'd have sda for the block device, and then sda1 if there was a partition04:23
_ionAll right. Good.04:25
=== mbiebl [n=michael@e180113107.adsl.alicedsl.de] has joined #upstart
=== ben_ [n=ben@161.253.47.141] has joined #upstart
_ionI was thinking something like this, is this sane at all? 0) The fsck job starts on block-device-added and emits filesystem-checked MOUNTPOINT=/foo/bar or whatever. 1) The mount job starts on filesystem-checked, and calculates a list of mountpoints it needs mounted *before* $MOUNTPOINT can be mounted (e.g. /foo/bar needs /foo if such exists in fstab). Then it blocks until the dependencies are mounted, and finally mounts $MOUNTPOINT.04:30
_iondeps() { grep -v '^[[:space:] ] *#' /etc/fstab | while read fs mp rest; do case "$MOUNTPOINT" in "$mp"/*) echo "$mp"; esac; done }; MOUNTPOINT=/foo/bar deps04:30
Keybuknever grep fstab!04:32
Keybukuse getmntent()04:32
_ionThat was just a quick hack to demonstrate the concept. :-)04:32
KeybukI hadn't considered that; (that /usr has to be mounted before /usr/share)04:32
Keybukit can't really block, because that's racy04:33
Keybukwhat if /usr gets mounted between it checking for it, and it blocking?04:33
_ionPerhaps have something like:04:34
_ioninitctl wait filesystem-mounted /usr04:34
Keybukracy04:34
_ionTrue. :-\04:34
Keybukwhat happens if the filesystem is mounted while forking and execing initctl?04:34
Keybuka better way might be to have the "mount from fstab" job run whenever a block device is added *or* another path is mounted04:35
Keybukit'd check whether all necessary paths are mounted first04:36
Keybukif they're not, it'd exit04:36
_ionAh, that sounds good.04:36
Keybukif they are, it'd mount it -- and if it gets "already mounted", fail silently04:36
_ionHm, perhaps i should setup a virtual machine to play with replacement-initscripts in.04:38
Keybukof course, that precludes using any $1 trick, since that'd be the path that was mounted above it04:42
_ionIs there something like vmware-player, but free?04:49
Keybukqemu?04:54
mbiebl_ion: If you want a nice gui you can also use virtualbox05:00
mbieblhttp://www.virtualbox.org/05:00
mbieblThey even provide packages for Dapper/Edgy05:00
_ionThanks05:01
mbieblI use it myself. It's not as feature rich yet as vmware (it lacks the enterprise features)05:02
mbieblbut works great so far on my machine.05:03
=== Keybuk just uses vmware
mbieblDo you have a license?05:04
mbieblOr do you run vmware player05:05
Keybuklicence05:06
AlexExtremeooh, nice05:06
AlexExtremei'll try to play around with the new replacement scripts on frugalware today :)05:06
KeybukAlexExtreme: note that they're only about quarter done; mounting of disks onwards is still todo05:08
=== Keybuk has no particular problem with paying for useful software
AlexExtremeyes05:08
Keybukobviously I'd rather have the source, but for vmware we have access to the developers, so that's good too <g>05:09
=== AlexExtreme uses vmware
AlexExtreme... the trial version :P05:09
AlexExtremeI should probably switch from WS to Server sometime05:10
KeybukI just use WS05:15
AlexExtremeI gotta admit that this WS 6 Beta is nice05:15
Keybuknot seen 605:16
AlexExtremeI've got a feisty install to play around with :)05:16
=== ben_ [n=ben@161.253.46.176] has joined #upstart
AlexExtremehmm05:25
AlexExtremeKeybuk, i noticed you use mountpoint in the mount-kernel-filesystems job, isn't that a sysvinit util?05:26
Keybukyes05:26
AlexExtremehmm, shouldn't that be replaced somehow? or were you planning on doing that anyway?05:27
Keybukwhy replace it?05:28
Keybukthe replacement code would be identical, no?05:28
AlexExtremewell, i don't mean rewrite it, just add a util that does the same to upstart, as it would be nice to get rid of the sysvutils (or whatever it's called) package sometime05:29
Keybukwhy?05:31
Keybukthe tools in that package are perfectly fine they way they are, no?05:31
AlexExtremehmm05:31
AlexExtremethat's a point05:32
AlexExtremeforget i said anything05:32
=== Keybuk doesn't see a problem with upstart-compat-sysv depending on sysvutils
Keybuk:p05:32
AlexExtremenow05:32
Keybuk(mountpoint is in initscripts, so obviously that one will have to move somewhere)05:32
AlexExtremewait, damn05:32
AlexExtremethere goes my plans for working on upstart jobs05:33
Keybukhmm?05:33
AlexExtremedamn school work :)05:33
Keybukheh05:33
AlexExtremeoh well, bbl05:33
Keybukmine today is "damn management stuff"05:33
Keybuk:(05:33
Keybukhttp://codebrowse.launchpad.net/~keybuk/upstart/main/changes06:06
Keybuksweet06:06
=== ..[topic/#upstart:Keybuk] : Upstart 0.3.5 | http://upstart.ubuntu.com/ | http://upstart.ubuntu.com/wiki/ | http://upstart.ubuntu.com/doc/getting-started.html | http://codebrowse.launchpad.net/~keybuk/upstart/main/changes | irc logs: http://people.ubuntu.com/~fabbione/irclogs | http://upstart.ubuntu.com/wiki/UpstartOnGentoo
mbieblsweet, inded06:42
MdKeybuk: looks like the "description" and "files modified" sections should be merged06:47
Keybukheh06:49
Keybukonly because I'm dilligent at changelogs, mostly06:49
mbieblKeybuk: If I use the emit statement06:58
mbieblHow do I distinguish if I have two events or one event with a parameter06:59
mbieble.g. "emits foo bar"06:59
Keybukemits just takes event names07:01
Keybukit's just a documentation stanza, really07:02
Keybukso other things can output dot for the relationships, etc.07:02
Keybukalso thinking of using it for "jobs that get told who's waiting for events they emit" kind of thing07:02
mbieblAnd these events are triggered after entering the "started" state?07:03
Keybukno07:07
Keybukit's just documentation of what events that job is likely to emit on its own07:07
Keybuke.g.07:07
Keybuk/etc/event.d/udev:07:07
Keybuk  emits block-device-added block-device-removed07:07
Keybukjust says "udev might emit these events on its own"07:07
mbieblah, ok.07:08
Keybukso one assumes that there's a udev rules.d file that does RUN+="/sbin/initctl emit block-device-added" in that example07:08
Keybukit lets future UIs generate pretty graphs :p07:08
mbieblWhat about "on".07:10
mbieblI think it's ambiguous.07:10
mbieblWe have the "start on event" syntax, and simply the "on event"07:10
Keybukheh07:10
Keybukdepends whether you're using complex-event-config.patch or not :p07:10
mbieblReally? "start on" also works with 0.3.507:11
Keybukright07:12
Keybuk"start on" and "stop on" are definitely staying07:12
Keybukthey take the name and arguments of an event that causes the job to be immediately started or stopped07:12
Keybukmultiple copies of those act as a kind of "or"07:12
mbieblYeah, my point is, we should get rid of the "on event" syntax.07:12
Keybukwell07:12
Keybukso complex-event-config defines a new stanza that permits a much richer language to define the events07:13
KeybukFOO started apache and filesystem-mounted until filesystem-unmounted and network-up until network-down07:13
Keybukthe "FOO" is not really pinned down yet07:13
Keybukthe experimental patch/branch steals "on" for that07:14
Keybukwith the intent that we'd rename it later07:14
Keybukso on is already in the process of going away07:14
Keybukit does happen that "FOO event" is exactly equivalent to "stop on event"07:14
Keybukand that will always be the case07:14
Keybuksadly07:14
mbieblHm, I'll have to reread the complex-event-config spec again, I guess.07:15
mbieblIt's a bit the same with exec and respawn07:16
mbieblI'd prefer if respawn would simply be a flag07:17
Keybukthat's just syntactic sugar07:17
mbiebl(with an optional rate parameter)07:17
Keybukrespawn limit 507:17
Keybukrespawn interval 1007:17
Keybukuh07:18
Keybuksorry07:18
Keybukrespawn limit 5 1007:18
Keybuk<g>07:18
mbieblWell, the thing is, it makes it harder to generate nice GUIs.07:18
Keybukyeah07:18
Keybukrespawn CMD nearly got dropped over the weekend07:18
Keybukbut it got a last-minute temporary parole07:18
KeybukI'm edging closer to removing it though, since neither "service" or "daemon" accept commands07:19
Keybukand service ~= respawn07:19
=== AStorm [n=astralst@host-81-190-179-124.gorzow.mm.pl] has joined #upstart
=== juergbi [n=juerg@80-219-17-102.dclient.hispeed.ch] has joined #upstart
=== wasabi [n=jhaltom@ubuntu/member/wasabi] has joined #upstart
=== wasabi [n=jhaltom@ubuntu/member/wasabi] has joined #upstart
AStormCan't use dotlockfile08:08
AStormit's in mutt package, won't dep on it :P08:08
AStormflock it is.08:08
AStorm(and checking /proc/mounts after taking the lock, in case we've waited and somebody mounted a filesystem earlier as a dependency)08:09
=== wasabi [n=jhaltom@ubuntu/member/wasabi] has joined #upstart
AStormI'd still prefer listening on events.08:11
AStorm(the locking stuff is mighty complex)08:12
=== wasabi [n=jhaltom@ubuntu/member/wasabi] has joined #upstart
=== phsdv [n=paul@dyn-88-122-32-158.ppp.tiscali.fr] has joined #upstart
=== j_ack [n=rudi@p508D9A3F.dip0.t-ipconnect.de] has joined #upstart
=== Md [i=md@freenode/staff/md] 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!