/srv/irclogs.ubuntu.com/2014/05/29/#juju-dev.txt

wallyworldaxw: meeting?02:05
axwwallyworld: sure02:05
wallyworldrotating team meeting02:05
wallyworldsee cal02:05
axwoh right, core team02:05
axwwhoops02:05
wallyworld:-)02:06
wwitzel3perrito666: if you're still around02:07
wallyworldthumper: want the 1:1 now?02:37
thumperwallyworld: yeah, in our normal hangout02:37
wallyworldalready there :-)02:38
* thumper goes to make a coffee03:04
sinzuiaxw, I updated bug 1324255 to explain that the juju and the slave were dead from disk shortage and zombie mongos. from other tests03:21
_mup_Bug #1324255: Local provider cannot boostrap <ci> <local-provider> <mongodb> <regression> <juju-core:Triaged> <https://launchpad.net/bugs/1324255>03:21
axwsinzui: hmm ok. I'm pretty sure I saw it on the amd64 tests to03:22
axwtoo*03:22
sinzuiaxw, CI doesn't have a trusty local lxc test yet03:24
axwsinzui: sorry, I was unclear; I meant the unit tests themselves see the "Closed explicitly" error. not in local deployment, just running the unit tests03:24
axwsinzui: e.g. http://juju-ci.vapour.ws:8080/job/walk-unit-tests-amd64-trusty/485/console03:24
axwit may be unrelated, I'm not sure03:24
sinzuiI see03:26
* thumper making dinner, back in about 2 hours for a bit more04:22
=== thumper is now known as thumper-afk
waiganihttps://codereview.appspot.com/98700043 :)05:06
=== vladk|offline is now known as vladk
wallyworldaxw: thanks for review, more info on reason for new interface etc is here https://docs.google.com/a/canonical.com/document/d/1J6EZ37gfiZdVMdoxdFrih4R27LCcqyBzi50wjWFjbiA06:15
axwokey dokey, will have a read06:18
axwwallyworld: I think calling it "err" will also be a problem, because an "err" in the body will shadow it06:18
wallyworldaxw: err in body is not meant to be a new var06:19
wallyworldthat's why i used = not :=06:19
axwwallyworld: not on the first line of the function06:19
wallyworldthat's because file is new but err will not be as it's the 2nd var and there's one in scope06:20
wallyworldor have i got that wrong?06:20
axwmm I think it only counts if it's declared in the same scope. will verify06:20
axwI could be full of crap06:20
wallyworldthe err at the top is in the same scope afaik06:20
wallyworldbbiab, gotta pick up kid06:20
wallyworldaxw: i was tempted to leave the err in the defer as err := but thought it could be confusing so changed its name even though not necessary06:21
axwwallyworld: you are correct06:21
wallyworldnp06:21
wallyworldthat's why i hate := and =06:22
wallyworldtoo easy to make subtle mistakes06:22
wallyworldnow i'm really bbiab06:22
=== Ursinha-afk is now known as Ursinha
voidspacemorning all08:08
voidspaceis anyone working on the "juju doesn't bootstrap on precise" issue?08:30
voidspaceI suspect it's my fault08:30
voidspaceI'm spinning up a precise VM to look at it08:31
axwvoidspace: if you can reproduce it, I have a small change I'd love to test09:06
axwI'll also start a precise image on AWS09:07
voidspaceI'm creating a local VM. Still downloading precise - my "old" VM was 13.10 not precise.09:08
axwvoidspace: from what I've found in Googling, it seems that mgo will kill sockets for servers that it doesn't think are available in the cluster09:11
axwvoidspace: so I've made a small change to copy (rather than clone) the session when running replSetInitiate, to force it to create a new socket09:11
vladkjam: ping09:14
jamvladk: pong09:18
vladkjam: I'd like to discuss my further steps in developing Networker API09:19
jamsure, can we get dimitern involved as well?09:19
vladkjam: of course09:20
jam(well that was mostly just to ping him)09:20
vladkdimitern: ping09:20
vladkjam: can we do it on hangout?09:21
jamcertainly, I was just waiting to see if dimitern was actually around09:21
dimiternjam, vladk, i'm here09:24
jamk I need about 30s09:25
jamwe can just use our team standup hangout09:26
jamhttps://plus.google.com/hangouts/_/canonical.com/juju-sapphire09:27
jamdimitern: vladk ^^09:27
fwereadeaxw, pre-commented on https://codereview.appspot.com/102860043/ -- let me know if it sounds sane to you09:29
voidspaceaxw: awesome, that sounds very useful09:31
voidspaceaxw: might help test issues as well09:31
voidspaceaxw: we start mongo ok, but then fail to connect to it09:31
voidspaceaxw: (when using replica sets for tests)09:31
voidspaceaxw: and it's not a timing issue, we wait sixty seconds09:31
voidspaceaxw: I'm creating a branch with my changes backed out - so once I get the VM setup I can quickly tell if it's my changes09:32
axwfwereade: thanks, seems sensible to put it on RelationUnit. in my PoC I did the address selection TODO in the uniter, which is a bit dumb I guess.09:32
axwfwereade: yes, free for a chat tomorrow09:32
axwvoidspace: we wait sixty seconds for what?09:32
voidspaceaxw: we wait up to sixty seconds (mongoDialupTimeout I believe) when trying to connect to the mongo server we have created for tests09:33
voidspaceaxw: you're missing some context09:33
voidspaceaxw: as well as using replica sets for local provider I wanted to switch us to using replica sets for tests too09:34
axwI see09:34
voidspaceaxw: so that our test mongo matches the production mongo09:34
axwwe're already doing that in a bunch of tests - you want to do it in *all* of the,?09:34
axwthem*09:34
voidspaceaxw: but when I do that, many tests fail with "unreachable servers" - many of them deterministically09:34
voidspaceaxw: yep09:34
axwok09:34
voidspaceJujuConnSuite *doesn't*09:35
voidspacethe driving motivator is that we want to switch to write-majority09:35
axwsounds like it will add quite a bit of overhead to the tests. setting up a replica set can take quite some time09:35
fwereadeaxw, no worries, we converge :)09:35
voidspacethe command to switch to "write majority" (WMode) errors if you're not using replica sets09:36
axw:/09:36
voidspaceso one fix is to use replica sets everywhere09:36
voidspacethat's what we were attempting09:36
voidspaceit maybe that because of precise we *can't*09:36
* axw sighs09:42
axwof course it bootstraps first time for me09:42
axwof course it'd help if I had pulled trunk09:42
voidspaceheh09:42
voidspaceaxw: this branch reverts my local provider replica set changes09:51
voidspaceaxw: lp:~mfoord/juju-core/revert-local-replset09:51
axwok09:51
voidspaceor "bzr merge -r 2803..2802"09:51
axwvoidspace: if you manage to reproduce the error with replSet enabled, try this patch: http://paste.ubuntu.com/7542857/09:58
axw(please)09:58
voidspaceaxw: yep10:00
voidspaceaxw: precise installing now10:00
voidspaceaxw: you couldn't reproduce?10:00
axwvoidspace: nope :(10:00
voidspaceodd10:00
wallyworldmgz: 1:1 time10:03
mgzwallyworld: whoops, not looking, joining now10:13
axwvoidspace: it's not just precise. http://juju-ci.vapour.ws:8080/job/local-deploy-trusty-ppc64/10:17
axwthere's a bunch of failures there on r280710:17
axw"no reachable servers"10:18
voidspaceaxw: :-/10:28
voidspaceaxw: configuring my vm to try it10:28
voidspace215mb of updates...10:31
menn0hi all10:35
voidspacemenn0: morning :-)10:36
voidspacemenn0: howsit?10:37
menn0voidspace: alright10:37
menn0voidspace: how are you?10:37
menn0voidspace: we had a bit of household chaos here this afternoon so I'm catching up now. have one big email to send to #juju-dev today. I'm off until Tuesday.10:37
voidspacemenn0: ah, fun10:39
voidspacemenn0: I hope "household chaos" is good chaos10:39
menn0voidspace: not really, but all fine now10:39
voidspacemenn0: :-/10:41
voidspacewe're all good here, lots going on10:41
voidspacebetter a hectic life than a boring one though10:41
voidspacetrying to reproduce precise bugs at the moment10:42
menn0voidspace: I think there's a balance :)10:42
menn0voidspace: yeah I heard about that problem10:42
menn0voidspace: tricky to reproduce?10:42
voidspacemenn0: so far10:43
voidspacemenn0: I'm just updating and configuring a precise vm to see if I can reproduce10:43
voidspaceaxw has failed so far10:43
=== Ursinha is now known as Ursinha-afk
=== thumper-afk is now known as thumper
menn0thumper: hi again :)10:56
thumpero/10:56
alexisbcmars, fwereade: joining us?11:01
natefinchahhhh stupid hangouts keeps crashing11:03
voidspacenatefinch: morning11:11
natefinchvoidspace: morning11:18
=== Ursinha-afk is now known as Ursinha
voidspaceso if I try to bootstrap with the local provider on precise it tells me that juju-local is required11:51
voidspacebut juju-local is also unavailable for precise11:51
natefinchahh hrm11:51
voidspacedo I need to add a ppa?11:51
voidspacelooking11:51
voidspacenatefinch: "Due to needing newer versions of LXC the local provider does require a newer kernel than the released version of 12.04."11:53
voidspaceTherefore we install Linux 3.8 from the LTS Hardware Enablement Stack:11:53
voidspacenatefinch: I've added ppa:juju/stable and juju-local is now available11:55
voidspacelooks like I need to upgrade the kernel too11:55
axwvoidspace: I used cloud-archive:tools11:56
voidspaceaxw: is there a difference?11:56
voidspaceI guess "stable" is likely to be out of date11:57
axwI mean to get the newer lxc11:57
voidspaceah11:57
voidspacehmmm11:57
axwhm, I guess you got an older 12.04, I probably got 12.04.0311:57
voidspaceI did a full update11:57
axwok I dunno11:58
voidspaceaxw: those quotes were from the docs, not an error message11:58
voidspacehttps://juju.ubuntu.com/docs/config-LXC.html11:58
voidspaceaxw: I might try without the new kernel first11:59
voidspacemaybe it will fail in the same way...11:59
mgzvoidspace: `sudo apt-add-repository cloud-archive:tools` if you've not11:59
voidspacealthough Curtis is pretty switched on, so I doubt that's the problem11:59
voidspacemgz: ok11:59
voidspacemgz: you sound like you know what you're talking about :-)12:00
mgzworth checking your kernel version too, by default upgrades may not give you a newer kernel12:00
* axw disappears12:00
voidspaceaxw: o/12:00
mgznight axw12:00
voidspacemgz: they're unlikely too12:00
voidspace*to12:00
voidspacemgz: would you reccommend I remove the juju/stable ppa?12:01
mgzif you're not trying to use the *client* we have released on that machine, yes12:02
vladkjam. dimitern: what is your way to keep go packages up to date?12:02
vladk'go get -u ./...' damages my working juju-core, so I wrote a script http://pastebin.ubuntu.com/7543496/12:02
mgzvladk: yeah, go get is dangerous12:02
jamvladk: I generally run just "godeps -u dependencies.tsv" and then go update the ones that are out of date12:03
jamyou can just "go get -u github.com/juju/errors/…" for example12:03
mgzvladk: ^that's what I do too12:03
voidspacemgz: I'm trying to use trunk, thanks12:03
mgzwell, I don't use go get at all, I pushd to the branch and git pull or whatever12:03
jammgz: sure, I've done that as well, depends on my mood, I guess12:04
mgzjam: and yeah, I do use go get as well, if say we've added a new dep with its own deps12:05
voidspaceok, installing new kernel12:05
voidspaceso lunch12:05
vladkvladk: jam, mgz: I want to update all of packages12:06
dimiternvladk, that's a handy script, thanks12:14
wwitzel3hello12:14
voidspacewwitzel3: morning12:15
voidspaceso, juju bootstrap on precise, with trunk, seems to work fine for me12:15
wwitzel3so after not sleeping more than 5 hours the last 3 days, I finally zonked out and managed to sleep 10 hours.12:15
vladkdimitern: use with care, not fully tested, I'm not sure about pull options12:15
wwitzel3feels good, like I'm sane again :)12:15
voidspacegoing on lunch12:15
voidspacewill dig deeper after that12:15
thumpernight folks12:19
dimiternvladk, sure, i'll give it a try12:20
voidspacewwitzel3: that's good news, welcome back to the land of the living12:21
wwitzel3voidspace: thanks, enjoy lunch12:22
alexisbcmars, hazmat, fwereade: omnibus review13:03
perrito666good sort of morning13:05
mgzsort of morning?13:08
perrito666mgz: I usually start around or before 7AM now its 1013:09
mgzsinfully late13:11
wwitzel3perrito666: it is a trend today, I didn't get on until just after 8 and I even went to bed right after the meeting last night.13:45
perrito666wwitzel3: I did too, it was like midnight when the meeting ended, but this AM I just spent 2.5hs in a queue trying to do some bureaucracy and then an extra half an hour having to exit and re enter the city because the path to go trough the center was blocked by a cluster of strike protests13:47
wwitzel3that sounds less fun than sleeping13:48
perrito666yep13:48
wwitzel3fwereade: ping13:48
fwereadewwitzel3, pong, listening, but in meetings, so responding slowly13:48
wwitzel3fwereade: np, I was pretty dense yesterday and I don't think I retained the full value of our earlier conversation.13:50
wwitzel3fwereade: looking at the presence code, I'm not seeing us actually use WaitAgentPresence anywhere. We define it and have tests.13:51
wwitzel3fwereade: I'm wondering if we should just be using that with or instead of SetAgentPresence in the Pinger.13:51
fwereadewwitzel3, not quite following -- I know we don't use WaitAgentPresence except in tests, though, but I don't get the larger thread13:52
wwitzel3fwereade: part of the problem is I'm still cloudy on the "Why" SetAgentPresence doesn't think the agent is there when it is called the first time.13:53
fwereadewwitzel3, I *think* it's because it uses "2 consecutive pings" as the "yep, it's there" condition13:53
fwereadewwitzel3, but please validate that against reality13:54
fwereadewwitzel3, (ie if you've only had one ping it's not yet considered presence)13:54
natefinchWow, I just realized the Juju Core Team meeting was last night not tonight.  Stupid time zones making my Thursday meeting on Wednesday :/13:58
perrito666yup, do we have stdup today?13:59
voidspacehah13:59
perrito666I just set up an alarm for the day before, so I know in advance when that meeting is13:59
natefinchI had skipped thursdays, because we used to have the juju core meeting before it, but now that the juju core meeting is moving, I think I need to reinstate the thursday standup.  Short answer: yes14:00
wwitzel3fwereade: I'm not seeing the two pings, following the trail from api status -> machine.AgentPresence -> presence.Alive which which fires a watcher.sendReq for the machine key and we select over the result and return bool,err back up the stack.14:00
wwitzel3fwereade: I can make the problem with a long enough wait and recalling SetAgentPresence, but that isn't a legitimate fix and I am still failing to really grok the problem in the first place.14:02
natefinchwwitzel3, voidspace: standup?14:03
wwitzel3natefinch: oops, sorry14:03
natefinchwwitzel3: it's ok, it wasn't on the calendar for today until now14:03
=== dannf` is now known as dannf
dimiternfwereade, natefinch, mgz, I'd love a review on this networks constraints CL https://codereview.appspot.com/10283004414:19
dimiternwow! LP now supports inline comments on MP diffs! \o/14:20
voidspacewow14:20
dimiternis it too late now to not switch to github? :D14:20
wwitzel3dimitern: hah14:21
natefinchhaha14:23
natefinchfwereade: did you and Ian figure out if we should use --replset in tests?14:24
fwereadewwitzel3, ok, I may be wrong there: is it just the case that the first ping is not landing quickly enough to be seen?14:24
fwereadenatefinch, essentially yes14:25
fwereadenatefinch, for the tests that *by their fundamental nature* require mongo, we should be using --replset, because those really are integration tests and we should mimic a real environment as closely as possible14:26
fwereadenatefinch, but we have many tests that only coincidentally require mongo, and in those cases --replset is not required, because we should be aiming to make those tests unitier anyway -- to the point where they don't depend on mongo14:27
fwereadenatefinch, in particular replset clearly needs a real mongo, and almost certainly peergrouper too; and very probably state14:28
fwereadenatefinch, other test that merely happen to use state should be migrating away from the mongo dependency anyway, and so the loss of --replset is not a big deal14:29
fwereadenatefinch, how upsetting is this from your perspective?14:29
voidspacesinzui: ping14:30
sinzuihi voidspace14:30
voidspacesinzui: ah, actually ping for five minutes14:30
natefinchfwereade: it seems very squishy.  Deciding if a test "really" needs mongo is non-trivial.14:30
voidspaceI assumed you'd be slower :-)14:30
fwereadenatefinch, well, state/presence and state/watcher are the other two definite ones14:31
natefinchfwereade: btw are you on the cross team meeting, or should I jump on?14:31
fwereadenatefinch, but generally anything we *could* back with a double for state.State is IMO a candidate14:31
fwereadenatefinch, I'm not, alexis is; your presence couldn't hurt though :)14:32
natefinchheh ok14:32
wwitzel3fwereade: thank you, I think you've given me an epiphany14:36
voidspaceI've been asked to speak at PyCon India14:56
voidspaceA good opportunity to promote juju14:56
voidspaceHave to work on a snappy demo14:56
natefinchCool14:57
perrito666voidspace: sweet15:00
perrito666voidspace: you can try the one from LAS15:00
bodie_fwereade, did you get a chance to check out my MR?15:00
voidspaceperrito666: Las Vegas?15:01
voidspacethat was pretty IBM centric15:01
bodie_I'm looking for direction to either dig deeper on the gojsonschema to add (id) references, or to move forward towards state and param validate15:01
voidspacesomething equally impressive though I hope15:01
perrito666voidspace: yes, but nevertheless pretty15:01
voidspaceyep15:01
voidspacesomething python related would be good15:01
perrito666voidspace: some of the material used on the os demo, minus the lego part15:02
voidspaceI'll talk to the online services guys as they're charming up their infrastructure15:02
mgzbodie_: I'm on it15:02
voidspacedeploying and updating a django app would be good15:02
voidspaceand scaling out15:02
dimiternfwereade, mgz, natefinch, a gentle reminder about https://codereview.appspot.com/102830044/15:02
bloodearnestvoidspace: oi! that's my planned demo for PyConUK :D15:02
voidspacebloodearnest: awesome, I can use yours15:03
mgzdimitern: I'm not wild about that syntax...15:03
voidspaceoops, I mean "we can work on it together"...15:03
dimiternmgz, it's decided from above15:03
perrito666voidspace: sure you meant that :p15:03
mgzdimitern: code seems fine so far15:03
voidspace:-)15:03
dimiternmgz, I'll wait for jam and/or fwereade  to take a look as well, because i'm not sure about a few bits, but any comments are welcome15:04
perrito666voidspace: that is cool, I only get invited to pycons I cant afford at times I cant travel :p15:04
bloodearnestvoidspace: when is pycon india?15:05
voidspaceperrito666: right, thankfully they're covering the costs or I wouldn't be able to afford it either15:05
voidspacebloodearnest: end of September15:05
voidspaceso after PyCon UK I think15:05
bloodearnestkk15:05
bloodearnestvoidspace: so we should do a joint talk proposal for pyconuk then :)15:05
bodie_thanks mgz, nothing too fancy really.  just got your changes in to the github repo (all tests are green) but need to make a decision about gojsonschema itself15:06
voidspacebloodearnest: heh, yeah - sounds good15:07
bodie_fwereade indicated interest in getting it MR'd as such even if it's not a "real" merge request, just to get visibility15:07
sinzuivoidspace, http://pastebin.ubuntu.com/7544599/15:07
voidspacesinzui: looking, thanks15:08
sinzuivoidspace, I asked abentley to join us to discuss what the test is doing bad15:08
voidspacesinzui: so that worked15:09
voidspacesinzui: ok15:10
voidspacesinzui: although revision 2802 on master worked15:10
voidspaceso *something* changed15:10
voidspaceabentley: hello15:10
abentleyvoidspace: Hi.15:10
sinzuivoidspace, yes, but the only thing I think changed is that I renamed the test to from local-deploy to loca-deploy-precise-amd6415:11
voidspaceheh15:11
voidspaceit was failing deterministically before that15:12
sinzuiabentley, voidspace I can try to restore the test name15:12
voidspacethat *really* shouldn't make any difference15:13
sinzuioh but ci is still running15:13
sinzuiI can copy the test to the old name15:13
sinzuioh, voidspace, I haven't run upgrade yet. I will do that to get the new lxc15:13
voidspacesinzui: so the initial manual bootstrap works, but we think that re-bootstrapping from the generated .jenv file doesn't?15:13
abentleysinzui: Are you re-bootstrapping from old jenvs?15:14
sinzuiabentley, voidspace, the env name and the pregenerated jenv are the difference15:14
voidspaceor by "generated jenv file", do you mean your pre-canned one?15:14
sinzuiabentley, I used true local with a jenv15:14
sinzuiabentley, I used true local withOUT a jenv15:15
voidspacecan I get a copy of the failing jenv file?15:16
abentleysinzui: And you used an old jenv for testing local-deploy-precise-amd64?15:16
abentleyvoidspace: We don't have a pre-canned jenv.15:17
voidspaceI can't see it in the workspace to get at it15:17
sinzuivoidspace, abentley. It is generated. not pre-canned. We let juju make the jenv file. We update the version in it to ensure juju does what we and enterprises mean15:17
voidspaceah, I see15:17
mgzbodie_: see comments on review, one thing needs fixing and some other comments, then lets land15:17
sinzuivoidspace, we tell users to share jenvs. we are15:17
bodie_cool15:17
abentleysinzui: We leave the .jenv entirely untouched.  It's the yaml that we tweak.15:17
sinzuiI am tempted to do the lxc upgrade, then ask jenkins to run the test as usual15:18
voidspacesinzui: ok15:19
bodie_mgz, I agree about pulling out the yaml -- is there a place in the repo where test files could go?  there will be a charm actions yaml loader tested separately as part of dir (I think it was)15:19
voidspacecan I get at the CI scripts? I'm reading the logs, but it looks like a lot of the work is in deploy_job.py15:20
mgzbodie_: it would be an improvement to just have them as top level variables so that's easy later, splits the test logic a bit but easier to pull apart later15:20
mgzvoidspace: the branches should be public15:21
voidspacemgz: ok15:21
mgzvoidspace: bzr branch lp:juju-ci-tools15:21
voidspaceyep, just found it :-)15:21
voidspacemgz: thanks15:22
bodie_mgz, I moved them to local scope due to fwereade's comments here: https://codereview.appspot.com/94540044/diff/1/charm/actions_test.go#newcode2115:23
mgzbodie_: lets not go back and forth on that then :)15:24
abentleyvoidspace: Every juju action is dumped to stdout so you should be able to reproduce the script actions from the log output.15:24
sinzuiabentley, voidspace jenkins failed again after the update15:24
bodie_there's probably a case to be made for either approach.  I'm personally kind of a fan of the way the gojsonschema tests work with external files, but in this case it's not really testing the schema as much as the YAML reader, which is simple enough15:25
sinzuioh, I forgot the mem constraint15:25
* sinzui run manually with the constraint15:25
voidspacecannot initiate replica set15:25
voidspaceso it is the problem with mongo15:25
voidspaceand just as mysterious as last time we saw it apparently15:25
rogpeppefrankban: reviewed https://codereview.appspot.com/9270004415:25
bodie_okay, going to put my kid down for a nap, then into the salt mines with me!15:25
mgzlick lick?15:26
sinzuivoidspace, where any of these mongo warning relevant to the failure http://juju-ci.vapour.ws:8080/job/local-deploy-precise-amd64/1371/console15:27
frankbanrogpeppe: thanks15:27
bodie_mgz -- after I get these tweaks in shall I start digging towards State then?15:27
bodie_maybe start on a new branch to get dir and the loader landed15:28
mgzbodie_: yeah, I think so15:28
mgzwe'll make sure this lands first :)15:28
voidspacesinzui: unknown config field. Shouldn't be.15:29
voidspaceI'll look at the last successful build, see if those warnings are new.15:29
voidspacenope, those warning were there before15:30
sinzuivoidspace, the warning is from a vestigial environments.yaml. I think I can remove it now, juju 1.18 doesn't need it. 1.16 did15:30
sinzuivoidspace, abentley maybe a memory issue...this is the failure from my manual run. I recalled the good bootstrap command from bash history, then appended the mem=2G http://pastebin.ubuntu.com/7544723/15:33
voidspaceI'll try that locally15:34
voidspaceI didn't use the memory constraint15:34
voidspacealthough my VM only has 1G!15:35
sinzuimachine has lots of memory15:35
abentleysinzui: Hmm.  I wouldn't have thought that had an effect.  Especially since mongo runs outside the lxc.15:35
* sinzui tries again without mem=2G15:35
sinzuiabentley, agreed15:35
voidspacenope, works15:36
voidspacefor me15:36
voidspaceif we can't figure out the difference we'll have to back out the replica set change15:36
sinzuiabentley, I believe 1G should be adequate for our testing on lxc anyway15:36
voidspaceI'm looking up that specific failure (cannot initiate replica set)15:36
voidspacenatefinch: ^^^15:37
voidspacenatefinch: the precise failure is consistent when run as a CI job15:37
voidspacenatefinch: although effectively the same command run on the CI machine succeeds15:37
voidspacenatefinch: the specific failure is "cannot initiate replica set"15:37
voidspacenatefinch: so the replica set is the problem, although it's not obvious why15:38
natefinchmongo logs probably have a better message.15:38
voidspacethat error implies that we have a mongo started *without a replica set* and then tried to add a replica set15:39
voidspaceor we tried to add a non-empty mongo to a replica set15:39
natefinchit's the initiation which has to happen after it starts15:40
voidspacebut we start mongo with the replset argument15:40
natefinchthat's not initiation15:40
voidspacenope, but initiation will fail if the db isn't empty15:41
sinzuivoidspace, abentley I bootstrapped again manually *without* the mem constraint and it failed. This is the relevant errors: http://pastebin.ubuntu.com/7544771/15:41
perrito666voidspace: you are missing a step there?15:41
voidspacenatefinch: https://jira.mongodb.org/browse/SERVER-629415:41
natefinchvoidspace: I don'tb think that's true.15:41
voidspacenatefinch: that's the closest I could find to a reference15:42
voidspacenatefinch: it's local.* that needs to be empty15:42
voidspaceperrito666: I'm sure I'm missing lots of step15:42
natefinchvoidspace: ahh, yeah... I don't think that's the problem15:42
natefinchusually it's that mongo can't resolve the address that you gave it during initiate, or you don't have access to the admin database15:44
voidspacerebootstrapping from an existing jenv worked for me15:44
voidspacenatefinch: should I back out the change to unblock CI?15:46
voidspacenatefinch: without a way to repro it's going to be hard to re-introduce though15:46
natefinchwhat's the version of mongo on ci vs your vm?15:47
voidspacesinzui: can you check the mongo version on the CI machine for me please15:48
voidspacenatefinch: I'm using 2.4.6 it looks like15:48
sinzuivoidspace,  Installed: 1:2.4.6-0ubuntu5~ubuntu12.04.1~juju115:48
voidspacesinzui: thanks15:49
voidspacenatefinch: so looks like the same15:50
natefinchI really don't want to revert a change that seems to work correctly on all machines except CI :/15:51
natefinchespecially without understanding why15:51
natefinchmy guess is that the address we're putting into the replicaset information in mongo is somehow not resolvable15:56
perrito666voidspace: run that rs.config by hand by connecting with the client15:56
perrito666you might get something more useful that failed out of it15:57
voidspaceperrito666: the only place it fails is on the CI machine which I don't have direct access to15:57
voidspaceperrito666: what specific command are you suggesting, we can ask sinzui or abentley to run it15:57
perrito666voidspace: line 5 of http://pastebin.ubuntu.com/7544771/15:58
perrito666rs.initiate(daconfig) iirc15:58
voidspaceso, attempt to manually re-initiate? From my hunting it looks like that error message we get is the full mongo error.16:01
natefinchyeah, all you really need is { members: [ { host: "10.0.3.1:37019" } ] }16:02
voidspaceit's odd that  we're using a 10.0 address in that call to replicaSet.Config16:02
natefinchyeah16:02
voidspace2014-05-29 15:21:41 DEBUG juju.worker.peergrouper initiate.go:34 Initiating mongo replicaset; dialInfo &mgo.DialInfo{Addrs:[]string{"127.0.0.1:37019"},16:02
voidspaceFollowed by:16:03
voidspace2014-05-29 15:21:42 INFO juju.replicaset replicaset.go:52 Initiating replicaset with config replicaset.Config{Name:"juju", Version:1, Members:[]replicaset.Member{replicaset.Member{Id:1, Address:"10.0.3.1:37019", Arbiter:(*bool)(nil), BuildIndexes:(*bool)(nil), Hidden:(*bool)(nil), Priority:(*float64)(nil), Tags:map[string]string{"juju-machine-id":"0"}, SlaveDelay:(*time.Duration)(nil), Votes:(*int)(nil)}}}16:03
natefinchyeah, you have to dial using localhost in order to get mongo to let you call initiate16:04
voidspaceI'm checking what address we use when it succeeds on my machine16:04
wwitzel3grabbing some food16:04
voidspaceah, except I'm only seeing INFO not debug here16:05
natefinchrun with --debug16:05
voidspacethanks16:05
voidspaceI see *no* mongo related output16:07
natefinchvoidspace: oh, right, you don't actually get the output, you have to look at the logs under $HOME/.juju/local/log16:10
voidspacenatefinch: my successful run uses 10.0 addresses too16:11
natefinchmaybe it's just the CI machine can't connect to that IP/port16:12
natefinchalthough I don't know why it would be different for precise and trusty16:12
voidspacenatefinch: I'm pretty sure that "local.oplog.rs is not empty" error is coming back from mongo16:12
voidspacenor why it would be different on *some* precise machines16:13
natefinchmaybe the CI machine already has the database populated in a way that a normal machine would not?16:14
voidspaceI'm grabbing coffee16:14
perrito666uh, cffee, good idea16:24
mgzeven better with an o16:24
=== revagomes_ is now known as revagomes
rogpeppeanyone know what our convention is for landing branches in github.com/juju ?16:36
rogpeppei want to submit this PR: https://github.com/juju/testing/pull/616:36
sinzuinatefinch, voidspace there are no other mongos running on ci. I did check that because I found that had happened before16:38
voidspaceright16:38
sinzuibut maybe there is config left behind?16:39
voidspaceI wonder if somehow artifacts are persisting between test runs on *that* mongo16:39
voidspacenatefinch: perrito666: is there some step we can run at the beginning of CI to ensure the database is clean and there is no config / other artefacts left around?16:41
rogpeppein fact, have we got any CI set up on the github repos?16:42
voidspacethe failure indicates to me  that we're trying to initiate a non-clean repo16:42
voidspacerogpeppe: no idea. I know that's not helpful, but I'm not ignoring you :-)16:42
rogpeppevoidspace: thanks16:42
natefinchvoidspace: if mongo's not running, you can just delete and recreate the folder that we use for mongo16:42
natefinchrick_h_: what's the process for landing stuff on github?16:43
perrito666natefinch: +1 restore does just that16:43
natefinchrogpeppe: I don't think we have CI on github right now (at least for the juju-core stuff)16:44
rogpeppenatefinch: ok, ta. i'll just rebase and push it then.16:44
mgznatefinch: what stuff?16:44
rogpeppemgz: github.com/juju/...16:44
mgzall the little bits?16:44
mgzyeah, that's all botless16:45
rogpeppemgz: yeah16:45
rogpeppemgz: ok, thanks16:45
natefinchwe should fix that16:45
natefinchespecially since we're moving more and more stuff into its own repo16:45
rogpeppemgz: pity we've lost that, but i'm guessing sinzui has plans for reinstating it16:45
mgzit's covered as part of juju-core16:45
rogpeppemgz: it's going to be part of other pieces too16:46
mgzonce you start depending on a broken rev, core will refuse the dep bump16:46
rogpeppemgz: juju-core CI runs the github.com/juju tests ?16:46
mgzthat still leaves go get etc borked as we saw yesterday16:46
sinzuimy ideal bot wil do the squashing for us so that we don't need to worry that we loose conversations when commits are removed16:46
rogpeppesinzui: my plan is to rebase-squash only at submit time16:47
rogpeppesinzui: but i have a feeling that violates the "don't rebase after publishing" rule16:47
* rogpeppe misses rietveldt already16:48
sinzuiIt does and github will delete conversations linked to the revisions16:48
rogpeppesinzui: so is there any way we can a) keep the conversations and b) keep the revision history coherent ?16:48
mgzrogpeppe: squash on merge would16:48
rogpeppemgz: that's what i was suggesting, i think16:49
sinzuirogpeppe, I see that homebrew is now making their own swashed pull request for each pull request I make. My conversation and commits are maintained, but they do not show up as merged.16:49
mgzsinzui: yeah, that's the upshot16:49
mgzno pull requests are ever really merged16:50
rogpeppeyeah, i can see that's the case. i can live with that, i think16:50
rogpeppejust so long as i can get from the revision history to the conversations, i think it's all ok16:50
sinzuirogpeppe, I think the bot can merge the approve branch, test, squash, commit, then add a comment naming the replacement commit when it closes the original pull request16:51
rogpeppesinzui: i guess we'll need a convention to allow the bot to choose an appropriate commit message.16:51
sinzuiyep16:51
rogpeppesinzui: most recent commit (by, erm, some measure of "recent") with some keyword in the message might work16:52
sinzui+116:52
natefinchquestion..... do we really need to squash?16:54
natefinchSo like... yes, roger's PR has 4 revisions and if you don't squash, those 4 revisions all go on main...... who cares?16:55
mgznatefinch: not nessersarily, especially if everyone gets in the habbit of rebasing neatly before proposing16:55
rogpeppenatefinch: yes, i care16:55
natefinchmgz: sure16:55
mgznatefinch: mostly hurts with lots of small review comment fixes16:55
voidspacenatefinch: so the mongo directory is defined as agentConfig.DataDir() + '/db'16:55
voidspacenatefinch: where is the default location16:56
rogpeppenatefinch: sometimes i'll commit hundreds of times before proposing16:56
rogpeppenatefinch: with minute changes16:56
voidspace"/var/lib/juju"?16:56
rogpeppenatefinch: i don't want all of those commits to end up cluttering the main log16:56
natefinchvoidspace: I think so, yeah16:57
rogpeppevoidspace: /var/lib/juju/<agent-tag>16:57
voidspacerogpeppe: natefinch: between CI builds is it safe to delete /var/lib/juju altogether?16:57
natefinchvoidspace: it better be16:57
rogpeppevoidspace: it should be16:57
voidspacegood16:57
natefinchbrb16:57
rogpeppevoidspace: although CI shouldn't be touching /var/lib/juju at all16:58
voidspacesinzui: can you check if there's a /var/lib/juju on the CI machine - and preferably delete that at the start of the CI build16:58
rogpeppevoidspace: because CI may be running on a juju node16:58
rogpeppevoidspace: in fact, it probably will be16:58
rogpeppevoidspace: so that will kill the local juju agents, which is not a great thing16:58
voidspacerogpeppe: we're worried that db artefacts are what is causing bootstrap of local provider to fail *only* on the CI machine16:58
voidspacesinzui: hmmm... if jenkins is provisioned by juju then blowing the whole thing away is not a good idea16:59
voidspacewe just want to delete the part created by the CI run16:59
sinzuivoidspace, I was about to say I want to keep the machine and unit agents alive16:59
voidspaceheh16:59
* sinzui looks for cruft16:59
voidspaceprobably preferable16:59
rogpeppeit would be nice if CI never actually touched /usr/lib/juju17:00
sinzuivoidspace, /var/lib/juju is not contaminated.17:00
voidspacedamn17:01
voidspacesinzui: thanks17:01
=== andreas__ is now known as ahasenack
perrito666bbiab17:16
rogpeppeg'night all17:24
voidspacerogpeppe: g'night17:24
=== Ursinha is now known as Ursinha-afk
=== vladk is now known as vladk|offline
voidspaceI have to go, EOD17:46
voidspacenatefinch: so, we still don't have a resolution for this issue :-(17:46
voidspacewhich sucks majorly17:47
natefinchvoidspace: ug.... yeah, thanks for all your work on it17:47
voidspaceheh17:47
natefinchI think I might have some time to actually look into it... not that I currently have a precise VM, but I can make one17:47
voidspacecool17:47
voidspacelet me know of any progress you make17:47
voidspaceg'night all17:47
bodie_nite17:48
bodie_I'm not following why this is still showing a conflict in dependencies.tsv (all the way at the bottom)19:07
bodie_https://code.launchpad.net/~binary132/juju-core/charm-actions/+merge/21992619:07
bodie_oh, god.  did I commit it with merge comments still in it?  -_-19:08
mgzbodie_: you need to actually merge trunk I think19:08
bodie_that's what I thought I did, heh19:09
mgzthe last rev seems to only have one parent19:09
mgzjust `bzr merge co:trunk`, resolve, commit, push, should be fine19:10
bodie_alright, why would bzr merge lp:juju-core not work?19:12
bodie_doesn't that refer to trunk?19:12
perrito666how expensive is to iterate a slice?19:23
=== vladk|offline is now known as vladk
natefinchperrito666: O(n) :)19:28
wwitzel3yeah, plain old iteration should be linear19:29
perrito666natefinch: nobody likes a smartass :p19:30
natefinchperrito666: it's just like iterating over an array in C, with some bounds checking that makes it minutely slower.  If you're doing the for n, val := range slice {    version, then it copies each value, too, but using a for x := 0; x < len(slice); x++ {  there's no copying until you access an index of the slice (obviously)19:30
natefinchperrito666: heh19:30
wwitzel3lol19:30
perrito666natefinch: tx, that was the answer I was looking for19:30
perrito666:)19:31
natefinchperrito666: a slice is just a struct with a pointer to a backing array, the length of the current slice, and the capacity of the backing array.  Iterating over it is just like iterating over the backing array.19:31
perrito666I was curious about how much copying was range doing19:31
wwitzel3I'd just use the syntax that expresses the idea in a more clear fashion19:32
* perrito666 is not so happy with having to check if a string is in a slice19:32
natefinch90% of the complaints about Go are "I have to write this loop where in my other language, the loop is hidden from my view"19:33
perrito666natefinch: well, off course19:33
=== vladk is now known as vladk|offline
wwitzel3at the end of the day it is all just typing and loops19:33
perrito666natefinch: I think the issue is that almost everyone trying this knows python19:33
natefinchif x in foo:19:34
natefinchyeah I know19:34
perrito666wwitzel3: and if err != nil, dont forget if err != nil19:34
=== vladk|offline is now known as vladk
bodie_mgz, nope, bzr merge co:trunk didn't do it for me.  Not a branch: "/home/bodie/go/src/launchpad.net/juju-core/.bzr/branches/master/"19:36
bodie_er, that's when I tried to merge co:master because I got that error for trunk19:36
natefinchperrito666: yep19:36
bodie_sorry this is taking so long, I've been doing bzr gymnastics19:36
mgzbodie_: er, are you using the same branching scheme as me?19:36
bodie_poorly19:36
bodie_I'm using cobzr19:36
mgzokay, you're not19:36
mgzcobzr people, how do you address trunk?19:37
natefinchthere's too many different ways to do colocated branches in bzr (which is to say, there's two, and they both seem to have the same name)19:37
mgzwell, three19:37
mgzone was an actual bzr plugin that did the right things, and got superceeded by support in 2.619:37
mgzthen there's the weird go thing that doesn't play well with anything...19:38
natefinchI thought that's what cobzr was?19:38
natefinchoh19:38
natefinchI don't know that third thing19:38
bodie_okay, so what I need to do is really simple19:39
bodie_and I thought I already did it...19:39
bodie_but now I've erased and re-checked-out my repo, and I'm not certain it will be normal19:39
bodie_going in circles and driving myself nuts19:39
natefinchperrito666: you're welcome to write a utils package that hasa function that takes a slice of strings and a string and returns a boolean that says whether the string is in the slice.  then you could do like strslice.Contains(list, value)19:40
mgznatefinch: what do you call trunk with cobzr?19:40
perrito666natefinch: I am really thinking it although I am a bit suspicious about the fact that is not something that is already there and widely used, so I presume there must be a decent reason19:41
bodie_I think bzr merge lp:juju-core worked (I don't have any conflicts in my dependencies.tsv, in the file) but in Launchpad it shows conflicts19:41
natefinchmgz: uh.... I use the built in support.... I think?19:41
natefinchmgz: I have a branch called trunk19:41
mgzbodie_: yeah, that's fine too19:41
mgzbodie_: what does `bzr status` say?19:41
natefinchmgz: I just use bzr switch -b foo to make a new colocated branch....  I think that's the built-in support, not cobzr, right?19:41
mgznatefinch: can be either..19:42
natefinchlol19:42
mgzthe actual naming is what different (and confusing), which is what you need for merge19:42
perrito666natefinch: that depends on what does your bzr19:42
perrito666mgz: I have to point to the place where my bzr branches actually live with the full path19:43
mgzperrito666: you use tim's method, right?19:43
bodie_there's a conflict in deps19:43
perrito666mgz: I... am not sure19:43
perrito666I am using A method19:43
perrito666which might be tim's19:43
bodie_mgz, I merged dependencies.tsv, fixed the conflict, tried to commit, ran bzr resolve dependencies.tsv, committed, pushed, erased the core repo, go get'd juju-core, bzr branch charm-actions, bzr switch charm-actions, bzr pull --overwrite lp:~binary132/juju-core/charm-actions, lastly bzr merge lp:juju-core/dependencies.tsv19:46
* mgz blinks19:46
bodie_heh19:46
mgzokay, your problem19:47
mgzyou merge just the branch19:47
mgznot a file *in* the branch, that's a cherrypick19:47
mgzyou *want* the actual revisions to resolve the conflict, not just the file contents19:47
mgzbzr merge lp:juju-core <- what you want19:48
bodie_I don't understand why since all I'm trying to do is grab the differences in that file that will cause issues and tweak it to match trunk plus my addition19:48
bodie_so you're saying grab all of trunk just to make sure everything is shipshape before I land the branch?19:48
perrito666bodie_: you are trying to git your bzr19:49
bodie_:'(19:49
mgzbecause with a cherrypick, you still have a split history19:49
mgzand the launchpad merge resolution plays it safe19:49
mgzif there's not a clean history merge, it throws it back for a real person to resolve19:49
bodie_so I have to merge the whole trunk in order to merge a single file?19:50
bodie_that doesn't seem sensible19:50
mgzyou're not merging a single file19:50
mgzeven git doesn't work like that, it's not cvs19:50
bodie_hrm19:51
mgzyou can do the merge in other ways to make launchpad happy, but just merging trunk as a whole is fine19:52
mgz(you can rebase all your changes onto trunk if you like)19:52
mgz(and push --overwrite the branch)19:53
bodie_I doubt it'll conflict since my stuff doesn't touch other places19:53
bodie_but how would I rebase my changes onto trunk?19:54
mgzeg, `bzr switch trunk && bzr switch feature_redux && bzr merge -rancestor:trunk..branch:feature && bzr commit` or similar19:55
mgzusing the rewrite plugin means you can keep your individual revisions if you like19:56
mgz-b on the second switch, the the revspec may not be quite right19:56
mgzthen you bzr push --overwrite <whereever remote feature branch is>19:57
bodie_I see19:58
bodie_I think I'm gonna stick to the basics for the time being19:59
bodie_still having enough trouble with bzr, heh19:59
bodie_once I've merged trunk then I simply need to commit to finish the job, right?20:00
bodie_I've edited the conflicts out and bzr resolved them20:00
bodie_Okay, I committed it, and pushed up to my branch, and it still appears to have conflicts, which I expressly fixed20:07
bodie_so either Launchpad is lagging, or I'm going insane, or both20:07
bodie_okay, it was just lagging.  thank god20:07
perrito666bodie_: you might still be going insane20:11
bodie_haha, for sure20:11
bodie_mgz, I'm looking at the other comment now -- I think this may actually be a more significant problem than it appears20:11
bodie_or --20:11
bodie_yeah, I don't think we're hitting it.  that's supposed to be for schemas that don't adhere to the spec for JSON-Schema20:12
bodie_which are supposed to be caught by gojsonschema20:12
natefinchperrito666: btw, next on our plate is doing backup and restore the right way.  WIth the schema upgrades stuff getting taken over by Tim's team, we'll be working on that pretty soon.20:14
perrito666natefinch: sweet20:15
perrito666with luck we will be able to do that before it breaks again20:15
natefinchhaha20:17
bodie_oh, mgz I recall why we're not testing that error -- william thought we shouldn't test gojsonschema in our tests20:23
bodie_I'll add a couple of edge cases20:23
mgzbodie_: I'm a little less worried about the coverage than I am the error being bogus, but it should be easy enough to do something there20:23
bodie_hm?  I'm not following20:24
mgzthe error in the branch has two fmt operators and one arg given20:24
bodie_ah20:24
bodie_gotcha20:24
bodie_why would that not build?20:24
bodie_I fixed that, thought you meant something different20:25
mgzit does build, it just is pretty bogus20:25
mgzyou get some junk in the error string20:25
bodie_oh, since it's a formatting string it's at runtime20:26
bodie_I see20:26
bodie_I meant why would that build20:26
bodie_thanks :)20:26
bodie_mgz, if you're still waiting for my branch to come in, it's because I may have found an error with gojsonreference20:49
bodie_getting a nil exception in my new test20:49
mgzbodie_: urk?20:50
natefinchthat feeling when you accidentally reboot your laptop instead of the VM running on it20:53
natefinchEOD anyway20:55
mgznatefinch: oh yeah...20:55
natefinchnight all20:55
mgzhave a good evening20:55
waiganimorning all21:03
perrito666waigani: sure, morning, why not21:05
waiganihehe21:05
waiganifwereade: are you still awake?21:13
=== vladk is now known as vladk|offline
fwereadewaigani, heyhey21:27
waiganifwereade: hello!21:27
fwereadewaigani, how's it going?21:27
waiganifwereade: I'm stumbling my way into understanding client/server api cmd21:27
waiganifwereade: what do you mean by bulk api call?21:28
waiganifwereade: I checked the api.txt docs, but couldn't see anything21:28
fwereadewaigani, I mean taking an array of args, and returning an array of results21:28
waiganiah okay, that's all it means?21:29
fwereadewaigani, pretty much, yeah21:29
waiganiand what I did was not good because it had no args?21:29
fwereadewaigani, it's inconvenient in some respects but not having it is more inconvenient21:29
* fwereade looks at api.txt, and adds it to the list of things to fix21:29
waiganifwereade: maybe if you elucidate your reasoning in api.txt, I'm happy to read that later21:30
fwereadewaigani, yeah, I'm worried I may have given offence, I was *seriously* pissed yesterday off to discover that horacio can't fix a bug he's working on cleanly because someone implemented *another* non-bulk call21:30
waiganiI'm not offended, I don't understand - that's all21:31
waiganifwereade: ^21:31
waigani_fwereade: why does having a cmd that calls an api without args an issue?21:32
waigani_i think my connection is having a spaz21:32
fwereadewaigani, the short version is: you can always call a bulk API with one arg, but you can't call a singular one with bulk args; and you have many more opportunities for optimizing bulk calls, that you just don't get if you have singular ones21:32
fwereadewaigani_, and the reason that no-args is bad is because it encodes the assumption that the result will always be the same for everyone everywhere21:33
waigani_fwereade: but couldn't that be the case?21:34
fwereadewaigani_, in the StateServerAddresses (or whatever it is) case, one might think "ehh, the set will always be the same, doesn't matter who's calling", right?21:34
fwereadewaigani_, but this is not true, because the actual address one might use to access machine X may depend on where you're calling it from21:34
fwereadewaigani_, if we're explicit about "what does the state server address list look like to machine-4?" we can accommodate that problem without having to change the API21:35
waigani_right21:36
waigani_so it's about allowing room to move in the  future21:36
fwereadewaigani_, and when we're, I dunno, provisioning a whole bunch of machines, it's much more efficient to say "what will the state servers look like for machines 5, 6, 7, 8,9,..."21:36
fwereadewaigani_, yeah: changing an API is a whole heap more hassle than changing an implementation21:37
waigani_so api calls should ALWAYS tag an args struct? Even if there are no args in the struct?21:37
fwereadewaigani_, the meta-point is that the assumption about common sets of state servers has a character to it that I have grown sensitive to because that sort of assumption seems to end up wrong *disturbingly* often21:37
fwereadewaigani_, I'm not sure there are any cases where there aren't any args: the closest I can come up with is getting environ info, because there's always one environ per conn21:38
fwereadewaigani_, that still doesn;t feel to me like enough of a unique snowflake to be worth breaking convention for21:39
waigani_okay I get it21:39
fwereadewaigani_, because I've also used apis in which singular/bulk are mixed apparently at random, and I'd really like us to be predictable :)21:39
fwereadewaigani_, (and when I have it usually seems that they have fallen prey to exactly that class of assumption, and had t ofix it later, and it always just looks embarrassing ;))21:40
waigani_fwereade: is there a way of ensuring args is always passed?21:40
fwereadewaigani_, heh, we probably could do something to our rpc package21:40
waigani_could save a lot of explaining ...21:41
fwereadewaigani_, but we're carrying the weight of the original client api, designed by rog, who doesn't believe in bulk api calls, and we're not ready to retire it all yet21:41
fwereadewaigani_, much though I may want to21:41
waigani_I'm missing something with your grudge about the state servers21:42
alexisbfwereade, what time is it for you?21:42
fwereadewaigani_, the specific bug was that we want state servers' api tasks to connect to the local api for preference21:42
fwereadealexisb, eh, 11:45, but cath went to bed early leaving me with 2 g&ts to drink, I have to entertain myself somehow21:43
waigani_lol21:43
waigani_by trying to drum some sense into us newbies!21:43
alexisbfwereade, hehe, fair enough21:44
fwereadewaigani_, it's much more sinister than that, I'm trying to turn you all into mental copies of me :)21:44
waigani_okay, keep trying please :)21:44
fwereadewaigani_, the first cut at the bug was a bit of a hack -- it was looking up the state servers in the agent config, grabbingone of them for the port number, and replacing the list with localhost:port21:45
fwereadewaigani_, and so I said "eww!" and started thinking how we could do better21:45
fwereadewaigani_, and to be fair it's not entirely easy to do better21:45
fwereadewaigani_, it's not smart to keep the other api servers secret and *always* just write localhost, because we want to remain open to machines being demoted but still coming back into the fold as viable deployment targets21:46
fwereadewaigani_, so we do indeed want to store the complete set of state servers21:47
waigani_I assumed that is what so I would assumed StateServerAddresses would return21:47
waigani_the complete set of state servers21:47
waigani_ugh, let me type that again21:48
waigani_I assumed that is what StateServerAddresses would return21:48
fwereadewaigani_, right -- but the best set of addresses for machine 2 to know about is not "m0.dns, m1.dns, m2.dns"21:48
fwereadewaigani_, it's "m0.dns, m1.dns, *localhost*"21:49
fwereadewaigani_, but you can only return tailored results like this if you know who's asking21:50
waigani_seems like two different functions to me21:50
fwereadewaigani_, think broader21:50
fwereadewaigani_, the address yu use to hit a particular machine depends on your own location21:51
fwereadewaigani_, this is a very narrow example, but the general problem is much broader21:51
fwereadewaigani_, think of state servers spread across a manual environment21:51
waigani_okay21:52
fwereadewaigani_, 10.x addresses may or may not be valid, depending on where you're connecting from21:52
waigani_one set of state servers per environ?21:52
waigani_ha21:52
fwereadewaigani_, the same 10.x address might refer to entirely different machines, according to two different clients21:52
waigani_yep, of course21:52
waigani_I'm stuck in web world where everything has a public IP21:53
fwereadewaigani_, yeah, I've had a bit of difficulty adjusting myself21:53
fwereadewaigani_, remember when computers never talked to one another at all? life was so easy :)21:53
waigani_private networks make the story  much more interesting21:53
waigani_lol21:54
fwereadewaigani_, anyway, this is essentially anecdotal, but it's a case in which being explicit about the intended context of the result would have made life a lot easier for us, because it would have been a pure api-side fix21:55
waigani_okay cool so, the result of StateServerAddresses is always relative to the agent calling it, and that agent needs to be passed in as an arg21:55
waigani_or an identifier for the agent i should say21:55
fwereadewaigani_, and once you're being explicit about the agent who's interested, you may as well implement the bulk call for the reasons discussed above21:55
fwereadewaigani_, yeah21:55
waigani_sweet I think I get it :)21:56
waigani_time for a quick question about my branch?21:56
fwereadewaigani_, ofc, it is a matter of certainty that there will be some APIs for which my insistence on bulk never does us a shred of good, and they really are only ever called with a single arg, and that arg always matches the authenticated entity21:56
fwereadewaigani_, but I think the costs are worth bearing when weighed against the costs of the alternative ;)21:57
waigani_yep, like my bogus CurrentUserInfo21:57
waigani_Why not just enforce args?21:58
waigani_ensure that a struct is always passed, even if empty?21:58
waigani_ohh because of backwards compatibility21:58
fwereadewaigani_, mainly hysterical raisins -- I'm not confident that we've ever been entirely without APIs-that-make-me-grumpy21:59
fwereadewaigani_, if we can get to the point where we can, I will be happy, but we *do* have to carry the 1.18 api forever21:59
fwereadewaigani_, well, 5 years, which is approximately equal to forever21:59
waigani_oh21:59
waigani_yeah true21:59
waigani_well, at least get this in the docs22:00
fwereadewaigani_, anyway, yes, let's talk about your branch -- can I take 5 for a ciggie first please?22:00
waigani_of course (and another g&t, makes things much more fun)22:01
fwereadewaigani_, yeah, there were plenty of ephemeral google docs around the time we were discussing it but the never made it into dev docs22:01
waigani_ping me when you're ready22:01
fwereadewaigani_, back :)22:06
waigani_fwereade: cool22:06
waigani_fwereade: I've got two questions22:07
waigani_one practical the other just for understanding22:07
thumpero/22:07
fwereadethumper, heyhye22:08
waigani_fwereade: how do you authorise the api calls?22:08
thumperfwereade: want to catch up hangout?22:08
thumperfwereade: I have some points around connect22:08
fwereadewaigani_, the facades get created with something that implements Authorizer, and you can ask that who's connected22:08
fwereadewaigani_, that's the primary mechanism for keeping inappropriate clients' dirty hands off apis they shouldn't have access to22:09
waigani_fwereade: cool I'll look into that, as I didn't want to expose UserInfo to just anyone22:09
fwereadethumper, shortly, yes please22:09
waigani_fwereade: second why have a client side api?22:09
waigani_fwereade: why can't clients just call and get results from the server api?22:10
fwereadewaigani_, I'm not quite sure what you're asking, but I think the answer is "because we're bad at naming things"22:10
waigani_right, yeah I'm not quite sure what I'm asking either22:10
fwereadewaigani_, the Client facade is implemented on the server, but it's so named because it's intended for the use fof clients22:11
waigani_I get that, but you were talking about machine 2 having access to the api on localhost?22:11
waigani_I don't understand that?22:11
fwereadewaigani_, if machine 2 is a state server, api clients on that machine should prefer to connect to the local api server rather than the remote one22:12
fwereade(s)22:12
waigani_oooh it's a state sever22:12
fwereadewaigani_, if you're not a state server you have no choice but to connect to a remote one22:12
fwereadewaigani_, sorry, yeah, that was the context that I never explicitly mentioned22:13
waigani_okay I'm done! Can I be a fly on the wall for the connect conversation?22:13
waigani_fwereade: thank you :)22:13
waigani_a little part of my brain feels a little less like me ;)22:13
* fwereade cackles cheerfully22:14
fwereadethumper, ready now, please invite waigani_ too22:14
thumperwaigani_: https://plus.google.com/hangouts/_/gwnzn2d4zfnezivhtfspwc2r3ma?hl=en22:15
thumperwaigani: did you want to do a standup? it is just the two of us22:55
bodie_fwereade, mgz, looks like there's a corner case in gojsonschema where a "$schema" key not at the document root causes a nil exception22:56
waiganithumper: okay22:56
waiganithumper: I'm in the channel22:56
waiganithumper: how can I check if --format is used?23:32
thumperwaigani: you can just check the formatter name23:33
waiganithumper: cool, got it thanks23:34

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