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

=== j_ack [n=rudi@p508DA63E.dip0.t-ipconnect.de] has joined #upstart
=== j_ack [n=rudi@p508DA63E.dip0.t-ipconnect.de] has joined #upstart
=== j_ack [n=rudi@p508DA63E.dip0.t-ipconnect.de] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== pkt [n=pantelis@athedsl-131388.otenet.gr] has joined #upstart
=== AStorm [n=astralst@chello084010114027.chello.pl] has joined #upstart
=== cortana [n=sam@62-31-146-25.cable.ubr12.azte.blueyonder.co.uk] has joined #upstart
=== AlexExtreme [n=AlexExtr@frugalware/developer/AlexExtreme] has joined #upstart
=== wasabi__ [n=wasabi@cpe-76-184-96-5.tx.res.rr.com] has joined #upstart
=== wasabi [n=jhaltom@ubuntu/member/wasabi] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/Amaranth] has joined #upstart
=== shawarma [n=sh@atlas.linux2go.dk] has joined #upstart
=== Artanicus [i=kuitunej@lehtori.cc.tut.fi] has joined #upstart
=== _ion [i=johan@kiviniemi.name] has joined #upstart
=== jonibo [n=jonas@213.212.2.215] has joined #upstart
=== popey [n=alan@ubuntu/member/popey] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== pkt [n=pantelis@athedsl-131388.otenet.gr] has joined #upstart
=== AStorm [n=astralst@chello084010114027.chello.pl] has joined #upstart
=== cortana [n=sam@62-31-146-25.cable.ubr12.azte.blueyonder.co.uk] has joined #upstart
=== AlexExtreme [n=AlexExtr@frugalware/developer/AlexExtreme] has joined #upstart
=== wasabi__ [n=wasabi@cpe-76-184-96-5.tx.res.rr.com] has joined #upstart
=== wasabi [n=jhaltom@ubuntu/member/wasabi] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/Amaranth] has joined #upstart
=== shawarma [n=sh@atlas.linux2go.dk] has joined #upstart
=== Artanicus [i=kuitunej@lehtori.cc.tut.fi] has joined #upstart
=== _ion [i=johan@kiviniemi.name] has joined #upstart
=== jonibo [n=jonas@213.212.2.215] has joined #upstart
=== popey [n=alan@ubuntu/member/popey] has joined #upstart
=== reppel [n=reppel@213-140-11-128.fastres.net] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
reppelhi, is job-as-states implemented in 0.3.5 or I'm better using https://launchpad.net/~keybuk/+branch/upstart/complex-event-config ?11:49
AlexExtremejobs-as-states is implemented, yes11:51
reppelAlexExtreme: and the 'with' keyword? is it possible in 0.3.5 to use e.g. 'with networking-up' ?11:53
reppel(otherwise, how do i use a state?)11:53
AlexExtremenope, with is not implemented11:53
AlexExtremethat *will* be part of complex-event-config but it isn't implemented in the branch yet afaik11:54
reppelok, I was looking cfgfile.c and there is no mention of 'with' keyword..11:54
reppelthanks11:54
reppelAlexExtreme: so how do i specify in a job that it requires the state networking-up ? 'on started networking-up' ?11:55
AlexExtremehttp://upstart.ubuntu.com/wiki/JobsAsStates11:55
reppelthanks11:56
reppelis it possible to define a variable in a job description?12:02
AlexExtremeno idea12:02
AlexExtreme:)12:02
reppeli plan to write down some docs once i get this beast working :)12:03
reppel./configure: line 1655: syntax error near unexpected token `1.9'12:50
reppel./configure: line 1655: `AM_INIT_AUTOMAKE(1.9 gnu nostdinc check-news dist-bzip2)'12:50
reppeluhm\12:50
reppel(i'm using the complex-event-config branch)12:50
reppelany idea? i really don't understand the whole autohell stuff...12:51
reppeli've just run autoconf into the upstart directory12:51
reppeland it created a configure script12:51
reppelbut it gives this error12:51
AlexExtremeyou shouldn't run autoconf12:52
AlexExtremewait a sec12:52
AlexExtremeread this: https://lists.ubuntu.com/archives/upstart-devel/2007-February/000230.html12:53
reppelthanks again AlexExtreme 12:53
AlexExtremeonce you've done the nihify part of that, run this from the root of the complex-event-config branch:12:54
AlexExtremeautoreconf -i12:54
AlexExtremethen configure should work right12:54
reppelworked01:13
reppelnice01:13
AlexExtremereppel, what distro are you using, just out of curiousity?01:19
reppelAlexExtreme: i'm cross-compiling upstart from etch to a custom mips one01:20
AlexExtremewow01:20
reppeldebian etch01:20
AlexExtremecool :)01:20
reppeli had to do some small modification to allow cross-compiling on mips01:21
reppelSIGSTKFLT is not defined on this platform01:21
reppeland SSIZE_MAX is not defined in my toolchain so i defined it to LONG_MAX but i think this is a toolchain issue01:21
reppelalso SIGUNUSED seems undefined01:22
reppelMaking all in nih01:24
reppelmake[2] : Entering directory `/home/ciotta/upstart/libnih/nih'01:24
reppelmake[2] : *** No rule to make target `../m4/codeset.m4', needed by `Makefile.in'.  Stop.01:24
reppelmake[2] : Leaving directory `/home/ciotta/upstart/libnih/nih'01:24
reppelmake[1] : *** [all-recursive]  Error 101:24
reppelideas?01:24
AlexExtremenope01:28
AlexExtremesorry01:28
AlexExtremeyou'll have to ask keybuk when he's around01:28
reppeli suspect is a problem with nihify01:29
AlexExtremeyes01:30
reppelYou don't know how much i don't like auto-* stuff01:36
AlexExtremeI don't like it either01:36
reppelthere are also other erros01:42
reppelAlexExtreme: can you actually compile this branch?01:42
AlexExtremeno idea :)01:42
reppelI bet on it :)01:43
reppelstart on stopped mount-kernel-filesystems ok <-- what's the meaning of ok? is it mandatory?01:47
AlexExtremei think that means that it should only run if that is stopped but it exited normally01:49
AlexExtremei.e, if it exited with an error that wouldn't be run01:49
=== Keybuk [n=scott@quest.netsplit.com] has joined #upstart
reppelHi Keybuk, i'm trying to compile complex-event-config branch (bzr merged http://www.netsplit.com/bzr/libnih http://bazaar.launchpad.net/~keybuk/upstart/complex-event-config; cd complex-event-config; ../libnih/nihify .; autoreconf -i; ./configure; make) but it stops at "No rule to make target `../m4/codeset.m4'" in libnih/nih, any ideas? i think there might be a problem with links made by nihify)01:57
Keybukwhich version of autoconf, automake, libtool, gettext, etc. do you have installed?01:57
Keybukmake sure they're the same rough versions as noted in HACKING01:58
reppelok01:58
reppelI'm going to check, thanks01:58
reppelKeybuk: as a side note, i'm cross-compiling upstart for mips, i had to comment out SIGSTKFLT in nih/signal.c since it is not available on mipsel01:59
Keybukreppel: update the libnih tree, there's a patch for that already02:00
Keybuk(bzr pull)02:00
reppelnice thanks02:00
reppelKeybuk: same error :|02:22
reppeldpkg -l autoconf automake libtool gettext |awk '/^ii/ {print $3}'02:23
reppel2.61-402:23
reppel1.10+nogfdl-102:23
reppel0.16.1-102:23
reppel1.5.22-402:23
Keybukdid you run autoreconf inside libnih?02:25
reppeluhm I only did it in the upstart dir/02:25
reppeli'm going to try02:25
Keybukright02:26
Keybukyou need to do the libnih one as well I think02:26
Keybukjust run autoreconf -i there, and try running "configure" again from upstart02:26
reppelok you also have to run configure in the libnih dir to install libtool and other stuff02:29
reppelif you need to update the wiki, here is the sequence i use:02:29
reppelbzr branch http://www.netsplit.com/bzr/libnih libnih02:29
reppelbzr branch http://bazaar.launchpad.net/~keybuk/upstart/complex-event-config02:29
reppelcd libnih/02:29
reppelautoreconf -i02:29
reppel./configure02:29
reppelcd ../complex-event-config02:29
reppel../libnih/nihify02:29
reppelautoreconf -i02:29
reppel./configure02:30
reppelmake02:30
Keybukis there a wiki page on this?02:31
Keybuk(if not, go ahead and add one :p)02:31
reppelhttp://upstart.ubuntu.com/wiki/ContributingCode02:32
reppelOk i'm registering in launchpad so i can make modifications myself02:32
reppel*by02:32
reppeluhm that page is marked as "immutable"02:33
Keybukdo you have a wiki account?02:33
Keybukclick Login at the top, fill in the fields and click Create Profile02:33
reppelok thanks :)02:33
reppelKeybuk: you think it's better to add instructions to ContributingCode or create a page called CompilingUpstart into CategoryDoc ?02:36
Keybukeither works02:38
KeybukCompilingUpstart would be useful and link to it02:38
reppelok02:41
=== pkt [n=pantelis@athedsl-134586.otenet.gr] has joined #upstart
=== mbiebl [n=michael@e180112078.adsl.alicedsl.de] has joined #upstart
=== space-m0nkey [n=chatzill@client-82-3-73-143.manc.adsl.virgin.net] has joined #upstart
=== j_ack [n=rudi@p508DB669.dip0.t-ipconnect.de] has joined #upstart
=== thotz [n=thomas@d86-33-125-87.cust.tele2.at] has joined #upstart
=== thotz [n=thomas@d86-33-125-87.cust.tele2.at] has left #upstart []
AlexExtremehmm05:55
Keybuk?05:55
AlexExtremeis it possible to use CIA (as in http://cia.navi.cx) with Bazaar on launchpad?05:55
KeybukI've no idea05:59
AlexExtremeah well05:59
Keybuktheir site doesn't mention Launchpad05:59
AlexExtremewell, it's not host specific, it's specific to the VCS06:00
Keybukthere's a bzr plugin, but that's client-side06:00
AlexExtremehmm06:00
AlexExtremeit's client side...06:00
AlexExtremethat would be good06:00
Keybukthat'd involve me running it06:01
Keybukwhich would seem to defeat the point, no?06:01
AlexExtremei'm not talking about for upstart06:01
Keybukthe plugin runs on commit, not push06:01
AlexExtremei'm considering moving my project's source to bazaar on launchpad06:01
Keybukah06:01
reppelwhy did ubuntu choose bzr over svn?06:02
reppelis it more oriented to the distributed model?06:02
reppellike git or arch?06:02
_ionI don't really see a reason for anyone to choose svn or any other centralized VCS. :-)06:03
_ionEven in a centralized environment, a centralized VCS is a single point of failure.06:04
Keybukreppel: simple; with bzr I can commit on my laptop whenever I like06:05
Keybukon trains, planes, etc.06:05
Keybukand I can choose when I push it to the archive06:05
reppeloh nice06:05
KeybukUbuntu didn't choose bzr anyway :)  we developed it06:06
reppelKeybuk: when you started it, there was no other option? (svn,arch,git,mercurial)06:06
Keybukmercurial is a fork of bzr06:06
Keybukat least, they took the original bzr design documents and wrote a separate implementation06:06
Keybukgit didn't exist at the time either06:07
Keybuksvn is useless, and should die a horrible death06:07
_iondarcs is pretty old, isn't it?06:07
AlexExtremesvn is horrible06:07
Keybukthe only two useful revision control systems were CVS and Arch06:07
KeybukCVS doesn't do distributed, merging or branching06:07
KeybukArch does, so we hired and funded that -- but found that it was just too much like hard work06:08
Keybukso we forked it and called the fork "Bazaar"06:08
AlexExtreme_ion, darcs is great, but the choice of programming language was a bit wrong imo ;) also it's rather slow06:08
Keybukbut it soon became apparent that though there were good ideas there, it still wasn't tenable to use06:08
Keybukso we designed from scratch a new one called "Bazaar NG" / "bzr", which has since inherited the "Bazaar" name06:08
Keybuk_ion: we'd never heard of darcs at the time06:08
AlexExtremeis the old bazaar still in use?06:08
Keybukthough I think Martin (who designed bzr) had06:09
Keybuknah, old bazaar is basically dead06:09
AlexExtremeah06:09
AlexExtremeok06:09
AlexExtremefrugalware uses darcs for everything06:09
Keybukthe reason upstart uses bzr is simply that I like it :)06:09
KeybukI don't really have any major 06:10
AlexExtremeand at this moment, I agree that SVN should die a horrible death06:10
Keybukannoyances with bzr, which says a lot06:10
KeybukSVN is no better than CVS06:10
AlexExtremeit won't let me add a directory because a file had that name before, it says i need to commit the rename of that file but i already have done06:10
Keybukthe only useful thing it adds to CVS is atomic commits, at the cost of a huge amount of headache and maintenance problems -- combined with lethargic slowness06:10
AlexExtremeso06:11
AlexExtremei'm switching to bzr06:11
=== space-m0nkey [n=chatzill@client-82-3-73-143.manc.adsl.virgin.net] has joined #upstart
Keybuk(actually, that's not true ... I do have a medium annoyance with bzr, which is that some of its commands aren't consistent with each other -- but they do fix those from time to time)06:11
=== phsdv [n=paul@dyn-88-123-135-123.ppp.tiscali.fr] has joined #upstart
AlexExtremei'm liking bzr already06:14
=== int0x0c [n=ben@161.253.47.25] has joined #upstart
phsdvHi, I have a question on event arguments. What happens if we have something like "on event1 and event2"? I guess $1 will belong to event1 and $2 to event2. But what happens if only event2 sends an argument with the event, it will be in $1 or in $2?06:30
Keybukcurrently:06:47
Keybukwhichever of the two events comes second06:47
Keybukso if event1 happens, then event2, the job only knows about event206:48
KeybukUPSTART_EVENT=event2, $n are the arguments to event2 and the environment comes from event206:48
Keybukthat's mostly down to the design of the way that events are transferred into jobs07:11
Keybukthe EventEmission is referenced by the job when the goal changes07:11
Keybukthe arguments and environment are taken directly from the EventEmission structure07:12
Keybukand when the job reaches a rest state, it unreferences the EventEmission07:12
Keybukthis all predates complex-event-config :)07:12
Keybukassuming that we want to fix it so that:07:12
Keybuk  on block-device-added and some-other-event07:13
Keybukcan still see what block device was added ...07:13
Keybukwe need to come up with a solution, which could be anything of:07:13
Keybuk 1. permit multiple event emissions on a job, collate them all (what does UPSTART_EVENT contain?)07:13
Keybuk    - problem here is that events aren't finished until all jobs unreference them, so the initctl emit block-device-added would block until some-other-event happened07:14
Keybuk 2. collate the event information some other way in the job (eww, copying)07:14
Keybukcomplex-event-config also affects instance jobs in a similar way07:14
Keybuke.g. do you spawn an instance when the *first* event happens in a complex set, or the last? :p07:14
phsdvthe block-device-added was the example that triggered my question07:19
Keybuk(there's a reason the code is in a branch :p)07:21
phsdvwhould haveing an UPSTART_EVENT1+UPSTART_ARG1,  UPSTART_EVENT2 + UPSTART_ARG2 be an option? 07:21
Keybukthe problem is a coding one07:38
Keybukat least, from my pov :p07:39
Keybukthough, having just done the washing up, I thought of a possible solution07:39
Keybuk1) start instances from job_handle_event rather than job_change_goal -- so they're started on the first event in a set (though would need to also check them to make sure that if everything goes to FALSE, the instance is deleted)07:40
Keybuk2) each Event operand node has not only an Event * for what it's matching but an EventEmission * for what it's matched07:40
Keybuk3) set that to the emission when matched and set the value to TRUE; set it to NULL when the value is set to FALSE07:40
Keybuk4) add an event refcount to EventEmission, they don't stop it being finished, but just stop it being freed; increment/decrement this when adjusting the Event operand07:41
Keybuk5) iterate the tree and seed the environment with all other emissions than the current one07:42
phsdvI have not looked into the implementation details before, but I see where you are going.07:45
phsdvyou need 4, in the case you have multiple scripts waiting for the same event?07:45
Keybukthe reason you need 4 is because of the way event emission works07:48
Keybuktake for example "on block-device-added and some-other-event"07:49
Keybukif you just ref'd the eventemission in the normal way, the emission would be blocked until some-other-event occurred07:49
Keybukso the process ("initctl" or just udev directly) that was emitting that event would be blocked07:49
Keybuksince it's waiting to hear progress on the event07:49
Keybukif some-other-event never happens, they can be blocked indefinitely07:50
phsdvok, clear. We do not want things to block ;-) and for sure not forever07:51
Keybukof course, the problem with above is that any event participating can never fail :)07:51
Keybukbecause success would be toggling a flag in the tree07:51
Keybukrather than the associated job reaching its goal rest state07:51
phsdvso we are stuck for the moment? No (predictable) arguments with complex events.07:56
Keybukit depends on your definition of "moment" :p07:57
phsdv:-)  I am sure you can think of a solution07:58
Keybukyeah, is just one of the problems with that spec08:06
Keybukand why it's still drafting08:06
phsdvno problem. That is why I try to write some script, to find unforseen issues. 08:08
Keybukyeah08:13
Keybukit's why I did a trial implementation08:13
Keybukto make sure it just worked, which it doesn't08:13
=== j_ack [n=rudi@p508DB669.dip0.t-ipconnect.de] has joined #upstart
=== juergbi [n=juerg@80-219-17-102.dclient.hispeed.ch] has joined #upstart
=== int0x0c [n=ben@128.164.137.192] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/Amaranth] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart

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