/srv/irclogs.ubuntu.com/2011/05/06/#ubuntu-ensemble.txt

_mup_ensemble/config-set r218 committed by bcsaller@gmail.com00:07
_mup_options validation00:07
_mup_ensemble/expose-provisioning r258 committed by jim.baker@canonical.com00:58
_mup_Partial fix to remove more state in the provisioning agent in favor of just reading it from ZK00:58
_mup_ensemble/config-set r219 committed by bcsaller@gmail.com02:16
_mup_support optional config files02:16
=== Daviey_ is now known as Daviey
_mup_ensemble/expose-provisioning r259 committed by jim.baker@canonical.com03:30
_mup_Handle scenario where services or service units disappear from topology while applying port changes03:30
hazmatjimbaker, i'm working on cleaning up the watches on trunk now, fwiw, the best guideline rule for poke_zk seems to be if you know a watch is being established in the background05:00
jimbakerhazmat, i was just playing with that05:01
jimbakerit seemed like poke_zk + sleep was effective05:01
_mup_ensemble/expose-provisioning r260 committed by jim.baker@canonical.com05:02
_mup_Do not keep port policy in memory, read it from ZK every time05:02
hazmatjimbaker, basically you can use one poke per other zk activity you know is happening in the background05:04
jimbakerhazmat, makes sense05:05
hazmatie,  a one per client get/get_children, or exists, etc.05:06
_mup_ensemble/config-set r220 committed by bcsaller@gmail.com05:09
_mup_add get_serialization_data05:09
_mup_ensemble/watching-godot-redux r227 committed by kapil.thangavelu@canonical.com05:10
_mup_all the watch state protocol apis now wait on their initial callback before returning.05:10
_mup_ensemble/watching-godot-redux r228 committed by kapil.thangavelu@canonical.com05:14
_mup_apply the wait on initial invocation behavior to the debug log watch05:14
_mup_ensemble/watching-godot-redux r229 committed by kapil.thangavelu@canonical.com05:40
_mup_make lifecycle start fire after initial watch callbacks05:40
_mup_ensemble/watching-godot-redux r230 committed by kapil.thangavelu@canonical.com05:43
_mup_excise any magic waiting for lifecycle background activity05:43
_mup_ensemble/config-set r221 committed by bcsaller@gmail.com05:45
_mup_ConfigOptions available off formula directory/bundle05:45
_mup_ensemble/watching-godot-redux r231 committed by kapil.thangavelu@canonical.com05:51
_mup_excise extraneous sleeps from lifecycle tests.05:51
_mup_ensemble/watching-godot-redux r232 committed by kapil.thangavelu@canonical.com06:03
_mup_fix the test to account for valid sequence variation across multiple join events/06:03
_mup_ensemble/watching-godot-redux r233 committed by kapil.thangavelu@canonical.com06:08
_mup_excise the last sleep from the workflow tests06:08
_mup_ensemble/watching-godot-redux r234 committed by kapil.thangavelu@canonical.com06:13
_mup_excise last extraneous sleep from lifecycle tests.06:13
_mup_ensemble/config-set r222 committed by bcsaller@gmail.com07:16
_mup_ConfigOptions.load can also take a dict as source data allowing easier initialization in FormulaState07:16
_mup_ensemble/config-set r223 committed by bcsaller@gmail.com10:38
_mup_persistent watch on config state10:38
_mup_ensemble/config-set r224 committed by bcsaller@gmail.com12:14
_mup_typo12:14
_mup_ensemble/trunk-2 r222 committed by bcsaller@gmail.com12:15
_mup_merge trunk12:15
hazmatg'morning14:13
niemeyerhazmat: yo!14:16
hazmatniemeyer, fixed most of the watches last night.. feels good to  remove like a 50 sleeps and artificial stops14:17
niemeyerhazmat: Wow, seriously?14:34
hazmatniemeyer, indeed14:34
hazmatits slow going though.. have to run about a hundred iterations per test to verify14:34
niemeyerhazmat: So most of that crap was actually bound to the initial invocation derailing the deferred chain, rather than real background activity?14:34
hazmatniemeyer, yup14:34
niemeyerAw14:35
hazmatniemeyer, some are for legitimate background activity14:35
hazmatlike the watch firing on state change14:35
niemeyerRight14:35
hazmathmm14:55
hazmatniemeyer, there's an interesting new sequencing behavior with the new hook semantics.. re ordering.. currently we don't allow upgrades unless we're in a running state, if an upgrade flag is set when the unit is not running, we'll end up ignoring it, it looks like we need to check it again after we're in the running state.15:39
hazmatnot really about sequencing, just that made it more apparent15:40
niemeyerhazmat: Ah, oops15:40
niemeyerhazmat: But won't the upgrade fail?15:41
hazmatniemeyer, the upgrade won't happen it exits early.. but even though we might then have an upgrade flag set, we won't have another watch change triggering the upgrade behavior again when we're in the started state15:42
hazmatie. the unit would eventually be running with an upgrade flag set15:42
hazmatcurrently we clear the flag if we're not in the running state15:45
niemeyerhazmat: I don't think I get it still.. if we disallow the upgrade flag from being set when the unit is not running, how can the upgrade flag be set when the unit is not running?15:45
hazmatbut its not clear that's the right behavior15:45
hazmatniemeyer, good point.. i was just considering from the agent side, where really it should be prepared for the unit to be in any state15:45
niemeyerhazmat: Admittedly, there's a race condition there, though15:46
niemeyerhazmat: Between checking the state and setting the flag15:46
hazmatniemeyer, and the flag being acted upon by the agent15:46
hazmatwhich is why the agent checks separately15:46
hazmati'll go back to clearing it, its probably the only sane thing to do, and the user can request an upgrade again15:47
hazmatin future with protocol abstractions  we could introduce other things to enable the flag persisting tiill a running state15:47
niemeyerhazmat: Hmm.. I don't think there's a race about that15:48
hazmatniemeyer,upgrade flag is set, unrelated hook fails, unit needs resolved15:48
niemeyerhazmat: Or maybe I don't see what you mean15:48
niemeyerhazmat: Ah, ok.. yes15:48
niemeyerWill get some lunch.. biab15:52
_mup_ensemble/watching-godot-redux r235 committed by kapil.thangavelu@canonical.com15:59
_mup_process upgrade in the correct sequence during unit lifecycle startup15:59
_mup_ensemble/watching-godot-redux r236 committed by kapil.thangavelu@canonical.com16:00
_mup_cleanup pep8 violations from trunk16:00
_mup_ensemble/watching-godot-redux r237 committed by kapil.thangavelu@canonical.com16:12
_mup_reintroduce some sleeps that where part of error checking (giving a chance for an error to occur).16:12
hazmathmm.. changing the topology watches breaks a lot of test assumptions16:19
_mup_ensemble/watching-godot-redux r238 committed by kapil.thangavelu@canonical.com16:39
_mup_update machine manager watch machine states to wait till current state is processed.16:39
_mup_ensemble/watching-godot-redux r239 committed by kapil.thangavelu@canonical.com16:47
_mup_test confirming environment watch processes initial environment as part of watch creation method.16:47
niemeyerhazmat: You mean with the fixes for them to not go off alone?16:48
hazmatniemeyer, econtext16:48
niemeyerhazmat: Re. your previous message above16:48
hazmatniemeyer, i'm also implementing this for the topology watches, some of them are already structured so they require a change16:48
hazmatbefore they fire the callback16:48
hazmati'm just writing tests that in verify in the same way as the other watches, the current state has been processed before the watch method is over.16:49
hazmatoh.. i was wrong about breaking assumptions16:49
hazmattheir fine.. i had an unrelated issue16:50
niemeyerAh, ok16:50
_mup_ensemble/watching-godot-redux r240 committed by kapil.thangavelu@canonical.com16:52
_mup_fix pep8 violations from trunk16:52
_mup_ensemble/watching-godot-redux r241 committed by kapil.thangavelu@canonical.com16:58
_mup_test current state processing test for machine.watch_service_units16:58
_mup_ensemble/watching-godot-redux r242 committed by kapil.thangavelu@canonical.com17:03
_mup_test verifying current state processing of service.watch_relation_states17:03
niemeyer"preferred_email_address_link":"https://api.launchpad.net/1.0/~user/+email/the@email.net"17:03
niemeyerInteresting way to present emails in the API17:03
niemeyerObject: <canonical.launchpad.systemhomes.WebServiceApplication object at 0x7adc110>, name: u'+me'17:07
niemeyerInteresting data to return in the body of an API request too :)17:08
_mup_ensemble/watching-godot-redux r243 committed by kapil.thangavelu@canonical.com17:19
_mup_test for watch upgrade proceses current state17:19
jimbakerhazmat, so for the provisioning agent test, i added superpoke, which by default, pokes zk 10 times, sleeps 0.1s, pokes zk 10 more times17:23
hazmatjimbaker, ugh.17:23
jimbakerthere's probably a more minimal version as you illustrated w/ your godot-redux17:23
jimbakerbut it works well now - i'm getting a reliable looped test at last17:24
hazmatjimbaker, in the current godot-redux every sleep is documented with why its there.17:24
hazmatjimbaker, cool17:24
jimbakerhazmat, it certainly sounds like the right way to do it, although it's not clear to me how this can be done w/o being whitebox about knowing what the watch setup is, which could be quite complex in the case i have17:25
jimbakersince the watches are definitely timing dependent17:25
jimbakerto know more, i have to look at the logs more closely to see what ordering they have17:25
hazmatjimbaker, i'll have to take a look17:26
hazmati'll search for the superpokes17:26
hazmatbut not this week17:26
hazmatit will be nice to have the existing watches and tests on trunk fixed17:26
jimbakerhazmat, yeah, i think it's ok to start with superpoke, then make it better17:26
hazmatthere's alot of watch apis though17:26
jimbakerthe other thing i needed to do was to stop InternalTopologyErrors from leaking through17:27
hazmatjimbaker, indeed, you have a good understanding now though of what the sleeps are for?17:27
jimbakerright now, i'm doing that in the provisioning agent itself, but it looks like they are confined in two methods, so we can push back into the topology itself17:28
hazmathmmm.. internaltopologyerrors? shouldn't really ever be seen17:28
jimbakerhazmat, i think i have a good working idea17:28
hazmatjimbaker, cool17:28
jimbakerseen here in http://pastebin.ubuntu.com/604149/, note the "badness for wordpress" log line (obviously i don't expect it to be there for any length of time)17:29
jimbakerhazmat, that probably occurs about 20% of the time17:32
jimbakermuch rarer (i have now run this looped 140+ times) is ServiceUnitState.get_assigned_machine_id surfacing InternalTopologyError17:33
_mup_ensemble/watching-godot-redux r244 committed by kapil.thangavelu@canonical.com17:38
_mup_current state processing tests for watch debug hook, watch resolved, and watch relation resolved.17:38
_mup_ensemble/expose-provisioning r261 committed by jim.baker@canonical.com17:47
_mup_Use 'superpoke' in port provisioning tests, which now loop 200+ times17:47
_mup_ensemble/watching-godot-redux r245 committed by kapil.thangavelu@canonical.com17:48
_mup_unit agent test resolved while stoppped, switch out the sleep for a poke, change the wait condition to a state change from a hook execution17:48
niemeyer<jimbaker> hazmat, so for the provisioning agent test, i added superpoke, which by default, pokes zk 10 times, sleeps 0.1s, pokes zk 10 more times17:53
niemeyerDouble ugh :)17:53
niemeyer... and it only works if you jump three times on the left foot, and two times on the right one, in that order!17:54
_mup_ensemble/watching-godot-redux r246 committed by kapil.thangavelu@canonical.com18:00
_mup_cleanup the unit agent resolved watch tests.18:00
=== deryck is now known as deryck[lunch]
jimbakerniemeyer, i share your dislike... the name superpoke only helps suggest that it is not desirable18:01
niemeyerjimbaker: It's not just a dislike.. we can't have something like this.18:02
jimbakerniemeyer, exactly18:02
jimbakerso we need to fix it18:02
jimbakerone step at a time... possibly with a jump three times, i guess18:02
niemeyerjimbaker: Yeah.. let's start by removing it :-)18:02
jimbakerniemeyer, don't worry, i won't suggest a proposal until it's gone18:03
hazmatjimbaker, when your sleeping that long, its generally means you need some sort of observation api so you can sync on a known point18:03
niemeyerjimbaker: It makes as much sense to be repeatedly poking and sleeping as it makes sense to press an elevator button repeatedly18:03
hazmatjimbaker, like wait_on_state or wait_on_hook18:03
jimbakerhazmat, niemeyer agreed, agreed :)18:03
jimbakerniemeyer, the more interesting thing is that code only looks at ZK for its state18:05
jimbakerin doing so, i have apparently found at least two bugs in our state API18:05
niemeyerjimbaker: Please submit fixes for these bugs in an isolated branch18:05
jimbakerniemeyer, that's my intent :)18:06
niemeyerjimbaker: Thanks18:06
_mup_Bug #778628 was filed: Watches should return only after processing current state <Ensemble:New for hazmat> < https://launchpad.net/bugs/778628 >18:07
jimbakeri will also need an added method. right now, it's part of ServiceStateManager in my branch, get_service_units_for_machine(self, machine_state)18:08
jimbakeri put it there so as to avoid circular import dependencies, and there seems to be some precedence for doing that in ensemble.state.service18:08
hazmatniemeyer, watch fix branch in review now fwiw18:09
niemeyerjimbaker: It should be machine_state.get_service_unit_states()18:09
jimbakerif that makes sense, i will also suggest a separate branch for that too18:09
jimbakerniemeyer, that would be ideal18:09
niemeyerjimbaker: So let's do it :-018:09
niemeyer:-)18:09
jimbakerniemeyer, so what do we do to avoid circular imports?18:09
niemeyerjimbaker: Hmm.. the usual thing we do with Python18:09
jimbakerthen i can realize that ideal18:09
hazmatthat's odd lp says the diff is 1300 lines..18:10
hazmatlp is confused18:10
jimbakerniemeyer, please elaborate your thought here, because python gives us some tools, but not a clear path18:10
niemeyerjimbaker: How do you usually handle circular imports with Python?18:11
jimbakerniemeyer, i probably would defer the import18:11
niemeyerjimbaker: Bingo18:12
niemeyerjimbaker: Simply import it within the function18:12
niemeyers/function/method18:12
hazmatthere are a few places that do deferred imports in appropriate function in the code base.. jim i'm curious which example you though was precedence of moving the function?18:12
jimbakerhazmat, you ask me on the spot18:13
jimbakerthere does seem to be somewhat more code in ensemble.state.service that knows about our types of state18:13
hazmatjimbaker, no worries, i've got some extra time now, if you could point me to one of branches using superpoke.18:13
jimbakerhazmat, sure you can see the current ugliness (don't let niemeyer look at, he will gag - lp:~jimbaker/ensemble/expose-provisioning)18:14
hazmatjimbaker, ;-) 18:15
jimbakeri on the other hand celebrate a modicum of progress18:15
hazmatjimbaker, this needs an observer api on the agent, probably best to pull it from the agent into a separate object (proto protocol, ala formula upgrade)18:26
hazmatjimbaker, we need to be able to know as an observer when the ports have changed18:26
hazmatthere's half-dozen sleep calls all intermixed in these tests, all waiting for background watch activity18:26
hazmatthere's nothing wrong with them except the need for better sync points18:27
hazmatjimbaker, more concretely adding  a set_port_observer,  with a callback that's invoked when the ports are modified would allow for solving this18:28
hazmatif you ever find yourself using alot of sleeps, this is the solution18:29
niemeyerDude!  This thing is starting to work for real18:30
niemeyerSorry.. this thing == launchpad integration, for those watching ;-)18:31
hazmatniemeyer, can you sniff all the emails of launchpad members yet?18:31
niemeyerhazmat: Yep, almost there!18:31
niemeyerhazmat: Hmmm.. it should actually work already18:31
niemeyerhazmat: Will just implement some handy methods and paste an example18:32
hazmatjimbaker, out of curiosity do you use emacs?18:43
jimbaker hazmat, yes i do emacs18:44
jimbakerbut more and more naively every year18:44
hazmatjimbaker, me too re naively ;-),  but flymake mode with pep8 integration is da bomb18:45
jimbakeri used to know my way around emacs lisp, then just dot files, for customization18:45
jimbakernow i just do the out-of-the-box experience18:45
hazmatjimbaker, so do my comments above make sense as way out of superpoke ?18:45
jimbakerhazmat, sorry, i just saw that line...18:46
jimbakerhazmat, that makes perfect sense as an integration point18:46
jimbakerso basically one place to sync on18:47
niemeyerhazmat: Yeah, I'm happy you've shown me how much flymake helps18:48
niemeyerhazmat: Probably one of the best productivity gains I got with Python in the last year18:48
jimbakerhazmat, the good thing about budapest is i will get the live demo - i know you pointed me to a dot file before for this setup, but i managed to lose the link along the way18:48
hazmathttp://kapilt.com/files/emacs.tgz18:49
hazmat;-)18:49
hazmatsounds good18:49
jimbakerbefore i started comprehensively logging irc, using bouncers, etc  18:50
jimbakerhazmat, thanks, i will give it a whirl18:50
hazmatsetting up the irc proxy was probably one of my best gains of the last year18:50
jimbakerhazmat, so i think we need to set up an observer api like you suggest on each of the state variables that is being monitored18:51
jimbakereg, watched_services18:51
jimbakerbecause some of the tests don't actually look at the ports that end up getting setup, they just ensure the watch cascade happens properly18:52
jimbakerhazmat, re irc proxies, yeah i saw my fellow canonical employees doing some cool stuff18:53
jimbakeractually one goal for me at budapest is to learn effective byobu18:53
=== deryck[lunch] is now known as deryck
_mup_ensemble/config-set r226 committed by bcsaller@gmail.com19:42
_mup_fix ensemble set validation with tests19:42
_mup_additional testing19:42
_mup_ensemble/config-set r227 committed by bcsaller@gmail.com19:45
_mup_test for missing/bad service in ensemble set19:45
_mup_ensemble/config-set r228 committed by bcsaller@gmail.com19:48
_mup_checkin missing config.yaml19:48
_mup_Bug #778685 was filed: ensemble must provide a `set` command for config options <Ensemble:New for bcsaller> < https://launchpad.net/bugs/778685 >19:50
niemeyerWe have to sit down at UDS and talk through some of the repository stuff19:58
jimbakercool, my laptop fits in its new protective neoprene sleeve in my bike's pannier bag20:28
niemeyerjimbaker: You're brave :-)20:59
hazmatniemeyer, sounds good, we also need to discuss monitoring22:02
_mup_ensemble/auto-dependency-resolution r219 committed by kapil.thangavelu@canonical.com23:04
_mup_new test-api base class, and resolver tests based on.23:04
niemeyerHmmm23:19
niemeyerFood needed23:19
_mup_ensemble/auto-dependency-resolution r220 committed by kapil.thangavelu@canonical.com23:22
_mup_resolver works to resolve dependencies from formula repos and environment.23:22
hazmatit lives23:22
hazmatniemeyer, to answer the question from yesterday.. yes it does work ;-)23:22
hazmatthe weather in budapest looks great23:23

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