/srv/irclogs.ubuntu.com/2012/04/24/#upstart.txt

bradleyayersany timeline plans for state rewrite?04:46
SpamapSbradleyayers: I believe its been on hold since Keybuk reduced his involvement so much after leaving Canonical05:10
bradleyayersdamn :(05:10
bradleyayersthat's really really a shame05:10
SpamapSbradleyayers: probably more likely that you will see a reworking of 'expect fork' into something new before the state rewrite05:11
bradleyayersso is the project basically 100% james now?05:11
SpamapSbradleyayers: slangasek and I chip in here and there, and we've gotten patches from redhat and a few other community contributors05:11
bradleyayersfair enough05:12
bradleyayerscanonical should replace keybuk :)05:12
SpamapSjodh has been pretty good :)05:13
SpamapSbradleyayers: the state problem has fairly straight forward work arounds now too05:14
SpamapSbradleyayers: did you have a particular problem in mind that needs the state rewrite? I've solved most of them with the 'wait-for-state' job we added in Ubuntu 11.1005:21
SpamapSgranted, the addition of a 'while' keyword would be way better. :)05:22
bradleyayerswell, i suppose i just don't understand wait-for-state, and havent found a good tutorial for it06:01
bradleyayersi basically want "start on started rabbitmq and started postgresql" "stop on stopping rabbitmq or stopping postgresql", and for my job to be started when either one is restarted06:02
bradleyayers(my job relies on both postgresql and rabbitmq, so if either is restarted, i want my job to stop gracefully (and block the restarting thing), then start when it comes back up)06:03
bradleyayerswait-for-state seems a bit cryptic to me and i'm not sure how to apply it to my situation06:03
bradleyayersSpamapS: ^06:04
SpamapSbradleyayers: your job is broken, IMO, and should be fixed to start normally without either of them available yet.06:25
SpamapSbradleyayers: because if it needs rabbit and postgres, they might be on a different box, and you can't control the order of boxes w/ upstart06:25
bradleyayersby box you mean computer right?06:25
bradleyayershmm i see your point06:26
SpamapSwe went through it w/ openstack too06:26
SpamapSopenstack will likely run on thousands of computers06:26
SpamapSso it starts up with 3 phass.. 1) sanity checks, 2) poll for resources, 3) running06:26
SpamapSs/phass/phases/06:27
bradleyayersyep06:27
SpamapSBut yeah, until you have that baked in..06:27
SpamapSyou need sequencing.06:27
SpamapSso wait-for-state, you'd just put this in pre-start:06:27
SpamapSstart wait-for-state WAIT_FOR=rabbitmq WAITER=mything06:27
SpamapSstart wait-for-state WAIT_FOR=postgres WAITER=mything06:27
bradleyayerswell wait-for-state won't scale to more than one box right06:28
SpamapSand just start on runlevel [2345] and stop on stopping postgresql or rabbitmq06:28
SpamapSbradleyayers: right06:28
bradleyayersso i'd be better just changing my process to have a proper startup sanity + poll for resources check06:28
SpamapSyeah06:29
bradleyayersthen my process will die if either resource becomes unavailable06:29
bradleyayersand will be restarted, and my startup checks will just keep it hanging there until the resources come back up06:29
bradleyayersi suppose what jumps out to me in that scenario is that i lose the ability to tell if my process is really running yet using just upstart's "status"06:30
bradleyayerswhich i suppose is fine, if you're thinking in a multi box setup06:30
SpamapSwell no, just poll for a very long time for the things you need, you shouldn't be respawning much :)06:30
SpamapSbradleyayers: the fine grained eventing is for early-boot plumbing.06:31
bradleyayersright06:31
bradleyayersso i've just been taking the wrong approach06:32
SpamapSwe all have06:32
SpamapSbecause it was easy to "get it right" when it was all in a single thread06:32
bradleyayersyeah06:32
SpamapSand you had 5 servers06:32
SpamapSnow you have parallelism everywhere, and 100+ servers06:32
bradleyayersya06:33
SpamapSthe scenario that makes me wonder is the massive powerfail06:33
bradleyayershah, yeah06:33
SpamapSI remember the livejournal outtage, how they had to bring things up carefully06:33
bradleyayersbut really you shouldn't need to 'bring things up carefully' right?06:33
bradleyayersi guess if you have a bunch of things all trying to become master06:34
SpamapSdbs -> cache servers -> storage servers -> queue workers -> app servers -> proxies06:34
SpamapSleader election *should* always be autoatic06:34
bradleyayersbut if everything just sits around waiting for their dependencies to be alive, why would you need to be careful about what order you start things up?06:34
SpamapSwell you wouldn't06:35
SpamapSbut thats now how things are put together all the time06:35
SpamapSits getting better though06:35
bradleyayersyeah06:35
SpamapSEC2 helps with that.. since crap goes down so often. :)06:35
bradleyayerswell i greatly appreciate the advice06:35
SpamapSmore people are used to writing resilient services06:35
SpamapSbradleyayers: and I appreciate the kick in the pants to document wait-for-state better06:36
bradleyayersi believe i've been nagging for a long time :P06:36
bradleyayerswhen you document it, you should put a flow diagram in :D06:37
SpamapSand a pony06:37
SpamapSeverybody wants a pony06:37
bradleyayersperhaps as the background06:37
bradleyayersthe colour scheme of the diagram should match the pony also06:38
SpamapSif I ever own a horse06:45
SpamapSI will name it Idempotent06:45
SpamapScause I want him to run the same way, over and over06:46
bradleyayershaha06:48
bradleyayersi'm not sure the wit would be appreciated by many :P06:49

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