/srv/irclogs.ubuntu.com/2011/04/19/#ubuntu-ensemble.txt

_mup_ensemble/new-hook-semantics-5-docs r201 committed by jim.baker@canonical.com00:23
_mup_Addressed review points on formula doc00:23
_mup_ensemble/new-hook-semantics-5-docs r202 committed by jim.baker@canonical.com06:03
_mup_Better intro for formula section06:03
_mup_ensemble/yaml-state-node r192 committed by bcsaller@gmail.com07:23
_mup_read/write version of YAMLState07:23
_mup_ensemble/yaml-state-node r193 committed by bcsaller@gmail.com08:59
_mup_test multiple writes with and w/o reads08:59
_mup_ensemble/config-state-manager r196 committed by bcsaller@gmail.com10:24
_mup_new YAMLState api changes10:24
_mup_ensemble/trunk r199 committed by kapil.thangavelu@canonical.com13:30
_mup_merge state-machine-enhancements [r=niemeyer][f=755062]13:30
_mup_Adds some additional capabilities to the statemachine used for workflows.13:30
_mup_Transition aliases, which allowing grouping and addressing of common13:30
_mup_transitions from different states. It also introduces success transition13:30
_mup_ids that a transition can use to effect an additional transition upon13:30
_mup_success.13:30
niemeyerhazmat: Morning!13:31
TeTeTkim0: hi, my query for the high level overview is primarily motivated by the questions and mis-conceptions I hear from the UEC students, especially when it comes to virtualization vs cloud computing13:31
niemeyerhazmat: Feeling better?13:31
hazmatniemeyer, a bit, more medications to start my day.13:31
niemeyerHey, morning TeTeT, kim013:31
kim0TeTeT: Yeah .. those believing "put your app on the cloud, and it'll scale like google" :)13:31
kim0niemeyer: hazmat TeTeT morning :) o/13:31
TeTeTkim0: think we should address this early on to make sure the scenario for use of ensemble is set right, e.g. expectation management from the start13:32
TeTeThi niemeyer 13:32
TeTeTmorning hazmat 13:32
niemeyerhazmat: Ouch.. Did you have that kind of issue often when you were a non-veg?13:32
TeTeTkim0: that, and 'oh, this isn't like vmware at all'13:32
kim0TeTeT: I agree, Would be awesome if you can start contributing to that too :)13:32
kim0it seems you hear lots of feedback13:32
kim0aw I can understand someone's disappointment comparing uec to vsphere13:33
TeTeTkim0: sure, I'll prepare something. I want to present UEC / ensemble / landscape to our key customer in Germany any time anyway13:33
hazmatniemeyer, indeed i did, bad allergies some seasons. mostly a factor of location afaict13:33
kim0Awesome13:33
niemeyerhazmat: Aw :(13:33
TeTeTkim0: so for that introduction I'd better come up with something written anyway, which we can then recycle for the docs, I hope13:33
kim0Absolutely .. sounds good13:34
niemeyerhazmat: I'll send good energy waves towards you then ;-)13:34
hazmatniemeyer, thanks :-)13:34
kim0oh can you do that 13:35
* kim0 points the antenna13:35
niemeyerkim0: ;-)13:35
kim0I just played with debug-log .. and love it .. except I want to split out text into columns per service unit13:36
kim0anyone has a magic one liner13:36
niemeyerkim0: I can certainly try, at least13:36
kim0if it'll take you more than a couple of mins, I might want to bang my head a bit at it 13:37
kim0niemeyer: ideally .. the line order would be preserved by printing empty lines on columns of service units not executing anything13:37
kim0i.e. looking at the resulting text table .. you'd easily see the order of events triggering13:38
niemeyerkim0: No trivial one-liners that I can think of13:38
* kim0 wonders if he spotted a missing unix kung foo tool13:38
kim0okie .. I'll take a shot then13:39
kim0probably needs some custom python13:39
hazmatkim0, there's also several filtering/inclusion options if you want to isolate a particular13:41
hazmatkim0, do you have an example of what sort of columnization you'd want to see?13:42
kim0hmm yeah .. those would be great too .. but I'm really more into looking at the big picture now .. just need a prettier big picture to look at :)13:42
kim0Yeah sure13:42
kim0cloumn per service uit13:42
kim0unit* like13:42
kim0mysql/0  | wordpress/013:42
kim0joined | --13:42
kim0-- | starting db-relation-changed13:42
kim0something like that I guess would be great13:43
kim0of course should be tab aligned13:43
kim0any way .. I'll try it myself a bit 13:43
kim0guess distributed logs weren't that popular 20 years ago :)13:43
hazmatyeah.. i think thats possible, but possibly we'll end up going very wide. the stdout of the hooks might also interrupt the visual flow13:44
kim0hazmat: yeah, which is another thing13:45
kim0currently we have no way to log at different levels from inside hooks right13:45
hazmatkim0, there is an ensemble-log command available to hooks, but i don't think we currently utilize it, we just capture stdout/stderr of hooks.. at a set log level13:46
kim0ah .. that'd be great 13:46
kim0to use :)13:46
kim0wonder if I should add that to the examples/ formulas13:46
hazmatkim0, sounds good, probably we should also verify its working..13:47
kim0hazmat: if ensemble-log is used today, can we filter to only see its output and not stdout/stderr ?13:47
hazmatkim0, also i've noticed that install, start hooks aren't commonly reported, this is as per the async watches and creator thread on this list.. after we fix that up, we should be able to use logs to show people hook sequencing/interaction for a tutorial.13:48
* hazmat checks on ensemble-log13:48
kim0hazmat: oh that's what I was doing (log sequencing for a tutorial) :) so it's not working now .. I see13:49
hazmatkim0, minus the install/start its correct13:51
hazmatlooking at the log implementation, it looks like its broken to me13:51
kim0yummy13:52
hazmathmm. maybe not.. the test looks correct13:52
kim0good then13:53
kim0can someone exaplin the workflow for editing (or creating new) formula ..13:54
kim0I suppose I deploy, and it breaks horribly13:54
kim0how do I fix, and try again13:54
kim0I hope I dont have to tear down everything for ever changed line13:55
kim0every*13:55
hazmatkim0, looks good actually re ensemble-log13:57
kim0hazmat: great :) thanks13:57
kim0I will start a branch with nice log messages13:57
hazmatkim0, we'll have two commands that can assist with this, ensemble formula-upgrade to replace a formula that's in place, and ensemble resolved to correct for any hook errors.14:17
hazmatkim0, also ensemble debug-hooks for interactive debugging.14:18
kim0yeah I guess debug-hooks helps with what I need .. will play with that too14:19
hazmatkim0, there's one missing piece to debug-hook that's still in review... i've kinda let it slide while i was working on upgrades.14:19
hazmatkim0, re ensemble resolved.. on a hook error, there's a change to an error workflow state within the unit agent (either at a unit or relation level, depending on the hook that fails).14:19
hazmatthe ensemble resolved command will transition back to a known good state, optionally refiring the hook14:19
kim0hmm that sounds magical :)14:20
hazmatformula upgrades are only allowed from a unit that's running (ie. not in an error state).14:20
kim0we'll talk more about it in the meeting I guess14:20
_mup_ensemble/unit-agent-formula-upgrade r233 committed by kapil.thangavelu@canonical.com15:49
_mup_upgrade unit agent tests, remove duplicate test, add some state assertions, clean up doc strings.15:49
niemeyerjimbaker: ping15:50
_mup_ensemble/trunk-merge r185 committed by kapil.thangavelu@canonical.com15:51
_mup_merge trunk15:51
jimbakerniemeyer, hi15:53
niemeyerjimbaker: nm, already providing a new review15:54
jimbakerniemeyer, sounds good, hopefully the reworked intro looks good15:55
niemeyerjimbaker: Actually, can you please roll back that big introduction you added?15:55
niemeyerjimbaker: It doesn't :(15:56
niemeyerjimbaker: There are several issues in there15:56
jimbakerniemeyer, introductions are always tough15:56
niemeyerjimbaker: and I'm afraid we're getting into a review loop15:56
jimbakerso it makes sense that it's problematic15:56
niemeyerjimbaker: Can you please roll that back and address just the specific issues mentioned in the review?15:56
niemeyerjimbaker: So we can merge15:56
niemeyerjimbaker: Feel free to provide another change suggestion later on15:56
jimbakereverytime i look at the overall intro for ensemble, i think how much it needs to be reworked too15:57
niemeyerjimbaker: Some examples:15:57
niemeyerjimbaker: We don't offer total ordering guarantees to the user15:57
niemeyerjimbaker: It's not true that machines and service units have a 1-1 relationship15:57
niemeyerjimbaker: None of the text in the first bullet point is about scalability15:57
jimbakerniemeyer, this makes sense15:57
niemeyerjimbaker: It's not true that every event in Ensemble is translated into a hook execution15:58
niemeyerjimbaker: Etc15:58
niemeyerjimbaker: I'd really like to merge the main changes which this branch was trying to implement at this point, which is fixing the hook documentation15:58
niemeyerjimbaker: Rather than stepping through that unrelated review which was introduced post-reviewing15:58
jimbakerit sounds like i still wasn't careful enough in the descriptions, despite my attempt to do so15:58
jimbakerso definitely needs another branch to make even more precise15:59
jimbakeror precise at all15:59
niemeyerjimbaker: Cool, feel free to push those into another branch15:59
niemeyerjimbaker: It feels like a good direction, but feels bad to have that in mid-review15:59
jimbakerok, i will roll that back. should i simply remove the intro as a whole, just have it start at "this section describes how formulas..."16:00
jimbaker?16:00
niemeyerjimbaker: No, put the version you had previously, and apply the review16:00
niemeyerjimbaker: There were very simple changes to do only16:01
jimbakerniemeyer, ok, i guess i mixed up what you wanted. so you just wanted the one sentence removed, that's it?16:01
niemeyerjimbaker: Yes16:01
_mup_ensemble/unit-agent-formula-upgrade r235 committed by kapil.thangavelu@canonical.com16:06
_mup_doc work, from review comments16:06
hazmatniemeyer, on the formula-upgrade point 9, its seems the right solution then is to bypass the machine formula and just have the unit agent download directly to temp space and extract? there's a few other places where the unit agent pokes outside of its directory (for workflow state state files), and perhaps with on disk hook execution queue in the future.16:08
niemeyerhazmat: Workflow state should really be within its directory too16:09
hazmatniemeyer, i've been trying to segment the unit agent state files from the unit itself, ie outside of the unit. so we're saying we want to have all of these files within the unit?16:10
niemeyerhazmat: Hmm.. will the unit agent run within the unit?16:11
niemeyerhazmat: Once we have containers16:11
hazmatniemeyer, its outside the unit16:11
_mup_ensemble/new-hook-semantics-5-docs r203 committed by jim.baker@canonical.com16:11
_mup_Removed intro for incorporation into a future branch16:11
hazmatniemeyer, i was planning on using lxc-attach to execute hooks within the container16:11
hazmatit gave us additional separation from the container, and so i did the same with agent state files.16:11
niemeyerhazmat: It's not yet clear if that's a good idea or not16:12
niemeyerhazmat: In either case, units shouldn't be poking in the machine agent directory at least16:12
hazmatniemeyer, in that case we either have the machine agent download the formula or bypass the formula cache on the machine16:13
niemeyerhazmat: Yeah, I think it should bypass16:14
niemeyerhazmat: We have no idea about what the machine agent is doing.. it might decide to clear that directory and remove the formula under our feet16:14
hazmatniemeyer, it does make the formula-cache on the machine stale.. but if we can live with that..16:14
niemeyerhazmat: It's as stale as the machine agent decides it to be16:14
hazmattrue16:14
hazmatniemeyer, sounds good16:15
niemeyerhazmat: The point is that this directory is owned by a different process16:15
niemeyerhazmat: Also, what happens if two different units decide to download the same formula at the same time?16:15
niemeyerI'll head to lunch.. Ale is waiting16:15
niemeyerbiab16:15
=== niemeyer is now known as niemeyer_lunch
jimbakerniemeyer_lunch, i have pushed up the change. this removes the new intro and replaces it with the old intro, cutting the first two sentences (didn't seem to make sense to discuss service units at that point)16:21
_mup_ensemble/unit-agent-formula-upgrade r236 committed by kapil.thangavelu@canonical.com16:22
_mup_download formula upgrade to temp directory.16:22
=== deryck is now known as deryck[lunch]
* hazmat lunches16:36
kim0when using ensemble-log inside a formula .. do I log at DEBUG level ?16:47
kim0ensemble-log --log-level DEBUG "foo bar" ?16:48
kim0I hope to be able to get those messages with debug-log *without* getting stdout/stderr from hooks16:48
=== niemeyer_lunch is now known as niemeyer
kim0niemeyer: Trying to add proper ensemble-log messages in the example formula .. any comment on ^17:06
niemeyerkim0: Hmm.. whether it's DEBUG or not depends on the nature of the message17:07
kim0niemeyer: if it's DEBUG, can I still separate it from stdout though17:07
niemeyerkim0: Yes, IIRC ensemble-log doesn't print to stdout17:07
kim0great .. so how do I get debug-log to filter out stdout/stderr17:08
niemeyerkim0: Hmmm.. I see what you want17:09
niemeyerhazmat: Do you recall which log-level stdout/err messages get logged as?17:09
kim0isn't DEBUG the lowest level .. i.e. I hope there's some other way to filter other than by log level?17:12
niemeyerkim0: Yes, it's the lowest/highest level (depending how one looks at it)17:17
niemeyerkim0: I don't think I really understand what is the problem you're facing, though17:17
kim0niemeyer: well I wanted to use ensemble-log from inside formulas, gather those log messages using debug-log, but do not wish them intermingled with stdout/stderr. If you tell me the way to do this, is to log at a loglevel != DEBUG, that's fine I guess .. was just wondering how to do it17:34
niemeyerkim0: Right, that's what you want to do it.. but what's the background on why you want to do it?17:37
niemeyerkim0: There's no reason for a hook to expose stdout/stderr besides for debugging/understanding purposes17:37
_mup_Bug #766241 was filed: Add dummy provider support for port authorization/revocation <Ensemble:New> < https://launchpad.net/bugs/766241 >17:37
=== deryck[lunch] is now known as deryck
hazmatniemeyer, debug17:48
kim0yeah .. it's just that "set -eux" is too noisy!18:02
hazmatkim0, you can also explicit exclude just the hook output 18:08
niemeyerkim0: Hmmm.. we shouldn't be using x I think18:08
kim0hazmat: hmm how would I do htat18:09
kim0niemeyer: yeah I'd think so 18:09
hazmatkim0, ensemble debug-log -x hook-output18:09
kim0hazmat: does that include stderr ?18:09
hazmatkim0, yes that's all hook output18:09
kim0hazmat: oh thanks18:09
hazmatkim0, checkout out some of the other options on debug-log --help18:09
kim0hazmat: help message doesn't really make it clear what "log channels" I can include/exclude18:11
* hazmat nods18:12
hazmatit needs some more examples18:12
hazmatin the help message18:12
hazmatand perhaps at least a partial listing of log channels18:12
jimbakerkim0, set -x is definitely expedient, and it really makes it possible to see what's going on. but if i could just observe the relation settings change in the debug log, that would probably eliminate a lot of debugging statements18:14
kim0jimbaker: yeah, I'm just using ensemble-log at INFO level for now18:16
jimbakerhazmat, i think we should also add the relation settings info to ensemble status too, now that we have states there. we can always provide an options flag for what to show18:16
kim0jimbaker: are you saying, relation setting changes don't go to logs now 18:16
kim0ah yeah18:16
jimbakerkim0, i don't believe they are otherwise observable. could be wrong :)18:17
kim0nah :)18:17
hazmatjimbaker, yeah. it would be nice to have a cli flag to enable that18:17
jimbakerkim0, but clearly the relation settings, along with the specific hooks firing, are the key to understanding what actually happens18:17
hazmatkim0, er.. that should be debug-log -x hook.output18:17
kim0oh ok18:18
kim0hazmat: indeed at least popular channels should be listed on the help message please18:18
kim0do we need a bug for showing relation-settings changes in logs .. or is someone on that18:19
jimbakerkim0, we need a bug for that and in status too i think18:20
jimbaker(so two bugs)18:20
kim0so "ensemble status" shows relation settings for every service unit, right?18:20
jimbakerkim0, it does not yet. but i think it should18:21
kim0yeah, I meant that's how you'd want it .. cool .. filing18:21
jimbakerthe only consideration here is that there security issues18:21
kim0ah passwords and stuff18:21
jimbakerbut i think these be addressed later to mask it out properly. any system auditing always has these issues from what i have seen in the past18:21
kim0hmm ok18:22
jimbakernot showing it in ensemble status is simply doing it by obscurity anyway18:22
jimbakerso the good thing about showing it in ensemble status sooner than later is to keep reminding ourselves of this problem ;)18:23
jimbakerkim0, you might be interested in this intro fragment, http://pastebin.ubuntu.com/596140/ - it's not going into the branch lp:~jimbaker/ensemble/new-hook-semantics-5-docs because of its lack of precision is currently misleading18:31
jimbakerbut there's some useful text in there that we may want to incorporate into the ensemble docs, after some more editing18:32
kim0jimbaker: thanks :)18:33
jimbakerkim0, re state diagrams - you should be aware of sdedit, if not already - see http://sdedit.sourceforge.net/example/index.html18:34
jimbakerthere's integration with sphinx too18:35
jimbaker(much like the dot integration)18:35
jimbakeri could definitely see a script reading the debug log and producing this type of output18:36
kim0jimbaker: thanks useful info :)18:37
jimbaker(well not loops, but the example is just an indication of what can be done, if there's data to support it)18:37
_mup_Bug #766306 was filed: example formulas should use ensemble-log to log useful messages <Ensemble:New> < https://launchpad.net/bugs/766306 >18:41
niemeyerjimbaker:   Its purpose is to allow the formula to18:41
niemeyer255+    clean up established state18:41
niemeyer256+18:41
niemeyer257+    The service unit can then clean up any established state. 18:41
jimbakerniemeyer, thanks18:42
niemeyerjimbaker: No problem, +1 with that18:43
jimbakerniemeyer, cool, i will get it merged in shortly!18:43
kim0why doesn't the bot here catch merge proposals :)18:44
jimbakerkim0, yeah, it's an annoying bug in our mup18:44
* kim0 kicks _mup_ 18:45
_mup_Bug #766315 was filed: status should show relation settings <Ensemble:New> < https://launchpad.net/bugs/766315 >18:46
niemeyerkim0: Strange problem indeed18:47
_mup_Bug #766317 was filed: debug-log should show relation settings changes <Ensemble:New> < https://launchpad.net/bugs/766317 >18:48
kim0filed the two bugs18:48
kim0TeTeT: you might enjoy this text too http://pastebin.ubuntu.com/596140/18:54
TeTeTkim0: looks great :)18:55
_mup_ensemble/new-hook-semantics-5-docs r204 committed by jim.baker@canonical.com18:55
_mup_Fixed -relation-broken description18:55
_mup_ensemble/trunk r200 committed by jim.baker@canonical.com19:07
_mup_merge new-hook-semantics-5-docs [r=niemeyer][f=756581]19:07
_mup_Updates the documentation of hooks with respect to the new hook19:07
_mup_semantic changes. Copy edits the formula section as a whole to clarify19:07
_mup_how hooks actually execute, and under what conditions.19:07
jimbakercool, 200th revision on trunk19:09
kim0woohoo :)19:11
_mup_ensemble/unit-agent-formula-upgrade r237 committed by kapil.thangavelu@canonical.com19:25
_mup_add utility workflow function to tell if a unit is running and its state.19:25
hazmatjimbaker, we're closing on 1k unit tests as well19:26
hazmatniemeyer, jimbaker, bcsaller standup?19:26
jimbakerhazmat, sounds good on all counts!19:26
bcsalleryeah19:26
jimbaker(so to speak :)19:26
niemeyerYep, let's do it19:26
hazmatbcsaller, jimbaker skype?19:27
bcsallerI'm on19:28
niemeyerUp19:28
hazmatbcsaller, cool, false skype presence info19:28
_mup_ensemble/unit-agent-formula-upgrade r238 committed by kapil.thangavelu@canonical.com19:44
_mup_clear upgrade before flag before retrieving service formula id, remove executor run lock acquisition when starting19:44
_mup_ensemble/unit-agent-formula-upgrade r239 committed by kapil.thangavelu@canonical.com19:55
_mup_missing test for is_unit_running19:55
_mup_ensemble/yaml-state-node r194 committed by bcsaller@gmail.com20:03
_mup_simpler YAMLState20:03
_mup_reflecting the changes from review this version maintains less internal state20:03
_mup_additional test of multiple writes20:03
niemeyerhazmat: There are still many appearances of 'cli' in the file.. we should probably try to put acronyms in capitals in user documentation20:38
hazmatniemeyer, hmm.. i never considered the possiblity that acronoym would be unknown.20:38
hazmatfair enough re caps20:38
niemeyerhazmat: Uh.. I'm not saying it's unknown.. it's just an acronym20:39
niemeyerhazmat: same way that API is generally capitals20:39
niemeyerand AWS, etc20:39
_mup_ensemble/ensemble-resolved r240 committed by kapil.thangavelu@canonical.com20:44
_mup_ensemble resolved cli20:44
niemeyerhazmat: :-)20:45
hazmatniemeyer, doh. ;-)20:45
niemeyerhazmat: The branch looks good20:45
hazmatniemeyer, yeah.. i still need to do an end to end test, but else it should be good.20:46
niemeyerhazmat: Was a bit overwhelming, and required some morning-level freshness, but mostly because there's a lot there.. was pretty straightforward20:47
hazmatniemeyer, cool. yeah it grew a bit bigger than i wanted in one branch, but it was getting hard to separate out20:47
hazmatniemeyer, fwiw, i'm planning on doing the resolved stuff much the same way20:48
hazmatunit_state.set_resolved_flag(retry).. unit_state.set_relation_resolved_flag(mapping)20:48
hazmatmapping being relation_state_id: retry_boolean20:48
niemeyerhazmat: Hmm20:49
hazmatand then watches on the agent for the unit, and a watch in the lifecycle for the relation20:49
niemeyerhazmat: Why do we need a flag on it?20:49
hazmatniemeyer, we don't, probably shouldn't have that in the name20:49
hazmatlooks like i can deal with the ambiguous anonymous relations without issue here20:50
niemeyerhazmat: I mean.. isn't the fact we have an _error state already indicating a non-resolved state, and thus putting the unit back in running would be the action?20:50
hazmatniemeyer, i need to signal to the agent that it should take action20:50
hazmatthe resolved stuff triggers the watch which triggers the agent to do some work20:51
niemeyerhazmat: Won't it notice you changing its state?20:51
hazmatthe workflow transition even sans hook needs to take place on the agent20:51
hazmatniemeyer, no it is the owner of that data, directly changing the state, could be arbitrary, without the nesc. lifecycle invocations20:52
hazmati could genericize it via the workflow state client20:53
niemeyerhazmat: Ok, sounds good20:53
hazmatto allow marking generic firing of transitions and recording that as intent to act upon20:53
niemeyerhazmat: Nah, your idea of a semantically rich request actually feels good20:53
hazmatniemeyer, cool20:54
niemeyerhazmat: Otherwise, you're right in that the agent can't do anything more intelligent with the request20:54
niemeyerhazmat: "Oh, I'm resolving, thus ..."20:54
hazmatniemeyer, yeah.. or like oh.. my state is stopped now, what does that mean.. where was was i, this is not beautiful house ;-)20:55
hazmat^my20:55
niemeyerhazmat: Right :-)20:55
_mup_ensemble/ensemble-resolved r241 committed by kapil.thangavelu@canonical.com21:03
_mup_add a is_relation_running workflow utility function.21:03
_mup_ensemble/yaml-state-node r195 committed by bcsaller@gmail.com21:06
_mup_merge trunk21:06
_mup_ensemble/unit-agent-formula-upgrade r240 committed by kapil.thangavelu@canonical.com21:11
_mup_make sure the upgrade flag presence check is done before we clear the flag.21:11
hazmatniemeyer, any thoughts on the async watcher and creators stuff?21:11
niemeyerhazmat: Sorry, what's the context again?21:11
niemeyerhazmat: Ah, the email on the list21:12
niemeyerhazmat: I forgot to reply.. let me look at it again21:12
hazmatniemeyer, my mail to the list regarding usage patterns for watchers21:12
hazmatniemeyer, thanks21:12
niemeyerhazmat: Sorry about that21:12
hazmati'm noticing a lot of tests i'm hacking in fire_transition("stop") to stop the background activity so the test doesn't fail because of the async work21:12
_mup_ensemble/trunk r201 committed by bcsaller@gmail.com21:15
_mup_Merge yaml-state [r=niemeyer] [f=758583]21:15
_mup_ 21:15
_mup_Adds a reusable utility for managing access to Zookeeper nodes containing YAML serialized state. The YAMLState object proxies as a Python dict for normal operation. Prior to access instance.read() should be invoked and instance.write() will update the Zookeeper state.21:15
niemeyerhazmat: Replied21:22
niemeyerhazmat: Yeah, that sucks21:22
niemeyerhazmat: I have an idea about a better system to make testing this easier21:23
niemeyerhazmat: That's the good news.. the bad news is that I don't know how to implement it yet21:23
hazmatniemeyer, yeah.. i started poking adding something like this but it was getting a little complicated untop of all the work in the upgrade branch.. there's some subtly there.21:31
hazmatthere where one or two tests that error'd out with the change, but i think i'd like to approach in a more systematic way.21:31
niemeyerhazmat: Like this what, more specifically?21:32
hazmatniemeyer, i added support to the unit lifecycle start, that it only fired after the unit relations watcher had fired once.21:32
niemeyerhazmat: I think we may come up with a simpler way to test that kind of logic altogether21:32
niemeyerhazmat: Which would get rid of all sleeps/waits/etc21:33
niemeyerhazmat: Higher bandwidth might be nice for that conversation, though21:34
hazmatniemeyer, agreed, let's do it for tomorrow's standup? or before the standup?21:34
hazmati'm making good head way on 'resolved'21:35
niemeyerhazmat: Might be good to have it separated21:35
niemeyerhazmat: It may be pretty fast, but it could also take  abit21:35
niemeyerhazmat: Just as a heads up, when testing we're in control of both the reactor and the zookeeper deployment21:35
niemeyerhazmat: We should be able to figure if there's something pending to be executed, or if the system is stale for real21:36
niemeyerhazmat: No deferred calls in twisted's reactor after a ping roundtrip to zookeeper means the system is stale21:37
niemeyerhazmat: Nothing will happen21:37
niemeyerI think we can use that to solve those problems21:37
hazmatniemeyer, in general for sequencing it feels like it would be easier  for tests if the background activity was done after the method completed.21:38
hazmatat least in a steady state21:38
niemeyerhazmat: The background processing is always done after the method completed, so I don't see what you really mean21:39
hazmatinspecting the reactor for latent deferreds, and then doing something with that feels kinda of magical as well21:39
hazmatniemeyer, well the method could delay its return till the initial invocation of the watcher, at which point its in a steady state, minus any additional test induced state chagnes21:39
niemeyerhazmat: Well.. it is much less magical to me than arbitrarily saying the event has to happen in a given timeframe when in fact it doesn't21:39
niemeyerhazmat: The initial invocation of the method has no special meaning, as I pointed out in the list21:40
niemeyerhazmat: It can be empty, and then can have data 5 milliseconds later21:40
hazmatthe event happens fairly quickly, just typically not before the test exits... part of the problem is arguably that we need to separate our tests a bit more, and not have tests which have relations that are being setup in the background.21:40
hazmatniemeyer, sure, it can, but the test is explicitly setting up a state, ideally the methods its invoking should be done/current with the state when complete. the test is the state driver/manipulator for changes.21:42
niemeyerhazmat: Yeah, exactly.. that "ideally" is the problem.. there's no hard constraint about that21:43
hazmata change in data  5ms seconds later in this case is one thats being done by the test, and the test should expect/test for that21:44
hazmatwhich is also arguably why the test shouldn't be subclassing something that sets up a relation if doesn't care about it.21:44
niemeyerhazmat: No questions about that.. doesn't affect the points though21:44
niemeyerhazmat: The problem is that, e.g., "creation relation" + "set watch on relation" will fire in one way21:47
niemeyerhazmat: but "set watch on relation" + "create relation" fires in a different way21:47
niemeyerhazmat: Our system was built in such a way that things work well in both cases21:47
niemeyerhazmat: Adding special behavior to the first time it fires fails in the second case.21:48
hazmatthe system always reads the current state, and tries to match it. i agree adding semantics to the first invocation feels a bit iffy perhaps.. but the caller knows then that the async watch creator has completed to matching the current state when its done, and that makes some of the tests a bit easier.. i think its something we can solve in practice for a large set of the cases by having the test setup reflect only what the tes21:50
hazmatt needs.21:50
hazmatniemeyer, but the problem still exists beyond tests21:50
hazmatfor example the debug-log and debug-hook stuff are setting up watches, and then going about their business, and some information/behavior is lost21:51
hazmatbecause by the time those watches have finished, the install and start methods have already executed21:51
niemeyerhazmat: It makes tests easier and unrealistic..  the first invocation has no special meaning.  It can have state or not, and it should correctly yield the same state with A+B or B+A21:51
hazmatniemeyer, a phone call would be better21:52
niemeyerhazmat: There are tons of things which right now simply work because of that21:52
niemeyerhazmat: Indeed, sorry.. I wanted to give a heads up about the idea and ended up taking your attention21:52
hazmatand they'll continue to work that way, but certain cases need to know that the async behavior matches the state before continuing21:52
hazmatno worries, we can discuss in more detail tomorrow21:53
niemeyerCool21:55
niemeyerI'll push some personal stuff now.. want to get a new mgo release out tonight still.  I'm hoping that after some work over the following nights and on the weekend it should be ready to push the prototype needs.21:57
_mup_ensemble/unit-agent-formula-upgrade r241 committed by kapil.thangavelu@canonical.com22:21
_mup_a test was incorrectly setting up the workflow state.22:21
_mup_ensemble/trunk r202 committed by kapil.thangavelu@canonical.com23:43
_mup_merge unit-agent-formula-ugprade [r=niemeyer][f=755062]23:43
_mup_This merge completes the upgrade-formula functionality for ensemble,23:43
_mup_by implementing the unit agent support for upgrading formulas and23:43
_mup_executing formula-upgrade hooks. It changes the unit workflow to add 23:43
_mup_a new transition from the started state, that effects an upgrade on23:43
_mup_the unit. It also adds the notion of out-of-band hook execution on 23:43
_mup_the hook executor for the formula-upgrade-hook to be invoked while 23:43
_mup_the executor is stopped but still queuing new hook executions.23:43
_mup_ensemble/trunk-merge r186 committed by kapil.thangavelu@canonical.com23:45
_mup_merge trunk23:45

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