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

niemeyerGood morning!14:26
niemeyerbcsaller: ping15:45
=== niemeyer is now known as niemeyer_lunch
SpamapSgoooood morning ensemblers!16:42
* SpamapS finally has some time to update principia to trunk16:42
jimbakerSpamapS, good morning. good to hear about your time for prinicipia!16:51
SpamapShmm.. is trunk broken right now?16:54
SpamapS2011-04-18 15:53:19,044 Machine:3: ensemble.agents.machine ERROR: Error starting unit: wiki-cache/016:54
SpamapS  File "/usr/lib/ensemble/ensemble/ensemble/state/service.py", line 487, in get_formula_id16:54
SpamapS    returnValue(data["formula"])16:54
SpamapSTypeError: 'NoneType' object is unsubscriptable16:54
SpamapShttp://paste.ubuntu.com/595562/16:55
SpamapSfull traceback16:55
SpamapShmmmmmmm16:58
SpamapSsince ensemble doesn't use a .deb to install itself, it really shouldn't be putting its agent in /usr/lib16:58
=== niemeyer_lunch is now known as niemeyer
niemeyerSpamapS: Glad to hear you're back!17:00
* SpamapS smacks forehead.. PYTHONPATH not PYTHON_PATH17:02
SpamapSplease ignore backtrace17:02
niemeyerSpamapS: Aha, ok.. i was just pondering about what could be wrong there17:03
niemeyerSpamapS: I've done something worse before, setting PYTHONPATH to the wrong branch17:03
niemeyerSpamapS: Too me ages to figure why it was behaving like crazy17:03
niemeyerTook17:03
SpamapSniemeyer: I've done this like 3 times with 3 different python projects.. not sure why it always seems to happen17:04
SpamapSis it because they don't add '.' to the path automatically where others do?17:04
niemeyerSpamapS: Yeah, some also put the binary into "."17:07
niemeyerSpamapS: We should do the magic within the tools17:07
_mup_ensemble/status-workflow-client r209 committed by jim.baker@canonical.com17:13
_mup_More fixed tests for test_status17:13
bcsallergustavo: sorry, missed that17:23
niemeyerbcsaller: No worries17:23
SpamapSstill no --force on deploy?17:34
SpamapSso is there no way to get all of the settings for a specific unit anymroe? I see that settings_name is before remote unit name in the positional arguments of relation-get17:42
SpamapS(another backward-incompatible change btw)17:42
SpamapSone that bcsaller warned me about like 3 weeks ago but I forgot :P17:42
bcsallerSpamapS: the order of args in relation-get changed to match the spec17:43
niemeyerSpamapS: Yeah, it still works pretty much the same way, just the implementation reflects the spec now17:43
SpamapSYou guys are such devs.17:44
SpamapS;)17:44
_mup_ensemble/yaml-state-node r189 committed by bcsaller@gmail.com17:45
_mup_YAMLState(dict) -> YAMLState(UserDict) as requested17:45
SpamapSLike.. "what you didn't read all 40 pages of spec before using our tool?" ;-) I am not making fun of you guys, rather just enjoying the irony that what makes ensemble so high quality may not make it easy to use for impatient people like me. ;)17:45
SpamapSso is there a special meaning setting name, like '*' to get them all?17:46
bcsalleryeah, I think the default was '-'17:46
SpamapSI need to read up on the debug hook stuff so I can really get good at formula dev :)17:48
_mup_ensemble/status-workflow-client r210 committed by jim.baker@canonical.com17:48
_mup_Fixed remaining tests17:48
SpamapSthis broke almost every formula. Glad I didn't read the spec or I'd have never gotten to play w/ ensemble. ;-)17:50
bcsallerits a small change at the cli level 17:53
SpamapSI'm not complaining. Don't get me wrong. Its a MASSIVE change across every formula I've written thus far17:55
SpamapSseeing as they all silently did the wrong thing17:55
SpamapSonly one broke because I tried to subscript an empty string17:55
SpamapSerr, a None rather17:55
jimbakerSpamapS, it does make the usage simpler for the common case, but i agree it was a change. it puzzled me the first time when i actually read the docs and was trying to write formulas. and when it was changed :)17:55
SpamapSthe others just said "no settings, moving on"17:55
SpamapSbecause there was no setting named "wiki-db/0" for the non existant unit "hostname"17:56
jimbakerSpamapS, and this despite annotating each usage in my bashified version with an XXX about the bug and its expected change, simply because of the silent quality of how relation-get works17:57
SpamapSIs there any reason relation-get should silently fail if a non-existant unit is passed?17:58
niemeyerbcsaller: Please actually check the UserDict module and ponder a bit about how to properly to a dict-like class17:59
niemeyers/to a/do a18:00
bcsallergustavo: it passed the cases I needed so far in testing and usage, but I'll look at rounding it out18:00
niemeyerbcsaller: It's buggy, as I said in the review18:00
bcsallerthe version I just reposed with UserDict?18:00
_mup_ensemble/status-workflow-client r211 committed by jim.baker@canonical.com18:01
_mup_PEP818:01
niemeyerbcsaller: The tests pass because they are incomplete as far as a dictionary interface is concerned18:01
niemeyerbcsaller: You simply did s/dict/UserDict18:01
niemeyerbcsaller: I believe that, given the current interface of your type, using DictMixin would be a better choice18:01
niemeyerbcsaller: Then, you might likely be able to get rid of update, for instance18:02
niemeyerbcsaller: It's not hard, but a little bit of attention is needed18:02
bcsallerhappy to look at it again 18:02
niemeyerbcsaller: The current implementation breaks if a user does foo.pop(...), for instance18:02
bcsalleryeah, I realized that was possible, but I didn't realize we needed a functional dict proxy at that level. I'll try to make it pass the normal interface a little better18:03
niemeyerbcsaller: We certainly don't want a type which looks like a dict and then loses operations randomly18:03
niemeyerbcsaller: Then, again, it's trivial to do it right with the UserDict module.. just need to look at it and see what the interface is asking for.18:04
bcsallerwill do18:04
niemeyerbcsaller: Thanks18:05
_mup_ensemble/status-workflow-client r212 committed by jim.baker@canonical.com18:06
_mup_Removed unused import18:06
niemeyerbcsaller: Check DictMixin there.. I believe it matches better what you're doing already18:06
niemeyer(better than UserDict.UserDict)18:06
bcsallerlooking at that now18:07
=== deryck is now known as deryck[lunch]
niemeyerhazmat: FWIW, still on your branch since the morning18:19
niemeyerhazmat: Looks very good overall, but there's a lot there18:19
_mup_ensemble/yaml-state-node r190 committed by bcsaller@gmail.com18:28
_mup_make use of dictmixin and verify more basic dict operations18:28
niemeyerhazmat: That's delivered now18:31
niemeyerbcsaller: Is it ready for another look already, or should I move it to WIP?18:33
bcsallerI moved it back to needs review, should be ready18:33
niemeyerbcsaller: Cool, checking18:33
bcsalleradded an additional test of some of the methods we talked about 18:34
niemeyerbcsaller: Nice, thanks18:34
_mup_ensemble/config-state-manager r194 committed by bcsaller@gmail.com18:37
_mup_cover the delete case here (though this is captured in a prereq branch now)18:37
_mup_Bug #764938 was filed: Convert example formulas to using augeas <Ensemble:New for jimbaker> < https://launchpad.net/bugs/764938 >18:48
=== deryck[lunch] is now known as deryck
_mup_ensemble/yaml-state-node r191 committed by bcsaller@gmail.com19:01
_mup_remove update method19:01
jimbakerbcsaller, hazmat, niemeyer - standup?19:04
niemeyerjimbaker: Yep, let's do it19:04
bcsallerok, on skype now19:05
niemeyerhazmat seems to be out-of-action today19:06
niemeyerjimbaker can you start the call19:06
niemeyer?19:06
jimbakerniemeyer, i will do that19:07
niemeyerbcsaller: if foo in dict and gotval == None: del dict[foo]19:11
hazmatniemeyer, i'm done out19:13
hazmatgoing to take a sick day today19:13
niemeyerhazmat: Aw, sorry to hear that19:13
bcsallerhazmat: feel better19:15
jimbakerhazmat, take care of yourself and stay hydrated!19:21
_mup_ensemble/bashified-wordpress-mysql-examples r186 committed by jim.baker@canonical.com19:28
_mup_Merged trunk19:28
SpamapSOk I have an interesting question..19:29
SpamapShaproxy has a 'forwardedfor' option ..19:29
SpamapSwhich you definitely want to use if haproxy is the connection point for end users..19:29
SpamapSbut you definitely don't want to use if it is just a link in a chain of reverse proxies..19:30
SpamapSSo I need to know if I am related upstream to any other proxy..19:30
SpamapSI suppose I can just touch a file .. "/etc/haproxy/upstream.is.proxy" ...19:31
SpamapSbut I'm more wondering if there is a way to just look at all of my relationships and pull it right out of 'relation-get'19:31
SpamapSin thinkign more about it, what I really want to do is identify the relationship between two services that I've been related to..19:35
hazmatto find if your endpoint or a middlepoint19:36
SpamapSwell and I guess more importantly, to route the appropriate upstream to the appropriate downstream...19:37
SpamapSthis isn't just about load balancers.. there will be plenty of times where middleware is done better with a single service unit19:37
SpamapSI think the way to do it is just with settings.19:37
SpamapShave the upstream go "I am for X"19:38
* SpamapS is once again brain dumping into IRC rather than actually doing useful things. ;)19:40
niemeyerbcsaller: Review properly delivered now19:40
bcsallergustavo: great, thanks19:40
niemeyerSpamapS: If the haproxy is in the middle, it will mean there's a relation established upstream19:42
niemeyerSpamapS: Should be easy to just set forwardedfor when that's the case19:42
niemeyerbcsaller: np19:42
niemeyer"""19:43
niemeyerThis will yield two different states depending on the state of19:43
niemeyerthings, even though: self[name] is None, or self[name] is non-existent.19:43
niemeyer"""19:43
niemeyerbcsaller: I meant to say "even though it's a deleted entry in both"19:43
niemeyerbcsaller: But there was a brain hiccup there19:43
bcsallergot it19:44
SpamapSniemeyer: its my understanding that you would not want to set forwardedfor if haproxy is a middle-proxy .. only if it is the one that users are actually connecting to19:44
SpamapSniemeyer: otherwise you will set the header to the upstream reverse proxy's IP19:44
niemeyerSpamapS: Right, so that's what I mean.. should be easy to tell if that's the case or not19:44
SpamapSniemeyer: right, so this gives rise to the second part of my babbling above.. which is that there will be times where the proxy is providing services to two unrelated upstream proxies and two unrelated downstream proxies..19:45
niemeyerSpamapS: and what's the issue there?19:46
SpamapSat the moment the only way to do this is just to have two haproxies19:46
niemeyerSpamapS: Why?19:46
SpamapSniemeyer: the issue is how to specify routing data. I think I have it solved actually.. the downstreams need to say a bit more about what they're doing, and the upstreams a bit more about what they want.19:46
SpamapSniemeyer: because /foo needs to go to   foo-app service, and /bar needs to go to bar-app service19:47
niemeyerSpamapS: Ah, yeah19:47
SpamapSand /anything-else to foo-app service19:47
_mup_ensemble/bashified-wordpress-mysql-examples r187 committed by jim.baker@canonical.com19:48
_mup_Removed snarky descriptions from metadata.yaml and replaced it with descriptions of what the example formulas do and how they interact19:48
SpamapSand haproxy is *really* good at routing lots of different stuff to different places, so it would be a shame if we can't figure this one out elegantly19:48
SpamapSBut, I think we can.. just need the "website" relations to specify what URL they prefer to be accessed on.19:49
niemeyerSpamapS: Indeed19:50
niemeyerSpamapS: We'll need to put some thinking into it indeed19:51
niemeyerI'll be right back19:51
niemeyerjust relocating19:51
SpamapSYeah I think ensemble already handles the case well its just a matter of finding a simple way to make it happen. :)19:51
niemeyerbcsaller: Is config-state-manager depending upon YAMLState?20:56
niemeyerbcsaller: Just wondering how to properly review it20:56
bcsallergustavo: yes20:56
_mup_ensemble/bashified-wordpress-mysql-examples r188 committed by jim.baker@canonical.com20:56
_mup_Changed db-relation-changed to db-relation-joined for mysql example formula20:56
bcsallerit will change a bit to reflect the last review, we can put it back into WIP20:57
niemeyerbcsaller: Ok, can you please put it back in review when that's done?20:57
bcsallerthe last review means I'll have to revise quite a few tests (if only a little) so its better to wait for those changes to YAMLState20:57
bcsallergustavo: will do20:57
bcsalleralright, going to head to lunch now20:58
niemeyerbcsaller: Enjoy21:05
jimbakerniemeyer, do you want to review my updated summaries/descriptions for the example formulas, or should i merge it in?21:06
jimbakerthis removes the snarky text in favor of what the formulas actually do21:06
jimbakeri was noting this as i was bumping the version numbers in the metadata.yaml files21:07
niemeyerjimbaker: No, fine to merge them, thanks21:09
jimbakerniemeyer, sounds good21:09
_mup_ensemble/trunk r197 committed by jim.baker@canonical.com21:20
_mup_merge bashified-wordpress-mysql-examples [r=niemeyer][f=726561]21:20
_mup_Converted mysql and wordpress example formulas to use shell scripting,21:20
_mup_so as to demonstrate the language neutrality of Ensemble.21:20
_mup_ensemble/status-workflow-client r213 committed by jim.baker@canonical.com21:23
_mup_Merged trunk21:23
_mup_ensemble/trunk r198 committed by jim.baker@canonical.com21:29
_mup_merge status-workflow-client [r=niemeyer][f=737949]21:29
_mup_Adds to the status output the current relation and unit workflow states.21:29
_mup_Uses the new StateWorkflowClient support.21:29

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