[02:21] axw: hey [02:22] axw: fwereade was considering staying up to chat to you but when he realized what time you started he decided not to :) [02:22] thumper: yo [02:22] hehe [02:22] axw: probably about the precheck branch [02:22] I've not read is response other than to realize that he made one [02:22] thumper: I think about the null provider actually [02:22] * thumper is busy with kvm [02:22] ah [02:22] but yes, precheck needs work too [02:22] expect a ping from him when he wakes [02:23] yup, will do [02:23] thanks [02:23] np [02:26] axw: when a manually provided machine is added, the agents still run as root, right? [02:26] thumper: yes [02:26] cool [02:26] just checking [05:53] axw, heyhey [05:53] fwereade: heya [05:54] axw, so, sorry I got confused about the time -- I hope I didn't leave you hanging too badly [05:54] fwereade: nope, not at all. thumper let me know you realised later about the time :) [05:55] I would feel quite guilty if you got up in the middle of the night to talk to me ;) [05:55] axw: you get over that :) [05:55] heh [05:55] axw, haha [05:55] I guess it's inevitable [05:56] axw, ok, just catching up on your responses [05:56] axw, I *think* that series is maybe still a useful thing to have [05:57] axw, because it's the environ that's more or less in charge of making tools, images, etc available to juju [05:57] also... for future container checks [05:57] we probably want the instance id [05:57] so we can get the machine [05:58] and see if it said kvm was ok [05:58] fyi, on ec2, no kvm [05:58] axw, and at least a check for "do we have an image available" depends on seriess + type [05:58] thumper: ah yes, I forgot you mentioned kvm-ok [05:58] fwereade: fair enough [05:58] I plan to have the machine agent run it on start up [05:58] thumper, AFAIK Prechecker will be somehow used inside state [05:58] thumper, so we'll already know the machine [05:58] and if kvm-ok fails, then we should record in state that the host machine can't do kvm [05:59] thumper, definitely [05:59] fwereade: but is it passed through? [05:59] we probably should [05:59] thumper, not yet [05:59] thumper: passing through is in a followup [05:59] thumper, we need tofigure out how to get this code where we need it without making baby jesus cry [05:59] that's fine [05:59] hehe [06:00] fwereade: I'm struggling getting the damn kvm code to actually run [06:00] constantly fails for me [06:00] :( [06:00] I'm writing the interfaces and mocks [06:00] and broker [06:00] and stuff [06:00] hoping that we can plug working bits in later [06:00] thumper, cool, but if the stuff you'remocking seem flaky... [06:00] thumper, yeah [06:00] it is what it is [06:01] we can work with it for now [06:01] quite so [06:01] we know basicly what it will take [06:01] so can mock out that [06:01] it won't be perfect [06:01] until the utility code actually works [06:01] so I'm mocking out what I think we'll need [06:01] as far as params go [06:01] the function calls are known though [06:01] start/stop/list [06:01] and that's about it [06:01] except for the initialize [06:02] go get me an image type code [06:02] thumper, ok, great [06:02] fwereade, thumper: so I'll put instance.Id in since it'll be used for kvm-ok, and I'll put series in for checking image availability [06:02] (into PrecheckContainer params) [06:03] axw, ah, ok, clearly I'm missing something -- why's the instance id needed there? [06:04] axw, thumper: surely what will happen is the machine agent will run and check, and record in state whether kvm is a viable option [06:04] axw, eliminating the need to ask the env? [06:04] axw, or am I ignorant about something? [06:04] ah yes of course [06:04] (I am surely ignorant about many things ofc) [06:05] sorry, I'm still getting my head around what's known in state etc. [06:05] that makes sense [06:05] axw, no worries [06:05] nope, I'm ignorant :) [06:05] ok. just series then [06:05] axw, that's not known yet anyway [06:05] axw, cool, thanks [06:05] fwereade: what's not known? [06:06] axw, sorry -- the can-we-run-kvm code doe not *yet* write anything into state to record the results [06:06] right [06:06] axw, but it should/will, so we're good with series + contianer kind [06:07] fwereade: thanks, I'll update it after proposing my httpstorage auth branch [06:07] axw, brilliant, thanks [06:07] axw, bah, it looks like I may be off shortly... the power company has scheduled maintenance, apparently [06:08] axw, so it I disappear that's where I'll be [06:08] fwereade: no worries, thanks for coming on early to chat. [06:10] axw, and thanks for addressing all those things, those CLs look solid, I'll give them a closer look in a bit [06:10] cool [06:11] * fwereade is always a bit worried about searching for his power company [06:11] bad reviews? :) [06:11] * fwereade fears the consequence of a fat-fingered search for, yes, "enemalta" [06:11] haha [06:12] it's particularly alarming seeing branded fuel tankers driving around the airport [06:12] aaanyway [06:13] speaking of alarming branding, I saw this in a parenting magazine yesterday: http://www.juju.com.au/ [06:16] haha [06:26] oh dear [07:04] mornin' all [07:06] fwereade: hiya [07:06] rogpeppe, heyhey [07:06] fwereade: martin reviewed this, but suggested another look might be good, so i wondered if you could take a glance before i approve it. https://codereview.appspot.com/13778046/ [07:06] rogpeppe, ah, sure [07:07] rogpeppe, btw I will disappear for an unknown period at some point today, power company doing some maintenance [07:07] fwereade: ok, thanks for the heads up [07:35] morning [08:13] TheMue: yo! [08:14] rogpeppe: btw, the chrome plugin you twittered is nice - but i dropped chrome [08:15] TheMue: what do you use now? [08:15] rogpeppe: to much memory and cpu consumption [08:15] rogpeppe: now back to the good old ff [08:16] TheMue, I have exactly the opposite experience with ff and chrome - the latter works faster and its more lightweight on my machine :) [08:16] rogpeppe: imho chrome becomes more and more an own os, only missing a go and a dart ide integrated ;) [08:16] rogpeppe: funny [08:16] rogpeppe: some of my friends switched too and feel better now [08:17] rogpeppe: may depend on the exact plugins one is using === ChanServ changed the topic of #juju-dev to: https://juju.ubuntu.com | On-call reviewer: TheMue | Bugs: 12 Critical, 135 High - https://bugs.launchpad.net/juju-core/ [08:18] hmm, the number of bugs is only increasing. we need a feature freeze to simply handle those bugs [08:40] wallyworld_: I'm looking at the fetch code right now, and I see it failing to find sjson in 3 places before it even tries to look for .json: http://paste.ubuntu.com/6149206/ [08:40] that looks like private-bucket, then ? then tools-url [08:40] wallyworld_: I thought the goal was to search for sjson then json in private, then fallback to site-tools, then user config? [08:42] wallyworld_: the issue is that the signed/unsigned flag is being done at a higher level [08:42] with "requireSigned" [08:43] environs/tools/simplestreams.go always calls "GetMaybeSignedMetadata(...,requireSigned=true)"before calling it with something else if it hasn't found anything [08:43] doesn't that mean when we have juju.canonical.com or even just signed mirror data, it *won't* ever use user-specified unsigned metadata ? [08:56] jamespage, ping [08:56] wallyworld_: I'm also surprised you decided to take our "implicit" URLs before user-explicit URLs (you check the custom urls before "tools-url") [08:56] how would a user override an explicit setting in the env? Only by using their private bucket? [09:12] jam: i had no choice for the 1.15 release, because for in HP Cloud (for example), the tools url was set automatically and this hid the uploaded tools when using a dev release [09:13] wallyworld_: how is tools-url set automatically ? [09:14] jam: see certifiedclouds.go [09:14] it sets up the tools url in config validation [09:15] we won't need this once the repository comes online [09:15] wallyworld_: so... that indicates to me that our layering is probably wrong. Can't we put it into the CustomSources instead of overriding user-config ? [09:16] wallyworld_: we could call GetCertified... in openstack/provider.go GetToolsSources, couldn't we ? [09:16] maybe. it was done later friday night because i was smoke testing for the release and found the issue. but we didn't release 1.15 so it was for nought [09:17] i was just trying to get something done so the release would be ok [09:17] it's on my list to revisit [09:17] sure, did you see my point about always searching for DefaultBaseURL+ .sjson *before* searching the private-bucket for .json ? [09:17] that will also cause problems when we have "official" locations online [09:18] i'm reading it now [09:19] the thinking way back when was that signed metadata should take precedence but this could cause issues as you say [09:22] jam: the hp cloud url was done in config because i needed to convert the deprecated public-bucket-url into a tools url and that deprecation code lives in config, but i think it can be split out into custom sources [09:23] i was initially looking to keep the code dealing with deprecated config values together [09:23] wallyworld_: sure. It just feels like it should be "user-config" then "private" then "default tools-for-cloud" then "juju.canonical.com" [09:24] *maybe* private then user-config [09:24] but right now we have "default-tools-for-cloud" before user-config [09:24] sure. but a few short hours before when i thought the release was being done i needed a quick fix [09:24] np [09:25] tomorrow i should get to do mirrors and hence was making tomorrow my "deal with simplestreams" stuff day [09:25] stuff = where to find things [09:25] np [09:26] wallyworld_: I only noticed because I had to touch those bits, and it caused conflicts when merging turnk [09:26] trunk [09:26] np. i hadn't appreciated/property though about the sjon vs json thing so i'm glad you asked [09:48] jam, mgz, dimitern, TheMue, axw, natefinch: a small cleanup to the environs.Environ interface: https://codereview.appspot.com/13587046 [09:49] rogpeppe: looking [09:49] TheMue: thanks [09:55] rogpeppe: reviewed [09:55] TheMue: ta! [10:17] rogpeppe, hey he provisioner is ready for review :) https://codereview.appspot.com/13720051/ [10:19] dimitern: cool. i'll take a look soon. [10:45] raywang, hello [10:46] Hi jamespage, just want to check with you that after deploy ceph-radosgw, anything extra works need to be done for testing s3 or swift compatibility? === teknico1 is now known as teknico [10:47] standup time [10:47] mgz: dimitern https://plus.google.com/hangouts/_/239d0ac12a07a73dd5a83cc2b9d8bb4047ce20b4 [10:50] raywang, #juju [10:50] jamespage, ok [11:08] here's my CL for review: https://codereview.appspot.com/13430044/ [11:18] * TheMue => lunch [11:22] jam - one thing I forgot to mention is that once the maas tags bugs are fixed, I'll need another project to work on, if you have ideas. [11:22] natefinch: I would look closely at supporting the work from the weekly agenda https://docs.google.com/a/canonical.com/document/d/1eeHzbtyt_4dlKQMof-vRfplMWMrClBx32k6BFI-77MI/edit# [11:22] whether that is doing code reviews [11:23] or working with Martin on Amazon + VPC stuff [11:23] natefinch: also, if you have MaaS up and running [11:23] there is something I'm concerned about with our container strategy [11:23] in that we fire up a container and it grabs an address from the DHCP server. [11:24] I'm concerned that the MaaS infrastructure itself thinks that these are new machines that it is going to want to PXE boot. [11:24] ahh yeah, I remember you mentioned that [11:24] jam I can do some testing on that [11:25] natefinch: essentially I think "juju deploy --constraints container=lxc" and then see what changes on the MaaS master node [11:26] jam: I can do that. So that'll deploy a service to a container on one of the nodes, and we just want to make sure maas doesn't think you've added a new node for it to manage, right? [11:26] natefinch: right. [11:26] or at least document what happens so we can open bugs about how we want to fix it [11:28] jam: cool. I'll test that out once I get my maas in working order again. [11:29] smoser: you around? [11:34] wallyworld_: i've got a few remarks on https://codereview.appspot.com/13842044 if you can hold off approval for a few minutes [11:35] ok === Guest47103 is now known as ehw [11:48] wallyworld_: you have a review [11:48] thanks, looking [11:51] sorry for missing standup, had to step out [11:52] rogpeppe: thanks for the Go tips, will implement those tomorrow before landing [11:54] fwereade, hey [11:54] dimitern, hey dude [11:54] fwereade, provisioner review? https://codereview.appspot.com/13720051/ [11:54] dimitern, that took longer than expected [11:54] dimitern, twould be a pleasure [11:54] fwereade, I was wondering where are you [11:55] dimitern, power cut [11:55] dimitern, was apparently scheduled, I found out just today, wasn't expecting it to be like 4 hours though [11:56] fwereade, aw.. well at least it's just 4 hours :) [11:57] fwereade: welcome back [12:05] dimitern: quick question: why do non-global provisioners need the environ config at all? [12:12] rogpeppe, afaik they need to know the environ config is saved to state already [12:12] dimitern: why so? just asking, because in future we won't want them to be able to get access to the env config, so it'll save us work if we can avoid them accessing it now. [12:13] rogpeppe: so today the code is structured just that we wait for environ config changes and instantiate an "Environ" object [12:14] which needs an EnvironConfig [12:14] they then later on do stuff with that Environ [12:14] but the two parts of the code are pretty far apart [12:14] jam: what does the local provisioner do with an Environ? [12:15] rogpeppe: I'm not 100% sure how it all hangs together.From what I can tell it uses "getBroker" which returns either the Environ itself, or an LXCBrokecr [12:15] Broker [12:16] rogpeppe: and the Config stuff ends up getting handed off to a lot of places [12:16] rogpeppe, so in short, it seems the lxc one does not need it at all, but that's how the code is written [12:17] dimitern: I'd much prefer it if the local provisioner never called WatchEnvironConfig [12:17] so what comes to mind is having an API that returns a minimialistic EnvironConfig, which we later ask another API for the credentials needed for the environment broker [12:18] dimitern: (i mean WatchForEnvironConfigChanges of course) [12:18] dimitern: couldn't you only set p.environ if p.pt == ENVIRON ? [12:18] looking at the code, it does feel like we have a bunch of switch statements that might look better overall if we just had 2 types [12:18] an LXCProvisioner [12:18] vs an EnvironProvisioner [12:20] dimitern, ha, I was just coming to start the above conversation [12:21] dimitern, rogpeppe: so, yeah, the environ stuff is tied in too tightly there [12:21] ah, i see why [12:21] fwereade: so I think landing what we have to guarantee API-based provisioner in 13.10 and *then* trying to split things up would be our best way forward [12:21] i don't think the change would be difficult at all, at first glance anyway [12:21] dimitern, rogpeppe: in particular, it look like an lxc provisioner is waiting for a valid environ config [12:21] dimitern, rogpeppe: else how can it set p.environ [12:22] dimitern, rogpeppe: and that mean we're pooing secrets onto every machine again [12:23] dimitern, rogpeppe, jam: in the name of expediency I could put up with a hack-for-landing that had a p.environ field that was always nil for non-environ provisioners, for example [12:23] dimitern, rogpeppe, jam: but it'd really have to be addressed very soon afterwards [12:24] the problem is that ContainerManager.StartContainer wants a config.Config [12:25] ahhh [12:25] so we actually do want a significant portion of the environment config there [12:25] just not the secret bits [12:25] rogpeppe, ha, yes, anotherslice through environ config with its own special idiosyncracies [12:25] because we need to call FinishMachineConfig, which needs things like authorized keys, [12:26] rogpeppe, what does FinishMachineConfig use for non-managers aside from the auth-keys? [12:26] rogpeppe, AIUI it is in fact *only* the authkeys we need [12:27] fwereade: provider type [12:28] rogpeppe, aw, ffs [12:28] fwereade: and it uses cfg.AdminSecret, which seems wrong [12:28] fwereade: and StatePort and APIPort [12:29] rogpeppe, nah, that's all after "if !mcfg.StateServer{ return nil}" [12:29] fwereade: ah! missed that, thanks. [12:30] rogpeppe, I guess provider type i not so bad [12:30] fwereade: we *are* putting environ creds onto every machine, but we know that, and while it lets you start and stop instances, it isn't the same as giving you root on all the machines. [12:30] fwereade: for lxc, i presume it's always lxc [12:30] For example, you can't actually add ssh keys to machines just with provider creds (only startup ssh keys, etc) [12:31] rogpeppe, but I think there's a pretty good case for a narrower FinishBasicConfig which is called by FinishBootstrapConfig [12:31] yeah, after reflection, i think i'm with jam that we should land this now and work towards eliminating environ config later [12:31] jam, it lets an attacker spend a user's money [12:31] jam, keeping those particular credential secret i one of the major points of this [12:32] fwereade: I agree 100% that we want to get away from this. But I think getting to the point where "root on machine-a doesn't give root on all other machines" is a very useful step forward. [12:32] jam: +1 [12:32] fwereade: i think that this CL is progress [12:32] fwereade: and it's nice to see it when not too much logic has changed [12:33] fwereade: the main problem is that we have a "config.Config" and we honestly don't know without a lot of deep inspection what we need out of that. [12:33] rogpeppe, jam, dimitern: I don't care if the provisioner API does something ludicrously dirty like look up SecretAttrs and crap in NO-NOT-YOURS values over what they return [12:33] so I think incremental steps. But having an EnvironProvider and an LXCProvider will actually clean up the code a bit as well as make it clearer what bits we actually need. [12:33] rogpeppe, jam, dimitern: but we really must not put provider cred on every machine [12:33] fwereade: agreed [12:33] fwereade: but that doesn't have to happen in this CL [12:34] exactly [12:34] fwereade: we don't have to do it all at once [12:34] fwereade: "progress not perfection" [12:34] rogpeppe: sorry, but this is one of the main point of this work [12:34] fwereade: sure [12:34] fwereade: but it doesn't have to happen in *this* CL [12:34] fwereade: which is already big enough [12:35] fwereade: and gives us behaviour that's better than we had before [12:35] fwereade, dimitern: so something like line 158 of state/apiserver/provisioner/provisioner.go after we grab Config.AllAttrs() we could do a "JobHostsStateServer" check and if that isn't part of the unit making the request, we nuke whatever secrets we can ? [12:36] fwereade: aren't those specific to the provider itself (openstack has different secrets than ec2 than azure) [12:36] or can we just nuke all secret attrs ? [12:36] jam, yes they are, but we don't need to construct an actual environ to get secrets, that' on EnvironProvider [12:37] jam: yeah, we can do that (only if the provisioner isn't the global one though, of course) [12:37] jam, but we will probably need to dick around and figure out the types of the secret attrs so we can overwrite them usefully,and in the general case overwriting them usefully may not even be possible [12:37] so do we need an Environ (and its config) in a lxc provisioner at all? [12:37] dimitern, we *need* two values out of the config [12:38] fwereade, which ones? === natefinch is now known as natefinch-afk [12:38] dimitern, provider type and authorized keys [12:38] fwereade, why? [12:38] dimitern, they're the ones actually used by FinishMachineConfig for a non-state-server [12:38] fwereade: so the Environ.SecretAttrs seems to be the only place that knows what the private attributes are [12:38] dimitern, but IIRC we agreed that authorized-keys should come from the machine anyway? [12:39] state.EnvironConfig doesn't combine sections or anything [12:39] jam, yeah [12:39] jam, afraid not [12:39] fwereade, how about provider type? [12:39] fwereade: so I would be fine with a quick hack, but I think if we can have LXCProvisioner than it doesn't need anything like EnvironConfig, it can just do "GetMyProvisionerConfig" sort of call. [12:40] dimitern: I would guess that we don't actually need environ for LXC provisioner [12:40] dimitern: but the current code layering [12:40] jam, yeah [12:40] means a lot of line-by-line auditing of "can I get here in an LXC provisioner" [12:41] personally I think we should move towards having known attributes in the state in a well known form separate from environ config. [12:41] rogpeppe, yeah, I'm definitely keen on migrating stuff into sensible buckets [12:41] dimitern, I'm trying to figure out why we need provider type [12:41] fwereade, we can do ProviderType() (string, error) api call, like we did with the uniter [12:41] fwereade: we'd have to be careful around juju set-environment [12:42] dimitern, yeah, indeed [12:42] dimitern: moving towards that also gets us away from "NewSimpleAuthenticator" running on the LXCProvisioner, which makes it easier to say "this does not actually directly touch Mongo" [12:42] rogpeppe, yeah, definitely [12:42] jam, we don't have to change that - we can change the api not to set mongo passwords [12:42] rogpeppe, but, eh, that stuff's all fatally broken anyway,it only works by luck [12:43] dimitern: this is more about auditability [12:43] by sharing the code [12:43] you have to look at switches, etc [12:44] oh, this isn't enabled in this configuration [12:44] if we split them apart [12:44] then there just isn't a state connection object anywhere in the LXCProvisioner [12:44] fwereade, so how about a follow-up that introduces ProviderType() and apiprovisioner.Machine.GetAuthorizedKeys() API calls, and uses that in the lxc provisioner? [12:44] dimitern: I don't tihnk we need the api to get the ProvisionerType, as cmd/jujud/machine.go is the only place where we ever call NewProvisioner [12:45] and if we *want*, we can make Provisioner just an interface{} [12:45] and then implement 2 of them [12:45] fwereade, GetAuthorizedKeys() needs to read the env config internally and return a slice of what? [12:45] and NewProvisioner returns one or the other based on the flag you passed in. [12:45] jam, it currently does that [12:45] dimitern, GetAuthorizedKeys I think takes an []tag, and retur an []string [12:46] jam, but not as an interface [12:46] fwereade, machine tag ok, and which env config keys should it return? [12:47] dimitern: no, it currently returns a Provisioner that has an internal flag set. vs a separate type/struct/whatever [12:47] dimitern: I guess my point is, we shared a bunch of the code because they look "similar" but honestly there are a *lot* of different bits, and I'd like to split them further apart. [12:47] dimitern, it just returns the valueof authorized-keysin config [12:47] jam, yeah, they should unquestionably be split [12:47] fwereade, ok, one per machine [12:48] jam, that was always the original plan [12:48] and have 2 implementations that share an interface, rather than 1 concrete type that has a bunch of switch statements. [12:48] jam, but the authkeys-in-config scotched it [12:48] fwereade, and then a follow-up that splits the 2 provisioners into separate types implementing an interface [12:48] dimitern, do you know offhand why there's an environ on p? [12:48] fwereade: GetAuthorizedKeys returns a []{tag: Name, keys []string} doesn't it? [12:49] fwereade, and a third CL, which binds the previous 2 together [12:49] well, []{tag: Name, keys []string, Error} [12:49] fwereade, it's an instance broker [12:49] jam, authkey is just a string in the format one would expect in .ssh [12:49] jam: we current represent a set of authorized keys as a single string [12:49] dimitern, wtf, why's it called environ then? [12:49] fwereade: []{tag: Name, keys string, Error} ? [12:49] jam, not really - we can co with just StringsResults - no name neede [12:49] dimitern, +1 [12:50] dimitern, ok, I need to think and read more code a little [12:50] fwereade, because it implements what InstanceBroker's interface was extracted from [12:50] dimitern: I personally *really* like APIs that return "result + context you requested it" [12:50] jam: too late :-) [12:50] jam, we need to unnecessary change all calls [12:51] jam, and it's working well already [12:51] jam: also, it's really not necessary - adds more network traffic and more error conditions to check [12:51] rogpeppe: slightly more traffic vs being able to actually look at a response and instantly understand it.... [12:52] xml/json are reasonably self documenting over ASN.1 for a reason [12:52] jam, you can look at the request and understand the response [12:52] dimitern: still takes 2 bits of information, when it could be all together [12:52] dimitern: +1. without the request, you're pretty much out of luck anyway [12:52] jam, i really don't see this as a drawback [12:53] dimitern: so if you take this array of things, and sort of squint at it enough, you can line it up with that array of things. [12:53] jam: i could potentially change the rpc package so it always included all the request data with the response [12:53] *or* you could write it down as an array of tuples [12:53] and immediately see the pairirng [12:53] jam: we never pass more than one thing anyway - the whole point is moot [12:54] jam, and send twice as much over the wire [12:54] jam: we might possibly one day have two uses for bulk calls [12:54] dimitern: one is a tag that is 5-10 bytes, one is an authorized-keys string that is 1000bytes, that is not 2x over the wire [12:54] dimitern, ok, so, that environConfig goes on a loong adventure between the getBroker call and the final FinishMachineConfig, but that's the only place it happens [12:55] jam, rogpeppe: if anything, logging api requests and responses can be improved - like print the request data in the response log [12:55] dimitern, so resolving that in this CL is indeed definitely not an option [12:55] fwereade: +1 [12:55] dimitern, however I remain unrepentantly opposed to putting secrets,via the API, anywhere that is not known to be authorized to read those [12:56] fwereade: me too [12:56] rogpeppe, and we need to get rid of these discard * call signature debug logs from the rpc [12:56] dimitern: they're gone [12:56] rogpeppe, sweet! [12:56] fwereade, ok, it's just a temporary state [12:56] dimitern: https://codereview.appspot.com/13249054/ [12:56] fwereade, it'll be fixed in the next 3 cls [12:57] dimitern, fwereade: i'd still like a second review of this (martin's request) BTW: https://codereview.appspot.com/13778046/ [12:57] rogpeppe, bugger, I thought I texted you -- I'd just finished reading it when the power went out [12:58] rogpeppe, I said "LGTM" :) [12:58] fwereade: ah, you did! my phone was muted [12:58] fwereade: i sent you an email, expecting your "from-the-future toy" response... [12:59] fwereade: thanks [12:59] dimitern, can we have a quick g+ in 5 please? [12:59] fwereade: ha, looks like a merged it anyway! [13:00] s/a merged/i merged/ [13:00] fwereade, sure, let me start one [13:01] fwereade, https://plus.google.com/hangouts/_/96f599fd9a86362a79be136169847367eaaf5539 [13:02] dimitern: http://paste.ubuntu.com/6150016 [13:02] fwereade: ^^ [13:03] that is in EnvironConfig [13:03] we already have the AuthEnvironManager [13:03] to handle stuff like WatchEnvironMachines [13:03] so we can just use it here to hide all secrets if we aren't an environ manager [13:03] jam, and we need to restrict WatchForEnvironConfigChanges to the environ manager as well as EnvironConfig() [13:04] jam, then we won't need to delete any attrs [13:04] fwereade, i'm waiting [13:04] dimitern: so I think we need an entirely new structure for non environ provisioners, but if we just want "don't leak secrets to those machines" that should be enough, I think. [13:05] as in, we can do a bit of testing and land that in 2 hours [13:05] well hours not days [13:25] jam, ok, dimitern will be closing the API hole such that the current structure will work without secrets, and in the meantime I'll be finishing the review and trying to come up with a way forward [13:26] jam, well, without *real* secrets anyway [13:29] fwereade: I proposed the latest CL after the review changes again. would you mind to take a look there too? [13:29] TheMue, will do [13:30] fwereade: great, thx [13:31] fwereade, mgz, jam, TheMue, dimitern: small review if anyone wants to look: https://codereview.appspot.com/13839046/ [13:32] rogpeppe: already reviewing it [13:32] TheMue: ta! [13:34] rogpeppe: done [13:34] TheMue: thanks [13:36] dimitern, wait, shit -- that SimpleAuthenticator thing needs a valid environ [13:38] fwereade, to call StateInfo() on it, yeah [13:38] dimitern, so we can't plug the hole until we've handled that [13:38] dimitern, it's easy to be fair becaue I'm pretty sure the provisioner is started with an agent config anyway, so it can clone its own [13:39] fwereade, so should I stop doing the masking of the secret attrs then? [13:39] dimitern, that's still necessary, I'm just trying to figure out the ordering [13:39] fwereade, ah, ok [13:39] dimitern, we can land secret masking right now with no impact [13:40] dimitern, but with secret masking in place, we can't land the provisioner until the StateInfo requirement is fixed [13:40] dimitern, but similarly, we can land provisioner with no impact, but then can't land secret masking until StateInfo is dropped [13:42] fwereade, hmm [13:44] fwereade, but the secretattrs that get masked is only one it seems - "secret", and it's needed by the stateInfo only, we don't need to use it, right? [13:46] dimitern, in practice the ec2 secret-key will be masked [13:46] dimitern, preventing us, I think, from reading the instance from storage and figuring out it address [13:46] dimitern, hey [13:47] dimitern, don't we already have API code for saying what the API addresses are? [13:47] dimitern, I guess maybe we don't [13:49] fwereade, we have one for the deployer [13:49] dimitern, yay! then we should surely reuse that [13:50] fwereade, so we get rid of environ.StateInfo() and call the APIAddresses() instead [13:51] dimitern, yeah, I think so, and if it turns out that some annoying client depend on state.Info being meaningful we can just fill it with nonsense in order to move forward [13:51] dimitern, it's nice that we have that auth interface for easy swapping out, innit ;) [13:52] fwereade, the manual provisioner uses the SimpleAuthenticator as well [13:52] dimitern, that's fine, it has legitimate access to the environ [13:55] dimitern has a power cut too [14:02] hmm it seems it was only my e-meter that tripped off [14:03] fwereade, back [14:04] dimitern, ah cool [14:04] dimitern, https://codereview.appspot.com/13720051/ just reviewed [14:05] fwereade, cheers [14:06] dimitern: a few comments from me too that i forgot to publish earlier [14:06] fwereade, you mean all api watchers should return tags? [14:06] fwereade, none of them do [14:06] rogpeppe, thanks === BradCrittenden is now known as bac [14:08] dimitern: i hadn't noticed that, but for consistency all the watchers should really return tags not ids, i guess [14:09] rogpeppe, you'd have surely noticed if you did a state-to-api migration of existing code :) [14:10] dimitern: surely i would :) [14:10] dimitern, part of the point of the relation tag changes was so that the watcher could convert them to tags, iirc,did we forget to do that bit? [14:11] dimitern, when we noticed we knew we were stuck with deployer's watchers but I think the others were fine [14:11] dimitern, ie not yet implemented [14:11] dimitern, eh,we both dropped the ball there I guess [14:12] dimitern, what else have we released with non-tag-based watchers [14:12] ? [14:12] fwereade, all of them [14:13] fwereade, but I need to check which ones exactly [14:14] dimitern, ok, let's not sweat it now [14:14] all tests pass [14:14] fwereade, so machiner, deployer, provisioner and uniter all have stringswatchers that need fixing [14:14] yay! [14:14] * rogpeppe says, a little wearily [14:14] dimitern, tech-debt bug pointing out that all the StringsWatcher use a silly format but it's two-way transformable without context so nbd really [14:15] dimitern, we'll fix it in our Copious Free Time, but at this stage we may as well be consistent and fix them all together [14:15] fwereade, added bug 1229755 [14:15] <_mup_> Bug #1229755: Watchers returned from the API should report tags, not ids as changes [14:15] dimitern, cheers [14:15] fwereade: perhas we could change the client code now to accept ids or tags, and transform them to tags if it gets ids. that way it's backward compatible when we move to returning tags from the API [14:17] rogpeppe, this is how all the client (well agent really) code works [14:17] rogpeppe, dimitern, hmm: maybe we could do that in the api stringsWatcher anyway... we can tell what kind a name/id has by inspection, can't we? [14:18] except wait, better yet [14:18] fwereade, except for the relation units watcher [14:18] fwereade: i'm not keen on doing that if it's still called "stringsWatcher". "tagsWatcher" would be a better name in that case. [14:19] rogpeppe, actually I had it the wrong way round anyway [14:19] rogpeppe, tags are strings [14:19] rogpeppe, stringsWatcher -- *if* it is indeed actually a names/ids/tags/whatever watcher will still want to produce non-tag things [14:19] dimitern: yes, but strings aren't tags [14:20] rogpeppe, i'm -1 on tagsWatcher [14:20] rogpeppe, perhaps entityTagsWatcher [14:20] dimitern: sure [14:21] dimitern: just i'm -1 on anything tag-related inside something that calls itself "stringsWatcher", implying that it's just a bunch of strings with no other attached semantics [14:21] rogpeppe, dimitern: ok, so, we can in that case wrap the existing stringswatchers with wrappers that untag the strings as they land, if they are in fact tags [14:22] fwereade, why so complicated? [14:22] fwereade, we just assume we always get tags [14:23] fwereade, who is looking at juju memory consumption on service units aka bootstrap node won't run on a tiny [14:23] dimitern, because that's the low-impact change we can make today that gives us forward compatibility with anapi that returns tags from watchers, I think? [14:24] fwereade, changing the stringsWatcher to return tags at client-side api seems low-impact to me too [14:24] jamespage, I think I will have to force some space to look at that myself, I'm afraid :( [14:24] dimitern, except that all the existing code is expecting non-tags [14:25] jamespage: various of us have been tangientally involved [14:25] fwereade, the needed changes to start expecting tags from these watchers is minimal [14:25] jamespage, I know jam has been looking at it to dome degree too [14:25] jamespage: what we're really missing is some expertise from the other side [14:25] dimitern, but there is code out there in the wild that we have released using ids, and changing to tags will mess with them [14:25] mgz: from the other side? [14:25] it seems pretty clear something changed on canonistack, but no idea wgat [14:26] *what [14:26] mgz, hmm - well I see exactly the same thing on serverstack [14:26] fwereade, I think we messed up pretty much by being lenient about version upgrades [14:26] dimitern, by implementing clients that can handle tags when they land in the future we can avoid changing the API today [14:26] fwereade, and now we lock ourselves in a vicious circle every time we need to change the api in any way [14:26] mgz, and I think I'm seeing a related issue with the mysql charm [14:26] well, or possibly in cloudinit or the images [14:27] we went from being able to run on tiny, to not, one afternoon without the juju code being changed (old versions now also exhibit the problem) [14:28] so, there's stuff juju can do to make this work, some of which is documented in the bug, but would be good to understand what exactly broke [14:28] dimitern, yeah, I should have raged and screamed at the first version of the API and insisted on explicit version handling from the beginning [14:28] dimitern, but the questions of compatibility just shift there really [14:28] fwereade, but fair enough, I see your point with decorating the stringsWatchers at client-side to untag stuff it gets [14:29] dimitern, and honestly, I don't think even that is really worth doing at this point [14:29] fwereade, then we need to change a bunch of watchers in state to return tags directly [14:29] dimitern, hmm, not so sure, I was thinking that tags were really an API language [14:30] dimitern, the first cut at them did I think leak into state, which is a shame [14:30] dimitern, but the transform necessary from id to tag is not hard to do at Next() time [14:30] dimitern: it's easy enough to change the API in a backwardly compatible way if we want - just return both tags *and* ids for the time being, then deprecate the ids field later. [14:30] rogpeppe, indeed [14:30] fwereade, so we don't need to do anything for bug 122975 for now [14:30] <_mup_> Bug #122975: thunderbird-bin crashed with SIGSEGV in raise() after click in email to show it in the preview pane [14:30] dimitern, that's a relief [14:30] ;p [14:31] oops bug 1229755 [14:31] <_mup_> Bug #1229755: Watchers returned from the API should report tags, not ids as changes [14:31] dimitern, but yeah we don't need to do anything for bug 1229755 either [14:31] <_mup_> Bug #1229755: Watchers returned from the API should report tags, not ids as changes [14:31] :) [14:34] fwereade, I didn't quite get this https://codereview.appspot.com/13720051/diff/1/cmd/jujud/machine.go#newcode201 [14:34] dimitern, jujud houldn't know about differences between providers === hatch_ is now known as hatch [14:35] fwereade, you're asking to add a tech-dept bug, which says something like "We need a MachineJob called JobHostLXCContainers" ? [14:35] dimitern, yeah, we're running LXC based on kooky inferences [14:36] dimitern, we should be getting what to try to run from state, I think [14:36] fwereade, and who should decide whether the machine has that job or not? [14:36] dimitern, the provider [14:36] fwereade, and cmd/juju stuff that adds a machine? [14:37] dimitern, don't think so, no [14:37] hey wait sorry wrong job [14:37] dimitern, ok there is more context mixed in the linked CL [14:38] dimitern, I *think* that we figure out whether we can run containers by asking the environment [14:38] dimitern, but we should talk about this with axw tomorrow morning, I think [14:38] fwereade, ok [14:38] fwereade, morning being? :) [14:39] dimitern, the important thing is that you don't need to take action now but you do need to assign corrective action to yourself and we'll figure out exactly what it should be tomorrow [14:39] fwereade, 10pm our time? [14:39] dimitern, nah, morning our time, I think he's still around then usually [14:39] fwereade, ok, so no bug to file until then [14:39] dimitern, I was going to wait up last night but I don't think he actually get in until 3am or so [14:43] dimitern, I guess the bug is something like "MachineAgent.APIWorker uses witchcraft to start lxc provisioner" [14:43] fwereade, dimitern: I'm awake for the time being. What's up? [14:43] dimitern, but yeah, we can charactierise it in context with axw tomorrow [14:43] axw, heyhey! [14:43] :) === natefinch-afk is now known as natefinch [14:44] axw, more layering violations of the kind I was bitching about in the null provider review [14:44] fwereade: is this the LXC provisioner worker thing in the same area? [14:44] axw, machine agent deciding whether to do things based on provider/container type [14:44] axw, close but not directly touching [14:45] axw, the common thread is that machine agents are depending on environment info that's at the wrong level of abstraction [14:45] axw, and that we have a perfectly good mechanism for telling agent what to do already, which is jobs [14:45] right, as in they check the provider name, rather than checking what capabilities they have [14:46] axw, exactly [14:46] axw, and I thought that since I am telling both of yu that things must be fixed, and could perhap be fixed by defining new jobs, i thought it would be good for us all to be in sync [14:46] fwereade, mgz, TheMue, dimitern, axw, natefinch, jam: i'd love it if someone could take a look at this: https://codereview.appspot.com/13573046 [14:46] fwereade: righto [14:46] it's unfortunately big, but not really splittable [14:46] fwereade: so, I was looking at a TODO you left in bootstrap.go regarding customising jobs [14:47] axw, yeah, that's the one :) [14:47] fwereade: I think that's going to be necessary here [14:47] and that leads to the question I emailed you regarding upgrade [14:47] rogpeppe: okay, as it's so small :) [14:47] axw, yeah, it's a little fiddly, and in your case involves sending special instructions via cloud-init, I think [14:47] * rogpeppe blows mgz a kiss [14:47] fwereade: for local-storage, yes [14:49] dimitern: you can reference 1229507 if you like [14:49] once one's done, it should be simple to do a second (or third, as is the case) [14:49] axw, ok, mine will be similar [14:50] * rogpeppe goes back to the branch for which i made these changes... 46 branches previously [14:51] axw, ok, updating jobs should be pretty tolerable, but there is currently no code that does this IIRC [14:53] axw, I will expand on that in the response [14:53] rogpeppe: I like your large ones [14:53] fwereade: to my naive mind, this sounds like it might require generic upgrade support, which could also be used for state schema upgrades [14:53] dimitern, I will cc you in [14:53] TheMue: ha ha! [14:54] axw, yeah, and at least the actual upgrading is now behind the api server and could thus perhaps be managed with a bit more finesse [14:54] * rogpeppe likes a good double entendre [14:54] * fwereade considers that to be barely a single entendre [14:57] mgz, for context the mysql charms attempt to configure mysql with 80% of total memory on a service unit [14:57] this borkes fairly frequently now [14:57] interesting [14:58] mgz, different openstack deployment but I see the same issue with the bootstrap node on a m1.tiny [14:58] so, the main issue we were seeing was on bootstrap, starting jujud during cloudinit setup failing due to being short on memory [14:58] rogpeppe: and please change NewMem() to NewMemory() (or at least NewDisk() to NewDsk(), just to make it similar *smile*) [14:58] mysql charm issues is a later point, and there's no mongo install happening [14:59] TheMue: somehow NewMemory doesn't do quite the right thing for me as NewMem. I'm not quite sure why. [14:59] TheMue: and Mem is a very commonly used abbreviation (e.g. memcached, etc) [14:59] jamespage: do you have any clues on what could have changed? [15:00] we were presumably close to the limit previously, but something made everyone start hitting this issue... [15:00] TheMue: i'm not sure it's worth bikeshedding over [15:00] mgz, poking again right now [15:00] rogpeppe: still NewMem reads strange ;) [15:01] TheMue: to do it right, it would probably be NewMemoryBasedConfigStorage [15:01] TheMue: but i'm actually reasonably happy with NewMem [15:01] rogpeppe: yeah, java style [15:01] rogpeppe: ok, can live with it [15:02] rogpeppe: NewMBCS() [15:02] ;) [15:02] TheMue: :) [15:04] rogpeppe: reviewed [15:04] TheMue: that was quick! thanks. [15:05] mgz, doh! I already forced the dataset-size smaller for my config [15:05] * jamespage pushed the car back up the hill to see if it crashes next time [15:05] rogpeppe: most have been changes using the NewMem as additional arg, so here the reading has been simple [15:05] TheMue: cool [15:05] mgz: were you reviewing it; if not, i'll approve it now. [15:06] nearly there [15:06] nothing substantive [15:06] I have some sympathy with TheMue's complaint about NewMem now he's emntioned it [15:06] mgz: also want a change from NewMem to NewMemory? ;) [15:06] TheMue, lgtm with a couple of comments [15:06] mgz: h5 [15:06] fwereade: ta [15:07] rogpeppe, onto yours in a few minutes :) [15:07] rogpeppe: posted [15:07] fwereade: cool, thanks [15:08] mgz: you're dead right about TestDestroyEnvironmentCommandConfirmation; i'll split it. [15:09] there are still so many little aspects of the go language that trip me up... [15:09] return statements being one of the more trivial... [15:12] fwereade: the hook name export has indeed an error, overlooked that i'm using it in the same package [15:13] mgz: what about return statements trips you up? [15:18] there are so many possible variations to how they'll look in a function [15:21] mgz: I think as long as people avoid bare returns (which I think are an anti-pattern, and I wish they'd do away with them), then it's not so different than other languages... except for the multiple returns [15:52] fwereade: are you still planning to look at that branch? [16:14] rogpeppe, sorry, the first file is still open [16:14] fwereade: np; i'm still working on a fix for TestBootstrapWithDefaultSeries live test as it happens [16:15] fwereade: do you know what the deal is with tools/juju-1.15.0-raring-amd64.tgz versus tools/releases/juju-1.15.0-raring-amd64.tgz ? [16:16] fwereade: it seems to be uploading to the latter, but StorageName is returning the former [16:16] rogpeppe, huh [16:16] rogpeppe, there is some horrible patching function [16:17] fwereade: any clues as to where it might be? [16:17] * fwereade meditates [16:18] rogpeppe, environs/tool/storage.go, right at the top [16:18] rogpeppe, I would guess there's something screwy about the patching/unpatching [16:18] rogpeppe, *but* I cannot recall why it was needed in the first place [16:18] WTF!?!?! [16:19] we set global variables for testing purposes, but SetTestPrefix is bonkers [16:20] it means that SyncTools is fundamentally not thread-safe [16:21] * rogpeppe feels slightly queasy [16:22] fwereade: ^ [16:23] rogpeppe, I do recall seeing it and being scared before, but being on the trail of bigger game, so your surmise is probably correct [16:23] rogpeppe, so we call that outside a testing context? [16:23] rogpeppe, or just that the tests are screwy? [16:24] fwereade: we call it in ReadList [16:24] rogpeppe, uhh? [16:24] fwereade: and in copyOneToolsPackage [16:24] fwereade: which is called by SyncTools [16:25] fwereade: and Upload calls it too [16:25] fwereade: as does SyncTools itself [16:26] rogpeppe, well, while it *might* coincidentally be safe, yeah, that's crack [16:26] fwereade: it's just random side-effects unrelated to the function [16:27] fwereade: ReadList, for example just changes the global tool prefix if it gets ErrNoTools [16:27] fwereade: oh actually it doesn't, sorry [16:27] rogpeppe, yeah, I think it always cleans up after itself [16:27] rogpeppe, but it's totally unaware of concurrency [16:28] fwereade: even if it was, it would be totally wrong [16:28] fwereade: you could protect it with a mutex and it would be just as wrong [16:28] rogpeppe, yeah, it's a pretty fundamentally insane operation, that stuff should be passed around, no question [16:30] fwereade: why did the tools need to move, BTW? [16:30] rogpeppe, I have absolutely no recollection of that, I'm afraid [16:31] fwereade: because we *could* put in lots of extra context and change quite a bit of code that assumes that names are independent of storage context, *or* we could just leave the names as they are [16:31] wallyworld: ping [16:35] fwereade: well, i think i'll leave that test as broken as is, as it's currently broken on trunk [16:36] fwereade: and i'll file a bug [16:36] fwereade: and i will approve my branch, unless you want to have a look first. [16:38] rogpeppe, I'm reading through it, if I find any reason to panic I will be sure t oinform you [16:39] fwereade: i'm sure you will :-) [16:39] fwereade: if you think you'll finish tonight, i'll hold off [16:46] fwereade: https://bugs.launchpad.net/juju-core/+bug/1229839 [16:46] <_mup_> Bug #1229839: provider/ec2: LiveTests.TestBootstrapWithDefaultSeries is broken [16:47] rogpeppe, nice, thanks [16:59] rogpeppe, LGTM, that's great [16:59] fwereade: cool, thanks [17:00] rogpeppe, am I sane re: https://codereview.appspot.com/13573046/diff/5001/environs/open.go#newcode101 ? [17:00] fwereade: yeah, i feel quite good about the direction we're going [17:01] fwereade: i've been thinking about this issue [17:02] fwereade: short answer: yes, i was planning on just storing a diff [17:02] aww [17:02] it'll be big and smelly and redundant [17:02] fwereade: because otherwise the attributes may well have changed between the time you call Prepare and the time you call Open [17:02] loads of auto-inserted defaults [17:03] fwereade: that's true, but at least you'll have one single place to see all the settings that go into an environment [17:03] fwereade: that smelliness is actually our genuine stink [17:04] rogpeppe, well, it's still two places if you consider what's in environment.yaml ;) [17:04] fwereade: eventually, i hope that environments.yaml will actually be replaced by a network call to fetch actual config values [17:04] rogpeppe, I do agree there's a foul smell to the whole thing [17:05] rogpeppe, eh, the CLI should hardly ever need to know them in the first place [17:05] rogpeppe, bootstrap is, I think, the special case [17:05] fwereade: that's true [17:05] fwereade: and in most cases, the CLI will never see any attributes at all [17:06] fwereade: they're only relevant for the bootstrapper [17:07] fwereade: i think that, for an admin, knowing that they can bootstrap, then copy *only* environments.yaml and environments/name.xxx (ext TBD!) to another machine, is a really useful property [17:08] fwereade: without needing to remember to copy across any number of provider-specific env vars [17:08] too [17:08] fwereade: how about we go with "just a diff" to begin with, and if we think it looks too smelly, we can trim it down later. [17:09] ? [17:19] fwereade: i've got to go [17:19] rogpeppe, sorry, got called away myself [17:19] rogpeppe, I thought it'd be 5 seconds... [17:20] rogpeppe, the env vars are a very good point, but my heart still yearns for making the provider -- that knows about that -- responsible for recording those [17:20] rogpeppe, I'm not against the env file + environments.yaml, I think that's good, but I don't think it needs defaults inserted [17:21] rogpeppe, values read from other files, probably, yes, though [17:21] rogpeppe, anyway I must return [17:21] fwereade: we'll chat about this tomorrow [17:21] fwereade: g'night! [17:23] fwereade: BTW, only provider defaults will go in, as it's currently structured. [17:23] fwereade: and it's perhaps actually nice to see what those are [17:24] fwereade: by my logic above though, we'd should put in authorized keys and all the other defaults, making them concrete. [17:24] * rogpeppe is really gone now [17:39] mgz, fwereade. jam: if there's anyone left online: https://codereview.appspot.com/13802045 [17:39] looking [17:40] ah, and it's one I really should review too [17:41] tas is stored as a list in Constraints I take it? [17:41] hence the change to IsEmpty checks rather than compare to {} [17:41] *tags [17:41] * mgz j-s it up [17:50] mgz: yeah, I added a comment to that effect after I realized it wasn't going to be obvious at first [17:53] I'm still not sure about that vs just storing a space-seperated string [17:53] (for other reasons, not because it would save an Isempty function, that's fine) [17:53] in general I really like to store lists of strings as lists of strings... then you let each consumer reformat (or not) as necessary [17:54] then it's really clear "hey, there's multiple values here" and you don't have to go look at the implementation to know how to separate the values