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

davecheneyhelp, how do I fix this ?00:48
davecheneyError details:00:48
davecheneyempty tools-url in environment configuration00:48
davecheneywell, fuck00:50
davecheney% juju destroy-environment -y ap-southeast-200:50
davecheneyERROR empty tools-url in environment configuration00:50
wallyworld_davecheney: um, not sure. is there a tools-url in the yaml?01:34
davecheneywallyworld_: i fixed it01:50
davecheneymy working copy was old01:50
wallyworld_ah ok01:50
davecheneyi got the thing I needed01:53
davecheneyhttps://bugs.launchpad.net/juju-core/+bug/122795201:53
_mup_Bug #1227952: juju get give a "panic: index out of range" error <regression> <goyaml:New> <juju-core:Confirmed for dave-cheney> <https://launchpad.net/bugs/1227952>01:53
davecheneyyay yaml01:53
wallyworld_yay indeed01:54
davecheney** Bug watch added: Go Issue Tracker #6761 http://code.google.com/p/go/issues/detail?id=676101:56
davecheney^ I didn't know LP did this01:56
=== gary_poster is now known as gary_poster|away
davecheneywallyworld_: http://play.golang.org/p/hedM5ozbo202:02
davecheneysimple repro02:02
wallyworld_can't find import: "launchpad.net/goyaml"02:03
davecheneyyeah, won't work in the playground02:03
davecheneycopy and paste it into a file02:03
wallyworld_well, that error does indeed suck02:04
wallyworld_at least it can be produced trivially02:05
davecheneyis02:05
davecheneyvalue: -02:05
davecheneyvalid yaml ?02:05
davecheneywallyworld_: could you try doing the same in python ?02:05
wallyworld_not sure02:05
wallyworld_ok02:05
davecheneyta02:05
davecheneywallyworld_: i fixed the bug, tests all pass02:11
davecheneyby deleting code02:11
davecheneyi'm not sure how gustavo will like that :)02:11
wallyworld_davecheney: ah, ok. good luck :-)02:13
wallyworld_davecheney: after i apt get installed a python yaml lib, python does seem to think it is valid fwiw02:16
sinzuidavecheney, wallyworld_ We updated charm-tools proof a few weeks ago to check for valid yaml.02:16
davecheneysinzui: do you know if - has to be escaped in yaml ?02:17
davecheneyie02:17
davecheneyoutput-file: -02:17
sinzuidavecheney, It must be quoted when you don't mean list item02:18
davecheneyright, so the charm is invalid ?02:19
davecheneyg: Yes                     # a boolean True02:20
davecheney^ oh for fucks sake yaml02:20
davecheneysinzui: i cannot find any think to say that values must be quited02:21
davecheneyquoted02:21
sinzuiValues do need to be quoted ":" must be in normal string values. dash is accepted at http://yaml-online-parser.appspot.com/02:25
davecheneysinzui: orly02:26
davecheneyi used that validator and it said02:26
davecheneyvalue: -02:26
davecheneysequence entries are not allowed here02:26
davecheney  in "<unicode string>", line 1, column 8:02:26
davecheney    value: -02:26
davecheneyin short02:26
davecheneygotta quote it02:26
sinzuiah02:27
sinzui but it you type02:27
sinzuivalue: this -that02:27
sinzuiI think it is accepted02:27
davecheneyyeah02:27
davecheneyit's the bare hyphen that needs quoting02:27
sinzuiyep02:28
sinzuivalue: nil02:28
sinzuiis a problem not in yaml but is in our goyaml02:28
davecheney    wsgi_log_file:02:30
davecheney        type: string02:30
davecheney        default: "-"02:30
davecheney        description: "The log file to write to. If empty the logs would be handle by upstart."02:30
davecheney^ the original yaml02:30
davecheneyah ha!02:30
davecheneyja'cuse02:30
davecheneythis is correct02:30
davecheneywhen we format the data from juju get $SERVICE02:30
davecheneygoyaml cocks it up02:30
sinzuidavecheney, I see that wsgi_log_file: "-" is quoted in the current config.yaml02:30
sinzuiah we saw the same thig02:31
davecheneyright, fixed02:36
davecheneyMP incoming02:36
davecheneyhttps://codereview.appspot.com/2643004302:41
davecheneyoh crap02:41
davecheneyit's nearly 202:41
davecheneytime for lunch02:41
bigjoolsif I know my charm needs certain constraints, can that be hard-coded in the charm such that juju will pick it up?05:31
davecheneybigjools: nope05:32
bigjoolsdavecheney: bugger. worth a bug?05:32
davecheneysure05:32
bigjoolsok ta05:33
davecheneyi'm pretty sure this is by design05:33
bigjoolsoh?05:33
bigjoolsseems odd to me05:33
davecheneyi didn't say it was a sensible design05:33
bigjoolsheh05:33
davecheneyjam: ping05:33
jamdavecheney: pong05:33
davecheneyjam: you are an owner on goyaml, could I get a review https://codereview.appspot.com/2643004305:33
davecheneypls05:33
jambigjools: we've talked about adding charm defined constraints in SFO, I don't know if/where it ended up on the schedule05:34
bigjoolsjam: ok, well I shall file a bug anyway for book-keeping05:34
davecheneyjolly good05:35
jamdavecheney: so the actual change is just len() ?05:35
davecheneyjam: yup, the error was encode was detecting - as the start of a --- documented seperator05:36
davecheneyand panicing when it ran off the end of the slice05:36
davecheneyan altertive solution would be to delete line 1015-101705:37
jamdavecheney: so LGTM though if you have a bug related it would be good to associate it.05:37
davecheneybug is linked to the MP05:37
jamah, it wasn't linked in the codereview which you linked me :)05:37
davecheneysorry05:37
davecheneylbox failed me05:37
jamjoys of having double systems05:37
davecheneyjam: can you please commit that for me05:37
davecheneyi do not have permission05:38
davecheneyjam: thanks for committing that05:45
jamdavecheney: np, I'm glad I was able to submit it correctly for you :)05:47
davecheneyjam: how can I target this bug to 1.16 stable ? https://bugs.launchpad.net/goyaml/+bug/122795205:48
_mup_Bug #1227952: juju get give a "panic: index out of range" error <regression> <goyaml:Fix Committed by dave-cheney> <juju-core:Fix Committed by dave-cheney> <https://launchpad.net/bugs/1227952>05:48
jamThere should be a "Target to series" underneath the existing bug targets05:48
davecheneyI only get project and distro05:49
davecheneyoh no wait05:49
davecheneyreloading the page05:49
davecheneydoes somethine selse05:49
jamso going to the page probalby brought you to the goyaml version05:49
davecheneyaaah05:50
jamyou want the juju-core version at: https://bugs.launchpad.net/juju-core/+bug/122795205:50
jamI think05:50
_mup_Bug #1227952: juju get give a "panic: index out of range" error <regression> <goyaml:Fix Committed by dave-cheney> <juju-core:Fix Committed by dave-cheney> <juju-core 1.16:Fix Committed> <https://launchpad.net/bugs/1227952>05:50
jamdavecheney: so, is an update to the goyaml dependency in the 1.16 branch?05:50
jam(or at least sinzui knows about it?)05:50
jamotherwise I'd mark it "In Progress"05:50
davecheneykk05:51
davecheneyyeah, i nede to make sure sinzui knows that deps.tsv needs to be updated05:51
davecheneyrogpeppe1: ping, need help with godeps05:52
wallyworld_jam: when we upgrade, and a config.New() is done by the juju upgrade command (client), do those config values get pushed to the server environment? in particular, if i delete a config value, will that value then be made to disappear from the server env config on the (old version) state server before the server side upgrade process starts?05:54
wallyworld_i didn't think that would happen, but maye it does05:54
jamwallyworld_: AFAIK when we upgrade nothing changes unless you put that code into the new version05:55
wallyworld_jam: that's what i thought, and yet it seems that if i delete tools-url from the config (in 1.17), then 1.16 servers complain they can't find it05:57
axwjam: there's a bug (?) in state that means no config attributes ever get removed from state05:57
axwerr sorry, wallyworld_05:57
wallyworld_that's what i thought05:58
wallyworld_but there's an upgrade bug that seems to be caused by tools-url not being available when the 1.16 servers run the upgrade process. i'll test a bit more. gotta duck out to take my kid to the doctor. back later05:58
jamwallyworld_: my guess is that the original bootstrap *didn't* have a tools-url because it was using stock tools and so it didn't need it. Then "upgrade-juju" is running from an environment which has been edited to *add* tools-url but only locally.06:03
jamYou probably need a "juju set-environment tools-url=XYZ; juju upgrade-juju"06:03
axwjam, wallyworld_: now that I think of it, this was one of the feature requests from IS at SFO06:06
axwatomic upgrade + set-env06:06
jamaxw: I'm pretty sure they wanted it for charms, not for juju as a whole06:11
axwjam: ah yes, sorry, right you are06:12
davecheneyhttps://code.launchpad.net/~dave-cheney/juju-core/161-update-goyaml-godep/+merge/19517306:17
jamdavecheney: I just approved, but you seem to have a debug "fmt.Printf" in there06:18
davecheneyjam: good catch06:24
davecheneythat diff is dirty06:24
davecheneyit shold only be the deps.tsv06:24
davecheneyTIL, don't remove files from the bzr commit message, it doesn't care06:24
jamdavecheney: no, it doesn't do anything. You have to specify it on the command line06:25
jamthe listing in the message is just for you as the writer of the message06:25
jamI can see the draw, though.06:25
jamwallyworld_: when you're back, I've sorted through enough logs to feel like I have a handle on bug #1250974 but I need some feedback from you07:36
_mup_Bug #1250974: upgrade to 1.17.0 fails <ci> <regression> <upgrade-juju> <juju-core:In Progress by wallyworld> <https://launchpad.net/bugs/1250974>07:36
jamthe short summary: When you call "upgrade-juju" it marks the AgentVersion field by writing the entire EnvironConfig. However, our "write the config" code is just "add/update these fields to the dict".07:37
jamIf you have an omitted entry, it *doesn't* touch it. (as noted by axw)07:37
jamso when you did patch r205307:37
jamyou changed tools-url:null into tools-url: ""07:37
jamwhich means that SetEnvironConfig({stuff, tools-url:null}) would not have touched that field07:37
jamwell, I should say07:37
jamSetEnvironConfig({stuff, agent-version:"1.17.0", tools-url:null)07:38
jambut SetEnvironConfig({stuff, agent-version:"1.17.0", tools-url:""}) *does* wipe out the tools-url field.07:38
jamAnd note, upgrade-juju *does* read the remote environ config07:39
jamwith conn.State.EnvironConfig()07:39
jambut that yaml is parsed by the local code07:40
jamso it strips out stuff it doesn't understand07:40
jamwallyworld_: so what I need to understand is why in r2053 did you need to switch from Omit (which would have it locally just ignored) to a default of "" which means we cause it to get overwritten.07:40
dimiternfwereade, if you're around - https://codereview.appspot.com/25080043/ from yesterday, when you can please08:00
wallyworld_jam: cause i got errors in some live tests08:03
wallyworld_oh bugger. dinner ready08:04
wallyworld_back soon08:04
=== jtv2 is now known as jtv
wallyworld_jam: i did a live test on ec2, upgrade from 1.16 to 1.17, it worked ok, but i did it with the line which deletes tools-url from the config attrs map commented out08:14
wallyworld_i will test again with that line back in08:15
wallyworld_jam: what i was asking before was about whether config created on the new 1.17 client would overwrite config in the env state on the 1.16 node - you seem to imply it will overwrite?08:16
jamwallyworld_: yeah. so "set agent-version: NEWVERSION" is "read the config from remote, change that line, and write it back"08:17
jambut the "read from remote" parses it with the local structure08:17
jamwrite it back only update fields that exist in the thing we are writing08:17
wallyworld_ok, so the code in trunk should work then08:17
jamwell, I could be wrong with the direct DB access08:17
jamwell 2053 doesn't08:17
jamwallyworld_: is there a follow up later?08:17
wallyworld_cause i remove tools-url from the map08:17
wallyworld_so it should not overwrite the value in env sate08:18
jamwallyworld_: so *if* my understanding of SetEnvironConfig is true, then you're right08:18
wallyworld_and yet, if i remove the delet(attrs, "tools-url") line it works08:18
wallyworld_that's the only change i made from trunk before i tested08:19
wallyworld_i'll test again with trunk08:19
wallyworld_jam: to answer question above - no follow up yet to 205308:20
jamwallyworld_: so looking at state/state.go SetEnvironConfig. It expects to have a config.Config that at least has an AgentVersion in it, but that appears to be the only thing it needs, and it only calls old.Update(new)08:39
wallyworld_i'm running another test, will look in more detail at that code in a sec08:40
jamwallyworld_: k. I'm thinking we *might* be able to get away with just creating a new Config that just has the fields we actually want to update, to sort of protect us in the future from other incompatible Config things.08:41
wallyworld_makes sense, would be more robust08:42
fwereadedimitern, reviewed, basically LGTM, one substantial question08:46
fwereadewallyworld_, jam: is it time to fix SetEnvironConfig? :/08:47
wallyworld_perhaps08:47
wallyworld_just confirming my theory about ause08:47
jamfwereade: well Dimiter is at least fixing Upgrade by going via the API and we can sort of do something better there.08:47
wallyworld_cause08:47
fwereadejam, yeah, there's SetEnvironAgentVersion already08:48
jamSetEnvironConfig is *almost* just taking a delta and applying it, so we could just make that explicit "UpdateEnvironConfig" and go from there.08:48
fwereadejam, but SetEnvironConfig itself is kinda broken by not-even-design08:48
fwereadejam, there's no way to remove fields but maybe that's not a serious problem?08:48
dimiternfwereade, thanks08:48
jamfwereade: well I mean write an UpdateEnvironConfig that would take an actual delta (maybe 1 map to add and a list to remove? Or 2 maps and we assert old and new values?)08:50
fwereadejam, yeah, that (probably the former) sounds sane08:51
fwereadejam, there is still the validity problem08:51
dimiternfwereade, I thought you suggested trying first the newest current and then next stable?08:55
fwereadedimitern, I don't *think* I did, but maybe -- did I say why?08:56
fwereadedimitern, I thought the logic was the other way round before, and I was *trying* to suggest just reversing the test but keeping the logic the same, so the preferred branch came first08:57
dimiternfwereade, something about "we should be always able to upgrade to a more recent current version"08:57
dimiternfwereade, ah, ok then - will change it to prefer next stable over current08:57
fwereadedimitern, that should always be a plausible fallback, but I *think* it makes most sense to go as far as we know we can08:57
dimiternfwereade, although it kinda makes sense to prefer current as it is08:57
fwereadedimitern, both do, don't they08:58
dimiternfwereade, that way we can upgrade as far as possible on the current one, and once there's no more recent current we'll automatically choose next stable08:58
dimiternfwereade, seems less intrusive08:59
fwereadedimitern, if you're on 1.17.3.4 and you use "--version 1.17", that'll keep you where you want to be, right?08:59
fwereadedimitern, otherwise I think we want people on the latest stable by default08:59
* jam goes to get some lunch, back in a bit08:59
dimiternfwereade, ok09:00
fwereadedimitern, cheers09:00
jamfwereade: arguably what we want is an index on something.canonical.com that says "if you're at X go to Y"09:00
jamand then we can make the jumps whatever we've tested :)09:00
fwereadejam, that'd be a nice argument to have, but I think it's out of scope here09:01
jamfwereade: that way if we find a bug in 1.16.2 that prevents upgrading to 1.18.0, we can point you at 1.16.4 before you go to 1.18. But yeah, ESCOPE09:02
wallyworld_axw: do you have the bug number handy for the config attrs not being deleted?09:22
axwwallyworld_: nope, I'll do a quick search09:23
wallyworld_or i can, was just being lazy :-)09:23
axwwallyworld_: #124880909:23
_mup_Bug #1248809: state.State.SetEnvironConfig never forgets <state-server> <juju-core:Triaged> <https://launchpad.net/bugs/1248809>09:23
wallyworld_ta09:23
axwfwereade: no worries, we can chat about the bootstrap stuff tomorrow. I'll have to refresh my memory on what I did ;)09:33
fwereadeaxw, yeah, that was my problem with reviewing it, it demands an awful lot of context09:33
fwereadeaxw, I've been trying to think of how to split it, though,and it's not easy09:34
axwyeah, it's all related :(09:34
axwnot the monolith I wanted09:34
fwereadedimitern, would you also take a look at https://codereview.appspot.com/14433058/ please? it's related to what you've been doing09:34
fwereadeaxw, haha09:34
dimiternfwereade, looking09:36
* TheMue grumbles, has latest changes dislike him09:44
axwfwereade: if you didn't see, I simplified (I hope) the destroy-env CL: https://codereview.appspot.com/22870045/09:48
axwit now rejects an attempt to destroy-env while there are manual non-manager machines09:49
rogpeppe1jam: i just posted a query to https://codereview.appspot.com/26430043/ - it looks slightly questionable to me, but that's only from a naive p.o.v.10:00
fwereadeaxw, ah, thanks, I'll check it out10:01
jamfwereade: team meeting10:02
jammgz^^10:02
jamhttps://plus.google.com/hangouts/_/calendar/bWFyay5yYW1tLWNocmlzdGVuc2VuQGNhbm9uaWNhbC5jb20.09gvki7lhmlucq76s2d0lns80410:02
wallyworld_fwereade: jam: if you guys could take another look at my updated merge proposals from yesterday that would be muchly appreciated10:34
jam(14:41:31) jam: fwereade: good job sorting out the backporting of destroy-machine --force, your coverletter shows a lot of convoluted steps10:42
jam(14:42:01) jam: axw: if you're around for a bit, I'm interested in chatting about the manual teardown stuff10:42
jam(I meant them in this channel)10:42
axwsure10:42
jamaxw: so. the question I had was is it possible to have the jujud/juju client generate the teardown when it is time to tear down, rather than at the time we create it10:43
jamaxw: even once we have this, what happens if we upgrade 1.17 => 1.1810:43
jamcould the teardown change?10:43
axwjam: ah, right. hmm... not really, because it's an agent-level thing?10:44
axwsorry, just a minute10:45
dimiternblast10:46
axwjam: I think I misunderstood, I thought you meant from the client side. one of the reasons why it's difficult to do at runtime is because, for example, the juju-db job isn't known to the machine-agent10:47
dimiternwhat happened to the weekly meeting?10:47
jamdimitern: we did it10:47
jamDaylightsavings time and all10:47
dimiternah, sorry10:47
jamit was at 10:00 UTC10:47
jamwe went pretty fast10:47
dimiternjam, did I miss anything important?10:48
jamdimitern: we're making you do all the work this week for missing the meeting :)10:48
dimiternjam, sweet :)10:49
jamdimitern: https://docs.google.com/a/canonical.com/document/d/1eeHzbtyt_4dlKQMof-vRfplMWMrClBx32k6BFI-77MI not a lot. Mostly talked about release planning10:49
dimiternjam, thanks!10:49
axwjam: sorry, family's home - I need to help with the kids10:51
axwmind if we chat about it tomorrow?10:51
jam axw: I won't be around tomorrow, but you can chat with a different reviewer then :)10:51
jamenjoy your family time10:52
axwok10:52
axwthanks10:52
axwhave a nice weekend10:52
=== gary_poster|away is now known as gary_poster
wallyworld_jam: https://codereview.appspot.com/26550043/11:06
wallyworld_fix for tools-url11:06
jamwallyworld_: yeah, I was thinking about the reverse problem, someone used an old 1.16 to bootstrap, and then tries to upgrade to 1.17. They won't have tools-metadata-url set (though I'm guessing your compat code would have migrated it anyway?)11:07
wallyworld_yeah, the original code did migrate it11:08
wallyworld_jam: and the previous public-bucket-url deprecation - the bucket value could be removed from config because the tools url that was set up overrode it. but this case is subtley different11:09
jamwallyworld_: did you do live testing ?11:10
wallyworld_yep11:10
wallyworld_before i did the patch :-)11:10
wallyworld_well, before  i did the tests11:10
jamwallyworld_: I would hope that your live testing was of the patch :)11:10
wallyworld_yeah, i meant i made sure it worked before doing the unit tests11:10
jamwallyworld_: if you didn't see the email LGTM11:25
wallyworld_thanks jam11:25
wallyworld_doing one final test11:25
wallyworld_jam: there's a separate issue. if you start a 1.16 system without *any* tools url, then add one to your config (cause 1.17 tools are elsewhere) and try to upgrade, the server side does not find any 1.17 tools. but that's more a separate corner case, not a blocker11:36
wallyworld_the juju client doesn't complain though when firing off the upgrade11:36
wallyworld_which it would if the client could not find the 1.17 tools11:36
jamwallyworld_: from what I've seen it won't try to find the tools, because it *is* smart enough to ignore your local tools-url and read the remote one.11:37
jamwallyworld_: are you sure?11:37
wallyworld_i am pretty sure11:37
jamthe code I see in "cmd/juju/upgradejuju.go" first uses conn.State.EnvironConfig()11:37
jamit doesn't use the local EnvConfig11:37
wallyworld_but i may have made a mistake testing11:37
wallyworld_ffs, i've cleared my scrollback buffer. so can't check for sure without re-testing. will do it tomorrow11:39
wallyworld_at least curtis' issue is fixed11:39
=== TheRealMue is now known as TheMue
hazmat do we have godoc output for juju-core available/extant anywhere?14:17
mgzonly insofaras you can build/serve it out of the branch I think, hazmat14:19
mgznot seperately hosted anywhere14:19
hazmathmm.. hard to ref the api docs for third parties if we don't publish our docs.14:19
sinzuiwallyworld_, jam: did we intentionally change dependencies.tsv to be space delimited, not tab?14:21
mgzit would be nice to bundle it into a build process for the juju.ubuntu.com docs14:21
mgzsinzui: looks like it's still tabs to me...14:22
sinzuimgz, wallyworld_'s goyaml line uses spaces!14:23
mgzah, that's likely an error from that update then14:23
sinzuiCI is down. I think godeps doesn't support spaces either14:23
mgzit does not.14:24
mgzI can propose or lgtm a fix for that if it'd help curtis14:25
sinzuimgz, I can propose the fix if you can review it14:27
rogpeppe1fwereade: is this close to your wishes regarding ensure-ha? i've written the docs as if it was completely done, so we have an idea where we're going, although we won't implement all of it to start with (e.g. prefer-machines, no-destroy)14:27
rogpeppe1fwereade: http://paste.ubuntu.com/6416040/14:27
TheMuehazmat: http://godoc.org/launchpad.net/juju-core14:29
mgzTheMue: oo, lookit dat14:30
hazmatTheMue, thanks14:31
mgzTheMue: that seems to be lacking lots of doc things though14:32
TheMuemgz: indeed, we don't have many package docs14:33
mgzor ah, I see, without enough magic it just omits things. stuff like instance/address.go is actually quite well covered14:34
natefinchmgz: we aren't following convention in a bunxch of things.  we should fix that.  Godoc is the Go standard14:35
rogpeppe1mgz: what specific things are you thinking we're missing?14:38
rogpeppe1mgz: (doc-wise, that is)14:38
* rogpeppe1 goes for some lunch14:40
natefinchrogpeppe1, mgz: this is kind of unconscionable:  http://godoc.org/launchpad.net/juju-core/cmd/juju14:46
mgzrogpeppe1: I was just looking at some random packages. the provider ones are pretty sparse14:47
TheMuenatefinch, mgz: displaying the import chars is sometimes wild14:52
TheMueeh, s/chars/graphs/14:53
* TheMue => lunch14:58
natefinchmgz, TheMue, rogpeppe1:  how to do it right: http://godoc.org/github.com/natefinch/gocog  :)15:00
sinzuimgz, do you have time to review https://codereview.appspot.com/2637004415:15
TheMuenatefinch: or http://godoc.org/git.tideland.biz/gocn or http://godoc.org/git.tideland.biz/godm etc15:29
TheMuenatefinch: ;)15:29
natefinchTheMue: yeah... my specific point was that our command (the juju client executable) doesn't have any godocs.  But yes, nicely done.  I really like that it's so easy to write docs for Go, and how standard they are, that when they're missing, it's a glaring deficiency.15:32
TheMuenatefinch: +115:35
rogpeppe1natefinch: agreed. we should probably have some preprocessor that generates godoc output from the standard help commands.15:38
rogpeppe1natefinch: and also there's the fact that packages with a package comment in the right style get rated higher in godoc15:39
rogpeppe1natefinch: which might well be good for our general visibility15:39
mgzsinzui: approved15:39
sinzuithank you mgz15:39
rogpeppe1fwereade: ping15:45
sinzuirogpeppe1, was ths fix for this bug just to gomass? Could I update  the 1.16 branch to use that dep to release a fix? https://bugs.launchpad.net/gomaasapi/+bug/122267116:09
_mup_Bug #1222671: Using the same maas user in different juju environments causes them to clash <cts-cloud-review> <maas-provider> <Go MAAS API Library:Fix Committed> <juju-core:Fix Committed by thumper> <https://launchpad.net/bugs/1222671>16:09
rogpeppe1sinzui: looking16:09
rogpeppe1sinzui: do you have a reference for the merge proposal that fixed it?16:10
fwereaderogpeppe1, pong, sorry, happened while I was joining a meeting16:10
rogpeppe1fwereade: np16:10
sinzuirogpeppe1, I don't :(16:10
rogpeppe1sinzui: i'm pretty sure it's a maas-only bug16:11
rogpeppe1fwereade: i wonder if you could pass your eyes over this for sanity checking. i'm trying to stick closely to what you have been suggesting. http://paste.ubuntu.com/6416040/16:11
* fwereade looks16:12
rogpeppe1fwereade: that's my take at a complete description. obviously we won't implement it all to start with.16:13
fwereaderogpeppe1, for a complete spec, I think you convinced me that we do want to be able to demote rather than destroy a non-functioning manager16:16
rogpeppe1fwereade: how do you propose we do that?16:16
fwereaderogpeppe1, well, it does irritatingly involve watching jobs -- but if we have prefer-machines we need that anyway16:17
fwereaderogpeppe1, do you mean inside state?16:17
fwereaderogpeppe1, we remove the appropriate jobs from the problematic machine in the same transaction we bring up the new one -- am I being obtuse?16:17
rogpeppe1fwereade: that seems possible, but does mean we have to do dynamic jobs in the machine agent now rather than later16:18
rogpeppe1fwereade: also, it's not clear to me that just because a state server's network connection has been down for more than 3 minutes that we should take it out of action indefinitely16:19
fwereaderogpeppe1, or, at least, the job that maintains mongo needs to keep an eye on whether it still should and exit without error if it doesn't16:19
fwereaderogpeppe1, indeed, this is the source of my resistance to the *automatic* failover of state16:19
fwereaderogpeppe1, I expect some degree of human judgment to be applied16:20
rogpeppe1fwereade: so if you happen to run ensure-ha and a server happens to have been down for more than 3 minutes, then the logic triggers16:20
fwereaderogpeppe1, yes16:22
rogpeppe1fwereade: there's another question: when do we actually add and remove machines to/from the set of mongo peers?16:22
natefinchfwereade, rogpeppe1:  it seems like there's a difference between automatic failover and automatic replacement of machines.  Failover has to be automatic, otherwise it's useless.  But maybe that's just me nitpicking semantics.16:24
fwereaderogpeppe1, as soon as we can, I think?16:24
fwereaderogpeppe1, natefinch: yeah, I used the word "failover" intemperately above16:24
rogpeppe1fwereade: we need an agent to do it, because we can't necessarily do it until the machines come up16:24
natefinchfwereade: ok, I thought so, but just wanted to make sure I wasn't misunderstanding16:25
rogpeppe1fwereade: i'm thinking that it's that agent that can be responsible for being the last word in making sure that mongo has an odd number of peers16:26
rogpeppe1fwereade: the state machines in state are only an aim - they don't necessarily reflect reality16:26
fwereaderogpeppe1, sure -- it's that target set of peers that I want hard guarantees about16:27
rogpeppe1fwereade: right16:27
fwereaderogpeppe1, the fact that the rest of reality has to converge is inescapable16:27
rogpeppe1fwereade: well actually, i think we want guarantees about the *actual* set of peers too, as much as possible16:27
rogpeppe1fwereade: so, for instance, if you start two new state servers and only one comes up, what should we do then?16:28
rogpeppe1fwereade: i'm thinking that we don't add either of them as peers until they both come up (or we might possibly consider adding the first one as non-voting peer)16:28
fwereaderogpeppe1, yeah, the agent's job has subtleties -- there surely is a meaningful distinction between never-came-up and went-down-unexpectedly16:30
rogpeppe1fwereade: indeed, and perhaps that's something that needs to be stored in state16:32
rogpeppe1fwereade: i'm wondering if the agent should announce its state in its machine somehow, so we have a permanent record that it actually came up16:33
rogpeppe1fwereade: BTW i've discovered that each mongo peer caches the addresses of its peers16:33
fwereaderogpeppe1, that might be sensible, I don;t have a strong opinion at the moment16:34
rogpeppe1fwereade: which makes life a little easier for us, although we'll still need to cache the API addresses.16:34
fwereaderogpeppe1, ah yes :)16:35
rogpeppe1fwereade: one possibility is that the machine agent can store (perhaps amongst other info) the port that its mongo server is listening on. that gives us the potential freedom at some point in the future, to host state servers where not all the servers in an environment are listening on the same port.16:36
fwereaderogpeppe1, I'm not sure I see the use case there tbh16:37
rogpeppe1fwereade: it means that you can host state servers on machines that are hosting other state servers, without having to try to choose an arbitrary port that noone is already using.16:38
rogpeppe1fwereade: it also means that if someone happens to have a service that's using the juju port, and they want to host a state server on that node, that they can do that16:39
rogpeppe1fwereade: it seems like a potentially useful piece of flexibility - it's easy to add right now, but perhaps not so easy in the future.16:40
rogpeppe1fwereade: it's also potentially useful for testing16:41
fwereaderogpeppe1, multiple state servers per machine does not really seem like something we want to encourage... except, hm, indeed, in a testing context16:41
rogpeppe1fwereade: i don't see why multiple state servers (for different environments) on a single machine should be a particular problem16:42
rogpeppe1fwereade: are you thinking just from a load perspective?16:42
fwereaderogpeppe1, I'm thinking from an "isn't that just a parallel multitenant implementation" perspective16:43
rogpeppe1fwereade: well, kinda, but there are various reasons that you might not want them as peers inside the same state server16:43
fwereaderogpeppe1, and that'd be allowed by the env setting anyway, right?16:45
rogpeppe1fwereade: what would, sorry?16:45
fwereaderogpeppe1, mutiple envs' state servers on the same hardware if people *really* wanted to do that16:46
* fwereade quick ciggie before next meeting, response rate will slow down a bit16:47
=== rogpeppe1 is now known as rogpeppe
TheMuefwereade: thx for your review, I think I've got now covered most of it17:53
TheMuefwereade: next step is live testing17:53
rogpeppenatefinch: here's a collection of slightly more thought-through details on the ensure-ha stuff - just the parts that are directly concerned with starting and stopping state servers. http://paste.ubuntu.com/6417151/18:29
rogpeppefwereade: you might want to take a look at the above for sanity checking18:29
rogpeppeand with that i must heed the call from downstairs18:30
rogpeppeg'night all18:30
natefinchrogpeppe: where did prefer-machines come from?  That seems too... squishy.    Like "Hey, you know, if you feel like, try to get the state servers over there, if you don't mind."18:30
natefinchrogpeppe: night, I'll read up18:30
rogpeppenatefinch: it was fwereade's suggestion18:30
natefinchrogpeppe: I'll complain to him then ;)18:30
rogpeppenatefinch: i'm trying very hard to be non-controversial18:30
rogpeppenatefinch: yes18:30
rogpeppenatefinch: g'night18:31
sinzuinatefinch, do you have a few minutes to review https://codereview.appspot.com/2428004418:50
natefinchsinzui: sure thing.  I like the easy ones18:52
natefinchsinzui: looks kinda buggy, but I guess I can give it the LGTM18:53
sinzuiit is?18:53
natefinchsinzui: a joke.  It's two characters, changing a 3 to 4 :)18:53
sinzuinatefinch, I am humour challenged today. I saw CI make a 1.16.3 release thought, oops, they better not ever get out into the wild18:54
natefinchsinzui: ahh,  apologies.  Glad it got caught.18:58
=== gary_poster is now known as gary_poster|away
davecheneyrogpeppe1: good news!22:38
davecheneythe reflect issue in gccgo isn't as bad as everyone things22:38
rogpeppe1davecheney: i heard that22:39
rogpeppe1davecheney: only struct{}22:40
davecheneyyup22:41
davecheneyit will be straight forward to fix22:41
axw__fwereade: a bit late your time? do you want to chat your morning instead?22:41
=== axw__ is now known as axw

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