/srv/irclogs.ubuntu.com/2012/04/19/#juju-dev.txt

wrtpmornin' al07:40
wrtpl07:40
wrtpwhere *is* al?07:40
fwereade_wrtp, over the hills and far away ;p08:30
fwereade_TheMue, were there meant to be some prereqs on your CLs? Just did one, moved on to the next, and saw the same changes...08:31
wrtpfwereade_ is back in Go-land, yay!08:31
fwereade_wrtp, yeah, and I can almost remember what the hell I'm doing ;)08:38
wrtpfwereade_: bonus08:38
TheMuefwereade_, wrtp: moin08:40
wrtpTheMue: yo!08:40
fwereade_TheMue, heyhey08:40
TheMuefwereade_: I would like you to not do something regarding those watchers. It's a sequence of branches based on each other. So I have to realize them bottom-up.08:41
TheMuefwereade_: Base is the enhancement of the content watcher (will go in again in a few moments)08:42
fwereade_TheMue, ah, ok, sorry; I hope the comments on the one I did might be useful anyway08:44
TheMuefwereade_: Sure they will. Which one is it? I've not yet scanned them all.08:45
fwereade_TheMue, sorry, got called away; it's https://codereview.appspot.com/6059047/08:54
TheMuefwereade_: So, read it, thx. You also prefer "treaten" insted of treated"? *smile*08:59
fwereade_TheMue, it's clearly superior ;p09:00
fwereade_TheMue, but the tyranny of the majority wins09:00
TheMuefwereade_: Hehe, so maybe I should keep it.09:00
TheMuefwereade_: The name "loop" for the goroutines is a result of the general discussion about watches here. In my own code I typically call it backend()09:01
TheMuefwereade_: The idea of mooving all watches into an own file sounds good. I already have a watch_test.go09:03
TheMuefwereade_: unit.go is already quite big.09:03
TheMuefwereade_: What I don't get is the "force upgrade". Could you please explain?09:05
niemeyerMorning all09:05
fwereade_TheMue, heh, I wasn't closely involved, but:09:06
fwereade_(heya niemeyer)09:06
fwereade_TheMue, a requirement that units be upgradeable in a non-started state came up from somewhere09:06
fwereade_TheMue, you can now pass --force to juju upgrade-charm09:06
fwereade_TheMue, and the UA interprets that as "upgrade regardless of unit state"09:07
TheMueniemeyer: moin09:07
fwereade_TheMue, you'd have to take a look at the code to see exactly how it's done09:07
fwereade_TheMue, lp:93435009:08
TheMuefwereade_: ok, thx for the hint09:08
niemeyerThe point of ugprades in non-started state comes from the fact upgrades are often used to fix the problem09:13
TheMueniemeyer: Good to know. Regarding the state I've yet only tested for the existence of the node for it in ZK.09:15
TheMueniemeyer: Could you take a look at http://paste.ubuntu.com/936632/. I fould a compromise between your and mine approach to keep the watcher test code compact.09:16
niemeyerTheMue: The approach I suggested isn't really mine.. it's a very common way to structure tests09:16
niemeyerTheMue: http://code.google.com/p/go-wiki/wiki/TableDrivenTests09:17
niemeyerTheMue: IMO, this is still cleaner09:18
niemeyerTheMue: I'm not as religious as other people are.. some actually go overboard and attempt to use this scheme even when it's not really adequate for the test at hand, or could be simplified if different09:19
niemeyerTheMue: Your case, though, is a pretty legitimate table09:20
TheMueniemeyer: OK, so I'll adopt them, even if I don't even find them more readable.09:20
niemeyerTheMue: Let me try to explain why it feels more readable then..09:20
niemeyerTheMue: You actually iterate over a list of possibilities with some logic09:20
niemeyerTheMue: Instead of having the list of possibilities as a first class entity and having the logic iterating over that list, the test is inverted09:21
TheMueniemeyer: Yes, here a table is ok, but later I also have to test for timeouts and closed channels. And the code needed here is due to the structure almost a duplication of the test code above. This is IMHO needless and cluttering.09:22
niemeyerTheMue: It has a function with logic displaced, and then manually iterates over the list of possibilities09:22
niemeyerTheMue: The table may be richer09:22
TheMueniemeyer: Using an anonymous struct, yes.09:23
niemeyerTheMue: If you're iterating over a list of possibilities, it's still easier to read through if it is organized as a sequence of facts than if everything is mixed up with a stream of code09:23
niemeyerTheMue: It's a bit like having a higher level language to describe the test09:23
TheMueniemeyer: How about the call of watcher.Stop() inbetween?09:24
niemeyerTheMue: Again, I'm not religious about it, and in many cases this makes things worse.. this looks like a good chance to use it, though09:24
niemeyerTheMue: Maybe that call should be out of the iteration logic?09:24
TheMueniemeyer: That's what I meant above. There's iteration, then only one err assert, then again a test for timeout. The way I've tried it reads simply top-down (ok, you have to know the three arguments of the assertChange()).09:26
niemeyerTheMue: The fact you have a couple of lines afterwards isn't justification to not do an iteration as an actual iteration09:27
niemeyerTheMue: Note in my suggestion that the code within the loop is also simpler09:28
niemeyerTheMue: and so is the test after it09:28
niemeyerTheMue: The logic in the paste instead shoves a true/false pair that is unchanged over the whole iteration, and makes the loop more complex09:29
TheMueniemeyer: Yes, the iteration for the (just) 4 values is fine, but later I need two receives with timeout. Now a one-liner, then 4 to 5.09:29
niemeyerTheMue: Those are handled in the suggestion I sent you09:30
niemeyerTheMue: With something as trivial as09:30
niemeyerselect {09:30
niemeyercase <-time.After(N):09:30
niemeyer    t.Fatalf("boom")09:30
niemeyer}09:30
niemeyerTheMue: That's much better than assert(false)09:30
TheMueniemeyer: The new approach uses Fatal to show the timeout better. And still it's more code (and that twice)09:31
niemeyerTheMue: It uses fatal in a remote place that is disconnected from the actual logic because we've forced a loop into a sequence of equivalent function calls09:32
TheMueniemeyer: But let my try the table approach and then we'll see which one looks cleaner.09:32
niemeyerTheMue: Thanks09:32
niemeyerTheMue: As a general comment, more code isn't necessarily bad.. there are other factors that have to be taken into account09:33
TheMueniemeyer: Yes, readbility. And from my perspective the approach using a little helper is more readble.09:34
niemeyerTheMue: Ok.. I disagree, but I respect that09:34
niemeyerTheMue: Perhaps one of the reasons I feel different is that you have a comment there playing the role of code that should be readalbe09:35
niemeyer// Changes() has to be closed.09:35
niemeyerassertChange(false, nil, false)09:35
niemeyerselect {09:35
niemeyercase ...:09:35
niemeyer    c.Fatalf("Changes channel not closed")09:35
niemeyer}09:35
niemeyer..09:36
niemeyerYou need the comment because assertChange(false, nil, false), by itself, says nothing09:36
TheMueniemeyer: Hehe, yes, got me. In Smalltalk I wrote "self assertChange: … isClosed: true hasTimout: false."09:37
TheMueniemeyer: Here my former lang is more expressive.09:37
niemeyerTheMue: Indeed.. one might do the same with Python. The question is whether that'd be good or not. I the specific case we're debating, I still prefer dropping one layer because the helper function is unnecessary.09:39
TheMueniemeyer: Maybe it's unnecessary, yes. But many unnecessary things are useful. *smile*09:40
niemeyerIn other words, isClosed and hasTimeout are both layers that one must look elsewhere to understand.09:41
niemeyerThey don't pull their weight.09:41
fwereade_early lunch, bbs09:45
TheMueniemeyer: Here is the new one: http://paste.ubuntu.com/936664/09:52
niemeyerTheMue: This comment can go away:09:56
niemeyer// Receive the four changes create, content change,09:56
niemeyer// delete and create again.09:56
niemeyerTheMue: It's explicit now..09:56
niemeyerTheMue: This one too, for the same reason:09:56
niemeyer// No more changes, expect a timout.09:56
niemeyerTheMue: Same about the last one..09:57
TheMueniemeyer: So one sentence: Just remove all comments in the method.09:59
niemeyerTheMue: Sorry, I was reading through it, but yes.. this is the case.. no comments that duplicate the code please09:59
TheMueniemeyer: I would at least for the two last selects prefer to explain what they are concentrating on. E.g. why it makes sense to have an empty case <-timeAfter(). A kind of c.Assert(ImHappyBecauseImCalled).10:02
niemeyerTheMue: It makes sense to have an empty time.After because we expect it to happen10:02
niemeyerTheMue: We don't need comments for that10:03
TheMueniemeyer: OK, so et's hope that a new maintainer in several month will get it as easily too.10:04
niemeyerTheMue: If he doesn't get that easily, he shouldn't be working on juju10:04
niemeyer(or she)10:04
TheMueniemeyer: *lol*10:04
TheMueniemeyer: OK, good argument.10:04
wrtpTheMue: one advantage of structuring this as a table is that it makes it easy to have different time outs for the expected-timeout vs not-expected-timeout case.10:04
niemeyerTheMue: As a counterexample, this is the kind of comment that makes sense to have in the test:10:04
niemeyerTheMue: http://paste.ubuntu.com/936679/10:04
wrtpTheMue: when you don't expect a timeout, it can be much longer because it doesn't interfere with the normal progress of the test10:05
niemeyerTheMue: Comments are not about what the code is doing.. they are about what we can't see10:05
wrtpTheMue: the final timeout should be shorter.10:05
niemeyerwrtp++10:05
TheMuewrtp: The timeout could be an argument of a helper too.10:07
niemeyerROTFL10:07
niemeyerI rest my case..10:07
wrtplol too10:07
TheMueSo at least one success. ;)10:12
TheMueLunchtime ...10:13
niemeyerTheMue: Enjoy10:13
TheMueniemeyer: so,  https://codereview.appspot.com/6059044 is in10:53
niemeyerTheMue: LGTM, thanks!10:56
TheMueTheMue: Fine, thx. Will submit and merge it to go on with next one. It's the ConfigWatcher in state.go. What do you think about Williams idea of moving all watchers of the state package to a file named watchers.go?10:58
niemeyerTheMue: Sounds fine, but please do it in a separate CL, or we'll lose all comments now11:03
TheMueniemeyer: OK, will move the after all are in after an LGTM.11:04
TheMues/the/them/11:04
mthaddonniemeyer: got all the changes prepped for moving to config based, and with mongodb auth in place - may be a short service interruption while the changes are applied (will let you know as and when)11:08
niemeyermthaddon: Sounds great11:08
niemeyermthaddon: Thanks11:08
mthaddonnp11:09
mthaddonniemeyer: ok, config updates being applied now - may be service interruption for a bit, will let you know when done11:38
niemeyermthaddon: Cheers11:41
mthaddonniemeyer: the appserver processes are running, but not responding on port 8080 to our nagios checks11:47
TheMueniemeyer: here's some code diving before ocean diving -> https://codereview.appspot.com/605604711:48
mthaddonniemeyer: ah, I think this is because I've set api-addr: localhost:808011:48
mthaddonniemeyer: to listen on all interfaces, what should I set that to? 0.0.0.0:8080 ?11:48
niemeyermthaddon: Yeah, that'll work11:49
mthaddonk, thx11:49
niemeyerTheMue: done :)11:52
TheMueniemeyer: Hmm, no notification here. Looks good so that I can move on?11:54
niemeyerTheMue: Please check it out11:55
niemeyerTheMue: I forgot to submit somehow11:55
niemeyerTheMue: It LGTM, but there's something to change11:55
fwereade_niemeyer, I think I need some guidance re response on https://codereview.appspot.com/5756054/11:56
niemeyerfwereade_: Sounds good.. I'll have some breakfast and we can discuss it11:57
niemeyerfwereade_: Just replied to the thread in the ML again, btw11:57
fwereade_niemeyer, swet, tyvm11:57
niemeyermthaddon: All good there? Can I get some breakfast? :)11:57
TheMueniemeyer: OK, thx. Will change that one point and then submit it.11:57
mthaddonniemeyer: yep, all looking good thx11:57
mthaddonniemeyer: go eat!11:57
niemeyermthaddon: Cheers! Will run tests later11:58
wrtpniemeyer: you need to tag the tomb package (or remote all the existing tags)12:23
wrtps/remote/remove/12:23
niemeyerwrtp: Hmm, I believe the tags there are right12:30
wrtpniemeyer: i don't see a go1 tag12:30
wrtpniemeyer: i did go get -u and everything broke12:30
niemeyerwrtp: There isn't one.. that shouldn't be a problem, I believe12:30
wrtpniemeyer: try it12:31
wrtpniemeyer: it went back to release 12, i believe12:31
niemeyer[niemeyer@gopher ~]% GOPATH=$PWD/gopath go get launchpad.net/tomb12:32
niemeyer[niemeyer@gopher ~]%12:32
wrtpget -u12:32
niemeyer[niemeyer@gopher ~]% mkdir gopath12:32
wrtpand then try to build juju/go12:32
wrtpniemeyer: BTW i'm seeing a store test failure: http://paste.ubuntu.com/936825/12:34
niemeyerWill have to increase the timing then.. there's a race there due to the background coutning12:35
niemeyercounting12:35
niemeyerwrtp: Can you please try removing your local tomb package?12:35
niemeyerwrtp: The tags are right12:36
wrtpniemeyer: that worked. maybe the go pull process didn't update the tags properly.12:37
wrtpgotta go to lunch12:37
niemeyerwrtp: That's what I imagined12:38
niemeyermthaddon: Oh, ouch.. forgot a detail12:39
niemeyermthaddon: Can you please update the nagios check with stats=0?12:40
niemeyermthaddon: Btw, did you really intend to hit the store about twice a second with the nagios check?12:49
niemeyerfwereade_: ping12:52
fwereade_niemeyer, pong12:52
niemeyerfwereade_: Heya12:52
niemeyerfwereade_: So..12:52
niemeyerfwereade_: Quick experiment..12:52
niemeyerfwereade_: Don't look at the code for a moment12:52
fwereade_niemeyer, ok :)12:52
niemeyerfwereade_: What has to happen for something to actually be logged?12:52
niemeyerfwereade_: In terms of the command setup12:53
fwereade_niemeyer, someone to call ctx.InitLogging?12:53
niemeyerfwereade_: More..12:53
fwereade_niemeyer, the flags to have been set such that InitLogging does something?12:54
niemeyerfwereade_: More..12:54
fwereade_niemeyer, someone else to call log.Printf/Debugf?12:55
niemeyerfwereade_: That too.12:55
niemeyerfwereade_: The log commands have to be provided, the command has to call InitLog.. Printf has to be called.. SetsLog has to be true..12:55
fwereade_niemeyer, ok, but the breakage occurs at the point where someone calls InitLog12:56
niemeyerfwereade_: In your latest comment, you demonstrate a long chain of recommendations12:56
fwereade_niemeyer, that's the point at which the host process's logging setup is potentially borked12:56
niemeyerfwereade_: but all of them are actually going towards the same goal.. this is too simple a problem for the maze being put in place12:56
niemeyerfwereade_: I'm personally lost in that maze already.. I don't know why we have InitLog anymore, for example12:57
niemeyerfwereade_: I'm sure there's a good reason.. it's just left my consciousness12:57
niemeyerfwereade_: I'd appreciate if we could simplify what's there, rather than introducing additional flags that put logging behind yet another yes/no flag12:58
fwereade_niemeyer, it's a little bit lost in the fog of time for me too, but I seem to recall feeling that the code was confirming it was a good idea when the pile of imports in supercommand dropped significantly12:59
fwereade_niemeyer, I'm all about the simplicity, even if I don't always zero in on it perfectly without help ;)13:00
niemeyerfwereade_: Well, we're all guilty of displeasing the simplicity gods frequently :)13:01
fwereade_niemeyer, it does seem that logging and subcommand selection are essentially orthogonal problems that are only implemented in the same place because it has hitherto been convenient13:02
fwereade_niemeyer, and we're now in a situation where the one does not imply the other, and that therefore they should be broken up somehow13:02
fwereade_niemeyer, a whole new type feels a bit heavyweight; a flag and a bunch of ifs (I agree) feel a bit ugly13:03
niemeyerfwereade_: I think a new type that handles the part of the problem of a supercommand preparing a subcommand to might actually simplify things13:04
niemeyerfwereade_: and make that logic more readalbe13:04
fwereade_niemeyer, awesome; then I'll try that direction13:05
niemeyerfwereade_: It feels clever, and "saves a type" (?), but at the same time this isn't the first "Wait, what?" moment we reach with that logic13:05
fwereade_niemeyer, I was worried you might see it as wanton code raviolation13:05
niemeyerfwereade_: It may be time to at least check how that'd look like13:05
niemeyerfwereade_: I suspect it will be simple by itself, and will also make the supercommand implementation more obvious13:06
fwereade_niemeyer, yeah, I think so too13:06
niemeyerfwereade_: We basically need just a wrapper that handle half of what the supercommand does today, if I understand it well13:06
niemeyerhandles13:06
mthaddonniemeyer: that's haproxy hitting it to confirm the service is up or not - is there a different URL we can use for that?13:06
fwereade_niemeyer, exactly; thanks for the guidance :)13:06
niemeyermthaddon: Cool.. I'm not too concerned about the traffic by itself13:07
* fwereade_ is rather proud of "raviolation"13:07
niemeyermthaddon: At least not yet.. it's good that something is exercising a bit of load there13:07
mthaddonniemeyer: so in terms of updating the nagios check - you want stats=0 used how?13:07
niemeyermthaddon: I just find unfortunate that we don't *actually* had 8000+ people interested in Jenkins in the last hour! ;-)13:07
mthaddonheh13:08
niemeyermthaddon: This is an http query parameter13:08
mthaddonniemeyer: and still for the /charm/oneiric/jenkins URL?13:08
niemeyermthaddon: stats=0 will disable the stats collection13:08
niemeyermthaddon: Yeah13:09
mthaddonniemeyer: and we should update haproxy to use the same?13:09
niemeyermthaddon: Yeah, please13:09
niemeyer8.3k and counting, literally13:09
mthaddonk, thx13:09
niemeyermthaddon: Then, let's clean up stats to avoid the bogus spike please13:10
mthaddonok, I'll let you know when that's done and you can talk me through cleaning up the stats13:13
niemeyerTheMue: Any other branches for review?13:20
TheMueniemeyer: I'm doing the one with the NeedsUpgradeWatcher.13:21
TheMueniemeyer: You mentioned to refactor the test for the ConfigWatcher too. Here I have to think a bit. The ConfigNode has no public fields, only access methods.13:22
TheMueniemeyer: So I'm thinking how I best can test it via tables.13:23
niemeyerTheMue: Thanks, no worries.. just wanted to make sure I wasn't missing something13:25
TheMueniemeyer: Not yet, I'll notify you.13:25
wrtpTheMue: i just got a test failure: http://paste.ubuntu.com/936882/13:26
TheMuewrtp: Oh, strange, here it has been ok (from inside the editor and from commandline just before submit).13:27
wrtpTheMue: i'll try pulling and testing again13:28
wrtpTheMue: i tried again (without pulling) and it succeeded.13:29
TheMuewrtp: Uuuh, even more strange.13:29
wrtpTheMue: it looks to me like that code is racy13:30
wrtpoh, maybe not13:30
TheMuewrtp: In method I use no goroutine13:30
wrtpi wonder what value got received.13:30
wrtpTheMue: WatchConfig starts a goroutine, no?13:30
TheMuewrtp: Yes. I meant inside the test to start changing values later.13:31
wrtpTheMue: i was thinking that we don't know exactly when the channel is closed. but it doesn't (shouldn't?) matter in fact.13:31
wrtpTheMue: slightly concerning, but it seems to pass consistently now.13:33
TheMuewrtp: Needs to get warm. *smile*13:33
TheMuewrtp: I'm currently in that test file and refactor the tests. So please wait a moment if possible, than I can check it too.13:34
TheMuewrtp: For tests you could also take and print the received change. There shouldn't been any one after the error. So I think the value will be nil, but the channel is still open.13:36
wrtpTheMue: yes, the test could print the received value13:36
TheMuewrtp: The 'illegal content error' to be more special.13:36
TheMuewrtp: Otherwise with the race condition it's hard to say "Hey, we know the channel will close soon, but not exactly when.". *sigh*13:40
wrtpTheMue: i don't think there's a race condition13:40
wrtpTheMue: if a value is received, there's an error13:40
wrtpTheMue: (because the watcher has sent a value when it should've)13:41
TheMuewrtp: I've got an idea, but I'm not yet sure. I'll take a look during test refactoring.13:44
niemeyermthaddon: Just run a quick test with the store, btw..13:59
niemeyermthaddon: Can you please mail me logs when you have a moment?13:59
mthaddonniemeyer: which logs are you interested in? there's very little in charmd.log14:00
niemeyermthaddon: That was the one.. if it has little, that's good14:01
mthaddonniemeyer: nothing in there since March14:02
niemeyermthaddon: Super14:02
niemeyermthaddon: Hmm.. can you do me a quick favor?14:04
niemeyermthaddon: How many processors do we have in the frontend servers?14:05
mthaddonniemeyer: each one is 8 cores14:05
niemeyermthaddon: What else run in them?14:05
mthaddonniemeyer: they both run the full stack, apache/haproxy/appserver/mongodb14:05
niemeyermthaddon: Super14:06
niemeyermthaddon: Can you please export an env var14:06
niemeyermthaddon: For charmd, specifically14:06
niemeyermthaddon: export GOMAXPROCS=414:06
mthaddonniemeyer: like this? https://pastebin.canonical.com/64567/14:09
niemeyermthaddon: Yeah, thanks14:10
niemeyermthaddon: I mean, I think..14:10
niemeyermthaddon: Not versed in the syntax there14:11
mthaddonsure, I'll test it first, just checking that looks right in the upstarts script really14:11
niemeyermthaddon: Yeah14:11
niemeyermthaddon: This will allow the runtime to spread the goroutine across more cores14:12
niemeyergoroutines14:12
mthaddonk14:13
niemeyermthaddon: Any luck there? Just want to run another test before we reset the data14:24
mthaddonniemeyer: just filtering through our puppet infrastructure atm - will let you know when it's been applied (currently pending a review from another member of IS)14:25
niemeyermthaddon: Wow, cool14:25
mthaddonbut it "dry-ran" clean, so shouldn't be too long14:26
niemeyermthaddon: I'm heading out for lunch.. I'd appreciate if we could deploy those changes and then do the cleanup today still so that we can start collecting stats for real14:55
mthaddonniemeyer: sure14:56
TheMueniemeyer: https://codereview.appspot.com/6050053/ is in.15:26
wrtpjust gonna reboot.15:38
mthaddonniemeyer: changes all applied - let me know what needs to be done to clean up the stats15:55
rogniemeyer: you said "the ssh identity is configurable" but it's not configurable from environments.yaml. should it be?16:03
fwereade_gn all, might be back a bit later16:09
niemeyermthaddon: Can start with: use juju; db.stat.counters.count()16:20
niemeyerfwereade_: Night!16:20
mthaddonniemeyer: 28816:23
niemeyermthaddon: Nice16:23
niemeyerWell below the 40k+ actual counts made16:23
niemeyermthaddon: So we just have to clean that up16:24
niemeyerdb.stat.counters.remove()16:24
mthaddonok, done16:24
niemeyermthaddon: Thanks!16:24
mthaddonthat's it?16:24
niemeyermthaddon: We're good then16:24
niemeyermthaddon: Yeah16:24
mthaddonsweet, that was easy16:24
niemeyermthaddon: Wait16:24
niemeyermthaddon: Almost.. there's something wrong..16:25
niemeyermthaddon: Something is still poking at the URL without the stats=0 setting16:25
mthaddonhmm, I wonder if haproxy strips the query string...16:25
niemeyermthaddon: It souldn't, at least16:26
niemeyermthaddon: 200+ since reset already16:26
mthaddonmust be haproxy then - I'll take a look - may need to quote the URL or something16:26
niemeyermthaddon: Is the 0 after = a zero?16:28
niemeyermthaddon: I know it's obvious, sorry, but just to be sure16:28
mthaddonyeah, is definitely a zero16:28
TheMueso, off for today, bank appointment. have a nice evening.16:30
mthaddonniemeyer: how are you checking the stats, just so I can confirm when I try a few possible fixes?16:30
niemeyerTheMue: Cheers16:30
niemeyermthaddon: Sent16:30
mthaddonthx16:30
niemeyermthaddon: Meanwhile, I'm checking to see if there's a bug in the code.. I had tests, but maybe the tests are broken16:31
TheMueniemeyer: you've seen, next proposal is in and tomorrow I'll continue.16:31
mthaddonk16:31
niemeyerTheMue: Sounds great, thanks16:31
TheMueniemeyer: np, and have fun at diving16:32
niemeyerTheMue: Cheers man.. will try to provide you some good feedback so you can move on tomorrow16:33
TheMueniemeyer: thx, bye16:33
mthaddonhmm, according to http://code.google.com/p/haproxy-docs/wiki/httpchk, query strings are permitted, and they don't say anything about needing to quote them16:33
niemeyermthaddon: I believe there's a bug in the code.. the test is probably not good enough16:35
mthaddonah, okay16:35
niemeyermthaddon: Will fix it and ping you16:35
niemeyermthaddon: (even if you're not around)16:35
mthaddonniemeyer: cool cool - will pick up the ping in the morning if it's past my EOD and can do a rollout whenever16:36
niemeyermthaddon: Sounds great.. please repeat the remove after the deployment16:36
mthaddonyep yep16:37
niemeyermthaddon: So we can get meaningful numbers from then on already16:37
* mthaddon nods16:37
niemeyermthaddon: Thanks for your help today16:37
mthaddonnp16:37
niemeyerHah.. found the test bug.. the URL being pinged is wrong, which means we don't need stats=0 to not have counters.. :(16:38
* niemeyer fixes it16:39
rog[LOG] 38.27388 JUJU state: ssh error (will retry: true): ssh: Welcome to Ubuntu 11.10 (GNU/Linux 3.0.0-17-virtual i686)17:14
rogha ha17:14
niemeyerrog: :-)17:15
rogniemeyer: i can't see how the python version stops the ssh session from going into interactive mode17:17
niemeyerrog: That's what one of the flags do17:18
rogniemeyer: i'm using all the same flags, i think17:18
rogniemeyer: for the record: "ssh" "-T" "-o" "StrictHostKeyChecking no" "-o" "PasswordAuthentication no" "-L" "localhost:37722:localhost:2181" "-p" "22" "ubuntu@ec2-174-129-123-190.compute-1.amazonaws.com"17:20
niemeyerrog: -N17:20
rogniemeyer: ah, thanks. the python version doesn't seem to use that flag though. strange.17:21
niemeyerrog: Maybe it's doing the unthinkable.. :-)17:22
rogniemeyer: maybe it's ignoring stdout.17:22
niemeyerrog: Right, maybe it *is* sitting idle with a shell.. which would be quite funny17:23
rogniemeyer: that would probably explaining it.17:23
rogniemeyer: yes, i think that's what must be happening. lol.17:23
rogniemeyer: funny, adding that option triggered a "Permissions 0664 for '/home/rog/src/go/src/launchpad.net/juju/go/state/sshtest/id_rsa' are too open." error. ssh *is* baroque.17:27
niemeyerrog: Woah17:28
niemeyerrog: Vhat geev17:28
* rog hopes that bzr respects permissions.17:29
niemeyerrog: Uh oh.. it doesn't17:29
niemeyerrog: +x only17:29
rogguess i'll add a chmod then17:29
niemeyerrog: Yeah, the charm tests do something like that already17:29
niemeyerrog: on init(), IIRC17:29
niemeyerrog: Would you mind to have a quick look at this: https://codereview.appspot.com/607204617:31
rogsure.17:32
rogniemeyer: BTW all tests just passed, using the ssh connect.17:32
niemeyerrog: Woohay17:32
rogwhich is highly satisfactory!17:32
niemeyerrog: I can imagine17:32
niemeyerI'm excited myself17:32
niemeyerThis is a critical roadblock17:33
niemeyerrog: Btw, I'll reduce the 5 back to 2.. that wasn't the issue17:33
rogniemeyer: ECONTEXT17:34
niemeyerrog: The CL17:34
rogoh yeah, i see17:34
niemeyerrog: I've changed the timing there to attempt to cause an error, but I'll put that back17:34
rog:3 lol17:34
niemeyerrog: Seriously..17:34
rogsorry i missed that!17:35
niemeyerrog: The best compilers wouldn't catch that..17:35
niemeyerrog: Sorry that I wrote it!17:35
niemeyer:-)17:35
rogthat's why we have reviewers. i failed!17:35
niemeyerrog: What's funny is that this is *exactly* a case where there was a non-obvious bug on the other side17:36
rogniemeyer: i think the basic problem was that the test was testing for the *absence* of something.17:36
niemeyerA pathetic test when we most need it17:36
rogniemeyer: (which it still does AFAICS)17:36
niemeyerrog: True17:36
niemeyerrog: yeah, but it works now17:36
roglol17:36
roguntil something changes17:36
niemeyerrog: Well.. there's nothing we can do about *that* :-)17:37
rogniemeyer: the test should really try an action that does something, test that the something succeeded, *and* check that no stats were taken17:38
niemeyerrog: That's exactly what it does right now17:38
niemeyerrog: Well, it's not testing that it succeeded17:38
niemeyerrog: That's a good idea17:38
rogniemeyer: yeah17:38
rogniemeyer: how come the GET of /charms/xxx was succeeding, BTW?17:39
niemeyerrog: It wasn't..17:39
rogoh yeah, that was just the NewRequest error check17:40
rogso... that's my feedback17:40
niemeyerrog: Cheers.. already on the way17:40
niemeyerrog: Updated17:42
rogniemeyer: LGTM17:45
niemeyerrog: Cheers17:45
niemeyerrog: Was a good hint, thanks17:45
rogniemeyer: pleasure17:45
niemeyermthaddon: Code is good to go on 122..17:53
niemeyerTaking a short break17:53
=== rog is now known as Guest27265
=== Guest27265 is now known as rogpeppe
rogpeppeniemeyer: https://codereview.appspot.com/6074044/18:00
niemeyerrogpeppe: Cool, I'm sitting down on them now18:52
rogpeppeniemeyer: lovely, thanks18:52
niemeyerrogpeppe: re. the "just in case of what", that was to close the channel18:53
niemeyerrogpeppe: errorc18:54
rogpeppeniemeyer: why would closing it be a good thing?18:57
niemeyerrogpeppe: You're right, looking at how it's used there isn't a good reason indeed18:59
niemeyerrogpeppe: Should -N be added to the list of args?18:59
rogpeppeit is... i thought!19:00
rogpeppeoh, of course, that's in the next CL19:00
rogpeppecan we leave it until the next CL?19:00
rogpeppeit doesn't affect the tests19:00
rogpeppeniemeyer: ^19:00
niemeyerrogpeppe: Yeah, that's fine19:01
niemeyerrogpeppe: Going through the testing right now, btw19:20
rogpeppeniemeyer: cool.19:20
niemeyerrogpeppe: Btw, looking at the issue people are having with the stock ssh package, our decision seems to be paying off19:32
rogpeppeniemeyer: yeah.19:32
rogpeppeniemeyer: plus, i hope we can move away from ssh entirely before long19:32
niemeyerrogpeppe: Indeed19:33
rogpeppeniemeyer: i'll be very happy when i delete this code :-)19:33
niemeyerrogpeppe: Me too :-)19:33
niemeyerrogpeppe: At bed last night I had that crazy thought  that replacing zookeeper with mongodb might not be so hard and may make certain things easier on the transition to an HTTPS API19:35
rogpeppeniemeyer: does mongodb do non-polling notifications?19:35
niemeyerrogpeppe: Yeah, there's a little used trick for that, with capped collections19:35
niemeyerrogpeppe: One can tail a capped collection, basically19:36
rogpeppeniemeyer: have you got a reference?19:36
rogpeppei'm not at all familiar with mongodb19:36
niemeyerrogpeppe: http://godoc.labix.org/mgo#Query.Tail19:36
niemeyerI hope that exists.. /me clicks :)19:36
niemeyerYeah, it does19:36
rogpeppehmm, sounds a bit like a hack to me19:37
niemeyerrogpeppe: Wow, that was quick :)19:37
rogpeppeniemeyer: seems like we'd be building functionality on top of a feature that really wasn't designed to be used that way19:37
niemeyerrogpeppe: I don't know what you mean.. tail was used exactly for that use case19:38
niemeyers/used/created/19:38
rogpeppe"Capped collections are not shard-able". is that a problem?19:38
rogpeppeniemeyer: perhaps it doesn't mean what i think it means19:39
niemeyerrogpeppe: No.. we'd definitely not use shards19:39
niemeyerrogpeppe: shard != replica set19:39
rogpeppeniemeyer: ah19:39
rogpeppeniemeyer: so you could have capped collection with a size of 1 and it would be roughly equivalent to a zk watch?19:40
niemeyerrogpeppe: We'd probably use something like 4 or 8k collections, and watch on specific patterns19:40
niemeyerrogpeppe: I *think* I can recreate exactly the same API we have in the zookeeper package on top of mongodb with some ease19:41
rogpeppeniemeyer: but... what would we gain?19:41
niemeyerrogpeppe: Quite a few things19:41
niemeyer- Non-RAM storage.. means we can drop the use of S3 for several things19:41
rogpeppeniemeyer: that would indeed be nice.19:42
niemeyer- SSL and authentication19:42
niemeyer- Automatic join and departure of cluster members (zk doesn't do that!)19:42
rogpeppeniemeyer: that would be irrelevant if we moved to an HTTPS API19:42
niemeyerrogpeppe: Not entirely.. we can move to HTTPS step by step..19:43
niemeyerrogpeppe: We could switch over to mongodb first, without an HTTPS api, just by reimplemneting the zk package19:43
niemeyerrogpeppe: This is an easy switch over.. no changes to the state package19:43
rogpeppeniemeyer: so you think you can create a "mongo-zk" package that looks almost exactly like the zk package?19:44
niemeyerrogpeppe: Right.. at least almost-exactly-enough to our purposes19:44
rogpeppeniemeyer: that would be quite a cool thing19:44
niemeyerrogpeppe: So very low risk19:44
niemeyerAnother one:19:45
niemeyer- Look ma', no Java!19:45
niemeyer:)19:45
rogpeppeniemeyer: now yer talkin'!19:45
rogpeppeniemeyer: is your mongodb client pure go?19:45
niemeyerrogpeppe: Yeah19:45
rogpeppeniemeyer: another benefit then: no cgo!19:45
niemeyerYep!19:46
niemeyerAlthough that hasn't been much of an issue in practice19:46
niemeyer(Java is)19:46
rogpeppeniemeyer: so... you'd use a collection for each zk node?19:46
niemeyerrogpeppe: No.. a single collection to the whole FS structure, indexed on path19:47
rogpeppeniemeyer: ah, the mgo query defines the watch19:47
niemeyerrogpeppe: Right!19:47
niemeyerrogpeppe: and the watched collection would be a separate one19:48
niemeyerrogpeppe: fs.data and fs.events for example19:48
rogpeppeniemeyer: right19:49
rogpeppeniemeyer: how do you choose a good cap size?19:49
rogpeppeniemeyer: for fs.events, that is19:49
niemeyerrogpeppe: In practice, given what watches means for us today, pretty much anything non-absurdly small would do19:50
niemeyerrogpeppe: They must be large enough for the application to "breath" and still not miss events19:50
rogpeppeniemeyer: yeah, because historical events don't matter of course.19:52
niemeyerrogpeppe: We could pick something like 1M for example, and be pretty sure to never worry except perhaps on absurdly large cases19:52
niemeyerrogpeppe: Right19:52
niemeyerrogpeppe: Funny enough, we might actually avoid the polling we're introducing in the presence package with this mechanism19:57
niemeyerrogpeppe: Since the watching is less ephemeral than with zk proper19:57
rogpeppeniemeyer: i don't *think* so19:58
rogpeppeniemeyer: because we want to know when a client goes away19:58
rogpeppeniemeyer: so we *want* some kind of ephemerality19:58
rogpeppeniemeyer: which is what the presence package gives us19:58
niemeyerrogpeppe: Yeah, indeed.. we still need to update the note19:59
niemeyernod19:59
niemeyernode19:59
rogpeppeniemeyer: but at least we *have* moved away from dependence on ephemeral nodes19:59
rogpeppeniemeyer: which is something you couldn't easily emulate, i think.19:59
rogpeppeniemeyer: so your event collection is just a set of (path, operation) tuples, right?20:00
rogpeppeniemeyer: and Tail is guaranteed to return events in order?20:00
niemeyerrogpeppe: Yeah20:01
niemeyer(to both)20:01
niemeyerrogpeppe: capped collections + tail was implemented to support the operation log of MongoDB itself20:02
niemeyerrogpeppe: Replication is based on that20:02
niemeyerrogpeppe: So we can be pretty comfortable that they'll pay attention to the feature working well20:02
rogpeppeniemeyer: of course, another plus point - we can use mongodb to implement juju logging20:02
niemeyerrogpeppe: True20:03
niemeyerrogpeppe: Not only juju, actually.. we might stream log for all the machines20:03
rogpeppeniemeyer: definitely. i've been wanting to do that.20:03
niemeyerAlthough, we should be careful with that20:04
rogpeppeniemeyer: indeed - we could swamp the network20:04
rogpeppeniemeyer: but for debugging purposes, i think it's crucial20:04
niemeyerrogpeppe: I wouldn't say the network, but the mongodb master for sure20:04
rogpeppeniemeyer: ah20:04
rogpeppei'd be sorely tempted to streamline the "zk" API when redoing it20:06
niemeyerrogpeppe: Well, that's trivial to do after we're done migrating20:08
niemeyerrogpeppe: I mean, I'd be happy to have it improved too20:08
niemeyerrogpeppe: But would try to mimic it precisely first20:09
niemeyerrogpeppe: So we can play with the idea in a risk less fashion until we're certain we want to flip20:09
niemeyerrogpeppe: After flipping, we have no great attachment to it20:09
niemeyerrogpeppe: Review delivered!20:09
rogpeppeniemeyer: yeah, you're right20:10
rogpeppeniemeyer: brilliant, thanks!20:10
rogpeppeniemeyer: i expected more nasties there. thanks a lot. will fix tests in the morning. time to go now.20:14
rogpeppeniemeyer: i expect to see a working version of mongo-zk by then :-)20:14
niemeyerrogpeppe: Haha :)20:15
niemeyerrogpeppe: Given the problem, I quite like the approach20:16
niemeyerrogpeppe: I'd prefer to not have any of it, as you would20:17
niemeyerrogpeppe: Let's just try to make that stuff solid meanwhile, and as clean as possible20:17
niemeyerrogpeppe: In that sense, your branch feels like a win. Thanks.20:17

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