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

thumperwallyworld__: taking the dog for a walk in the hope she'll go outside...00:27
wallyworld__ok00:27
thumpergeez luise01:20
thumpershe has great bladder control holding it for inside01:21
thumperalthough this time, she did go outside01:21
thumperthankfully01:21
thumperonly after we had got back, and I refused to take her inside01:21
thumperwallyworld__: wow some of our code is wonderfully inefficient01:25
wallyworld__thumper: which bit?01:42
thumperwallyworld__: the provisioner, that I'm currently refactoring01:42
wallyworld__ah. good thing you're onto it then01:42
thumperI'm busy teasing apart dependencies01:43
wallyworld__i find not having generics leads to a *lot* of code duplication01:48
thumperI really wish our state methods would return interfaces rather than real structs01:50
thumpermakes mocking and testing a PITA01:50
wallyworld__oh yes +100 to that one01:52
thumperwallyworld__: I've made interfaces for the provisioner on all things that I can01:53
thumperso the new bits take interfaces not structs01:53
wallyworld__\o/01:54
thumperwallyworld__: OMFG03:21
thumperbigjools: ok, can have that talk now03:29
wallyworld__thumper: what?03:41
thumperwallyworld__: my day of refactoring passed the tests first time (once I fixed all the compile errors)  https://codereview.appspot.com/993704603:41
wallyworld__cool, i'll look03:42
bigjoolswallyworld__: need to talk to you, and it's about work.... <shock>04:29
wallyworld__shit eh04:29
bigjoolsit could be04:29
bigjoolsI could just call you but reception is shit so get on a hangout will ya04:30
wallyworld__i thought since you asked you'd create one, but i will04:30
wallyworld__https://plus.google.com/hangouts/_/d3f48db1cccf0d24b0573a02f3a46f709af109a604:31
=== thumper is now known as thumper-cooking
=== tasdomas_afk is now known as tasdomas
rogpeppe1mornin' all06:54
TheMuerogpeppe1: heya07:02
rogpeppe1TheMue: hiya07:02
=== thumper-cooking is now known as thumper
=== TheRealMue is now known as TheMue
fwereade__TheMue, ping08:48
TheMuefwereade__: pong08:55
TheMuefwereade__: just wanted to ping roger ;) but will do it afterwards08:56
TheMuefwereade__: ah, it seems i found what i wanted to ask09:01
fwereade__TheMue, would you please send thumper a link to your lxc work so he can maybe look through it tonight?09:02
TheMuefwereade__: sure, it's a very interesting topic09:03
TheMuefwereade__: will do immediately09:03
TheMuefwereade__: btw, watcher with test is working09:04
dimiternmgz: hey09:23
mgzdimitern: hey09:29
dimiternmgz: how can we go about pairing on implementing the deployer stuff?09:29
mgzI'm open to suggestions09:30
mgzone option is using my vm with go stuff on and screen or something, plus voice09:31
dimiternmgz: not sure i see the process will go - can you expand a bit?09:37
dimiternrogpeppe1: responed to https://codereview.appspot.com/10044043/09:40
mgztrying to remember what jam and I did exactly, basically you just ssh into my canonistack box then run screen with a couple of flags, then we try to not type at the same time :)09:44
dimiternmgz: I see, well we can try it out09:49
dimiternjust as soon as I finish responding to my reviews09:49
mgzsure09:52
dimiternrogpeppe1: responded to this as well https://codereview.appspot.com/10026044/09:59
dimiternlooking for reviews on this: https://codereview.appspot.com/9937045/10:01
dimiternfwereade__: ^^10:02
dimiternmgz: i'm afraid we have to base the deployer stuff on one of my CLs, so until it lands maybe we can discuss it first10:06
mgzthat sounds good10:07
dimiternbut hopefully it won't change much, we can just use it as a prereq before it lands actually10:07
mgzwhat's the branch?10:08
dimiternlp:~dimitern/juju-core/055-api-machiner-subpackages10:08
dimiternassuming we take the same path and develop it first server-side as a subpackage10:09
dimiternthat branch introduces some interfaces and decouples the root api object from the machiner facade10:09
dimiternfwereade__: ping10:10
dimiternmgz: g+?10:10
fwereade__dimitern, pong10:10
dimiternfwereade__: do you have some time to g+ about the general direction of the deployer facade?10:10
fwereade__dimitern, give me 5 mins10:11
dimiternfwereade__: sure10:11
mgzdimitern: can do, but mumble would work as well for this10:12
dimiternmgz: sgtm, if fwereade__ won't mind10:13
mgzah, g+ then if we want him too10:13
dimiternmgz: in the mean time have a look at worker/deployer/deployer.go10:13
dimiternmgz: i have extracted a list of state calls used by it: http://paste.ubuntu.com/5738348/10:14
mgzah, crap, but I need to reboot into chromeos for that...10:14
dimiternmgz: oh, sorry about that10:14
mgzfwereade__: can you install mumble quickly?10:15
fwereade__mgz, dimitern, ok, I am here, I need the bathroom, I will try to get mumble up in a sec10:19
dimiternmgz, fwereade__: we can meet in the Blue room on mumble (Root -> Cloud Engineering -> Blue)10:20
fwereade__cheers10:25
dimiternfwereade__: if you go to settings in mumble and enable push to talk + set the shortcut to something (i use numlock) and hold it while speaking I found it works best10:26
dimiternfwereade__: because the noise/silence detection sucks in mumble10:26
jamespagemgz, bug 118812610:32
jamespagehttps://bugs.launchpad.net/juju-core/+bug/118812610:32
TheMue*: any known problems with the .../worker tests? they timed out here when doing test ./...10:37
mgzjamespage: thanks!10:40
TheMuerogpeppe1: ping10:51
rogpeppe1TheMue: pong10:51
TheMuerogpeppe1: just performing tests including the worker package. had a timeout, tests ran too long.10:52
rogpeppe1TheMue: can you reproduce the problem?10:52
TheMuerogpeppe1: now I took TestOneWorkerStart as a first one to see where it happens10:52
TheMuerogpeppe1: and already this hangs10:52
TheMuerogpeppe1: yes, reproducable10:53
rogpeppe1TheMue: this is with trunk?10:54
TheMuerogpeppe1: had done a pull before and run 1253 (plus my change which is something added, but not used so far)10:55
TheMuerogpeppe1: will go into trunk and try there too, to get sure10:55
rogpeppe1TheMue: if you get a stack trace from the hanging test (with ctrl-\), what does it print?10:55
TheMuerogpeppe1: one moment10:57
TheMuerogpeppe1: strange10:58
TheMuerogpeppe1: the .\... timed out on the shell and from inside the editor10:59
TheMuerogpeppe1: now i'm only in that package and is passes10:59
* TheMue shakes his head10:59
rogpeppe1TheMue: how do you know that the worker package is the one that's failing?11:00
TheMuerogpeppe1: *** Test killed: ran too long.11:00
TheMueFAILlaunchpad.net/juju-core/worker600.005s11:00
TheMuerogpeppe1: and then i started the worker tests from inside the editor with the same result (the output above has been on the shell)11:01
rogpeppe1TheMue: can you kill -QUIT the worker tests that are hanging within the editor, please.11:02
rogpeppe1TheMue: so we can find out what they're hanging11:02
rogpeppe1s/what/where/11:02
TheMuerogpeppe1: btw, just started it in the shell again and it hangs11:03
TheMuerogpeppe1: will paste you the output11:03
rogpeppe1TheMue: thanks11:03
TheMuerogpeppe1: http://paste.ubuntu.com/5738426/11:04
TheMuerogpeppe1: carmen just called me for lunch, biab11:04
rogpeppe1TheMue: oh dammit11:05
dimiternrogpeppe1: https://codereview.appspot.com/10044043/ - need some help on this please11:05
rogpeppe1TheMue: when you get the chance, please run go test -c; then run the resulting binary and kill that11:06
rogpeppe1TheMue: then we won't be seeing two stack traces interleaved11:06
rogpeppe1dimitern: looking11:06
rogpeppe1dimitern: sorry for not responding earlier - i was in a call11:07
dimiternrogpeppe1: np11:07
dimiternrogpeppe1: i'm really bad at phrasing doc comments and will appreciate suggestions like for the Tagger11:08
danilos_dimitern, wallyworld: hi, hangout?11:31
wallyworldok11:32
rogpeppe1dimitern: responded11:32
=== danilos_ is now known as danilos
dimiterndanilos_: uh, yes, forgot we're doing g+ now11:32
dimiternrogpeppe1: cheers11:32
danilosdimitern, https://codereview.appspot.com/9876043/11:34
dimiternrogpeppe1: can we agree to disagree on the apiserver machiner_test? :)11:40
dimiternrogpeppe1: and it's value11:41
dimitern(that it's valueable)11:41
rogpeppe1dimitern: is there anything there that can't be tested just as easily through the client API interface?11:42
rogpeppe1dimitern: i'm not saying the tests themselves aren't valuable11:42
dimiternrogpeppe1: the client-side test is a different one11:42
dimiternrogpeppe1: this is a unit test11:42
dimiternrogpeppe1: the client one is an integration test11:42
dimiternrogpeppe1: and they tests different things11:43
rogpeppe1dimitern: i see the tests in apiserver/machiner and i think that i would like to verify that all of that stuff works from the client all the way to the server11:43
dimiternrogpeppe1: not quite11:43
rogpeppe1dimitern: i think by testing everything through the client, we get the best of both worlds11:44
dimiternrogpeppe1: the client-side doesn't need to care about the correctness of bulk operations: handling parameters and results, as well as permission checks11:44
rogpeppe1dimitern: surely it does11:44
dimiternrogpeppe1: no it doesn't, because the interface as exposed is not about that11:45
dimiternrogpeppe1: permissions yes, but not bulk ops11:45
rogpeppe1dimitern: you mean because we don't expose the bulk operations currently as part of the machiner client API?11:45
dimiternrogpeppe1: and the permissions are already tested at server side11:45
dimiternrogpeppe1: yeah11:45
rogpeppe1dimitern: this feels wrong to me11:46
rogpeppe1dimitern: all the way along we have implemented client functionality that gives us access to the operations supported by the server11:46
dimiternrogpeppe1: client-side tests are about how you use the interface as a client, not so much how the transport layer works11:46
rogpeppe1dimitern: and this is breaking that correspondence11:46
dimiternrogpeppe1: don't you agree unit tests are a good thing?11:47
rogpeppe1dimitern: i think more test coverage is a good thing11:47
rogpeppe1dimitern: and AFAICS by putting the tests on the server side only, we get less test coverage11:48
rogpeppe1dimitern: whereas if we do it at the client side, we get to test the full path almost for free11:48
dimiternrogpeppe1: exactly11:48
dimiternrogpeppe1: and also testing at the right place11:48
dimiternrogpeppe1: no, they are client-side tests in the follow-up11:48
dimiternrogpeppe1: testing end-to-end only is not sufficient imho11:49
rogpeppe1dimitern: really? why not?11:49
rogpeppe1dimitern: what can you test on the server side that you cannot test end to end?11:49
dimiternrogpeppe1: and incurrs the overhead of starting a server when you need only to test the server-part in isolation11:49
rogpeppe1dimitern: starting a server takes microseconds11:50
dimiternrogpeppe1: as i already mentioned, bulk operations, parameters handling, permissions, results11:50
rogpeppe1dimitern: we should have client entry points for the bulk operations. i'm not sure how the rest aren't (or can't) be tested with end-to-end tests11:50
rogpeppe1dimitern: that's how it's all going to be used, after all11:51
dimiternrogpeppe1: we don't need client-side bulk entry points for the machiner yet11:51
dimiternrogpeppe1: but we need to support them at transport level, as agreed11:51
rogpeppe1dimitern: i think we should have them anyway, so we can test them end to end11:51
rogpeppe1dimitern: it's not much code, as fwereade__ keeps on reassuring me11:52
dimiternrogpeppe1: ok, i think we're in a vicious circle here11:52
dimiternrogpeppe1: we need to test both sides11:52
fwereade__rogpeppe1, dimitern, damn, I meant to address this before11:52
fwereade__rogpeppe1, dimitern, shall we have a quick g+?11:52
rogpeppe1fwereade__: sure11:52
dimiternfwereade__: what?11:52
dimiternfwereade__: ok11:53
TheMuerogpeppe1: http://paste.ubuntu.com/5738483/ <= this one is by calling the test binary11:53
dimiternfwereade__: shall I start one or you will?11:53
rogpeppe1TheMue: thanks. that's more useful.11:54
fwereade__dimitern, would you, just finishing an email11:54
dimiternfwereade__: sure11:54
TheMuerogpeppe1: great11:54
dimiternrogpeppe1, fwereade__: https://plus.google.com/hangouts/_/1842432ac5d47d4b006b6679b49cb3d836c8163f?authuser=0&hl=en11:55
AeroNotixWhen using the goose Nova binding, is the client expected to provide an imageRef themselves?12:28
AeroNotixI have a similar set of bindings and I'm at a loss at how to combat the ever-changing list of images.12:29
TheMue*: one CL for review: https://codereview.appspot.com/1007804312:30
=== BradCrittenden is now known as bac
=== gary_poster|away is now known as gary_poster
dimiternrogpeppe3: can you sketch out an idea of how requireMachiner should look like?13:50
dimiternrogpeppe3: not sure about the check "is machine"13:51
rogpeppe3dimitern: http://paste.ubuntu.com/5738805/13:51
rogpeppe3oops13:52
rogpeppe3dimitern: s/requireAgent/requireMachine/13:52
dimiternrogpeppe3: ah, ok, so it's simpler than i thought13:52
rogpeppe3dimitern: not too bad, eh?13:52
dimiternrogpeppe3: will add it in machiner.new13:52
rogpeppe3dimitern: cool13:53
dimiternrogpeppe3: indeed13:54
dimiternrogpeppe3: and then there's this: https://codereview.appspot.com/10026044/13:55
rogpeppe3dimitern: FWIW i think we could just have api.Machine13:56
rogpeppe3dimitern: and have it talk to whatever facade is appropriate13:56
dimiternrogpeppe3: not really, because machiner.Machine and provisioner.Machine, etc. are different13:57
rogpeppe3dimitern: we could quite easily keep them compatible13:57
dimiternrogpeppe3: i think the point of the separation is not making them compatible13:57
rogpeppe3dimitern: ah. i thought the reason was security.13:58
dimiternrogpeppe3: that's the main part of it13:58
dimiternrogpeppe3: not having a method you can call is the best security, isn't it?13:59
rogpeppe3dimitern: on the server side, yes.13:59
dimiternrogpeppe3: and will catch issues like this at compile time13:59
=== rogpeppe3 is now known as rogpeppe
dimiternoh well.. kanban time13:59
rogpeppedimitern: agreed. it depends how much code we're willing to write for that.14:00
=== wedgwood_away is now known as wedgwood
rogpeppetime to reboot. this machine is becoming unusable.14:44
=== BradCrittenden is now known as bac_
dimiternrogpeppe: so wrt unifying ServerError and ServerErrorToParams14:58
dimiternrogpeppe: the only thing that needs wrapping is the param to conn.Serve in apiserver.go14:59
rogpeppedimitern: i'm not sure i understand15:00
dimiternrogpeppe: i'd still rather have separate helpers, but if you insist, I'll create a serverError there locally which will call common.ServerError and converting the result to error15:00
rogpeppedimitern: why can't serverError serve both purposes?15:00
rogpeppedimitern: you'll need to type-convert the result, but i don't think that's a big issue15:01
dimiternrogpeppe: because conn.Server needs func (error) error15:01
dimiternrogpeppe: and in all other places I need *params.Error, not error15:01
rogpeppedimitern: serverError(err).(*params.Error) ?15:02
dimiternrogpeppe: it's not a method call, it's a callback15:02
dimiternrogpeppe: so I need to pass something that takes error, calls common.ServerError internally and returns error15:02
rogpeppedimitern: i mean: keep serverError as it is (but make it always return *params.Error for non-nil errors). then do the above if you want a params.Error15:03
rogpeppedimitern: then there's no need for two separate error types (api.Error and params.Error)15:04
rogpeppedimitern: or for the somewhat awkwardly named ServerErrorToParams15:04
dimiternrogpeppe: it has to be something like: err1 := common.ServerError(err); if err1 != nil { return err1.(error) }15:04
rogpeppedimitern: in all the cases you're currently using ServerErrorToParams, you've got that err != nil check anyway15:05
dimiternrogpeppe: just a sec, let me paste it15:05
jtvHi folks — quick question if you don't mind.  Is this test failure normal?  http://paste.ubuntu.com/5738993/15:06
jtvIt looks a bit like the machine's speed just happens to be barely out of the test's tolerance range or something.15:06
rogpeppedimitern: alternatively do as you suggested above: make a local closure in side serveConn15:06
rogpeppejtv: i haven't seen that failure before, but that test is quite new15:07
* rogpeppe hates timing-sensitive tests15:08
jtvrogpeppe hates with reason.15:08
rogpeppejtv: i think the test just needs more wiggle room15:09
jtvHeh.15:09
rogpeppejtv: feel free to propose a change that ups it to 200ms or so15:09
dimiternrogpeppe: http://paste.ubuntu.com/5739005/ something like this15:09
jtvrogpeppe: I'll try to get other tests running first though... not feeling very lucky today!15:09
=== racedo` is now known as racedo
rogpeppedimitern: that looks ok. i'm not sure i'd bother with the separate func for serverError though - just inline it in the call to conn.Serve15:10
dimiternrogpeppe: that's nasty :) but might do15:11
rogpeppedimitern: oh, one other thing:15:11
dimiternrogpeppe: or just make it serverError := func(error) error { ... }15:11
rogpeppedimitern: that's fine too15:11
rogpeppedimitern: you'll need to check if the error returns an error code15:12
dimiternrogpeppe: why?15:13
rogpeppedimitern: and use that error code if o15:13
rogpeppeso15:13
dimiternrogpeppe: not sure i get you15:13
dimiternrogpeppe: you mean in common.ServerError at the end?15:13
rogpeppedimitern: yeah15:13
=== bac_ is now known as bac
rogpeppedimitern: it means that API server code can return coded errors if they want15:14
dimiternrogpeppe: I'll look into it (hopefully some tests will fail if I mess it up :)15:14
rogpeppedimitern: good point. i'm not sure that functionality *is* specifically tested. you'll probably want to add a test.15:15
rogpeppedimitern: ah, actually that functionality is tested15:16
dimiternrogpeppe: so then it becomes: http://paste.ubuntu.com/5739032/15:16
rogpeppedimitern: and the test will indeed fail15:16
rogpeppedimitern: not quite15:16
dimiternrogpeppe: that's a direct translation of what happens when servererrortoparams is removed15:17
dimiternrogpeppe: and integrated into servererror15:17
rogpeppedimitern: code will never be non-empty on line 1715:18
dimiternrogpeppe: how did it work before?15:18
rogpeppedimitern: it returned the error unwrapped15:19
rogpeppedimitern: i think you want something more like this: http://paste.ubuntu.com/5739044/15:20
rogpeppedimitern: oops15:21
rogpeppedimitern: this: http://paste.ubuntu.com/5739046/15:21
rogpeppedimitern: oops, wrong still15:21
rogpeppedimitern: better i think: http://paste.ubuntu.com/5739049/15:21
dimiternrogpeppe: ok, sgtm15:24
jtvBuild failure in trunk as well?  ../../../go/src/launchpad.net/juju-core/environs/openstack/provider.go:592: undefined: identity.AuthKeyPair15:42
jtvI wonder why that didn't affect my testing.15:42
mgzjtv: just the normal "you need to pull lp:goose" thing? trunk builds for me15:45
jtvmgz: I haven't been on juju for a while... what is the "normal you-need-to-pull-lp:goose" thing?  Mind you this is a completely fresh "go get launchpad.net/juju-core/..." from scratch.15:46
mgzcompletely fresh? I'd double check your latest revs in launchpad.net/goose15:48
mgzbecause your error strongly suggests you have an older goose15:48
mgzwhich won't cook as well15:48
jtvmgz: yes, completely fresh — cloud instance15:49
mgzI'm on r95 "Add juju-tools keystone endpoint and fix tests"15:49
jtvOh, of course I just discarded my instance.  The compile error is on a different system.  Sigh.15:50
jtvmgz: ah... I'm on a much older revision — "go get launchpad.net/goose" didn't update it apparently.15:51
mgzindeed not15:52
jtvmgz: apparently the branch URL has changed... how do I fix that?15:53
rogpeppehmm, my 2-factor auth is no longer working. any suggestions anyone?15:54
mgz`bzr pull --remember lp:goose`15:54
mgzrogpeppe: use your carefully prepared backup15:54
rogpeppemgz: the keyfob itself is working fine15:54
rogpeppemgz: but i see "The password is invalid" when I try to log in with it15:55
rogpeppemgz: hmm, maybe i messed up "Do not activate your authentication device when not needed. Extra activations will get your device out of sync with the server and lock you out of your account."15:55
jtvmgz: that updated it, thanks!  I thought I'd run a "go get -u launchpad.net/juju-core/..." which I assumed would update my dependencies.15:55
mgzif you only have one device regiestered, and it's desynced, you need to ping webops in #webops15:55
mgzrogpeppe: ^15:55
mgzjtv: go get is not very smart, and bzr recording resolved locations messes it up15:56
rogpeppemgz: thanks, i'll try that. hopefully that's the problem.15:56
rogpeppemgz: i didn't know the devices were synced. that seems highly fragile to me.15:56
mgztimebased auth is much nicer15:57
mgzbut this way is simple, and easily fixable if you have a backup (generally just remove and readd the device)15:58
rogpeppemgz: yeah. or challenge response can work ok too.15:58
rogpeppemgz: readd ?15:58
mgzthat's not really yubikey accessible though15:58
mgz^re-add15:59
mgzgenerate a new seed, register device with it, start on fresh sequence15:59
rogpeppemgz: ah i see16:00
rogpeppemgz: if i'd had any idea that pressing the button one two many times would be a problem, i would have been a bit more careful16:00
rogpeppes/two/too/16:00
rogpeppemgz: are you sure #webops is the place? perhaps #admin or something might be better?16:02
gnuoyrogpeppe, web0ps do 2fa resets, and they hangout in #web0ps16:03
dimiterngnuoy: tis with "0" (zero) or upper-case "O"?16:04
gnuoydimitern, sorry I am in the habit of not typing the word as it causes them (and I am one) to be pinged16:05
dimiterngnuoy: so web0ps is the magic word, good to know :)16:05
gnuoydimitern, sorry, no. It is webops and #webops16:06
dimiterngnuoy: ah, ok16:06
mgz(on the internal server, not freenode, too)16:06
dimiterngnuoy: now i got you :) sorry16:06
gnuoydimitern, np, sorry for causing the confusion :)16:07
dimiternjtv: that's a very good skeleton you have there16:09
fwereade__a second review of https://codereview.appspot.com/9698047/ would be good, it's almost trivial16:09
dimiternjtv: will you develop most of it like the maas provider?16:09
dimiternfwereade__: i'm on it16:09
jtvdimitern: so far it's been _exactly_ like the maas provider.  :)16:10
fwereade__TheMue, ping16:10
=== BradCrittenden is now known as bac
dimiternjtv: :) i meant in a separate branch16:14
jtvdimitern: ah, no, we won't be doing that this time.  Too much integration pain.16:15
jtvThat's why I put this up for review now.16:15
* jtv → eod16:15
dimiternjtv: ah ok16:16
dimiternrogpeppe: https://codereview.appspot.com/10044043/ all done I think16:18
dimiternrogpeppe: if you think it's worth an lgtm now i'd like to land it16:20
rogpeppedimitern: i'm looking now16:20
rogpeppedimitern: reviewed16:33
fwereade__danilos, ping16:33
dimiternrogpeppe: cheers16:34
dimiternrogpeppe: are you sure you want to leak info by reporting CodeNotFound when id != "" and we haven't checked the user is authorized?16:37
rogpeppedimitern: i don't think i'm suggesting that. i'm suggesting returning errBadId in that case16:38
dimiternrogpeppe: istm it good to always first check for authorization16:38
rogpeppedimitern: which doesn't leak any info at all16:38
dimiternrogpeppe: hmm..16:38
dimiternrogpeppe: ok, i'll go with this, but seems fishy16:38
rogpeppedimitern: when/if we start using the ids in this case, we will check first16:39
rogpeppedimitern: in that case, we'll probably pass the id into machiner.New16:39
dimiternrogpeppe: yeah, fair enough16:39
dimiternrogpeppe: if we lose the ErrNotLoggedIn returned from RequireMachiner, we'll need to have IsLoggedIn() bool in the Authorizer and check that separately16:47
rogpeppedimitern: hmm, i wonder if a simple ErrPerm would be good enough in that case16:48
dimiternrogpeppe: that'll change the login_test16:48
dimiternrogpeppe: and complicate things16:48
dimiternrogpeppe: so I prefer to have a separate check in root.Machiner() to return ErrNotLoggedIn as well as now16:49
rogpeppedimitern: that seems reasonable actually16:49
dimiternrogpeppe: ok16:49
rogpeppedimitern: then it's easy to check that all the root methods check for logged-in-edness16:50
rogpeppedimitern: and it's up to the individual facades to decide on further checks16:50
dimiternrogpeppe: exactly16:50
=== tasdomas is now known as tasdomas_afk
dimiternrogpeppe: last time for today, i promise :) https://codereview.appspot.com/10026044/ - you already reviewed it once, I fixed it as suggested, and the version arg is gone now17:21
rogpeppedimitern: looking17:22
rogpeppedimitern: oh darn, you've merged trunk17:22
dimiternrogpeppe: what?17:22
rogpeppedimitern: i'm seeing lots more diffs than i should17:22
rogpeppedimitern: between patchset 4 and 517:23
dimiternrogpeppe: when i proposed it the diff was screwed, so i repropsed17:23
dimiternrogpeppe: i haven't merged trunk17:24
rogpeppedimitern: ah, sorry, i thought it was the other CL again!17:24
dimiternrogpeppe: np17:24
rogpeppedimitern: can't we just delete the id argument to api.State.Machiner, as we discussed?17:28
rogpeppedimitern: reviewed17:29
dimiternrogpeppe: not unless we need to test it17:32
dimiternrogpeppe: and i'd like to have a test for id != ""17:33
rogpeppedimitern: you could use Call directly for that17:33
rogpeppedimitern: that's the kind of thing it's there for17:33
dimiternrogpeppe: that's seems wrong17:33
rogpeppedimitern: it seems wrong to me to clutter the user-facing client API with meaningless parameters17:34
rogpeppedimitern: you could put another method in export_test.go if you don't want to use Call17:34
dimiternrogpeppe: well, ok, it's a compromise I can live with for now :)17:34
rogpeppedimitern: in fact there are quite a few methods we should probably test with non-nil ids (the Client entry points, for example)17:34
dimiternrogpeppe: agreed17:35
rogpeppedimitern: so a table-driven test using Call could work ok there17:35
dimiternrogpeppe: in the apiserver you mean?17:35
rogpeppedimitern: i was thinking in the api client, but you could do server tests instead, yes17:36
dimiternrogpeppe: that'll be better I think17:37
dimiternrogpeppe: so that we don't need to expose them all the way to the client17:37
rogpeppedimitern: if you use Call, you wouldn't have to17:38
rogpeppedimitern: but i'm ok either way. this is trivial functionality and not actually important in any way that i can really think of.17:38
dimiternrogpeppe: I can add a state_test.go in the api client and test with call17:39
dimiternrogpeppe: then just drop it and add a todo instead?17:39
dimiternrogpeppe: to do it in a follow-up17:39
rogpeppedimitern: seems ok to me17:39
dimiternrogpeppe: ok then17:41
dimiternI'm off to pack17:54
dimiterngood night all!17:54
andreas__why do I need to add the "local:" prefix when deploying a charm from my disk? Isn't --repository /foo/bar/ specific enough?17:59
fwereade__andreas__, --repository just overrides the value of $JUJU_REPOSITORY, which might always be set, but doesn't always imply "look in a local repo" unless specified via the charm schema18:49
fwereade__andreas__, I see your point, but I think it's a bit cleaner to have --repository and JUJU_REPOSITORY match in usage as well as meaning, rather than layer on extra cleverness in --repository that doesn't really fir with the env var18:51
ahasenackfwereade__: --repository /foo/bar charm-name has surprising results19:10
rogpeppeg'night all19:18
=== BradCrittenden is now known as bac
thumpermorning21:10
hatchmorning21:12
hatch /afternoon21:12
hatch:)21:12
* thumper is now heads up after email reading21:35
thumperhmm... coffee21:35
fwereade__thumper, want to chat about the provisioner briefly?22:35
fwereade__thumper, short version: yes, the machines watcher can be expected to deliver an initial event that represents the complete set of known machines22:46
fwereade__thumper, subsequent events delivered are relative to that base "change"22:48
fwereade__thumper, if any machine enters the set, you'll be informed22:48
fwereade__thumper, if any machine in the set becomes dying, you'll be informed22:48
fwereade__thumper, if any machine in the set is removed *or becomes Dead*, you'll be informed, and will receive no further notifications for that id22:49
fwereade__thumper, calling AllMachines just raises questions of raciness that are *probably* ok but not trivial to analyse22:50
fwereade__thumper, and it seems unnecessary since we have this type sitting there that's designed to send precisely the information necessary to maintain a consistent view of the set of machines in play over the lifetime of the watcher22:53
=== wedgwood is now known as wedgwood_away
thumperfwereade__: oh hai23:07
thumperfwereade__: was taking the dog for a walk23:07
thumperfwereade__: given this knowledge then, I'll refactor a little...23:09
fwereade__thumper, nice weather for it?23:09
=== wedgwood_away is now known as wedgwood
thumperfwereade__: is actually, sunny and cool (well cold)23:14
thumperbut nice23:14
thumpergiven what you have said about the watcher23:15
thumperI think we can get rid of the "all machines" bit23:15
fwereade__thumper, I'm starting to think wistfully of that sort of wather23:15
fwereade__thumper, cool, I'm glad that makes sense23:15
fwereade__thumper, I think it's a strict simplification23:15
thumperyeah23:15
thumpershouldn't be too hard23:15
thumperrogpeppe had a lot of good changes for loggo too23:15
thumperbut includes breaking API23:16
fwereade__thumper, awesome23:16
fwereade__thumper, bah23:16
thumperso would need to land branches in parallel23:16
thumperbecause we don't have library dependencies :)23:16
* fwereade__ sighs wistfully23:16
thumperperhaps soon23:17
thumpermaybe23:17
=== wedgwood is now known as wedgwood_away
wallyworldfwereade__: i was going top ask you about the machineContainer stuff but it's very late for you23:23
fwereade__wallyworld, I responded to your CL I think, saying essentially machineContainer is good but quibble quibble quibble bikeshed bikeshed23:23
thumper:)23:24
wallyworldfwereade__: yeah, saw that thanks. question though - if we have fast regex queries, then there's really no need for the children slice23:24
fwereade__wallyworld, I've realised there is, I think23:24
wallyworldok. i notice you also nixed by surrogate key :-)23:25
fwereade__wallyworld, when we're able to watch an index of documents we care about, in a single document, we get to avoid watching a whole collection23:25
fwereade__wallyworld, grep for globalKey in state23:25
wallyworldok23:26
fwereade__wallyworld, no objection to the concept, but would prefer to maintain convention when context does not specifically indicate otherwise23:26
arosalesdavechaney around?23:26
wallyworldthanks for the input. will push up something today23:26
wallyworldfwereade__: also, i'll think about the txrevno - i do think it is required since the documwent has to be loaded, modified, and saved again23:27
wallyworldand that is not atomic23:27
wallyworldi think settings uses it for the same reason23:28
wallyworldthumper: you ok to +1 that clean flag branch?23:29
fwereade__wallyworld, the model is more for a client to make exactly the document change it needs, asserting only the minimal conditions that must pertain to maintain consistency in state23:29
fwereade__wallyworld, settings is crazy23:29
thumperwallyworld: I can take a look23:30
wallyworldfwereade__:  ok. i'll have to think about it some more. i can't tight now see how we can do it without the possibility of two threads adding a container and stomping on each other23:30
wallyworldthumper: i didn't change anything, just answered your question23:31
thumperwallyworld: I'd have to page in the information, so can't +1 just yet23:31
wallyworldsure23:31
thumperhence needing to look at it again :)23:31
thumpermy brain holds only so much in active state :)23:31
fwereade__wallyworld, so, briefly, there are mongo ops like $addToSet that we can use in transactions23:34
wallyworldok, will look into that23:35
wallyworldthanks23:35
fwereade__wallyworld, yeah, $addToSet and $pull are used on the Principals and Subordinates fields that this is exactly analogous to23:47
wallyworldfwereade__: i also have the issue that the machineContainers doc might not exist yet23:48
wallyworldso i need to create sometimes and update via $addToSet other times23:48
wallyworldso there's still a potential race condition23:49
wallyworldwith Principals, the doc always exists23:50
thumperwallyworld: I'm out for a bit, back hopefully in 30-40 minutes23:50
fwereade__wallyworld, for simplicity you could just create it alongside the machine doc, earlier in the ops list, and remove it later in its removal ops, such that the existence of a machine document always implies the existence of the containers doc?23:50
=== thumper is now known as thumper-afk
wallyworldfwereade__: thought about that but seems very wasteful since the machine may not even have a container added and we may hav lots of machines?23:51
fwereade__wallyworld, if you ever get a mongo NotFound from such an ancillary document, you can infallibly infer that the parent document was removed23:51
fwereade__wallyworld, they're tiny documents23:52
wallyworldok. i'll create one regardless when a machine is created. it feels very dirty to me to have to do that though23:52
fwereade__wallyworld, I infer that given http://docs.mongodb.org/manual/faq/developers/#how-do-i-optimize-storage-use-for-small-documents -- in which it recommends the possibility of noticeably reducing overhead by using shorter field names -- that we're not going to be paying a significantly greater storage cost by moving som of those field names to a distinct document with a clear purpose23:55
wallyworldok. thanks. i'll read that faq also23:56
fwereade__wallyworld, I would very much prefer not to go down the route of mangling our field names for the db's convenience until I get evidence that it's a source of trouble for us23:56
fwereade__;p23:57
wallyworldi never suggested we mangle field names i don't think23:57
fwereade__wallyworld, no, I wasn't trying to imply you were23:57
wallyworldah ok :-)23:58
fwereade__wallyworld, I'm saying that if the few bytes per document to store the string keys, which will indeed be somewhat repetitive, are a significant enough factor to recommend tweaking, the additional db-imposed overhead is going to be of a similar order of magnitude for that sort of change to be effective23:59

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