[00:00] <davecheney> niemeyer: just a quick double check https://codereview.appspot.com/6601056
[00:18] <davecheney> niemeyer: do you want review this goamz patch ? https://code.launchpad.net/~mirtchovski/goamz/ec2
[00:24] <niemeyer> davecheney: LGTM on first, thanks
[00:24] <davecheney> niemeyer: ta
[00:24] <niemeyer> davecheney: Do you need something from the second?
[00:25] <davecheney> what is the code review policy for goamz
[00:25] <davecheney> the key change for that branch is adding DescribeImages
[00:26] <davecheney> as the user (f2f in #go-nuts) has created their own ami's
[00:26] <davecheney> whereas we use the ubuntu cloud image finding service thing
[00:27] <davecheney> niemeyer: does turning on debug in ec2 dump my secret key ?
[00:27] <davecheney> ie, is it safe to post this whole debug log ?
[00:28] <niemeyer> davecheney: I don't know..
[00:28] <niemeyer> davecheney: There's a lot pending in goamz.. someone needs to dedicate some time to it
[00:29] <niemeyer> davecheney: We also require people to sign the contribution agreement on external contributions to Canonical code bases
[00:29] <niemeyer> davecheney: Has he signed?
[00:29] <davecheney> niemeyer: i doubt he's signed anything
[00:29] <davecheney> niemeyer: https://bugs.launchpad.net/juju-core/+bug/1061941
[00:30] <davecheney> ^ debug in issue
[00:32] <niemeyer> davecheney: Okay, can you figure why it is broken?
[00:33] <davecheney> i'm sure it's the length of the URL, or some component of that
[00:33] <davecheney> bisecting the problem now
[00:35] <niemeyer> davecheney: That debug info doesn't say much.. the meat is usually inside sign.go
[00:35] <niemeyer> davecheney: We had it broken sometime ago due to a change in the way path was handled
[00:36] <niemeyer> davecheney: Ah, wait
[00:36] <niemeyer> davecheney: It could be about the encoding of the + there
[00:37] <davecheney> niemeyer: right o
[00:37] <niemeyer> davecheney: Not how the signature has a %2B
[00:37] <niemeyer> davecheney: Note
[00:37] <davecheney> yup, that will proably screw itup
[00:37] <davecheney> damn spaces
[00:38] <davecheney> niemeyer: there is a certain number of instances where it does work for
[00:38] <davecheney> i'm figureing out that number, it's like 3 or less I think
[00:39] <niemeyer> davecheney: This may match the chances of getting a signature with a given shape
[03:58]  * niemeyer => bed
[03:58] <niemeyer> Night all
[06:08] <rogpeppe> fwereade_: mornin'
[06:09] <rogpeppe> davecheney: hiya
[06:21] <TheMue> morning
[06:29] <davecheney> morning gents
[06:33] <fwereade_> rogpeppe, heyhey
[06:33] <fwereade_> davecheney, heyhey
[06:33] <fwereade_> TheMue, heyhey
[06:33] <TheMue> hi all
[06:55] <fwereade_> rogpeppe, I've been chatting to niemeyer about jujuc.HookContext
[06:55] <rogpeppe> fwereade_: ok
[06:55] <fwereade_> rogpeppe, we are agreed that it should be an interface, and nothing more specific has been said
[06:56] <rogpeppe> fwereade_: interesting.
[06:56] <fwereade_> rogpeppe, I have had a crazy idea, that the interface we *really* want may actually be a jujuc.Conn, with the same thinking behind it as juju.Conn
[06:56] <rogpeppe> fwereade_: i think of it as quite concrete, but i'm interested where you end up
[06:57] <rogpeppe> fwereade_: juju.Conn isn't an interface :-)
[06:57] <rogpeppe> fwereade_: what different implementations of this interface do you envisage?
[06:59] <fwereade_> rogpeppe, the purpose is to separate the server and the commands cleanly from all the crap in RelationContext that is in the wrong place
[06:59] <fwereade_> rogpeppe, by making an interface and moving the existing implementation off into uniter we can start to collapse Relationer and RelationContext into something interesting
[07:00] <fwereade_> rogpeppe, the fact that it will also be possible to write neater contexts in the jujuc tests is both a bonus and a hassle
[07:01] <rogpeppe> fwereade_: i'm not sure i see the relationship with juju.Conn. doesn't the context need to know the context within which the commands work (i.e. the current unit, relation, etc) ?
[07:02] <fwereade_> rogpeppe, well, yes, but I think we can expose all that clearly and usefully in terms of capabilities rather than things
[07:02] <fwereade_> rogpeppe, no need for a *state.Unit in the Conn(?) has an OpenPort method, etc etc
[07:03] <fwereade_> s/ in / if /
[07:03] <fwereade_> rogpeppe, and then I thought "hmm, juju.Conn presents a convenient high-level interface with state"
[07:04] <rogpeppe> fwereade_: what about commands that operate relative to the context?
[07:04] <fwereade_> rogpeppe, "this situation has at least one interesting parallel"
[07:04] <rogpeppe> fwereade_: e.g. unit-get, relation-get etc
[07:04] <fwereade_> rogpeppe, they basically all do...
[07:04] <rogpeppe> fwereade_: yeah, so it won't look much like juju.Conn then, i guess
[07:04] <rogpeppe> fwereade_: but you could certainly provide primitives that look like the ones the commands require
[07:05] <fwereade_> rogpeppe, yes, that is the commonality I am thinking of
[07:05] <rogpeppe> fwereade_: but then, does that really save you much?
[07:05] <rogpeppe> fwereade_: over just writing the commands, using the stuff inside the context
[07:06] <fwereade_> rogpeppe, well, it's basically a straight move of code inside the context
[07:07] <rogpeppe> fwereade_: i guess i don't really see where the pressure here is. could you explain what the problem is with the current structure?
[07:08] <fwereade_> rogpeppe, primarily that relationy responsibilities are unhelpfully smeared across two modules, and I will be able to express things much more clearly
[07:08] <fwereade_> rogpeppe, by combining RelationContext and Relationer with some of HookContext
[07:10]  * rogpeppe is thinking
[07:10] <fwereade_> rogpeppe, a server module that contains nothing but the server and the commands, and implements them in terms of an interface, will allow me the freedom to butcher the existing types and construct a magnificent assemblage from their parts :)
[07:13] <rogpeppe> fwereade_: perhaps you could put together a sketch of how you think the types might work?
[07:15] <rogpeppe> fwereade_: i guess i don't really see how an interface will work. who will implement the interface?
[07:15] <fwereade_> rogpeppe, something in uniter whose true nature will only become apparent as i integrate relations
[07:16] <fwereade_> rogpeppe, for now, the existing HookContext and RelationContext will move into uniter and be manipulated by Relationer as before
[07:16] <fwereade_> rogpeppe, they'll just be tweaked to implement the interface
[07:16] <rogpeppe> fwereade_: the difficulty i see is that you've got two kinds of context going on, and one is a superset of the other AFAICS
[07:16] <fwereade_> rogpeppe, expand please
[07:17] <rogpeppe> fwereade_: well, aren't the commands that you can execute in a relation hook more-or-less a superset of the commands you can execute in a non-relation hook?
[07:17] <fwereade_> rogpeppe, no, they're exactly the same
[07:17] <fwereade_> rogpeppe, you just might need to specify things that aren't present in a non-relation context
[07:19] <rogpeppe> fwereade_: ok, so... i still don't see the interface thing. it's only useful to have an interface if you've got multiple implementations of it, in my view.
[07:19] <rogpeppe> fwereade_: and i still don't see how that applies here
[07:20] <rogpeppe> fwereade_: couldn't you just move HookContext into relationer? (with possible renaming/restructuring along the way)
[07:21] <fwereade_> rogpeppe, no: import cycles
[07:21] <fwereade_> rogpeppe, that *is* the right place for it
[07:21] <rogpeppe> fwereade_: what's the import cycle there?
[07:21] <fwereade_> rogpeppe, the uniter needs to import jujuc to do stuff with the context; jujuc needs to import uniter to know wtf it's been given
[07:22] <fwereade_> rogpeppe, it could have its own package
[07:22] <fwereade_> rogpeppe, and that package will still exhibit the original problem
[07:22] <rogpeppe> fwereade_: if the context was in relationer, the uniter wouldn't need to import jujuc, no?
[07:22] <fwereade_> rogpeppe, there is no relationer package
[07:22] <fwereade_> rogpeppe, and I don;t think there should be
[07:22] <rogpeppe> fwereade_: i think we're getting closer to the crux of the issue here.
[07:23] <fwereade_> rogpeppe, Relationer itself will almost certainly change beyond recognition
[07:24] <fwereade_> rogpeppe, it is at heart a part of the uniter, and if it deserves to be a helper type then its shape will be very different
[07:25] <rogpeppe> fwereade_: so could you put the context in uniter?
[07:25] <rogpeppe> fwereade_: without having an import cycle?
[07:25] <fwereade_> rogpeppe, yes, that is what I'm proposing; that is the situation with the import cycle
[07:26] <fwereade_> rogpeppe, an interface STM to be a great way of doing so with minimal disruption
[07:26] <rogpeppe> fwereade_: why does the uniter need to import jujuc?
[07:27] <fwereade_> rogpeppe, so it can run a jujuc.Server
[07:27] <fwereade_> rogpeppe, and supply it with contexts
[07:28] <rogpeppe> fwereade_: ah yes, of course, that seems right
[07:29]  * rogpeppe is still thinking
[07:30] <fwereade_> rogpeppe, it is a situation that deserves lots of it, I have been thinking about this for some time :)
[07:33] <fwereade_> rogpeppe, hmm, it crosses my mind that OpenPort/ClosePort are somewhat crackful, because they change global state directly
[07:34] <rogpeppe> fwereade_: rather than wating until the hook has completed successfully?
[07:34] <fwereade_> rogpeppe, my fuzzy feeling that the Context interface should not directly expse state at all has just grown firmer
[07:34] <fwereade_> rogpeppe, yeah
[07:34] <fwereade_> rogpeppe, also, config-get isn't using a frozen config
[07:35] <rogpeppe> fwereade_: it probably should, i guess
[07:35] <fwereade_> rogpeppe, (also we expose stuff like ConfigNodes which have *totally* inappropriate capabilities like Read and Write
[07:35] <fwereade_> )
[07:41] <rogpeppe> fwereade_: here's a perhaps crackful idea: could we obliterate *all* knowledge of units, charms etc from jujuc/server ?
[07:41] <fwereade_> rogpeppe, not crackful at all
[07:41] <rogpeppe> fwereade_: and have it simply provide a command-running and callback service
[07:41] <fwereade_> rogpeppe, I've been skating around the issue due to the distracting potential crackfulness
[07:41] <fwereade_> rogpeppe, hmm
[07:42] <fwereade_> rogpeppe, I'd been thinking more in terms of it not referencing state directly in the interface at all
[07:42] <rogpeppe> fwereade_: it seems to me that this is where the cyclic stuff is coming from, and that actually the *important* thing that jujuc/server is to run commands and allow commands to call back.
[07:42] <fwereade_> rogpeppe, niemeyer and I are in rough agreement that server+commands is a cohesive chunk
[07:42] <rogpeppe> s:jujuc/server:jujuc/server does:
[07:43] <fwereade_> rogpeppe, I think he feels that way more strongly than me though
[07:43] <rogpeppe> fwereade_: i think i'm more of the opinion that the commands are tied more closely to the uniter than the server mechanism
[07:44] <rogpeppe> fwereade_: and i *think* that might help things straighten out
[07:45] <rogpeppe> fwereade_: in fact it looks to me as if even now there's no essential reason for HookContext to live in jujuc/server
[07:45] <fwereade_> rogpeppe, I was convinced otherwise :)
[07:46] <rogpeppe> fwereade_: NewServer doesn't rely on uniter
[07:46] <rogpeppe> AFAICS
[07:46] <fwereade_> rogpeppe, I have been through this
[07:46] <fwereade_> rogpeppe, I think we are in agreement that "pull server out on its own, it'sthe most obviously independent bit" would be a reasonable thing to do
[07:46] <rogpeppe> fwereade_: yeah
[07:47] <fwereade_> rogpeppe, however, I think that all that actually does is push a non-problematic part to one side
[07:47] <rogpeppe> fwereade_: it seems to me that server+commands is *not* a cohesive unit - it's two things stuck together not-very-strongly-at-all.
[07:47] <fwereade_> rogpeppe, well, they are united in their need for a HookContext
[07:48] <rogpeppe> fwereade_: the server doesn't need a HookContext necessarily.
[07:48] <fwereade_> rogpeppe, at least, it needs to "know" about them, even if it doesn't manipulate the type directly
[07:49] <rogpeppe> fwereade_: what does it "know" about them?
[07:49] <fwereade_> rogpeppe, ContextId is one of the Request fields
[07:50] <fwereade_> rogpeppe, really
[07:50] <fwereade_> rogpeppe, the location of Server is a derail
[07:50] <fwereade_> rogpeppe, it does not contribute to solving the problem
[07:50] <rogpeppe> fwereade_: i'm not so sure
[07:51] <fwereade_> rogpeppe, it is trivial to extract it now and it will remain trivial to do so tomorrow
[07:51] <rogpeppe> fwereade_: the main cyclic problem was between jujuc/server and worker/uniter, no?
[07:51] <fwereade_> rogpeppe, the cyclic problem is HookContext, full stop
[07:52] <fwereade_> rogpeppe, and that is a symptom of the relation ickiness more than anything else
[07:52] <rogpeppe> fwereade_: suppose you had a worker/uniter/commands package and defined HookContext in there?
[07:53] <rogpeppe> fwereade_: might that help?
[07:53] <fwereade_> rogpeppe, then I *still* have the precise problem I have been trying to express all morning
[07:53] <rogpeppe> fwereade_: sorry, please reiterate. it'll penetrate my think skull eventually :-)
[07:53] <fwereade_> rogpeppe, Relationer and RelationContext need to be in the same package so I can evolve them towards cohesive sanity without making a mess in other packages
[07:54] <fwereade_> rogpeppe, once I have them next to one another I think it will be almost trivial
[07:54] <fwereade_> rogpeppe, while they're distant any CL will be laughed out of the room for being monstrous, and quite rightly so :)
[07:55] <rogpeppe> fwereade_: so... the problem is essentially that the commands need RelationContext and you don't want to put RelationContext in the same package as the commands.
[07:55] <rogpeppe> fwereade_: (or vice versa)
[07:56] <rogpeppe> fwereade_: because ISTM that an ultra-simple solution would just be to put the commands in uniter
[08:00] <rogpeppe> fwereade_: it wouldn't make uniter too huge actually. the two packages combined (including the separable server stuff) amount to only ~2100 lines.
[08:01] <rogpeppe> fwereade_: and perhaps this is the fundamental underlying semantic issue - the commands *are* tied closely to the uniter.
[08:04] <fwereade_> rogpeppe, IMO not so tightly as to justify dumping them all in the same package
[08:05] <fwereade_> rogpeppe, being able to express the interface without mentioning state has a benefit as well -- it keeps the jujuc package nice and hygienic, and unable to itself cause the write-on-error bugs we discussed above
[08:05] <rogpeppe> fwereade_: it seems to me that they're really just functions that are called back into the uniter; they just happen to be expressed as commands.
[08:07] <fwereade_> rogpeppe, well, yes; but *everything* under uniter is similarly closely tied to uniter, and I really don't think dumping it all in one package is a good idea
[08:08] <rogpeppe> fwereade_: hmm, i may be coming around to your point of view :-
[08:08] <rogpeppe> )
[08:08]  * fwereade_ feels cheered :)
[08:10] <rogpeppe> fwereade_: you'll need to be careful how you define the interface though; it might not be easy to avoid cycles or awkward copying type conversions.
[08:11] <fwereade_> rogpeppe, I *think* have something moderately sane coming through
[08:12] <rogpeppe> fwereade_: FWIW i think that worker/uniter/commands is a better name than jujuc/server
[08:12] <rogpeppe> or worker/uniter/cmd
[08:12] <fwereade_> rogpeppe, the thing is you are right about the callbacky nature of the commands, and I think this will actually make that clearer
[08:12] <fwereade_> rogpeppe, as soon as we drop jujuc I will be agitating for worker/uniter/tools
[08:12] <rogpeppe> fwereade_: tools == commands ?
[08:13] <fwereade_> rogpeppe, yeah, specifically borrowing terminology from elsewhere in the project
[08:13] <fwereade_> rogpeppe, anyway, while cmd/jujuc exists, worker/uniter/jujuc it will be
[08:15] <rogpeppe> fwereade_: are you planning to move cmd/jujuc to worker/uniter/jujuc ?
[08:15] <fwereade_> rogpeppe, cmd/jujuc is the command, just about all the implementation is now in worker/uniter/jujuc; moved from cmd/jujuc/server
[08:17] <rogpeppe> fwereade_: hmm. i'm not sure that "jujuc" is such a good name in that context. worker/uniter/server would be better. or worker/uniter/commands (or tools, though i'm not sure about borrowing that terminology)
[08:17] <rogpeppe> anyway, that's just a naming issue
[08:18] <fwereade_> rogpeppe, for now it is the implememntation side of cmd/jujuc, and I think that remains the best name
[08:19] <fwereade_> rogpeppe, when we fold jujuc into jujud that point will become open
[08:20] <rogpeppe> fwereade_: ok
[08:26] <rogpeppe> fwereade_: one last murmur: i think you're going to a lot of effort to avoid importing 500 lines of code into the uniter package. a concrete type presented to the commands could potentially be just as clear (as in not making State available) as an interface, i think.
[08:28] <fwereade_> rogpeppe, it still feels like necessary scaffolding to allow me to make the change semi-peacefully
[08:30] <rogpeppe> fwereade_: moving to using an interface feels like it'll be more disruptive, but i'm sure i don't understand the issues well enough.
[08:47] <TheMue> fwereade_, rogpeppe: could you please take a short look at https://codereview.appspot.com/6589073/ ? i've got a strange error there when clicking on "View".
[08:48] <fwereade_> TheMue, I too see a chunk mismatch
[08:48] <rogpeppe> TheMue: i've seen that before. you can look at the raw diff instead: https://codereview.appspot.com/6589073/patch/6001/4003
[08:48] <fwereade_> TheMue, I don't know how to resolve it I'm afraid
[08:48] <rogpeppe> TheMue: i'm not sure what causes it to happen, i'm afraid.
[08:48] <TheMue> es, the raw is fine, i've tested.
[08:48] <TheMue> s/es/yes/
[08:49] <TheMue> ok, thanks for your effort
[10:23] <rogpeppe> fwereade_: i consistently get a uniter test failure in trunk: http://paste.ubuntu.com/1261625/
[10:23] <fwereade_> rogpeppe, whoa
[10:24] <rogpeppe> fwereade_: and i think jujuc was failing too, let me find the failure in the copious log output...
[10:25] <rogpeppe> fwereade_: yeah, uniter/jujuc too: http://paste.ubuntu.com/1261631/
[10:26] <fwereade_> rogpeppe, that one's because you haven't updated goyaml I think
[10:26] <rogpeppe> fwereade_: ah, i didn't realise i needed to
[10:27] <rogpeppe> fwereade_: yeah, that's the reason for that, thanks
[10:28] <rogpeppe> fwereade_: that doesn't fix the other problem tho
[10:29] <fwereade_> rogpeppe, I'm investigating
[10:29] <rogpeppe> fwereade_: does it pass for you?
[10:30] <fwereade_> rogpeppe, just got to running it, had to clean up a bit of mental state so it makes sense when I look back at it
[10:30] <fwereade_> rogpeppe, yeah, works for me, which is odd
[10:31] <fwereade_> rogpeppe, would you try logging the actual underlying error in unit.go:578 please?
[10:33] <rogpeppe> fwereade_: will do
[10:33] <rogpeppe> fwereade_: you mean uniter.go presumably?
[10:34] <fwereade_> rogpeppe, no, state/unit.go, surely?
[10:34] <rogpeppe> fwereade_: oh, sorry, i wasn't looking at the log...
[10:34] <fwereade_> rogpeppe, np -- I think the copious logging is more of a blessing than a curse but I agree it can be a lot
[10:35] <rogpeppe> fwereade_: it seems wrong that we're ignoring the error there anyway
[10:36]  * fwereade_ agrees
[10:39] <rogpeppe> fwereade_: [LOG] 10.99256 JUJU set private address error: duplicate key insert for unique index of capped collection
[10:39] <rogpeppe> fwereade_: ha.
[10:41] <rogpeppe> fwereade_: maybe i need to update my mgo package
[10:43] <rogpeppe> fwereade_: that fixed it.
[10:43] <rogpeppe> fwereade_: phew.
[10:47] <rogpeppe> fwereade_: if you have a spare moment: https://codereview.appspot.com/6623047
[10:47] <TheMue> rogpeppe: good hint, just upgraded it too
[11:05] <rogpeppe> fwereade_, TheMue, davecheney: and another one: https://codereview.appspot.com/6612054/
[11:10] <TheMue> *click*
[11:11] <TheMue> rogpeppe: In the last one you have two helpers in agent_test.go exported. is there a special reason?
[11:11] <rogpeppe> TheMue: i just moved them from another file
[11:12] <rogpeppe> TheMue: they're exported to indicate they're intended to be used globally, not that it makes any difference in a test file.
[11:12] <TheMue> rogpeppe: yes, i've seen, but they could be private, don't they?
[11:12] <TheMue> rogpeppe: ah, ic
[11:12] <rogpeppe> TheMue: yes, and so could all our suite types, but they're not. i don't care too much.
[11:14] <TheMue> rogpeppe: ;)
[11:14] <TheMue> rogpeppe: btw, what's "arble"?
[11:14] <rogpeppe> TheMue: a word :-)
[11:14] <rogpeppe> TheMue: a nonsense word that was made up by a friend at uni AFAIR.
[11:15] <TheMue> rogpeppe: hehe, a foobar alternative
[11:15] <rogpeppe> TheMue: yeah
[11:16] <TheMue> rogpeppe: you've got a lgtm
[11:16] <rogpeppe> TheMue: thanks
[11:16] <TheMue> rogpeppe: yw
[11:16] <rogpeppe> TheMue: i win? woo! :-)
[11:17] <rogpeppe> TheMue: what's my prize?
[11:17] <TheMue> rogpeppe: yes, and the prize is to make the alpha bundle
[11:17] <rogpeppe> TheMue: booby!
[11:18] <TheMue> rogpeppe: hehe
[11:19]  * TheMue fights with headaches today, and that w/o alcohol. maybe that's the reason.
[11:20] <rogpeppe> TheMue: i prescribe you a large 16 y.o. Talisker
[11:20] <TheMue> rogpeppe: aaaaah, you know my medicine, good
[11:22] <TheMue> rogpeppe: just asked my dealer for a 17 y.o. Balvenie DoubleWood, costs about 75 £
[11:22] <TheMue> rogpeppe: i hope it's not too expensive here, taxes are lower
[12:04] <rogpeppe> fairly trivial CL: https://codereview.appspot.com/6622047/
[12:06] <TheMue> rogpeppe: is setting the pw to "" really removing it or setting it to ""?
[12:07] <rogpeppe> TheMue: for AdminPassword, it's really removing it, as mentioned in the docs
[12:07] <rogpeppe> lunch
[12:07] <TheMue> ok thx
[12:15] <rogpeppe> mramm: i thought the meeting was at 1.30
[12:15] <mramm> rogpeppe: it is
[12:15] <mramm> I started the hangout too soon
[12:15] <rogpeppe> mramm: ah, np
[12:27] <davecheney> does anyone have the hangout link ?
[12:28] <davecheney> found it
[12:28] <niemeyer> davecheney: yo!
[12:28] <niemeyer> Hi all
[12:29] <fwereade_> niemeyer, heyhey
[12:30] <niemeyer> fwereade_: Yo
[12:30] <rogpeppe> fwereade_: hangout?
[12:30] <davecheney> fwereade_: https://plus.google.com/hangouts/_/ad44942cb79ac76c808c48efaec6b9da87275d6c?authuser=0&hl=en
[12:35] <davecheney> !meeting
[12:36] <davecheney> didnt' expect that to work
[12:52] <niemeyer> "hello dear, My Name is Dorise i see your email at golang.org i will like us to have a good friendship"
[12:52] <niemeyer> WTF?
[12:53] <davecheney> niemeyer: hands off, she's promised to me
[12:53] <davecheney> CONTRIBUTORS for the win
[12:53] <niemeyer> :-)
[12:53] <davecheney> no
[12:53] <davecheney> for the spam
[12:53] <niemeyer> davecheney: Ah, makes sense
[12:53] <TheMue> *ROFL*
[12:59] <rogpeppe> davecheney: sorry mate, i got there first
[13:00] <davecheney> rogpeppe: D comes before R
[13:00] <davecheney> she emailed me first
[13:02] <rogpeppe> :)
[13:21] <rogpeppe> niemeyer: ping
[13:21] <niemeyer> rogpeppe: Hi
[13:21] <rogpeppe> niemeyer: i'm just wondering about the best place to do the admin secret hash logic
[13:22] <rogpeppe> niemeyer: here are a couple of possibilities: http://paste.ubuntu.com/1261889/
[13:24] <niemeyer> rogpeppe: Option 2 seems nicer overall
[13:25] <rogpeppe> niemeyer: ok, cool. i was trending towards that, but thought there were args both ways.
[13:25] <rogpeppe> niemeyer: it's kinda odd perhaps that each environment will need to implement the same hashing logic, but that's perhaps ok.
[13:26] <rogpeppe> niemeyer: actually we could implement PasswordHash function in environs
[13:26] <rogpeppe> niemeyer: that might work nicely actually; then neither juju nor ec2 need be dependent on the details of the hashing.
[13:27] <niemeyer> rogpeppe: That's what I imagined too
[13:27] <rogpeppe> niemeyer: cool
[13:27] <rogpeppe> niemeyer: will do
[13:27] <niemeyer> rogpeppe: Cheers!
[13:27] <rogpeppe> niemeyer: i'm piling up a few small CLs BTW if you have a moment some time.
[13:28] <rogpeppe> niemeyer: https://codereview.appspot.com/6623047, https://codereview.appspot.com/6612054/, https://codereview.appspot.com/6622047/
[13:28] <niemeyer> rogpeppe: I'll do reviews in a moment
[13:28] <rogpeppe> niemeyer: np
[13:40] <niemeyer> fwereade_: Do you want to have that conversation now?
[13:40] <fwereade_> niemeyer, http://paste.ubuntu.com/1261919/
[13:41] <fwereade_> niemeyer, is a summary of my current thinking which hopefully draws on our shared context
[13:41] <fwereade_> niemeyer, can I just go for a ciggie while you read before we get settled in? :)
[13:41] <niemeyer> fwereade_: Certainly :)
[13:41] <fwereade_> niemeyer, cheers, bbs
[13:42] <niemeyer> I'll prepare some chimarrão at the same time
[13:48] <fwereade_> niemeyer_, back
[13:49] <niemeyer_> fwereade_: I'm here too, let's fire it off
[13:50] <fwereade_> niemeyer_, starting a hangout then
[13:50] <niemeyer_> fwereade_: Just did it
[13:50] <fwereade_> niemeyer_, joining
[14:09] <niemeyer> TheMue: https://codereview.appspot.com/6589073/diff/6001/environs/jujutest/livetests.go
[14:10] <TheMue> niemeyer: yes, i already asked roger and william how this is possible. the raw diff is ok.
[14:10] <niemeyer> TheMue: Yep.. have you tried to propose it again?
[14:10] <TheMue> niemeyer: do you have any idea how to "repair" it?
[14:10] <TheMue> niemeyer: not yet, willdo. one moment.
[14:11] <rogpeppe> niemeyer: when you've finished with fwereade_, i've encountered another interesting wrinkle which needs a moment's thought.
[14:11] <niemeyer> rogpeppe: Just reviewing a branch and will be with you
[14:12] <TheMue> niemeyer: strange, now lbox hangs here. *grmblx*
[14:12] <niemeyer> TheMue: Hangs? Or is it working?
[14:12] <TheMue> niemeyer: oh, had a 502
[14:12] <niemeyer> TheMue: That's a Launchpad internal error
[14:13] <TheMue> niemeyer: i'm trying it again right now
[14:14] <TheMue> niemeyer: ah, it's there now
[14:17] <fwereade_> niemeyer, hey, just one thing: naming of the HookContext interface?
[14:18] <fwereade_> niemeyer, I would actually be pretty happy with a jujuc.Context interface
[14:18] <rogpeppe> fwereade_: +1
[14:18] <fwereade_> rogpeppe, cheers
[14:18] <niemeyer> fwereade_: +1
[14:18] <fwereade_> niemeyer, cheers :)
[14:23] <niemeyer> TheMue: Sent a couple of comments
[14:23] <niemeyer> TheMue: and LGTM assuming that tests pass on Amazon
[14:23] <niemeyer> TheMue: Live tests, that is
[14:23] <TheMue> niemeyer: just seen the notification, thx
[14:23] <niemeyer> TheMue: I'd like to cover something about the next step
[14:23] <niemeyer> TheMue: Do you have a minute?
[14:24] <TheMue> niemeyer: yes
[14:24] <niemeyer> TheMue: Okay, so
[14:24] <niemeyer> TheMue: I believe that one of the reasons why the firewaller works well today is because we have a contract that when a machine comes up, it's coming up with all its ports closed
[14:25] <niemeyer> TheMue: In other words, StartInstance always hands off machines with no ports open
[14:25] <niemeyer> TheMue: This is of course being broken by the global scheme
[14:25] <niemeyer> TheMue: Which is alright on itself, except for one detail
[14:25] <niemeyer> TheMue: When a machine dies, what happens with its ports?
[14:27] <niemeyer> TheMue: Are you still there?
[14:27] <TheMue> niemeyer: Yes, thinking about it.
[14:28] <niemeyer> TheMue: The answer is nothing.
[14:29] <niemeyer> TheMue: And that's been fine so far
[14:29] <niemeyer> TheMue: Because the group is only used by that one machine
[14:29] <TheMue> niemeyer: We react in the sense of the lifecycle
[14:30] <niemeyer> TheMue: Meaning?
[14:30] <TheMue> niemeyer: if i get it right we close the ports of the unit.
[14:31] <TheMue> niemeyer: but with a global group that's not good
[14:31] <TheMue> niemeyer: it only should be closed if no unit needs that pot anymore
[14:32] <niemeyer> TheMue: When do we close the ports of the unit?
[14:34] <TheMue> niemeyer: on moment, checking if i have seen it right. thought it is in flushMashine()
[14:34] <niemeyer> TheMue: Which machine? It was removed
[14:35] <niemeyer> TheMue: We may never have seen it
[14:35] <niemeyer> TheMue: I mean, the removal
[14:35] <niemeyer> How can we tell which ports on that global group are improperly opened
[14:36] <TheMue> niemeyer: That's what i meant with a lifecycle change. This would be catched. But not a real hard death.
[14:36] <niemeyer> TheMue: We cannot trust on luck
[14:37] <TheMue> niemeyer:yes, i know. it only has been a view on the status quo
[14:37] <niemeyer> TheMue: Anyway, I'll leave you thinking about that problem.. we need a way to close those ports
[14:37] <niemeyer> rogpeppe: SOrry, I have a call with flacoste right now.. I'll be with you after that
[14:37] <rogpeppe> niemeyer: np
[14:38] <TheMue> niemeyer: ok, so i know my next task ;)
[14:42] <fwereade_> niemeyer, when you're off your call, https://codereview.appspot.com/6620054 isn't quite what we originally discussed but should still be pretty trivial
[15:15] <niemeyer> fwereade_: Sounds good, I'll just be with rogpeppe for a while and will then jump on that
[15:15] <rogpeppe> niemeyer: there's a problem with using a salted password
[15:15] <fwereade_> niemeyer, cool, thanks
[15:15] <rogpeppe> niemeyer: which is that we don't know the salt when we reconnect
[15:15] <niemeyer> rogpeppe: Where is the salt put
[15:16] <rogpeppe> niemeyer: we need to store the salt in the environment
[15:16] <rogpeppe> niemeyer: we can return it in the state.Info
[15:16] <rogpeppe> niemeyer: alternatively
[15:16] <rogpeppe> niemeyer: we could not use a salted password at all and just say "use a long random password"
[15:17] <niemeyer> rogpeppe: Just use a well known salt for now
[15:17] <rogpeppe> niemeyer: what's the point?
[15:17] <rogpeppe> niemeyer: well, i guess we can add salt later :-)
[15:18] <rogpeppe> niemeyer: the changes are fairly small actually
[15:18] <niemeyer> rogpeppe: The point is the same of having a salt
[15:18] <niemeyer> rogpeppe: You can't attack a juju environment with a pre-made dictionary unless that dictionary was built specifically to attack a juju environment
[15:18] <rogpeppe> niemeyer: there's no point in having a constant salt - it's equivalent to having no salt at all
[15:19] <rogpeppe> niemeyer: i guess so
[15:19] <niemeyer> rogpeppe: No, it's not equivalent
[15:19] <rogpeppe> niemeyer: yeah, i see your point
[15:19] <niemeyer> rogpeppe: If you use a salt, you force people to start building that dictionary today
[15:19] <rogpeppe> niemeyer: ok, constant salt it is
[15:20] <niemeyer> rogpeppe: If you use an algorithm that takes 1 second to compute the hash on a modern computer, even a short password will take many years to break
[15:20] <rogpeppe> niemeyer: the password hash function i've just used takes about 0.2 seconds per password FWIW.
[15:20] <niemeyer> rogpeppe: Increase the count
[15:21] <rogpeppe> niemeyer: ok, will do. it'll increase the test time though :-)
[15:21] <niemeyer> rogpeppe: Not if you make that a parameter
[15:21] <rogpeppe> niemeyer: i'm not sure it should be a parameter. it could be a global variable changed by the test code though.
[15:22] <rogpeppe> niemeyer: part of the point of putting it in a function is to hide the parameters, i think.
[15:22] <niemeyer> rogpeppe: Or just keep it 0.2
[15:22] <rogpeppe> niemeyer: i think 0.2 should be fine tbh
[15:23] <niemeyer> rogpeppe: I think so as well.. we're overvaluing that problem.. we have a lot to do before that kind of thing becomes a real issue
[15:23] <rogpeppe> niemeyer: and we can add a random salt quite easily at a later stage, and people can change their passwords.
[15:23] <rogpeppe> niemeyer: yup
[15:57] <niemeyer> rogpeppe: All of yours reviewed
[15:57] <rogpeppe> niemeyer: brilliant, thanks
[15:57] <niemeyer> fwereade_: I'll do yours first thing after lunch
[15:57] <rogpeppe> niemeyer: i've just made the change you suggested to https://codereview.appspot.com/6623047/
[15:57]  * niemeyer => food!
[15:57] <niemeyer> rogpeppe: Cheers
[15:57] <fwereade_> niemeyer, cheers, enjoy :)
[16:29]  * niemeyer is back
[16:45] <rogpeppe> niemeyer: a couple of comments on your reviews.
[16:46] <rogpeppe> niemeyer: BTW i think it's better to always require that the entity name in the cloudinit's state-info matches the machine's entity name.
[16:46] <niemeyer> rogpeppe: Thanks, reviewing fwereade_'s at the moment
[16:46] <rogpeppe> niemeyer: np
[16:46] <rogpeppe> niemeyer: thanks for the reviews
[16:47] <niemeyer> rogpeppe: Doesn't seem reasonable to have a "machine-0" entity name with an admin password
[16:47] <rogpeppe> niemeyer: it's the machine password too
[16:47] <niemeyer> rogpeppe: As far as the caller is concerned, it's the admin password
[16:47] <rogpeppe> niemeyer: ok, sounds reasonable
[16:48] <niemeyer> rogpeppe: We just play cheap
[16:48] <rogpeppe> niemeyer: ?
[16:48] <niemeyer> rogpeppe: Nevermind.. you got it
[17:00] <niemeyer> fwereade_: Sent suggestions on the interface.. please let me know how you feel about them
[17:05] <niemeyer> rogpeppe: "i don't think the base64 padding will make any difference"
[17:05] <niemeyer> rogpeppe: It's just silly to have "==" behind every parssword. Let's avoid that, please.
[17:06] <rogpeppe> niemeyer: ok
[17:06] <rogpeppe> niemeyer: sorry, i thought it was a security concern
[17:07] <niemeyer> rogpeppe: Not a security concern.. just not nice
[17:07] <rogpeppe> niemeyer: i'll check the padding
[17:07] <niemeyer> rogpeppe: By tweaking the input to a proper size, you can avoid it with no pain or work
[17:08] <rogpeppe> niemeyer: i agree
[17:08] <niemeyer> rogpeppe: Either way, replied in the CL
[17:08] <rogpeppe> niemeyer: thanks
[17:09] <niemeyer> rogpeppe: np
[17:12] <fwereade_> niemeyer, all look great except maybe Settings
[17:12] <fwereade_> niemeyer, I'm afraid fixes/progress will trickle in over the w/e, I think I'm done for the night
[17:13] <rogpeppe> fwereade_: have a great w/e!
[17:13] <fwereade_> rogpeppe, and you :)
[17:13] <niemeyer> fwereade_: Indeed, have a great one
[17:13] <niemeyer> fwereade_: Settings is the interface of what we'll have as state.Settings
[17:14] <niemeyer> fwereade_: No Russian-name programming
[17:14] <niemeyer> :)
[17:14] <niemeyer> Russian novel programming
[17:14] <niemeyer> http://www.johndcook.com/blog/2012/09/27/russian-novel-programming/
[17:19] <rogpeppe> niemeyer: argh. the EntityName check breaks everything
[17:19] <niemeyer> rogpeppe: Because the implementation is not finished, I suppose
[17:19] <rogpeppe> niemeyer: because a lot of tests do this, for instance:
[17:19] <rogpeppe> 	inst, err := t.Env.StartInstance(0, InvalidStateInfo, nil)
[17:20] <rogpeppe> niemeyer: and now we need to craft a different StateInfo each time.
[17:20] <rogpeppe> niemeyer: or perhaps have just two
[17:20] <rogpeppe> niemeyer: oh, no
[17:20] <rogpeppe> niemeyer: different each time
[17:20] <niemeyer> rogpeppe: Why?
[17:21] <rogpeppe> niemeyer: because we're starting a different machine each time
[17:21] <rogpeppe> niemeyer: so we need a different entity name
[17:21] <rogpeppe> niemeyer: that may well be the right thing to do, but it's quite a few changes
[17:21] <niemeyer> rogpeppe: I don't think I understand the issue.. grepping for it
[17:21] <rogpeppe> niemeyer: yeah sure. it's just more than the trivial change i thought it was going to be.
[17:23] <niemeyer> rogpeppe: Why are we giving the instances an invalid state info?
[17:24] <rogpeppe> niemeyer: this is in tests
[17:24] <niemeyer> rogpeppe: The question too :)
[17:24] <rogpeppe> niemeyer: where there's no state to connect to
[17:24] <niemeyer> rogpeppe: I'm seeing this in LiveTests
[17:24] <rogpeppe> niemeyer: for some tests we only care about the instances being created and destroyed.
[17:25] <rogpeppe> niemeyer: we don't care what actually happens on the machine.
[17:25] <niemeyer> rogpeppe: Still feels awkward, but okay.. that's not the time to fix it..
[17:25] <rogpeppe> niemeyer: and ISTR that those tests were written before we had a dummy state server
[17:26] <niemeyer> rogpeppe: Perhaps that's the reasoning
[17:26] <rogpeppe> niemeyer: they were some of the earliest juju code actually
[17:26] <niemeyer> rogpeppe: Either way, func InvalidStateInfo(machineId int) *StateInfo
[17:26] <rogpeppe> niemeyer:
[17:26] <rogpeppe> // InvalidStateInfo holds information about no state - it will always give
[17:26] <rogpeppe> // an error when connected to. The machine id gives the
[17:26] <rogpeppe> // machine id of the machine to be started
[17:26] <rogpeppe> func InvalidStateInfo(machineId int) *state.Info {
[17:26] <rogpeppe> snap!
[17:27] <niemeyer> rogpeppe: Great minds think alike, as Jamu would say :-)
[17:27] <niemeyer> rogpeppe: LGTM on bootstrap-state,  thanks
[17:27] <rogpeppe> niemeyer: cool, thanks
[17:39] <niemeyer> rogpeppe: LGTM on initial password too, thank you
[17:39] <rogpeppe> niemeyer: cool, thanks
[17:39] <niemeyer> rogpeppe: it'd be good to run all tests, if you haven't done it.. quite a few touchy changes
[17:39] <rogpeppe> niemeyer: problem with all these small branches is keeping track of 'em all...
[17:40] <rogpeppe> niemeyer: i'm doing it currently.
[17:40] <niemeyer> rogpeppe: Thanks for that
[17:40] <rogpeppe> niemeyer: perhaps i should be running them on all branches in parallel
[17:48] <rogpeppe> niemeyer: i made the password changes: https://codereview.appspot.com/6615047
[17:49] <niemeyer> rogpeppe: Looking
[17:49] <niemeyer> rogpeppe: Why the big salt?
[17:49] <rogpeppe> niemeyer: why not?
[17:49] <niemeyer> rogpeppe: Because two bytes should be enough
[17:50] <rogpeppe> niemeyer: ok, i'll use a smaller slat
[17:50] <rogpeppe> salt
[17:51] <niemeyer> rogpeppe: Suggest just a trivial check on the content of the password.. like its length
[17:51] <niemeyer> rogpeppe: LGTM otherwise, thanks for the changes
[17:52] <rogpeppe> niemeyer: i was right to run the live tests... i had broken something. (i don't *think* in trunk)
[17:55] <rogpeppe> niemeyer: i've got to go now, unfortunately.
[17:55] <rogpeppe> niemeyer: have a great weekend.
[17:55] <niemeyer> rogpeppe: Hmm.. I hope that wasn't a "I've broke trunk and I have to go" :)
[17:55] <niemeyer> rogpeppe: have a great weekend :)
[18:38] <rogpeppe> niemeyer: i don't think so
[18:39] <rogpeppe> niemeyer: the thing that broke was the tests that were added in the most recent (unsubmitted) branch for entity name in cloudinit
[21:26] <fss> niemeyer: ping
[21:32] <niemeyer>    fss Yo
[21:43] <fss> niemeyer: did you see this cl: https://codereview.appspot.com/6586073/?
[21:45] <niemeyer> fss: I hadn't seen it, but this is looking very good in fact
[21:46] <niemeyer> fss: Have you signed the contribution agreement yet?
[21:46] <niemeyer> fss: Sorry, I don't know if I asked that before
[21:46] <fss> niemeyer: I don't think so, where I can check this?
[21:46] <fss> can I*
[21:46] <niemeyer> fss: www.canonical.com/contribute
[21:47] <niemeyer> fss: It's  straightforward/non-draconian agreement
[21:47] <fss> 404
[21:47] <fss> =/
[21:48] <fss> I think I found it
[21:48] <fss>  /contributors
[21:48] <niemeyer> fss: Sorry
[21:50] <fss> Shoul I put your name in Canonical Project Manager?
[21:52] <niemeyer> fss: Yes please
[21:53] <niemeyer> fss: I'm providing a review.. pretty simple stuff really. It's mostly ready for integration.
[21:53] <fss> done, I've signed the cla
[21:54] <fss> I've already finished the package, also created an iamtest package, I will send it to you in small parts (and adapt what is already done to your feedback)
[21:55] <fss> I'm going home now, but I'll be online in 30 minutes
[21:55] <fss> brb
[22:50] <fss> niemeyer: I'm back
[22:51] <niemeyer> fss: Welcome back.. was just looking at the changes
[22:51] <fss> I forgot to add the integration tests suite, I'll send it tomorrow or later today
[22:52] <niemeyer> fss: Thanks.. it's fine to do that in a new CL
[22:52] <niemeyer> fss: I'm submitting this one
[22:53] <fss> cool :-)
[22:54] <niemeyer> fss: Hmm.. you'll probably want to name your future branches other than "goamz" :)
[22:54] <fss> i was about to ask about that
[22:55] <fss> how should I proceed with lbox after the cl gets merged
[22:55] <niemeyer> fss: The name is usually after what's being done
[22:55] <niemeyer> fss: add-iam or whatever
[22:55] <fss> hmm, so I create a new branch for each cl?
[22:55] <niemeyer> fss: The workflow is not enforced.. what I personally do is to grab the master again and pull from trunk
[22:55] <niemeyer> fss: I use cobzr
[22:56] <niemeyer> fss: That's right
[22:56] <niemeyer> fss: This allows you to do things in parallel when you want, and to not mess up changes
[22:56] <niemeyer> fss: Your first change is submitted
[22:56] <niemeyer> fss: Congratulations! :)
[22:56] <fss> niemeyer: \o/
[22:59] <niemeyer> fss: Wanna do your first review too?  Something that will look familiar:
[22:59] <niemeyer> Erm.. if only Launchpad would help
[22:59] <fss> niemeyer: thanks for the orientation, I will start sending others methods and types tomorrow
[23:00] <niemeyer> fss: https://codereview.appspot.com/6611053
[23:01] <fss> niemeyer: cool :)
[23:02] <niemeyer> fss: If you understand what's going on there, and are happy with it, just reply with LGTM there
[23:03] <fss> I was just thinking about the order of Region fields