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

hazmatdavecheney, any comment re juju for armhf? ^00:44
* hazmat notices previous nick ref too late00:45
davecheneyhazmat: recap ?00:59
hazmatdavecheney, small. but http://paste.ubuntu.com/5692238/ mwhudson's been asking around01:00
davecheneyTTBOMK go 1.1 is not avilalble in any ubuntu form for armhf01:03
davecheney1.1 was imported from upstream into saucy proposed, but it didn't build on armhf01:03
davecheneythat is all I know at the moment01:03
davecheneyIf you're happy to use a tarball, http://dave.cheney.net/unofficial-arm-tarballs01:04
wallyworld_davecheney: how closed is the goamz group? I have a goamz branch i want to land. should i bother asking for group membership or is it best to get one of the group members to land it?01:22
davecheneywallyworld_: dunno01:25
davecheneyis this another 'we're all not members of gophers' problem ?01:25
wallyworld_i'm not a member of ~goamz01:25
wallyworld_which owns goamz project01:26
wallyworld_you and rodger are01:26
thumperwallyworld_: congrats on landing all those branches01:27
wallyworld_thumper: yeah, finally!01:28
davecheneywallyworld_: well, that is fucked01:28
davecheneylet me see if I can fix that01:28
wallyworld_davecheney: thanks!01:28
thumperdavecheney, wallyworld_: here is a trivial branch to review: https://codereview.appspot.com/9677044/01:28
davecheneynope, can't fix01:28
davecheneygustavo owns it01:28
wallyworld_restricted team :-(01:29
wallyworld_ok, will ask him01:29
thumperdavecheney: we can fix it... with the right request :)01:29
mwhudsondavecheney: ok thanks01:29
wallyworld_i just wasn't sure how protective he is of that project01:29
* wallyworld_ looks at thumper's branch01:29
* thumper considers a constraint of "machine=0"01:30
thumper--force-machine is all well and good, but doesn't capture intent in state01:31
thumperI'm trying to work out a way to have state represent the desire for maximum density...01:31
thumpera.k.a. cheap solution with everything on one ec2 instance01:31
wallyworld_s/ec2/openstack as well :-)01:34
thumperwallyworld_: exactly01:34
thumperwallyworld_: I've been reading through jam's comments on the wiki page01:34
thumperI don't want to go too far down the path of explicitness when we know we need intent01:35
wallyworld_thumper: force-machine was always a *very* short term quick fix AFAIUI, so we had better not propogate it's use01:35
thumperthat is my thinking too01:35
* thumper considers a multitude of edge cases01:36
wallyworld_i think the comments we more along the lines of - we can do the mechanics first (and require explicitness), and once the machinery is there, automate the intent01:36
thumperjuju deploy -n 2 wordpress --constraints "machine:0"01:36
wallyworld_which i agree with at first read01:36
thumpershould barf01:36
wallyworld_what does -n do?01:36
thumperyeah, I've been thinking about that too01:36
thumperdeploy two units01:36
thumperof the service01:37
wallyworld_for HA?01:37
wallyworld_load balancing01:37
thumperyes01:37
thumperalthough...01:37
thumperwould be possible if (and only if) containerised01:37
wallyworld_yes, makes sense to allow that scenario for testing, even if on the one physical machine01:38
thumperhowever...01:38
thumperwhat happens if you have the initial environment...01:38
thumperwhere everything was deployed onto machine/001:38
thumperthen you want to scale out01:38
thumperand add two more units of "foo"01:38
thumperyou don't want it to use the contstraint "machine:0:01:39
thumperyou want it to make new machines...01:39
thumperish01:39
thumpermaybe01:39
thumpergeez01:39
wallyworld_so you wouldjust "juju deploy foo" without the constraint bit?01:39
wallyworld_then it would allocate a new machine?01:40
thumperno, it is deployed01:40
thumperyou use add-unit01:40
wallyworld_right, yes01:40
thumperit already has constraints though01:40
thumperhow about a constraint...01:40
wallyworld_so you override those?01:41
thumperyeah01:41
thumperbut I image it would get icky01:41
wallyworld_perhaps last specified constraint wins01:41
wallyworld_or maybe a constraint for "just this one operation"01:42
thumperyeah...01:42
wallyworld_eg policy is to allocate a new machine, but just for this add-unit, do it here01:42
thumpera unit constraint01:42
thumperrather than a service constraint01:42
wallyworld_yes01:42
thumperthat _may_ work01:42
wallyworld_still complicated for users to internalise the model though01:42
wallyworld_juju status would need serious work i reckon01:43
thumperyeah, I'd prefer something semantically simple01:43
thumperto work with maximum unit density01:43
wallyworld_i reckon we need a "tell me what you are about to do but let me conform first" switch01:43
wallyworld_confirm01:43
thumperI think the default will soon be to have machines with lots of units on them01:43
thumperone machine to do multiple things01:44
wallyworld_i've been wanting that for ages01:44
wallyworld_didn't understand why we never had it to start with01:44
thumperyeah, unit density is the primary outcome for containers I think01:44
thumperbecause it is simpler to start a new machine for everything?01:44
wallyworld_maybe01:44
thumperthe trick is to record intent01:45
thumperbut to have intent flexible01:45
thumperand easily understandable01:45
* thumper waves his hands01:45
thumperand magic happens01:45
thumperthat shit01:45
wallyworld_USB plugged into the back of users' heads should do the trick01:45
thumperwasn't there a movie ages ago called "free jack" ?01:46
wallyworld_not sure, perhaps01:46
wallyworld_maybe only in NZ01:46
wallyworld_thumper: so we still have lots to discuss before we can fire up our IDEs and start hacking me thinks01:46
thumperwallyworld_: well, there should be some things we can start on soon01:47
thumperwallyworld_: but the subtleties are the hard bit01:47
thumperand I'd like williams input01:47
thumperwhen he is back next week01:47
wallyworld_yes. i fear even the "simple" things could turn nasty unless we fully understand the solution we are aiming for01:48
wallyworld_although if we agree containers are machines with parent machines we could start reworking the relevant interfaces01:49
thumperyes01:50
thumperand having a create-machine command could be useful01:50
thumperwe already have a destroy-machine01:50
wallyworld_as in create-machine just ultimately calls the provider's startInstance() and registers the machine in the env but there's nothing deployed to it?01:51
thumperright01:51
thumperbut "create-machine 0:lxc" could create an lxc container on machine 001:52
wallyworld_if we were to do that, and come back later and do a deploy, that machine should then be used01:52
thumperand put a machine agent on it01:52
wallyworld_rather than creating a new one01:52
thumpermaybe...01:52
thumpersounds reasonable at least01:52
wallyworld_i think your n:lxc thing works also01:53
thumper"create-machine :lxc" would create a new machine, and a container01:53
thumperthis way, we could have nested containers01:53
wallyworld_but there's no point doing those things as commands for the user to run manually unless the result machine/container were to be used by juju later01:53
thumperas the container is represented as a machine01:53
thumperwallyworld_: unless we had a constraint "machine x"01:54
thumperbut I agree, it should be deployed to01:54
thumperif it is empty01:54
wallyworld_hmmm. that would require the user to keep track of a lot of stuff01:54
thumperand fits the requested constraints01:54
thumperwallyworld_: not necessarily01:54
wallyworld_yes, fits the constraints is essential01:54
thumperand it is only a first cut01:54
thumperand it gives a very definite "first thing" to do01:55
wallyworld_thumper: ok, so i'll create a branch for the start-machine command01:55
thumperok.01:55
thumperinitially take no params01:55
wallyworld_initially without :lxc01:55
thumperand just create a new machine from the provider01:55
thumperack01:55
wallyworld_yes01:55
thumperalso...01:55
wallyworld_since lxc not done yet01:56
thumperhmm...01:56
thumperwe do have a weird case01:56
thumperwe explicitly don't reuse machines01:56
thumperwhich means, if a machine is sitting there empty01:56
wallyworld_we could do if they are marked as empty01:56
thumperwe explicitly don't use it01:56
wallyworld_let's add an "is empty"  param01:56
wallyworld_attribute01:56
thumperwell...01:56
thumperit is harder than that01:56
thumperwe effectivly have "is empty" by "no prinicple units"01:57
thumperand there is code there already01:57
wallyworld_ok01:57
thumperperhaps what we need is "clean"01:57
thumpera machine is clean if it is new01:57
wallyworld_sounds better01:57
thumperif a unit is deployed, not in a continer01:58
thumperand then removed01:58
thumperthe machine is "unclean"01:58
wallyworld_yes01:58
thumperif a unit is deployed in a container01:58
thumperand removed01:58
thumperthe machine is clean01:58
wallyworld_but if container is nixed, machine is clean01:58
thumperwe can use clean machines01:58
wallyworld_yes01:58
thumpernot "unclean"01:58
wallyworld_+101:58
thumperok, this is almost making sense01:58
wallyworld_i'll start hacking and see where the yellow brick road takes me01:59
wallyworld_suspect there will be a few branches01:59
thumperwallyworld_: start with a create-machine01:59
wallyworld_yes01:59
thumperI'll try to document our thought process above01:59
wallyworld_ok, thans01:59
wallyworld_add it to your document01:59
wallyworld_i can't wait for this stuff to mature, i really want to fire up lots of stuff on my local machine02:00
thumperyeah02:00
thumperwe'll make it fully manured02:00
wallyworld_lol02:00
* thumper goes to shower02:00
wallyworld_bad visual image02:00
niemeyerwallyworld_: Not too protective.. just want to give access to people actually doing good work on it.02:03
niemeyerwallyworld_: If you have stuff for it, I'll add you to the team02:03
wallyworld_niemeyer: thank you. i just wanted to make sure i wasn't stepping over any boundaries02:04
niemeyerwallyworld_: Not at all, thanks for contributing02:04
wallyworld_niemeyer: my branch fixes a user reported bug - it allows for EC2_ env vars to be reconised for credentials02:04
niemeyerwallyworld_: Oh, haven't heard of those02:05
niemeyerwallyworld_: Thanks02:05
niemeyerwallyworld_: That's done02:05
wallyworld_niemeyer: is there a landing bot or do we run tests locally and push manually02:05
wallyworld_thanks02:05
niemeyerwallyworld_: The latter02:05
niemeyerwallyworld_: "LGTM" + test + lbox submit02:06
wallyworld_niemeyer: thanks. bug 1174874 fwiw02:06
_mup_Bug #1174874: EC2_* style Amazon environment variables not consulted <juju-core:Confirmed for wallyworld> <https://launchpad.net/bugs/1174874>02:06
niemeyerwallyworld_: Huh..02:07
niemeyerwallyworld_: Where's the reference for these environment variables?02:07
niemeyerwallyworld_: I mean, who uses it?02:07
wallyworld_not sure. i know i had them set up originally when i was got my ec2 account02:07
niemeyerwallyworld_: As John points out, the EC2 tools actually use the AWS_* ones02:07
* niemeyer googles02:08
wallyworld_i think they may have come from the aws account sign up perhaps02:08
wallyworld_not sure02:08
wallyworld_but i have . files with them in from ages ago02:08
niemeyereucatools02:08
niemeyerOkay, +102:08
wallyworld_ok, thanks02:08
wallyworld_just gives a nice robustness for the user02:09
niemeyerYeah02:09
wallyworldniemeyer: when i run the tests, there's an issue with the test http server already being started. from what i can see, a few tests start separate test servers and don't clean up?????02:30
wallyworldthis issue is unrelated to my changes but best not to land something with test failures02:30
niemeyerwallyworld: In aws_test.go?02:31
wallyworldvar testServer = testutil.NewHTTPServer() is in several test files02:31
wallyworlds3_test, iam_test etc02:32
wallyworldrunning go test ./... from the root dir exposes the issue02:32
wallyworldexample error02:32
wallyworldPANIC: s3_test.go:28: S.SetUpSuite02:32
wallyworld... Panic: listen tcp 127.0.0.1:4444: address already in use (PC=0x413D81)02:32
wallyworld/usr/lib/go/src/pkg/runtime/panic.c:22902:32
wallyworld  in panic02:32
wallyworld/home/ian/juju/go/src/launchpad.net/goamz/testutil/http.go:4702:32
wallyworld  in HTTPServer.Start02:32
wallyworlds3_test.go:2902:32
wallyworld  in S.SetUpSuite02:32
wallyworldso several tests call testServer.Start()02:33
wallyworldmaybe there needs to be a Stop() method called from TearDown02:34
wallyworldniemeyer: i fixed the issue https://codereview.appspot.com/954504502:58
wallyworldgo test ./... from toor dir now works02:58
wallyworldroot02:58
niemeyerwallyworld: Hmm02:59
niemeyerwallyworld: I'd prefer to not mix the two sets of variables03:00
wallyworldwhich variables? the listener and testServer?03:00
niemeyerwallyworld: if auth.AccessKey == "" || auth.SecretKey == "" { ... set both of them again using EC2_* ... }03:00
wallyworldoh, you mean the bug fix03:01
wallyworldok, i can change that03:01
niemeyerwallyworld: As it is, it's mixing the two sets of variables, which may end up pretty confusing03:01
wallyworldsure, will change it03:01
wallyworldyou agree with the test fixes?03:01
niemeyerwallyworld: Yeah03:02
wallyworldwith the variables thing, i just did what we did for goose03:02
wallyworldso you won't agree with goose either :-)03:02
niemeyerwallyworld: I suppose :)03:03
wallyworldmaybe we'll do a drive by fix sometime03:03
niemeyerwallyworld: On Stop(), might be worth adding listener = nil at the end, although that's really minor03:03
wallyworldok03:04
* thumper laughs03:28
thumpergrr03:28
thumperI was going to bitch at niemeyer03:28
* thumper wonders if he'll come back03:28
thumperdavecheney, wallyworld: updated that branch https://codereview.appspot.com/9677044/ to follow gustavo's suggestion03:41
* wallyworld looks03:42
thumperwallyworld: ta03:48
wallyworldnp03:48
thumperimagine my surpise when I found a test that actually tested the use case, and it passed03:48
wallyworldanother Go gotcha03:48
thumperI'm pleased it isn't idiomatic to return None in python instead of []03:49
thumper'cause that kinda blows03:49
wallyworldyes indeed03:52
wallyworldthumper: i wonder, should the new machine being created use constraints stored in the env (for mem etc) or allow the user to specify different ones04:00
thumperyes04:01
thumperwallyworld: both04:01
wallyworldok, so if none specified, use the env ones04:01
thumperwallyworld: specifying new ones override the existing env, but become a superset04:01
thumpernot an override, but a merge04:01
thumperwith specified overriding others04:02
thumpermake sense?04:02
wallyworldyes04:02
wallyworldaye04:02
* thumper looks at the assignment policies04:07
thumperagain...04:07
thumperactually, I'll go pick up the sushi first04:08
thumperdavecheney: what is our next juju-core milestone?04:55
=== tasdomas` is now known as tasdomas_afk
dimiternmorning all06:42
TheMuemorning07:16
dimiternTheMue: hiya07:17
TheMuedimitern: just playing around with the gmail account ;)07:17
dimiternTheMue: oh, yeah?07:18
TheMuedimitern: yep, I've used the automatic filtering so far. now I've got a lot of labels for each imap folder and I want to clean it up.07:19
dimiternTheMue: i have like 60 filters in thunderbird already, didn't want to go through the hassle of migrating to gmail, so I opted out07:20
TheMuedimitern: hehe07:23
TheMuedimitern: I dislike client side filters as I access my mail (private as work) from multiple devices07:24
jamdimitern, TheMue: my point as well. I did client side for a while, but I access the account from multiple locations (phone, laptop, desktop), and client-side doesn't work so well there.07:24
jamI was trying it back when I ran my own mailserver, but server-side just works a lot better.07:25
TheMuejam: yes. I run my private mail server (for my family and some friends) too and their I also provide server-side filtering07:26
jamTheMue: gmail does ok. There are bits I'd like to be better, but at least to set up a filter you can say "filter messages like this" and it will detect the list header and set it for you from the start.07:26
jamIt doesn't work with custom Launchpad headers.07:26
jambut for lists, it is quite easy to set up.07:27
dimiternrogpeppe1: ping07:28
TheMuejam: yes, looks fine so far. will now only clean up the migrated old folder. I kept too much unneeded stuff07:29
rogpeppe1dimitern: pong07:29
dimiternrogpeppe1: hey, i've been trying to figure out the correct client-side logic for the LifecycleWatcher loop, in particular when to call next initially07:29
* rogpeppe1 goes to look at state.LifecycleWatcher07:30
dimiternrogpeppe1: I should call it once initially and then after the select (like in entitywatcher), right?07:30
davecheneythumper: milestone ?07:30
davecheneyyou mean release number07:30
davecheneynfi07:30
davecheneyi hope someone tells me07:31
rogpeppe1dimitern: that sounds plausible, yes07:32
rogpeppe1dimitern: actually, no07:32
rogpeppe1dimitern: i think you should follow the pattern of entitywatcher07:33
dimiternrogpeppe1: but for that initial call I shouldn't care as much for error handling - I mean return whatever error I got from Next, otherwise for the second call (after the select), I use the same logic as in the entitywatcher loop07:33
dimiternrogpeppe1: well, I need some changes []string to send on the out channel07:33
rogpeppe1dimitern: why should the error handling be different for the first call and the second call?07:34
dimiternrogpeppe1: and the select appears before the Next call07:34
rogpeppe1dimitern: ah, yes, the logic will need to be a bit different - you'll need to set the out channel to non-nil only when you've got something to send07:34
dimiternrogpeppe1: ah, right - that tricky case07:35
dimiternrogpeppe1: so set w.out to nil initially to bypass the select and set it to not nil after i have changes?07:35
rogpeppe1dimitern: yup07:36
rogpeppe1dimitern: well, probably have a local "out" variable to do that07:36
rogpeppe1dimitern: just before the select, set it to non-nil iff there's something to send.07:36
dimiternrogpeppe1: yes, I have out := w.out; w.out = nil; var lastChanges []string07:37
dimiternrogpeppe1: and w.out <- lastChanges (both of these are set when relevant)07:37
rogpeppe1dimitern: i wouldn't ever set w.out to anything different than its original value07:37
rogpeppe1dimitern: i think it's easier to see correctness when mutable state is in local variables07:38
dimiternrogpeppe1: so use out < lastChanges instead of w.out in the select then?07:38
dimiternrogpeppe1: and have var out chan []string before the for loop07:39
rogpeppe1dimitern: no, do: for { var out chan []string; if lastChanges != nil { out = w.out }; select {case out <- lastChanges: lastChanges = nil; case lastChanges = <-in: } }07:39
rogpeppe1or something like that07:39
rogpeppe1dimitern: you'll probably need to have a loop calling Next in its own goroutine07:40
dimiternrogpeppe1: I didn't get the last "case" - why that?07:40
rogpeppe1dimitern: how are you going to receive new changes?07:41
dimiternrogpeppe1: after the select I have if changes, err := callNext(); err != nil .....07:41
rogpeppe1dimitern: you can't do that07:42
dimiternrogpeppe1: why not?07:42
rogpeppe1dimitern: because the call to Next can block indefinitely07:42
rogpeppe1dimitern: which means you won't be able to stop the watcher07:42
dimiternrogpeppe1: hmm - why is it working for the entitywatcher's loop then?07:43
dimiternrogpeppe1: no gorouting for calling next there07:43
rogpeppe1dimitern: hmm, yes. le me think a mo07:43
rogpeppe1dimitern: (the other works because Stop is called in a goroutine)07:43
dimiternrogpeppe1: i suspected as much07:44
dimiternrogpeppe1: so with the same goroutine for stop it should work w/o another for next?07:45
rogpeppe1dimitern: i don't think it would be quite right07:45
rogpeppe1dimitern: the key is in the "Note that because the change notification contains no information" comment07:45
rogpeppe1dimitern: if we don't have the Next in a separate goroutine, if the receiver is slow, we'll be trying to send stale information.07:46
rogpeppe1dimitern: we could decide that we don't care about that, but i suspect that william might not be keen07:47
dimiternrogpeppe1: hmm.. so how about having another go func() block before the loop for calling next, and moving all the logic & error handing around it there07:47
rogpeppe1dimitern: i think that sounds reasonable07:47
rogpeppe1dimitern: if it gets an error, it can kill the tomb and die07:48
dimiternrogpeppe1: thus inside the loop only the select and out channel switching will remain, and the lastChanges will be a closure used by that goroutine07:49
rogpeppe1dimitern: i think lastChanges will be a local slice variable07:49
dimiternrogpeppe1: local to the next() goroutine?07:50
rogpeppe1dimitern: local to the select loop07:50
dimiternrogpeppe1: how will the next goroutine report the changes to back?07:50
dimiternrogpeppe1: s/to//07:50
rogpeppe1dimitern: with a channel (i called it "in" above)07:50
dimiternrogpeppe1: ah! cool07:51
dimiternrogpeppe1: does it have to take it as an argument or it can be a closure?07:51
rogpeppe1dimitern: huh? "it" ?07:51
dimiternrogpeppe1: the in chan07:52
rogpeppe1dimitern: how can a channel take an argument or be a closure?07:52
dimiternrogpeppe1: sorry, i'm not explaining well enough - if I have in := make(<-chan []string); go func() { ... using in directly .. }() will it work or I have to use go func(in<-chan []string){ ... }07:54
rogpeppe1dimitern: ah, i see. yeah the former is just fine.07:54
dimiternrogpeppe1: good07:55
dimiternguys is the call now or in 1h ?07:55
rogpeppe1dimitern: i think it's in 5 mins07:55
dimiternrogpeppe1: ok, I set my calendar correctly this time :)07:56
dimiternrogpeppe1: and in addition to the in chan, i'll need a done chan error as well in the next goroutine, right?07:57
rogpeppe1dimitern: i don't think so07:58
rogpeppe1dimitern: i think you can use the tomb for that07:58
dimiternrogpeppe1: kill the tomb on error?07:58
* danilos is installing latest hangout plugin :/08:01
dimiternrogpeppe1: take a look at this please http://paste.ubuntu.com/5692992/08:25
dimiternrogpeppe1: does it look sane more or less?08:25
rogpeppe1dimitern: i'll look after the meeting08:26
dimiternrogpeppe1: sure, np08:26
dimiternrogpeppe1: so?08:48
* rogpeppe1 looks08:48
mrammI think if we are going to keep the containerization and API everywhere lanes, we should kill core 1 and core 2 -- the idea there was one lane per feature group anyway08:50
dimiternrogpeppe1: haven't compiled it yet (just realized I need to add panic("unreachable") in the next goroutine for go1.0x compatibility)08:50
mrammand we can move some of the existing stuff that is in the core1/2 lanes back into the backlog if they are just providing too much visual clutter08:50
rogpeppe1dimitern: i'd like to know if we still need to be go1.0.2 compatible08:51
dimiternmramm: and change the lanes as we progress down the roadmap?08:51
mramm(which I think is why thumper created the new lanes)08:51
mrammdimitern: well, I did make them generic so we don't have to change them08:51
dimiternrogpeppe1: i really don't want to care about go1.0[23] anymore, but we need to remove a lot of these panics throughout and possibly some other improvements are in order08:52
mrammbut I honestly don't care, changing them occasionally is no big deal08:52
thumpermramm: if we do that, then add a general bugs lane08:52
mrammI did08:52
* thumper has another call now08:52
mramm(at the top)08:52
thumperoh08:52
thumperok08:52
thumpergood08:52
thumper:)08:52
rogpeppe1dimitern: i was wondering about other stuff. for instance my recent tasks branch uses a go1.1 feature08:52
rogpeppe1dimitern: (method values)08:53
dimiternwe should've brought that up in the call, i just realized now08:53
dimiternlet's make it official and send a mail to juju-dev "We're now using go1.1 only"08:54
dimiternTheMue, davecheney, jam, mgz, rogpeppe1, danilos, wallyworld_, mramm: any objections to the above? ^^08:55
wallyworld_Go for it :-)08:55
rogpeppe1dimitern: code looks reasonable08:55
wallyworld_the sooner the better08:55
rogpeppe1dimitern: i might be tempted to factor out the Next error handling logic into a function, so it's not duplicated08:56
jamwallyworld_, dimitern: I believe the original discussion ended in "we'd like to be able to compile with the platform tools". Already it is really hard to backport to precise.08:56
=== rogpeppe1 is now known as rogpeppe
jambecause we don't have the tool there.08:56
danilosdimitern, if we've got golang packages lined up for people wanting to do development on precise and raring, I am +108:56
jamBut if 1.1 is officially at least in Saucy, we can probably go with it.08:56
jamAnd then we have to backport 1.1 for at least P, and probably Q and R08:56
mgzdimitern: only?08:56
wallyworld_can we put 1.1 in backportsd?08:56
jammgz: his point was only08:56
mgzhow do we get that on prrecise?08:56
jammgz: he just wants to make the release process harder on you. :)08:56
jammgz: the same way we'll get != go 1.0 ?08:57
jammgz: arguably if we have to do something to get go 1.0.3, we might as well get 1.108:57
jaminstea08:57
jaminstead08:57
mgzI'm not *sure* we do yet...08:57
rogpeppemgz: go1.1 works fine on precise - you just won't be able to use the standard golang package08:57
jammgz: I'm about 75% sure go 1.0 won't pass the test suite.08:57
mgzbut we could SRU an new minor version, a new major version would be... not sruable08:57
jam(as I have precise and I have to install go from the ppa to work on juju-core)08:58
jamI *know* lbox is broken with go 1.0, I think juju-core might be as well.08:58
dimiternso the agreement is not yet there - ok then, to early for an announcement on the list08:58
wallyworld_mgz: major = .x ?08:58
dimiternrogpeppe: what is duplicated about the error handling?08:58
jammgz: so I do believe that go 1.1 is source-compatible with go 1.008:58
wallyworld_dimitern: if stuff being committed break with 1.0.3, we should tell people08:58
mgzjamespage is shaking his head08:59
jamit is intended to be, at least, because of the "minor" bump08:59
rogpeppedimitern: it's exactly the same logic as in EntityWatcher.loop08:59
mgzwe can't use backports08:59
rogpeppei feel strongly that we should move to using go 1.108:59
dimiternrogpeppe: ah, good point, ok08:59
mgzwhen you do a backport, it doesnt build against backported packages08:59
jammgz: because of the bug that backports can't build with other backports?08:59
mgzjam: indeed08:59
rogpeppebut if it's not possible to backport to precise, then perhaps we should stay away from 1.1-specific features09:00
mgzwallyworld_: I'm reading "1.1" as major and "1.0.3" as minor, but it's all pretty fuzzy, the policies of the project matter more than the actual numbers09:01
rogpeppethat means we should probably gate commits on 1.0.3 compatibility09:01
mgzrogpeppe: I'm not sure what the current status is, or what our priorities are09:01
wallyworld_yeah :-(09:01
jamrogpeppe: so while I agree that use 1.1 when available, especially for official binaries. However, is there something in 1.1 which would prevent it working with 1.0.3 compiler?09:02
jamI thought it was at least supposed to be syntactically the same.09:02
jammaybe lib changes?09:02
rogpeppejam: there are language additions, yes09:02
mgzif we want newest juju installable on precise without a ppa, that then does make what version of go we run against more limited, unless we have other workarounds09:02
rogpeppejam: 1.0.3 code is compatible with 1.1 but not vice versa09:02
dimiternjam: e.g. panic("unreachable") is no longer needed in funcs with a for loop + select only  (most of the watchers, etc.) - it's a compile error in go1.0.3, not in go.1.1; there are nice features we can use in go1.109:03
dimiternand there's the performance improvements, method values, race detection..09:04
rogpeppejam: another nice feature is you can use a method as a value (it becomes a closure like you might expect)09:05
rogpeppejam: the changes are all here: http://golang.org/doc/go1.109:06
jamdimitern: performance improvements and race detection can be used without changing syntax09:06
jammethod values are nice, but you can use closures, and not having panic is also nice but a bit trivial09:07
dimiternjam: true, but if we're not allowed to use go1.1 due to (stupid?) packaging/backporting issues..09:07
jamso I think stating that for now, 1.0.3 compatible, but use 1.1 when you like.09:07
rogpeppejam: the issue i have is that it's very easy to fall outside 1.0.3 compatibility.09:07
jamrogpeppe: thats what the bot is for09:07
jamIf it is running precise (the one I have currently is), then we have that gate in place already.09:08
rogpeppejam: so the bot would test against 1.0.2 and 1.1 ?09:08
jamrogpeppe: I would tend to not do a multi-compiler pre-commit check, though that could be done.09:09
jamright now, goose is still 1.0 compatible (and passes the test suite there)09:09
jamso I didn't have to even try to get 1.0.2/3 there.09:09
dimiternrogpeppe: how about http://paste.ubuntu.com/5693088/?09:09
jamrogpeppe: the issue is trading off time-to-land-in-trunk with how much you expect to actually benefit from spending the time. A CI system is much better at doing multiple-platform-and-compiler level testing, vs the pre-commit testing09:11
rogpeppejam: right09:11
jamso the "most expected platform/system" is the pre-commit check, and the CI lets you know that you could release this across all your supported platforms.09:11
jamyou could certainly do 1.0.3 in CI, but I would put that in "most expected to fail" vs 1.109:11
rogpeppedimitern: how about this instead? http://paste.ubuntu.com/5693094/09:13
rogpeppedimitern: oops, with a tomb argument too, i guess09:14
dimiternrogpeppe: yeah09:14
dimiternrogpeppe: and the call()?09:15
rogpeppedimitern: i think that bundling the error checking with the call itself makes for a slightly more coherent function09:15
rogpeppedimitern: see callWatch in EntityWatcher.loop09:15
dimiternrogpeppe: so call has the be an arg as well - call func() error09:16
rogpeppedimitern: with one extra argument09:16
rogpeppedimitern: yeah, you'd do: if err := watcherNext(call, &w.tomb); err != nil {w.tomb.Kill(err)}09:16
dimiternrogpeppe: what if we have a commonWatcher with next() error and pass that instead? or even make this a method of the commonWatcher & embed it in both watchers?09:17
dimiternrogpeppe: having commonWatcher will allow all this to be handled inside it's next() method09:18
rogpeppedimitern: i'm not sure i see a particular advantage in using a commonWatcher type rather than a closure09:18
rogpeppedimitern: but there may be something i'm not seein09:19
rogpeppeg09:19
dimiternrogpeppe: well, there are going to be at least 3 watchers with this logic - entity, life and environconfig09:19
rogpeppedimitern: what do you see going into commonWatcher other than next() ?09:20
dimiternrogpeppe: right, we need different next calls for each one09:20
rogpeppedimitern: anything else?09:20
dimiternrogpeppe: so watcherNext(call func(method string, result interface{}), err error, wtomb *tomb.Tomb) error {..} then09:21
rogpeppedimitern: watcherNext(call func(method string, result interface{}) error, wtomb *tomb.Tomb) error {..}09:22
rogpeppedimitern: i think09:22
dimiternrogpeppe: oh yeah, the err is internal now09:22
dimiternrogpeppe: sgtm09:22
rogpeppedimitern: i may very well change my position on commonWatcher if we find more stuff that can be factored out09:22
rogpeppedimitern: but for the time being, i think it makes things less obvious and would use more code09:23
rogpeppedimitern: actually, i think i see a way to factor out almost all of the code09:24
dimiternrogpeppe: except next is different for each watcher - entitywatcher returns nothing but an error, while the lifecyclewatcher returns a slice as well09:25
rogpeppedimitern: i think entitywatcher is different09:25
rogpeppedimitern: i'm thinking about other watchers that all return some actual data09:25
dimiternrogpeppe: so?09:26
rogpeppedimitern: go with just factoring out the next call for the time being.09:26
rogpeppedimitern: the other factor can be done with the next watcher09:27
dimiternrogpeppe: you mean factoring out only the error handling, and not call next() inside it?09:27
rogpeppedimitern: no, i mean call next inside it, as i suggested. i *think* that looks nicer.09:28
dimiternrogpeppe: what about the results?09:28
rogpeppedimitern: that's just an extra arg09:28
dimiternrogpeppe: no, i mean we should return error & the results we got, right?09:29
rogpeppedimitern: ha, good point.09:29
rogpeppedimitern: watcherNext(results interface{}, call func(method string, result interface{}) error, wtomb *tomb.Tomb) error09:30
dimiternrogpeppe: yeah, sgtm09:31
dimiternrogpeppe: params.EnvironConfigWatcherNextResults :) that starts to look like java09:52
rogpeppedimitern: :-)09:53
rogpeppedimitern: at least you'll only be using it in about two places09:53
dimiternrogpeppe: yeah09:54
dimiternrogpeppe: I can think a couple of cases where commonWatcher is useful09:58
dimiternrogpeppe: e.g. Stop() and Err() are the same09:58
rogpeppedimitern: i've got a suggestion coming up09:58
dimiternrogpeppe: in addition we can have callNext call as a field in commonWatcher as well09:58
dimiternrogpeppe: and the tomb and wg10:01
dimiternand st10:02
dimiternrogpeppe: although "commonWatcher" might be incorrect, as it's just a few bits of common code extracted, but not a complete watcher10:02
dimiternrogpeppe: maybe "watcherBase" is better - we can have the go func() { .. spin the loop } in newBaseWatcher10:05
rogpeppedimitern: something along these kinds of lines? http://paste.ubuntu.com/5693203/10:05
mgzwas there a message to list about the code.google.com/p/go.crypto dep?10:06
rogpeppedimitern: it's not *quite* right, but i think it's not too bad10:06
rogpeppemgz: i don't remember one10:07
dimiternrogpeppe: mostly ok, except for a few things10:08
dimiternrogpeppe: call needs to handle the case when results is nil10:09
rogpeppedimitern: i think it does that ok, doesn't it?10:09
mgzwe should probably do such things when adding deps10:09
dimiternrogpeppe: not sure - shouldn't the last arg of st.call be &results ?10:10
rogpeppedimitern: i don't think so10:10
rogpeppedimitern: result is already a pointer (created by the newResults function)10:11
dimiternrogpeppe: ah, ok10:11
dimiternrogpeppe: should work then10:11
rogpeppedimitern: actually, i think there's another way of avoiding a bit more work in each watcher10:12
rogpeppedimitern: one mo10:12
dimiternrogpeppe: how about overriding init() and setting there the out chan, call and newResult? then we can just spin up the loop goroutine right after that10:13
rogpeppedimitern: i'm not quite sure what you mean10:14
dimiternrogpeppe: i'd like to factor out this somehow as well: http://paste.ubuntu.com/5693224/10:14
dimiternrogpeppe: except out's type is different so it won't work probably (damn generics!)10:15
rogpeppedimitern: yeah, i think the wg.Wait can go (suggestion in a moment) but the rest should probably stay10:16
rogpeppedimitern: marginally better, perhaps: http://paste.ubuntu.com/5693269/10:29
dimiternrogpeppe: nice; only in the case of if !ok { should return some error }10:33
rogpeppedimitern: no need to return an error - the tomb will already have been killed with an appropriate error10:34
dimiternrogpeppe: and this will work for entitywatcher as well, right?10:34
dimiternrogpeppe: it won't compile with just "return"10:35
rogpeppedimitern: i think it will. it won't be *quite* as efficient, but i don't think we mind.10:35
rogpeppedimitern: yeah, it should be return nil probably10:35
dimiternrogpeppe: ok, and i'll put a comment about the tomb there as well10:36
dimiternrogpeppe: thanks10:36
rogpeppedimitern: np10:36
dimiternrogpeppe: so if we return nil from the loop, and in commonLoop we already killed the tomb with an error, won't the "return nil" wipe out that original error?10:56
rogpeppedimitern: no10:57
rogpeppedimitern: the first non-nil, non-ErrDying error will stick10:57
dimiternrogpeppe: i see, ok10:59
dimiternrogpeppe: wasn't immediately obvious for me looking at tomb.Kill10:59
rogpeppedimitern: rtfm :-)11:03
rogpeppedimitern: http://paste.ubuntu.com/5693339/11:03
dimiternrogpeppe: isn't w.commonWatcher.init() the same as w.init() ?11:05
rogpeppedimitern: yeah. i guess i prefer the explicitness there.11:05
dimiternrogpeppe: sure11:05
dimiternrogpeppe: so either the TestMachineWatch logic is wrong or the commonLoop logic is wrong, because Next never returns an inital event11:23
rogpeppedimitern: interesting. the Next call is being made and doesn't return?11:24
dimiternrogpeppe: yes - it returns only after the timeout11:24
dimiternrogpeppe: http://paste.ubuntu.com/5693378/ - added debug logs after next returns and one after sending to in11:25
rogpeppedimitern: ah, this is interesting. it looks like i designed it that way deliberately.11:26
dimiternrogpeppe: :) so? is the test wrong or the loop?11:26
rogpeppedimitern: look at srvMachine.Watch - it reads the channel11:26
dimiternrogpeppe: yeah, it does, but shouldn'y11:27
rogpeppedimitern: actually, i think it should11:28
rogpeppedimitern: and i think the test is right, as is the current loop11:28
rogpeppedimitern: the suggested implementation should be different though11:28
dimiternrogpeppe: what then?11:28
dimiternrogpeppe: it shouldn't call next initially?11:29
rogpeppedimitern: we should return the initial data with the initial watch request11:29
rogpeppedimitern: so that we don't do two round-trips whenever we start a watcher11:29
rogpeppedimitern: that was the reason for doing things this way anyway11:29
dimiternrogpeppe: saving a roundtrip seems sane11:30
jamdanilos, wallyworld_, w7z: poke11:30
dimiternrogpeppe: but what does this mean for the loop?11:31
rogpeppedimitern: something like this: http://paste.ubuntu.com/5693401/11:32
dimiternrogpeppe: move the next call after the select and have in := w.in11:32
dimiternrogpeppe: ah, right11:32
dimiternrogpeppe: but for the entitywatcher, this should be changes := struct{}{} instead11:34
rogpeppedimitern: no need to have a changes variable for the entity watcher11:35
dimiternrogpeppe: wait, so the entitywatcher is the one not working, haven't written tests for the others yet11:35
rogpeppedimitern: the entity watcher was working before, right?11:36
dimiternrogpeppe: yes11:36
dimiternrogpeppe: for the lifecycle and environconfig watchers what you suggested should work11:36
rogpeppedimitern: so you're just changing it to use the commonWatcher to start with?11:36
dimiternrogpeppe: yes, but the entitywatcher doesn't have results, so calling etype, eid, "Watch" won't report anything11:38
dimiternrogpeppe: maybe you meant out = w.out initially for entitywatcher loop11:39
dimiternrogpeppe: yeah, it works like this11:39
rogpeppedimitern: the entitywatcher loop will be a bit different11:39
dimiternrogpeppe: that was the only change needed11:40
dimiternrogpeppe: the test now pass11:40
rogpeppedimitern: cool11:40
dimiternrogpeppe: so the same has to be applied for lifecycle and environconfig watchers? calling Changes in Watch* at server-side?11:47
rogpeppedimitern: yeah, i think so11:48
rogpeppedimitern: it's probably worth checking that all those things always produce an initial event11:48
dimiternrogpeppe: so the params.*WatcherId should embed params.*WatcherNextResults then11:48
wallyworld__jam: you forgot to ask me what i did, but that's ok. one thing for you - i talked to is about the rt, got the cc list updated, and they have also bumped its priority so hopefully will be done real soon now11:49
jamwallyworld__: yay, sorry I missed you. You had been talking about landing your other branches, so I thought you were done. But good to hear about the rt.11:50
rogpeppedimitern: i don't think you can embed it, but yes, the same value should be there. and i'd probably call it, e.g. params.LifecycleWatchResults11:50
rogpepperather than WatcherId11:50
dimiternrogpeppe: ok11:50
wallyworld__jam: i also fixed goamz - tests weren't cleaning up and so were failing, and i didn't want to land my changes without fixing even though my changes weren't responsoble11:51
jamwallyworld__: so instead of cleaning up at the start of the test we cleanup at the end?11:51
wallyworld__jam: each test was creating a socket and then just leaving it opened and not closing, so subsequent tests would fail11:51
wallyworld__so i added cleanup to the suite teardown11:52
dimiternrogpeppe: and afaics both lifecycle and environconfig watchers send initial event11:52
wallyworld__jam: also talked to tim about containerisation, agreed on some work items,  and started work on the first branch11:52
frankbanrogpeppe, anyone else: it seems there is something like a logging loop in machine 0 when you use --force-machine. /var/log/juju/all-machines.log grows about 2 MB per second. and debug-log is unusable12:01
rogpeppefrankban: what are all those log messages?12:02
frankbanrogpeppe: it seems to repeat the same messages again and again (e.g. messages from hooks execution)12:03
rogpeppefrankban: what messages?12:03
dimiternrogpeppe: should I use params.LifecycleWatchResults for both Watch* and Next then ?12:07
frankbanrogpeppe: http://pastebin.ubuntu.com/5693483/ just an example. the problem is the same logs are repeated in a loop.12:07
dimiternrogpeppe: and just pass the id in next as well12:07
rogpeppedimitern: i suppose you could. or just leave the id blank for next.12:08
dimiternrogpeppe: ok12:08
rogpeppefrankban: could you paste the log with at least 3 repetitions of the cycle, so i can get an idea for what's going on, please?12:08
rogpeppes/the log/a portion of the log/12:09
frankbanrogpeppe: sure, grabbing it. however, to dupe: bootstrap a juju-core env, deploy wordpress (or the GUI) using --force-machine 0.12:11
frankbanrogpeppe: http://pastebin.ubuntu.com/5693508/12:16
rogpeppefrankban: thanks12:17
frankbannp12:18
frankban.me lunches12:18
dimiternrogpeppe: I don't have to add tests like TestServerStopsOutstandingWatchMethod for the other watchers, right?12:33
rogpeppedimitern: looking12:34
rogpeppedimitern: i think that functionality should be tested for each watcher actually12:35
rogpeppedimitern: i think it's probably possible to make the test code generic though12:36
dimiternrogpeppe: but all of them are resources and handled all the same in stopAll, right?12:36
rogpeppedimitern: that test is more about testing the client-side stop logic actually12:36
rogpeppedimitern: stopAll isn't invoked in that test, i don't think12:37
rogpeppedimitern: oops12:37
rogpeppedimitern: sorry, i'm wrong12:37
dimiternrogpeppe: it's on the server side when stopping12:38
dimiternrogpeppe: so I can transform that test into a table-based with setup funcs for each watcher12:38
rogpeppedimitern: it might be good to make that test something that starts one of every kind of watcher, and checks to see that they're all torn down appropriately when the server is stopped.12:39
dimiternrogpeppe: by "torn down" you mean returning CodeStopped, right?12:40
rogpeppedimitern: yeah.12:41
dimiternrogpeppe: ok12:41
rogpeppedimitern: i'd start all the watchers at once, then tear down the state just once.12:41
dimiternrogpeppe: yeah, so some state setup code first, start all & wait for initial events from everyone, then stop the server and try calling changes on each one and check for CodeStopped12:42
jammgz: we missed you earlier. How's your day going?13:08
mgzfighting dpkg a little, otherwise okay13:10
mgz(should have mentioned I'd be out over lunch, but you probably saw me discussing that with gavin)13:11
jammgz: so are there plans to get go-1.0.2 or 3 into precise?13:12
jamI think we have a failure in the test suite from using go-1 in gobot13:13
jam(it fails reliably on gobot, but succeeds on my local machine)13:13
mgznot currently, but we could form some13:17
mgzwe're the only people who'd drive that, juju is the only real user for go in precise13:18
=== wedgwood_away is now known as wedgwood
dimiternrogpeppe, mramm: kanban?14:04
rogpeppedimitern: ah, good point14:04
mgzjam: the go bot kinda hates life it seems14:12
jammgz: well, its doing things slightly differently than what the rest of us have all worked around manually.15:40
dpb1Hi all -- I'm getting an error with the latest updated juju-core: http://paste.ubuntu.com/5694171/  <-  What am I missing?  (I'm using the 'cstack' environment)16:16
dpb1Man, I just enabled mouse mode for weechat and byobu.  It's working really great.  Even cut and paste is working better now.16:17
dpb1wow, that was the wrong window.16:17
rogpeppe1dpb1: mgz or jam or dimitern might know what's going on there16:22
mgzlooks like the container was not marked public...16:25
mgzdpb1: can you pastebin `nova endpoints` with your novarc sourced? I'm assuming e8231fcc9d9546c9961caf858676ea4e is your tenant id16:29
dpb1checking16:31
dpb1mgz: http://paste.ubuntu.com/5694222/16:32
mgzdpb1: for now, you can probably just set public-bucket-url... though I just checked and that seems to not have the streams data16:32
mgzdpb1: can you file a bug please?16:33
dpb1mgz: sure, what I have in those two pastes enough?16:33
dpb1mgz: also, what should I set public-bucket-url to?16:33
mgzhttps://swift.canonistack.canonical.com/v1/AUTH_526ad877f3e3464589dc1145dfeaac6016:36
mgzright, I'm off now16:37
mgzmay be around later tonight16:37
hatchumm well we are still on the upswing of this project so we have a support team of 5 and a core team of 717:12
hatchso 12 fulltime17:12
hatchplus some floaters if needed for specific things we don't have the experience for already17:13
hatchdamn17:13
* rogpeppe1 is very happy with the new Task abstraction17:25
rogpeppe1anyone around to review a branch that i think's trivial that unbreaks trunk for go 1.0.* ?18:56
rogpeppe1if so, it's at https://codereview.appspot.com/968204718:56
thumpermorning21:05
kyhwanaYep *chugs coffee*21:11
thumperniemeyer: you around?23:19

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