/srv/irclogs.ubuntu.com/2013/11/15/#juju-dev.txt

axwwallyworld_: do you know why bootstrap forces --upload-tools for the local provider?02:11
wallyworld_axw: it doesn't distinguish, so if it doesn't need to for the local provider, that needs to be added in02:12
wallyworld_it was an oversight on my part i think02:12
wallyworld_axw: although local provider has always been funky with tools02:13
axwwallyworld_: what I mean is, in cmd/juju/bootstrap.go, it goes: if provider == 'local': uploadTools = true02:13
axwI just don't understand why.02:13
wallyworld_ah ok. that was deliberate then, by tim02:13
axwyeah02:13
axwdon't know why? :)02:13
axwconvenience?02:14
wallyworld_i think it's because the jujud needs to be put in the local provider's storage02:14
wallyworld_so it can find it02:14
wallyworld_cause local provider does not want to have to use streams.canonical.com etc02:14
wallyworld_so the local provider has been treated as an edge case02:14
wallyworld_but it is known to be a dirty great hack02:15
axwwhy not use streams.canonical.com like the others?02:15
axwit can be overridden with --upload-tools02:15
wallyworld_when it was written, there was no streams,canonical.com. there was an s3 bucket and you needed credentials for that02:15
wallyworld_so it was done out of necessity02:16
axwok02:16
wallyworld_we can probs revisit that now02:16
wallyworld_s/probs/should :-)02:17
axwhm, I removed it and get errors about not finding 1.17 at s3. that could be due to some other changes I have going on tho02:19
wallyworld_i think sync tools used to look at s302:20
wallyworld_and that's what upload-tools uses02:20
wallyworld_if are running the dev version, there are no 1.17 tools02:20
wallyworld_s/dev/from source02:20
axwno, but it should upload the local ones as a last resort02:21
wallyworld_so that's the other issue - running from source also requires a upload tools02:21
wallyworld_it should have i think yes02:21
axwI'm making providers responsible for selecting bootstrap tools02:21
axwmust've broken it02:21
wallyworld_:-)02:21
axwwallyworld_: wasn't my code- the local provider explicitly sets agent-version to version.Current if it doesn't have agent-version already02:40
wallyworld_ok02:40
axwwhich stops the auto-upload stuff02:41
wallyworld_if there a agent-version check somewhere?02:41
axwyeah, in the current code as well. It won't try to auto-upload if the user has specified agent-version02:41
axwwe could perhaps be a bit smarter, and check if agent-version is the same as what's on disk02:42
wallyworld_i wonder why that code is there02:42
axwbut ... I'm not convinced the local provider needs all this special stuff02:42
axwso you don't accidentally get a version you didn't ask for, I guess02:42
wallyworld_i know there was a lot of hair pulling at the time, but am not sure of the details02:42
wallyworld_would be worth a chat with tim when he's back to get the back story on it all02:43
axwyup definitely02:43
jamsinzui: it is "tsv" as tab-separated-value so it wasn't supposed to be changed07:04
fwereadeaxw, heyhey07:09
fwereadeI'm around if you are07:09
axwfwereade: morning07:09
axwI am07:09
axwbrb, just getting a drink07:10
fwereadeaxw, actually I'm around in 5 mins after a quick ciggie07:10
fwereadeaxw, you're too quick for my morning brain ;)07:10
axwnps07:10
axwfwereade: I can't hear you if you're talking07:31
* fwereade is off to get up and run a couple of errands, bbiab07:49
axwwallyworld_: would you be able to review this for me next week? https://codereview.appspot.com/14433058/07:49
axw(please) :)07:49
rogpeppe1mornin' all08:06
wallyworld_axw: sure, will do08:59
axwhey rogpeppe1, thanks for the review. let me know if you have any thoughts about my response (particularly around the ConfigureBase name)09:12
rogpeppe1axw: looking09:12
rogpeppe1axw: the underlying problem, i think, is that it ties together an random bunch of stuff, so it's difficult to think of a nicely descriptive name for it09:14
axwrogpeppe1: what's the alternative? ConfigureAuthorizedKeys and ConfigureOutput?09:15
* rogpeppe1 goes to look at the manual provider case09:16
axwmaybe we don't even both with that method, and have provider/common do it.09:16
axwbother*09:17
axwah, but provisioning non-bootstrap machines needs it too09:17
axwrogpeppe1: manual provider only uses ConfigureJuju09:17
rogpeppe1axw: hmm, that's interesting in itself - where does its cloudinit output end up?09:18
axwrogpeppe1: it doesn't use cloud-init09:18
axwall output goes to stdout09:18
axwwhich comes back to the SSH client09:18
rogpeppe1axw: if it doesn't use cloud-init, what's it doing with ConfigureJuju?09:18
axwrogpeppe1: it translates the cloudinit.Config into a script. there's an open bug to update cloud-init to have a way of invoking manually/interactively09:19
rogpeppe1axw: oh gosh09:20
rogpeppe1axw: where does that translation happen?09:20
axwrogpeppe1: currently, environs/manual/agent.go; I have a followup CL that moves this to a new package, cloudinit/sshinit09:21
axwand makes it sufficiently generic of course09:21
rogpeppe1axw: well, in that case, it would be fine for the manual provider to use exactly the same base config, no?09:22
rogpeppe1axw: because it will ignore what it doesn't care about09:22
axwrogpeppe1: depends on whether we want to do different things in ConfigureBase (like run additional commands)09:22
rogpeppe1axw: if we do, then we probably want those commands to work in the manual provider too, i'd guess09:23
axwrogpeppe1: hmm perhaps, yes. actually, now that I think of it... there's probably no good reason to split them anymore09:23
rogpeppe1axw: this is part of the problem with the name "base" - it implies it's "base" for everything, but it's really "base for everything other than the manual provider"09:24
axwrogpeppe1: I went through a few iterations here09:24
rogpeppe1axw: sure09:24
axwI'll ponder a bit09:24
rogpeppe1axw: it kinda feels trivial, but it's also the kind of thing that can grow in complexity09:24
axwyup, fair enough09:24
rogpeppe1axw: so i'd like us to get the abstractions right here09:24
axwit's confusing enough as it is anyway :)09:25
rogpeppe1axw: yeah09:25
axwso many different interactions09:25
rogpeppe1axw: it's one of those places where the code with common pieces factored out is arguably harder to read and maintain than the original copypasta.09:33
axwrogpeppe1: I lied apparently, anyway. I didn't end up using ConfigureJuju in environs/manual. I was going to use it in the followup, but I can use the existing one after all09:33
rogpeppe1fwereade: is it possible you could have a glance through this doc for sanity checking, please? https://docs.google.com/a/canonical.com/document/d/1vZrav8Do80Lnk1uFNdVVV2jRqpEH99wcX3YWErPwWIg/edit09:43
rogpeppe1fwereade: nate has a couple of reasonable comments, but i don't want to change things away from your suggestions without your goahead09:44
axwrogpeppe1: LGTM stands with the two functions joined?09:50
rogpeppe1axw: i think so. what's actually changed in that case then?09:51
axwrogpeppe1: just the signature (it was a bit funky - took an arg that's modified and returned it), and dropped the unnecessary New function09:51
axwthe file could be reverted, but I think it's a bit cleaner now09:52
rogpeppe1axw: looks like you haven't proposed the changes yet09:52
axwrogpeppe1: it was a hypothetical question, but the changes are coming.. super slow from here09:55
rogpeppe1axw: ah, that's fine. in principle it all sounds great.09:56
axwrogpeppe1: updated now09:56
TheMueinteresting behavior, first eth0 closed, later whole instance terminated, but netstat still sees an established connection :(10:00
rogpeppe1axw: reviewed10:02
axwthanks rogpeppe1, good suggestions - will do them before landing10:03
rogpeppe1axw: thanks10:03
axwI mean to use US spelling, it's just automatic10:03
rogpeppe1axw: yeah - i try to use the US spelling everywhere just for consistency with the go std lib10:04
axwI defied it at IBM for a long time - but that was internal code10:04
axwyup, fair enough10:04
rogpeppe1axw: i will still use initialise and colour everywhere *except* in the source tree :-)10:05
axwalright, that's it for me. have a nice weekend all10:10
rogpeppe1axw: have a good one10:10
=== rogpeppe1 is now known as rogpeppe
fwereaderogpeppe, can I trouble you for a review of https://codereview.appspot.com/26100043/ ? I am catching up to the point I can review your doc I think10:26
rogpeppefwereade: looking10:27
fwereaderogpeppe, mgz is ocr but I can't see him10:27
fwereaderogpeppe, cheers10:27
rogpeppefwereade: are there any pieces that i should look at in particular (i presume it's all been reviewed before when it went onto trunk) ?10:28
rogpeppefwereade: in particular, are there any bits you made some manual changes in, rather than just running patch?10:30
fwereaderogpeppe, the hack in jujud/machine_test.go is the only bit that hasn't been reviewed individually10:34
rogpeppefwereade: is all the code in state/cleanup.go new, or is it just moved from elsewhere?10:35
rogpeppefwereade: ah, i see; some's new.10:37
fwereaderogpeppe, I'm pretty certain all the revs I cherrypicked were mentioned in the message so there is at least some route back to the original reviews10:39
rogpeppefwereade: ah i see. in future it would be good if those were codereview links10:40
rogpeppefwereade: or MP links anyway10:40
rogpeppefwereade: reviewed10:42
dimiternrogpeppe, fwereade, wallyworld_ : standup10:47
=== 3JTAADOM8 is now known as wallyworld
=== wallyworld is now known as Guest37360
rogpeppedimitern: https://codereview.appspot.com/22100045/11:09
dimiternrogpeppe, cheers11:10
rogpeppecan anyone explain to me how this line of code actually works? /home/rog/src/go/src/launchpad.net/juju-core/state/environ.go:3411:17
dimiternrogpeppe, err := st.environments.Find(D{{"uuid", D{{"$ne", ""}}}}).One(&doc) ?11:18
rogpeppedimitern: yeah11:18
rogpeppedimitern: i suspect it only works by accident11:18
dimiternrogpeppe, what's wrong with it11:18
rogpeppedimitern: there's no uuid field in the document11:18
dimiternrogpeppe, ha, really?11:19
rogpeppedimitern: i think it only works because "" != nil11:19
dimiternrogpeppe, and it's always ""11:19
rogpeppedimitern: yeah - there's a UUID field in the struct, but it's renamed to _id11:19
rogpeppedimitern: it's always nil11:19
rogpeppedimitern: because it doesn't exist11:19
dimiternrogpeppe, so this block returns err == nil11:20
dimiternrogpeppe, and works, i've tried11:20
rogpeppedimitern: it'll correctly fetch the only environment document11:21
dimiternrogpeppe, what if there are more than one?11:21
rogpeppedimitern: it would fetch the first11:21
dimiternrogpeppe, this looks like a lurking bug11:22
rogpeppedimitern: +111:22
dimiternrogpeppe, good catch11:22
rogpeppedimitern: i'm not sure why there's any search condition in there at all, tbh11:22
rogpeppedimitern: i don't know any case where we'd insert a document with an empty uuid11:23
dimiternrogpeppe, because I think when environs were added to the schema it was unclear how to refer to them11:23
dimiternrogpeppe, or that changed later with the uuid perhaps11:23
fwereaderogpeppe, what's the latest on that panic of davecheney's? Irecall you talking about it yesterday but I hadother thingsonmy mind11:24
rogpeppedimitern: really i think we should hand the uuid to the state when opening an environment11:24
rogpeppefwereade: the gccgo issue?11:24
dimiternrogpeppe, TheMue, that's in rev 112211:24
rogpeppefwereade: it's much less of a problem than we thought11:24
fwereaderogpeppe, I have no context on it, but it's targeted for 1.1611:24
fwereaderogpeppe, does it not need to be?11:24
rogpeppefwereade: it is a gccgo bug though, and we should work around it11:25
rogpeppefwereade: for the time being11:25
rogpeppefwereade: the problem only happens when the gccgo runtime tries to call a function/method that returns an empty struct11:25
rogpeppefwereade: i think there's probably only one such method (Pinger)11:26
rogpeppefwereade: and we can trivially work around the issue by including a dummy field (e.g. _ bool)11:26
rogpeppefwereade: in the srvPinger struct type11:26
rogpeppefwereade: it seems like a good candidate for backporting to 1.16 (a 1 line change)11:27
fwereaderogpeppe, sorry, I'm thinking of https://bugs.launchpad.net/juju-core/+bug/122795211:27
_mup_Bug #1227952: juju get give a "panic: index out of range" error <regression> <goyaml:Fix Committed by dave-cheney> <juju-core:In Progress by dave-cheney> <juju-core 1.16:In Progress by dave-cheney> <https://launchpad.net/bugs/1227952>11:27
fwereaderogpeppe, (is anyone building 1.16 with gccgo?)11:28
rogpeppefwereade: ah, that was a goyaml bug which is now fixed11:28
rogpeppefwereade: i dunno11:28
rogpeppefwereade: the 1.16 deps would need updating11:28
rogpeppefwereade: that's all, i think11:29
rogpeppeafk11:31
rogpeppeback11:45
=== gary_poster|away is now known as gary_poster
* rogpeppe wishes it took less than 3 minutes to run lbox propose13:16
rogpeppemgz, natefinch, fwereade: first step towards keeping track of state servers: https://codereview.appspot.com/2688004313:21
* rogpeppe goes for lunch13:22
mgzrogpeppe: looking13:23
rogpeppemgz: did you have some queries about it?14:00
rogpeppefwereade: i would really appreciate your feedback too, please, as i don't want to go up another blind alley14:01
natefinchrogpeppe: I'm looking, but need a little more time with it... once my two very cute distractions are with their mother, I'll be able to give it more attention14:01
rogpeppenatefinch: ok14:01
natefinchrogpeppe: which will be shortly14:01
rogpeppecan anyone think of a nicer way to test (in mongo) if the length of an array is odd than this? $where: function() { return this.stateservers.length % 2 == 1}14:41
mgzthat seems reasonable14:41
rogpeppei don't think it's a problem in this case, but it would be nice to use built-in ops if possible14:42
rogpeppemgz: did you manage to review the above CL, BTW?14:42
rogpeppemgz: 't'would be much appreciated if you could14:42
mgzrogpeppe: yeah, getting there... sorry14:42
rogpeppemgz: np14:42
natefinchrogpeppe: I'm in the middle of it too. Looks fine so far.14:42
rogpeppenatefinch: thanks14:43
natefinchrogpeppe: also, %2 == 1 is pretty standard "is odd" ... seems unlikely there'd be a built-in op, but I don't know for sure14:43
rogpeppenatefinch: well, there's a built-in $mod operation14:43
rogpeppenatefinch: but i'm not sure there's a way to apply it to the length of an array14:43
natefinchrogpeppe: doesn't look like it's possible14:50
rogpeppenatefinch: yeah14:50
rogpeppenatefinch: as it turns out, i don't need to do it anyway... :-)14:51
natefinchrogpeppe: even better14:52
natefinchgood god state_test.go is too big14:54
mgzrogpeppe: reviewed, just some side questions due to my shakey understanding of state management bits.14:56
rogpeppenatefinch: yeah, State is big14:56
rogpeppemgz: ta!14:57
rogpeppefwereade: could we have a chat about this?15:09
fwereaderogpeppe, ofc15:09
rogpeppefwereade: https://plus.google.com/hangouts/_/calendar/am9obi5tZWluZWxAY2Fub25pY2FsLmNvbQ.mf0d8r5pfb44m16v9b2n5i29ig?authuser=115:09
rogpeppefwereade: i had to reboot, sorry15:38
rogpeppefwereade: back there now15:38
sinzuirogpeppe, natefinch : do either you you have a few minutes to review this dep change: https://codereview.appspot.com/2694004315:50
rogpeppesinzui: looking15:50
rogpeppesinzui: looks like it should be rev 50, not 4915:54
sinzuireally?15:54
sinzuirogpeppe, is tip also wrong? I can set that to 5015:55
rogpeppesinzui: yeah, that would be better, i think (rev 50 altered the rev 49 fix slightly)15:55
mgzrogpeppe: was trunk bumped to r50?15:56
rogpeppemgz: yeah15:56
rogpeppemgz: i mean, no15:56
rogpeppemgz: goyaml trunk was15:56
rogpeppesinzui: BTW I'm a bit surprised there's no test case to go along with this15:56
sinzuirogpeppe, yep. We see it in CI though. the lander would do if it honoured godeps15:57
rogpeppesinzui: ah, that's good15:58
sinzuirogpeppe, I am focused on a release today, but I or someone on juju-qa can get such a test by next week.15:58
sinzuisuch a test would have caught the spaces yesterday15:59
rogpeppesinzui: it sounds like there already is a test, if tests now pass in CI but did fail before this fix15:59
rogpeppesinzui: ah, but CI doesn't just run the tests, gotcha15:59
rogpeppesinzui: yeah, i think this should probably have a test case, but i won't hold up this change for that16:00
sinzuirogpeppe, we are thinking about adding the test runner because it offers a sanity check that the integration tests have a sane start16:00
rogpeppesinzui: yeah, i think that's probably worth doing16:01
rogpeppesinzui: reviewed16:01
rogpeppefwereade, natefinch, mgz: PTAL https://codereview.appspot.com/2688004316:18
rogpeppenatefinch: any chance of a LGTM ?16:37
rogpeppehmm, i thought that instance.HardwareCharacteristics was a result, not a parameter16:44
rogpeppebut in state.AddMachineParams it seems to be being used as a kind of constraint16:44
fwereaderogpeppe, it's not aconstraint -- it's there for injected machines iirc16:46
rogpeppefwereade: ah, ok16:46
fwereaderogpeppe, it's the result of what we got, that should hopefully match the constraints16:47
rogpeppefwereade: i'm wondering whether i should be using addMachineOps or addMachineContainerOps when creating new state server machines16:47
fwereaderogpeppe, the former, almost certainly16:47
fwereaderogpeppe, and please don't be afraid to massage them into a better shape if necessary16:48
rogpeppefwereade: i couldn't see how point 2) in the comment for addMachineContainerOps didn't also apply to creating state server machines16:49
rogpeppefwereade: and since addMachine itself calls addMachineContainerOps, i thought perhaps i should too.16:51
* rogpeppe still doesn't really understand the containers stuff16:52
fwereaderogpeppe, it looks like addMachineContainerOps is *actually* there to create a parent machine if it's necessary and doesn't already exist,but Imay be misskimming16:53
rogpeppefwereade: that seems plausible16:53
fwereaderogpeppe, it's not helpfully named16:53
rogpeppefwereade: in which case, I'd only use it when we come to do --to (or whatever it's called)16:54
fwereaderogpeppe, and would surely benefit from a smart person WTFing at it a bit and probably renaming some bits for clarity ;)16:54
rogpeppefwereade: i'm not smart enough16:54
fwereaderogpeppe, sell not yourself short dude16:55
fwereaderogpeppe, but it's not a demand anyway ;)16:55
fwereaderogpeppe, I'm EOD, and I'm afraid I need to be off pretty sharpish -- we are out of booze that cath feels like drinking ;p16:55
rogpeppefwereade: just one thing:16:56
rogpeppefwereade: i'm presuming it should be started with series taken from environ config default series, right?16:56
fwereaderogpeppe, sure (and I'll try to stick my head back in later as well so leave other questions as necessary, someone else might know the answers in the meantime)16:56
rogpeppefwereade: i suggest you alleviate the booze emergency a.s.a.p BTW :-)16:57
fwereaderogpeppe, that sounds like a good start16:57
fwereaderogpeppe, in future --to a machine that isn't default-series should probably be fine too though16:57
fwereaderogpeppe, cheers :)16:57
fwereadehappy weekends all16:57
rogpeppefwereade: have a good one16:57
=== TheFreeMue is now known as TheMue
natefinchTheMue: how old are your kids?17:04
TheMuenatefinch: 17 and 1917:05
* TheMue just fights a bit with his network :(17:05
rogpeppenatefinch: any chance of another look at the https://codereview.appspot.com/26880043; i'd like to land it tonight if possible, and i haven't got that long17:09
natefinchrogpeppe: yep, looking17:16
rogpeppenatefinch: thanks17:16
natefinchrogpeppe: btw, you can use jc.SameContents to compare to unordered lists17:22
rogpeppenatefinch: ah, i'd forgotten that17:22
rogpeppenatefinch: given that sort.Strings is easy at this point, i might just leave it as is17:23
natefinchrogpeppe: yeah yeah, that's fine.  Just a reminder for next time when it's not as easy.17:23
rogpeppenatefinch: yeah, thanks17:23
sinzuirogpeppe, This is the comparable goyaml dep fix for trunk: https://codereview.appspot.com/2696004317:28
rogpeppesinzui: LGTM17:29
sinzuithank you17:29
rogpeppenatefinch: personally I feel that it's a mistake for callers of a function to be relying on specific error kinds returned by the function17:33
rogpeppenatefinch: unless they're explicitly documented17:34
rogpeppenatefinch: because they're really part of the implementation detail of the function17:34
rogpeppenatefinch: my errgo package (launchpad.net/errgo/errors) makes that a point of principle and always masks the underlying error kind unless you explicitly ask otherwise17:34
natefinchrogpeppe: the common and expected errors *should* be documented17:38
rogpeppenatefinch: indeed17:38
rogpeppenatefinch: and in this case there are none17:38
rogpeppenatefinch: because the document must have been created already17:38
rogpeppenatefinch: error kinds are important when a caller might legitimately decide to act differently based on the kind of error17:39
rogpeppenatefinch: in this case all the errors are as bad as each other17:39
natefinchrogpeppe: yes, definitely.  That's fair.  I thought there might be some well-known errors, but if there are not, then no big deal.17:40
rogpeppenatefinch: it's annoying that with the standard error stuff you can't add contextual information to an error without either losing the kind or needing to define your own type17:41
natefinchrogpeppe: that's why I made errorWrapper in errors... though it's not directly exposed currently17:42
rogpeppenatefinch: check out errgo - I think it works pretty well. i've been using it a reasonable amount.17:42
natefinchrogpeppe: neat, but not sure I understand the use case for having a diagnosis that is different from the actual error17:57
rogpeppenatefinch: the actual error can have lots of extra context associated17:58
rogpeppenatefinch: the diagnosis is the metadata of the error, if you like17:58
natefinchrogpeppe: why not just wrap the error in a new one that is more accurate?17:58
rogpeppenatefinch: because that's a lot of hassle - you need to define a new error type each time.17:59
rogpeppenatefinch: often it's useful to have classes of error (e.g. "not found") but still keep around some info about the original error18:00
rogpeppenatefinch: for example errgo keeps information about the source locations where the error was propagated with Wrap18:00
rogpeppenatefinch: the division seems to work pretty well in practice18:00
rogpepperight, i'm done18:12
rogpeppenatefinch: g'night18:13
rogpeppeand happy weekends to one and all18:13
natefinchrogpeppe: night18:13
sinzuinatefinch, I think gobot sent my a spurious failure. Do I change the review to approved again to retry, or to I need to also add a comment like LGTM, tests pass locally?18:53
natefinchsinzui: you can just re-approve.  looked spurious to me18:55
sinzuithank you natefinch18:55
=== gary_poster is now known as gary_poster|away

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