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

wallyworld_jam: g'day, can haz mumble?06:01
TheMueGood morning.07:11
fwereade_mornings07:16
TheMuefwereade_: Thx for your reviews. And yes, so far I've concentrated on positive testing. I will harden it now.07:18
TheMuefwereade_: Btw, over night I found a little trouble with your regex for valid machine ids.07:23
TheMuefwereade_: Right now leading zeros are ok, like "000000001".07:23
TheMuefwereade_: I don't think that's wanted.07:24
fwereade_TheMue, hmm, interesting07:24
fwereade_TheMue, yeah, thank you, good catch07:24
TheMuefwereade_: Cheers.07:24
fwereade_morning rogpeppe109:06
TheMuerogpeppe1: Good morning.09:08
fwereade_hm, I appear to be nutritionally challenged, need to pop out for a croissant or something, bbs09:35
rogpeppe1fwereade_, TheMue: morning!09:44
TheMuerogpeppe1: Hiay.09:45
* TheMue has somewhat crooked fingers again this morning.09:46
rogpeppe1fwereade_, TheMue: if you've a moment at some point, i would quite like a review of a branch that fixes an earlier trunk-reverted branch. this CL is exactly the changes that were LGTM'd, submitted and reverted: https://codereview.appspot.com/6852081/. this CL holds the changes that i've made to fix it: https://codereview.appspot.com/6850087/10:20
TheMuerogpeppe1: *click*10:24
TheMuerogpeppe1: Could you please tell me more about the current state of the fake home?10:26
* fwereade_ looks10:26
rogpeppe1TheMue: i'm not sure what you mean, sorry10:26
TheMuerogpeppe1: As far as I remember the discussion about the fake home has been controversal. But I may be wrong.10:28
rogpeppe1TheMue: in this case it's just a local helper function10:28
TheMuerogpeppe1: Ah, ok.10:28
rogpeppe1TheMue: the controversial thing was making it into a test fixture10:28
TheMuerogpeppe1: Yes, now I remember.10:29
fwereade_rogpeppe1, sorry, but I'm having a bit of difficulty orienting myself -- I haven't been paying close attention to your discussions10:29
rogpeppe1fwereade_: ok, brief summary:10:30
rogpeppe1fwereade_: the original branch made ca-cert and ca-private-key keys in the config.Config10:30
rogpeppe1fwereade_: with logic to read them from ~/.juju/<envname>-cert.pem and ~/.juju/<envname>-private-key.pem if necessary10:31
rogpeppe1fwereade_: (similar to the authorized-keys behaviour)10:31
rogpeppe1fwereade_: that branch was approved and submitted, but...10:31
rogpeppe1fwereade_: unfortunately it interacted badly with another parallel change, and a bad test meant i didn't catch it10:32
rogpeppe1fwereade_: so, after discussion with gustavo, this pair of CLs a) reapplies all the changes that were reverted and b) applies a fix10:33
fwereade_rogpeppe1, can we drill down into the bad interaction a little?10:33
rogpeppe1fwereade_: ok. the bad interaction was with juju.Bootstrap10:34
rogpeppe1fwereade_: which expected the old scheme of putting both certificate and key in the same file10:34
rogpeppe1fwereade_: the problem was that i was expecting juju.Bootstrap to generate a certificate that the config could read10:35
rogpeppe1fwereade_: but it didn't10:35
rogpeppe1fwereade_: (i did have an explicit test for that, but it wasn't working, which is the cause of all these problems)10:35
rogpeppe1fwereade_: so this is a temporary band-aid fix that gets this huge branch in without breaking trunk so i can fix juju.Bootstrap in the next iteration.10:36
rogpeppe1fwereade_: (the config stuff will remain as proposed)10:37
rogpeppe1fwereade_: i really don't to pile more changes into this CL if at all possible10:38
fwereade_rogpeppe1, I remain confused about whether we're expecting one file or two10:39
fwereade_rogpeppe1, that []byte in juju/bootstrap.go implies one; the config stuff implies 210:40
rogpeppe1fwereade_: this CL leaves us in a half-way house - juju.Bootstrap expectes one; the config expects two10:40
rogpeppe1fwereade_: but nothing in this branch relies on juju.Bootstrap to generate a certificate10:40
rogpeppe1fwereade_: or to read a certificate10:40
rogpeppe1fwereade_: (because all tests explicitly pass in the cert/key pair)10:41
fwereade_rogpeppe1, ok... but what about actually running juju?10:41
rogpeppe1fwereade_: that's fine. we don't use juju.Bootstrap.10:42
rogpeppe1fwereade_: the cert/key pair isn't used anyway10:42
rogpeppe1yet10:42
rogpeppe1fwereade_: note the changes here: https://codereview.appspot.com/6850087/diff/3003/cmd/juju/bootstrap.go10:43
rogpeppe1fwereade_: i have tested it live - it works10:43
fwereade_rogpeppe1, yeah, that was the source of my confusion really :)10:43
rogpeppe1fwereade_: yeah, the whole thing is a little confusing - two independent branches interacting badly.10:44
rogpeppe1fwereade_: (i'd abandoned the config change 'cos gustavo said it was crack, but he later changed his mind and said that was just what we wanted)10:44
fwereade_rogpeppe1, heh :)10:46
=== rogpeppe1 is now known as rogpeppe
dimiternrogpeppe, mgz, jam: please have a look https://codereview.appspot.com/6858052/ - after fixing what was suggested10:47
mgzdimitern: sure.10:48
fwereade_rogpeppe, so... to follow up, you're going to cause [some bootstrap machinery] to generate cert/key where required, and make it mandatory again in config; and then subsequently start depending on it on the server side?10:49
rogpeppefwereade_: yes to the first, but actually the cert will remain optional10:50
rogpeppefwereade_: because otherwise we can't read a config file without first generating the certificates10:50
fwereade_rogpeppe, ok, but the cert will not be optional on the server side?10:50
rogpeppefwereade_: no indeed. it'll be a required flag in cmd/jujud, and required when creating a cloudinit MachineConfig too.10:51
fwereade_(grumble grumble, user config and state config are not the same)10:51
rogpeppefwereade_: yeah10:52
fwereade_rogpeppe, ok; and what you're really interested in is review of the second branch, on the basis that the first one has in fact already been LGTMed?10:52
rogpeppefwereade_: precisely10:52
mgzhm, how do to I get the interdiff on cr? or should I just branch this locally...10:52
rogpeppemgz: the interdiff?10:52
rogpeppemgz: you can get a diff between any two stages in cr by adjusting the "Left" and "Right" popup menus10:53
mgzdimitern updated his merge proposal, I want to see what changed... I guess I can just use lp.10:53
mgzthe whats?10:54
dimiternmgz: well, I did the changes in the same branch, pushed and then lbox propose - did I do it wrong?10:54
fwereade_mgz, look in the "Delta from patch set" column10:54
rogpeppemgz: if you're in the "Side by Side Diff" page, there's are two buttons at the top left, labelled "Left" and "right"10:54
mgzdimitern: nope, I just don't know how to use cr10:55
rogpeppemgz: Each one holds one iteration of the review. You can adjust as you like, then click "Go" to see the differences10:55
mgzthere's only '1' listed in that column10:55
fwereade_mgz, so that is then the diff from patch set one, right?10:56
rogpeppemgz: i see two: for instance: https://codereview.appspot.com/6858052/diff2/1:5002/environs/openstack/config.go10:56
rogpeppedavecheney: yo!10:57
mgzah, so it's 0 otherwise10:57
rogpeppemgz: "j" and "k" are convenient keyboard shortcuts for moving forward and backwards between files10:57
fwereade_mgz, yeah, if you expand Patch Set 1 you will see the column is empty10:58
* rogpeppe never uses the "Delta from patch set" column, other than as informational content.10:58
dimiterncool! I was looking for that too - the delta column is great10:59
rogpeppewhat i usually do is click on a comment, then adjust the "Right" button to point to the latest iteration.10:59
rogpeppe'cos i'm almost always interested in what's changed since a given comment11:00
wallyworld_dimitern: mgz: jam: standup?11:02
TheMuerogpeppe: You've got a review.11:03
niemeyerMorning!11:03
rogpeppeTheMue: thanks!11:03
rogpeppeniemeyer: yo!11:03
TheMueniemeyer: Hiya.11:03
dimiternmgz, jam: wallyworld_ and me are in mumble11:04
mgzjam is off again today I think, I'll be with you guys shortly11:05
wallyworld_dimitern: mgz: https://pastebin.canonical.com/78914/11:11
fwereade_niemeyer, morning11:12
TheMuelunchtime11:17
mgzthat odd "Get http://example.com/marker" bit is the same as dimitern had, but you're not getting the crash11:17
niemeyermgz: This is an issue introduced in 1.0.311:18
niemeyermgz: and unfortunately there isn't a workaround11:18
niemeyermgz: Even more unfortunately, I perceived that in advance of the release, and we fixed it11:19
niemeyermgz: But luck wanted the bug to be cherrypicked for the release, and not the fix11:19
rogpeppei'm having an extended lunch break today, back in about 3 hours11:52
dimiternrogpeppe: cool :)11:56
niemeyerrogpeppe: Enjoy11:58
niemeyerrogpeppe: We should catch up when you're back, to sync up on the branches that should go in11:58
rogpeppeniemeyer: yes please11:59
rogpeppeniemeyer: in case you manage to get to it before i return, here's a summary of the one i'm most concerned about:11:59
rogpeppe this CL is exactly the changes that were LGTM'd, submitted and reverted: https://codereview.appspot.com/6852081/. this CL holds the changes that i've made to fix it: https://codereview.appspot.com/6850087/11:59
niemeyerrogpeppe: Ah, great.. so the former one is just the revert reverted :-)12:00
rogpeppeniemeyer: yeah12:00
niemeyerrogpeppe: Thanks, that makes things a lot easier12:00
rogpeppeniemeyer: i hoped it might help :-)12:01
dimiternfwereade_: ping12:05
dimiternniemeyer: so now, after having 2 positive reviews, how's the process to land the CL into lp:juju-core?12:06
dimiternniemeyer: just merge the branch into trunk and push it?12:07
dimiternTheMue: maybe you can help? ^^12:09
TheMuedimitern: You're working with lbox?12:10
niemeyerdimitern: No12:10
niemeyerdimitern: lbox submit12:10
dimiternniemeyer: I see, just that?12:10
niemeyerdimitern: That said, can you please wait a moment on that one12:10
niemeyerdimitern: Since this is the bootstrap, I'd like to follow at least the first few steps on it12:10
dimiternniemeyer: sure, I'd like that12:11
niemeyerdimitern: I'll look up right now so I don't block you12:12
dimiternniemeyer: thanks!12:12
niemeyerdimitern: What's "tenant-name"?12:12
dimiternniemeyer: that's one of openstack's auth credentials12:13
dimiternniemeyer: it's a bit controversial - sometimes called project-name, and in the api it's called tenant id12:13
niemeyerdimitern: Cool12:13
niemeyerdimitern: SO why do we go in the middle?12:13
niemeyer:)12:14
niemeyerdimitern: tenant-name isn't either of them :)12:14
dimiternniemeyer: but the env var is called OS_TENANT_NAME or NOVA_PROJECT_ID12:14
niemeyerdimitern: Wow, okay12:14
mgzit's a little more complicated...12:14
niemeyerSeriously diverse12:14
mgzwhat exactly it is depends across versions and deployments, we probably want some fancier logic here in future12:14
niemeyermgz: Can you describe a bit more of the issue?12:15
mgzwant the long fairy tale? :)12:16
mgzso, in the beginning there was nova12:16
dimiternniemeyer: from the openstack docs: "Credentials are a combination of your username, password, and what tenant (or project) your cloud is running under. " (http://docs.openstack.org/api/quick-start/content/)12:16
niemeyerThanks, it would be useful to picture what we should do12:16
mgzit had code for handling authentication itself#12:17
mgzand that had support added for using 'project' as a sort of group id for resources, so multiple users could share control of a resource12:18
mgzwith the growth of the project, various things that used to be in nova started getting pulled out into seperate codebases12:18
mgzthe new auth stuff is keystone... which is a complicated history itself... the initial version wasn't accepted but got rewritten as keystone-lite just in time for being a core component of essex12:20
mgzfor... not very good reasons, they use 'tenant' for the same concept, so you as a user are a member of one or more tenants12:21
mgzwhich are then the things that own particular resources, and when you request an access token, that token is (generally) associated with a particular tenant12:21
mgzso, all api calls using that token are scoped to that tenant12:21
mgzthe confusing thing is 'tenant' was already in use as a term for a different concept, particularly with regards to multi-tenancy12:22
niemeyerGosh :(12:22
mgzso, they keystone guys were threatening to rename back to 'project' again... but that's probably too disruptive now12:22
mgzthe name vs id thing is simpler12:23
mgzthe old way of refering to a project in nova was by an integer (basically a unique id straight from the db I think)12:23
mgz...is that right?... it might have been a string12:24
mgzat any rate, the new style is all objects have a UUID associated12:24
niemeyermgz: Okay, and how did "name" get in there?12:25
mgzand any that used to have a unique name still have that, and some api calls take a name rather than the UUID12:25
niemeyermgz: Is it a uuid or something else?12:25
mgzit was originally a string name in the first versions of the code, so eg, my username is gz, the default tenant that gets created just for me is gz_project12:25
mgzthat's nice because you can see at a glance what the tenant is about12:26
mgzbut... when constructing urls and such like, the style is /object/UUID/stuff12:27
niemeyerOMG12:27
niemeyer:)12:27
niemeyerIt's hard to believe such a trivial concept can get so involved12:28
mgzfor keystone and tenants, this diversion doesn't matter too much, as there's basically only one api call juju needs to use (everything else is admin related)12:28
mgzand these days it accepts either the name or the id12:28
mgzyou just need to know which you have.12:28
mgzthe fun part only comes when supporting deployments based on older versions12:29
niemeyermgz: I see12:30
mgzgenerally though, we always have one way of refering to a tenant, and should be able to tell from the envvar whether it's a name or an id.12:30
niemeyermgz: So what's name? :)12:30
niemeyermgz: "gz_project"?12:30
mgzyup.12:30
niemeyermgz: and that's automatically assigned by the provider?12:30
niemeyermgz: or can you customize it?12:30
mgzit's part of the keystone user account management stuff12:31
mgzso, the cloud admin sets it, and you'll get one in your account details from them12:31
mgzeg, on my hp cloud api keys page,12:33
mgzthere's a "Tenant" heading that lists both an id (...which is an integer not a uuid, hp is special) and a name (which is <username>-default-tenant)12:34
niemeyermgz: i see12:36
niemeyermgz: What about "container"?12:36
mgzin what context?12:36
niemeyermgz: Does it have such an involved history as well? :)12:36
niemeyermgz: THe setting12:36
dimiternniemeyer: the container is the equivalent of control-bucket for aws12:37
mgzah, I think I just used bucket-name for that in the python as there's no useful reason to distinguish it from S312:37
niemeyerCan we use "control-bucket" then?12:38
mgzthat's the thingy.12:38
dimiternmgz: but in the python version, the s3-compatible api is used, not swift where there are no buckets12:38
mgzdimitern: both are supported12:39
mgzand both use control-bucket for the key name as that's then less confusing (except for the person writing the swift api code)12:39
mgzI wonder what the benefit fo expecting the user to configure that is though12:39
dimiternmgz: exactly, the swift api uses containers instead of buckets12:39
mgzhave had people having issues because they used "yourrandombucketname" literally... as did someone else12:40
dimiternniemeyer: sure, we can use "control-bucket", but won't it be confusing for people who know openstack swift?12:40
mgzdimitern: that can safely be assumed to be a minority of people :)12:41
niemeyerdimitern: I'd prefer to not confuse people that know juju12:41
dimiternniemeyer: ok, I can change container->controlBucket then12:41
niemeyerdimitern: I don't like control-bucket either, to be honest.. I hope we can kill it soon, on both providers12:41
mgzright, having it manually configured is... not pretty12:41
niemeyermgz: Yeah, it's actually automatically generated in Python at the moment.. we should do that for openstack too12:42
niemeyermgz: So a sample file is generate with the field pre-filed12:42
mgzthe issue is it always appears in the example juju configs12:42
niemeyermgz: Eventually, juju will not require any external storage12:42
niemeyermgz: and then we can kill this for good12:42
dimiternniemeyer: apart from this, other things look ok to you?12:42
mgzpeople too often don't seem to use the pre-fill logic when setting up juju for the first time12:42
niemeyerdimitern: Btw, I just noticed you have a review from Roger pending12:42
niemeyerdimitern: I'm providing a review.. nothing large so far12:42
dimiternniemeyer: pending? he did it yesterday and I fixed what he proposed..12:43
mgzI think you can carry over the lgtm, it's just marked him as he looked at the previous version12:44
niemeyerdimitern: Yes, but once someone reviews your code and asks for changes, you should wait for a LGTM from them12:44
niemeyerdimitern: Or at least an explicit dismissal saying "wait for someone else"12:44
niemeyerdimitern: "LGTM" is the special key there12:44
dimiternniemeyer: I see, I just assumed he generally liked it, once I do the changes it will be "LGTM", maybe I'm wrong here12:44
mgzniemeyer: do you have a lgtm-and-I-trust-you-to-change-these-trivial-things-before-landing concept?12:44
mgzor are things generally always re-reviewed?12:44
niemeyermgz: No, we do have that12:45
niemeyermgz: "LGTM with the following:"12:45
niemeyermgz: That assumes the reviewer trusts it to go in, assuming the suggestions are sensible and are applied12:45
dimiternniemeyer: Ok, I see, I'll ping roger later for re-review12:45
niemeyermgz: Sometimes it doesn't quite fly because the author doesn't think they are sensible, which causes talks and re-reviews12:45
niemeyermgz: But that's the exception12:45
mgzthanks.12:45
niemeyerNo problem12:46
dimiternniemeyer: in the mean time, I started another related branch to implement private/public addresses in the provider12:47
niemeyerdimitern: Super12:47
niemeyerdimitern: You can even push that to review if you get to completion, by using -req12:47
niemeyerdimitern: on lbox12:47
dimiternniemeyer: yeah, that's my plan12:47
niemeyerdimitern: Review sent12:54
niemeyerdimitern: Very nice bootstrap12:54
dimiternniemeyer: thanks!12:54
dimiternniemeyer: updated as suggested https://codereview.appspot.com/6858052/13:15
niemeyerdimitern: Thanks!13:17
dimiternniemeyer: so now, as soon as roger gives his final LGTM, I can lbox submit it?13:19
niemeyerdimitern: Yep!13:20
dimiternsuper, thanks13:20
dimiternniemeyer: one more question about the lbox process - so, after I have a review I see I can reply to each inline comment (done or reply), once I do that I send my replies, should I do lbox propose again, or I need just to push the branch changes only?13:25
niemeyerdimitern: You need to do propose again13:26
dimiternok13:26
niemeyerdimitern: Otherwise the diff in Rietveld isn't updated13:26
dimiternniemeyer: so I shouldn't worry I'm sending too many emails for a CL :)13:26
niemeyerdimitern: Note that if you write down drafts after the comments (done, reply, etc), you can do "lbox propose" and it'll publish your drafts as well13:26
dimiternniemeyer: nice! so I don't need to publish them from the site myself13:27
niemeyerdimitern: Thta's right13:27
fwereade_dimitern, sorry, just back from lunch13:29
dimiternfwereade_: np, just got some reviews flowing :)13:33
fwereade_dimitern, cool13:33
dimiternfwereade_: if you want to take a look: https://codereview.appspot.com/6858052/13:34
* fwereade_ looks13:34
fwereade_dimitern, just a quick thought: can you at least check that the region != ""? or can even that be valid?13:37
dimiternfwereade_: good point, I can check for this13:37
dimiternfwereade_: I has to be set to something at least13:37
fwereade_dimitern, maybe also worth checking that auth-url is actually a valid URL?13:41
dimiternfwereade_: I thought about this, but was not sure of an easy way to parse/check it - anything in go like urlparse?13:41
fwereade_dimitern, net/url13:42
dimiternfwereade_: cool, I'll check it out13:42
fwereade_dimitern, has a Parse func13:42
fwereade_dimitern, and if I'm being really picky I might suggest positive tests for changing the values that can/should change... and I'm suspicious of making the firewall mode changeable13:43
fwereade_rogpeppe, TheMue, niemeyer: *should* firewall-mode be mutable? (and should it even maybe be common to all providers?)13:44
dimiternfwereade_: don't know about the firewall mode13:44
fwereade_dimitern, nor do I really, hence my question above :)13:44
TheMuefwereade_: Hard to say. For sure it would be implementable, but with a lot changes. And which reason?13:47
TheMuefwereade_: OK, maybe if we reach the limit of EC2 dynamically switch to global mode.13:47
* TheMue thinks.13:47
TheMuefwereade_: Why do you think about making it changable?13:52
fwereade_TheMue, just because it appears that it is13:53
fwereade_TheMue, and I was wondering whetherthat was sane13:53
TheMuefwereade_: It is? Have to take a look.13:54
fwereade_TheMue, it appears to be in dimitern's CL; haven't looked at EC213:55
niemeyerfwereade_: I think it shouldn't be allowed13:55
niemeyerfwereade_: One of the reasons why I didn't suggest restricting yet is because it's handy for tests to be able to change it13:55
fwereade_niemeyer, both are perfectly reasonable, but somewhat in conflict :)13:56
fwereade_niemeyer, do you have an opinion on making it part of config.Config rather than provider-specific?13:57
niemeyerfwereade_: They are in conflict indeed, and the behavior on changes isn't user friendly, so you're right.. the final implementation should reject changes13:57
niemeyerfwereade_: Making what part of config.Config? (it is already there?)13:58
fwereade_niemeyer, I don't think so; it seems to be in danger of being duplicated across ec2/openstack13:58
fwereade_niemeyer, (fwiw, ISTM that it's not *overwhelmingly* handy to change it in tests when we could have separate env setup for separate tests...)13:59
niemeyerfwereade_: FirewallMode and the respective settings are all in config.. what are you referring to, more exactly?13:59
fwereade_niemeyer, ok, perhaps I am smoking crack, I had expected that if it were handled in config.Config we wouldn't need to touch it in provider-specific configs14:00
niemeyerfwereade_: Sorry, I still don't know what you're referring to14:00
fwereade_niemeyer, I am talking about FirewallMode, but it appears I'm being dumb -- it is properly handled in config.Config, but it seems it also needs to be checked in Validate for each provider14:02
niemeyerfwereade_: Ah, yes, it does14:03
niemeyerfwereade_: Only because each provider offers its own idea of what is possible or not, and what's the default14:03
niemeyerfwereade_: But I think that's inherent to the problem14:03
niemeyerfwereade_: (IOW, we can't avoid it)14:03
fwereade_niemeyer, yeah, that makes sense14:03
fwereade_niemeyer, sorry noise :)14:04
niemeyerfwereade_: np at  all14:04
fwereade_so, dimitern, looks like the firewall handling is just fine14:04
fwereade_dimitern, niemeyer: but when we tighten it up and make it unchangeable we should be sure to do so in each Validate method14:04
dimiternfwereade_: cool, well I just replicated the ec2 tests there - I supposed should be there14:05
fwereade_dimitern, yeah, seems sane14:05
TheMuefwereade_: I also looked and it seems that ec2 allows to change/set it in SetConfig() of environ. But The overall EnvironmentProvider and Environment interfaces doen't provide that method. The …Provider only takes the Config at Open().14:07
dimiternso, when I have something for review, should I always post it here, or somebody will see it and pick it up?14:15
fwereade_TheMue, Environ certainly does expose SetConfig14:17
fwereade_dimitern, I don't think it ever does any harm to announce it here14:17
dimiterncool :) so here it is: https://codereview.appspot.com/684310614:18
TheMuefwereade_: Ooops, indeed. *facepalm*14:18
TheMuefwereade_: Btw, review, I've hardened code and tests after your last review for the first CL and now doing the same for the second one.14:19
TheMuedimitern: I'll take a look.14:19
fwereade_TheMue, cool, I'll take a look now14:20
=== edamato is now known as edamato-lunch
dimiternTheMue: 10x14:22
TheMuedimitern: You've got a review.14:32
dimiternTheMue: thank you!14:32
TheMuedimitern: YW.14:32
* niemeyer => lunch14:33
dimiternTheMue: the EC2 docs describing metadata is the only reference document, also implemented in openstack, the first one is a mistake (forgot to change the comment) - will fix it14:33
TheMuedimitern: Ah, IC. Something learned. ;) Thanks.14:34
fwereade_TheMue, https://codereview.appspot.com/6852065/ reviewed14:36
TheMuefwereade_: Thanks.14:36
TheMuefwereade_: Good ones, will change it.14:38
fwereade_TheMue, cheers :)14:38
dimiternfwereade_: it seems url.Parse is too lenient - "some url" is valid for it and it parses it as Path="some url", other fields empty14:42
fwereade_dimitern, ha!14:50
fwereade_dimitern, I guess you could check for presence of other fields14:51
fwereade_dimitern, but I'm not too worried about it tbh14:51
dimiternfwereade_: ok, I'll dig in a bit more14:52
rogpeppeback14:57
dimiternrogpeppe: heya, can you please recheck my CL: https://codereview.appspot.com/6858052/15:03
rogpeppedimitern: i'm on it15:04
rogpeppedimitern: LGTM15:04
rogpeppedimitern: get it submitted!15:04
dimiternrogpeppe: thanks! so now I can submit it15:04
dimiternyeah15:04
dimiternrogpeppe: and the other related one: https://codereview.appspot.com/6843106/15:06
rogpeppedimitern: reviewed15:11
dimiternrogpeppe: thanks!15:13
dimiternrogpeppe: about whether it's too early - well, there are the tests, and we might forget about it much later - when we get to deploying stuff, that's why15:13
rogpeppedimitern: you won't forget about it - your code will panic on the server side and it'll be obvious.15:14
rogpeppedimitern: what might be less obvious is if the code is subtly broken for some reason and it doesn't work live - then you'll not be entirely sure which bit of the system is broken.15:15
rogpeppedimitern: that's why i prefer to see code go in that can be tested for real (obviously it's not always possible, but in this case i think it might be worth it)15:16
dimiternrogpeppe: so you suggest to shelve it for now, but when will it be appropriate to land it?15:16
rogpeppedimitern: when you've got a working bootstrap (i.e. something will actually call PrivateAddress or PublicAddress for real on the server side)15:16
rogpeppedimitern: until then, it's fine to leave as a stub, i think15:16
rogpeppedimitern: but if others think it should go in, i'm happy with that too.15:17
dimiternrogpeppe: I see, ok then I'll just fix the comments for now15:17
=== edamato-lunch is now known as edamato
TheMuefwereade_: You've got a very critical eye (Do you say so?) - and that's very good. ;) I hope https://codereview.appspot.com/6852065/ now gets approved.15:32
fwereade_TheMue, it's one of those useful phrases that can be positive or negative :) I will take in the spirit in which it is intended ;)15:32
TheMuefwereade_: You, absolute positive meant. Is there a better phrase for it?15:33
TheMueArgh, my fingers again!15:33
TheMues/You/Yes/15:33
fwereade_TheMue, hmm, I can't think of any way of expressing that quality that doesn't critically depend on the tone of voice ;)15:34
TheMuefwereade_: Maybe I have to use diacritical chars next time. :D15:36
fwereade_TheMue, LGTM :)15:37
TheMuefwereade_: *hug*15:37
fwereade_TheMue, I don't seem to be able to officially Approve it, but you have your 2 :)15:38
TheMuefwereade_: Ah, and instead of diacritics I meant phonetics.15:38
fwereade_TheMue, ah, yes, true, my pedantry isn't quite as advanced as that :)15:39
TheMuerogpeppe: Hmm, still the stderr. So far the lxc commands return error codes I return too as Go errors.15:42
rogpeppeTheMue: don't they print anything when something goes wrong?15:42
rogpeppeTheMue: for example, if i run lxc-start not as root, it prints "lxc-start: Not running with sufficient privilege"15:43
rogpeppeTheMue: but your code will return the error "exit code 255"15:43
rogpeppeTheMue: guess which one would be easier to debug? :-)15:43
TheMuerogpeppe: The 255. *lol*15:44
TheMuerogpeppe: OK, gotcha, will change it.15:44
rogpeppeTheMue: you might want to experiment with the lxc commands to see how to make the output into nicer Go errors. for example, you probably want to strip off the "lxc-[^:]*: " prefix.15:45
TheMuerogpeppe: Good idea, thx.15:46
TheMuerogpeppe: Any idea on how to skip a whole suite, not just one test?15:52
rogpeppeTheMue: call Skip inside SetUpSuite, i believe15:52
TheMuerogpeppe: Yes, just found it in the docs.15:53
TheMuerogpeppe: Thx.15:53
* niemeyer respawns15:55
TheMuerogpeppe: Works.15:57
niemeyerrogpeppe: This is up for review, despite the fact it has been submitted already: https://codereview.appspot.com/6846066/16:00
niemeyerrogpeppe: What's its actual status?16:01
rogpeppeniemeyer: now back to Merged status16:01
niemeyerrogpeppe: Cheers16:03
dimiternniemeyer: I'd like your view on this as well please: https://codereview.appspot.com/6843106/16:05
niemeyerdimitern: Sounds good, just let me clean the queue for roger and will back to you16:05
dimiternniemeyer: sure, no rush16:06
niemeyerrogpeppe: Review sent16:29
rogpeppeniemeyer: thanks16:29
dimiternniemeyer: ping17:00
niemeyerdimitern: Pongus17:00
dimiternniemeyer: sorry :) ^^17:00
niemeyerdimitern: I'm on it17:01
dimiternniemeyer: thanks17:01
niemeyerdimitern: Done!17:04
dimiternniemeyer: cool, 10x17:05
dimiternniemeyer: how about rogpeppe's comment, i think he could right that it's too soon to land this17:07
fwereade_ok, I've got to dash17:08
niemeyerfwereade_: Have a good.. hmm.. dashing? :)17:08
dimiternfwereade_: see ya :)17:08
fwereade_niemeyer, I'm on holiday tomorrow but I will pop on for a brief discussion of the machine thing17:09
niemeyerdimitern: I thought you actually added the tests in the branch itself?17:09
fwereade_niemeyer, I think I will know in my own heart whether it's worth it sometime later, but I'll need to run it by you too :)17:09
fwereade_dimitern, I just remebered we're having an early dinner with someone, might ping you later and see if you're up for a drink17:09
niemeyerfwereade_: Sounds good.. we should have a voice call, just to sync up17:09
dimiternniemeyer: yeah, the tests with a locally served canned metadata work the same17:10
dimiternfwereade_: sgtm17:10
fwereade_niemeyer, sgtm, I'll grab yu when I can17:11
fwereade_gn all17:11
niemeyerfwereade_: Night!17:11
niemeyerdimitern: Yeah, I think it's fine.. rogpeppe?17:12
rogpeppeniemeyer: i kinda think it's a bit early but i don't mind much. it's going to be long time until this code is actually tested for real.17:12
dimiternrogpeppe: not too long i hope :) we're picking up speed17:13
rogpeppedimitern: ok :-)17:13
rogpeppedimitern: but seriously, you'll have done almost all the provider by the time this gets used17:13
niemeyerrogpeppe: Early for what?17:14
dimiternrogpeppe: well, basically all the code is there, but it's being refactored at the moment17:14
niemeyerrogpeppe: It's necessary code, with some testing alongside17:14
rogpeppeniemeyer: ok, fair enough17:14
rogpeppedimitern: i see. in that case, LGTM17:15
dimiternrogpeppe: cool, 10x, i'm submitting it then17:15
niemeyerdimitern: ping17:31
dimiternniemeyer: pong17:31
niemeyerdimitern: I noticed that the suggested change wasn't done there17:31
dimiternniemeyer: which one?17:31
niemeyerdimitern: The one that was part of the review17:32
dimiternniemeyer: oops, sorry, how to revert it?17:32
niemeyerdimitern: Don't have to revert it.. just propose a new CL that does the trivial17:32
dimiternniemeyer: I see, ok i'm on it17:33
niemeyerdimitern: Thanks17:33
niemeyerdimitern: The change is actually not *that* important.. I'm mainly worried about getting used to the workflow17:33
niemeyerdimitern: So I think it's worth fixing17:33
dimiternniemeyer: sure, I think is very useful17:33
dimiternmapping the process :)17:33
niemeyerdimitern: Yeah :)17:35
dimiternniemeyer: it seems it worked: https://codereview.appspot.com/6843106/17:43
TheMueSo, have to step out. Second CL will be updated tomorrow. Have a nice evening.17:43
niemeyerdimitern: Oops17:43
niemeyerdimitern: It kind of worked17:43
niemeyerdimitern: It should be a different banch17:43
niemeyerbranch17:43
niemeyerdimitern: This one was submitted already17:44
dimiternniemeyer: I see17:44
dimiternniemeyer: so it won't work like this17:44
niemeyerdimitern: Nope17:44
dimiternniemeyer: I'll branch it and repost17:44
niemeyerdimitern: It's just a matter of changing the branch name, though17:44
dimiternniemeyer: with cobzr: bzr branch . new-name ?17:46
dimiternor checkout -b and push17:46
niemeyerdimitern: bzr branch -m old-name new-name17:48
niemeyerdimitern: Assuming cobzr17:48
dimiternniemeyer: yep, it worked: https://codereview.appspot.com/678210217:51
niemeyerdimitern: Almost there18:07
niemeyerdimitern: ("cannot get %q: %v", uri, err)18:07
dimiternniemeyer: ok18:07
dimiternniemeyer: done18:09
niemeyerdimitern: LGTM with the fix18:10
dimiternniemeyer: thanks, should I submit it?18:10
niemeyerdimitern: Yes, please18:10
niemeyerdimitern: This is a follow up on the previous, and trivial as well18:10
dimiternniemeyer: ok18:10
niemeyerdimitern: Thanks!18:13
dimiternniemeyer: thank you! i had a proper kick-start today with the workflow :)18:14
niemeyerdimitern: Indeed, and well done :)18:15
dimiternniemeyer: i'm off for today then, thanks again, and good night!18:16
niemeyerdimitern: Thanks, you too!18:17
rogpeppeniemeyer: if you're still around, i think this should be better now. the file reading behaviour took a bit more thought than i expected. https://codereview.appspot.com/685008719:08
niemeyerrogpeppe: Checking out19:08
niemeyerrogpeppe: Documentation still feels pretty hard to grasp19:12
rogpeppeniemeyer: darn19:12
rogpeppeniemeyer: i thought it was better now19:12
niemeyerrogpeppe: Do you have any automated realignment tool, btw?19:12
niemeyerrogpeppe: I've noticed the out of shape comments with some frequency19:13
niemeyerrogpeppe: Let me try to have a go at the docs19:13
rogpeppeniemeyer: the documentation for config.New or for the internal maybeReadFile function?19:13
niemeyerrogpeppe: The internal one19:13
rogpeppeniemeyer: yeah, i do. i just don't use it as much as i should19:13
niemeyerrogpeppe: Semantic also seem to have changed in the new version19:14
rogpeppeniemeyer: the semantics of maybeReadFile have changed, yes. that's because they didn't match the documented behaviour of config.New.19:15
rogpeppeniemeyer: (i realised that as i looked into it)19:15
rogpeppeniemeyer: actually, that reminds me - there are some tests i've forgotten to add.19:16
rogpeppe(testing what happens when both ca-cert and ca-cert-path are both set19:17
rogpeppe)19:17
niemeyerrogpeppe: Disabling the default behavior via setting things to empty strings is unlike anything else we have so far, I believe19:18
niemeyerrogpeppe: and I do recall fwereade being explicitly interested on that behavior19:18
rogpeppeniemeyer: i think it's important that we be able to specify a certificate only without having the private key read from a file19:19
niemeyerrogpeppe: Why?19:19
niemeyerrogpeppe: This is part of the configuration.. if you don't like the file, take it off19:19
niemeyerrogpeppe: That kind of fine tunning via vague rules is pretty unfriendly to actual users19:19
rogpeppeniemeyer: you might not have control of the name space. that's true of our tests for example19:20
niemeyerrogpeppe: Not to mention that it's really hard to grasp what that documentation is saying19:20
niemeyerrogpeppe: If this, but that, and not that other thing19:20
niemeyerrogpeppe: I don't understand..19:21
niemeyerrogpeppe: We have entire control of everything we do19:21
niemeyerrogpeppe: It's our code base, our disk, our data, our configuration19:21
rogpeppeniemeyer: we don't necessarily want to set up a fake home for every single test19:21
niemeyerrogpeppe: Yes, let's not do that.. (?)19:21
rogpeppeniemeyer: and a configuration is perfectly valid (and potentially more common) without the private key in the config19:22
rogpeppeniemeyer: if we don't allow this kind of behaviour, we're saying that there is no way to force the config to create a configuration with no private key without it hitting the disk19:23
niemeyerrogpeppe: No, what I am saying is that it feels bad to reuse behavior that in every other case works in a *different* way19:24
rogpeppeniemeyer: for example, i want to allow people to create an app that manages its own CA keys without storing them on disk19:24
rogpeppeniemeyer: ok. we could potentially allow a special value for an unspecified key or cert, such as "none".19:25
niemeyerrogpeppe: Coincidently, yaml has such a null value19:26
rogpeppeniemeyer: what do you think CACertPEM should return if there's no certificate specified?19:26
rogpeppeniemeyer: should we make it return a []byte rather than a string, perhaps?19:27
niemeyerrogpeppe: We can make it return ""?19:27
rogpeppeniemeyer: so CACertPEM returns "", but the attributes don't contain "" ?19:28
niemeyerrogpeppe: The attributes contain "", but CACertPEM doesn't return ""?19:28
rogpeppeniemeyer: i think i'd expect CACertPEM to return the same as attrs["ca-cert"]19:28
niemeyerrogpeppe: I'm not sure I understand the point you're making19:28
niemeyerrogpeppe: So you don't want to read it from disk?19:29
rogpeppeniemeyer: yup. i want to be able to create a config with, for instance, no cert and no key, and have it work independently of what the disk contents are19:29
niemeyerrogpeppe: What I mean is that the logic you're suggesting already doesn't make attrs["ca-cert" and CACertPEM be the same thing19:30
rogpeppeniemeyer: i also want configs to round-trip correctly in all circumstances19:30
niemeyerrogpeppe: And it also changes the behavior of what defaults do19:30
niemeyerrogpeppe: i'm finding it surprisingly difficult to get something that looks straightforward going19:30
niemeyerrogpeppe: We need something to get started19:31
niemeyerrogpeppe: Something that looks like what we already do19:31
rogpeppeniemeyer: i'm not sure my "special value" suggestion is any good19:31
niemeyerrogpeppe: Something that is understandable, well documented, etc19:31
niemeyerrogpeppe: Let's not do special value.. let's implement exactly the same thing we do with ssh..19:31
niemeyerrogpeppe: Just not enforcing its presence19:32
rogpeppeniemeyer: question: if i do config.New(otherConfig.AllAttrs()), should i always end up with the same thing i started with?19:32
niemeyerrogpeppe: Yes19:32
rogpeppeniemeyer: how do you plan to enable that?19:32
niemeyerrogpeppe: How do we do that today?19:32
rogpeppeniemeyer: we always require authorized-keys19:32
rogpeppeniemeyer: and that's the only current field we have that potential problem with19:33
niemeyerrogpeppe: Okay, and how's that a problem in the new world?19:34
rogpeppeniemeyer: if we create a config with no certificate, that's a valid certificate, but (assuming we don't allow the ""-means-unspecified behaviour), AllAttrs cannot return a value for the ca-cert attribute.19:35
niemeyerrogpeppe: There's a very good way to say that a key is not present in the configuration.. and that's to have the key not present in the configuration (!)19:35
rogpeppeniemeyer: if the key isn't present in the configuration, then we hit the disk19:35
rogpeppeniemeyer: which means that config.New(otherConfig.AllAttrs()) might *not* return the same configuration19:36
niemeyerrogpeppe: Okay19:36
niemeyerrogpeppe: So what's the problem with nulling it out?19:36
rogpeppeniemeyer: having an explicit null value in the map?19:37
niemeyerrogpeppe: Yes19:37
rogpeppeniemeyer: we could do that. but clients will just compare the return value of CACertPEM against "" anyway, so it doesn't seem worth it.19:38
niemeyerrogpeppe: This actually sounds bogus19:38
niemeyerrogpeppe: We've been pretty good at not allowing invalid values to be handled as valid ones19:38
rogpeppeniemeyer: i dunno. we guarantee that CACertPEM contains a valid certificate19:39
niemeyerrogpeppe: If CACertPEM can return an invalid certificate, we should return a pair19:39
niemeyer(cert, ok)19:39
niemeyerrogpeppe: Do we? Where?19:39
rogpeppeniemeyer: (if it's present, i mean)19:39
niemeyerrogpeppe: "" is not a valid certificate19:39
niemeyerrogpeppe: We allow that19:39
rogpeppeniemeyer: indeed. it seems a reasonable way to say "no certificate" to me19:39
niemeyerrogpeppe: It's also a reasonable way to saying "default", as far as our configuration goes19:40
niemeyerrogpeppe: It's poor engineering to have both side-by-side19:40
rogpeppeniemeyer: do we use "" to mean default anywhere?19:40
niemeyerrogpeppe: Read that function again please19:41
rogpeppeniemeyer: which function?19:41
niemeyerrogpeppe: The one you're suggesting changes to19:41
rogpeppeniemeyer: what about it?19:42
niemeyer        if c.m["default-series"].(string) == "" {19:42
niemeyer                c.m["default-series"] = version.Current.Series19:42
niemeyer        }19:42
niemeyer        if path != "" || keys == "" {19:42
niemeyer                c.m["authorized-keys"], err = authorizedKeys(path)19:42
niemeyer        switch firewallMode {19:42
niemeyer        case FwDefault,19:42
niemeyer        FwDefault FirewallMode = ""19:42
rogpeppeoh yeah19:42
rogpeppe:-)19:43
niemeyerrogpeppe: :-(19:43
niemeyer<rogpeppe> niemeyer: do we use "" to mean default anywhere?19:43
niemeyerYEEEES19:43
rogpeppegotcha19:43
rogpeppeniemeyer: ok, so... how about we make CACertPEM return []byte, and nil when not set.19:44
rogpeppeniemeyer: and have an entry in the map, nil when explicitly not set.19:44
niemeyerrogpeppe: No, (cert string/[]byte, ok bool), please19:44
niemeyerrogpeppe: nil in the map sounds fine19:45
rogpeppeniemeyer: i'm slightly concerned that it won't be obvious what type of thing is expected in the map (which is part of our public interface, after all)19:46
niemeyerrogpeppe: That's why we have an interface on that type19:46
rogpeppeniemeyer: there are quite a few tests that do a DeepEqual on the attributes returned from AllAttrs19:46
niemeyerrogpeppe: It doesn't have to be obvious.. people shouldn't be poking on the map19:46
rogpeppeniemeyer: maybe they're bogus19:46
niemeyerrogpeppe: Because that's our tests implementing it19:46
niemeyerrogpeppe: The tests are fine19:47
niemeyerrogpeppe: We're verifying that our logic is sane19:47
rogpeppeniemeyer: i'm talking about tests in state19:47
niemeyerrogpeppe: Me too19:47
rogpeppeniemeyer: ok19:47
niemeyerrogpeppe: I'd like to move forward.. that sounds like a pretty reasonable way to move forward19:47
rogpeppeniemeyer: what would the YAML-marshalled representation look like?19:48
niemeyerrogpeppe: ?19:48
niemeyerrogpeppe: I don't understand the question.. the YAML-marshalled representation will look like YAML19:48
rogpeppeniemeyer: of a ca-cert that's explicitly not present19:48
rogpeppeniemeyer: presumably yaml has null or something like it19:48
niemeyerrogpeppe: Yes, and it's called null :-)19:48
rogpeppeniemeyer: great19:49
rogpeppeniemeyer: ok, i'll see how it goes19:49
niemeyerrogpeppe: Thanks.. I think the defaults should be "", btw, because we'll be checking for that19:50
niemeyerrogpeppe: (rather than omit)19:50
niemeyerrogpeppe: Makes both the logic and the consistency better, I believe19:50
rogpeppeniemeyer: and we have the type as OneOf(String, nil)19:51
rogpeppeniemeyer: ?19:51
niemeyerrogpeppe: Right19:51
niemeyerrogpeppe: I think we'd need that anyway, or it'll barf on the nil19:52
niemeyerrogpeppe: (not there != nil)19:52
rogpeppeniemeyer: this all seems fine. sorry it's taken a while to discuss, but it is surprisingly subtle...19:53
niemeyerrogpeppe: I can see it is indeed19:53
niemeyerrogpeppe: Glad we found an alternative19:53
* rogpeppe dives once more into the breach19:54
niemeyer:)19:54
niemeyerI'll step out to get some food meanwhile19:54
rogpeppeniemeyer: darn, there's no schema.Null19:56
rogpeppeniemeyer: i'll make one19:56
rogpeppeniemeyer: enjoy!19:56
niemeyerrogpeppe: Const(nil)19:56
rogpeppeniemeyer: argh! of course.19:56
rogpeppeniemeyer: done, i hope: https://codereview.appspot.com/6850087/21:03

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