[00:07] <_mup_> ensemble/config-set r218 committed by bcsaller@gmail.com [00:07] <_mup_> options validation [00:58] <_mup_> ensemble/expose-provisioning r258 committed by jim.baker@canonical.com [00:58] <_mup_> Partial fix to remove more state in the provisioning agent in favor of just reading it from ZK [02:16] <_mup_> ensemble/config-set r219 committed by bcsaller@gmail.com [02:16] <_mup_> support optional config files === Daviey_ is now known as Daviey [03:30] <_mup_> ensemble/expose-provisioning r259 committed by jim.baker@canonical.com [03:30] <_mup_> Handle scenario where services or service units disappear from topology while applying port changes [05:00] jimbaker, 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 background [05:01] hazmat, i was just playing with that [05:01] it seemed like poke_zk + sleep was effective [05:02] <_mup_> ensemble/expose-provisioning r260 committed by jim.baker@canonical.com [05:02] <_mup_> Do not keep port policy in memory, read it from ZK every time [05:04] jimbaker, basically you can use one poke per other zk activity you know is happening in the background [05:05] hazmat, makes sense [05:06] ie, a one per client get/get_children, or exists, etc. [05:09] <_mup_> ensemble/config-set r220 committed by bcsaller@gmail.com [05:09] <_mup_> add get_serialization_data [05:10] <_mup_> ensemble/watching-godot-redux r227 committed by kapil.thangavelu@canonical.com [05:10] <_mup_> all the watch state protocol apis now wait on their initial callback before returning. [05:14] <_mup_> ensemble/watching-godot-redux r228 committed by kapil.thangavelu@canonical.com [05:14] <_mup_> apply the wait on initial invocation behavior to the debug log watch [05:40] <_mup_> ensemble/watching-godot-redux r229 committed by kapil.thangavelu@canonical.com [05:40] <_mup_> make lifecycle start fire after initial watch callbacks [05:43] <_mup_> ensemble/watching-godot-redux r230 committed by kapil.thangavelu@canonical.com [05:43] <_mup_> excise any magic waiting for lifecycle background activity [05:45] <_mup_> ensemble/config-set r221 committed by bcsaller@gmail.com [05:45] <_mup_> ConfigOptions available off formula directory/bundle [05:51] <_mup_> ensemble/watching-godot-redux r231 committed by kapil.thangavelu@canonical.com [05:51] <_mup_> excise extraneous sleeps from lifecycle tests. [06:03] <_mup_> ensemble/watching-godot-redux r232 committed by kapil.thangavelu@canonical.com [06:03] <_mup_> fix the test to account for valid sequence variation across multiple join events/ [06:08] <_mup_> ensemble/watching-godot-redux r233 committed by kapil.thangavelu@canonical.com [06:08] <_mup_> excise the last sleep from the workflow tests [06:13] <_mup_> ensemble/watching-godot-redux r234 committed by kapil.thangavelu@canonical.com [06:13] <_mup_> excise last extraneous sleep from lifecycle tests. [07:16] <_mup_> ensemble/config-set r222 committed by bcsaller@gmail.com [07:16] <_mup_> ConfigOptions.load can also take a dict as source data allowing easier initialization in FormulaState [10:38] <_mup_> ensemble/config-set r223 committed by bcsaller@gmail.com [10:38] <_mup_> persistent watch on config state [12:14] <_mup_> ensemble/config-set r224 committed by bcsaller@gmail.com [12:14] <_mup_> typo [12:15] <_mup_> ensemble/trunk-2 r222 committed by bcsaller@gmail.com [12:15] <_mup_> merge trunk [14:13] g'morning [14:16] hazmat: yo! [14:17] niemeyer, fixed most of the watches last night.. feels good to remove like a 50 sleeps and artificial stops [14:34] hazmat: Wow, seriously? [14:34] niemeyer, indeed [14:34] its slow going though.. have to run about a hundred iterations per test to verify [14:34] hazmat: So most of that crap was actually bound to the initial invocation derailing the deferred chain, rather than real background activity? [14:34] niemeyer, yup [14:35] Aw [14:35] niemeyer, some are for legitimate background activity [14:35] like the watch firing on state change [14:35] Right [14:55] hmm [15:39] niemeyer, 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:40] not really about sequencing, just that made it more apparent [15:40] hazmat: Ah, oops [15:41] hazmat: But won't the upgrade fail? [15:42] niemeyer, 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 state [15:42] ie. the unit would eventually be running with an upgrade flag set [15:45] currently we clear the flag if we're not in the running state [15:45] hazmat: 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] but its not clear that's the right behavior [15:45] niemeyer, good point.. i was just considering from the agent side, where really it should be prepared for the unit to be in any state [15:46] hazmat: Admittedly, there's a race condition there, though [15:46] hazmat: Between checking the state and setting the flag [15:46] niemeyer, and the flag being acted upon by the agent [15:46] which is why the agent checks separately [15:47] i'll go back to clearing it, its probably the only sane thing to do, and the user can request an upgrade again [15:47] in future with protocol abstractions we could introduce other things to enable the flag persisting tiill a running state [15:48] hazmat: Hmm.. I don't think there's a race about that [15:48] niemeyer,upgrade flag is set, unrelated hook fails, unit needs resolved [15:48] hazmat: Or maybe I don't see what you mean [15:48] hazmat: Ah, ok.. yes [15:52] Will get some lunch.. biab [15:59] <_mup_> ensemble/watching-godot-redux r235 committed by kapil.thangavelu@canonical.com [15:59] <_mup_> process upgrade in the correct sequence during unit lifecycle startup [16:00] <_mup_> ensemble/watching-godot-redux r236 committed by kapil.thangavelu@canonical.com [16:00] <_mup_> cleanup pep8 violations from trunk [16:12] <_mup_> ensemble/watching-godot-redux r237 committed by kapil.thangavelu@canonical.com [16:12] <_mup_> reintroduce some sleeps that where part of error checking (giving a chance for an error to occur). [16:19] hmm.. changing the topology watches breaks a lot of test assumptions [16:39] <_mup_> ensemble/watching-godot-redux r238 committed by kapil.thangavelu@canonical.com [16:39] <_mup_> update machine manager watch machine states to wait till current state is processed. [16:47] <_mup_> ensemble/watching-godot-redux r239 committed by kapil.thangavelu@canonical.com [16:47] <_mup_> test confirming environment watch processes initial environment as part of watch creation method. [16:48] hazmat: You mean with the fixes for them to not go off alone? [16:48] niemeyer, econtext [16:48] hazmat: Re. your previous message above [16:48] niemeyer, i'm also implementing this for the topology watches, some of them are already structured so they require a change [16:48] before they fire the callback [16:49] i'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] oh.. i was wrong about breaking assumptions [16:50] their fine.. i had an unrelated issue [16:50] Ah, ok [16:52] <_mup_> ensemble/watching-godot-redux r240 committed by kapil.thangavelu@canonical.com [16:52] <_mup_> fix pep8 violations from trunk [16:58] <_mup_> ensemble/watching-godot-redux r241 committed by kapil.thangavelu@canonical.com [16:58] <_mup_> test current state processing test for machine.watch_service_units [17:03] <_mup_> ensemble/watching-godot-redux r242 committed by kapil.thangavelu@canonical.com [17:03] <_mup_> test verifying current state processing of service.watch_relation_states [17:03] "preferred_email_address_link":"https://api.launchpad.net/1.0/~user/+email/the@email.net" [17:03] Interesting way to present emails in the API [17:07] Object: , name: u'+me' [17:08] Interesting data to return in the body of an API request too :) [17:19] <_mup_> ensemble/watching-godot-redux r243 committed by kapil.thangavelu@canonical.com [17:19] <_mup_> test for watch upgrade proceses current state [17:23] hazmat, so for the provisioning agent test, i added superpoke, which by default, pokes zk 10 times, sleeps 0.1s, pokes zk 10 more times [17:23] jimbaker, ugh. [17:23] there's probably a more minimal version as you illustrated w/ your godot-redux [17:24] but it works well now - i'm getting a reliable looped test at last [17:24] jimbaker, in the current godot-redux every sleep is documented with why its there. [17:24] jimbaker, cool [17:25] hazmat, 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 have [17:25] since the watches are definitely timing dependent [17:25] to know more, i have to look at the logs more closely to see what ordering they have [17:26] jimbaker, i'll have to take a look [17:26] i'll search for the superpokes [17:26] but not this week [17:26] it will be nice to have the existing watches and tests on trunk fixed [17:26] hazmat, yeah, i think it's ok to start with superpoke, then make it better [17:26] there's alot of watch apis though [17:27] the other thing i needed to do was to stop InternalTopologyErrors from leaking through [17:27] jimbaker, indeed, you have a good understanding now though of what the sleeps are for? [17:28] right 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 itself [17:28] hmmm.. internaltopologyerrors? shouldn't really ever be seen [17:28] hazmat, i think i have a good working idea [17:28] jimbaker, cool [17:29] seen 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:32] hazmat, that probably occurs about 20% of the time [17:33] much rarer (i have now run this looped 140+ times) is ServiceUnitState.get_assigned_machine_id surfacing InternalTopologyError [17:38] <_mup_> ensemble/watching-godot-redux r244 committed by kapil.thangavelu@canonical.com [17:38] <_mup_> current state processing tests for watch debug hook, watch resolved, and watch relation resolved. [17:47] <_mup_> ensemble/expose-provisioning r261 committed by jim.baker@canonical.com [17:47] <_mup_> Use 'superpoke' in port provisioning tests, which now loop 200+ times [17:48] <_mup_> ensemble/watching-godot-redux r245 committed by kapil.thangavelu@canonical.com [17: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 execution [17:53] hazmat, so for the provisioning agent test, i added superpoke, which by default, pokes zk 10 times, sleeps 0.1s, pokes zk 10 more times [17:53] Double ugh :) [17:54] ... and it only works if you jump three times on the left foot, and two times on the right one, in that order! [18:00] <_mup_> ensemble/watching-godot-redux r246 committed by kapil.thangavelu@canonical.com [18:00] <_mup_> cleanup the unit agent resolved watch tests. === deryck is now known as deryck[lunch] [18:01] niemeyer, i share your dislike... the name superpoke only helps suggest that it is not desirable [18:02] jimbaker: It's not just a dislike.. we can't have something like this. [18:02] niemeyer, exactly [18:02] so we need to fix it [18:02] one step at a time... possibly with a jump three times, i guess [18:02] jimbaker: Yeah.. let's start by removing it :-) [18:03] niemeyer, don't worry, i won't suggest a proposal until it's gone [18:03] jimbaker, when your sleeping that long, its generally means you need some sort of observation api so you can sync on a known point [18:03] jimbaker: It makes as much sense to be repeatedly poking and sleeping as it makes sense to press an elevator button repeatedly [18:03] jimbaker, like wait_on_state or wait_on_hook [18:03] hazmat, niemeyer agreed, agreed :) [18:05] niemeyer, the more interesting thing is that code only looks at ZK for its state [18:05] in doing so, i have apparently found at least two bugs in our state API [18:05] jimbaker: Please submit fixes for these bugs in an isolated branch [18:06] niemeyer, that's my intent :) [18:06] jimbaker: Thanks [18:07] <_mup_> Bug #778628 was filed: Watches should return only after processing current state < https://launchpad.net/bugs/778628 > [18:08] i 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] i put it there so as to avoid circular import dependencies, and there seems to be some precedence for doing that in ensemble.state.service [18:09] niemeyer, watch fix branch in review now fwiw [18:09] jimbaker: It should be machine_state.get_service_unit_states() [18:09] if that makes sense, i will also suggest a separate branch for that too [18:09] niemeyer, that would be ideal [18:09] jimbaker: So let's do it :-0 [18:09] :-) [18:09] niemeyer, so what do we do to avoid circular imports? [18:09] jimbaker: Hmm.. the usual thing we do with Python [18:09] then i can realize that ideal [18:10] that's odd lp says the diff is 1300 lines.. [18:10] lp is confused [18:10] niemeyer, please elaborate your thought here, because python gives us some tools, but not a clear path [18:11] jimbaker: How do you usually handle circular imports with Python? [18:11] niemeyer, i probably would defer the import [18:12] jimbaker: Bingo [18:12] jimbaker: Simply import it within the function [18:12] s/function/method [18:12] there 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:13] hazmat, you ask me on the spot [18:13] there does seem to be somewhat more code in ensemble.state.service that knows about our types of state [18:13] jimbaker, no worries, i've got some extra time now, if you could point me to one of branches using superpoke. [18:14] hazmat, sure you can see the current ugliness (don't let niemeyer look at, he will gag - lp:~jimbaker/ensemble/expose-provisioning) [18:15] jimbaker, ;-) [18:15] i on the other hand celebrate a modicum of progress [18:26] jimbaker, 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] jimbaker, we need to be able to know as an observer when the ports have changed [18:26] there's half-dozen sleep calls all intermixed in these tests, all waiting for background watch activity [18:27] there's nothing wrong with them except the need for better sync points [18:28] jimbaker, more concretely adding a set_port_observer, with a callback that's invoked when the ports are modified would allow for solving this [18:29] if you ever find yourself using alot of sleeps, this is the solution [18:30] Dude! This thing is starting to work for real [18:31] Sorry.. this thing == launchpad integration, for those watching ;-) [18:31] niemeyer, can you sniff all the emails of launchpad members yet? [18:31] hazmat: Yep, almost there! [18:31] hazmat: Hmmm.. it should actually work already [18:32] hazmat: Will just implement some handy methods and paste an example [18:43] jimbaker, out of curiosity do you use emacs? [18:44] hazmat, yes i do emacs [18:44] but more and more naively every year [18:45] jimbaker, me too re naively ;-), but flymake mode with pep8 integration is da bomb [18:45] i used to know my way around emacs lisp, then just dot files, for customization [18:45] now i just do the out-of-the-box experience [18:45] jimbaker, so do my comments above make sense as way out of superpoke ? [18:46] hazmat, sorry, i just saw that line... [18:46] hazmat, that makes perfect sense as an integration point [18:47] so basically one place to sync on [18:48] hazmat: Yeah, I'm happy you've shown me how much flymake helps [18:48] hazmat: Probably one of the best productivity gains I got with Python in the last year [18:48] hazmat, 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 way [18:49] http://kapilt.com/files/emacs.tgz [18:49] ;-) [18:49] sounds good [18:50] before i started comprehensively logging irc, using bouncers, etc [18:50] hazmat, thanks, i will give it a whirl [18:50] setting up the irc proxy was probably one of my best gains of the last year [18:51] hazmat, so i think we need to set up an observer api like you suggest on each of the state variables that is being monitored [18:51] eg, watched_services [18:52] because some of the tests don't actually look at the ports that end up getting setup, they just ensure the watch cascade happens properly [18:53] hazmat, re irc proxies, yeah i saw my fellow canonical employees doing some cool stuff [18:53] actually one goal for me at budapest is to learn effective byobu === deryck[lunch] is now known as deryck [19:42] <_mup_> ensemble/config-set r226 committed by bcsaller@gmail.com [19:42] <_mup_> fix ensemble set validation with tests [19:42] <_mup_> additional testing [19:45] <_mup_> ensemble/config-set r227 committed by bcsaller@gmail.com [19:45] <_mup_> test for missing/bad service in ensemble set [19:48] <_mup_> ensemble/config-set r228 committed by bcsaller@gmail.com [19:48] <_mup_> checkin missing config.yaml [19:50] <_mup_> Bug #778685 was filed: ensemble must provide a `set` command for config options < https://launchpad.net/bugs/778685 > [19:58] We have to sit down at UDS and talk through some of the repository stuff [20:28] cool, my laptop fits in its new protective neoprene sleeve in my bike's pannier bag [20:59] jimbaker: You're brave :-) [22:02] niemeyer, sounds good, we also need to discuss monitoring [23:04] <_mup_> ensemble/auto-dependency-resolution r219 committed by kapil.thangavelu@canonical.com [23:04] <_mup_> new test-api base class, and resolver tests based on. [23:19] Hmmm [23:19] Food needed [23:22] <_mup_> ensemble/auto-dependency-resolution r220 committed by kapil.thangavelu@canonical.com [23:22] <_mup_> resolver works to resolve dependencies from formula repos and environment. [23:22] it lives [23:22] niemeyer, to answer the question from yesterday.. yes it does work ;-) [23:23] the weather in budapest looks great