/srv/irclogs.ubuntu.com/2014/07/17/#juju-dev.txt

voidspacethis discovery explains a bunch more failures00:00
voidspaceso more progress00:00
wallyworldgreat :-)00:00
voidspacethanks, you've been a great rubber duck :-)00:00
wallyworldthat's me00:01
wallyworldsinzui: bug 1341589,  there's been a comment made that we did ship godeps source in 1.20 - i made the assertion that we didn't, and i think you didn't think we did either?00:01
_mup_Bug #1341589: Distribution tarball has licensing problems that prevent redistribution <juju-core:In Progress by wallyworld> <juju-core 1.20:In Progress by wallyworld> <https://launchpad.net/bugs/1341589>00:01
sinzuiwallyworld, oops, we didn't delete all of it00:10
sinzuiwallyworld, I will add that to my list of deletes.00:10
sinzuiwallyworld, actually do we agree that I should delete00:11
sinzuisrc/code.google.com/p/go.net/html/charset/testdata/00:11
sinzuisrc/github.com/binary132/gojsonschema/json_schema_test_suite00:11
wallyworldsinzui: nate is following up with the gojsonschema author to get the licensing sorted out for that. i think we can delete the html test data though00:18
wallyworldsinzui: the gojsonschema repo should be under juju as it was written on canonical time00:19
davecheneywallyworld: seconded00:19
davecheneyit seems foolish to consume a dependency published in a personal account00:19
wallyworldnate is dealing with that, i'll follow up with him tonight00:19
* davecheney mentions that he raised this issue 6 weeks ago when this dependency leaked into our codebase00:20
davecheneyrick_h__: can I nag you for more msdn keys00:23
rick_h__davecheney: wallyworld it was forked from an existing repo though I recall00:23
davecheneyrick_h__: that's just great00:23
rick_h__davecheney: sure, same software etc?00:23
davecheney^ insert heavy sarcasm00:23
* wallyworld has no idea, wasn't involved with the development00:23
davecheneyrick_h__: i'll 'ahem' get the cd somewhere else00:23
davecheneyi'll email you00:23
rick_h__davecheney: ok souds good00:23
rick_h__sounds that is00:23
davecheneyrick_h__: thanks, I only have a dodgy xp vm that i've been tending for close to a decade now00:26
davecheneyseriously, the install date of that vm is 200700:26
rick_h__davecheney: did you put the other key to use?00:28
rick_h__davecheney: or do you want that one again?00:28
rick_h__davecheney: I've got 5 to use so want to make sure I reuse if that's what'll work00:28
davecheneyrick_h__: let me check my irc log00:28
rick_h__davecheney: k, if you're not using it I can resend that one00:29
rick_h__davecheney: I just want to check if you need a second NEW one, or if that other one will work00:29
davecheneyrick_h__: i have one starting 3900:29
davecheneyis that win32 or win6400:29
davecheneybecause windows is amazing00:29
rick_h__davecheney: either.00:29
rick_h__davecheney: so will get you that one and a second one then00:29
davecheneyrick_h__: ok00:30
davecheneygiven how short supply they are i'll use this key for a win64 install00:30
davecheneyand keep using my xp 32 bit vm00:30
davecheneyuntil that becomes unworkable00:30
sinzuidavecheney, MS published free images for web development testing. The work with virtualbox and MS even recommends snapshotting them to prevent them from expiring00:30
rick_h__davecheney: all good00:30
davecheneysinzui: linkage ?00:30
davecheneysinzui: i know this isn't your fault00:31
davecheneybut this is crap00:31
davecheneyif we're developing on windows, we shouldn't be scrapping together resources to get win dev machines00:31
davecheneythis is serious software development, it should be done properly00:31
rick_h__davecheney: replied00:31
sinzuidavecheney, But I have been using win images in the cloud this year, when I need on, I just start an instance from the snapshot that does the windows tests. it has golang 1.2, python 2.7 and a ssh00:31
davecheneyrick_h__: ta, when you say 'the download' is that the one that I should look for, um, online ?00:32
rick_h__davecheney: I imagine. I ink it should work on anything of the right version though00:33
rick_h__davecheney: though you'll know more of windows than me soon00:33
davecheneyyay. life skills00:34
rick_h__:)00:34
rick_h__job security, no one else will want to do it!00:34
voidspacewallyworld: full test suite pass with *some* of the watcher infrastructure copying sessions00:38
wallyworldvoidspace: farking awesome00:38
voidspacewallyworld: so now to change all the rest00:39
wallyworldtime for you to git push and then go to bed :-)00:39
voidspacepushed00:39
wallyworld\o/ tyvm00:39
voidspacewallyworld: some of them do lovely things like send collections (which have a session reference of course) across a channel00:39
voidspaceso who closes the session then...00:39
voidspaceso those changes will need more thought00:39
wallyworldlalalalalala00:39
voidspaceprobably stick to using the global session and the receiver can copy00:39
* wallyworld covers his ears and pretends not to hear00:39
voidspacehah00:39
wallyworldbut agree with receiver copying00:40
sinzuidavecheney, Sorry, took forever to find the link, and then remember the blog post about how I got it downloaded00:42
sinzuihttp://blog.launchpad.net/general/a-tale-of-two-travesties00:42
sinzuidavecheney, The vhd you want is probably different since windows and ie have changed00:43
davecheneyok00:44
davecheneyi read that as 'the tale of two transvestites'00:44
davecheneynow I can't unsee it00:44
thumperwallyworld: I'm in town while the kids are at a movie, I won't be home in time for our meeting start00:44
thumpermovie finishes 10 minutes before our meeting00:44
wallyworldthumper: np, just ping e whenever00:45
thumperwallyworld: kk00:45
wwitzel3thumper: what movie?00:45
thumpertinkerbell and some pirate...00:45
thumperhence me not going00:45
wwitzel3lol, that's why you are in town00:45
thumperif it was how to train your dragon 2, I probably would have gone00:45
rick_h__thumper: saw that with the boy, it's ok00:46
perrito666thumper: that sounds an awful lot like peter pan00:46
perrito666from an odd point of view00:46
thumperperrito666: it probably is00:46
wwitzel3haha00:46
thumperrick_h__: the dragon one?00:46
rick_h__yea00:47
* perrito666 would fancy a movie about captain hook and the annoying young boy and his fairy 00:47
* perrito666 saw many kid movie blockbusters on the plane back from the last sprint00:48
perrito666they had cloudy with a change of burgers 200:48
perrito666anyway, Ill go to sleep so I am ready for our "too early to be pleasant" morning meeting, cheers everyone00:49
voidspacewallyworld: ah, the transaction stuff breaks the test hooks, because they expect a global transaction runner00:55
voidspacewallyworld: so that needs fixing too00:55
voidspaceshouldn't be too hard00:55
wallyworldvoidspace: yeah, i did something in the blobstore sub repo - we can do something similar here too00:56
wallyworldgo to bed!00:56
voidspaceI could still use a global jujutxn.Runner and have *it* recreate the underlying transaction runner00:56
voidspacethat would actually be nicer00:56
voidspacethe code would look the same... inside state00:57
voidspacestill not very tired :-/00:57
voidspacehaven't got to sleep until around 4am the last two nights00:57
wwitzel3voidspace: I've been on odd hours as well00:57
voidspacewwitzel3: morning00:57
voidspacewwitzel3: we had our scan today - 7 1/2 weeks00:58
wwitzel3voidspace: morning, congrats, all is well?00:58
voidspacewwitzel3: I double checked and I wasn't on a sprint that week, which was a relief ;-)00:58
voidspaceyeah, all is well00:58
wwitzel3wonderful00:58
voidspaceand there's only one - which is a *big* relief00:58
wwitzel3hah, oh that's right .. sometimes there is more than one in there00:58
voidspaceslightly more likely if you're as old as us00:59
voidspacewwitzel3: how's you?00:59
wwitzel3voidspace: really? I didn't know that. I'm well, just messing around with tests still :/00:59
voidspaceapparently so00:59
voidspacewwitzel3: heh, I've been doing that all day - *just* got the tests passing with some session copying in place01:00
wwitzel3voidspace: some where something is doing an extra Close on state so when a teardown runs, mgo throws a NPE.01:00
voidspaceouch01:00
wwitzel3voidspace: I'm "walking" it now01:01
voidspaceheh01:01
wwitzel3voidspace: printing and panicing since I could never get gdb working right01:01
voidspaceI was walking JujuConnSuite.SetupTest01:01
voidspaceand that's a beast01:01
voidspaceheh, yeah - panics are very useful for that01:02
voidspace"stop here"01:02
wwitzel3yeah, these tests don't use JujuConnSuite, just Base and Mgo suite.01:02
wwitzel3but it is still a hassle01:02
voidspaceright, I'm going to meditate and hopefully fall asleep01:05
voidspacesee you all tomorrow...01:05
wwitzel3voidspace: see ya01:05
voidspaceo/01:05
voidspacethumper: enjoy tinkerbell...01:05
bigjoolssinzui: we get this particular one a lot - it might help a bit if juju had some way to timeout and report that the node has no internet access?01:55
axwbigjools: what's the problem? machines not coming up because they can't apt-get?02:00
bigjoolsaxw: I think so02:14
bigjoolsit just hangs on bootstrap02:14
axwhrm, ok. bootstrap *should* time out after 5 minutes by default02:16
menn0thumper: your change and mine are going to have merge conflicts. sucks to be me :)02:19
axwwallyworld: there's a new mgo release coming soon, so I think it's best I hold off proposing any changes till I can update02:25
axwI have some workarounds in the juju code now that will be irrelevant with that02:26
thumperaxw: how soon?02:26
wallyworldaxw: sure, np.02:26
axwI'll continue on with killing Environ.StateInfo02:26
axwthumper: don't know sorry02:26
wallyworldaxw: otp, will chat soon02:26
axwthumper: well, it doesn't say "soon", but upcoming: https://bugs.launchpad.net/mgo/+bug/1340361/comments/102:27
_mup_Bug #1340361: RemoveUser of non-existent user has different behaviour with mongo 2.4/2.6 <mgo:Fix Committed> <https://launchpad.net/bugs/1340361>02:27
bigjoolsaxw: "should" :)02:33
axwbigjools: I've witnessed the timeout working recently. There was a recent change to add a longer default for MAAS (for !fastpath-installer) -- maybe it's just not reaching that longer timeout yet02:35
axwcan't remember how long's long02:35
bigjoolsaxw: that would be it02:35
menn0thumper: I'm done with the review. A few things but nothing major.02:38
wallyworldaxw: michael has made good progress on the io timeout issue; he should be able to push up a fairly complete branch tomorrow and we can pick up from there03:10
axwwallyworld: cool.03:12
axwwallyworld: I have moved address propagation to the backlog, pending additional network/relation hook changes03:12
wallyworldaxw: yup, np03:12
thumperkatco: are you still as enthusiastic as your initial blog post?03:18
davecheneykatco: don't answer that, it's a trap03:32
davecheneythumper: i'm going to head out for lunch03:32
davecheneydo you want to talk to me today about HR stuffs ?03:32
thumperkk03:32
thumperdavecheney: nah, tomorrow it is03:32
davecheneythumper: np03:32
thumperbbl03:39
=== thumper is now known as thumper-afk
davecheneyok, windows 8 install03:42
davecheneycomplete03:42
davecheneybrb, just going to drink some cynaide03:43
wwitzel3It's good over ice03:43
davecheneymmm, laudinum03:43
jamwwitzel3: you got jetlag going from southeast US to northeast US ?04:32
=== thumper-afk is now known as thumper
thumperwallyworld: I think I remember why that provisioner code was there04:50
thumperwallyworld: got a minute?04:50
wallyworldsure04:50
thumperhttps://plus.google.com/hangouts/_/g6p7d3ldngpmaqhkp5pqyyhidia?authuser=1&hl=en04:50
menn0thumper: any chance you can look at https://github.com/juju/juju/pull/32205:26
thumpermenn0: yep, just doing some hr stuff first05:26
menn0thumper: ok05:26
thumpermenn0: done05:47
thumperdinner time05:47
thumperback for meeting in 4 hours05:47
=== thumper is now known as thumper-back-at-
=== thumper-back-at- is now known as thumper-af-ktill
=== thumper-af-ktill is now known as thumper-afk
thumper-afkbugger05:48
rogpeppemornin' all06:23
=== vladk|offline is now known as vladk
=== uru_ is now known as urulama
=== seelaman` is now known as seelaman
menn0thumper: thanks for the review. merging now.07:11
=== bradm1 is now known as bradm
mattywdavechen1y, ping ping?08:09
mattywdavechen1y, cancel that08:11
voidspacemorning all08:25
jammorning voidspace08:25
voidspaceo/08:25
EgoistHi08:28
Egoistis -relation-departed hook is executed after remove unit from service?08:28
dimiternEgoist, quoting juju-core/doc/charms-in-action.txt: The "relation-departed" hook for a given unit always runs once when a related unit is no longer related. After the "relation-departed" hook has run, no further notifications will be received from that unit; however, its settings will remain accessible via relation-get for the complete lifetime of the relation.09:14
dimiternjam, ping09:24
jamdimitern: /wave09:24
dimiternjam, should we have a quick hand-off chat re networking?09:25
jamcertainly09:25
jamgive me a sec to grab headphones09:25
dimiternsure09:25
TheMuedimitern: jam: any interesting regarding ipv6 (especially for lxc) here?09:25
dimiternjam, i'm in the standup g+09:26
* TheMue simply will join too09:27
dimiternTheMue, come as well yes09:27
perrito666morning everyone09:27
dimiternmorning perrito66609:27
TheMueperrito666: o/09:27
voidspacejam: with this code all the tests pass (there's "some" session copying going on in the watchers)09:28
voidspacehttps://github.com/voidspace/juju/compare/master...copy-sessions09:28
voidspacejam: that removes the password hashing from the dummy provider and also from JujuConnSuite09:28
jamTheMue: dimitern: want to join me in https://plus.google.com/hangouts/_/canonical.com/juju-sapphire09:29
TheMuejam: already in09:29
jamaxw: what was the final results of address changes for charms?09:34
jamvoidspace: sounds good, I wanted to check with the list that it was time we could do it, but it sounds like we are ready09:35
voidspacecool09:35
axwjam: not much for now. for the short term, I've updated the uniter so that config-changed is triggered on machine/unit address change. in the longer term, (I think?) there will be a relation equivalent of config-changed that will be triggered when relation addresses change09:37
axwso, no automatic changes for now09:37
axwI've moved the card to the backlog09:37
jammgz: ping for team standup?10:06
wwitzel3_jam: hah, I guess I did. (re: jet lag)10:27
=== wwitzel3_ is now known as wwitzel3
voidspacewhat else is using juju/txn now that it has been broken out into a separate package?10:29
voidspace'coz I want to change the transaction runner in a backwards incompatible way10:30
natefinchvoidspace, wwitzel3: all team meeting?10:31
wwitzel3natefinch: yep, sure10:31
voidspacenatefinch: I can join10:32
voidspacefor the sake of nostalgia10:32
voidspaceoh!10:33
voidspaceall team meeting10:33
voidspacecool10:33
mgzdoh, should have looked at calendar10:52
Guest63023voidspace: blobstore10:54
voidspaceGuest63023: ok, thanks10:55
=== Guest63023 is now known as wallyworld
voidspacewallyworld: ah, I wondered who you were :-)10:55
voidspacewallyworld: so I want to make the underlying transaction runner do the session copying10:55
wallyworldstupd freenode10:55
voidspacewallyworld: as that's the correct thing to do10:56
voidspacewallyworld: but it changes the signature of NewRunner10:56
wallyworldvoidspace: go for it, tht would be awesome'10:56
wallyworldi'll fix blobstore10:56
voidspacewallyworld: and only the replicaset tests fail when I do that10:56
wallyworldthey fail a lot anyway :-)10:56
voidspacewallyworld: although obviously the txn tests themselves won't run10:56
voidspacehah10:57
voidspacethey fail deterministically now10:57
voidspaceso I guess you could call that progress...10:57
wallyworldyup :-D10:57
wallyworldwe should do what's the best approach and fix tests accordingly10:57
voidspaceonly one fails, and it looks like it's the ipv6 one10:57
wallyworldhmmm, that may be different root cause?10:58
voidspacewell, it was passing and now it's failing...10:58
voidspacebut the specific error is that ""exception: need most members up to reconfigure, not ok"10:58
wallyworldthere's one ip6 one that has been flakey10:58
voidspacewhich maybe indicates a timing issue10:58
wallyworldyep10:58
voidspaceI don't think it's this one that is the normally flaky one10:58
wallyworldhmmm, strange that it's just the 1 test10:59
voidspacethis one just starts a replicaset with members location specified using ipv6 format (so the replicaset members talk to each other over ipv6)10:59
voidspaceyeah, I'm digging into it10:59
wallyworldcan't see how session clone relates to that, unless sockets somehow break on ip610:59
voidspaceit may just be that the extra connections need some extra time11:00
wallyworldthat would be more plausible11:00
wallyworldtry increasing the sleep just for shits and giggles to see what happens11:00
voidspaceyep11:01
voidspacebut coffee first11:01
mgzinterestingly the bot has been pretty solid for the last few days11:11
mgzall the red seems to be real issues11:11
dimiternmgz, really? I had 2 reds yesterday - one landed successfully, the other was genuine11:24
mgzdimitern: ah, the only one of yours I saw looked real11:26
dimiternmgz, there was a test failure previously on the same PR11:27
dimiternmgz, the funny thing though is how jenkins decides to mark a build red very early.. seems fishy11:28
mgzoh, yeah, something jenkinsie went wrong on 43, which wasn't test related11:29
mgzI forgot that I'd requeued that11:29
axwwallyworld: I'm not going to make the standup, team meeting ate into dinner11:31
mgzthey ate your dinner?!11:32
wallyworldaxw: no problem at all, talk tomorrow11:32
axwwallyworld: I've got my StateInfo branch all working, need to tidy up and split it11:32
wallyworldgreat :-)11:32
axwand now there seem to be more action test races11:32
wallyworld:-(11:33
* axw goes for dinner11:33
wallyworldaxw: i'd like to continue to remove ome more old cruft too11:33
wwitzel3why would a test be trying to actual create a machine with the 'someprovider' from the FakeConfig when calling AddMachine?11:46
wwitzel3the testing is erroring with  value *errors.errorString = &errors.errorString{s:"no registered provider for \"someprovider\""} ("no registered provider for \"someprovider\"")11:47
=== BradCrittenden is now known as bac
wallyworldkatco: mgz: i'll be a bit late for standup, in another meeting11:58
mgzwallyworld: poke when ready11:59
axwpoke me too, I finished dinner and am around atm12:00
katcogood morning all12:03
voidspacekatco: o/12:04
katcovoidspace: hallo12:04
voidspacewallyworld: just FYI, it was a timing issue - around destroying instances12:05
voidspacewallyworld: we need to give the replicaset time to adjust12:05
wallyworldvoidspace: yeah, thought so :-)12:05
voidspacewallyworld: not sure why it wasn't biting us before12:05
wwitzel3katco: morning12:05
voidspacewallyworld: we have some "strategy" code around the other operations to deal with it12:05
wallyworldthat's the natue of it12:05
katcowwitzel3: howdy12:05
voidspacewwitzel3: but weren't using it around Remove12:05
wallyworldsigh12:05
voidspaceoops, sorry wwitzel312:05
voidspacewallyworld: well, I'm happy it was an easy fix12:06
wallyworldvoidspace: yes :-)12:06
voidspacewallyworld: I have a doctors appointment soon - but should have a txn branch to propose later today12:06
wallyworldkatco: morning, i'm running late, in another meeting12:06
wallyworldvoidspace: you're awesome12:06
katcowallyworld: no worries, just yell when you're ready12:07
voidspacewallyworld: haha, wait until you see how much I leave you to do before you say that12:07
voidspacewallyworld: but thanks12:07
wwitzel3lol12:07
* wallyworld is nervous :-)12:07
katcovoidspace: you rewrote juju in python didn't you12:08
mgzrerewrote12:08
voidspacekatco: we actually came up with a way to do that12:08
katcorofl12:08
voidspacea go to python source translator would be relatively easy12:08
katco-.-12:08
wwitzel3hah12:08
voidspaceso we do that, run it once, then switch to Python dev12:09
voidspacemgz said he would work on it over the weekend12:10
mgz>_<12:10
voidspace:-)12:10
katcohaha12:10
katcoaxw: replied to your latest review comment (thank you). so i'm OK to add a file-lock to the bootstrap command?12:13
wallyworldmgz: katco: ready :-)12:14
axwkatco: thanks, will read them in a bit. i'm not sure - is it actually possible to get into the race condition with the same $JUJU_HOME? the .jenv file is meant to be a sort of lock12:14
katcoaxw: maybe we can discuss a little at the end of the standup12:15
cmarsjam1, sure12:26
cmarsjoining12:26
cmarsoh12:26
vladkdimitern: ping12:36
perrito666does anyone know how to get a user/password to connect to a github.com/juju/testing . MgoInstance?12:39
natefinchperrito666: sorry, I'm not sure.  If you figure it out, can you make a quick PR to put that info in the comments of MgoInstance?12:48
perrito666natefinch: I certainly will once I do12:50
natefinchmgz, dimitern, rogpeppe, jam:  any of you guys able to point perrito666 to how he can get the user/password for a testing.MgoInstance?12:53
jamnatefinch: user admin12:53
jampassword dummy-secret IIRC, or testing.DefaultMongoPassword ?12:53
perrito666jam: testing.DefaultMongoPassword does not work I get auth fails, Ill keep looking , I eventually will figure out or throw the computer over the window12:58
jamperrito666: where in the code are you trying to do it?12:58
jamperrito666: environs/dummy/environs.go Bootstrap sets the password to Config().AdminSecret()12:59
jam(or the hash of it before first connect)12:59
jam(line 654)12:59
perrito666jam: I am writing tests for the new restore, most, if not all uses in tests use MustDial ¯\_(ツ)_/¯13:00
jamperrito666: so for restore, are we bootstrapping with the dummy environ?13:00
jamif we haven't ever connected to it before then the password should be Hash(password)13:00
jambut in real "restore" wouldn't the jujud have come up at least 1 time?13:01
jammaybe in testing it hasn't13:01
jamperrito666: so I have to ask a bit where this is getting set up, as it probably makes a difference13:01
jamuntil you bootstrap, I don't tihnk we have any users in mong13:02
jammongo13:02
jamperrito666: fwiw voidspace has been working in this place a bunch right now, he might have answers if I'm out13:05
perrito666jam: mm, I see I have not yet connected to it at that point, I am writing tests for the function that re-sets replset13:05
bodie_morning #juju-dev :)13:05
perrito666jam: tx for the info :)13:05
perrito666bodie_: hi13:05
jammorning bodie_13:05
TheMuebodie_: heya13:11
abentleysinzui: chat?13:13
sinzuiyes13:13
abentleyhttps://plus.google.com/hangouts/_/calendar/Y3VydGlzQGNhbm9uaWNhbC5jb20.5o5o70vgo1v23fjnopr1famgrg?authuser=113:13
bodie_TheMue, did you have anything more to add on PR 311?13:23
bodie_I was talking about a change to the whole thing with fwereade -- I have some content I've been working on but refactoring the tests ended up being a big chunk13:24
TheMuebodie_: will take a look13:27
* TheMue ’s irc client forgot to notify me in case of a mention :(13:28
natefinchbodie_: can you put that license file in gojsonschema ASAP?  It's blocking our release13:35
=== Ursinha is now known as Ursinha-afk
natefinchbodie_: I presume the right thing to do is just pull down the one added to the upstream repo13:36
bodie_natefinch, sure, give me 5 minutes to wrap up here.  mgz gave me the impression it wasn't a front of the line concern, sorry to keep you waiting13:39
natefinchbodie_: it's ok, I didn't really follow up yesterday.13:39
natefinchFWIW, I blame mgz too ;)13:39
perrito666voidspace: ping?13:41
voidspaceperrito666: I have to go to the doctors - like *right* now13:41
mgzbodie_: finishing your branch was more important, which you did :)13:41
* bodie_ throws a tomato at mgz13:41
perrito666voidspace: no hurry13:42
voidspaceperrito666: I shouldn't be long though and we can talk when I get back13:42
perrito666cu later or tomorrow13:42
voidspaceperrito666: ok13:42
bodie_mgz, if it LGTY, LMK ;)13:42
mgzTSGTM13:43
* natefinch just figured out bodie_'s github account name13:43
bodie_hehehe13:44
bodie_now I feel a little silly... that name is a throwback to my teens13:44
natefinchhaha13:44
bodie_mgz, natefinch, did you want to have a brief chat about whether we should be using my repo or try to get a proper update merged into xeipuuv's?13:45
natefinchbodie_: neither.  we should fork yours into github/juju13:45
bodie_that's what seemed reasonable to me as well13:45
natefinchbodie_: I'm not confident that xeipuuv will keep it up to date, and since it's written on canonical time, it should be in a canonical repo13:46
bodie_that was my primary reason for keeping my work in my fork, he seemed unresponsive on some queries13:46
natefinchalso, we don't want to be blocked on some external person accepting our pull requests for our code to work13:46
bodie_right13:46
bodie_can I simply create a repo in juju?13:46
mgznate can13:47
natefinchyou can't, but I can.  I think what we'll do is have you put the license in your repo, and then I'll just fork your repo into juju13:47
bodie_cool13:47
mgzI do want the gap between upstream and us to be as small as possible, and them to be aware of our changes13:47
perrito666natefinch: bodie_ you made me look up13:48
natefinchmgz: that's pretty fair.  Maybe fork upstream and merge in bodie_'s changes?13:48
natefinchperrito666: haha13:48
* perrito666 notices he has been wearing his headphones without music for 2 hs13:48
natefinchperrito666: haha, I do that all the time. :)13:49
bodie_hate it when that happens... I don't want sweaty ears unless I'm getting something out of it! :P13:49
natefinchhttps://github.com/juju/gojsonschema13:49
perrito666bodie_: its winter, my ears feel pretty good about the heat13:49
bodie_natefinch, I'll poke a change into core quickly to use that and whatnot13:50
natefinchbodie_: ok.  I need to merge in your stuff first.  hopefully it'll just work :/13:50
bodie_I'll give it a shot too13:51
bodie_erm, it looks like it's still using the other two bad deps13:51
natefinchbodie_: in theory, all the fixes you made will just work13:51
bodie_sigu-399/gojson* was a big pain point that I had to rework13:52
bodie_*pokes natefinch*13:52
natefinchmerge conflict?  damn13:57
bodie_natefinch, there's also a couple of bad deps in that13:58
bodie_not sure if you saw13:58
bodie_I pulled out all three libs13:58
bodie_gojsonschema, gojsonreference, and gojsonpointer13:58
natefinchbodie_: right, but if I pull in your changes, it should put the juju repo in the same state as your repo13:58
bodie_should've thought to mention that -_-13:58
natefinch"should"13:59
bodie_well, my gojsonschema repo, yes13:59
bodie_but gojsonschema has two more or less shoddy external dependencies in sigu-399's account13:59
bodie_which I fixed13:59
natefinchyeah, all I'm doing is forking your upstream and then merging in your changes13:59
bodie_I'm not sure which one of us is failing to understand the other, haha14:00
natefinchbodie_: oh, I see, there's more than the one repo, I get it.  gojsonreference14:00
bodie_and gojsonpointer14:01
natefinchgah, those have no licenses either14:01
bodie_it's prepended to the file, which is acceptable under apache 214:01
bodie_I wasn't totally sure whether that was an issue14:02
natefinchoh, cool, yeah, that's fine14:02
perrito666natefinch: stdup?14:02
natefinchyep14:03
=== Ursinha-afk is now known as Ursinha
natefinchperrito666: sorry, no I haven't done the set state server address thing14:25
katcomgz: so i'm wondering if this variable name is appropriate, "existing". it's only true if there is an error and the error is that the environment path _doesn't_ exist14:27
bodie_heh14:32
katcomgz: it's causing some mental gymnastics, and actually might be the source of _a_ bug; e.g.: we cleanup only if an environment was already found, not created14:32
bodie_they may be in a standup, btw14:33
bodie_not sure how they do things14:33
katcomgz?14:33
katcohe's on my team, not sure if he goes to other stand-ups14:33
perrito666katco: he uses irssi, he might not get notified of your pings14:34
mgzsec, just wombled off14:34
katcoperrito666: ah ok :) i used to use irssi; migrated to erc recently14:34
katcomgz: wombled... that is a new phrase for me14:35
mgz'existing' should be refering to if there was a .jenv file *before* we called Prepare14:35
mgzwhich sort of makes sense14:35
mgzthere are just too many negatives in there to make that clear :)14:36
katcomgz: haha, yeah... even as i'm trying to clarify i have to reparse this in my head14:36
mgzReadInfo -> !IsNotFound -> existing = true14:36
bodie_oy14:36
bodie_isn't not found?14:36
mgz!existing -> destroy14:36
bodie_wouldn't that mean IsNotFound -> destroy?14:37
mgzright, any err other than not found means you fall through and existing remains = false14:37
mgz(or err == nil in the common but not-explict case)14:38
mgzthe code is just generally confusing14:38
katcomgz: so, true iff either there is no error OR there exists an error but it's not that we couldn't find the env14:40
mgzkatco: the reverse, false iff...14:41
mgzwait, now I'm backwards?14:41
katcomgz: haha this code is a mental trap14:41
mattywsorry for missing the core team meeting today folks - completely missed the reminder14:42
mgzyours was right14:42
katcomgz: i think i'm correct which is perhaps why there's a bug14:42
katcomgz: right, b/c currently if there _is_ an error, but it's something other than "couldn't find env", it will still mark "existing = true"14:48
mgzright, which is wrong14:49
katcomgz: i think this should occur: existing = (err == nil)14:49
katcoi think that's true for all cases14:49
mgzyeah, I think so14:49
katcomgz: i think i have the fix; but i think you're going to be the only one who can review it haha14:50
katcomgz: take a peek at this and let me know what you think: https://pastebin.canonical.com/113716/14:51
mgzyah, the three states seem correct there14:52
katcomgz: awesome, i'll go with this. the test i have seems to agree14:53
mgzyou can probably just do if err == nil { envExists = true } else if IsNotFound(err) { ...warning.. } else { return err }14:53
katcomgz: i am not a huge fan of relying on default values, but i'm not opposed if you feel strongly14:54
katcomgz: or wait, did i misread that...14:55
mgzkatco: I mostly just like simple diffs, I agree reassigning envExists isn't super14:55
katcomgz: +1 on simple diffs14:55
mgzbut really it's an either-or for the first two blocks14:56
mgzas unexpected errors we should just propogate rather than go on and Prepare at all14:56
katcomgz: i like your way better... reads cleaner14:58
katcomgz: other than the default value ;)14:58
natefinchkatco: can you fix the comment on environFromName so it explains what the function is for that it returns?15:03
katconatefinch: sure... would naming the return param work?15:04
natefinchkatco: yeah, I was going to suggest that too... can you do both, though?  Cleanup is a good name, but it still doesn't describe when you should call it and stuff.  Pretend you're brand new and have no idea what most of this code does :)15:04
mgzthat's all of us...15:05
katconatefinch: well that's not hard to pretend ;) but yeah, i'll do both. tyvm for the suggestion15:05
natefinchright15:05
=== anthonyf` is now known as anthonyf
natefinchthat's actually something I'd like us to work on... put as much helpful information in comments as possible for the next developer, instead of assuming the next person has a perfect comprehension of the mechanics of the entire system.15:06
katcodo we prefer line breaks for each arg, or several on a line but break before c80?15:06
natefinchkatco: up to the individual developer as long as gofmt likes it.  Personally, I prefer one arg per line like a struct declaration, instead of randomly breaking somewhere in the middle of the args15:07
katconatefinch: +115:07
katconatefinch: although the indentation isn't how i would do it:15:08
katcofunc environFromName(ctx *cmd.Context,15:08
katcoenvName string,15:08
katcoresultErr *error,15:08
katcoaction string) (environs.Environ, func(), error) {15:08
katconatefinch: i'd like for the args to be under the first, and bringing the 1st down a line reads strangely to me15:08
natefinchkatco: this is my own personal favorite way:15:09
natefinchfunc destroyPreparedEnviron(15:09
natefinchbar *cmd.Context,15:09
natefinchbaz environs.Environ,15:09
natefinch) (foo, error) {15:09
natefinchreads a lot like a struct definition, which my eyes parse easily15:10
katconatefinch: i like that15:10
natefinchbut again, the Juju rule is, if gofmt likes it, it's ok15:10
katconatefinch: consider it adopted! :)15:10
natefinchcool15:10
katcothat is very easy to parse for me15:10
=== urulama_ is now known as urulama
alexisbnatefinch, team: anyone have time to take a look at this bug today:15:30
alexisb https://bugs.launchpad.net/ubuntu/+source/juju/+bug/107821315:30
_mup_Bug #1078213: logs are not logrotated <amd64> <apport-bug> <canonical-is> <canonistack> <logging> <precise> <juju-core:Triaged> <juju (Ubuntu):Triaged> <https://launchpad.net/bugs/1078213>15:30
alexisbit is starting to affect the field15:31
natefinchalexisb: I can look at it.  I've wotked on it before15:33
natefinchworked15:34
katcomgz: i've found another curiosity... cleanup gets passed in a pointer to an error, and if the error is nil, returns. as far as i can tell, that error will never be anything but nil...15:35
natefinchalexisb: can you add wayne to canonical-juju?  evidently he's not on it15:36
alexisbo, yeah let me see how to do that15:36
katconatefinch: alexisb: i'm not sure i'm on that either15:37
alexisbkatco, ack15:37
mgzkatco: you mean the resultErr to destroyPreparedEnviron?15:37
katcoalexisb: at least a quick search shows no messages15:37
katcomgz: yeah15:37
mgzthat's a funky defer hack15:38
katcomgz: am i just reading that wrong? it never gets set?15:38
mgzcleanup is defered till the end of Run, which has the named return resultErr15:38
mgzwhich was passed *as a reference* to environFromName and on into cleanup15:39
katcomgz: right, but we never do anything with it as far as i can tell15:39
katcomgz: in any of the stack frames15:39
mgzso, when cleanup runs, *after* the return from Run, it's populated with the return err from that runction15:39
katcomgz: ooooh i see15:39
katcomgz: jees... that is not intuitive at all15:40
mgzwhat we do with it is *err == nil15:40
katcomgz: a defer func() { if resultErr != nil { cleanup() } }() would be much clearer15:41
natefinchericsnow: 1:1 in moonstine?15:41
mgzso, cleanup does not destroy if Run returned successfully15:41
ericsnownatefinch: coming15:41
mgzyes, having two levels of guards on destroy is just confusing15:41
katcomgz: so the ever-present question: do i make that change?15:42
mgzyou could pull it up into cleanup pretty trivally if it's not used otherwise, which it seems not to be15:43
katcomgz: i agree15:43
katcomgz: and i apologize; regarding this morning's discussion; if the environ already existed, we just want to remove the jenv file, not destroy the entire thing, correct?15:44
=== vladk is now known as vladk|offline
katcomgz: hm it looks like that pattern (err ref in cleanup) is also used in synctools15:50
dimiternanyone willing to review a small fix for bug 1343219 ? https://github.com/juju/juju/pull/32715:52
_mup_Bug #1343219: networker restarts every 3 seconds with the local provider (missing /etc/network/interfaces) <juju-core:In Progress by dimitern> <https://launchpad.net/bugs/1343219>15:52
TheMuevoidspace: to allow a review, could you add a bit more information to your txn PR?15:54
voidspaceTheMue: which bit don't you understand?15:54
voidspace;-)15:54
voidspaceTheMue: ok15:54
TheMuevoidspace: it’s more the general comment for the whole PR, about the intention15:55
voidspaceTheMue: yep, no problem15:55
TheMuevoidspace: great, thx15:56
dimiternTheMue, voidspace ^^ ? :)15:56
TheMuevoidspace: btw, I’m taking some notes about IPv6 in LXC containers15:56
TheMuedimitern: will take a look15:57
voidspacedimitern: eh?15:57
voidspaceah15:57
voidspaceTheMue: great15:57
dimitern:)15:57
dimiternTheMue, ops, sorry - I had to fix a test slighly, but the rest is fine15:58
voidspaceSooo... in order to use collections safely we should copy them before performing any actions on them15:59
voidspacein order to use a new session15:59
voidspaceunfortunately State is a big bundle of collections15:59
voidspaceI'm considering replacing the collections with a function to return a collection instead15:59
voidspaceso it's impossible to access them without creating a new copy16:00
voidspacehowever, wherever they're copied a closer function is also returned - so session.Close can be called appropriately16:00
voidspacethat's going to create some uglyish code16:00
voidspaceit will make it more likely that I catch all the places using collections though16:01
voidspaceI think it needs an email to juju-dev16:01
wwitzel3hey dimitern , any idea why one of my tests in state (calling AddMachine) would be returning an error that there is no registered provider for "someprovider" which is the details from FakeConfig.16:01
natefinchvoidspace: definitely16:01
dimiternwwitzel3, I've never seen that :/16:02
voidspacenatefinch: my branch with some session copying for the watchers - and session copying for the transaction runner - passes all the tests16:02
voidspacewwitzel3: that sounds to me like some mocking isn't taking effect16:02
natefinchvoidspace: nice16:02
voidspacewwitzel3:  something that's supposed to be catching calls isn't and they're propagating too far16:02
TheMuedimitern: ping me when you fixed the test, the rest indeed looks good16:02
dimiternwwitzel3, i seem to recall some piece of code getting a fakeconfig and changing the type to "someprovider" though16:02
natefinchvoidspace: that'll help with our scaling up as well.16:03
wwitzel3voidspace, dimitern: yeah the fake environ is setup and it is even using the dummy provider16:03
wwitzel3voidspace, dimitern: I have one test that it works on and one test is fails on, so right now i'm just talking the code to see where the passing one mocks and the failing one doesn't16:03
dimiternwwitzel3, so which test passes and which fails?16:05
bodie_mgz, hangout or are we good?  I don't have any real questions yet, I'm just starting to dig into the jujuc stuff16:05
dimiternTheMue, PR updated16:06
TheMuedimitern: ok16:07
wwitzel3dimitern: the failing ones for me are in the megawatcher tests and many of them pass in the other suites in state.16:07
wwitzel3dimitern: I am sure it has to do with me not mocking something properly with the new refactors I've made, I was just hoping for a pointer in the right direction for where that gets mocked.16:07
wwitzel3I feel like it should just be calling the AddMachine from dummy provider16:09
wwitzel3and that should be that16:09
dimiternwwitzel3, why you need an environment in state tests?16:09
TheMuedimitern: reviews16:10
dimiternwwitzel3, I mean - state tests usually don't mess with provider types, etc. just set and get the envconfig16:10
TheMuedimitern: eh, reviewed16:10
dimiternTheMue, ta!16:10
TheMuedimitern: quick solving of the issue16:10
wwitzel3dimitern: because this megawatcher_internal_test calls AddMachine a lot.16:10
wwitzel3dimitern: I'm not messing with them in the tests, I've messed with things in general and I'm trying to fix the tests :)16:11
dimiternTheMue, it's quick-n-dirty fix for now - we'll probably have to handle missing /etc/network/interfaces better in the future16:11
dimiternwwitzel3, ah :)16:11
dimiternwwitzel3, sorry I couldn't help you more16:12
wwitzel3dimitern: no worries, appreciate the time, I'll get it figured out16:12
wwitzel3it is most likely something simple and dumb16:12
wwitzel3and completely my fault :)16:12
TheMuedimitern: yep, we need to know if it is needed or, like in the mentioned case, not16:12
dimiternI know the feeling - esp. when I mess around with stuff in state16:13
dimiternTheMue, or create it ourselves even16:13
dimiternok guys16:13
* dimitern is off - see you in 2 weeks ;)16:13
natefinchbodie_: one of the jsonschema tests is panicking?16:29
natefinchbodie_: http://pastebin.ubuntu.com/7809812/16:30
bodie_natefinch -- hrm16:33
hackedbellinithumper: we just tried the workaround you mentioned yesterday, but it didn't work :(16:33
hackedbellininatefinch: to update you, yesterday after you left, thumper said our problem here is probably because it was missing "ha" (I don't know what that means =P), and it was caused because we upgraded from 1.19 to 1.20 and not from 1.18 to 1.20 (that second migration would trigger that "ha" to be properly setup)16:33
hackedbellinias a workaround, he said we could try changing the "upgradedToVersion" on machine-0's agent.conf to read "1.18.4" instead of "1.19.3" so when the agent started, it would maybe fix it16:33
bodie_natefinch, is this using my deps?16:34
bodie_mine is passing16:34
katcoapparently errors.IsNotFound(nil) returns false16:45
natefinchbodie_: ahh yeah, I was missing your changes to gojsonreference16:47
natefinchkatco: yeah, most "isFoo" should return false on nil16:48
natefinchespecially when checking interfaces16:48
katconatefinch: generally agreed, but it makes "if environInfo, err := store.ReadInfo(envName); nil == err || !errors.IsNotFound(err) {...}" all the more confusing16:48
natefinchkatco: double negatives are always a problem16:49
natefinchkatco: and yeah, that ode is not very good.  I would split out the if statement from the rest... I generally only do the inline if statement if it's super simple16:50
natefinchline returns are free, developer confusion is expensive16:50
katconatefinch: yeah that's what we've decided to do; but i missed a case16:50
katconatefinch: i don't know why, but this particular block of code is really good at scrambling people's brains16:51
natefinchkatco: show me?16:51
natefinchfile/line no16:51
katconatefinch: the code? it was what we were discussing earlier16:51
katconatefinch: common.go, environFromName16:52
katconatefinch: it's going to look different by the time i submit a PR16:52
natefinchkatco: that sounds like a good thing :)16:53
katconatefinch: absolutely... axw, mgz, and i were thoroughly confused16:53
katconatefinch: but i think one of them will have to be the reviewer, otherwise it looks like much too large of a PR16:55
katcospeaking of which... i've never done this. so i've made changes since my last PR, and i want to resubmit. does github handle that for me, or how do i submit a fresh PR?16:57
perrito666katco: if your pr has not beenmerged16:58
perrito666just push16:58
perrito666that updates the pr16:58
katcoperrito666: ah ok. ty16:58
natefinchdepends... pushing will put another commit on the PR, or you can rebase to update the commit already in the PR.16:58
katconatefinch: so if i rebase from trunk, it will update the PR but erase prior history (comments, etc.)?16:59
natefinchright16:59
natefinchso, not rebasing means you keep the comments17:00
natefinch...and this is why we want to move to reviewboard, so it's simpler and easier17:00
natefinchI think17:00
* natefinch has not actually used reviewboard17:00
katcocool17:01
natefinchbodie_: ok, so all the jsonschema stuff is now under github.com/juju17:02
bodie_right on17:02
bodie_natefinch, shall I open a PR to correct the imports and godeps?17:03
natefinchbodie_: yes please17:03
katconatefinch: btw, in environs/configstore/disk.go, my initial impression is all of those mutexes should be removed, and the variables be converted to a non-buffered channel17:04
katconatefinch: just ran across that when reading through this code17:04
natefinchkatco: I'm not entirely sure about the reason for all that locking, so I'm not ready to comment on if it should be changed.17:08
katconatefinch: from the docs: "Package sync provides basic synchronization primitives such as mutual exclusion locks. Other than the Once and WaitGroup types, most are intended for use by low-level library routines. Higher-level synchronization is better done via channels and communication."17:08
katconatefinch: if we're not using panics b/c it is not idiomatic go, we should not be using mutexes either17:09
natefinchkatco: meh. The go authors have admitted, sometimes a lock is a much simpler solution to a problem17:09
bodie_mgz, good to go on pull 311?17:10
katconatefinch: that seems like a double standard to me17:10
natefinchIt's a pragmatic standard.  Using channels can complicate code where it's not really necessary.  Panic *always* complicates code... and causes your implementation to leak into the caller's code.  Callers of code that uses mutexes don't ever need to know you're using a mutex unless you expose it.17:13
katconatefinch: although i disagree about panics (exceptions), there is the same argument for channels17:14
katconatefinch: callers need never know how you've implemented synchronization17:15
natefinchkatco: You're welcome to take it to juju-dev.  I think it's good to want to make our code more idiomatic.17:25
natefinch(juju-dev the mailing list that is)17:25
katconatefinch: i'd like to once i'm a little more settled. i just thought you'd be interested since we had been discussing it17:25
katcohm it doesn't look like my PR was automatically updated with my push... do i close the existing one and resubmit?17:26
natefinchI think if you just re-PR it'll work17:26
natefinchsorry, I haven't landed a ton of code since the switch  :/17:27
katconatefinch: ok (crosses fingers)17:27
katconatefinch: oh no worries, i gather everyone is still figuring this out17:27
natefinchI'm sure mgz would know, possibly wwitzel3 or ericsnow too17:28
* natefinch just pings everyone17:29
wwitzel3:)17:30
ericsnowkatco, natefinch: I've done it a few times at is always works (though I'm pretty sure it you have to refresh the page and it *may* not be instant)17:30
wwitzel3katco: if you pushed to the same branch, it should of updated it17:30
ericsnows/at is/and it/17:30
perrito666voidspace: ping17:33
katcoericsnow: wwitzel3: ty gentlemen17:34
bodie_natefinch, http://paste.ubuntu.com/7810105/17:35
bodie_seems odd that there's still a dep for binary132/gojsonpointer17:35
natefinchbodie_: oops, probably my fault17:40
bodie_natefinch, I grepped for binary132 without result O.o17:40
bodie_oh, oops, of course17:40
bodie_yep17:41
bodie_gojsonreference17:41
bodie_however, I'm not sure how to PR my fix17:42
bodie_since it's forked from xeipuuv, when I open the fix branch, it wants to PR against xeipuuv's17:42
bodie_looks like you can either merge my change by adding my branch as a remote, or just do it yourself, I suppose17:44
bodie_natefinch, it's just the import in gojsonreference17:44
natefinchbodie_: yeah, fixing it17:45
natefinchbodie_: there you go17:46
voidspaceperrito666: pong17:48
voidspacebiab - going jogging17:49
voidspacesorry perrito66617:49
perrito666lol, voidspace well talk tomorrow, its just tomake sure I understood correctly your changes to admin password (and how they most likely break old restore)17:50
voidspaceperrito666: https://github.com/voidspace/juju/compare/copy-sessions17:50
voidspaceperrito666: I don't directly change oldPassword17:50
voidspaceperrito666: it's still used in production17:50
voidspaceI haven't changed that17:50
voidspaceor at least, if it's still used it will still work17:50
perrito666ok17:51
katcook https://github.com/juju/juju/pull/319 finally in17:57
=== vladk|offline is now known as vladk
rogpeppeto whom it may concern: i'm around this evening (for the next 2 hours) if anyone needs to ask any juju-core questions18:08
bodie_natefinch, sorry, just about done here, things got a little madcap here chez bodie18:15
bodie_natefinch, https://github.com/juju/juju/pull/32918:30
natefinchbodie_: why does that change juju/charm?18:34
bodie_because that's where the gojsonschema dependency is18:35
natefinchbodie_: ahh I see18:35
bodie_natefinch, specifically, gojsonschema is used to validate against charm.ActionSpec18:35
bodie_so, anywhere we're validating, we're doing so against that type18:35
bodie_using a method on the type18:36
bodie_I took the liberty of merging the import fix to charm since it tests OK18:36
natefinchbodie_: cool18:37
natefinchrick_h__: ping on the MaaS nuc stuff19:01
rick_h__natefinch: sure thing, I'll pull my list together19:01
natefinchrick_h__: thanks19:01
rick_h__natefinch: https://pastebin.canonical.com/113747/ is what I picked up19:08
rick_h__natefinch: and I got a usb -> ethernet adapter for the maas controller so that it's dual homed on both the external network (for the team to access) and the private on the switch for the maas network to operate19:09
rogpeppeanyone fancy a review of the brand-new fresh-off-the-press charm store HTTP router: https://github.com/juju/charmstore/pull/1419:12
natefinchrick_h__: awesome, thanks19:22
alexisbalrighty all I am out of here! see you in a week19:25
natefinchalexisb: have fun!19:26
natefinchalexisb: we'll keep the place from burning all the way to the ground while you're gone19:26
alexisb:)19:27
alexisbI believe you natefinch19:27
* perrito666 is surprised by natefinch comment while he fetches gas and a match19:27
bodie_I'm sure there won't be any freak gasoline fight accidents.19:27
rick_h__alexisb: have a good time, but did reply to your email :P light reading for the trip19:27
alexisbrick_h__, thanks19:28
alexisbbtw rick_h__ good stuff that is very helpful19:28
* perrito666 begins the burning19:29
natefinchI19:31
natefinchI'd really love it if canonical hr would stop logging me out and deleting my in-progress reviews19:31
perrito666well I only did one, but that did not happen to me19:31
natefinchIf you stay on the review page for too long "save and continue" means "dump you to ubuntu SSO and then redirect to the salesforce main page"19:32
perrito666how fun... not19:32
natefinchnote that none of that includes actually saving your work19:34
perrito666natefinch: try ctrl+click19:34
perrito666if properly coded should try to do that on the next tab19:35
natefinchif....19:35
perrito666so there you can go by with the re-login and then re save19:35
natefinchI'll give it a try19:35
=== gsamfira_ is now known as gsamfira
katcowallyworld: i have to run to a preschool orientation, but i added some details to the card for the kvm stuff. i wouldn't mind you taking a look to see if i'm on the right track if you have any free time.21:10
katcoEOD, ciao!21:12
=== vladk is now known as vladk|offline
wallyworldvoidspace: if you're still around, how's the mgo session stuff?22:08
wallyworldthumper: have you started looking at the container issues?22:13
thumperwallyworld: no, have to do hr stuff that I'm already behind on22:13
wallyworldthumper: yeah, i'm behinf also :-(22:14
wallyworldi'll start looking but may need your input22:14
wallyworldi alswo goota do a tonne or hr22:14
voidspacewallyworld: hey, hi22:34
voidspacewallyworld: soooo...22:34
wallyworldhey22:34
voidspacewallyworld: I did some more, completed the transaction runner and a few more collections in the watcher replaced with session copying22:35
voidspacehttps://github.com/voidspace/juju/compare/copy-sessions22:35
voidspacewith an mp for juju/txn22:35
voidspacehttps://github.com/juju/txn/pull/1/files22:35
voidspacewallyworld: I was searching around looking at all the places that need to change and it was a bit daunting22:35
voidspacebecause state.State is basically a big bag of collections that need to be copied any time they're used22:36
wallyworldyep :-(22:36
voidspaceand whilst I was jogging a better solution occurred to me22:36
voidspaceas we shouldn't be reusing those collections they just shouldn't be stored on State22:36
wallyworldi agree22:36
voidspaceinstead a method that fetches the collection for you when you need it - then we can *ensure* that every time they're touched you have a new session22:37
voidspaceand the compiler will tell me all the places to fix22:37
voidspaceso I won't miss any22:37
wallyworldyep22:37
voidspaceso I'm about to do that now22:37
voidspaceunfortunately it makes a little bit of my work so far redundant22:37
wallyworldi think an email to gustavo may be useful just to ensure the right approach is being used22:37
voidspacebut I have a couple of useful functions I put in the mongo namespace22:37
voidspaceniemeyer: ping - I don't suppose you're still around are you?22:38
voidspacewallyworld: ok, I have an email I started22:38
wallyworldi'd like to understand why it was done the way it was in the first place22:38
wallyworldconsidering it seems wrong22:38
wallyworldmaybe we're missing something22:38
voidspacewallyworld: my initial idea was to replace all the collection references with methods to fetch the collection22:38
voidspacebut there's no need for it22:38
voidspacebut I started an email about it anyway22:38
voidspacewallyworld: so the current revision is a useful point - all tests pass22:39
wallyworld\o/22:39
voidspaceand I'm about to embark on the "grand delete"22:39
wallyworldi do thing removing the collections from state is the right approach22:39
voidspaceI'll send the email, but then just begin anyway22:39
voidspaceand if it turns out not to be wise we can just go back a few revisions22:39
wallyworldseems more in line with the expectedusage patterns22:39
voidspaceyep22:39
wallyworldthank you22:39
voidspaceleaving the collections there is dangerous22:40
wallyworldyep, i hate essentially global state like that22:40
voidspaceyou only need to have one place that uses the global session to be at risk (extra risk anyway) of timeout22:40
voidspaceyep22:40
voidspaceso we have one global session - but we basically use that just to store connection details22:40
voidspacefor session copying (which is using socket pooling under the hood anyway)22:40
wallyworldyep, that is how these things are normally architected22:40
wallyworldcahce the credentials, peel off a new session from a pool when needed22:41
wallyworldhence i'd like to see if we're missing anything give tne implementation as it is now seems wrong22:41
voidspaceand deleting those State collections nicely leverages the compiler to tell me when I've found all the places using them22:41
voidspaceyeah, no idea22:41
wallyworldyes indeed22:41
voidspacebut gustavo *agrees* it's wrong and wants the change22:42
wallyworldok22:42
wallyworldin that case jfdi :-)22:42
voidspaceand he said the right approach was to copy the session, deferring close, every time you do something22:42
voidspaceso, going downstairs to do it whilst watching vikings :-)22:42
voidspaceback online in a minute22:42
wallyworldthis will be a nice win - delete global state (shudder), fix stale sessions yada yada22:42
voidspacethere will probably be other places in the code that need work22:43
voidspacewe can grep for mgo.Collection and session22:43
voidspaceI had a look at a few - but some of those are innocent (like using the session immediately after creating it is fine I think)22:43
wallyworldi thik so too, so long as we don't then just hang on to that session and try and use it again later without a clone22:56
voidspaceright22:56
voidspaceso, "go build ./..." reports a few errors23:02
voidspacefollowed by23:02
voidspacestate/addmachine.go:713: too many errors23:02
voidspaceI guess I fix them a few at a time...23:02
wwitzel3voidspace: yeah I never figured out a way to get all of them23:02
voidspacewwitzel3: seeing them all would be very depressing I think23:02
voidspacea few at a time is probably the way to go...23:02
voidspace:-)23:02
voidspacewallyworld: we have a lot of code like23:12
voidspacea.st.units.Name23:12
voidspacewhere st is state and units is the "units" collection23:12
wallyworldyes we do23:12
voidspaceisn't Name *always* going to be "units"?23:12
wallyworldi think so yes ottomh23:12
voidspaceottomh?23:13
wallyworldoff the top of my head23:13
voidspacehah23:13
voidspacethanks23:13
wallyworld:-)23:13
mwhudsonoff the top of my head23:13
mwhudsondoh23:13
voidspacerather than copy the session and get a new collection I'm going to hardcode the name23:13
mwhudsonwas scrolled up :)23:13
voidspaceand see what happens23:13
voidspacemwhudson: morning23:13
voidspacemwhudson: what are you doing here?23:13
mwhudsonvoidspace: i was involved in the juju on arm64 stuff and haven't left yet!23:14
voidspacehah23:14
voidspacecool23:14
voidspaceI'm doing surgery23:14
thumperthat moment when you hear a crash followed by the words "don't move, there is glass everywhere"...23:45
voidspaceoh dear23:47
voidspacethumper: how was tinkerbell?23:47
thumpervoidspace: one said "I literally died", I told her it only "figuratively or metaphorically died"23:49
thumperthe elder said it was 87 minutes of pure pain and 3 minutes of awesome23:49
voidspacehehe23:49
thumperyoungest said "meh"23:49
thumperand she was the one that wanted to see it23:49
thumperso, not wonderful23:49
voidspacemy goodness, that's quite a collection you have23:49
voidspaceI shall knock it off my "must see" list then...23:49
thumperheh23:49
=== Ursinha is now known as Ursinha-afk
voidspacethumper: do you know any reason, beyond a desire not to hardcode strings, to do "state.cleanups.Name" instead of just "cleanups" ?23:53
voidspacethumper: our code is littered with them (accessing column names via the columns - where we know the name)23:53
thumpervoidspace: got a concrete example?23:54
voidspacestate/cleanup.go line 8823:54
voidspacethumper: there are tens of such examples23:54
voidspacepossibly a hundred, I don't know because the compiler just says "too many errors"...23:55
thumperthese are collections not columns23:56
thumperbut no, I think it is just to avoid magic strings23:56
thumpervoidspace: where is it initialized?23:57
voidspacethumper: it's a state.State member created in state.Open (state/open.go) with db.C("cleanups")23:57
thumperpersonally I'd rather have a package level constant: const cleanupCollection = "cleanups"23:59
thumperand use that in state.Open, and in the collection descriptions23:59
thumperbut I can see how it started :)23:59
voidspacethumper: well, I'm removing all those collections from state23:59
thumperI bet it just grew organically from the first use23:59

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