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

Keybukyeah, it has that12:27
=== j_ack_ [n=rudi@p508DA16C.dip0.t-ipconnect.de] has joined #upstart
mbieblKeybuk: I've been toying around a bit with r50212:31
mbieblAnd with minor updates to the job files it works fine.12:31
mbieblI was just wondering, why the job files have all these "stop on shutdown|runlevel-x" stanzas12:32
mbieblFor scripts, stop is never really called, right?12:32
Keybukwell12:33
Keybukbecause they're rc scripts12:33
Keybukand sysv was never designed with running the rc6 (reboot) script while starting into rc212:33
KeybukI have that so if you press Ctrl-Alt-Del while booting, it stops booting, and switches into reboot12:33
Keybukwhich is roughly compatible12:33
Keybukoh12:34
Keybukyou'll want the new job files12:34
Keybukheh12:34
mbieblwell, i used the old ones compat job files and adapted them.12:35
Keybukhttp://upstart.ubuntu.com/new-example-jobs/12:35
Keybukthe main differences are12:35
Keybuk1) "runlevel" is now a single event, with an argument specifying the new runlevel12:35
Keybuk2) "shutdown" is no more12:35
Keybukso things now just "stop on runlevel" (ie. kill the running rc script if the runlevel changes)12:36
mbieblCool, I'll try these ones.12:37
Keybukthey work for me12:49
Keybukwhich isn't to say much12:49
KeybukI found a pretty nasty error with logd in the process though12:49
Keybukwhich is why they're console output for now12:49
_ionpe011840 < Keybuk> I don't like "extensions"01:11
_ionAmen to that.01:11
Keybukok01:20
Keybukwell01:20
Keybukthat's job_change_state () rewritten01:20
Keybukwhich could be happily described as the most core function01:21
Keybukit actually got a *lot* simpler01:21
Keybukwhich I think is encouraging01:21
_ionNice.01:22
Keybukof course, none of it *compiles* yet :p01:35
_ionNaaah, having it compile isn't as important as they say. :-)01:35
Keybukit's annoying that the tests don't compile either01:36
=== j_ack [n=rudi@p508DA486.dip0.t-ipconnect.de] has joined #upstart
Keybukso I'm not sure if the changes I'm making to them are right :p01:37
Keybuklots of things had assumptions about the state model01:37
_ionHave you already implemented it as a lookup table (i think you mentioned something like that earlier), or are the state decisions still plain code?01:38
Keybukplain code01:41
Keybukmuch more efficient01:41
=== int0x0c [n=ben@161.253.46.23] has joined #upstart
int0x0cWhat is the status of Upstart on Gentoo?01:50
int0x0cHas there been any effort to write a backend for it?01:51
Keybukit shouldn't need a "backend" ?01:52
_ionHe probably means a compatibility layer.01:52
int0x0c_ion, yep, thanks01:52
int0x0cwrong terminology01:52
Keybukthere's been a few efforts to write jobs that emulate the existing Gentoo init system01:52
KeybukI haven't actually seen any completed ones yet though01:52
int0x0chmm01:53
int0x0calright01:53
Keybuk_ion: do you remember who was doing them?01:59
_ionSorry, nope.02:00
_ion2006-12-15 19:52:46 < steev64> as much as people are going to hate me for it (not necessarily *in here*), I am trying to get up02:00
_ionstart working on Gentoo02:01
KeybukSep 13 22:28:06 <rubengonc>     i am trying it on gentoo02:03
KeybukOct 04 17:12:15 <smlgb1>        Hi there. Did anybody of you try to install upstart on gentoo yet?02:03
Keybukwe should get these people together :p02:03
_ion2006-10-27 23:31:21 < phsdv> hi all, I just managed to get my gentoo system booted using upstart.02:04
=== ..[topic/#upstart:Keybuk] : Upstart 0.3.2 | http://upstart.ubuntu.com/ | http://upstart.ubuntu.com/wiki/ | http://upstart.ubuntu.com/doc/getting-started.html | irc logs: http://people.ubuntu.com/~fabbione/irclogs | http://upstart.ubuntu.com/wiki/UpstartOnGentoo
Keybukhttp://upstart.ubuntu.com/wiki/UpstartOnGentoo02:07
Keybuk:p02:07
_ion:-)02:08
int0x0cI might try my hand this weekend at getting upstart going02:12
=== Keybuk embarks on updating the job_change_state() test suite ... ouch
Keybukhttp://upstart.ubuntu.com/wiki/JobStates?action=AttachFile&do=get&target=states.png02:20
KeybukI am *so* glad I did that ^02:20
_ion:-)02:22
Keybukthough I've added to it since then02:23
=== mbiebl [n=michael@e180118088.adsl.alicedsl.de] has joined #upstart
Keybukmbiebl: re02:31
mbieblKeybuk: yes?02:36
=== wasabi_ [n=wasabi@ubuntu/member/wasabi] has joined #upstart
Keybukjust hi02:38
mbieblah, thanks ;-)02:39
mbieblAbout Md's question:02:40
mbieblSeems as if in r502, dpkg-(old|new) files are not ignored.02:40
Keybukuh, maybe I didn't push that yet02:41
Keybukdoes nih/file.c have a nih_file_is_packaging ?02:41
mbieblnope02:41
Keybukah02:46
Keybukwoo, she compiles again!05:17
=== maro [n=mark@0x55511dab.adsl.cybercity.dk] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== baze [n=baze@c226184.adsl.hansenet.de] has joined #upstart
=== baze [n=baze@c226184.adsl.hansenet.de] has joined #upstart
=== phsdv [n=paul@dyn-83-156-76-96.ppp.tiscali.fr] has joined #upstart
=== Keybuk [n=scott@quest.netsplit.com] has joined #upstart
Keybukwhee01:35
KeybukI wasn't hallucinating last night; the test cases *do* pass02:02
phsdvcongrats!02:07
Keybukam trying to decide whether to continue to allow "respawn COMMAND" as a shortcut for both "exec COMMAND" and "respawn"02:28
Mdyes. syntactical sugar is nice :-)02:29
Keybukwell, moment of truth02:37
=== Keybuk starts it
Keybukhttp://rafb.net/p/s2LD5c17.html02:40
Keybuksweeeeeeet; ^ new job life cycle02:40
Keybuknote that the "test" job doesn't get to start until "test2" finishes, because test2 is marked "start on starting test"02:41
Keybukhttp://rafb.net/p/HtgNXP55.html02:56
Keybuk^ example of a job that needs another running02:56
=== baze [n=baze@c157038.adsl.hansenet.de] has joined #upstart
Keybuknote how hal is started once dbus is running, but that when dbus is stopped, hal actually gets stopped first and dbus isn't stopped until hal is02:57
Keybukhttp://rafb.net/p/eGZbr976.html02:57
Keybuk^ and there's a counter-example of the opposite behaviour02:58
Keybuktomcat is able to indicate that "apache needs it", so when you try and start apache, you get tomcat started *first*02:58
=== giuseppe_ [n=giuseppe@213-140-11-128.fastres.net] has joined #upstart
giuseppe_hi, i'm building a smal linux distro for learning purpose, and i was searching for something dealing with dependencies between daemons. I see upstart has removed this feature (https://launchpad.net/upstart/+spec/remove-depends). Does anyone has suggestions? are there init implementations dealing with dependencies? 03:10
Keybukfor what reason do you want dependencies?03:13
Keybukthere are (currently) four basic classes of init daemon, which all handle the problem differently:03:13
Keybuk1) those that run scripts in order, so the order expresses "what must come first"03:13
Keybuk   e.g. sysvinit03:14
giuseppe_Keybuk: because i don't want to hardcode init scripts. I'm listening btw03:14
Keybuk2) those that run everything at once, and expect the jobs to sort themselves out03:14
Keybuk   e.g. launchd03:14
Keybuk3) those that use a package-manager style dependency chain, when you start a daemon anything it "depends" on is started first (and likewise, when you stop a daemon, it's dependencies aren't stopped until afterwards)03:14
Keybuk   e.g. Solaris SMF, init-NG03:15
Keybuk4) those that use events; when you start or stop a daemon, it issues events; other daemons can be started or stopped by those events; and block the other03:15
Keybuk   e.g. upstart03:15
KeybukI assume that #1 is what you're already familar with, and #2 isn't useful03:15
giuseppe_ok so basically you're telling me to read the upstart doc better :)03:15
Keybukthe upstart docs aren't that good :p03:16
Keybuk(yet)03:16
Keybukmy two usual examples are dbus/hal and apache/tomcat03:16
Keybukhal needs dbus to be running while it is, if dbus is stopped, hal must be too03:16
Keybuktomcat is needed by apache if installed, so apache is started, tomcat must be started first (and tomcat must not be stopped until apache is)03:17
giuseppe_ok this is not possible with simple dependencies then.. you have to use events03:17
giuseppe_from what i understand03:17
Keybukin a dependency-based system you might try something like03:17
Keybuk  hal depends dbus03:17
Keybuk  and hal is a goal03:17
Keybukso when you start hal, dbus is started first03:17
Keybukthe second one is more tricky in a dependency-based system because you don't want to edit the apache job description just because tomcat is installed03:18
Keybukso you actually need something like03:18
Keybuk  tomcat is-dependency-of apache03:18
Keybuk  and apache is a goal03:18
Keybuk(the first being in the tomcat description)03:18
giuseppe_ok very clear03:18
giuseppe_thanks Keybuk 03:18
Keybukdon't know whether initNG supports that03:18
KeybukI know SMF doesn't03:18
Keybukin a event-based system, like upstart, you instead hook the events generated by hal, dbus, apache, tomcat, etc.03:19
Keybukso you might use something like03:19
Keybuk  hal: start on starting dbus03:19
Keybukerr03:19
Keybuksorry03:19
Keybuk  hal: start on started dbus03:19
Keybuk  hal: stop on stopping dbus03:19
Keybukand for the tomcat case, it's easy03:19
Keybuk  tomcat: start on starting apache03:19
Keybuk  tomcat: stop on stopped apache03:19
Keybukhttp://rafb.net/p/HtgNXP55.html03:20
Keybukhttp://rafb.net/p/eGZbr976.html03:20
Keybuk(those two URLs given an example of both of those)03:20
giuseppe_Keybuk: thank you very much i'm going to read03:20
Keybukin theory, the event-based system requires less manual or semi-automatic configuration03:20
Keybukyou can ship job definitions that do the right thing03:20
Keybukand you don't need to modify other jobs or goals when you install a new daemon03:21
=== giuseppe_ [n=giuseppe@213-140-11-128.fastres.net] has joined #upstart
=== phsdv [n=paul@dyn-83-156-76-96.ppp.tiscali.fr] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== maro [n=mark@0x55511dab.adsl.cybercity.dk] has joined #upstart
=== wasabi_ [n=wasabi@ubuntu/member/wasabi] has joined #upstart
=== int0x0c [n=ben@161.253.46.23] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/Amaranth] has joined #upstart
=== Seveas [n=seveas@ubuntu/member/seveas] has joined #upstart
=== wasabi [n=jhaltom@ubuntu/member/wasabi] has joined #upstart
=== Keybuk [n=scott@quest.netsplit.com] has joined #upstart
=== pkt [n=knoppel@85.75.153.158] has joined #upstart
=== AlexExtreme [n=AlexExtr@frugalware/developer/AlexExtreme] has joined #upstart
=== Keybuk makes yet another tweak to the state diagram
=== |phsdv| [n=paul@dyn-88-123-135-92.ppp.tiscali.fr] has joined #upstart
=== giuseppe_ [n=giuseppe@213-140-11-128.fastres.net] has joined #upstart
giuseppe_hi, i'm having troubles compiling upstart with gcc 3.3.5, is it a known issue?04:57
giuseppe_child.c: In function `nih_child_poll':04:58
giuseppe_child.c:141: error: `WEXITED' undeclared (first use in this function)04:58
AlexExtremeyes04:58
AlexExtremeupstart only compiles with 4.x afai04:59
AlexExtreme*afaik04:59
giuseppe_:|04:59
Keybukthat's more likely an out of date libc05:00
AlexExtremeah05:00
Keybukupstart needs both kernel and libc support for the waitid() system call05:00
AlexExtremeyeah05:00
giuseppe_i'm using debian's 2.3.2.ds1-2205:01
giuseppe_is there a particular libc version waitid() is available from?05:02
=== int0x0c [n=ben@128.164.137.210] has joined #upstart
Keybuk2.4 seems fine05:04
Keybukthere's a Debian package already05:05
Keybukhttp://packages.debian.org/experimental/admin/upstart05:05
giuseppe_yep even 2.3.6 is ok05:05
Keybukthough it's a little out of date; if you have those build-deps, you should be fine05:05
int0x0cHave the upstart service files for the base ubuntu installation been developed yet (i.e. not the initrd wrapper)05:05
Keybukint0x0c: they'll be available by monday05:06
int0x0cheh, wow, I picked quite a time to ask05:06
AlexExtremewoohoo :)05:06
int0x0cAre they in bzr at the moment?05:06
giuseppe_Keybuk: yes the problem is i'm trying to maintain a cross toolchain.. :|05:07
AlexExtremeKeybuk, let me know when/where I can get them when they are released, I can't wait to try it :)05:07
Keybukno; I have a bunch of them on my laptop, but they're a bit broken because I'm busy rewriting upstart :p05:07
Keybukand keep changing things05:07
giuseppe_Keybuk: i'm using this libc config: http://rafb.net/p/Kv1hho71.html, do you see problems with it? it is relative to glibc 2.3.605:08
int0x0cWhat is the bzr branch?05:08
Keybukint0x0c: for?05:08
int0x0cthe service files05:08
Keybukgiuseppe_: I don't really know libc compiles; I would imagine it's fine05:09
Keybukint0x0c: there isn't one just yet05:09
KeybukI'll get them published this weekend :)05:09
int0x0cbah, alright05:09
int0x0cthanks a ton05:09
Keybuk(I could publish them now, but they wouldn't work for you :p)05:09
Keybukhttp://upstart.ubuntu.com/states.png05:09
Keybuk^ now, isn't *that* neater05:09
AlexExtremenice05:09
AlexExtremedon't you just love dot ;)05:10
int0x0cKeybuk, I'm running gentoo05:10
int0x0cKeybuk, and looking into writing a set of services05:10
int0x0cKeybuk, I just need something for reference05:11
int0x0cIf you had a sec, I would love a tarball05:11
int0x0cbut don't worry about it if not05:11
AlexExtremeas he said, they won't work right now :)05:11
KeybukI understand that :)  these just literally aren't ready right now05:11
Keybukthey're not even useful for reference05:12
int0x0cahh, alright05:12
int0x0cfair enough05:12
=== giuseppe_ [n=giuseppe@213-140-11-128.fastres.net] has joined #upstart
Keybukinteresting; excluding tests, upstart 0.2.7 was 9,204 lines of code05:14
Keybuksince then (also excluding tests)05:14
Keybuk 36 files changed, 6899 insertions(+), 4654 deletions(-)05:14
Keybukso I've changed roughly 50% of the code05:14
Keybukthat's kinda cool05:14
AlexExtremeyeah05:14
Keybuktest suites rock for this kind of mass-scale refactoring05:15
Keybuka more odd stat ...05:16
Keybuk0.3.5 has 11,360 lines of code ... but only 2,835 semi-colons05:16
AlexExtremehah05:17
AlexExtremeI wish I could code as fast as this ><05:17
Keybukthe usual metric is 2.5 logical lines to a semi-colon05:18
AlexExtremeso for feisty do you reckon only the base services will be converted to upstart jobs for feisty's final release, seeing as feature freeze has started (it has, hasn't it?) ?05:22
Keybukwhich makes upstart about 35% comments05:22
AlexExtremehmm, just realised I said "for feisty" twice. ignore that :p05:23
Keybukthat's the plan05:25
Keybukalways has been, actually05:26
AlexExtrememmm, k05:26
Keybukmost daemons will retain sysv init scripts for feisty05:26
Keybukexcept the interesting ones05:26
AlexExtremelike dbus?05:26
Keybukright05:26
Keybukok, that's config file deletion support pushed05:28
=== Keybuk looks at his TODO list for what's next
KeybukI guess I should run valgrind over the new core :p06:03
AlexExtreme:P06:03
Keybukshouldn't be any problems, since I didn't much around with memory stuff06:04
Keybukall good06:05
=== mbiebl [n=michael@e180066028.adsl.alicedsl.de] has joined #upstart
=== baze [n=baze@d031209.adsl.hansenet.de] has joined #upstart
_ionSo you made "deleted" a state. That's good.07:00
Keybukyeah, it made the most sense07:03
Keybukit's the most trivial way of handling all the cases07:03
Keybuk- means it can't be started again, since it's not in the waiting state07:04
Keybuk- means that all deleted jobs can be quickly found and freed07:04
Keybuk- means that clients know that it's being deleted07:04
Keybuketc.07:04
_ionIndeed.07:07
Keybukit even means the clients can detect when they tried to start a deleted job :p07:08
Keybukstart "foo"07:08
Keybukfoo (stop) deleted07:08
=== juergbi [n=juerg@80-219-17-102.dclient.hispeed.ch] has joined #upstart
=== Keybuk [n=scott@wing-commander.netsplit.com] has joined #upstart
Keybukbloody ISP12:23

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