/srv/irclogs.ubuntu.com/2014/11/12/#juju-dev.txt

menn0cmars: done with the review00:06
cmarsmenn0, thanks!00:06
menn0davecheney: you have a ship it from me although I see you already had Tim's approval on GH00:09
=== Spads_ is now known as Spads
=== kadams54 is now known as kadams54-away
thumperdavecheney: I edited that message before it emailed...00:39
thumperI missed out a word00:39
thumperdavecheney: what I mean is "all good, land it!"00:40
davecheneythumper: cool00:46
davecheneyi'll have to do a big branch to fix the callers of this  type00:46
davecheneythere are a lot00:46
davecheneyand a lot of tests panic00:46
davecheneynow00:46
davecheneythat doesn't mean they are wrong00:46
davecheneybut they could be wrong00:47
davecheneyit depens on the state of the set passed in00:47
davecheneyfor the record, this showed up doing a code review with ericsnow00:47
davecheneyi suspect he'd figured this out00:47
davecheneyand had worked around the problem00:47
davecheneywhich prompted me to look a little closer00:47
* thumper nods00:54
=== fuzzy_ is now known as Ponyo
davecheneymenn0: https://github.com/juju/juju/pull/110801:17
davecheney^ this is the kind of cleanup that suggests this refactor is on the right track01:17
menn0davecheney: just finishing another review01:18
davecheneys'ok01:18
davecheneyno hurry01:18
davecheneythis will be the last one I do on this today01:18
davecheneyneed to do cleanup from the set.Strings change01:18
menn0anastasiamac_: just reviewed 407 for you01:35
anastasiamac_menn0: thx!!!01:36
LinStatSDRHello :D01:37
menn0davecheney: that change looks good and paves the way for allowing the watcher to work in a multi-env state server01:44
menn0davecheney: how do we feel though about types defined in state being used as part of the API?01:44
thumperdavecheney: was the top level juju file there just to allow moving things around?01:46
thumperdavecheney: my first thought was "WTH is that doing there?"01:46
* thumper is +1 on the fix01:46
menn0davecheney: with your changes, Delta is defined in state/multiwatcher and is used by the multiwatcher internally, but is also used for the allwatcher API01:47
menn0davecheney: ultimately there might need to be a related struct defined in the API that returns Deltas01:48
menn0davecheney: that might happen when we do the multi-env support for the multiwatcher but I think we might want to change state/megawatcher/Delta anyway01:49
davecheneymenn0: api/ or apiserver/ ?01:56
davecheneyapiserver, i'm fine with01:56
davecheneyapi, not so much01:57
davecheneythat's at the end of the list01:57
davecheneyit will mean params has to translate between state/multiwatcher types and apiserver/params01:57
menn0well right now Delta is used in api/01:58
davecheneyyeah01:58
davecheneyit's not awesome01:58
menn0api/allwatcher.go01:58
davecheneybut it is what it is01:58
menn0I think ultimately we want apiserver to have its own type for this with some translation done there01:58
davecheneyyup01:59
davecheneyit's on the list01:59
menn0especially if Delta in allwatcher is going to grow some extra (internal-only) bits, which i suspect it will with multi-env suport01:59
menn0ok, as long as it's on the roadmap01:59
menn0davecheney: I think you could have easily moved MachineInfo, ServiceInfo etc etc in this PR as well02:00
thumperugh02:01
* thumper spotted shitty code he wrote some time ago02:01
menn0oh FFS, will you people stop getting shit done :)02:04
menn0more things to review02:04
=== kadams54 is now known as kadams54-away
=== kadams54-away is now known as kadams54
=== kadams54 is now known as kadams54-away
waiganimenn0: talking of which http://reviews.vapour.ws/r/409/ ;)02:13
menn0waigani: that's what prompted my outburst :)02:15
waiganimenn0: LOL, your welcome :)02:15
menn0waigani: I have been reviewing non-stop all day02:15
waiganimenn0: can you see the matrix yet?02:17
thumpermenn0: https://github.com/juju/testing/pull/37/files02:39
thumper:)02:39
menn0thumper: looking in a sec02:45
menn0waigani: any upgrade steps should now be targeted to 1.22. I just realised you've put some against 1.21. That needs to get fixed.02:46
waiganimenn0: ah yeah right02:47
menn0waigani:  have any changed merged already where this isn't right?02:47
waiganimenn0: so settings was the last upgrade step I merged, that went in on Monday02:48
menn0yeah, they need to be fixed too02:50
menn0that was after the 1.21 cut02:50
menn0settings and settingRefs02:50
menn0waigani: ^02:50
waiganimenn0: yep, I'll move them02:50
menn0thumper: done.02:55
thumperta02:56
thumpergeez02:56
thumpernit pick much02:56
thumperbut...02:57
thumpergood review02:57
* thumper will tweak02:57
thumpermenn0: here is another https://github.com/juju/errors/pull/1202:58
menn0thumper: that errors change looks fine although it appears to be used in a number of places in Juju. Are you going to change those?03:10
thumpermenn0: yup03:10
thumperright now03:10
menn0thumper: "it" being LoggedErrorf of course03:10
thumperyeah, I knew what you ment03:10
thumpermeant03:10
thumperwhich rhymes with bent03:10
thumpergot I hate the english language03:10
waiganimenn0: done.03:12
thumpermenn0: although I can't change juju until the branch has landed (well, make it work anyway)03:14
menn0thumper: doesn't it make slightly more sense to change juju first?03:14
thumpermenn0: umm... sure03:15
menn0wallyworld_: do we need to poke someone to get either https://github.com/juju/juju/pull/993 or https://github.com/juju/juju/pull/689 in?03:56
menn0wallyworld_: seems like an important fix to get in that hasn't due to poor handling of the review process03:56
wallyworld_menn0: oops, yeah, i'll take a look03:57
menn0wallyworld_: cheers03:59
wallyworld_menn0: only trouble is that there's a dependent goose mp on lp that needs fixing, so i'll have to follow up with the author of that mp04:02
menn0wallyworld_: right. just wanted to point the PRs out since they didn't seem to be moving.04:04
wallyworld_yep, np, thanks, they had been forgotten about for sure04:04
thumperfuckity fuck fuck04:16
* thumper is fixing an intermittent error in the actions time checking04:18
thumpermenn0: https://github.com/juju/juju/pull/111004:47
thumperwhich is http://reviews.vapour.ws/r/410/04:49
=== liam_ is now known as Guest46061
=== urulama___ is now known as urulama
=== Spads_ is now known as Spads
mattywmorning all09:00
jamTheMue: standup ?10:02
perrito666morning-ish10:06
voidspacejam: it occurs to me that 404 might be different10:39
jamk10:39
jamvoidspace: how so10:39
voidspacejam: I think if we get a 404 maas might bomb out and not stop the other instances10:39
voidspacejam: with a 409 it collects all the errors10:39
voidspacejam: let me check10:39
jamvoidspace: so if you ask to stop 10 things, and *one* is a 404, it bombs out early.... :(10:40
voidspacejam: yep, confirmed10:40
voidspacejam: damn, my branch was ready10:40
voidspacehttps://github.com/voidspace/juju/compare/maas-40410:40
voidspace:-(10:40
voidspacebut in the release bulk call it first checks that the number of found nodes matches the number requested10:41
jamvoidspace: k... do we have a way to know which item was causing the 404 ?10:41
voidspaceand raises a PermissionDenied10:41
voidspacejam: parsing the message...10:41
jamvoidspace: my concern is that if you got your environment into that situation, how do you get out of it?10:41
jamvoidspace: I guess if this is "destroy-environment --force" then its ok because we're only listng the MaaS server anyway10:41
voidspacejam: http://pastebin.ubuntu.com/8961592/10:42
jamand it won't have it10:42
jamvoidspace: so is that 404 or is that PermissionDenied ?10:42
voidspacejam: what do you mean by "only listing MaaS server anyway"10:42
jammaybe they translate PermDenied to 40410:42
voidspacemaybe, but any missing for any reason will show up like that10:43
jamvoidspace: it *should* be 403 Perm10:43
voidspaceI think in that code they're assuming that if a node is not found it's because of permission10:43
jamvoidspace: its a fair point to not distiguish from 403 and 40410:43
voidspacethe release single call (api) does an object_or_40410:43
jamsince otherwise you can leak the existence (or not) of something10:43
jamthat you don't otherwise have permission to see10:43
voidspaceright10:43
voidspaceit's an incompatibility between those two calls though10:44
voidspaceso handling 404 in StopInstances is pointless10:44
jamso there is still a small concern on the "destroy-environment --no-force" case10:44
voidspaceThe single call /api/node/<system-id>/op=release   can 40410:45
jamwhich is that the API server still wants to stop an instance that it knew about10:45
voidspaceif one node has been deleted but the rest are present, then the call to StopInstances will fail without releasing any10:45
jamvoidspace: it sounds bug worthy that "single node release == 404" but "bulk node release == 403"10:46
voidspacejam: I'll raise it10:46
voidspaceso, for a 403 we could loop over the system ids and stop the nodes individually - or we could parse the error message and retry without the missing nodes10:47
voidspaceparsing the error message sounds fragile10:47
jamvoidspace: it does... my concern is that we are asking the API server to tear down nodes it knows about, and not giving any way for it to handle nodes that are already gone.10:48
voidspacejam: for a 403 I can retry removing the instances individually and ignore 403/404/40910:49
voidspacejust logging as a Warning10:50
jamvoidspace: so, not being able to "destroy-environment" because a machine was decommisioned in maas does sound like a poor user experiience failure mode, but it could be considered a different bug10:51
voidspaceso either fix it now, or right this discussion up as a new bug10:51
voidspaceit doesn't seem to have hit anyone yet10:51
voidspaceand it's easy enough to fix if we need to10:51
voidspacethe sympton will be destroy environment failing with a 403 error and not releasing any nodes10:52
jamvoidspace: I feel like "we know this is an easy to fix bug, but we won't address it now" isn't great. I'm wondering if we need to involve more people or if we've discussed it sufficiently to be confident in the fix10:52
voidspacejam: well, I'm pretty confident of my reading of the maas code - it seems straightforward10:54
voidspaceah, wait...10:54
voidspacehah10:54
voidspacejam: in fact... there's a call to self._check_system_ids_exist first10:54
voidspacejam: that raises MAASAPIBadRequest if nodes don't exist10:54
voidspacejam: so the PermissionDenied really does mean that the nodes failed to be found because of the permissions problem10:55
jamvoidspace: right, but we still need to handle MAASAPIBadRequest10:55
voidspaceand BadRequest isn't a 404 either10:55
voidspace400 I assume10:55
voidspaceso same problem, different number10:56
voidspaceand should we handle 40310:56
voidspacethe node was released and given to someone else10:56
jamvoidspace: it sounds like we should test to see if we can actually make it happen, and then do as you say "kill in bulk, then go 1-by-1"10:56
voidspacesame problem as with a missing node - now we can't destroy environment10:56
voidspacejam: ok, I'll try deleting the node and check that we fail to destroy environment with a 40010:57
voidspaceand treat 400/403/404 in the same way10:57
jamvoidspace: note that I would expect "juju destroy-environment" to maybe complain on the API server side, but the client-side cleanup to be fine because it just lists the maas provider10:57
jam(though there is still potentially a race)10:57
voidspacejam: so you would want the --no-force to fail - or just warn?10:58
jamvoidspace: if the failure is that the node is already gone, destroy-environment should succeed10:58
voidspaceright10:58
voidspaceso what do you mean by "complain"?10:59
jamvoidspace: I mean that today10:59
jamthe "soft shutdown" is likely to fail10:59
voidspaceah, I see10:59
voidspaceright10:59
voidspaceit did for 40910:59
jambut the hard shutdown doesn't know anything about the missing node10:59
voidspacehence the bug - and even with today's code it should die with a 40010:59
voidspaceright, missing nodes shouldn't be a problem for --force11:00
voidspaceunderstood11:00
voidspaceok, I'll try it and see what happens11:00
TheMuemorning and sorry for missing standup, had to wait longer at the dentist as planned. thankfully e'thing OK as usual.11:16
TheMuebut at least my new setup maas controller used this time to download 135 boot images *phew*11:16
TheMuedimitern: the described configuration of the interfaces worked btw11:19
dimiternTheMue, great, so your VM networking is all set up correctly now?11:20
TheMuedimitern: it looks so. I will now create the second instance for PXE on the private network of the controller11:21
jamTheMue: 135?...11:31
TheMuejam: yeah, impressive number, even if the size of my virtual disk lets expect a lower number11:32
TheMuejam: but thats what my list her on the screen shows11:33
TheMuejam: they are always with the purposes "comissioning", "install", "xinstall". so maybe they share a lot of resources?11:34
perrito666and now, a bit more awake, hello everybody11:34
TheMueperrito666: hello11:34
TheMuejam: also several sub-architectures per arch11:35
gnuoyHi, I'm trying to build juju on windows. "go get -d -v github.com/juju/juju/..." seems happy enough but "go install -v github.com/juju/juju/..." results in ... watcher.go:121: undefined: "github.com/juju/errors".LoggedErrorf. Is this an issue with missing dependancies?11:35
perrito666gnuoy: take a look at GOPATH/src/github.com/juju/errors/errortypes.go11:42
perrito666that should be defined there11:42
perrito666mm or try running godeps -u dependencies.tsv on the juju/juju folder11:42
fwereadewallyworld, hey, don't suppose you're around? wanted to chat quickly about the changes we need to make to distinguish between waiting/blocked11:43
wallyworldfwereade: hey11:43
wallyworldhangout?11:43
gnuoyperrito666, this godeps you speak of, should it be bundled with go for windows ?11:43
perrito666gnuoy: nope, go get launchpad.net/godeps/...11:44
fwereadewallyworld, joining ian-william11:45
gnuoyperrito666, fantastic, I think there may be light at the end of the tunnel11:46
perrito666:D11:46
TheMuejam: digged into /var/lib/maas/boot-resources, the files in the subarchs are hardlinked11:47
voidspacehow are we merging to 1.21 - git cherry-pick?12:47
fwereadedimitern, would you pop into #jujuskunkworks please?14:21
dimiternfwereade, ok, just a sec14:25
wwitzel3fwereade: ping, need to speak to you about charm level constraints at some point14:28
wwitzel3rick_h_: ping ^14:28
rick_h_wwitzel3: howdy14:28
rick_h_wwitzel3: what's up?14:29
wwitzel3rick_h_: hey, I'm going to be doing the work around min juju version14:29
wwitzel3rick_h_: was told you might be a good person to sync up with before I start14:29
rick_h_wwitzel3: ok, what's the latest plan?14:29
wwitzel3rick_h_: well .. I think I'm making right now ;)14:29
rick_h_wwitzel3: heh, I'm a chief complainer so happy to help :)14:30
rick_h_wwitzel3: if you can deal with coffee shop background I'm free to chat for the next hour14:30
rick_h_wwitzel3: or if you've got a doc/notes you'd like looked over I'm happy to14:30
wwitzel3rick_h_: awesome, lets do it .. nope, no notes yet, some might exist, but I haven't seen any yet.14:31
wwitzel3rick_h_: https://plus.google.com/hangouts/_/canonical.com/moonstone?authuser=114:31
rick_h_wwitzel3: rgr14:32
rick_h_wwitzel3: in there14:32
natefinchfwereade: ping14:33
fwereadenatefinch, sorry, omw14:34
perrito666hey, does anyone know what are the specs of the nucs marco used for this? http://marcoceppi.com/2014/06/deploying-openstack-with-just-two-machines/14:53
rick_h_perrito666: just ordered two more the other day to expand our maas, I'll get you a link14:54
rick_h_perrito666: http://www.newegg.com/Product/Product.aspx?Item=N82E1685610203514:54
perrito666rick_h_: tx, I am trying to make a very similar experiment by mounting 4 physical nodes with 600U$D or less (obviously i will not be using nucs)14:55
rick_h_perrito666: gotcha, yea we setup http://maas.jujugui.org/MAAS using 3 (will be 5 now later today) nucs on a switch and such.14:56
rick_h_perrito666: look forward to seeing what you find to use.14:56
perrito666rick_h_: hoy much ram are you actually packing into those? says up to 16 but I am not sure you are actually putting all that in14:56
rick_h_I used 8 and 128gb HD14:56
rick_h_because we lxc/container with them14:56
rick_h_http://www.newegg.com/Product/Product.aspx?Item=N82E16820191523 and http://www.newegg.com/Product/Product.aspx?Item=N82E1682014869714:56
rick_h_perrito666: I think the orange boxes use the full 1614:57
TheMueyeeehaw, found the correct config to boot my vms in my vmaas14:57
rick_h_perrito666: but for our needs the 8's been ok mostly QA'ing stuff and doing some small testing.14:57
perrito666rick_h_: I am trying to go with  http://www.asrock.com/mb/Intel/H61M-VG3/ + http://ark.intel.com/products/71073/Intel-Celeron-Processor-G1620-2M-Cache-2_70-GHz14:58
rick_h_perrito666: does it have any sort of ipmi/amt control?14:58
perrito666rick_h_: I am trying to figure out that :) I am pretty sure one of the boards of that family support ipmi14:59
wwitzel3perrito666: you will hate life the moment you try to put any load on that Celeron14:59
perrito666wwitzel3: I hate life in general14:59
wwitzel3lol14:59
perrito666wwitzel3: what kind of load are you talking about?15:00
rick_h_perrito666: good luck, I'm not seeing any sort of power control on that one but yea might be others.15:00
perrito666rick_h_: true, that is the first model available here, but I am told I can get pretty much any model from that company15:00
perrito666and they have decent ones15:00
perrito666wwitzel3:  I was honestly thinking on nothing more than have a maas with 4 of those and use it to test my juju on maas15:01
perrito666locally15:01
rick_h_perrito666: gotcha, cool. Well if you get something let me know. We're heading to 4 nodes in our maas but I'd like to have more down the road15:01
rick_h_and if I could get them for less than $500 each that'd be nice15:01
perrito666rick_h_: well I will most likely get a howto of this, the only thing stopping me is that hardware here has, from scratch a 50% import tax :p which kills my under 600 mark pretty easily15:02
rick_h_perrito666: ah time for a US sprint :)15:02
perrito666rick_h_: well 600/4 is a good price :p15:02
rick_h_perrito666: definitely15:03
perrito666rick_h_: I am pretty sure that if I pack 4 pcs with me I will have hard time convincing customs that it is for personal use :p15:03
rick_h_psh, you should see the stuff these guys travel around with.15:03
rick_h_I know one guy went to a sprint with 5 laptops for folks he got them for15:04
ericsnownatefinch, perrito666, wwitzel3: standup?15:04
wwitzel3ericsnow: tosca call atm15:04
perrito666oh my cal says its in one hour15:04
ericsnownatefinch, perrito666, wwitzel3: duh, see ya15:04
perrito666rick_h_: our customs people are a bit sensitive these days :p15:04
perrito666rick_h_: http://www.newegg.com/Product/Product.aspx?Item=N82E1681315741915:06
perrito666beats the nuc by quite far15:06
perrito666:p15:06
rick_h_perrito666: so $130 and needs a cpu15:07
rick_h_perrito666: so not sure on 'quite far' not sure how much a cpu/cooler for that goes for15:07
rick_h_perrito666: but cool15:07
perrito666I understood cpu was included15:07
perrito666rick_h_: anyway yest, that is the server line :) I am looking for one in the consumer end15:08
rick_h_oh is it? cool guess it is http://ark.intel.com/products/77982/Intel-Atom-Processor-C2550-2M-Cache-2_40-GHz15:09
rick_h_perrito666: cool, if maas supports that ipmi tempted to try it out.15:10
perrito666rick_h_: yup, cpu included supports a lot of ram, packed with 3 eths, it is quite production ready for the price15:10
perrito666also 8 cores, pretty nice machine15:11
rick_h_perrito666: yea, might be worth an email to the maas list to see if anyone knows anything about it15:11
perrito666rick_h_: yup, at least for testing purposes they seem quite useful given the price tag15:11
perrito666meh, they have a lot of ipmi enabled motherboards, none consumer level15:23
voidspacekatco`: ping15:55
voidspaceanyone want an easy-ish review for 1.21?15:56
voidspacehttp://reviews.vapour.ws/r/413/15:56
perrito666natefinch: ericsnow wwitzel3 can we push the standup an hour more, I need to rush to look for my wife that is a bit ill at her job15:56
jw4fwereade, dimitern, thumper, et. al.  state.nowToTheSecond() is used in a few places to reduce the precision of time.Now() to the level of Seconds15:57
ericsnowperrito666: fine with me15:57
wwitzel3perrito666: sure, hope she feels better15:57
jw4however that function uses time.Round(Second), and I think it would be more reliable to use time.Truncate(Second)15:57
fwereadejw4, +115:58
jw4fwereade: ta15:58
natefinchperrito666: sure thing15:59
natefinchperrito666, ericsnow, wwitzel3: I'm going to push it 2 hours because 1 hour is no good for me.16:00
ericsnownatefinch: k16:00
bodie_hey ericsnow, I'm trying to understand some of the cmd/juju/backups code, since I'm also implementing a new supercommand16:04
ericsnowbodie_: sure16:04
bodie_ericsnow, so I'm getting "client.Close undefined (type APIClient has no field or method Close)"16:04
ericsnowbodie_: FWIW, I mostly followed the example of the new User super command :)16:05
bodie_hmm, okay16:05
bodie_I think my Client type actually is composed from two interfaces which both require Close()16:05
bodie_so that might be the issue16:05
ericsnowbodie_: what is APIClient in this case?16:05
bodie_I'll take a look at the cmd/juju/user code16:05
ericsnowbodie_: backups has its own API client type16:06
bodie_ericsnow, it's like your backups APIClient interface requiring the methods from the api type16:06
bodie_yeah, we have an Actions api client type16:06
ericsnowbodie_: nice16:06
bodie_(api/actions/client.go)16:06
bodie_the implementation is a little different though, since we don't require SendHTTPRequest16:07
voidspacesinzui: I'm one of the culprits, sorry16:07
voidspacecurrently waiting for a review of the backport of the fix16:07
voidspacesinzui: (marking bugs as fix committed but not backporting I mean)16:07
voidspacedimitern: you still around?16:07
voidspacedimitern: this is a 1.21 bug fix that could do with a review: http://reviews.vapour.ws/r/413/16:08
ericsnowbodie_: I don't see a Close method on the actions Client16:08
ericsnowbodie_: backups gets it from api.State16:08
dimiternvoidspace, looking16:08
ericsnowbodie_: so I expect you don't need to call Close on your client16:08
voidspacedimitern: thanks16:09
sinzuivoidspace, all is well when we spot the problem early16:10
voidspacegood16:10
bodie_ericsnow, I think that api.State bit is the missing link I'm not seeing16:10
bodie_either way, I think the user cmd matches what we need a bit better, thanks!16:10
ericsnowbodie_: yeah, backups keeps it around for the direct HTTP requests so it has to close it later rather than in the New func16:11
ericsnowbodie_: cool16:11
bacmarcoceppi: can you try to look at this soon?  https://github.com/marcoceppi/amulet/pull/4816:13
dimiternvoidspace, LGTM +small comment16:17
voidspacedimitern: where's the comment?16:17
voidspacedimitern: did you publish it?16:17
voidspaceheh, reviewboard can't display the diff16:18
voidspaceericsnow: http://reviews.vapour.ws/r/413/diff/#16:18
* ericsnow checks16:19
dimiternvoidspace, yeah, it's on the PR itself16:21
voidspacedimitern: ah, cool - thanks16:22
voidspacedimitern: I can't quite - as a deleted node will still fail (400 error)16:22
voidspacedimitern: I'm working on that now16:22
voidspacedimitern: (close that bug you suggest)16:22
ericsnowvoidspace: I expect the webhook code is trying to apply the diff to master rather than 1.2116:23
ericsnowvoidspace: I'll fix that16:23
voidspaceericsnow: thanks old boy16:24
ericsnow:)16:24
* ericsnow doffs hat16:24
bactvansteenburgh: can you look at an amulet pull request for me?16:25
dimiternvoidspace, sure, thanks16:26
tvansteenburghbac, sure16:26
bactvansteenburgh: https://github.com/marcoceppi/amulet/pull/4816:26
bacthanks16:26
voidspacedimitern: do you know off hand if the errors package has a way to wrap multiple errors as a single error?16:27
* voidspace is looking now16:27
dimiternvoidspace, I don't believe so, but it should be relatively easy to add a wrapper-for-two16:28
voidspacedimitern: no it doesn't16:28
voidspaceI'd like a MultiError16:29
voidspacedimitern: actually, philosophical question16:29
voidspacedimitern: if we get an error 400/403/404 from maas release operation then at least one of the nodes is already gone and *none* will have been released16:29
voidspacedimitern: so I'm going to loop and release them individually  - ignoring ones with 400/403/404 errors16:30
voidspacedimitern: so the question is, if in the loop one fails with a *different error*16:30
voidspacedimitern:  should I stop - or should I complete the loop and collect (and return) all the errors16:30
dimiternvoidspace, I think the loop should make the best effort to release all nodes, which means probably logging any errors and continuing16:33
voidspacedimitern: ok16:33
voidspacedimitern: we *should* return an error if there are unrecognised errors16:33
voidspacedimitern: so I'll collect errors16:33
voidspacedimitern: MultiError would be a pain, because it would be in compatible with Cause16:34
voidspacedimitern: I'll construct a compound error16:34
dimiternvoidspace, there are a few cases around connecting to the api server code which strike me as very similar16:35
dimiternvoidspace, with the "moreImportant" filtering of encapsulated errors16:35
voidspacedimitern: "moreImportant"?16:35
voidspacedimitern: ah, interesting16:36
dimiternvoidspace, yeah, it might be what you need16:37
tvansteenburghbac, i can't merge into marcoceppi16:38
tvansteenburgh's repo, but i left a LGTM16:38
marcoceppibac: tvansteenburgh merged16:40
tvansteenburghmarcoceppi: thanks!16:41
bacthanks tvansteenburgh and marcoceppi16:41
* marcoceppi is in conference lag mode16:41
voidspacedimitern: moreImportant drops errors16:42
voidspacedimitern: I don't think we want to do that16:42
voidspacedimitern: unless we log all the errors and just return the last one16:42
voidspacedimitern: the actual errors will be in the log16:43
dimiternvoidspace, I was thinking something along those lines, yes16:43
voidspacedimitern: that's easy enough :-)16:43
dimiternvoidspace, we definitely need to log them, but only return unexpected ones perhaps?16:43
voidspacedimitern: the question is what to do about multiple unexpected ones16:43
voidspacedimitern: the only "expected" ones we're just ignoring16:44
voidspaceso I'll return the last unexpected error and log *all* errors - expected or not16:44
dimiternvoidspace, the last?16:44
dimiternvoidspace, yeah, ok16:44
voidspacedimitern: well, I'm looping setting err as I go16:45
voidspacedimitern: so the easiest implementation leaves err set to the last one...16:45
voidspacewell, I'll have to copy it actually16:45
voidspacebut you get the idea16:45
dimiternvoidspace, but for expected errors let's use Debugf or something (maybe Warningf with a bit more context?)16:45
voidspacedimitern: I think Warning16:45
dimiternvoidspace, I mean they logged errors shouldn't look like something bad happened and we didn't handle it16:45
voidspacedimitern: something unexpected has happened, it just isn't a problem (we couldn't stop the instance because it's already dead)16:46
voidspacedimitern: ok16:46
dimiternvoidspace, +1, cheers16:46
rogpeppeis there an easy way of finding the reviewboard review of a PR from the PR on github?16:51
rogpeppedimitern: ^16:52
natefinchin theory, whoever makes the PR is supposed to paste a link to the review on github16:52
natefinchit seems the search capability of reviewboard is either exceedingly terrible, or simply not enabled16:52
rogpeppethe CONTRIBUTING page doesn't seem to have a link to the reviewboard page16:53
rogpeppei can't even find the site currently, let alone the individual review :)16:53
perrito666back16:53
rogpeppeit would be really nice if a link to the review made it into the final commit16:53
natefinchhttp://reviews.vapour.ws/16:53
rogpeppebecause a review is really useful context for a commit16:54
rogpeppei still find the old codereview.com links in the old juju commit messages to be invaluable sometimes16:55
natefinchrogpeppe: yes absolutely. We put some time into getting links automatically added to the PR, but there were some complicating problems, and so it was put on the back burner for now. EVeryone is supposed to just manually make a comment on the PR with the link to the review.  If someone's not doing that, you can give them flack for it :)16:55
natefinchoh, you mean in the commit message itself, I see. Yes, I agree16:55
rogpeppenatefinch: none of the juju PRs i've looked at recently have done that16:55
rogpeppenatefinch: yes, the commit message itself too16:55
rogpeppenatefinch: basically, i want to be able to do a "git blame", find the responsible commit and see if there were any comments on it16:56
natefinchrogpeppe: I'll send out a reminder to put the review link in the PR.  It's pretty essential information to have.16:56
natefinchrogpeppe: and definitely putting the review link in the commit as well is a great idea, that I think we just didn't think of.16:57
perrito666natefinch: so standup in 50 mins right?17:10
natefinchperrito666: correct17:11
katco`voidspace: sorry for the delayed response -- pong17:28
=== katco` is now known as katco
voidspacekatco: no problem, I wanted a review17:28
voidspacekatco: 'tis done17:29
katcovoidspace: sorry about that, having a day17:29
voidspacekatco: I hope it improves17:29
voidspacekatco: mine is nearly over17:29
voidspacewell, the work part of it17:30
katcovoidspace: :)17:30
rogpeppeha, i can't believe it - if you try to add another comment in reviewboard when you've still got one open, the one you've got open is just deleted, even if it's got lots of text in it17:37
rogpeppeanyone know of a way of getting my deleted comments back?17:38
rogpeppenatefinch: ^17:39
rogpeppeand it seems to be doing something weird with the forms too - lazarus doesn't work on them17:39
natefinchrogpeppe: don't think so, I think that's all held locally in javascript17:39
rogpeppenatefinch: :-(17:40
rogpeppenatefinch: i've just lost about 5 comments, i think17:40
katconatefinch: is that so? i swear i've come back on different machines to my reviews17:40
rogpeppekatco: that'll be after you've saved the comments17:40
natefinchwell, I just mean, if you're in the middle of typing and the window closes17:40
* katco leaves the possibility open that she's misremembering17:40
rogpeppekatco: i hadn't saved them17:40
katcoah17:40
katcorogpeppe: i see17:40
rogpeppekatco: i'd scrolled down the page and double-clicked another line17:41
natefinchrogpeppe: save often, sir :)17:41
rogpeppekatco: the original comment just gets deleted17:41
rogpeppenatefinch: yeah, but if i save, the comment gets hidden17:41
rogpeppenatefinch: apart from that tiny number on the left17:41
natefinchrogpeppe: I agree... there are several UI nitpicks that seem suboptimal.  I'd love to have a way to toggle all comments open or closed17:42
rogpeppenatefinch: deleting your in-progress comment without warning isn't just suboptimal - it's actively shit17:42
* rogpeppe still misses codereview17:43
perrito666ericsnow: natefinch wwitzel3 standup is now right?18:04
ericsnowperrito666: yep18:04
* perrito666 's calendar is a bit off bc he forgot to re-set the timezone18:04
wwitzel3natefinch: ping, standup18:07
voidspaceright folks18:12
voidspaceg'night18:12
drbidwellI have 6 machines behind a maas server that are commissioned and ready.   "juju bootstrap -e maas" picks 1 or 2 machines to bootstrap, runs for 30 minutes and fails.  The "-v and --debug" options tell me "2014-11-12 18:02:01 ERROR juju.provider.common bootstrap.go:122 bootstrap failed: waited for 30m0s without being able to connect: /var/lib/juju/nonce.txt does not exist". I can ssh to ubuntu@host and sudo.  I can see that juju has successfully aut18:22
LinStatSDRsucessfully what18:33
LinStatSDRmax char limit?18:33
drbidwellLinStatDR: /var/log/auth.log shows me that ubuntu@host successfuly authenticated via ssh, but I have no idea what it was trying to do or if it succeeded or not.18:41
=== kadams54 is now known as kadams54-away
=== kadams54-away is now known as kadams54
jw4katco: I think we're using nowToTheSecond elsewhere too, not just tests... Agree about the cognitive overhead.19:25
katcojw4: good to know19:25
jw4katco: I'd like to know if we should be using nowToTheSecond elsewhere too19:25
katcojw4: yeah, just seems strange to lose resolution19:25
katcojw4: and as i said, the whole "what is this thing? should i be doing this?"19:25
jw4katco: I understand not capturing precision that's misleading19:25
jw4katco: but it would be nice to have a documented rationale19:26
bodie_*refrains from jokes about readability*19:26
bodie_my problem with second granularity is that sub-second diffs are now "the same"19:26
katcobodie_: as a nerd, i would enjoy a good readability joke :)19:26
bodie_it's not really funny... heh.  let's just say there are lots of things going on in lots of places that aren't immediately obvious despite go's readability ;)19:27
bodie_I also favor reducing those cases rather than increasing19:28
katcohere here19:28
katcowell, now that i've met thumper, i now know he can take an opinionated review with good humor :)19:29
katcowhat are people's opinions on table-driven tests?19:35
natefinchkatco: generally good, but can be overused and overcomplicated19:35
katconatefinch: ty (witholding comment to give others a chance to weigh in)19:35
katconatefinch: btw, not sure if you saw this. might be helpful for your mud server: https://github.com/katco-/cmdtree19:36
katconatefinch: actually, https://plus.google.com/u/0/+KatherineCoxBuday/posts/JUaiV9Maf4v19:37
katcodiscussion; i haven't had time to do a readme or anything, so this is the documentation for now ;)19:37
natefinchhaha19:38
bodie_katco, I personally love using a slice of test structs (I guess this is what you mean) and do it for almost every nontrivial test19:38
katcobodie_: that is indeed what i mean19:38
katcowould an equivalent be splitting common functionality into a helper function, and then passing the struct in?19:39
natefinchI like them when they are testing exactly one thing with different inputs.... too often people glom on more and more tests so that half the fields in the table are only used in half the tests19:40
bodie_typically I would use the struct to define the arguments to the helper19:40
bodie_in a table that is19:40
natefinchyep19:40
katcobodie_: i'm typing up this in a review comment which i'll link19:40
bodie_I've been told it's better to keep the test struct in the specific testing function however19:41
bodie_as opposed to using a single giant struct with multiple different tests working against it19:41
natefinchbodie_: absolutely19:41
bodie_also prevents other files in the package from manipulating it (anti-pattern)19:41
natefinchbodie_: unless they are canonical datasets that multiple tests might work against (which is possible, but often results in harder-to-read tests)19:42
bodie_in Go, we'd typically put that as a member on the test type extended for each test file, I would imagine, and initialize it in the SetUpTest for the file's suite19:42
bodie_s/test type/suite/19:42
katcohttp://reviews.vapour.ws/r/407/#comment398819:43
bodie_er, the unified bit would be in the parent type's SetUpTest19:43
natefinchbodie_: gocheck is not super typical go testing, btw ;)19:43
katcoplease don't take this as a criticism against this particular change19:43
bodie_mm, true19:43
katcomore a vehicle for the discussion19:43
jw4katco: I think I agree fully; I'd be interested in some examples19:44
katcojw4: i'll go ahead and flush out that comment with how i would write that test19:44
jw4katco: cool!19:45
natefinchkatco: while I like the idea of not subverting the structure of tests.... I also don't really like having the whole logic of a test in a helper function and then just one line in the test function itself calling the helper19:45
natefinchkatco: we've done that in some packages, and it makes it very very hard to understand what test failed and why it failed19:45
katconatefinch: can you expound on why? how is that different from one line in a struct, and the helper "method" being the body of the loop?19:45
=== kadams54 is now known as kadams54-away
katconatefinch: really? i have found the opposite! it's so hard for me to find out which row in the table failed, but if a test function fails, i know exactly where to look19:46
natefinchkatco: it's basically the same thing, honestly....19:46
bodie_c.Logf("test %d: %#v", i, t.args) perhaps?19:47
perrito666katco: if you find hard to know which row in the table failed someone forgot to add info to that table19:47
bodie_(I like a description field, too.  something like a "should")19:47
katconatefinch: except if each test is in the container your host platform (Go) expects it to be in, you get all the benefits of your entire stack of test runners19:47
natefinchkatco: yes, I really like that part of your proposal... but here's the problem with helpers.  When the test reports a failure at this line, what test failed: https://github.com/juju/juju/blob/master/worker/uniter/uniter_test.go#L207819:48
katcoif you define a new "type" of test-runner (i.e. a loop), you've now done exactly that: "here's a new way to run tests". and it's definitely less functional than what Go provides us19:48
katconatefinch: it will tell you what function failed when it fails19:49
katco^what test function19:49
natefinchkatco: the output isn't sycnronous, and if you have more than one failure, it'll be hard to understand which test is failing, and why.  I've had this exact problem with the uniter tests.  Now... that can be avoided by being careful in how you write your assertions, and make sure you print out context etc.19:50
katcoperrito666: i guess i spend time jumping between the row and the table-runner trying to figure out what's getting used where19:50
perrito666katco: agreed, that can be a pain19:50
perrito666katco: unless...19:50
perrito666you editor can vsplit :p19:50
perrito666sorry, had to19:50
jw4perrito666: you bad boy19:50
natefinchhaha19:50
* jw4 out for lunch19:50
katcoperrito666: lol of course which emacs can do :)19:50
natefinchyes, I also hate jumping between the table and the test19:51
bodie_description field helps19:51
katconatefinch: i don't understand. under the covers when it does t.Fail() or t.Errorf(), it's going to report the test function, yes? not the stack-frame you were in?19:51
perrito666really? you guys have like twice the resolution I have, I always have definition/code open19:51
katconatefinch: i haven't ever had a problem debugging tests written like that. i may be misremembering.19:52
bodie_perrito666, ... tmux makes me happy19:52
perrito666bodie_: regardless of the tool19:52
bodie_heh, just saying.  at any given moment I have between 2 and 5 panes per window, per session...  :D19:52
* bodie_ has the crazy19:53
natefinchkatco: maybe it was something simple I was missing, but I know I was about ready to throw my computer across the room the last time I debugged the uniter tests (granted that was like 7 months ago)19:54
katcohaha19:54
katcothat is a challenging suite19:54
thumpergrr19:55
thumperhow do I reply to these dumb issues on RB19:55
natefinchhonestly, my preferred way to write table driven tests would be to generate the code for them, so I don't have to piece together WTF is going on... but I'm sure no one else in the world agrees with me there ;)19:55
thumperdo I have to go to the diff to do it?19:56
perrito666natefinch: I doubt it, your computer seems too heavy19:56
katconatefinch: code-generating-code is underutilized i think19:56
perrito666katco: beware, if that gets too efficient we all get out of jobs, and then terminator19:57
bodie_natefinch, those goddamn uniter tests.  LOL19:57
katcoperrito666: (rhythmic drums)19:59
thumperkatco: replied20:00
katcojw4: (et. al) example up: http://reviews.vapour.ws/r/407/#comment398820:00
katcothumper: ty looking20:00
katcothumper: i think i still disagree, but thank you for explaining.20:02
katcothumper: ship it from me :)20:02
thumper:)20:02
=== liam_ is now known as Guest39243
=== kadams54-away is now known as kadams54
katcowwitzel3: natefinch: do i want to jump into wwitzel3's review, or have fwereade and others mostly covered it?20:09
katcofor juju-run20:09
drbidwellHow do I find out what "juju bootstrap" is trying to do?  How do I tell what it is actually doing?  I have tried "-v --debug", but need more data20:15
perrito666drbidwell: which data exactly?20:16
katcodrbidwell: juju debug-log aggregates data from all nodes20:16
katcodrbidwell: to my knowledge --debug is just client-side20:16
natefinchkatco: ummm... I think it's all set20:17
katconatefinch: cool, ty... was not looking forward to that :)20:18
natefinchhaha... yeah, it is a problem when you're on call, and there's a bunch of gigantic reviews that are halfway done (or more or less, who can tell?20:19
drbidwellI have 6 machines provisioned with maas.  I can ssh to them as ubuntu@host and sudo.  juju bootstrap just times out after 30 minutes and complains "waited for 30m0s without being able to connect: /var/lib/juju/nonce.txt does not exist"20:19
drbidwellI don't know what is wrong or how to fix it.20:19
drbidwellkatco:  "juju debug-log" returns "ERROR environment is not bootstrapped"20:21
katcodrbidwell: ah right, sorry.20:21
drbidwellHow do I get the remove server side logs?20:23
waiganithumper, menn0, davecheney, mwhudson: sorry I missed standup, here now20:23
mwhudsonwaigani: good timing, we finished like 30s ago20:23
waiganiugh20:23
katcodrbidwell: i would do just what you have been, ssh in and poke around var20:23
mwhudson:)20:24
katcodrbidwell: if there's nothing there that's juju specific, i would start looking at general OS logs to see what's going on20:24
natefinchI gotta run early today.  See you all tomorrow20:25
perrito666cu20:25
katconatefinch: ta20:25
whitcmars, rick_h_ suggested I bother you about collect-metrics in 1.21beta1. mainly curious what I can do with it20:27
=== kadams54 is now known as kadams54-away
=== menn0_ is now known as menn0
=== kadams54-away is now known as kadams54
cmarshi whit, this feature is pretty early-stage and still somewhat being worked out. not quite fit for general consumption yet.21:07
whitcmars, that's alright.  I was interested in trying it out for some metric consumption stuff we are doing in cloudfoundry21:08
whitcmars, I'm guessing I would need to query the statedb directly?21:08
whit(to get my aggregated stats)21:09
cmarswhit, we'd like to avoid direct state access.. i'd like to set up a hangout to discuss your requirements. we'd prefer this sort of stuff to go through proper APIs -- and we're still working out what those look like ;)21:10
whitcmars, sure21:11
whitcmars, obviously we would rather use the ws api too21:12
whitbut we are also fine evolving with the system21:12
whithaving a way to subscribe to metrics based on annotations would be ideal21:14
whitfor our usecase21:14
whitcmars, thanks for the invite21:15
cmarswhit, sure21:15
rick_h_wallyworld: is provider storage going away in 1.21 so manual provider doesn't need it any more?21:57
perrito666ericsnow: I answered to one of your issues I am really interested in sorting that out so if you can follow up ill be very thankful22:10
wallyworldrick_h_: no, it won't22:10
rick_h_wallyworld: k, ty22:10
ericsnowperrito666: thanks. I'll have a look22:14
perrito666ericsnow: btw, where are we on with upload and metadata.version?22:31
perrito666I am under the impression that there was something missing for me from metadata but I cannot recall what it was22:32
ericsnowperrito666: see http://reviews.vapour.ws/r/398/22:32
ericsnowperrito666: JSON -> metadata (added in http://reviews.vapour.ws/r/346/)22:32
perrito666excelent, when do you foresee those landing?22:32
ericsnowperrito666: allows getting the metadata out without unpacking the archive: http://reviews.vapour.ws/r/356/22:33
ericsnowperrito666: as soon as I address the reviews22:33
perrito666ok with that I can address a couple of your comments22:34
ericsnowperrito666: sweet22:35
ericsnowperrito666: I responded to your comment22:35
ericsnowperrito666: basically, why can't we just use the existing code in the agent package (like ReadConfig)?22:36
perrito666because we are not using the agentconfig type (I think some of this predates the existing of some of those things)22:36
perrito666I can de-duplicate that code gladly, I will nevertheless maintain my possition on not making that method public.22:37
* perrito666 looks at eric's pointer22:37
ericsnowperrito666: sure22:40
ericsnowperrito666: it just looks like the code already exists elsewhere22:40
perrito666ericsnow: I see, yes some of that predates restore in its new version22:41
=== menn0_ is now known as menn0
=== kadams54 is now known as kadams54-away
perrito666mm, how much I hate when a function takes a file path instead of a reader22:46
ericsnowperrito666: you should totally fix it22:50
ericsnowperrito666: :)22:50
perrito666ericsnow: I was about, yet its not trivial22:51
ericsnowperrito666: it's only used in cmd/jujud/agent.go (and in tests), right?22:53
perrito666ericsnow: dunno, just reading what it does to see how to change it to not use paths but id might not be so wise in terms of clarity22:53
ericsnowperrito666: change "configData, err := ioutil.ReadFile(configFilePath)" to "configData, err := ioutil.ReadAll(configReader)", no?22:55
perrito666ericsnow: context22:56
ericsnowperrito666: in ReadConfig (maybe you were talking about something else)22:56
perrito666ericsnow: if you read down the code it seems to both use the path to set something that I need to make sure is not used all the way and it also tries to open another file looking for legacy format22:58
ericsnowperrito666: ah, got it22:58
perrito666just being careful, I dont think it cant be done22:59
perrito666I most likely can split it in a couple of funcs factoring out whatever I need but this is a rather sensitive area22:59
ericsnowperrito666: agreed23:00
davecheneythumper: natch23:12
davecheneyaction_test.go:90: c.Check(action.Enqueued(), jc.TimeBetween(before, later))23:12
davecheney... obtained time.Time = time.Time{sec:63551430607, nsec:842000000, loc:(*time.Location)(0x13b5c80)} ("2014-11-13 10:10:07.842 +1100 AEDT")23:12
davecheney... obtained value time.Time{sec:63551430607, nsec:842000000, loc:(*time.Location)(0x13b5c80)} type must before start value of time.Time{sec:63551430607, nsec:842300369, loc:(*time.Location)(0x13b5c80)}23:12
davecheneyjust hit that bug23:12
jw4davecheney: I've got a fix I'm gonna push up soon23:16
davecheneyjw4: thumpers has a fix already23:17
jw4davecheney: a second fix?  The one thumper put in yesterday (or monday) is related to this...23:17
jw4davecheney: this is the nexus of two changes23:18
jw4davecheney: thumper introduced nowToTheSecond instead of time.Now() (+1)23:18
jw4davecheney: and bodie_ switched to using jc.TimeBetween23:19
jw4davecheney: (thumper, et. al) my fix involves 1) not using TimeBetween (which excludes boundaries)23:19
jw4and 2) modifying nowToTheSecond to use time.Truncate(Seconds) instead of time.Round(Seconds)23:20
davecheneyjw4: ok23:30
davecheneyi haven't been paying close attention23:30
davecheneythumper was talking about some fixes he had proposed which sounded related23:30
jw4davecheney: I'm just re-reviewing git and it looks like the fix I was thinking of only landed 3 hours ago23:30
jw4davecheney: thumper had proposed it a couple days ago...23:31
jw4davecheney: thanks for the update23:31
davecheneymenn0: part two https://github.com/juju/juju/pull/111623:35
menn0davecheney: i've already just had a look. one question on the review.23:36
davecheneyyup23:36
davecheneythat is cruft23:36
davecheneyi'll belete it23:36
menn0davecheney: so that means the temp juju.go goes right?23:48
menn0davecheney: I just noticed another issue too. see review.23:48
menn0davecheney: otherwise is looking good I think23:48
waiganinot sure if this sent, resending: thumper, menn0: any idea why the AllWatcher id is a pointer to a string?23:50
davecheneyhttps://github.com/juju/utils/pull/8623:51
davecheneywaigani: the id is supposed to be opaque23:51
davecheneywell, when i say supposed23:51
davecheneyi mean23:51
davecheneyit looks like it's just a random identifier23:51
davecheneyat places in the multiwatcher, the id is stuffed into a interface{}23:52
davecheneyso it's used for comparison only, afaik23:52
waiganiokay, but why a pointer?23:53
jw4fwereade: (dimitern) http://reviews.vapour.ws/r/417/  idPrefixWatcher bug we discussed earlier23:53
waiganiso we just compare the pointers, not the values23:53
waiganigot it23:53
davecheneywaigani: it's just an opaque identifier23:54
davecheneyi don't konw why it's a *string specifically23:54

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