/srv/irclogs.ubuntu.com/2009/01/30/#upstart.txt

KeybukKDesk: hi09:51
keesjMorning09:53
keesjtoday is d-day for me and my upstart state machine...09:55
keesjmy goals is to get events queued so I can emit multiple events to a task scripts and be able to handle then all09:57
keesjsomething like http://www.paste-it.net/public/tf5a413/ 09:58
keesjbut I guess "start" should be renamed to "queued start"09:59
* Keybuk still doesn't know what you're doing10:02
keesjI have one upstart "job" that acts like a state machine its' called change_handler and listens to many external event (emit usb_detected stuff like that) , that state machine is used to support swiching between different "runlevels" (boot|mass_storage|main_app)10:07
Keybukthe built-in one doesn't work for you?10:07
keesjnext to that I have emtpy state_boot state_mass_storage,,, jobs and services that depend on those state jobs10:07
keesjand all the change_handler does is determin the currently running state and the event and stop one state and start a different state10:08
keesjbuilt-in state machine?10:09
Keybukwell, pretty much the point of upstart is that it does that kind of thing internally10:13
keesjwell I do use it a lot for simple service depenencies but that is not enough10:15
keesj(trying to explain why..)10:17
keesjwell it's also what the sysv replacement does10:20
keesjwould it help if I send a mail to the mailing list explaining the problems I have?10:24
Keybuksure10:24
keesjI really boils down to the http://upstart.ubuntu.com/getting-started.html on bounce example not wokring 10:25
Keybukit doesn't?10:26
keesjno10:27
KeybukI don't see a bug about that anywhere10:28
keesjwell it's not like there is a definitive list of the syntax of the files so I would know what to expect to be honest10:29
Keybukhttp://upstart.ubuntu.com/wiki/Stanzas10:30
keesjThis page corresponds to upstart 0.3.9. The syntax and job control mechanisms is greatly improved in 0.5.0. 10:30
Keybuk...if only it were a wiki ;)10:31
keesjI did edit some parts of that 10:32
keesjon that page the console also had non existent options 10:33
Keybukseriously though, if something isn't working, then a bug should be filed10:35
keesjok suppose the on bounce would work and would take 5 seconds to run and I emit 5 bounce withing one second , what should the behaviour be?10:37
Keybukdepends on what you do in bounce10:37
Keybukyou either want just one running at a time10:37
Keybukso use the default behaviour10:37
Keybukyou want one running for each bounce10:37
Keybukso add "instance ..." to your job10:37
Keybukor you want one running at a time, but if bounce occurs while it's running, it needs to be run again (but only once no matter how many bounces occur)10:38
Keybukso instance and exec watershed10:38
keesjif I would like a single instance to be run 5 times would that be possibe?10:39
Keybuksure, in 0.3.x just add "instance" to the job10:39
keesjI am on 0.510:41
keesj0.5.1 even10:41
Keybukthat's a bit more tricky, you need to add something to the bounce to instance on10:42
Keybukwhich is a bug in 0.510:42
Keybukwell, more of a misdesign10:42
keesjhm. can you explain a little more?10:46
Keybukin 0.5, you have to have something to define the limits of the instance10:46
Keybukit doesn't let them be unlimited10:47
Keybukso in the bounce example, you'd have to include (for example) a BOUNCENUM variable that changed for each one10:47
Keybukthen the job could have instance $BOUNCENUM in it10:47
keesjbut woudl that run the jobs in parallel?10:48
Keybukyes10:49
keesjwhat I reall woudl like is that this task gets executed 5 time10:51
Keybukthat works in 0.3 and will work again by 0.1010:56
keesjwriting the mail..10:56
Jc2kwg 810:59
Keybukbah, that one's less fun than "win"11:00
keesjI guess what needs doing for the Stanzas is to Create 2 pages one for 3.8 and one for 0.511:21
keesjhttps://lists.ubuntu.com/archives/upstart-devel/2007-March/000241.html tels that "on EVENT" was removed12:29
Keybukyes, in all versions of upstart since 0.2, "on" has been identical to "start on"12:29
keesjI am trying to implement some hack/proof of concept for the handler. From my current understanding what needs to happen is that I need to block events to a jobs instance while it is running as handler12:52
keesjso increasing the blocker on start and decreasing it on stop when that job is defined as ... "handler"12:53
KeybukI'm not sure what you mean by "block events"13:01
Keybukjobs don't "receive" events13:04
Keybukbut they can have their state changed by them13:04
keesjwhat I want to happen (I guess) is that in event_poll (in event.c) the event gets skipped because there are "bockers"13:04
keesjblockers13:04
Keybukthen it would be missed13:05
keesjand would be removed from the queue?13:05
Keybukright13:05
Keybukevents can be held in the queue while things are processing them13:05
Keybukbut that's after job states have been changed13:06
keesjdo you understand the difference between "my" state machine and the upstart states?(I think that mainly the logic to perform a state change is put in a script)13:11
Keybukno13:21
KeybukI shall read the mails later ;)14:32
=== mbiebl_ is now known as mbiebl
sadmac2Keybuk: around?20:03
Keybukbriefly20:03
Keybukwhat's up?20:03
sadmac2Keybuk: was anyone working on the dbus properties code?20:04
Keybukme20:04
Keybukright now20:04
Keybukthat depends on variant code20:04
Keybukwhich is what I'm trying to figure out20:04
sadmac2Keybuk: ok. I'll leave that to you then20:04
sadmac2Keybuk: variant code?20:04
Keybukproperties use variants20:05
Keybukright, bbl20:05

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