/srv/irclogs.ubuntu.com/2007/03/01/#upstart.txt

=== cortana [n=sam@62-31-146-25.cable.ubr12.azte.blueyonder.co.uk] has joined #upstart
=== khermans__ [i=administ@nat/cisco/x-ff87b469336f7e6a] has joined #upstart
=== mbiebl [n=michael@e180088015.adsl.alicedsl.de] has joined #upstart
=== theCore [n=alex@ubuntu/member/theCore] has joined #upstart
=== _ion [i=johan@kiviniemi.name] has joined #upstart
=== khermans__ [i=administ@nat/cisco/x-879df417dccb614d] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/Amaranth] has joined #upstart
=== int0x0c [n=ben@161.253.46.197] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/Amaranth] has joined #upstart
=== cwillu [n=cwillu@S01060011d8399444.ss.shawcable.net] has joined #upstart
cwilluhow can I get a program in an event to start on a particular tty?09:29
=== mdales [n=michael@dsl-217-155-205-58.zen.co.uk] has joined #upstart
cwillunvm, guess it was a getty question09:34
=== 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
=== Keybuk [n=scott@wing-commander.netsplit.com] has joined #upstart
=== cortana [n=sam@62-31-146-25.cable.ubr12.azte.blueyonder.co.uk] has joined #upstart
=== cwillu [n=cwillu@S01060011d8399444.ss.shawcable.net] has left #upstart []
=== mdales [n=mdales@cpc3-cmbg6-0-0-cust25.cmbg.cable.ntl.com] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== reppel_ [n=reppel@213-140-11-128.fastres.net] has joined #upstart
reppel_is it possible to pass a env variable from the pre-start stanza to the exec stanza?11:36
reppel_sorry 11:36
reppel_the respawn stanza11:36
KeybukI'm not sure I understand?11:37
reppel_well11:39
reppel_i need to respawn a daemon11:40
reppel_this daemon takes an optional argument11:40
reppel_-D11:40
reppel_and i know if i have to call it with the option reading a file on the filesystem11:40
reppel_so i thinked about reading this file in the pre-start stanza11:40
reppel_but it seems i can't pass env variables from pre-start to respawn11:41
Keybukright11:41
Keybukyou can set the same variable for both though11:41
reppel_Keybuk: how?11:43
reppel_lag lag11:43
Keybukenv FOO=BAR11:44
Keybukin the job11:44
reppel_Keybuk: yep but the problem is that i need to set FOO to BAR if /etc/sysconfig/video exists (or veryfing a generic condition), otherwise i need to set FOO to another value11:51
reppel_you can map this problem to /etc/default/ files11:51
reppel_if you source for example /etc/default/daemon and you found interfaces="eth0,eth1"11:52
reppel_you need to pass these options to the daemon11:52
KeybukI understand the problem, there isn't a solution to it yet11:54
reppel_ok thanks11:57
reppel_is it planned for the future?11:57
Keybukdunno11:58
KeybukI've never seen the point of /etc/default files11:58
reppel_neither I11:58
reppel_just wanted to help you understand :)11:58
Keybukif I were to worry about those, I'd just implement an env FILENAME option or something12:01
reppel_Keybuk: what do you suggest in my case?12:02
reppel_respawning a script?12:03
Keybuksure12:03
Keybukscript ...12:03
Keybukend script12:03
Keybukrespawn12:03
reppel_you can respawn a script/end script stanza?12:04
Keybukyes12:06
reppel_nice :)12:06
reppel_much cleaner12:06
reppel_thanks Keybuk 12:06
reppel_oh, just another question12:10
reppel_i have a job used as state12:10
reppel_its definition is the following:12:10
reppel_on stopped some_event12:10
reppel_if i try to stop it i get from initctl the following message:12:11
reppel_# initctl stop system-up12:11
reppel_system-up (stop) running12:11
Keybukwhich upstart version?12:12
reppel_0.3.512:12
Keybukyeah, known bug12:12
Keybukfixed in bzr trunk12:12
reppel_in the main trunk?12:12
Keybukyes12:12
reppel_ok, thanks a lot12:12
mdalesinitctl emit foo - should that gerenate event foo?12:13
=== phsdv [n=paul@91.168.175.163] has joined #upstart
mdalesor did I misunderstand the docs?12:13
reppel_mdales: yes it does12:14
mdalesokay, but not on 0.2.7?12:14
Keybukinitctl trigger on 0.2.712:14
mdales(i.e., what's on edgy)12:14
mdalesah12:14
mdalesthanks12:14
reppel_mdales: don't know about 0.2.7, i'm using 0.3.512:14
Keybuk(we changed the terminology)12:14
mdalesright12:14
mdalesmany thanks12:14
reppel_Keybuk: are you still working on specs of complex-event or you have reached a final state?12:22
Keybukstill working on it12:23
Keybukwe're really not happy with it12:23
mdalesthe respawn scrip thing mentioned above - is the syntax for that just "respawn script ... end script"?12:23
mdales+t12:23
Keybukno12:24
Keybuk"respawn" appears on a line on its own12:24
mdalesokay12:24
Keybukrespawn CMD is just a (removed in bzr trunk) shortcut for "respawn\nexec CMD"12:24
mdalesis that the right thing to do for a respawning process that emits an event as it starts - the script will do an initctl trigger and then run the command, and I specify that script as respawn?12:25
mdalesokay12:25
Keybukthe only difference would be that instead of running exec() on the command directly, it would exec() a shell and pipe in the script instead12:27
mdalescool12:28
mdalesokay, many thanks for that. I now have proper dependancy on scripts12:42
mdalesmuch appreciated12:42
=== nakee [n=nakee@grok.cs.huji.ac.il] has joined #upstart
nakeehey12:44
Keybukhi12:46
_ionHi12:46
nakeeupstart also replaces cron and so on?12:46
_ionNot yet.12:46
nakeebut it suppose to be something like the daemon they have now on macosx?12:47
Keybukwe're heading in that direction, yes12:47
Keybukbut a little earlier in the development cycle than they are12:47
Keybuk(which reminds me, the launchd never did e-mail me)12:47
=== pschulz01 [n=paul@202.174.42.5] has joined #upstart
pschulz01Hello.. How do I enable a serial console in edgy?12:48
pschulz01(Fresh install)12:48
Keybukpschulz01: try #ubuntu12:49
pschulz01Keybuk: Sorry.. dev forum?12:49
KeybukUbuntu users/support channel12:50
_ionpschulz: Look at /etc/event.d/tty1, create /etc/event.d/ttyS0 just like it but modify the parameters on the "respawn" line appropriately.12:50
_ion(I think)12:50
pschulz01_ion: Ta.. exactly what I was after.12:50
pschulz01(/etc/inittab was missing :-?)12:51
_ion/etc/event.d is the Upstart equivalent of inittab.12:51
pschulz01_ion: Restart required?12:52
Keybukno12:52
_ionsudo initctl start jobname (where jobname is the filename, e.g. ttyS0)12:52
=== __keybuk [n=scott@quest.netsplit.com] has joined #upstart
pschulz01_ion: Wahoo!!! ta. one wyse terminal connected and talking :-)12:54
=== _ion wonders whether any hardware terminal supports UTF-8
mdaleshmmm. I had a respawned script that did "initctrl trigger myserverstart \ /usr/bin/myserver" and all was well01:01
Keybukyou'd get "started myserver" anyway01:02
mdaleswhen I added a initctrl trigger myserverstop after the myserver line the script no longer seems to stop myserver01:02
mdalesyes01:02
mdalesthat was fine01:02
Keybukright, it would kill the shell script not the daemon running inside it01:02
Keybukyou need to use trap to kill the daemon01:02
mdalesbut it did that in the first case01:02
mdalesboth cases are scripts01:02
Keybuk?01:06
Keybukcan you pastebin the job?01:07
mdalessure01:08
mdaleshttp://pastebin.ca/37704001:10
mdalesif you remove the second call to initctl it works01:11
mdalesanoying Xvnc doesn't dump it's pid anywhere01:11
Keybukwhat does it do if you remove the second initctl call?01:14
Keybukand what does it do if you don't/01:14
mdaleswhen I so a stop Xvnc will terminate01:14
mdaleswithout it it continues to run01:14
Keybukso without the second initctl line, Xvnc gets killed?01:15
pschulz01How do I send upstart output to a serial console?01:15
Keybukwith the second initctl line, Xvnc doesn't?01:15
mdalesyes01:15
Keybukpschulz01: console=/dev/ttyS0 on the kernel command-line01:15
Keybukmdales: shell behaviour, I would guess01:15
mdalesfair enough01:15
mdalesI'll add a trap handler for TERM01:15
mdalesI assume that otherwise that's a good way to stignal the start/stop of a service?01:16
mdalesit's mostly so when I do a stop comamnd it stops the thing that was started by vcnserver11 event01:16
mdales+the01:16
mdalesI guess I could do that in the stop stanza01:17
mdalesanyway, once again, many thanks for your advice01:17
pschulz01Keybuk: I did that... I'll have a look at it again though.. as I thought that I would be seeing more messages than what I currently am.01:18
Keybukpschulz01: in normal operation, you won't see any messages01:19
pschulz01Keybuk: Ta,01:20
Keybukmdales: I don't see why you need the initctls there, though01:20
mdalesin you can't see why I need the events?01:21
mdalesof why I've put them there in particular?01:21
mdaless/of/or/01:22
mdalesI have another script that launches another program in response to Xvnc starting/stopping01:23
mdaleswe have some hardware thin clients that are essentially ethernet attached framebuffers. there's a program called nivo2vnc that I use to connect the Xvnc session to the thinclient01:24
Keybukmdales: right, but you get events when jobs start and stop for free01:24
mdalesah, okay01:24
mdalesI missed that in the docs01:24
mdalesI'll go and reread01:24
Keybukassuming that job file is called vncserver01:25
Keybukyou get a vncserver/started and vncserver/stop event01:25
mdalesokay01:26
mdalesthanks01:26
mdalesI need to go to a meeting now, but I'll try that when I get back01:26
=== Trevelyan` [n=Jim@unaffiliated/trevelyan] has joined #upstart
=== _ion [i=johan@kiviniemi.name] has joined #upstart
=== Trevelyan [n=Jim@unaffiliated/trevelyan] has joined #upstart
=== _ion [i=johan@kiviniemi.name] has joined #upstart
reppel_Keybuk: "start on started someevent" and "start on someevent/started" have the same meaming?02:41
Keybukreppel_: no02:45
Keybukthey're different events, from different versions of upstart02:45
reppel_i'm using 0.3.5 with "start on started event"02:45
reppel_is it different in trunk or previous versions?02:45
Keybukyou mean "start on started job"02:46
reppel_sorry02:46
reppel_yep02:46
Keybukand that's correct for 0.3.5, started is emitted when the job is running02:46
Keybukjob/started is what 0.2.7 emits, at a similar, but not identical point02:46
reppel_Keybuk: is it possible to run a daemon under a given uid with upstart?02:46
reppel_currently i'm using su02:47
Keybukuse su02:47
reppel_is it a planned feature?02:47
Keybukwe're planning for user jobs02:47
Keybukwhere a job can be registered in the name of a user, and only that user (or root) can start/stop it, etc.02:47
Keybukand the processes associated with that job are run as that user, in a full PAM session02:48
reppel_ah ok02:48
reppel_Keybuk: do you think feisty+1 will be purely upstart based?02:48
Keybukreppel_: I don't know, maybe02:48
Keybukfeisty isn't upstart-based yet02:48
Keybukgetting promoted didn't leave me enough time to do that02:49
mdalesare there circumstances under which respawn will stop trying to work?03:17
Keybukyes03:22
Keybukif the limit is reached03:22
mdalescool03:25
mdalesta03:25
Keybukrespawn limit TRIES INTERVAL03:25
Keybuke.g.03:25
Keybuk  respawn limit 100 1003:25
Keybukmay only be restarted 100 times every 10s03:25
Keybukif it steps over that, it's stopped03:25
mdalesokay03:25
mdaleshmmm03:27
mdalesthat's presumably over the lifetime of a system?03:27
Keybukyes03:27
mdalesokay03:27
mdalescan I set it to infinite?03:27
Keybukrespawn limit 0 003:27
mdalesokay03:28
mdalesthanks03:28
Keybukthe TRIES counter is reset if INTERVAL is passed03:29
Keybukso if the 100th respawn happens more than 10s after the first one, it's not counted as a runaway job03:29
mdalesah03:29
mdalesokay03:29
mdalesthat's more what I want I suspect03:29
mdaleshmmm. still not working. I need to add some logging to find out why my child scripts aren't being launched at boot03:31
Keybukboot with --debug03:31
mdales--debug on the kernel option?03:32
Keybukyeah03:32
mdaleswill that dump to the screen or to a log file?03:32
Keybukscreen03:35
Keybukyou don't have a writable filesystem ;)03:35
mdalesah03:35
mdaleshmm. okay, I suspect one thing I need to do is make my Xvnc script dependant on xfs having been started03:49
mdalesXvnc struggles to start, and I'd wager xfs not being ready would be a good reason for that to happen03:49
=== j_ack [n=rudi@p508DB9B4.dip0.t-ipconnect.de] has joined #upstart
=== _ion [i=johan@kiviniemi.name] has joined #upstart
_ionSigh, bloody ISP.04:06
Keybuk:)04:08
Keybukis there any other kind?04:09
_ion:-)04:09
mdalesis there an easy way to tie an upstart script to a rc.d event? I've been looking through the code to see if I can spot it but failed thus far to spot anything04:09
_ionAt least this one doesn't charge 25 /month for a static IP address and say "you can't have a server" (even though the Finnish law doesn't allow an ISP to say so).04:09
=== theCore [n=alex@ubuntu/member/theCore] has joined #upstart
Keybukmdales: define "rc.d event"04:28
mdaleswhere do I define that? I've not seen any examples of defines. Basically I want to tie my script to the starting of xfs whcih on edgy is started in rc2.d04:35
mdalesapologies if I'm missing some obvious docs on this stuff04:35
Keybukno, I mean can you define "rc.d event" for me, since I don't understand what you mean04:37
Keybukthe most you could do would be to start your script on rc2.d/stop04:38
mdalesokay04:38
Keybukor modify /etc/init.d/rc to emit upstart events04:39
mdalesyeah04:39
mdalesI was pondering that option04:39
mdalesbut I think your idea of having it start on rc2.d/stop would work too04:39
mdalesand mean less messing with other scripts04:39
=== j_ack [n=rudi@p508DB9B4.dip0.t-ipconnect.de] has joined #upstart
=== int0x0c [n=ben@161.253.46.197] has joined #upstart
=== AStorm [n=astralst@puszkin.org] has joined #upstart
AStormHello guys.06:10
AStormAny new releases? (need a new one for my liveUSB :> )06:10
Keybukwhat do you need a new one for? :p06:11
Keybukwhat's wrong with the old one?06:11
AStormComplex events?06:11
AStormMaybe I'll just use the latest bzr.06:12
AlexExtremecomplex-event-config is being rather complex to design ;)06:12
Keybukcomplex events aren't even in bzr trunk06:12
Keybukso they wouldn't appear in the next release anyway06:12
AStormKeybuk: uh...06:12
Keybukstill "drafting"/"experimental"06:12
AStormUh... ^206:12
AStormBut I can manage with current upstart too.06:12
AStormBut then, any init system would work fine for that.06:13
Keybukneed to finish the design of complex-events before the implementation can be released06:14
AStormGood. Hate to use unfinished and broken tools.06:15
=== juergbi [n=juerg@80-219-17-102.dclient.hispeed.ch] has joined #upstart
=== mbiebl [n=michael@e180086079.adsl.alicedsl.de] has joined #upstart
KeybukI hate it when test cases break when I change things06:36
mbieblKeybuk: with feature freeze nearing for feisty, do you still hold on your ambitious plans of upstartifying the core system services?06:37
Keybukno06:37
Keybukthey'll be optional packages instead06:37
AlexExtremeIIRC feature freeze already started06:37
Keybukgeneral advice; if you want time to do things, *don't* say yes to becoming a manager06:39
Keybukgeg06:39
Keybukhe06:39
mbieblturns out ComplexEventConfig was more complex than anticipated ;-)06:39
AlexExtremeheh06:39
Keybukmbiebl: nah, I anticipated it would be complex06:40
KeybukI just want it to be elegant, really06:40
mbieblWell, I just noticed your hesitations (better think twice than rush it)06:41
mbieblBut getting it right (which includes elegance imo) is surely more important than getting it out quickly06:42
Keybukexactly06:43
mbieblKeybuk: the vim syntax highlighting file, I wrote: where is the best place to put that?06:45
Keybukmail it to the list06:46
mbieblok. but what about updates (new keywords etc.)06:46
Keybukif you mail it to the list, I'll stick it in bzr :)06:47
Keybukalternatively, make your own bzr branch and add it there, and I can pull06:47
Keybukcontrib/ directory or something would do06:48
mbieblnever worked with bzr, so I'll go with the first option ;-)06:48
mbieblbut maybe a good occasion to learn about bzr...06:50
=== _ion [i=johan@kiviniemi.name] has joined #upstart
=== khermans__ [i=administ@nat/cisco/x-a0e2e3363eb9cf3c] has joined #upstart
Keybukyay07:05
Keybukjob->pre_start/post_start/etc. are all gone!07:05
Keybukalong with job->pid07:06
_ion\o/07:08
Keybukthere's now a single job->process array07:09
Keybukthe first five elements of which are builtin to be the default main/pre-start/etc. actions07:09
Keybukand each member has its own pid07:09
_ionNice07:10
Keybukthis makes some code more sane, e.g. the child_reaper doesn't guess which process failed by the state anymore07:11
Keybukit now knows it was the post-start script :)07:11
Keybukalso it makes adding custom actions really easy07:11
_ionIf the job has multiple instances, will they be added to the array?07:11
Keybukinstances are still separate entries in the jobs hash table07:11
_ionOk07:11
KeybukI haven't disconnected the state from the configured job07:12
Keybuk(yet, maybe)07:12
=== AStorm [n=astralst@chello084010114027.chello.pl] has joined #upstart
=== pkt [n=pantelis@athedsl-17765.otenet.gr] has joined #upstart
=== mdales_ [n=mdales@dsl-217-155-205-58.zen.co.uk] has joined #upstart
=== mdales [n=mdales@dsl-217-155-205-58.zen.co.uk] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
wasabi_Keybuk: Where'd the term watershed come from?08:57
Keybukno idea09:02
Keybukit's a dictionary word09:02
=== j_ack [n=rudi@p508DB9B4.dip0.t-ipconnect.de] has joined #upstart
Keybukthings flow over the top of a watershed09:24
wasabi_hmm09:27
wasabi_I can't even find any CS references to it. :009:27
wasabi_Except in evms.rules. =)09:27
KeybukI doubt there are09:28
Keybukit's a geography term :p09:29
Keybukwhen a river reaches a watershed, the water is collected to be returned at a later time09:29
Keybukhttp://codebrowse.launchpad.net/~keybuk/upstart/main/revision/scott@netsplit.com-20070301180322-inrigno2arsd68dk?start_revid=scott%40netsplit.com-20070301190545-9fdab2fn014jyx9y09:34
wasabi_udev lesson: What happens when a br0 interface is added.09:34
wasabi_I see 25-iftab.rules.09:34
wasabi_Seems like that would invoke it.09:34
Mdtry it: use udevmonitor and create a new bridge09:35
wasabi_ooh. neat utility.09:35
wasabi_Have a friend whose getting weirdness with interfaces being renamed involving bridges. I'm wondering if there's anyplace anywhere that DOESN"T rename br0 to eth*09:36
=== afancy [n=chatzill@xiliu.sby.abo.fi] has joined #upstart
afancyhi09:44
afancyThis channel requires that you have registered and identified yourself with the network's nickname registration services (e.g. NickServ). Please see the documentation of this network's nickname registration services that should be found in the MOTD (/motd to display it).09:44
afancyI got the above msg.09:44
afancyhow shoud i do09:44
wasabi_interesting. What makes 25-iftab rules NOT continue processing events for the interface?09:48
wasabi_The interface it just renamed.09:48
wasabi_Or, does it, just under the new name?09:49
=== mdales [n=mdales@dsl-217-155-205-58.zen.co.uk] has joined #upstart
=== afancy [n=chatzill@xiliu.sby.abo.fi] has left #upstart []
Keybukwasabi: the point is that udev continues processing events under the new name10:11
Keybukthere should be an IRC flag meaning "I need an operators help"10:12
Keybukand there should be a channel flag that prevents people joining the channel if they have that :p10:12
AlexExtreme:p10:12
=== Keybuk sets mode #upstart -Md
Keybuk:p10:13
AlexExtreme:P10:13
AlexExtremegotta go, cya10:13
=== _ion [i=johan@kiviniemi.name] has joined #upstart
=== int0x0c [n=ben@128.164.137.192] has joined #upstart

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