/srv/irclogs.ubuntu.com/2012/11/23/#juju-dev.txt

rogpeppefwereade_: morning!07:38
TheMueMorning08:52
rogpeppeTheMue: hiyta08:58
rogpeppehiya08:58
TheMuerogpeppe: I'm now returning a more detailed error containing the stderr output.08:59
rogpeppeTheMue: cool08:59
TheMuerogpeppe: Could you take a look again?09:00
rogpeppeTheMue: yeah, in a little bit09:00
TheMuerogpeppe: Thx.09:00
=== TheMue_ is now known as TheMue
* rogpeppe loves it when he starts implementing something, then realises it's unexpectedly done already, as a natural consequence of earlier changes.10:33
rogpeppedavecheney, dimitern: hiya10:33
davecheneyrehowdy10:35
dimiternrogpeppe: hey10:38
TheMuedavecheney, dimitern: Morning.10:39
TheMuerogpeppe: Any chance to take a look?10:41
rogpeppeTheMue: sorry, i'm on a roll this morning - i don't want to derail for the moment, sorry10:41
TheMuerogpeppe: OK10:42
rogpeppeTheMue: i'll take a look after i've dealt with this branch10:42
TheMuerogpeppe: Would be great, thank you.10:42
dimiternTheMue: morning10:52
rogpeppeTheMue: you've got a review10:58
TheMuerogpeppe: Thx10:58
dimiternwallyworld: mgz and me are on mumble11:01
TheMuerogpeppe: Read it and the first two points are relative simple, ok. But the multi-line stderr is indeed a problem. I don't know if it should be part of the one-liner error string. For those who wnat to use it it's in the error as a field.11:02
rogpeppeTheMue: i know. there's no easy answer i'm afraid, but i'm not sure it's right as is.11:02
rogpeppeTheMue: (and i've seen lxc print multi-line error messages, so i know it definitely is an issue)11:03
TheMuerogpeppe: My problem also is, that the scope of that CL moved. The intention has been to add "first tests" to extend it later. ;)11:04
rogpeppeTheMue: i think the error handling is rightly part of the first tests11:04
rogpeppefwereade_: ping12:03
TheMuerogpeppe: Aaargh, found an interesting behavior. The error message of lxc is written to stdout, not stderr. Will change the code according, os/exec supports it.12:06
rogpeppeTheMue: ha.12:06
rogpeppeTheMue:  it depends on the command maybe12:07
rogpeppeTheMue: the command i tried printed it to stderr12:07
rogpeppeTheMue: which command did you try?12:07
TheMuerogpeppe: Yes, maybe. Strange. But I should get it with the combined output.12:08
TheMuerogpeppe: I took lxc-create12:08
rogpeppeTheMue: the problem is that some commands might print an error *and* some expected standard output12:09
rogpeppeTheMue: lxc-start prints to stderr...12:09
rogpeppeTheMue: yuck12:09
rogpeppeTheMue: and lxc-create doesn't prefix its error lines either12:10
TheMuerogpeppe: I'll find my way. So far I already test most stuff before I even start a command and I'll add a root check too. ;)12:10
TheMuerogpeppe: Yes, that's what Aram said, it's inconsistent.12:10
rogpeppeTheMue: yeah, it's badly done12:10
rogpeppeTheMue: perhaps we should file a bug report12:11
TheMuerogpeppe: I'll make a note, yes.12:11
rogpeppeTheMue: i think there might be a pattern. i suspect that the lxc commands that are shell scripts print errors to stdout; the ones that aren't print errors to stderr12:12
rogpeppeTheMue: and their errors are totally inconsistent too. check out this one:12:13
rogpeppeecho "E: lxc-info - no such file" >&212:13
TheMuerogpeppe: I just take all output for debugging, additionally to the returned ExecError of exec.Command12:15
rogpeppeTheMue: yeah, i don't think there's much else you can do actually12:15
rogpeppeTheMue: even some of the commands that are expected to produce stuff to stdout still print their errors to stdout.12:16
rogpeppeTheMue: what a friggin' mess. i don't think people know how to use shell scripts any more.12:16
TheMuerogpeppe: Hehe, yep.12:17
rogpeppeTheMue: https://sourceforge.net/tracker/?func=detail&aid=3589389&group_id=163076&atid=82630312:33
TheMuerogpeppe: Great12:33
TheMuerogpeppe: Thx, I would have done it later. ;)12:34
rogpeppeTheMue: it annoyed me enough that i wanted to do it there and then :-)12:34
TheMuerogpeppe: You're using it @home?12:34
rogpeppeTheMue: no, just the principle of it :-)12:35
TheMuerogpeppe: Hehe :D12:35
TheMuelunchtime, brb12:51
rogpeppeniemeyer: yo!13:01
rogpeppeniemeyer: i'm just passing the ca-cert to jujud, and i'm not quite sure of the best way to do it. i could use a flag or a file.13:02
niemeyerrogpeppe: Heya13:02
rogpeppeniemeyer: i've just done it as a flag, but i'm not sure that's right.13:02
niemeyerrogpeppe: I'm not quite sure either.. it should be a file13:02
niemeyerrogpeppe: But we could pass as a flag, or hardcode the path13:03
rogpeppeniemeyer: currently my best thought is to hard-code the path (inside datadir)13:03
rogpeppeniemeyer: the flag is awkward because i'm not sure how the upstart config copes with multi-line strings13:04
rogpeppeniemeyer: ah, you mean pass the filename as a flag13:05
rogpeppeniemeyer: that could be better actually (and marginally easier to test, possibly)13:05
rogpeppeniemeyer: i think i'll go with that for the time being.13:06
niemeyerrogpeppe: Sounds good13:07
rogpeppeniemeyer: this branch might finally be ok now, i'm hoping: https://codereview.appspot.com/6850087/13:12
rogpeppeniemeyer: and i'm hoping this one too: https://codereview.appspot.com/6855054/13:13
niemeyerrogpeppe: Cool, I'll be there son13:15
niemeyersoon13:15
rogpeppeniemeyer: "son" works too, in a slightly patronising kinda way :-)13:16
TheMuerogpeppe: So, changes are in.13:47
rogpeppeTheMue: ok13:47
rogpeppeTheMue: reviewed14:03
TheMuerogpeppe: Great, thank you.14:03
niemeyerrogpeppe: Closer, review sent14:16
rogpeppeniemeyer: quick crack test: is what i'm doing in TestPackage here ok, or crackful? the alternative is to add something in every SetUpSuite. https://codereview.appspot.com/6842088/diff/1/cmd/jujud/main_test.go14:16
rogpeppeniemeyer: thanks14:16
rogpeppe"What if the path is != "" and m[attr] is nil, shouldn't it stay nil?"14:18
rogpeppeniemeyer: i don't *think* so14:18
rogpeppeniemeyer: i deliberately chose that behaviour14:18
rogpeppeniemeyer: to follow the documentation14:18
rogpeppeniemeyer: in particular "The ...-path key is translated into "..." by loading the content from the respective file"14:20
rogpeppeniemeyer: i thought that meant that it's best to honour the path value if it's set14:21
rogpeppeniemeyer: note that providing a nil value still prevents it from "reading the standard paths"14:22
niemeyerrogpeppe: I'm not sure I see what you're trying to achieve14:31
niemeyerrogpeppe: I thought you had suggested yesterday that it shouldn't change if it's nil?14:32
rogpeppeniemeyer: i'm trying to come up with something that's not too surprising to someone that reads the docs on New()14:32
rogpeppeniemeyer: path always overrides value14:32
rogpeppeniemeyer: (currently)14:32
rogpeppeniemeyer: if you've explicitly specified a path, i think it would be surprising if it was ignored14:32
niemeyerrogpeppe: Okay14:33
niemeyerI'll get a quick lunch14:41
mgzdimitern: can I bother you for a review of the swift fixup stuff?14:43
* rogpeppe should probably get lunch too14:43
rogpeppeniemeyer: PTAL  https://codereview.appspot.com/685008714:44
rogpeppedimitern: i'm seeing an openstack test failure in trunk14:56
rogpeppedimitern: http://paste.ubuntu.com/1379598/14:56
* dimitern looks14:56
dimiternrogpeppe: hmm.. strange, why didn't it fail before when I run the test..14:57
rogpeppedimitern: i know not14:57
dimiternrogpeppe: it's a trivial fix, I'm on it14:58
rogpeppedimitern: it might be possible that you're relying on map-traversal order14:58
rogpeppedimitern: (which is random)14:58
dimiternrogpeppe: maybe, anyway it was the last change14:59
mgzreminds me, I should actually get the juju-core suite passing here14:59
mgzit was unhappy last time I ran it14:59
rogpeppemgz: when you have a test failure, pastebin it, and i'll let you know if it's a common one or not15:02
rogpeppemgz: there are still a few sporadic test failures15:02
rogpeppemgz: mostly to do with unreliability of external components, i think15:02
dimiternrogpeppe: strange, I cannot see the openstack provider code at all in trunk15:03
rogpeppedimitern: that's odd15:03
dimiternrogpeppe: it should be there, right? it was yesterday15:04
rogpeppedimitern: i see it15:04
rogpeppedimitern: what do the last few entries of the revision log look like?15:04
mgzrogpeppe: well, problem #0 is what command to use to run the tests, and problem #1 is what I think I should use runs some, but then has:15:05
mgzgo build launchpad.net/juju-core/cmd/juju: signal 915:05
mgzFAIL    launchpad.net/juju-core/cmd/juju [build failed]15:05
mgzwhich seems non-passy15:05
dimiternrogpeppe: well, mostly yours - up to rev 73415:05
rogpeppemgz: to run all the tests, go to the juju-core root dir, and type "go test ./..."15:05
mgzokay, so that is the convention. any ideas on the build fail?15:06
dimiternrogpeppe: and doing either bzr up or bzr pull does not get me anything new15:06
rogpeppedimitern: trunk is up to revision 73715:07
rogpeppedimitern: what does bzr info print?15:07
mgzdimitern: are you in the right branch, and what's the parent?... what rogpeppe said15:07
* rogpeppe really goes for some lunch now15:08
dimiternmgz: I'm at the master branch (as cobzr names trunk)15:08
dimiterndimitern@kubrik:~/work/juju-core$ bzr up15:09
dimiternTree is up to date at revision 734 of branch /home/dimitern/work/go/src/launchpad.net/juju-core/.bzr/cobzr/master15:09
dimiterndimitern@kubrik:~/work/juju-core$ bzr pull15:09
dimiternUsing saved parent location: /home/dimitern/work/go/src/launchpad.net/juju-core/15:09
dimiternNo revisions or tags to pull.15:09
mgzokay, so that's the problem15:09
dimiternmgz: what?15:09
mgzthe parent branch is a local mirror, not lp:juju15:10
mgz*lp:juju-core15:10
dimiternmgz: I see, so how to change that?15:10
mgzuse `bzr pull --remember lp:juju-core`15:10
dimiternmgz: nice, 10x15:10
dimiternmgz, rogpeppe: PTAL https://codereview.appspot.com/684310915:19
mgzdimitern: I still get failures on those tests, but from a different issue15:25
dimiternmgz: can I see the paste?15:26
dimiternI don't get any errors, and I run the tests like 30 times in a row15:26
mgzit's likely because this box is set up differently to yours, and the tests are not well isolated from home15:26
mgzso, specifically there are no keys in ~/.ssh15:27
dimiternmgz: so it's just happening on yours15:27
mgzand your test stuff doesn't pass authorized-keys or similar15:27
dimiternno, it's not at all to do with ssh15:28
mgzthe failures I'm seeing :)15:28
dimiternmgz: got you :) so not in the OS provider tests15:28
mgzyes, those tests, but different failures from the one you're fixing15:29
niemeyerrogpeppe: LGTM15:29
rogpeppeniemeyer: YAY!15:30
dimiternmgz: can I still see the paste?15:30
mgzwhen pastebin starts responding...15:31
mgzhttp://pastebin.ubuntu.com/1379685/15:31
dimitern:)15:31
dimiternmgz: I see, but that's from environs/config or something beneath15:32
hazmatrogpeppe, re the cert work, how does the client know the endpoint / cert fingerprint is valid for the endpoint?15:33
rogpeppehazmat: the client has a CA public cert15:33
mgzfull run with some failures from outside the openstack dir:15:33
mgzhttp://pastebin.ubuntu.com/1379695/15:33
rogpeppehazmat: i'm not sure how that works from a web-browser perspective15:33
mgzguess I'll fix up some of these15:34
dimiternmgz: so put an ssh pubkey then :)15:34
hazmatrogpeppe, k, but where is the private cert for the CA?15:34
mgzdimitern: if the test is loading stuff from your homedir to work, it's not a very good test15:34
mgztests should pass on a clean box, not just are carefully set up development environment15:35
dimiternmgz: i agree, sure, so which test is actually the root cause?15:36
rogpeppemgz: until recently there have been a few tests like that. i've fixed them, hopefully in some of my latest branches15:36
mgzrogpeppe: any that still need reviewing/landing?15:36
mgzif so, point me at 'em15:36
rogpeppemgz: yeah, quite a few15:36
dimiternrogpeppe: take a look please: https://codereview.appspot.com/6843109 - since it's trivial one LGTM should suffice, right?15:36
rogpeppemgz: look at the juju-core active reviews15:36
mgzdimitern: it's a general bad assumption15:37
mgzrogpeppe: will do15:37
rogpeppedimitern: will do, in a little while15:37
dimiternrogpeppe: thanks15:37
hazmatrogpeppe, for the web we'll need to have a webserver with the same cert serve up the html so the browser user can ack it, the websocket is considered a subresource, and won't get loaded if the cert isn't already known to the browser.15:44
mgzrogpeppe: are there any fixes for these tests that aren't nacked by niemeyer?15:46
niemeyerbrb15:47
mgzfor what it's worth, bzr has a few different test classes, any test that's going to touch disk is given an isolated home directory to work in15:49
mgzand lp:~rogpeppe/juju-core/141-test-HOME-independence fixes failures.15:53
rogpeppemgz: we've moved away from that branch. i've been fixing on a see-it-and-fix-it basis.15:59
rogpeppemgz: tbh i'm juggling too many subtly interrelated branches at the moment - i can't remember what goes where!16:00
rogpeppeit'd be good to have a go-ahead for this trivial: https://codereview.appspot.com/6847091/16:01
rogpeppemgz: ^16:01
rogpeppemgz: and this followup: https://codereview.appspot.com/678210316:02
rogpeppedimitern: LGTRM16:05
rogpeppeLGTM16:05
rogpeppedimitern: one LGTM is fine for that16:05
dimiternrogpeppe: cool, 10x16:06
rogpeppedimitern: if you submit now, i've got two branches that i need to submit in quick succession16:06
rogpeppepwd16:07
dimiternrogpeppe: just submitted16:07
rogpeppedimitern: thanks16:08
rogpeppeTheMue, fwereade_, dimitern: please don't submit anything for a minute or so16:08
TheMue rogpeppe Ey, ey16:09
dimiternhow does submitting interfere, i'm curious when you're done16:09
* TheMue leaves now, has a whisky tasting in 50 minutes16:09
rogpeppeTheMue: enjoy!16:11
TheMueI wish you all a wonderful weekend and thanks for the helpful feedback.16:11
TheMuerogpeppe: I'll do. Slàinte!16:11
rogpeppeTheMue: np. thanks for going along!16:11
rogpeppedimitern: done now.16:11
rogpeppedimitern: submitting pulls down a copy of the branch you're submitting against, merges against that, then pushes16:12
rogpeppedimitern: so if someone submits in the meantime, you may get a "branches diverged" error16:12
dimiternrogpeppe: I see, good to know16:13
rogpeppedimitern: and in this case, one of the branches was breaking trunk, so i didn't want to get into that state16:13
rogpeppemgz: i'm just putting together a branch that fixes the various HOME-dependencies16:18
mgzrogpeppe: ace, will look at those other movey branches too16:19
rogpeppeniemeyer: oh dear, it look like Settings.Write doesn't work properly in the face of nil keys. i only discovered when running the tests having done "chmod 0 ~/.ssh ~/.juju"16:42
niemeyerrogpeppe: Hmm16:43
rogpeppeniemeyer: am currently working on a fix16:43
niemeyerrogpeppe: What's the deal there?16:43
rogpeppeniemeyer: the nil keys are disappearing16:43
rogpeppeniemeyer: sorry, the nil values16:43
rogpeppeniemeyer: it looks ok at a glance, but that's not what i'm seeing16:45
niemeyerrogpeppe: Hmm16:47
rogpeppeniemeyer: yeah, this test fails: http://paste.ubuntu.com/1379890/16:48
niemeyerrogpeppe: I think that's what we represent as lack of value16:50
rogpeppeniemeyer: maybe i should back out my submits16:50
rogpeppeniemeyer: again :-(16:51
niemeyerrogpeppe: What about using your prior idea of changing the behavior of ""16:52
rogpeppeaargh16:52
niemeyerrogpeppe: Would that work?16:52
niemeyerrogpeppe: argh²16:52
rogpeppeniemeyer: i believe it would :-)16:52
niemeyerrogpeppe: I still don't think it's great, but we can't spend weeks on how to load a value from disk16:53
rogpeppeniemeyer: i know16:53
rogpeppeniemeyer: we could change the behaviour of "" throughout - it's really just an implementation convenience16:53
niemeyerrogpeppe: No, let's please not cascade this further16:54
niemeyerrogpeppe: Otherwise Monday we'll be talking about this again16:54
rogpeppeniemeyer: yup16:54
rogpeppeniemeyer: i thought i might get tls actually working today too16:54
rogpeppeniemeyer: (i've got a branch that almost does)16:54
niemeyerrogpeppe: Let's keep the current branch mostly unchanged, and try to just adapt the logic so it works with ""16:54
rogpeppeniemeyer: ok16:55
rogpeppeniemeyer: could you draft the doc comment for New while i fix the code?16:55
niemeyerrogpeppe: I'm on it16:57
rogpeppeniemeyer: thanks16:58
mgzhm, is lgtm actually used as a magic string for anything?17:26
rogpeppemgz: i don't believe we do that (the go core does, i think)17:26
rogpeppepwd17:26
mgz~17:26
mgzrogpeppe: reviewed those movey branches17:38
rogpeppemgz: thank you17:38
mgzthe second one I trust you on the design of, I'd probably have made a cert object that had create and parse constructors and accessors for cert/private key, and made the code create one how they wanted before passing to bootstrap17:40
niemeyerrogpeppe: I think the easiest for the moment is to just remove the second to last paragraph17:40
niemeyerrogpeppe: It turns out that everything else is still true17:41
rogpeppeniemeyer: ok. will have a look when i've got these pesky tests passing again17:41
niemeyerrogpeppe: We could try to explain, but it feels like it'll make it harder to read and understand than otherwise17:41
rogpeppeniemeyer: that sounds reasonable17:42
niemeyerfwereade_: I know you're on holiday, but you demonstrated interest in talking yesterday. In case you need me, I'm around, but no rush.. we can talk on Monday too18:05
rogpeppeniemeyer: https://codereview.appspot.com/685408818:09
niemeyerrogpeppe: Looking18:09
niemeyerrogpeppe: Uh, what happened to the rest?18:09
rogpeppeniemeyer: the rest?18:10
niemeyerrogpeppe: I mean, the branch that was already in review?18:10
rogpeppeniemeyer: it got submitted18:10
rogpeppeniemeyer: before i realised the problem18:10
niemeyerrogpeppe: Oh?18:10
niemeyerrogpeppe: Ouch18:10
niemeyerrogpeppe: Okay, hopefully that'll fix it.. looking18:10
rogpeppeniemeyer: i was trying to fix another problem when i found out18:10
rogpeppemgz: the above branch should fix your $HOME-dependency problems too18:11
rogpeppemgz: i've run all tests successfully with: mkdir /tmp/x; chmod 0 /tmp/x; HOME=/tmp/x go test ./...18:11
rogpeppemgz: apart from the state tests, which need a writable .ssh, because ssh *always* writes to your home directory, regardless of the setting of $HOME18:12
niemeyerrogpeppe: That change in file bootstrap.go feels bogus18:13
niemeyerrogpeppe: I've been looking at the change that puts it back where it should be on every other branch18:13
rogpeppeniemeyer: i think it might be because i'm using a different version of gofmt18:13
rogpeppeniemeyer: i.e. the one in tip18:14
mgzrogpeppe: looking18:14
niemeyerrogpeppe: Maybe, but we need to stabilize the situation18:14
niemeyerrogpeppe: I've seen *several* branches fixing this18:14
niemeyerrogpeppe: We shouldn't change it back18:14
niemeyerrogpeppe: Or we'll continue to see it18:14
rogpeppeniemeyer: yeah. i'll put 1.0.3's version in my bin18:14
rogpeppepwd18:14
niemeyerrogpeppe: In state_test.go, it's curious that a few lines were not there before18:15
niemeyerrogpeppe: THey weren't nil, and now they're being set to ""18:15
niemeyerrogpeppe: That means the behavior of the test is actually changing rather than just being moved on the nil/"" situation18:15
niemeyerrogpeppe: Was the test borked?18:15
rogpeppeniemeyer: the test was relying on the fact that ca-private-key did not exist in $home/.juju, yeah18:16
rogpeppeniemeyer: i smoked out these things by running the tests with an inaccessible home18:17
niemeyerrogpeppe: Cool18:24
niemeyerrogpeppe: So LGTM18:25
rogpeppeniemeyer: thanks18:25
niemeyerrogpeppe: The gofmt issue is the only detail worth changing before submit18:25
rogpeppeniemeyer: i've done it18:25
niemeyerrogpeppe: I wonder if that's an accident18:25
niemeyerrogpeppe: I mean, the gofmt behavior change18:26
rogpeppeniemeyer: it doesn't look right18:26
rogpeppeniemeyer: i agree18:26
niemeyerrogpeppe: We should report it.. hopefully it can be fixed before the next major18:27
rogpeppeniemeyer: submitted.18:27
niemeyerrogpeppe: Thanks a lot18:27
rogpeppeniemeyer: davecheney says there are other gofmt changes coming18:27
rogpeppeniemeyer: in tip18:27
niemeyerrogpeppe: Hmm18:27
rogpeppeniemeyer: i think we should standardise on 1.0.318:27
niemeyerrogpeppe: Not sure how that affects things.. it feels like an unintended bug18:27
niemeyerrogpeppe: (that might be caused by these other changes)18:28
rogpeppeniemeyer: until 1.1 is released18:28
mgzrogpeppe: lgtm18:28
rogpeppemgz: ta. it's in. i'd like to know if that fixes your problems.18:28
mgzah, I should have mentioned, most of the failures are gone18:29
mgzthere's still the odd build thing, and I need to pull to get dimitern's fix18:29
niemeyerhttp://code.google.com/p/go/issues/detail?id=442818:30
niemeyermgz: That's related to your comment on the branch too ^18:30
mgzniemeyer: right, I saw the discussion here after hitting submit18:31
mgzright, that's it for me18:32
rogpeppeniemeyer: here's the branch that implements the --ca-cert-file flag: https://codereview.appspot.com/684208818:40
rogpeppeniemeyer: i've gotta go now, but i'm really hoping you might be able to go through my active reviews before monday :-) it's feely pretty unwieldy atm, although getting that config branch in is a big weight off.18:41
rogpeppeniemeyer: thanks a lot for bearing with me with these large branches. i'm hoping that there won't be much more in the way of config changes for a while now...18:44
rogpeppenight all18:44
niemeyerrogpeppe: Thanks a lot, and have a nice night and weekend18:54
rogpeppeniemeyer: and you19:16
rogpeppeniemeyer: hope your house decoration is going/has gone well19:17
niemeyerrogpeppe: It's pretty much done now.. today was the last day of furniture installation, and the cable/internet guys were around too to upgrade the network19:19
niemeyerrogpeppe: Slightly less crappy bandwidth now, hopefully video will suck less on our meetings now19:20
niemeyerrogpeppe: I can't handle that anymore, so I'm glad it's over19:20

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