thumperwallyworld_: ping00:53
wallyworld_otp, sec00:54
wallyworld_thumper: hi01:01
thumperwallyworld_: hey01:01
thumperwallyworld_: how are things with you today?01:01
wallyworld_not too bad. doing some refactoring as per code review comments. but main issue is a failing test i have no farking idea what's wrontg01:01
thumperwallyworld_: want to hangout? or are you focused?01:04
wallyworld_i can do a call01:04
wallyworld_you have a url handy?\01:04
thumpernope, will start one01:06
wallyworld_thumper: https://codereview.appspot.com/988604501:28
* fwereade__ is up way past his bedtime, and has just proposed a reasonably monstrous pipeline, and would be ever so happy if he woke up tomorrow to some reviews from thumper and/or wallyworld_02:16
* fwereade__ will probably be late in tomorrow02:16
thumperfwereade__: hi there02:16
wallyworld_fwereade__: sure02:16
thumperfwereade__: saw them incomming02:16
fwereade__gn :)02:16
wallyworld_fwereade__: i'll ping you tomorrow if i can't get my stupid test to pass02:17
wallyworld_talk later02:17
fwereade__wallyworld_, sorry, never got round to that -- definitely let me know tomorrow02:17
wallyworld_will do. good night02:17
wallyworld_thumper: found why the two tests were giving different results - stupid typo. now to fix the failure02:38
thumperwallyworld_: I have something for you02:48
thumperwallyworld_: what does a container instance of a *state.Machine give for the result of a Tag() call ?02:48
thumperdoes it special case anything?02:48
wallyworld_not that i have implemented02:49
thumperwallyworld_: you'll need to tweak it02:49
wallyworld_i haven't changed the Tag() method02:49
thumperwallyworld_: as the result of Tag() should be something that works for a filename02:49
thumpermachine-0/lxc/1 isn't good02:49
thumperreplace('/', '-'02:49
wallyworld_i had ":" as the separator02:49
thumperyeah, I know02:49
thumperwe can blame fwereade__ for that02:49
wallyworld_ok, will tweak the Tag() method, thanks for letting me know02:50
thumperwallyworld_: can I count on you fixing that for me?02:50
thumperwallyworld_: I'm getting my head around all this cloudinit stuff02:50
thumpernow that I realise that the user-data is the yaml file, things are easier02:50
thumperI was trying to find the missing step02:50
wallyworld_i knew that much not not too much extra02:51
wallyworld_but not02:51
* thumper nods02:51
thumperI'm starting to feel more comfortable about implementing this lxc-broker now02:51
thumperI feel I know more about WTF is going on02:52
thumperwallyworld_: do you know how to use the api?03:31
thumperwallyworld_: I want to start using that instead of *state.State03:31
thumperif possible03:31
thumperwe should have something that returns me a *state.Machine right?03:32
wallyworld_thumper: not really. i've not written code that uses it. perhaps look at the tests to see what is done?03:32
thumperor should I not bother yet03:32
thumperI have too many other things to worry about just now03:32
thumperwill leave a TODO for now03:32
wallyworld_sure. let's make sure we fix that one soon though03:32
thumperwallyworld_: yes, agreed03:40
=== tasdomas_afk is now known as tasdomas
* thumper stops hacking to do some reviews for fwereade__04:48
thumperfwereade__: left the last two as an exercise for some europeans :)05:23
* thumper is done for today05:23
=== danilos_ is now known as danilos
jammorning danilos07:57
danilosjam: morning07:57
rogpeppe1mornin' all08:07
TheRealMuesomehow my provider dislikes me this morning *hmpf*08:08
=== TheRealMue is now known as TheMue
TheMuefwereade__: ping08:57
jamdanilos: do you have a hardware switch on your mic08:59
danilosjam: no08:59
danilosjam: it just died08:59
TheMuefwereade__: oh, technician rings at the door, bbiab08:59
danilosjam: it's not showing in the "vumeter"08:59
fwereade__TheMue, heyhey08:59
danilosjam: it seems something got messed up in the USB stack, my mouse stopped working now09:01
jamdanilos: uh-oh, sounds like reboot is in order09:02
danilosjam: yeah :/ brb09:02
jamI'll grab a snack, be back in a sec09:03
jamdanilos: welcome back09:09
fwereade__rogpeppe1, jam, TheMue: https://codereview.appspot.com/10083047/ and https://codereview.appspot.com/10166044/ are sizeable but important09:10
TheMuefwereade__: so, back again, will take a look09:10
TheMuefwereade__: thx for your review09:10
fwereade__TheMue, and what can I do for you? you pinged :)09:11
TheMuefwereade__: yes, the first note "Should just be a straight rename of JobServeAPI to JobManageState." is not clear for me in that context.09:11
fwereade__TheMue, jobs are somewhat fluid and casual groupings of tasks; in the current intended model, the ManageState tasks include API-serving and txn-resuming (by necessity) and cleaning (by convenience/similarity of use case)09:14
TheMuefwereade__: ah, so only JobManageState shall exisit in future and start all the according tasks. am i right?09:18
fwereade__TheMue, JobManageState should just be a direct replacement of JobServeAPI at this point09:19
TheMuefwereade__: ok09:19
fwereade__TheMue, fwiw if you were to fix the watcher and just repropose the worker, I would be happy -- integration (and thus the jobs change) doesn't have to come in in this CL09:20
fwereade__TheMue, smaller, simpler, quicker to review, I think09:20
fwereade__TheMue, (and I'm sorry for dropping the ball on the watcher impl review)09:20
TheMuefwereade__: it's ok. i had it this way earlier but changed it after a hint of dimiter. will now change it back again.09:21
mattywfwereade__, is it worth me raising a bug about $HOME not being set when hooks get run, or is it fair to say it's not there for a reason?09:25
TheMuefwereade__: "Clients are expected to parse their own damn data ..." *hehe*09:25
fwereade__mattyw, I would *prefer* to only guarantee the existence of the env vars we produce ourselves09:26
fwereade__mattyw, let me just poke in and see if I can see what happened to it, though, just a sec09:27
mattywfwereade__, it's possible it might not have ever been there, It looked to me like it wasn't set in pyjuju either09:28
fwereade__mattyw, ok, it looks like it never was there09:30
mattywfwereade__, ok thanks09:31
fwereade__mattyw, I *might* be conviced that we should pass the whole shell environment down rather than constructing it from scratch (apart from $PATH, which we do copy down (with additions)), but I'd need a reasonably significant use case09:32
fwereade__mattyw, feels somewhat nicer to run in as controlled an environment as possible though09:33
fwereade__Makyo, ping -- I would appreciate your eyes on https://codereview.appspot.com/10166044/ -- it includes the stuff we discussed yesterday09:35
rogpeppe1fwereade__: i think we should pass the whole shell environment down09:37
=== tasdomas is now known as tasdomas_afk
danilosjam, all: heya, how do I run the live tests? I had it written down somewhere, but can't find it now10:12
jamdanilos: you go to each provider, cd environs/openstack; go test -live; cd environs/ec2; go test -amazon10:13
jamyou need to source your credentials into the environment first10:13
danilosjam: it's fine to keep it in ~/.juju/environments.yaml or do I really need to put them into environment variables?10:13
jamdanilos: I don't think the test suite looks at environments.yaml10:13
danilosjam: ack, thanks10:14
=== tasdomas_afk is now known as tasdomas
* TheMue is at lunch10:31
danilosjam: I am trying with ec2 first, but "go test -amazon" doesn't work (it seems AWS_SECRET_ACCESS_KEY is being unset somewhere where it shouldn't be, since setting both through EC2 envvars makes it go past that point, but then tests fail which expect access keys to be wrong)10:33
danilosjam: fwiw, this is what I had: http://pastebin.ubuntu.com/5754428/10:35
jamdanilos: if you are running the ec2 tests, I know you'll need to also do '-test.timeout=7200' or something like that, as the test suite is quite slow.10:35
jamthat isn't your specific problem10:36
jambut you'll run into that in 5 min10:36
jam(the default timeout for the test suite)10:36
danilosjam: right10:36
jamdanilos: so I just sourced my ec2creds which only sets "AWS_ACCESS_KEY_ID" and "AWS_SECRET_ACCESS_KEY" and go test is happy10:37
jamdanilos: you might want to check the spelling of your env variables, as the above ones aren't very obvious for me.10:40
rogpeppelaptop just crashed for the 4th time in two days10:40
rogpeppeand lost another couple of hours' work dammit10:40
danilosjam: I did, I'd hope copy-pasting from goamz/aws/aws.go should do it as a check :)10:42
jamrogpeppe: just in your editor buffer? wouldn't it at least be on disk?10:42
rogpeppejam: i hadn't saved, stupidly10:43
* rogpeppe goes to change the editor so that this doesn't happen again10:43
jamdanilos: I can confirm your bootstrap-verify branch (as when we started) is passing the test suite. "BootstrapAndDeploy" takes 421s to complete, though.10:43
danilosrogpeppe, hey, emacs auto-saves stuff for you10:43
mgz_eheh, stop trying to convert people to your religion10:44
danilosjam: I am having the same problem with trunk10:44
danilosmgz_, just sayin' :P10:44
jammgz_: /wave10:44
rogpeppedanilos: yeah. this should too - there's a Dump function that saves the current working state, but it's not called automatically10:44
jamdanilos: well, I do a pretty heavy cycle of running the test suite, which requires saving often10:44
danilosjam: me too, I even commit with each new test/function added ;)10:45
jamdanilos: yeah, I'm often the same10:46
danilosjam: any ideas if I am doing something blatantly wrong: http://pastebin.ubuntu.com/5754461/?10:47
jamdanilos: my goamz was a bit older, I just updated and will see if that breaks my stuff10:49
danilosjam: thanks10:49
danilosnooo, the drilling on the floor up returns10:50
jamdanilos: I get a lot of failures just running 'go test ./...' in goamz, does it pass for you?10:50
jamTestMultiComplete fails for me.10:50
jama lot of "SpecifiedBucketDoesNotExist" log messages.10:51
danilosjam: yeah, for me as well with r37: http://pastebin.ubuntu.com/5754474/10:51
jamdanilos: on the plus side, it has been failing for a while :)10:59
jamr35 also fails for me10:59
jamdanilos: I see the same failure you had until I source my credentials.11:01
jamAre you sure you exported them correctyl?11:01
jamdanilos: when I source my creds again, it starts passing, even if goamz doesn't work.11:09
danilosjam: http://pastebin.ubuntu.com/5754519/11:13
danilosjam: I am not sharing my keys with you, but even echoing $... does show them11:13
jamdanilos: sure 'set' sees it, but are they exported?11:13
jamI don't know if you are using bash11:14
jambut you can do:11:14
jambut you need to do11:14
jamexport FOO11:14
jamfor child processes to see it11:14
danilosjam: that was it :/ ta11:16
jamdanilos: I'm glad it helped11:16
danilosjam: I thought I tried with passing them right before the "go test", when it's passed down11:16
jamdanilos: AWS_XXX=YYYY go test ?11:17
jamI think that should wok11:17
danilosjam: it was confusing that it actually failed on ACCESS_SECRET_KEY, but not on ACCESS_KEY_ID which was checked for first11:17
danilosjam: yeah, I know11:17
jamdanilos: hangout time?11:30
jamyou can at least join to listen in11:30
wallyworld__    c.Errorf("mgo.Dial only paused for %v, expected at least %v", t1, 3*retryDelay)11:54
wallyworld__... Error: mgo.Dial only paused for 500.800787ms, expected at least 1.5s11:54
mgz_hm, environs/azure seems to break the build?11:59
mgz_fwereade__: ^am I missing something or should this get pulled out for now?11:59
danilosone question about the live tests: if I interrupt the test run with C-c, does that mean I might have instances that keep on running?12:00
jammramm: are you awake yet? :)12:01
mgz_danilos: potentially, tests should be capable of not leaking resources, but do you trust them to be robust like that? :)12:01
jammgz_, fwereade__: I'm pretty sure we need to roll back the azure change because it breaks 'go build'12:01
danilosmgz_, tbh, no :)12:01
mgz_you'll want the eucatools stuff or similar to inspect left over instances/secgroups etc12:02
mrammjam: yep, I'm here12:02
jamwallyworld__: I should probably have posted to the mailing list when I updated for the newer mgo, I had run into it the other way (updated mgo, the *other* tests were failing)12:02
jammramm: I'm here: https://plus.google.com/hangouts/_/e6b23e6c7391c8641a3b6660495f8fe7055e188412:02
jamdanilos: yes, and in fact, I've seen unclean shutdowns without killing the test suite.12:02
jamSo generally, check if you have instances running12:03
wallyworld__jam: no problem. i wonder why the version (v2) stayed the same even though the changes were not backwards compatible semantically12:03
jamwallyworld__: technically the APIs are stable, it just added a Sleep internally12:03
jamtests that depend on time.Now are a bit broken anyway12:03
wallyworld__but the behaviour changed12:04
danilosjam: ok, the tests pass with canonistack as well; now, I wonder if anybody knows how to choose lcy02 for https://dashboard.canonistack.canonical.com/12:13
jammgz_: ^^ ?12:13
mgz_people use dashboard? :)12:14
fwereade__mgz_, huh, was that not a change in response to an mgo change? are you definitely up to date there?12:16
mgz_danilos: so, no, not sure, you can ask in the internal support channel, or use python-novaclient commandline tools which pay attention to the env variables you set12:16
fwereade__jam, mgz_: grar, I did specifically lgtm it with a "make sure it builds"12:17
danilosmgz_, heh, I was taking a look and noticed that none of my instances showed up in there12:17
mgz_there may be another endpoint for lcy0212:17
jamfwereade__: yep, I saw that12:18
jamand I was surprised12:18
fwereade__jam, if no more tan I have seen has happened, yes, please revert it12:18
mgz_fwereade__: sorry, probably crossing converstions here12:18
mgz_fwereade__: ian's test failure was a mgo thing, trunk not building is the azure stub12:19
fwereade__mgz_, ok, we should indeed revert the azure stub if it doesn't build12:19
danilosmgz_, the wiki page talks about choosing a different region in the drop down when logging in, a shame there is no such dropdown :)12:21
rogpeppefwereade__: all reviewed i think12:21
danilosmgz_, ah, there's also a "lcy01 is the only available region in the dashboard"12:21
rogpeppenow back to try and remember the code i wrote this morning :-(12:21
fwereade__rogpeppe, lovely, ty12:22
danilosrogpeppe, nothing more joyous than having to rewrite the code from memory (it is still fast, but very annoying)12:22
fwereade__mgz_, jam, has anyone proposed a revert?12:22
mgz_fwereade__: proposed12:23
rogpeppedanilos: yeah. it's the comments in particular i find annoying, when you've spent a while thinking of a good turn of phrase and it's all gone12:23
fwereade__mgz_, approved on trust that it does what you say it does ;p12:23
rogpeppemgz_: LGTM trivial12:27
jammgz_: just make sure you poke jtv so he knows its happened12:28
jtvArgh.  I forgot to compile before landing.  And now I can't propose a fix because something else is broken.12:29
fwereade__rogpeppe, sorry, but you seem to have reviewed all the things that already had 2 LGTMs and skipped the one's that didn't12:29
jtvI thought I'd built it, and I didn't.  *bash* *bash*12:29
fwereade__rogpeppe, good comments, appreciated very much12:29
rogpeppefwereade__: orly? i thought i'd gone through all the ones in activereviews12:30
rogpeppefwereade__: which ones have i missed?12:30
rogpeppefwereade__: (it's really not easy to work forward through reviews in a consistent way - i should have kept notes about which ones i'd done)12:31
jtvDoes anybody know what the logger.Logf errors are about?12:31
fwereade__rogpeppe, https://codereview.appspot.com/10083047/ and https://codereview.appspot.com/10166044/12:31
fwereade__rogpeppe, it is not impossible that you were looking at the "approved" section ;p12:31
fwereade__jtv, update launchpad.net/loggo12:31
rogpeppefwereade__: ah, i was indeed12:31
rogpeppefwereade__: doh12:32
jtvargh thanks12:32
rogpeppefwereade__: and one of them i'd even started and had a pending comment for12:32
rogpeppefwereade__: i started on that one and then realised i needed to go through the rest of the pipeline to get context12:33
jtvWill have a build fix up shortly.12:37
gary_postermramm, are you ready for a random GUI person to descend upon the juju core daily yet, or should we wait another day?12:38
fwereade__rogpeppe, no worries12:44
jtvReview needed for build fix: https://codereview.appspot.com/1018404312:47
jtvAnybody available?12:47
TheMuefwereade__: while changing test just one question. by coalescing events you mean multiple cleanups transaction lead to only one event?12:49
=== teknico1 is now known as tekNico
=== wedgwood_away is now known as wedgwood
fwereade__TheMue, yes I do, sorry13:39
TheMuefwereade__: hmm, so outlined loop (I already used it before that way) does not coalescing events.13:41
TheMuefwereade__: it simply fires each time.13:42
TheMuefwereade__: e.g. I have two destroys w/o cleanup. here I get two events.13:45
fwereade__TheMue, that's fine if the first event was notified before the second occurred13:47
fwereade__TheMue, but if two events happen and then the client is notified, he should not be notified again13:47
fwereade__TheMue, I think the structure I showed you is pretty common among the watchers, isn't it?13:47
fwereade__TheMue, and apart from anything else13:48
TheMuefwereade__: yes, that's why I used it first too.13:48
TheMuefwereade__: but there is more effort e.g. when collecting and merging document ids13:48
fwereade__TheMue, if you don't read from channels you register with state/watcher, you block *all* watchers13:48
fwereade__TheMue, except that there is no effort in this case13:49
fwereade__TheMue, any change, flip the send bit on; any send, flip it off13:49
TheMuefwereade__: dunno if I got you right.but let me propose the newest version so i can show you where i'm stumbling.13:51
fwereade__TheMue, sure, sgtm13:52
TheMuefwereade__: https://codereview.appspot.com/10148045 is in, i removed the job integration too13:56
=== teknico1 is now known as tekNico
TheMuefwereade__: in state_test.go line 1342ff I do the two Destroy() and then get two change events.13:57
TheMuefwereade__, rogpeppe, mramm : hangout?14:02
Makyofwereade__, ack, looking.14:02
fwereade__TheMue, I don't think you can depend on getting exactly 2 events there; a correct implementation in combination with suitably pathological scheduling decisions could lead to the watcher read only completing once both the add and the remove are processed14:37
TheMuefwereade__: hmm, could you please rephrase14:38
fwereade__TheMue, there are really 2 events happening, it is true14:41
fwereade__TheMue, and almost always, because they are somewhat separated in time and the machine is probably not working too hard on these tests, the watcher's client will have the opportunity to read those 2 events independently14:42
fwereade__TheMue, hmm, a thought14:42
fwereade__TheMue, how many do you get if you Sync first, rather than StartSync?14:43
TheMuefwereade__: i'm listening ...14:43
TheMuefwereade__: will test, one sec14:43
TheMuefwereade__: yep, then it's only one14:46
fwereade__TheMue, ok, and that *could* happen with StartSync, it's just less likely14:46
TheMuefwereade__: ah, now I understand, thanks. now I only have to see how to improve the testing for it.14:48
fwereade__TheMue, put a couple of notes on https://codereview.appspot.com/10148045/14:52
TheMuefwereade__: thank you14:52
=== tasdomas is now known as tasdomas_afk
fwereade__gaah, errors.NotFoundf appends " not found" to its message15:27
fwereade__this is not consistent with actual usage in general15:28
fwereade__NotFoundNamef("unit %q", unit) -> `unit "foo/2" not found`15:30
fwereade__NotFoundf("ping pong %q blah", unit) -> `ping pong "foo/2" blah`15:30
fwereade__would both be used15:31
fwereade__rogpeppe, do those names seem ok to you?15:31
fwereade__rogpeppe, errors.NounPhraseNotFoundf15:32
rogpeppefwereade__: i'd just have the latter. the " not found" suffix was only ever a convenience and i think it's no longer so convenient.15:32
fwereade__rogpeppe, an awful lot of places include that explicitly15:32
fwereade__rogpeppe, and they're either not tested properly or the tests are dumb because they're not catching "foo not found not found"15:33
fwereade__rogpeppe, actually that all collapses to "not tested properly" doesn't it15:33
fwereade__TheMue, mgz_, jam, danilos: any opinions on the above?15:34
rogpeppefwereade__: i see only three places that use NotFoundf("xxx not found")15:34
rogpeppefwereade__: and they all look like copypasta of the same code15:34
rogpeppefwereade__: i suspect i was probably responsible originally :-)15:35
fwereade__rogpeppe, heh, I saw 3 in the first dozen I looked at15:35
fwereade__rogpeppe, clearly my data set was too small :)15:35
rogpeppefwereade__: http://paste.ubuntu.com/5755219/15:36
fwereade__rogpeppe, the other aspect is charm.NotFoundError15:36
fwereade__rogpeppe, they have custom messages that are quite nice15:36
fwereade__rogpeppe, and I'd quite like to keep them15:36
fwereade__rogpeppe, but the current NotFoundf seems like a good common case so it can should probably keep its name15:37
fwereade__rogpeppe, errors.NotFoundMessagef()?15:37
fwereade__rogpeppe, for the custom cases?15:37
rogpeppefwereade__: errors.NotFoundError{msg} ?15:38
fwereade__rogpeppe, the f is useful there too15:38
fwereade__rogpeppe, ah sorry mistook you15:38
rogpeppefwereade__: BTW there's an error field in NotFoundError which is never used15:38
fwereade__rogpeppe, ha15:39
fwereade__rogpeppe, best drop it then15:39
rogpeppefwereade__: same with unauthorized error15:39
rogpeppefwereade__: i think it's a hangover from its goose origins15:39
fwereade__rogpeppe, ok, I'll strip those too then, thanks15:39
rogpeppefwereade__: perhaps: have only one NotFoundf helper, same as current. but if you want to create a "not found" error with a custom message, do so.15:40
fwereade__rogpeppe, seems reasonable15:41
rogpeppefwereade__: some time i'll have some more time to work up my new errors package. it was going in quite a nice direction, i think.15:41
rogpeppefwereade__: i found that rather than error codes, a useful concept was a "diagnosis"15:42
fwereade__rogpeppe, sounds interesting15:42
fwereade__rogpeppe, there's definitely a lot of room for advancement in that whole field :)15:42
rogpeppefwereade__: so an error could change but its diagnosis might remain the same. and in particular, a diagnosis could be an error itself. so to find out if something's a not-found error, you might do errors.Diagnosis(err) == somepkg.ErrNotFound15:43
fwereade__rogpeppe, or indeed somepkg.ErrorHasSomeObscureProperty(errors.Diagnosis(err))16:00
fwereade__rogpeppe, ofc the really hard part will be resisting the temptation to s/err/murder/16:00
fwereade__rogpeppe, btw, another thing is really bugging me here16:01
fwereade__rogpeppe, NotFound vs Unauthorized16:01
fwereade__rogpeppe, can you think of any major consequences to s/Unauthorized/NotAuthorized/?16:02
fwereade__rogpeppe1, hey, UnauthorizedError *does* use the error field, but not in a very sane way16:08
rogpeppe1fwereade__: ah, i didn't notice16:09
fwereade__rogpeppe1, it's in state/open.go16:09
fwereade__rogpeppe1, ISTM that the first usage is clear gibberish16:09
fwereade__rogpeppe1, and the second one has no reason to keep the error lying around16:09
rogpeppe1fwereade__: yeah, they both look dodgy to me16:11
fwereade__rogpeppe1, ok, it's used so little I'm going to make it consistent, if you have no objection to "not authorized" supplanting "unauthorized"16:12
fwereade__rogpeppe1, the second one looks like it has a purpose tbh16:12
rogpeppe1fwereade__: yeah, i was just thinking that16:12
rogpeppe1fwereade__: but perhaps it should be: "cannot log in to juju database: not authorized: %v"16:13
fwereade__rogpeppe1, NotAuthorizedf("foo %q", "bar") -> `foo "bar" not authorized`16:13
fwereade__rogpeppe1, maybeUnauthorized(err error, action string)16:13
fwereade__rogpeppe1, NotAuthorizedf(action)16:13
rogpeppe1fwereade__: we should use either Unauthorized or NotAuthorized consistently at least16:13
fwereade__rogpeppe1, Errorf("%s failed: %v", action, err)16:14
fwereade__rogpeppe1, sure, that was just a thinko16:14
rogpeppe1fwereade__: i *think* i prefer Unauthorized, for the function names at least16:14
rogpeppe1fwereade__: in a sentence, i'm happy to use "not authorized" when it reads better16:14
fwereade__rogpeppe1, even considering that Unfound would be an abomination unto the lord?16:14
rogpeppe1fwereade__: sure16:15
rogpeppe1fwereade__: they don't have to be the same16:15
fwereade__rogpeppe1, no, but there's definitely some degree of value in consistency too16:15
rogpeppe1fwereade__: i'm not sure there's any particular virtue in that particular consistency. the moment i find myself typing "NotAuthorizedError" by accident, i'll concede though :-)16:16
fwereade__rogpeppe1, "<noun> not found", "<action> not authorized" both seem to read just fine to me16:16
fwereade__rogpeppe1, that's a matter of personal habit alone, surely16:17
fwereade__rogpeppe1, consistency is in itself a virtue16:17
rogpeppe1fwereade__: "not authorized" doesn't work so well as an adjective tho16:17
rogpeppe1fwereade__: although it's unavoidable with "not found"16:18
fwereade__rogpeppe1, it's just harder to appreciate the value of imposing consistency when it's code you already know16:18
rogpeppe1fwereade__: if you feel strongly about NotAuthorizedError, go for it16:18
fwereade__rogpeppe1, strongly enough, yeah -- thanks :)16:19
rogpeppe1fwereade__: though while you're about it, errors.NotAuthorized might be better when errors.NotAuthorizedError16:19
fwereade__rogpeppe1, then NotAuthorizedf and NotFoundf echo one another16:19
fwereade__rogpeppe1, foo not bar16:19
fwereade__rogpeppe1, oh and finally: errors.NotAuthorizedError vs errors.NotAuthorized; errors.IsNotAuthorizedError vs errors.IsNotAuthorized16:37
fwereade__rogpeppe1, any point keeping the stuttering?16:37
rogpeppe1fwereade__: i don't think so16:37
fwereade__rogpeppe1, cool16:38
rogpeppe1fwereade__: i thought about mentioning it but i didn't want to add yet more negativity...16:38
fwereade__rogpeppe1, funny how a liitle "this isn't quite consistent, let's just fix that one bit" can balloon16:38
rogpeppe1fwereade__: oh yes16:39
* TheMue is not happy about the cleaner test yet. it needs about 6 seconds.16:49
jtvAnyone up for a second review of my branch?  It's just some forgotten imports added to the azure skeleton, and some unqualified class names qualified with their package name: https://codereview.appspot.com/10184043/17:18
mgz_jtv, it would seem resaonable to carry over one of the earlier +1s and submit17:20
jtvCan I do that?17:20
mgz_or get fwereade__ to rubberstamp17:21
jtvJust the sort of thing I was hoping to accomplish here, really.  :)17:21
jtvOh never mind.  I'll just submit as-is then.17:23
jtvI wonder what this error output from lbox means...17:28
jtverror: use of closed network connection17:28
jtvRietveld: https://codereview.appspot.com/1018404317:28
jtvThe lbox command still returns success (i.e. zero), but I think it just always does that, regardless.17:28
rogpeppe1g'night all17:30
TheMuerogpeppe1: n817:30
TheMuefwereade__: still available?17:31
jtvnn robbiew17:32
jtvI mean, rogpeppe117:32
jtvDamn over-eager tab completion...17:32
jtvSorry!  :)17:32
mgz_jtv: not seen that error before myself17:33
jtvI've noticed that relatively often, given how rarely I've used lbox: weird errors, different every time, and if you keep retrying it succeeds eventually — but you can't ever really tell because it doesn't report errors properly.17:34
jtvFWIW it does look as if lbox failed there, it just doesn't seem to have checked for the error condition.  When I retried, it succeeded.17:45
jamjtv: Are you using precise? That looks like the error I used to get when compiling with go 1.0 (updating to go 1.0.3 from ppa:gophers/go17:58
jamfixed it)17:58
jtvjam: no, I'm on Raring.18:00
jtvGo version is go1.0.2.18:00
jtvDo I need to update to 1.0.3?18:00
jamjtv: I think danilos is using your same configuration successfully, but I'm not sure18:16
andreas__hi guys, has anyone seen this error before? It's from the bootstrap node: http://pastebin.ubuntu.com/5755877/19:02
andreas__on aws, using juju-core trunk19:02
andreas__juju bootstrap worked, one instance running, then I did a bunch of deploys19:03
andreas__juju status says they are all pending, but ec2-describe-instances still only sees the bootstrap instance, no word on the others19:03
andreas__I didn't bootstrap with --upload-tools, I wonder if that oculd be it19:03
fwereade__andreas__, I suspect you're using trunk but not running --upload-tools19:23
fwereade__andreas__, ha, yes19:23
andreas__ok, I destroyed the env and bootstrapped again with --upload-tools, it's working now19:24
=== makyo_ is now known as Makyo
thumperfwereade__: I have some questions around the provisioner change21:46
thumperfwereade__: what *should* we do on bad config?21:47
* fwereade__ has a brief flashback21:48
fwereade__thumper, I think the plan was to keep the original environment around and to continue to use it21:49
thumperthe tests asserted that the old environment bits were saved21:49
thumperfwereade__: and regarding failure...21:49
thumperfwereade__: when there was invalid config, the "get state addresses" failed21:50
fwereade__thumper, ok; so, failure to provision should be communicated back via SetStatus (for now) and SetInstanceError(soon)21:50
thumperhence the magic bits21:50
fwereade__thumper, huh, why is the bad environ causing that? I thought we got the addresses from state now21:50
thumpernot sure why21:51
thumperbut it did21:51
* fwereade__ has a suspicious21:51
thumperI didn't really think too hard21:51
thumperprobably should have21:51
fwereade__might be worth another look, yeah21:51
thumperbut assumed it was expected21:51
fwereade__I think we still have issues around that though21:51
fwereade__provisioning failure is fine as above21:52
* thumper nods21:52
thumperI'm going to focus on lxc for a bit, perhaps back to the provisioner work when I need a break21:52
fwereade__unprovisioning failure should be logged and ignored, we'll try again next time we hit processMachines21:53
fwereade__instance-listing failure though is most unhelpful and the best course of action is most unclear21:53
thumperfwereade__: so if I set an error on the machine saying "couldn't provision", does it come back in the next watcher list?21:54
thumperfwereade__: also, another Q21:54
fwereade__at the moment it's handled in the provisioner by checking status itself21:54
fwereade__the status path is overloaded21:54
thumperfwereade__: if I was to write a small app to test my lxc stuff on machine 0 of my bootstrapped ec221:54
thumperfwereade__: what is the quickest way to get state bits?21:55
fwereade__thumper, to get access to a state.State in code?21:55
fwereade__thumper, for now, snarf machine 0's state credentials by making an environs/agent.Conf with sane dataDir and tag and reading from there21:56
fwereade__thumper, then state.Open() and you're away21:57
thumperthere is obviously already an agent.conf file21:57
thumperin /var/lib/juju/agents21:57
thumperbut thanks, will poke a little21:57
fwereade__thumper, the Conf type is a bit odd imo21:58
thumperwallyworld__: ping22:19
wallyworld__thumper: hi22:20
thumperwallyworld__: how close are you to landing the "make a container in state" work?22:20
thumperI'd love to be able to poke it22:20
wallyworld__already done22:20
wallyworld__just doing a trivial followup for the Tag() change22:21
thumperwallyworld__: awesome22:22
thumperwallyworld__: I'm writing some code to create a test app to create a container based on that work22:22
wallyworld__thumper: i hate mongo22:22
* thumper isn't a fan either22:22
wallyworld__why the f*ck we have to work around it's tranaction limitations is beyind me22:22
thumperthe thing is, we are storing structured data22:23
thumperhighly relational structured data22:23
thumperwhy we are shoving that into mongo and trying to do transactions on it is beyond me22:23
* wallyworld__ sighs22:23
wallyworld__stupid design decision22:23
wallyworld__oh look, mongo is new and shiny, let's use that22:24
thumperit is good for rapidly evolving structures22:24
* thumper shrugs and goes back to wokr22:24
wallyworld__that can be done with rwlational dbs too22:24
wallyworld__i know, i've done it22:24
thumperwallyworld__: does state.Machine have a getParent?22:25
thumperor parent machine id getter?22:26
wallyworld__thumper: not yet. it has a Containers(). will add Parent() now22:26
wallyworld__there is a Id()22:26
thumperwallyworld__: cool, because I need it22:26
thumperI'm ok with parent returning the machineId22:26
wallyworld__thumper: while you are waiting https://codereview.appspot.com/10019049 - very trivial22:26
* thumper looks22:27
thumpertrivial, one ack is good enough22:28
thumperwallyworld__: so the other bit has landed?22:29
thumperwallyworld__: and I can use it now?22:29
wallyworld__i did it 90 mins ago22:29
wallyworld__Parent() won't take long22:29
wallyworld__thumper: https://codereview.appspot.com/1020304322:42
wallyworldthumper: fwereade__: oh joy. our "unit" tests connect to the real charm store :-(22:55
wallyworldnot hahaha. very sad :-(22:56
wallyworldi noticed because my connection dropped out when runnign the tests22:56
wallyworldthe tests seem to be taking a looooong time of late22:56
fwereade__wallyworld, yeah, I just noticed some of those myself22:59
* wallyworld sighs again22:59
fwereade__wallyworld, the config-7 branch does at least add a MockCharmStore that should be useful in such situations22:59
wallyworldthumper: there are ~50 calls to Machine.st.Machine() , so any move to use the API will need to address those. adding a new call site shouldn't matter for the Parent() call23:01
thumperwallyworld: fair enough23:02
wallyworldthumper: i don't follow the other comment though23:02
thumperthat is the only comment23:02
wallyworldbtw, there is a parentId(), but it is unexported23:02
wallyworldi can export it i guess23:02
wallyworldUnfortunately this is making an assumption that doesn't always hold.23:02
wallyworldIf I am the provisioner, and I have a state.Machine instance, I won't23:02
wallyworldnecessarily have access to state.23:02
thumperright, from the api, it won't23:03
thumperwhat happens now if someone gets a machine from the api?23:03
wallyworldNFI. I think the machine client from the api is different to state/machine - the client just delegates stuff through to the backend23:04
wallyworldso maybe I need to add Parent() to the api client as well23:04
wallyworldi've not used the api stuff at all yet23:05
thumperme neither23:05
wallyworldthumper: do you need Parent() exposed via the api yet?23:05
thumperfwereade__: Q regarding agent passwords23:05
wallyworldthumper: i can add it, but can we wait till it's needed?23:06
thumperfwereade__: agent.Conf.OpenState returns a new password23:06
* fwereade__ sighs23:06
thumperfwereade__: if I'm just writing a noddy app to poke stuff, do I need to care?23:06
wallyworldthumper:  i'd rather not bloat the current Machine client with methods we don't need23:06
thumperwallyworld: ack23:06
wallyworldthumper: so if you agree, maybe you want to +1 ?23:06
thumperwallyworld: ok23:07
wallyworldthumper: so now you have all the goodies you want to experient i think23:07
fwereade__thumper, bleh, it's all done pretty early on23:07
thumperfwereade__: yes, the OpenState connects with the old password, generates a new random one, and passes that back23:07
fwereade__thumper, maybe best to wait until the machine agent has set itself to started though23:08
thumperfwereade__: I'm assuming I can happily ignore the new password?23:08
thumperfwereade__: this is my test app23:08
thumpernot anything that is likely to survive23:08
fwereade__thumper, yeah, if it gives you one you should be safe to ignore it23:08
thumperfwereade__: effectively I'm writing a small app to call into my container work to see the impact on the bootstrap node23:08
wallyworldthumper: the Parent() stuff is trivial also - want me to land so you can use it?23:08
fwereade__thumper, and if you start the app again later it'll pick up the fresh value written by the other one23:09
thumperwallyworld: funnily, I don't need it quite yet, but I will do for the provisioner work23:09
thumperwallyworld: but I'm still at the container bits23:09
thumperfwereade__: can you look at wallyworld's machine parent branch?23:10
wallyworldit's way past his bedtime23:10
thumperec2 still hasn't bootstrapped my node23:10
fwereade__I'll see if I remember in 5 mins23:10
wallyworldthumper: i think i'll do some work to make juju status output container info23:10
thumperwallyworld: sounds good23:11
fwereade__thumper, upload-tools?23:11
thumperfwereade__: no i forgot...23:11
* wallyworld thinks upload-tools should always happen for dev versions of juju23:12
fwereade__thumper, that said... we have actually broken compatibility, haven't we23:12
thumperhave we?23:12
fwereade__thumper, we can no longer bootstrap 1.1023:13
fwereade__(except with 1.10 client, that is)23:13
thumperfwereade__: what have we done to cause that?23:13
fwereade__thumper, added a field to the environment config23:14
thumperwhich field?23:14
fwereade__thumper, state-port and api-port I think23:15
fwereade__thumper, I'm hearing that siren song of "go on, hardcode it" and I want to slap myself23:15
wallyworldwouldn't there have been defaults used, so if the configs were missing, stuff would work?23:16
thumperfwereade__: will panic cause defers to run?23:16
fwereade__thumper, but if the values are *present* in older code23:17
fwereade__thumper, yes23:17
fwereade__wallyworld, but if the values are present in older code, eg the machine agent running 1.10, it will barf23:17
wallyworldah, bollocks, right23:17
fwereade__wallyworld, for that matter, an environments.yaml valid for 1.11 is not necessarily so for 1.1023:20
wallyworldcause we barf on unknown config items23:20
wallyworldmaybe we sould be more tolerant of such data23:21
fwereade__wallyworld, yeah, we should just drop that madness23:21
fwereade__wallyworld, log unknown settings and move on23:21
wallyworldtoleranrt reads, strict writes23:21
thumpermake it so23:21
* wallyworld wonders why we didn't do that23:21
fwereade__thumper, doesn't fix today's problem though, that 1.10 is already out doing its badness in the wild23:22
thumperwallyworld: TODO: add more help for "add-machine"23:22
* thumper nods23:22
wallyworldthumper: i didn't see an obvious example to cargo cult of how to add extensive help23:22
thumperwallyworld: how do I add a new container to machine 0?23:23
thumperwallyworld: in the description23:23
thumperjust some examples would be good23:23
wallyworldjuju add-machine 0/lxc23:23
wallyworldwill do it as a driveby23:23
wallyworldthumper: let me know if above ^^^^ doesn't work for you23:24
thumperabout to try23:24
* wallyworld runs away23:24
thumperwallyworld: how will I know if it succeeds?23:25
wallyworldthumper: juju status in a day's time :-P23:26
wallyworldactually, if it exists without error23:26
wallyworldit will have updated the state23:26
wallyworldbut nothing acts on it yet23:26
wallyworldactually, juju status should show it23:27
wallyworldsince containers are machines23:27
wallyworldbut the nesting etc will not be there yet23:27
wallyworldmake sense?23:27
wallyworldthumper: how'd you go?23:31
thumperwallyworld: sorry, doggy call of nature23:37
thumper$ juju add-machine 0/lxc23:37
thumpererror: cannot add a new container: transaction aborted23:37
wallyworldi guessed :-)23:37
thumperrunning with debug23:37
wallyworldmachine 0 exists?23:37
thumpernah, that's all I get23:37
thumper0 is the bootstrap node23:37
wallyworldsure. you've bootstrapped i guess23:38
thumperyep, 0 exists23:38
thumperwallyworld: have you actually tried this?23:38
wallyworldtests yes23:38
wallyworldlet me check the tests23:38
wallyworldthumper: see TestAddContainerToExistingMachine in addmachine_test.go - that's what you're trying23:40
wallyworldthe test adds to machine 1 though23:40
wallyworldmaybe the bootstrap node state document is missong something due to how it was created23:41
wallyworldthat test would still pass even with machine 0 since AddMachine() does the right thing23:42
thumperwallyworld: but machine 0 hasn't been bootstrapped in the tests23:42
* thumper tries with just /lxc23:42
wallyworldthumper: it wouldn;t be that - what i mean is that the container ref record may not have been created23:42
fwereade__wallyworld, https://codereview.appspot.com/10203043/ reviewed23:43
wallyworldthumper: you could also try add-machine and then add-machine <id>/lxc23:43
wallyworldfwereade__: thanks23:43
thumperaddmachine.go:92 created "lxc" container on machine 1/lxc/023:44
thumperwallyworld: that is from 'add-machine /lxc'23:44
wallyworldthat's as expected23:44
wallyworldfwereade__: what if nil is a legitimate result though?23:45
thumper$ juju add-machine 1/lxc --debug23:45
thumper1/lxc/1 there too now23:45
thumperwallyworld: so it looks like a bootstrap issue23:45
thumperwallyworld: care to fix?23:45
* thumper works with machine 123:45
wallyworldthumper: cool, so perhaps the bootstrap machine state entry is created via a different api23:45
fwereade__wallyworld, by convention you would handle the specific error that encodes the information that would otherwise be encoded in the nil return23:46
wallyworldan api that doesn;t update the container ref record properly23:46
thumperfwereade__: I see that 'juju scp ' needs more descriptive help too23:46
thumperfwereade__: how do I copy something from local machine to machine 1?23:46
wallyworldfwereade__: but it's not an error condition - it just means the machine's parent is legitimatey nil23:46
thumperwallyworld: probably23:46
wallyworldnil can be a valid value for things23:46
fwereade__wallyworld, oh, hell, I thought InjectMachine used all the same code paths23:46
fwereade__wallyworld, think of it on a pure code level23:46
fwereade__wallyworld, it's a useful convention because, if it's followed, you don't need to have context on Machine to know that code using Machine.Parent will be valid23:47
fwereade__wallyworld, and I think all of us to a greater or lesser extent have that pattern somewhat embedded23:48
wallyworldfwereade__: so you would prefer Machine.Parent() to return an err if there is not parent?23:48
fwereade__wallyworld, I'd be less bothered if it wasn't exported23:48
fwereade__wallyworld, yeah, for convention's sake if nothing else23:49
thumperwallyworld: I'd be happy just to have ParentId exported23:49
thumperwallyworld: with "" meaning no parent23:49
fwereade__wallyworld, that said ParentId() (string, bool) seems perfect to me23:49
wallyworldfwereade__: i'll change it, but i think special casing nil ike this is wrong23:49
thumperwallyworld, fwereade__: why bool?23:49
thumperif empty, then obviously not there23:49
fwereade__thumper, same logic as the err case really -- having a guarantee of validity on a separate channel is a good convention23:50
thumperhmm... whatever23:50
thumpernot sure I agree23:50
thumperbut I'll go with it23:50
thumperif it is current convention23:50
fwereade__thumper, wallyworld: it's debatable, but conventional23:50
thumperfwereade__: so, back to 'juju scp'23:51
thumperfwereade__: from local to machine 123:51
thumperno examples in the built in help23:51
* wallyworld changes it to ParentId and goes to the corner to sulk23:51
thumperhmm... suppose I could just read the source23:51
fwereade__thumper, er, try `juju scp /path/to/file 0:/target/path` or something?23:51
thumpertrying $ juju scp ~/go/bin/test-lxc 1:~23:52
thumperwell, it is doing something23:52
fwereade__jolly good :)23:53
thumperfwereade__: unfortunately I can't create a container on the bootstrap node right now23:53
thumperfwereade__: wallyworld will work out why :)23:53
wallyworldthumper: yes i will. might include a fix as a driveby in the parent id branch23:54
thumperwallyworld: sure, if it is small, if bigger, perhaps a separate branch would be better23:54
fwereade__thumper, haha23:54
wallyworldthumper: yep23:55
* thumper sighs23:56
thumperwrong arg23:56
thumpernow wait a minute while I upload my new test app23:56
thumperseems my upload starts fast and gets slower23:57
thumperNFI way23:57
thumperhmm... it is doing something23:59
thumperprobably downloading the ubuntu-cloud template23:59

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