/srv/irclogs.ubuntu.com/2013/03/14/#juju-dev.txt

davecheneym_3: ec2 is having a less pissy day00:16
davecheneyprecise-ec2-charm-alice-irc passed !00:16
m_3davecheney: nice!00:21
davecheneytwo for two00:25
davecheneygoing to try with juju-core 1.9.1200:25
davecheneym_3: and now ec2 is having a sad period01:14
davecheney3 failures in a row01:14
davecheneym_3: aww crap01:28
davecheney        status: error01:28
davecheney        status-info: 'hook failed: "install"'01:28
davecheney+ grep -v -q error01:28
davecheney^ not spotting the problem01:28
* davecheney steps out for lunch01:37
m_3davecheney: ack02:33
m_3davecheney: gonna go get dinner02:33
m_3davecheney: see you on the flipside02:34
thumperdavecheney: review done02:57
thumperdavecheney: I think the version tests should move into the cmd package02:58
thumperthat's about it02:58
davecheneythumper: thanks mate03:18
davecheneywill take another crack now03:18
* thumper is done for today04:10
thumpercaio04:10
wallyworld_davecheney: hi, i'm half way through fixing the raring tests and i noticed you have the card assigned to you. have you started on it yet?05:18
davecheneynah, grab it05:19
wallyworld_awesome thans05:19
davecheney405:19
wallyworld_davecheney: it turns out the git issues can be fixed by setting env vars in setup test. but if we ever deploy on that later version, we will need to ensure the git config is correctly written05:20
davecheneywallyworld_: i could not figure out what was wrong with tims' setup05:20
wallyworld_also, the later version of git in raring has different error messages, and we are doing exact string matches in the tests05:20
davecheneyi tried in a fresh raring vm05:20
davecheneyand couldn't replicate the problem05:21
davecheneywallyworld_: ahh, i have a fix for that05:21
wallyworld_did you have a .gitconfig already?05:21
* davecheney searches05:21
davecheneynot the .gitconfig one, i couldn't replicate the problem05:21
wallyworld_i just changed the tests to use a regexp05:21
davecheneythat'll do05:21
davecheneythat is what I did too05:21
wallyworld_i have never used git before, and i can replicate it05:21
davecheneygo with your version05:21
davecheneymine didn't work :)05:21
wallyworld_i think git has a few ways of knowing your email address05:21
davecheneywallyworld_: thing is05:22
wallyworld_and since tim nor i have any of those, the test sfail05:22
davecheneyin a fresh raring vm05:22
davecheneyther ewas not problem05:22
wallyworld_hmmm, ok05:22
davecheneyi cannot explain what thumper did to his machine05:22
davecheneyand so was unable to fix it05:22
wallyworld_i did a dist upgrade from quantal05:22
wallyworld_anyways, adding set envs in the test setup fixes it05:22
davecheneybrave man05:23
wallyworld_i like to live on the edge05:23
dimiternmorning all08:01
fwereadedimitern, mgz, jtv1: mornings08:45
dimiternfwereade: hey08:46
fwereadedimitern, thanks for the 1152717 review, I've loosened it up a little with a more detailed explanation; about to repropose, would be grateful if you would think of ways to break it ;p08:46
jtv1Hi fwereade08:46
=== jtv1 is now known as jtv
fwereadedimitern, how's the upgrade-charm stuff going?08:47
dimiternfwereade: will do :)08:47
* jtv keeps misreading that nick as "dim intern" :(08:47
fwereadehaha08:47
dimiternfwereade: i'll finish the dreaded 010-upgade-charm-... branch today I hope - still fiddling with tests08:48
dimiternjtv: lol we're the first definitely08:48
dimiternjtv: s/we/you/08:48
jtvI find that hard to believe!08:48
jtvMaybe I'm just the  first who dared to say it.08:48
dimitern:D08:48
fwereadedimitern, cool -- if the morning goes well I might be free to pair after lunch, if that would be useful to you08:49
* jtv may be going just a little bit dyslexic.08:49
dimiternfwereade: that will be best and fastest actually08:50
fwereadedimitern, ok, great08:50
dimiternfwereade: although it's still a bit of a mess at home, so maybe I can come to yours?08:50
fwereadedimitern, surely, cath and laura will be out most of the afternoon I think08:51
dimiternfwereade: sweet, just give me a shout then - we can probably have lunch @cuba or something as well08:52
mgz...seems like a long way to go for lunch...08:53
fwereadedimitern, when's your standup again?08:53
fwereademgz, ;p08:53
dimiternfwereade: 12:3008:53
fwereadedimitern, ok, lunch at 1:30 then?08:53
dimiternmgz: oh, it's maltaspace you know - everything it's but a wormhole away :D08:53
dimiternfwereade: sgtm08:53
fwereadedimitern, reproposed https://codereview.appspot.com/759104408:56
dimiternfwereade: already looking08:56
fwereade<308:56
dimiternjtv: sorry about my bitching about using lbox propose - i didn't realise you forked the maas provider and you're working on it separately08:57
dimiternfwereade: so if we have the same situation s.doc.UnitCount ==1 in local (stale) state, then $gt will fail and we'll retry09:02
fwereadedimitern, yep09:02
dimiternfwereade: looks ok to me09:02
fwereadedimitern, cool09:02
rogpeppemornin' all09:15
jamso, does anyone know what writes "/var/lib/juju/agents/bootstrap/agent.conf" ? I'm playing with the Windows port, and the bootstrap node fails to find that file.09:19
jamI'm guessing it is a bootstrap => cloud-init issue.09:20
jamfwereade: as part of the "pass series into environ", is Arch on the table for poking at? As it seems to only use the juju client Arch (amd64/i386) but I'm not sure that actually makes sense.09:23
rogpeppejam: yes, the cloudinit code should write that file09:23
jam(we only have 64-bit tools available, so why not start a 64-bit instance always)09:23
fwereadejam, arch will be incorporated alongside constraints09:23
rogpeppefwereade: can i presume that https://codereview.appspot.com/7809043 was instigated by you?09:23
fwereaderogpeppe, well, we kinda agreed the business value was insufficient to make it a focus now, but thumper only remembered that when he'd done it09:24
rogpeppefwereade: the problem is that it means that it's a right pain if you want to bootstrap from Go code now09:25
rogpeppefwereade: for instance it breaks builddb09:25
fwereaderogpeppe, and I'm +1 on little steps that make environs clearer and less weirdly coupled, so I think it's still a good move09:25
rogpeppefwereade: that was the main consideration behind the current design09:25
fwereaderogpeppe, hmm09:25
fwereaderogpeppe, builddb can't create a cert independently?09:26
rogpeppefwereade: it *could*, but then it would be duplicating the code in cmd/juju/bootstrap09:26
rogpeppefwereade: if nothing else, the code to generate certs appropriately for an environment should be factored out into environs, so it's at least available to other Go code that wants to bootstrap.09:27
rogpeppefwereade: FWIW i hammered this out for ages with gustavo09:28
fwereaderogpeppe, I agree the cert generation should not be inside cmd/juju, but I think it's the appropriate place to invoke it09:29
jamrogpeppe: so the environs.agent code appears to use "path.Join()" to do these sorts of operations, which means it is trying to shell out to stuff like "bootstrap\agents.conf" rather than "bootstrap/agents.conf"09:30
fwereaderogpeppe, so keeping the functionality in environs sgtm, but I remain -1 on keeping it *inside* environs.Bootstrap09:30
rogpeppefwereade: yeah, i'm not intrinsically opposed to needing two steps to bootstrap (i think that was my favoured choice originally)09:30
jamso.... sigh, lots of code that would act differently on Windows for bad reasons.09:30
rogpeppejam: you mean filepath.Join ?09:30
jtvdimitern: I guessed.  :)  We don't think of it as forking, really, more as a feature branch.  Eventually we'll submit the whole thing for review.  (We'll probably chop it into smaller pieces for easier reviewing)09:30
jamrogpeppe: well explicitly path.Join09:31
jammaybe that one is ok?09:31
fwereaderogpeppe, incidentally, do you recall why builddb lacks tests?09:31
rogpeppejam: path.Join should never produce \09:31
rogpeppefwereade: because it's a quick hack command that gustavo wrote09:31
dimiternjtv: :) I see09:31
fwereaderogpeppe, that's an important part of our infrastructure?part of our09:32
* fwereade sighs gently09:32
rogpeppejam: i was originally trying to be very careful about path hygiene (path vs filepath) but got told that it wasn't worth it - we'd need another pass later, so, yes, everything will break under windows.09:32
rogpeppefwereade: it is?09:32
rogpeppefwereade: it just compiles mongo.09:32
rogpeppefwereade: tbh, it could be a regular charm.09:32
fwereaderogpeppe, doesn't that qualify?09:32
fwereaderogpeppe, true09:33
rogpeppefwereade: the only real test is running it. there's no input and only one possible output.09:33
rogpeppejam: your best bet is to grep for all occurrences of (path|filepath)\.Join and inspect on a case-by-case basis.09:34
fwereaderogpeppe, weeeell... that'd be a test for the charm, right?09:34
jamrogpeppe: well as a start, I need to figure out if this is exactly why it is failing09:34
rogpeppefwereade: yup. but it's not in the charm store. when would that test ever have run?09:35
rogpeppejam: and it's quite an expensive test (n hours on an ec2 instance)09:35
jamrogpeppe: I think you meant fwereade :)09:35
rogpeppejam: i did :-09:35
rogpeppe)09:35
fwereaderogpeppe, surely there are plenty of things that could be tested without actually running the charm? eg that the code compiles, that the charm is actually a valid charm, etc?09:35
rogpeppefwereade: possibly. i think there are more important considerations. if that command fails, it can be dealt with elsewhere.09:36
rogpeppejam: what failure are you currently seeing?09:37
fwereaderogpeppe, if it's not important enough to test it's probably not important enough to exist then?09:38
rogpeppefwereade: probably09:38
rogpeppefwereade: i think gustavo wrote it as more of a proof of concept than anything else.09:39
jamrogpeppe: looks like agent.tools is ok, but trivial.ShQuote is not09:39
jam> '\var\lib\juju\agents\machine-0\agent.conf'09:40
jamnot sure what file that will actually create :)09:40
fwereaderogpeppe, if you're reviewing that branch, maybe tell thumper to correspond with davecheney and figure out if it's ok to drop it?09:40
rogpeppefwereade: ok09:40
fwereaderogpeppe, ideally mongossl ends up in cloudarchive anyway09:40
jamnm, not ShQuote, but c.Dir()09:41
rogpeppejam: that's not a ShQuote issue.09:41
jammaybe??09:41
jamrogpeppe: that is using path.Join() as near as I can tell09:41
rogpeppejam:09:44
rogpeppefunc (c *Conf) File(name string) string {09:44
rogpeppereturn filepath.Join(c.Dir(), name)09:44
rogpeppe}09:44
rogpeppejam: to be honest, i think if we changed all filepath imports to use path, everything would probably work09:45
jamrogpeppe: I haven't found a 'filepath' yet09:46
jamI can see that c.Dir() is returning '/var/lib'...09:46
rogpeppejam: in environs/agent/agent.go09:46
jambut by the time it gets put together into WriteCommands it is \var...09:46
jamright, I guess that code is mixing "where will I read" with "where will I write" and not paying attention to the fact that "where will I write" is running on another OS09:47
jambut as you say, / works on Windows anyway, and for now, the 'where will I read' is always *nix anyway09:48
jamwell prob always Ubuntu even09:48
rogpeppejam: for the time being, yes09:49
jamrogpeppe: so changing that looks good so far, I have to wait for the instance to start up09:49
dimiternhow can I get the caller of a function at run time?09:55
jamrogpeppe: and step 2, mongo doesn't start because the upstart file that gets written was using 'filepath' as well. :)09:55
rogpeppejam: just change "filepath" to "path" throughout the code09:56
dimiternrogpeppe: ^^ ?09:57
jamyeah, that's what I'm thinking as well09:57
rogpeppejam: there will be one or two places where it uses filepath.Walk, and you'll have to fix those, but i think everything else should probably just work09:57
jamdimitern: we used that in the Hooks code for goose09:57
rogpeppedimitern: ?09:57
jamdimitern: http://golang.org/pkg/runtime/09:57
jamruntime.Caller()09:57
dimiternjam: oh, cool 10x09:57
rogpeppeah09:57
rogpeppedimitern: i use a little helper function that gives me the source locations of all callers, all formatted on a single line09:58
dimiternrogpeppe: great! can I have this pls?09:58
rogpeppedimitern: yeah, one mo09:58
dimiternI'm getting an obscure panic and trying to see which call caused it09:59
rogpeppedimitern: import "code.google.com/p/rog-go/exp/runtime/debug"10:00
rogpeppe// Callers returns the stack trace of the goroutine that called it,10:00
rogpeppe// starting n entries above the caller of Callers, as a space-separated list10:00
rogpeppe// of filename:line-number pairs with no new lines.10:00
rogpeppefunc Callers(n, max int) []byte {10:00
dimiternrogpeppe: tyvm10:00
rogpeppedimitern: BTW doesn't the panic give you a stack trace?10:01
dimiternrogpeppe: it does, but it's in another goroutine and it's not helpful10:01
rogpeppedimitern: ah yes10:01
rogpeppedimitern: don't you get *all* stack traces?10:01
dimiternrogpeppe: I do but it's still confusing - there are like 80 goroutines10:02
rogpeppedimitern: what i tend to do in that case is search for functions i'm interested in10:03
rogpeppedimitern: in acme (you can probably do something similar in your editor) i do ,x/(.+\n)*/v/function-i'm-interested-in/d10:04
rogpeppedimitern: which removes all stack traces that don't mention the given function name10:04
dimiternrogpeppe: aha, I can try this10:04
dimiternrogpeppe: actually it's still weird - it's something to do with the watchers - wanna take a look?10:06
rogpeppedimitern: sure - paste away. is this against trunk?10:06
dimiternrogpeppe: no, against the branch I'm working on, but I merge trunk regularly (just did this morning) - http://paste.ubuntu.com/5613199/10:07
rogpeppedimitern: can you reproduce the problem in trunk?10:08
dimiternrogpeppe: no10:08
dimiternrogpeppe: but then again the tests in the uniter/filter will be different10:08
dimiternanyway I still don't get why "watcher was stopped cleanly" is a panic?10:09
rogpeppedimitern: if you get eof from a watcher, it should be because it stopped because of an error.10:10
dimiternrogpeppe: istm there's no way to stop a watcher without a panic10:10
rogpeppedimitern: the only time it there's no error is when the watcher was stopped deliberately10:10
dimiternrogpeppe: that is, if you then call musterr10:11
dimiternand I still don't get how this the the only place where err == nil is a panic10:11
rogpeppedimitern: musterr is used when we know that the watcher is never stopped.10:11
rogpeppedimitern: can you push your branch?10:12
dimiternrogpeppe: ok10:12
dimiternrogpeppe: lp:~dimitern/juju-core/010-uniter-handle-config-upgrades10:13
rogpeppedimitern: from the look of those stack traces, *loads* of watchers have been stopped unexpectedly.10:14
rogpeppedimitern: (look at all the calls to MustErr that are in progress)10:14
dimiternrogpeppe: I saw that, but still no clue what i did wrong10:14
rogpeppedimitern: looks like you might not be cleaning up properly or something10:14
rogpeppedimitern: which test fails?10:15
dimiternrogpeppe: not, sure let me run it with -vv10:15
dimiternrogpeppe: START: context.go:0: FilterSuite.TearDownTest, just after that is the panic10:16
rogpeppedimitern: ah yes, i just worked that out10:16
rogpeppedimitern: ah, i see the problem10:17
rogpeppedimitern: you're not deferring f.Stop10:18
dimiternrogpeppe: I can't see the difference, since it's near the end anyway10:18
dimiternrogpeppe: no, what - which file/line?10:19
rogpeppedimitern: well, it fixes your panic10:19
dimiternrogpeppe: filter_test.go:300 ?10:20
rogpeppedimitern: no :24310:20
rogpeppedimitern: just after newFilter, in TestConfigEvents10:20
dimiternrogpeppe: I'm not, but I'm calling f.Stop() explicitly later10:21
rogpeppedimitern: yes, but you're getting a test failure which means it never gets called10:21
dimiternrogpeppe: right!10:21
dimiternrogpeppe: I was thinking something like that10:21
dimiternrogpeppe: anyway, 10x :)10:21
rogpeppedimitern: np. BTW, i'm not entirely sure why we get the error we do (i'd have thought that we'd get an error when the state is shut down underneath us)10:22
dimiternrogpeppe: yeah, the fix is easy, but understanding the error is hard :)10:23
rogpeppedimitern: feel free to dig in and improve it. you'll get a better understanding of what's going on too if you do :-)10:24
dimiternrogpeppe: once I get it I will :)10:25
rogpeppedimitern: perhaps try to write a little piece of code that reproduces the problem10:25
dimiternrogpeppe: yeah, i have something in mind already10:27
dimiternfwereade: can you take a look please - https://codereview.appspot.com/7425044 - the tests now pass, but I'm surely missing something?10:30
fwereadedimitern, looking10:31
fwereadedimitern, looking pretty good, sent some more comments -- should be able to polish it off today10:54
dimiternfwereade: great to hear!10:54
dimiternmgz: standup?11:31
mgzta11:36
rogpeppesystem hung up on me12:05
rogpeppefwereade: any chance you could have a look at these CLs? https://codereview.appspot.com/7727044/ https://codereview.appspot.com/7727045/12:06
rogpeppe(or anyone else, for that matter (thanks already dimitern!))12:08
dimiternrogpeppe: if you stop the watcher, won't you get this when trying to read on the channel?12:08
rogpeppedimitern: get what?12:09
dimiternrogpeppe: https://codereview.appspot.com/7727045/diff/5001/state/megawatcher.go#newcode10512:09
dimiternrogpeppe: detect the watcher was stopped12:09
rogpeppedimitern: sorry, i'm not sure i understand the question12:09
dimiternrogpeppe: I mean having reply chan struct{} instead12:10
fwereaderogpeppe, looking12:10
dimiternrogpeppe: you mean having a bool instead gives you the possibility to send 2 distinct msgs: watcher closed and ?12:11
rogpeppedimitern: the allWatcher replies with either true (request accepted) or false (the StateWatcher has been stopped)12:11
dimiternrogpeppe: ah, I see12:12
rogpeppedimitern: actually true means "request has been processed, and now contains the reply"12:12
dimiternrogpeppe: thanks for clarifying this12:12
rogpeppedimitern: np. i'll try to clarify the comments appropriately.12:12
rogpeppefwereade: thanks12:12
fwereaderogpeppe, sorry I didn't finish those yesterday -- both LGTM12:22
rogpeppefwereade: cool, thanks12:22
* dimitern lunch12:23
fwereaderogpeppe, if you have a mo I have https://codereview.appspot.com/7591044/ and https://codereview.appspot.com/7715046/ out for review12:26
* fwereade lunch12:26
rogpeppefwereade: ok, thanks, will have a look in a bit12:26
=== benji___ is now known as benji
benjiWhen you guys get a chance I have a small branch up for review: https://codereview.appspot.com/7554046/12:54
=== wedgwood_away is now known as wedgwood
rogpeppefwereade, mramm: hangout?14:02
mrammrogpeppe: sorry, did not wake up for the alarm14:16
fwereademramm, we're pretty much done actually14:17
rogpeppemramm: we're just about done, but still there if you want to join14:17
mrammseems like you finished before I got there... :)14:21
=== teknico_ is now known as teknico
fwereaderogpeppe, https://codereview.appspot.com/7755045 might be trivial -- it's certainly small14:37
rogpeppefwereade: not trivial, i think - i'm having to think a bit14:39
fwereaderogpeppe, ok, definitely not a priority then, I'll leve it lying around unreferenced in kanban and just drop it in a few days unless someone really likes it14:40
rogpeppefwereade: i *think* it's right, but there might have been a good reason i didn't do that before (rather than just not thinking of it)14:41
fwereaderogpeppe, one thing that crosses my mind is that the highest-version behaviour in environs is incompatible -- the highest version (as deployed) will (surely?) be immediately downgraded to agent-version once an agent starts running14:42
rogpeppefwereade: i don't think so14:44
rogpeppefwereade: note line 17714:44
fwereaderogpeppe, not following -- `binary.Number = vers`?14:45
rogpeppefwereade: yeah14:45
fwereaderogpeppe, I'm probably being thick, please explain14:45
rogpeppefwereade: ah, i might have been misreading your remark14:46
fwereaderogpeppe, ISTM that environs gets the highest compatible tools and deploys with those14:46
fwereaderogpeppe, but that the agent that then runs checks for the agent-version in env config14:46
rogpeppefwereade: i can't remember where agent-version gets set originally.14:47
fwereaderogpeppe, and up/down/whatever-grades to that immediately14:47
fwereaderogpeppe, hmm, good question14:47
rogpeppefwereade: in general, if agent version is set, we want to use that version.14:47
fwereaderogpeppe, tools we bootstrp with, or defaults to version.Current14:48
fwereaderogpeppe, I think :)14:48
rogpeppefwereade: agent-version is important - that's how we have any control over what version the agents are running14:49
fwereaderogpeppe, indeed14:49
fwereaderogpeppe, I think environs should be a bit more careful with it14:50
rogpeppefwereade: i'm thinking that the tools selection logic ... yeah14:50
fwereaderogpeppe, but I think thumper's heading in that direction anyway14:50
rogpeppefwereade: AgentVersion defaults to the current version, BTW14:52
fwereaderogpeppe, I think I said that14:53
* rogpeppe continues to study the logic14:59
rogpeppefwereade: i *think* the provisioner should pass the current agent version into StartInstance15:06
rogpeppefwereade: (optionally)15:06
fwereaderogpeppe, +-1, I'm not sure any of that stuff is the provisioner's business15:07
fwereaderogpeppe, if anything should know the env config it's the env ;)15:07
rogpeppefwereade: hmm, good point, the environ should already *know* the agent version!15:07
rogpeppefwereade: but currently it can't tell if it's been set explicitly15:08
rogpeppefwereade: because i think that only if it's not set explicitly should the environ pass HighestVersion in the FindTools flags15:09
=== teknico_ is now known as teknico
rogpeppefwereade: last thing you saw?15:29
fwereaderogpeppe, I said "although I'm now less inclined to take a hard line on that -- if the provisioner were to be running a locatoralike, that would probably be best"15:30
rogpeppefwereade: ah, last thing i saw was:15:30
rogpeppe[15:07:15] <fwereade> rogpeppe, if anything should know the env config it's the env ;)15:30
rogpeppefwereade: last thing you saw from me?15:30
fwereaderogpeppe, in between the two I said " just like the state/pi info we pass in"15:30
fwereaderogpeppe, nothing from you since "(optionally)"15:31
rogpeppe[15:07:50] <rogpeppe> fwereade: hmm, good point, the environ should already *know* the agent version!15:31
rogpeppe[15:08:05] --> teknico_ has joined this channel (~quassel@93-42-34-107.ip84.fastwebnet.it).15:31
rogpeppe[15:08:24] <rogpeppe> fwereade: but currently it can't tell if it's been set explicitly15:31
rogpeppe[15:09:19] <rogpeppe> fwereade: because i think that only if it's not set explicitly should the environ pass HighestVersion in the FindTools flags15:31
fwereaderogpeppe, hmm, yeah, maybe15:32
=== teknico_ is now known as teknico
fwereaderogpeppe, I'm not totally wild about the "highest" behaviour because of the conflict with what the agent upgrader does15:32
fwereaderogpeppe, "highest" STM like a good default for what to set it to when we do upgrde-juju15:32
rogpeppefwereade: i think highest is fine when deploying without a specified version15:32
rogpeppefwereade: if the agent version is not set, that is15:34
fwereaderogpeppe, hmm, ok, if there's nothing in agent-version at *all*, that could make sense15:34
fwereaderogpeppe, but is there ever such a situation?15:34
rogpeppefwereade: that is almost always the case currently15:34
fwereaderogpeppe, I think we set one up at bootstrp time if none is set15:34
rogpeppefwereade: i think15:34
fwereaderogpeppe, environs/config.go:17915:35
fwereaderogpeppe, seems strange not to aim to have everything on the same version in general15:35
rogpeppefwereade: yeah, i'm not sure about that.15:35
rogpeppefwereade: the main case for not doing so is when bootstrapping15:35
fwereaderogpeppe, a random smorgasbord of versions, until one is set explicitly, seems more likely to confuse and upset than nything else15:36
fwereaderogpeppe, I'd be fine with bootstrapping to the highest available when not otherwise set, I think15:36
rogpeppefwereade: i think if you bootstrap, you should get the latest version, regardless of the client15:36
fwereaderogpeppe, ok, sgtm15:36
rogpeppefwereade: so this brings us back to Bootstrap needing to know if the agent version is explicitly set or not15:37
rogpeppefwereade: i *think* i'd be ok if config.Config never looked at version.Current. then all agent-version setting is done explicitly where necessary.15:39
rogpeppefwereade: and then perhaps upgrader would just do nothing if agent-version was not set15:40
rogpeppefwereade: although that should never happen in practice.15:41
rogpeppefwereade: gone again?15:44
fwereaderogpeppe, sorry, only half looking t my own screen15:48
rogpeppefwereade: np15:49
fwereaderogpeppe, yeah, I think I'm ok with that15:49
fwereaderogpeppe, I agree that the upgrader should never see a missing agent-version15:49
rogpeppefwereade: BTW i'd like to know your thoughts on https://codereview.appspot.com/7554046/diff/1/state/apiserver/api_test.go#newcode40415:49
* fwereade looks15:50
fwereaderogpeppe, heh, tricky15:52
fwereaderogpeppe, no, wait, we have a state.State15:52
fwereaderogpeppe, we can implement the test by adding via state and trying to remove via api15:52
fwereaderogpeppe, yesno?15:52
fwereaderogpeppe, I'm -1 on dropping those tests, I think they will become very meaningful again when we start doing the internal API15:53
rogpeppefwereade: i don't want to drop all those tests, just the Client ones.15:54
rogpeppefwereade: and if we ever had any other logic behind them (say different users could do different things), we'd need more again.15:54
rogpeppefwereade: i'd drop all the Client tests except one15:55
fwereaderogpeppe, I think there's still value in checking that all the client methods work the same15:57
rogpeppefwereade: ok. but we really are just testing that single "if" statement in every one of them, because they're all gated through that method.15:58
fwereaderogpeppe, even if it's obvious from the implementation that they do, that only applies today and not in the face of unknowable future changes15:58
rogpeppefwereade: if those changes come, we'll be needing to change the tests anyway.15:58
fwereaderogpeppe, I have a great fondness for the refactor-with-axe, run-tests, see-what-failed approach15:58
fwereaderogpeppe, if we keep those tests then when I do that I can at least see that the bits of implementation that are important enough to care about still act as they did before15:59
rogpeppefwereade: FWIW dropping all but one of those tests shaves 8s off the api test runtime16:02
fwereaderogpeppe, that is to me an argument for making them faster, not for just dropping them ;p16:02
rogpeppefwereade: do you see any way we can make them faster?16:02
rogpeppefwereade: fundamentally we are pretty slow at mutating state16:03
rogpeppefwereade: perhaps there's a magic switch we haven't given to mongod16:04
fwereaderogpeppe, tbh, no, nothing that isn't deeply hackish16:04
fwereaderogpeppe, (magically poke everything into state at once!)16:04
rogpeppefwereade: i don't think that'll help here.16:04
rogpeppefwereade: we're not spending the time in setUpScenario16:05
rogpeppefwereade: (even if we could do that, of course)16:05
fwereaderogpeppe, ah, ok, I thought that was where you'd had problems in the past16:05
fwereaderogpeppe, I bet we *could*, but I'm petty sure it'd be a bad idea16:05
rogpeppefwereade: yeah, that's why i took it out of the loop and made functions return an "undo" function16:05
rogpeppefwereade: if we were doing setUpScenario, the tests would take ages and ages to run16:06
fwereaderogpeppe, if the problem is the operations themselves then I don't see a way out then16:06
rogpeppefwereade: indeed. that's why i think that removing most of the tests which aren't actually testing any existing logic is a reasonable way forward.16:07
fwereaderogpeppe, I dunno, I've been bitten before by changing stuff and assuming that the lack of test failures indicated smart tests and a good change16:08
fwereaderogpeppe, when in fact it was just that nobody had written them in the first place16:08
rogpeppefwereade: to change this behaviour, we'd have to change the Client method - if we put a comment there, i think we'd be ok.16:09
rogpeppefwereade: BTW, if we were running setUpScenario each time, it would add about 116:13
rogpeppe3 minutes to the test time16:13
rogpeppe(that's 3, not 13)16:13
fwereaderogpeppe, ouch :/16:14
fwereaderogpeppe, still, if we can't test authorization behaviour directly I think we have no choice but to do so indirectly16:15
fwereaderogpeppe, and suck up the costs16:16
rogpeppefwereade: actually, we *could* theoretically provide an entry point into rpc that allowed testing access to a particular rpc object without actually calling a method on that object.16:16
rogpeppefwereade: i'd much prefer it if we could make operations on the state faster though.16:17
rogpeppefwereade: so we wouldn't be worrying about this.16:18
fwereaderogpeppe, +1 in at least theory, but I'm hoping to hear something about things that hurt real-world performance from dave before I fret too much in that direction16:19
rogpeppefwereade: i guess so. it might takes 15 minutes just to add 10000 units to state, it's probably not that huge a deal16:20
rogpeppes/takes/take/16:20
rogpeppes/it's/but it's/16:20
fwereaderogpeppe, yeah, we shall see the actual numbers16:21
rogpeppefwereade: well, you can get a best-case scenario by simply calling AddUnit 10000 times on a local state server.16:21
rogpeppefwereade: i suspect it'll be about 10-15 minutes to do that16:22
fwereaderogpeppe, I'm about to head off -- if you have a chance to take a look at https://codereview.appspot.com/7715046/ and/or https://codereview.appspot.com/7591044/ I would be most grateful16:58
rogpeppefwereade: ok, will do16:58
fwereaderogpeppe, cheers16:59
fwereadegn all16:59
rogpepperight, that's me for the day. good night.19:37
=== _thumper_ is now known as thumper
thumpermorning21:10
hatchmorning thumper21:11
m_3thumper: hey... what's the best way to fix `bzr info lp:charms/juju-gui` in-place (without deleting and re-pushing any branches)?21:42
thumperm_3: what do you mean byfix?21:43
m_3thumper: well the stacking seems screwed up21:43
* thumper takes a look21:43
m_3thumper: and we discussed how to _prevent_ such a thing in the future21:43
m_3but I don't think I ever asked how to fix it after the fact21:44
thumperare people creating stacked branches locally ? like on their own machines?21:44
thumperbecause that way lies insantiy21:44
m_3thumper: dunno, I think this is done when people shortcut the promulgation process we discussed last week21:44
m_3i.e., to promulgate, they pull the user branch like lp:~juju-gui/charms/precise/juju-gui/trunk21:45
thumperm_3: you have a copy of it locally?21:46
m_3and then push that same branch up to lp:~charmers/charms/precise/juju-gui/trunk without first creating this repository as a non-stacked branch21:46
m_3yes, I have it locally now21:46
m_3(just merged an MP)21:46
m_3the cleanest way I know of to fix the stacking is to pull a fresh lp:charms/juju-gui, then delete the lp:~charmers owned branch... then push it back up to lp:charms/juju-gui21:47
m_3but that feels heavy-handed, and probably just dumb21:47
thumperm_3: I'm looking...21:49
thumperm_3: even if I find a way, it is not likely to be easy...21:49
m_3thumper: I mainly wanted to check if there was a nice `bzr reconfigure --unstack lp:charms/juju-gui` that should work on the lp repo21:49
thumperwell...21:49
m_3but I've only seen that work locally21:49
thumperkinda, but it breaks if the branch is broken21:49
thumperalthough I have an idea21:49
m_3ack21:49
m_3I think we have like a dozen or so broken ones... I can count21:49
thumperm_3: try the reconfigure --unstacked21:51
thumperm_3: it may be that just the stacked on url is buggered21:51
* thumper no longer has write access to every branch on LP21:51
thumpergave that up ages ago21:52
m_3nope, same... http://pastebin.ubuntu.com/5614925/21:52
m_3most of the others could probably be brute-force fixed... this one'll probably be more difficult b/c of stuff brached _from_ this21:54
m_3dunno tho21:54
m_3thumper: well nothing urgent... it's not killing anything afaik... just ugly21:54
m_3and we'll hopefully stop making them this way soon21:55
thumperdavecheney: what is the builddb command?22:51
thumperdavecheney: rogpeppe suggested to remove the bootstrap from it, but I have no idea what the command is supposed to be22:51
davecheneybuilddb was a command that wrapped a charm that built the mongodb that we use in juju22:55
davecheneyonce we have mongo in a package22:55
davecheneywe can remove it22:55
davecheneys/was/is22:56
thumperhmm... ok22:56
thumperdavecheney: do you agree that builddb shouldn't do a bootstrap?22:57
thumperI'm removing the env cert gen from the environs.Bootstrap function22:57
thumperthe other place this is called is from the builddb command22:58
thumperwe have two choices...22:58
thumperput the cert gen in there too22:58
thumperor as rogpeppe suggests, remove the bootstrap from the builddb command22:58
davecheneydo the second22:58
thumperok22:58
thumpersimple enough22:58
davecheneybuilddb bootstraps an environment22:59
* thumper will have the branch tweaked and ready for a rereview soon22:59
thumperdavecheney: here is some leankit mojo for you22:59
davecheneywe can live without that feature if it spawns a charm in an existing charm22:59
* davecheney listenes22:59
thumperdavecheney: put a link to the codereview on the card22:59
davecheneyusing the advanced tab ?22:59
thumperdavecheney: see my card for the cert gen22:59
thumperdavecheney: yeah22:59
thumperso I added one for "review" with the url23:00
davecheneyahh nice, i once tried using hte general 'link' field23:00
thumperso anyone can go from the board, seeing that there are reviews needed, and go right to the review using the right click, "link to" entry23:00
davecheneybut it was unsatisfying23:00
davecheneyoh thank fuck23:00
thumperwe should tell everyone23:01
thumperit would make it helpful if you are using the board to drive work (which we should)23:01
davecheneyi think some folks use the LP review queue23:01
davecheneybut that is just historical23:01
davecheneynot an indication of best practice23:02
thumperyeah... but everyone should have the board open23:02
thumperI should talk about this more in oakland23:02
thumperI found it very helpful when working with my LP team23:02
thumpernot so useful with PS23:02
thumperas there wasn't buy-in from the devs23:02
thumperwhich was a shame23:02
davecheneywhat did PS use for plannign ?23:04
davecheney(or do I not want to know)23:04
thumperplanning?23:05
sidneidavecheney: does go juju work with canonistack?23:05
thumperyou really don't want to know23:05
davecheneysidnei: in theory yes, in practice, no23:06
sidneiLOL23:06
thumperheh23:06
sidneiwhat's the blocker?23:06
davecheneydue to our requirements for public IPs and the lack of said in canonistack23:06
davecheneyIPv423:06
sidneireally? it needs public ips?23:07
davecheneyyes23:07
thumperTODO: IPv6 everywhere23:07
sidneiyesplease23:08
davecheneythumper: do you remember what we decided in atlanta ?23:09
davecheneywas it going to be a small or large piece of work to separate the concept of instance and public ip ?23:09
thumperdavecheney: for canonistack?23:09
thumperI think jam had a ssh tunnel magic thing that worked23:10
davecheneythat was mgz's 'instance addressing card', from memory23:10
davecheneyoh yeah, stunnel23:10
sidneisshuttle i guess23:13
sidnei(eod)23:14
davecheneythat's the one23:14
davecheneythumper: are you going to do another propose on https://codereview.appspot.com/7809043/ ?23:19
thumperdavecheney: yes23:19
thumperthat is what I'm working on now23:19
davecheneyok, will hold off23:20
thumperdavecheney: what is a LoggingSuite, and why would I want it for the tests?23:22
* davecheney can't remember23:23
thumperdavecheney: another thing23:23
thumperI have two test types I want23:24
thumperone tests internal package functions23:24
thumperthe other tests the exported function23:24
thumperso I want two different _test.go files23:24
thumperso...23:24
thumperdo we have a standard23:24
* thumper tries to remember the defined standard for _test files that magically don't appear in the built files23:27
davecheneyexport_test.go ?23:27
davecheneythumper: the Juju practice of testing outside the package, compared to majority of Go code out there is considered unorthadox23:28
thumperwhat is export_test?23:28
davecheneyjust a hack to expose private symbols to external test code23:28
davecheneythumper: i overhead you talking about this to william in Atlanta23:29
davecheneyit sounded like he didn't have much support for the idea of external testing23:29
thumperwas talking with rogpeppe about this too23:29
thumperI think we should have both types23:29
thumpertesting only at the export boundary is not so good23:29
=== wedgwood is now known as wedgwood_away
thumperso...23:29
davecheneyone suggestoin, not fully considered, $PKG/*_test.go << internal tests23:30
thumperI have added a file environs/cert.go, and I want environs/cert_test.go to be in the environs package and test the internals, and environs/cert_something_test.go to test the public func23:30
davecheney$PKG/test/*_test.go << extenal tests of pkg $PKG23:30
thumper+1 if $PKG/test is $PKG/tests as wthere should be more than one :)23:31
davecheneysure23:32
davecheneyit was just a throwaway idea23:32
thumperactually I like it23:32
thumperbut I think we should go for general acceptance23:32
thumperdo you have any suggestion for just getting this branch in?23:32
thumperI want the external test func in environs_test package23:33
thumperis it all "*_test.go" files that are ignored?23:33
davecheneyyes, _test.go is ignored during go build/install23:35
thumperso...23:35
thumpercert_blackbox_test.go?23:35
* davecheney reads your branch, i'm not sure what the problem is you are hitting23:35
* thumper does that23:35
thumperdavecheney: you don't see the new changes23:35
thumperlet me do this and it will all be obvious :)23:36
davecheneyok23:36
thumperdavecheney: there aren't enums in go are there?23:46
davecheneyno23:46
davecheneythere are consts, and iota defined consts23:46
davecheneybut no enums23:46
thumperI want a two value result, but bool doesn't feel right23:47
thumperdavecheney: so I have a method called EnsureCertificates which returns error right now23:47
thumperbut I want it to also return whether it created the cert23:47
thumperso like (bool, error)23:47
thumperbut bool doesn't really have a meaning with Ensure...23:47
thumperwhat does true mean?23:47
thumperperhaps we just need to put meaning on it23:48
thumpertrue means ensure was all good23:48
thumperfalse means we had to generate the certs23:48
* thumper does that23:48
davecheneythumper: closes we have http://play.golang.org/p/UJV5ff9fCg23:48
davecheneythumper: sounds good enough for the moment23:49
thumperdavecheney: http://play.golang.org/p/zgPWMG_qyj23:53
thumperdavecheney: I prefer to be explicit23:53
thumperdavecheney: how does that look for a public interface?23:53
davecheneythumper: sgtm23:57
davecheneybools are always hard23:57
thumpercool23:57
davecheneyi dislike function calls with f(bool, bool, int, bool, bool)23:57
davecheneythey encourge people to demand named args23:57
davecheneythumper: anyway, this is low level nitty gritty shit23:57
davecheneyso i think it is fine to be explicit23:58
thumperdavecheney: well, we do work for pedantical :)23:58
* davecheney rimshot23:59

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