/srv/irclogs.ubuntu.com/2012/11/27/#juju-dev.txt

=== mohits1 is now known as mohits
fwereade_if anyone who knows this is around, I would very much appreciate a brief state of the union on the initial-password thing07:19
fwereade_ISTM that as it stands we could lose passwords and thereby end up with broken agents07:20
TheMueHowdy08:53
rogpeppedavecheney, fwereade_, TheMue: mornin' all09:05
TheMuerogpeppe: Hiya09:06
davecheneyrogpeppe: morning09:10
davecheneyrogpeppe: i think i got through all of your reviews09:11
rogpeppedavecheney: thank you!09:11
rogpeppedavecheney: there are still more branches pending, but i couldn't propose them because they depended on more than one other branch09:11
davecheneyno, thank you, it is looking good09:11
rogpeppedavecheney: yeah, it's come together ok i think09:12
TheMue*: anyone interested in reviewing https://codereview.appspot.com/6853075/ and https://codereview.appspot.com/6849102/? Both simple and small, the first is a prerequisite for the second.09:13
* davecheney has a look09:16
TheMuedavecheney: Thx for the first one. ;)09:19
fwereade_rogpeppe, TheMue, davecheney, dimitern: hey all09:23
rogpeppefwereade_: yo!09:23
dimiternfwereade_: hey09:23
dimiternI have a question about the http module and httptest09:24
TheMuefwereade_: Hi.09:24
fwereade_dimitern, oh yes?09:24
* fwereade_ tries to load state...09:24
dimiternthere is a mentioning of "patterns" and I initially thought I could set up a Mux.Handle("/urlroot/", handler) and it'll handle also urls like /urlroot/somepath, but apparently not09:25
dimiternit seems there has to be a separate handler for each unique url09:25
fwereade_dimitern, is there a HandleRegex or something?09:26
dimiternfwereade_: not that I see - there is Handle and HandleFunc09:26
fwereade_dimitern, yeah, you're right, not sure where I got that from09:26
fwereade_dimitern, I guess it's a write-your-own situation then (but if you're doing unit testing, won't the paths be predictable anyway?)09:27
dimiternfwereade_: so my initial understanding is correct then - I need to have a master handler and attach others as containers/objects are created on separate urls09:27
fwereade_dimitern, well, it doesn't have to be so complex, this looks sane: http://stackoverflow.com/questions/6564558/wildcards-in-the-pattern-for-http-handlefunc09:28
fwereade_dimitern, but I guess it depends on what you're actually implementing, so I'm not sure whether that will be helpful09:29
dimiternfwereade_: 10x, I'll take a look09:29
rogpeppedimitern: you can do that09:30
dimiternrogpeppe: can you give me an example?09:31
rogpeppedimitern: perhaps you could give me an example that fails09:32
rogpeppedimitern: you're right that ServeMux should let /urlroot/ handle everything under /urlroot09:32
rogpeppedimitern: as the documentation says at http://golang.org/pkg/net/http/#ServeMux09:32
dimiternrogpeppe: hmm, I could not see how this works somehow - my handler is called only when the url matches exactly what was passed to Handle09:33
dimiternrogpeppe: ah, it seems I'm wrong it does handle subpaths, but the root has to be a dir with / at the end09:35
rogpeppedimitern: ah, i wondered if that was the problem09:35
rogpeppedimitern: (i thought it probably wasn't because your snippet above *did* have the trailing slash)09:35
dimiternrogpeppe: yeah, I though it will work in the morning :) after trying a bunch of things yesterday09:36
TheMueSo, both CLs are in for review again.10:05
mrammTheMue: Great10:16
TheMuemramm: So far only a package for LXC, not yet the local provider. ;)10:17
mrammTheMue: understood10:23
TheMuemramm: But step by step I'm coming nearer.10:26
dimiternwallyworld, jam, mgz: https://codereview.appspot.com/6851112 - this is the swift double10:42
jamdimitern: no mp for it?10:42
dimiternjam: there is one in the mail - https://code.launchpad.net/~dimitern/goose/swift-testing-service/+merge/13636210:43
dimiternit's not perfect yet, some more testing with canonistack is needed to verify the responses/codes match every time10:48
jamd10:48
jamdimitern: do we actually get 501 Not Implemented when doing a GET on a container?10:48
dimiternjam: no, but we don't have that API implemented in the client10:48
jamdimitern: so looking a "swiftservice/service_test.go" it seems a bit confused as to whether it is testing the HTTP api or the direct function calls on the service. I would probably try to tease those apart a bit more.10:49
* mgz has a look as well10:49
jamYou can set things up with direct calls, and then have a single HTTP request with asserts on the results, for example.10:49
dimiternjam: I originally wanted to test them separately, but it took so much time to figure out how to do the server right, so i kinda mixed them together so I can have something to show10:50
dimiternjam: yeah, the problem is not all of the direct calls have implemented API calls to test10:51
jamdimitern: is there a reason to check HasSuffix before calling TrimRight? It seems like just calling TrimRight will always be correct (if it doesn't have the suffix, nothing gets trimmed)10:51
dimiternjam: after spending a couple of hours struggling, i tend to get very picky about what to check :) but I suppose you're right - it can be simpler10:52
mgzjam: any idea why passing -gocheck.v when running tests makes it so no tests are run?10:57
jammgz: because "go test" isn't very good?10:57
jam./... is incompatible with passing argument10:57
jamarguments10:57
mgz>_<10:57
jamso '-gocheck.v' must be run in a package one-by-one10:57
jammgz: what you are missing is that it *is* running the 'goose' test suite, which doesn't have any actual test cases.10:58
mgz(cd http && go test -gocheck.v) style thing?10:58
jammgz: correct.10:58
mgzta.10:58
jamI'm very ready to add a Makefile10:58
jamto work around this sort of thing.10:58
jam-live has the same problem.10:58
mgzah, I'd not connected up that issue with this one10:59
jammgz: -live *also* has the problem that not every test suite supports -live, so 'go test -live ./...' is trying to pass it to every sub suite. But there are some weird things about "go test ./... -gocheck.v" not acting the same as "go test -gocheck.v ./..." etc.11:04
niemeyerGooood mornings/evenings11:14
fssniemeyer: morning :-)11:14
fwereade_niemeyer, heyhey11:15
davecheneymorning/evening11:15
fwereade_niemeyer, I have a thought re Container, and our shared discomfort yesterday -- I'm getting surer and surer that the existing Container is not Container at all, but something more like Deployer (notwithstanding the confusion with the mooted worker of the same name)11:16
fwereade_niemeyer, the existing one deploys units onto the local system; one day there will be one that deploys units into isolated containers11:16
fwereade_niemeyer, either way we're interested in a <thing> with Add/Remove/List functionality11:17
niemeyerfwereade_: Agreed on the latter.. I think the former is a red herring at this point11:17
fwereade_niemeyer, the name, you mean?11:18
niemeyerfwereade_: I'd be happy to rename if it feels better to you11:18
fwereade_niemeyer, I'm ok with keeping it Container but only because I want to call the worker Deployer11:18
fwereade_niemeyer, I'd be happiest if we could come up with clear independent names11:18
niemeyerfwereade_: Actually, no, you're right.. Container is wrong11:18
niemeyerfwereade_: It doesn't really deploy a new container when we're deploying a subordinate11:19
fwereade_niemeyer, exactly11:19
fwereade_niemeyer, I've consider variations on Placer, Deployer, etc, nothing has really made me happy11:20
mgzwallyworld: eg:11:21
mgz        // Ensure that it conforms to the interface11:21
mgz        var _ IdentityService = identity11:21
niemeyerfwereade_: Installer?11:22
davecheneyi prefer deployer11:22
* davecheney isn't helping11:22
niemeyermgz: Although, that's rarely really necessary, since you'll end up using the interface somewhere in the code11:23
niemeyermgz: An exception would be cases where you the interface is purely for the benefit of outsiders11:23
niemeyers/you//11:23
fwereade_niemeyer, yeah, I'll try that11:27
niemeyerdavecheney: https://codereview.appspot.com/6854098/ seems to have the same testing issue of the previous change11:41
niemeyerdavecheney: Maybe we should talk about this in the meeting11:41
dimiternjam, davecheney: thanks for the review11:42
niemeyerdavecheney: I think the agenda is locked up for writing11:42
mrammis there an agenda google doc?11:43
niemeyermramm: davecheney sent one to c-juju11:45
mrammgot it11:46
mrammbut yea, it's locked for me11:46
davecheneyffs, google docs is supposed to be easy11:57
davecheneyfixed11:57
niemeyerdavecheney: Good trick to define an agenda, though.. I'll keep that on the sleeve :_011:59
niemeyer:-)11:59
niemeyerfwereade_, rogpeppe, davecheney: Meeting time12:01
niemeyerjam: Meeting?12:03
jamniemeyer: I didn't get the invite, I think12:03
niemeyerjam: https://plus.google.com/hangouts/_/6bf74b0f9014d194ecf62a78f75351a1876c5490?authuser=0&hl=en12:04
davecheneythis hangout is full12:40
davecheneyniemeyer: can you kick my ghost if he is still in the chat ?12:40
niemeyerdavecheney: Can't, but it just went away12:41
davecheneydid everyone get kicket ?12:41
niemeyerdavecheney: Nope, just your connection dropped12:41
davecheneymramm2: common back buddy12:46
mramm2trying12:46
mramm2getting hangout full message when I try to reconnect12:47
davecheneytry again12:47
mramm2so that answers the 15 person limit question...12:47
davecheneyyour doppleganger has left12:47
jammramm2: do you want to give an overview of what you wanted for Juju 2.0 release plans?12:49
mramm2Dave, can you talk people through the document we created?12:50
mramm2I will keep trying to rejoin the meeting12:50
dimiternI got kicked out as well and now it's saying hangout full12:55
davecheneydimitern: wait a few mins12:55
davecheneymaybe 212:55
jamprobably it has to timeout the connection12:55
dimiterndavecheney: ok12:55
davecheneythen you're shadow leaves12:55
jamdimitern: try now12:55
jamit just dinged you leaving12:55
davecheneydimitern: that is what happened to me12:55
rogpeppemramm2: you're frozen12:58
davecheneymramm2: you can now get back in12:59
davecheneyyour guy has left12:59
niemeyer_My connection died..13:01
niemeyer_Perfect timing13:01
niemeyer_davecheney: ping13:02
mrammWe can pick up that discussion next week13:02
fwereade_lunch, bbiab13:02
mrammnothing particularly urgent about it13:02
mramm0:01 mramm: flipping wifi13:02
mramm20:02 mramm: sorry, the wifi dropped13:02
mramm20:02 mramm: We can pick up that discussion next week13:02
mrammI tried switching over to my cell phone and 3g13:03
mrammbut that took forever, and didn't work very well anyway13:03
mrammso sorry about all that13:03
dimiternmramm: you're still in thailand?13:03
mrammyea13:04
mrammfor another week13:04
mrammI will be on vacation tomorrow through friday again13:04
* dimitern lunch as well13:04
=== niemeyer_ is now known as niemeyer
niemeyerMr. Ramm³13:10
mrammand now my wifi signal is back to zero packet loss13:35
mramm(spoke too soon, now back to loosing packets like mad) :(13:35
rogpeppemramm: G+ scorched the airwaves13:35
mrammyea13:36
mrammanyway, thanks everybody13:36
fssniemeyer: ping13:39
fssniemeyer: I've sent two news CLs for goamz regarding iam support13:42
fssniemeyer: https://codereview.appspot.com/6858081/13:42
fssniemeyer: and https://codereview.appspot.com/6855104/13:42
fssniemeyer: have fun :-P13:42
niemeyerfss: Brilliant, thanks :)13:47
hazmatniemeyer, got time to meetup today re charm collection? i had scheduled a meeting for a few minutes from now, but happy to relocate if you'd prefer13:52
niemeyerhazmat: It's about noon local time13:53
hazmatniemeyer, meaning lunch time? would +1 hr work better?13:55
niemeyerhazmat: We can do it at 16UTC if that works for you13:57
hazmatniemeyer, sounds good, thanks13:59
niemeyerhazmat: np13:59
rogpeppeniemeyer: --ca-cert flag branch might be ready to roll now: https://codereview.appspot.com/6842088/14:20
niemeyerrogpeppe: "the branch that adds that field has only just landed, and i've been trying to minimise prereqs."14:21
niemeyerrogpeppe: Ah, nevermind14:21
rogpeppeniemeyer: it seemed a reasonable compromise because that was the only dependency.14:22
niemeyerrogpeppe: What about cmd/filevar.go?14:23
rogpeppeniemeyer: i replied about that14:23
rogpeppeniemeyer: it actually makes things harder14:23
niemeyerrogpeppe: Sorry, I've missed the comment when going through the review14:23
niemeyerrogpeppe: I see it now.. just a sec14:23
niemeyerrogpeppe: LGTM, thanks for the changes14:24
rogpeppeniemeyer: cool, thanks. my only blocker to proposing the rest of the changes is now https://codereview.appspot.com/6782119/14:24
niemeyerrogpeppe: Woot14:24
niemeyerrogpeppe: I'll get to that after lunch14:24
rogpeppeniemeyer: that would be ace, thanks14:25
niemeyerLunch, biab14:36
fwereade_rogpeppe, btw, I was meaning to ask15:22
fwereade_rogpeppe, what's the roadmap wrt --initial-password?15:22
rogpeppefwereade_: how do you mean?15:23
fwereade_rogpeppe, I can't see anywhere that the new password is stored -- how do we reconnect after we bounce?15:23
rogpeppefwereade_: ISTR it is stored, let me check.15:23
fwereade_rogpeppe, I'm probably just being dense then15:24
rogpeppefwereade_: oh i remember15:24
rogpeppefwereade_: it is stored, but not explcitly15:24
fwereade_rogpeppe, it is stored in the state, it is true, but AIUI one needs the password to access the state to read the password, IYSWIM15:24
fwereade_rogpeppe, ah go on15:24
rogpeppefwereade_: it's in the command line arguments stored in the upstart file15:25
rogpeppemaybe15:25
fwereade_rogpeppe, I'm not sure I approve of agents rewriting their own upstart files15:25
rogpeppefwereade_: they don't need to15:25
fwereade_rogpeppe, I think that's their installer's responsibility alone15:25
rogpeppefwereade_: the initial password is just that - the initial password15:25
rogpeppefwereade_: when they start up, the agents create a new random password and save that15:26
fwereade_rogpeppe, where is it saved?15:26
rogpeppefwereade_: (check out openState in jujud/agent.go)15:26
fwereade_rogpeppe, GAH thank you15:27
* fwereade_ is unsure how he missed that15:27
rogpeppefwereade_: a quick grep for WriteFile reminded me15:27
fwereade_rogpeppe, that file totally addresses all the things I've been confused about15:28
fwereade_rogpeppe, tyvm15:28
rogpeppefwereade_: np15:28
rogpeppefwereade_: i'd like a chat about some aspects of the transition to the API at some point15:28
rogpeppefwereade_: if you've a moment, perhaps we could do a G+15:29
fwereade_rogpeppe, sure, just a mo15:29
fwereade_rogpeppe, invite away, I won't be more than a couple of mins15:30
rogpeppefwereade_: done15:31
niemeyerhazmat: ping16:04
hazmatniemeyer, pong16:09
hazmatniemeyer, need 5m.. in team meeting16:10
niemeyerhazmat: 'k16:10
hazmatniemeyer, https://plus.google.com/hangouts/_/db47985b7be28b5f158ccd0912e0df10e7aa029f16:15
niemeyerhazmat: Just finishing a review16:16
niemeyerrogpeppe: Review mostly done16:21
niemeyerrogpeppe: Sent a few comments that need action16:21
niemeyerrogpeppe: Skimmed through the rest as hazmat wants to talk16:21
niemeyerrogpeppe: Will re-review once you repush16:22
niemeyerhazmat?16:22
rogpeppeniemeyer: thanks!16:23
hazmatniemeyer, ready.. at hangout url above16:24
hazmatoh..16:24
niemeyerhazmat: That's where I am16:24
hazmati guess i killed it16:24
rogpeppeniemeyer: all done, i think. https://codereview.appspot.com/678211916:50
niemeyerrogpeppe: Checking16:51
niemeyerrogpeppe: That's done17:01
niemeyerrogpeppe: Very nice17:01
rogpeppeniemeyer: cool!17:01
rogpeppeniemeyer: thanks a lot. prepare for a few more CLs...17:02
rogpeppeniemeyer: BTW the zero-case in your suggestion could never happen, because X509KeyPair would return an error in that case.17:03
rogpeppeniemeyer: perhaps i should just change the check to >117:03
rogpeppeniemeyer: because that case can actually happen, potentially.17:03
rogpeppeniemeyer: although... your suggested error message is fine too. i'll just use that.17:04
* TheMue also has the two CLs https://codereview.appspot.com/6853075/ and https://codereview.appspot.com/6849102/ open for further reviews, first feedback has been entered.17:19
TheMueAnd tomorrow I'll start outlining the local provider. But until then have a nice evening.17:21
rogpeppe1 conflict resolved, 15 remaining17:47
rogpeppei just love it when a file looks like this: http://paste.ubuntu.com/1392259/17:49
rogpeppeand i need to choose bits from both source and tree17:50
fwereade_rogpeppe, oh, fun17:54
rogpeppefwereade_: i'm getting through it. "tree for this, source for that, ooh, a bit of source needed in that tree, ah, a bit of tree needed in that source." it's not too bad really, just a pain17:55
dimiternI'm getting &http.badStringError{what:"malformed HTTP response", str:"0"} ("malformed HTTP response \"0\"") from the client, when the test server sends a perfectly valid HTTP 204 No Content response with no body17:57
dimiternthe "0" str is the end of the body (0\r\n delimiter, as per the transfer-encoding - chunked)17:58
dimiternrogpeppe, niemeyer: any idea what I'm doing wrong?  ^^17:59
rogpeppedimitern: can you narrow the code down to a small test case?18:00
dimiternthere are no errors on the server part - did logging, sniffing with wireshark - all looks fine, just the client part is not liking what it's own server module serialized..18:00
dimiternrogpeppe:  well, I'll try and post a paste18:01
dimiternrogpeppe: I got it!18:13
rogpeppedimitern: often happens that way :-)18:13
rogpeppedimitern: what was the problem?18:13
dimiternrogpeppe: http://paste.ubuntu.com/1392332/18:13
dimiternrogpeppe: don't know yet, but managed to isolate it - it happens every odd request18:13
rogpeppedimitern: cool18:14
rogpeppedimitern: i have a call to go down to eat - will take a look after food18:14
dimiternrogpeppe: cool, 10x18:15
dimiternniemeyer: ping18:21
niemeyerdimitern: Yo18:21
dimiternniemeyer: hey, are you aware of some weird issues with sending responses with no body multiple times in a row ? see the paste ^^ and run it, if you have 5 mins18:22
niemeyerdimitern: Hmm18:23
niemeyerdimitern: I'm not aware, looking18:23
dimiternniemeyer: that's an example of the error i'm getting in my module, stripped down18:23
=== cmagina_ is now known as cmagina
dimiternniemeyer: if you run it, every odd request ends in an error, but the even ones pass - wierd18:23
niemeyerdimitern: Interesting, let me understand what this is doing18:24
dimiternniemeyer: not much, it seems sending no body in the handler is enough to trigger this on the client side18:25
dimiternniemeyer: it seems related to the fix proposed here: http://code.google.com/p/go/issues/detail?id=1388 - I get the error exactly on the line "if len(f) < 2"18:27
niemeyerdimitern: Interesting18:30
dimiternniemeyer: it also happens with go-tip, just checked18:31
niemeyerdimitern: This is what goes in the wire, and why you see the odd/even behavior: http://pastebin.ubuntu.com/1392393/18:31
niemeyerdimitern: That "0" shouldn't be there18:32
dimiternniemeyer: yes, that 0 looked weird to me, until I checked the HTTP Transfer-Encoding header: http://en.wikipedia.org/wiki/Chunked_transfer_encoding18:32
dimiternniemeyer: and it seems 0\r\n should be there when no body exists, in addition no Content-Length header is present - HTTP/1.1 stuff18:33
dimiternniemeyer: what puzzles me is why it happens only every other request, if it's malformed - it should either pass or fail always18:34
niemeyerdimitern: Due to the 018:34
dimiternniemeyer: maybe if I somehow force HTTP/1.0 with Content-Length - that's a possible workaround18:35
dimiternniemeyer: yeah, the 0 borks it, but you see my point, right?18:35
niemeyerdimitern: Which of them?18:36
dimiternniemeyer: the inconsistent result - it fails every second request, when the code is doing the same18:37
niemeyerdimitern: Because of the ero18:37
niemeyerzero18:37
niemeyerdimitern: it's being observed as a response18:37
dimiternniemeyer: this looks like a bug in net/http for me18:37
niemeyerdimitern: It definitely is18:38
niemeyerdimitern: The example is trivial18:38
rogpeppedimitern: yeah, definitely looks like a bug18:39
rogpeppedimitern: you should raise an issue18:39
rogpeppedimitern: in the meantime, i guess the fix is just don't use that http status...18:40
dimiternrogpeppe: or maybe using HTTP/1.0 instead?18:41
niemeyerdimitern: Just send a 200 status without content18:41
niemeyerdimitern: I'm pretty sure the bug is related to the 204 result18:42
niemeyerdimitern: Or do you need the 204 for some reason?18:42
dimiternniemeyer: well, yes I need it - i'm trying to mimic Swift as much as possible, including response codes18:42
niemeyerdimitern: Cool, give me a moment then18:42
niemeyerdimitern: Write this before the WriteHeader line:18:43
niemeyerw.Header()["Content-Length"] = []string{"0"}18:43
dimiternniemeyer: ok, I'll try that18:44
dimiternniemeyer: works18:45
niemeyerdimitern: Super18:45
dimiternniemeyer: so I'll file a bug in go then18:45
niemeyerdimitern: Thanks18:45
niemeyerdimitern: That disables chunked encoding, avoiding the code path18:46
niemeyerdimitern: It feels like the bug is in the reading side18:46
niemeyerdimitern: And it's not entirely surprising.. using chunked encoding with a zero length content is a bit weird18:46
dimiternniemeyer: yeah, exactly my point18:46
niemeyerdimitern: So I honestly can't tell whose fault it is without diving in the spec..18:47
niemeyerdimitern: Either way, the http package should be resilient to such mistreating18:47
dimiternniemeyer: I expected so yeah, anyway - I'll do my good deed for the day filing the issue18:48
rogpeppeniemeyer, dimitern: presumably: w.Header().Set("Content-Length", "0") would be an equivalent (and slightly nicer looking) workaround?18:52
dimiternrogpeppe: indeed - works like that and looks better18:54
dimiternniemeyer, rogpeppe: thanks for your help, I'm off18:57
rogpeppedimitern: np. have fun.18:57
rogpeppeniemeyer: fairly trivial: https://codereview.appspot.com/6847114/19:22
niemeyerrogpeppe: Looking19:27
rogpeppeniemeyer: and this is the last significant step before actually enabling TLS: https://codereview.appspot.com/6854107/19:29
niemeyerrogpeppe: Done19:35
rogpeppeniemeyer: thanks19:35
niemeyerI'll step out for a while.. will be back later to tame the review queue a bit further19:42
rogpeppeniemeyer: the final step: https://codereview.appspot.com/6856105/20:04
rogpeppeniemeyer: one issue that occurs to me: perhaps we should bump the major version number with this CL, because it's incompatible with the previous version.20:05
rogpeppeniemeyer: it would give us a chance to see what it's like to bump the major version too20:06
rogpepperight, that's me for the night, a good place to stop i think20:06
fwereade_yay! the Installer does the Right Thing, and the machine can now clean up after its units22:10
fwereade_on a sour note, I suspect the mysql charm of pooing a "mysql.passwd" file into /var/lib/juju22:11
fwereade_hey ho22:11
niemeyerfwereade_: Woohay!22:43
fwereade_niemeyer, I have noticed a couple of minor stupidities in the branches still in the queue, but I think nothing unfixable; I'll updat ethem tomorrow22:44
niemeyerfwereade_: Sounds good22:44
fwereade_niemeyer, and will be able to propose this as well; assuming you feel the series is sane enough, I can start merging through from machine-string-ids onwards22:45
niemeyerfwereade_: Superb22:46
niemeyerfwereade_: What are the details you'd like to fix about?22:52
niemeyerfwereade_: Just so I know once I go over them22:52
niemeyerfwereade_: You've got a review..23:40
niemeyerfwereade_: Great stuff23:40

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