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

hazmatgoyaml seems to have some issues with go 1.1 http://paste.ubuntu.com/5663122/01:45
hazmatargh... nevermind some sort of GOPATH wierdness was picking up  a GOROOT value01:52
hazmatre goyaml01:52
=== racedo` is now known as racedo
rogpeppeyay! internet is finally back on!08:14
teknicothey don't want to delay the propagation of Go 1.1 ;-)08:18
mattywrogpeppe, how much experience do you have running benchmarks in gocheck?09:46
rogpeppemattyw: i've done a few09:47
mattywrogpeppe, I've got two packages with benchmarks in them, but I don't seem to be able to run all of them at once (in one command)09:48
rogpeppemattyw: go test -gocheck.b should do it09:48
mattywrogpeppe, it doesn't seem to, although it's just occured to me that it might be my tree that's causing it. I've got benchmarks in juju/ws/ws_test.go and juju/api/api_test.go but no tests in juju09:50
rogpeppemattyw: what directory are you running the tests in?09:50
mattywrogpeppe, well I have to be in juju/api or juju/ws as there aren't any tests higher up09:51
rogpeppemattyw: what do you see if you do go test -gocheck.b -gocheck.v ?09:51
mattywrogpeppe, it's only running the api test if I'm in the api package when I run the command09:52
mattywrogpeppe, I guess this sort of makes sense09:53
rogpeppemattyw: go test only tests the package in the current directory by default09:55
rogpeppemattyw: you can give it a list of packages if you want09:55
rogpeppemattyw: or a wildcard (see "go help packages" for some docs on that)09:55
mattywrogpeppe, but if I'm supplying -gocheck.b I need to do that from within a package wich has a gocheck test it looks like09:57
rogpeppemattyw: yes09:57
rogpeppemattyw: most packages do, but not quite all unfortunately09:57
mattywrogpeppe, so if I wanted to run all the benchmarks in my codebase by doing go test -gocheck.b launchpad.net/thing/foo/... launchpad.net/thing/bar/... I need to have a gocheck package in my current dir?09:59
rogpeppemattyw: no09:59
mattywrogpeppe, (jet lag is probably causing me to not be making much sense)09:59
rogpeppemattyw: just in the packages that you're testing09:59
rogpeppemattyw: you can see which packages match by using go list09:59
mattywrogpeppe, would a quick hangout be possible? might be quicker for you to see what I'm talking about10:00
rogpeppemattyw: sure10:00
mattywrogpeppe, thanks very much https://plus.google.com/hangouts/_/6fabced08041ffc4a35b6ebdd200962be8e826ba10:00
=== wedgwood_away is now known as wedgwood
=== marcoceppi_ is now known as marcoceppi
=== meetingology` is now known as meetingology
=== _mup__ is now known as _mup_
hazmatrogpeppe2, the provider port opening for the api is generic or is it per provider?14:54
rogpeppe2hazmat: in the api, it's generic (it just sets the flag in the state). the firewaller agent is responsible for acting on that state change, and each provider implements port opening privately.14:55
hazmatrogpeppe2, i've been seeing some issues with client connectivity to the api in openstack environments, just trying to debug.. it works on localhost but remotely it generates an http 400 server error14:56
hazmati suspect its something to do with the origin header on the websocket14:57
hazmatworks ootb on ec214:57
rogpeppe2hazmat: hmm odd.14:57
rogpeppe2hazmat: could it be something to do with limited public ip address space?14:58
hazmatrogpeppe2, its happened on canonistack and hpcloud14:59
rogpeppe2hazmat: you're getting a 400 server error from the API? or from the service you've deployed?14:59
hazmatin the canonistack case the user had sshuttle setup as transparent proxy14:59
hazmatrogpeppe2, api server14:59
rogpeppe2hazmat: through the GUI or direct?15:00
hazmatrogpeppe2, direct15:00
rogpeppe2hazmat: what's the full body of the error?15:00
hazmatrogpeppe2, nothing in the juju logs, its silent.. looks like pre login nothing gets logged there15:01
rogpeppe2hazmat: i meant of the 400 error.15:01
hazmatrogpeppe2, empty body15:01
rogpeppe2hazmat: i'm wondering if the error is coming from the API server or something else15:01
rogpeppe2hazmat: and "400 server error" is the whole text of the error?15:01
* hazmat setups a reproduce csae15:02
hazmatrogpeppe2, so this is out of the box on hpcloud.. generates a 403.. http://pastebin.ubuntu.com/5664742/15:06
rogpeppe2hazmat: ah, "forbidden". hmm.15:06
hazmatrogpeppe2, if i setup the client on the localhost there i can get it to work15:07
rogpeppe2hazmat: is that a public ip address i could try ?15:07
hazmatrogpeppe2, that is a public ip address15:07
hazmatrogpeppe2, i'll import your key15:07
hazmatrogpeppe2, you can ssh into the instance as well / u=ubuntu15:08
hazmatrogpeppe2, the agent logs are useless since there isn't anything logged till post login afaics15:10
hazmatrogpeppe2, i suspect its something in go.net websocket lib that's barfing15:10
rogpeppe2hazmat: it may be. i'm just writing a little bit of test code.15:10
rogpeppe2hazmat: i'm wondering if it's something to do with the "localhost" in this line:15:11
rogpeppe2cfg, err := websocket.NewConfig("wss://"+info.Addrs[0]+"/", "http://localhost/")15:11
hazmatrogpeppe2, the odd bit, is that there is no '403' in that package15:11
hazmathmm15:11
hazmatyes15:11
hazmatthat might be it15:11
rogpeppe2but no15:12
hazmatbut we use the address that the instance thinks it has so ...15:12
rogpeppe2hazmat: that's the client-side code15:12
hazmatoh, not likely relevant then15:13
hazmatrogpeppe2, got it...15:13
hazmatits the go.net websocket server.go around the handshake15:13
hazmatline 41-4315:14
rogpeppe2hazmat: hmm, my line 41 says "config.Protocol = nil"15:15
hazmatrogpeppe2, revision 49? of go.net15:16
hazmatrogpeppe2, of websocket/server.go ?15:17
rogpeppe2hazmat: ah, i'm on r4815:17
rogpeppe2hazmat: it's changed quite a bi15:18
rogpeppe2t15:18
rogpeppe2pity it discards the actual text of the error15:19
hazmatrogpeppe2, so it looks like its the checkOrigin func of the handler15:20
hazmatbut that's a guess15:21
rogpeppe2hazmat: yes it looks like that15:22
hazmatrogpeppe2, 2013/05/14 15:01:32 INFO environs/openstack: closed ports in security group juju-hp-0: [tcp:17070]15:22
hazmatprobably not relevant15:22
hazmatthe env group port is still open15:23
hazmatthat was juju correcting my manual changes15:23
rogpeppe2hazmat: hmm, it might have been rev 49 that broke it - it's a recent change with some relevant looking stuff15:25
rogpeppe2hazmat: are you using the release version of juju?15:27
hazmatrogpeppe2, no.. there are other issues with that15:27
rogpeppe2hazmat: can you try with r48 of websocket?15:27
hazmatrogpeppe2, i just see it re-jigging the origin parsing15:27
hazmatrogpeppe2, but as per the content dump its present in the request15:28
hazmatrogpeppe2, i'll add some debugging prints and redeploy it15:28
rogpeppe2hazmat: it looks like you'd get that result if the origin couldn't be parsed15:29
hazmatrogpeppe2, hmm that could be it15:29
hazmatrogpeppe2, yeah its the port number there15:29
hazmatand the delta between 48/49 on origin parsing15:30
rogpeppe2hazmat: there's a port number in the origin?15:30
hazmatrogpeppe2, per my pastebin yes15:30
hazmatlet me modify the client and see what happens15:31
rogpeppe2hazmat: ah!15:31
rogpeppe2hazmat: so it's all your fault :-)15:31
hazmatrogpeppe2, debatable :-)15:31
hazmatrogpeppe2, as in this case i didn't write the websocket client lib, and it did previously work against juju-core15:32
hazmatand its still not identified as the actual bug15:33
rogpeppe2hazmat: oh yes15:33
rogpeppe2hazmat: Origin should be a url15:34
hazmatrogpeppe2, its not the issue15:34
rogpeppe2hazmat: it's nothing to do with the port number15:34
* hazmat plays around with url.Parse15:35
rogpeppe2jeeze this is inpenetrable http://tools.ietf.org/id/draft-abarth-origin-03.html15:36
rogpeppe2hazmat: here's a start: http://paste.ubuntu.com/5664817/15:36
hazmatrogpeppe2, do you get an err with that?15:37
rogpeppe2hazmat: yes15:37
hazmati just switched out to 1.115:37
hazmatrogpeppe2, this might be a delta with go 1.015:37
rogpeppe2hazmat: i doubt it15:38
rogpeppe2hazmat: looks like that websocket update to me15:38
hazmatrogpeppe2, ah yes.. ic15:38
hazmatpreviously it only parsed with url if didn't match 13 or 8 on websocket protocol15:39
rogpeppe2by my shallow reading of http://tools.ietf.org/id/draft-abarth-origin-03.html it looks like your client is wrong15:40
rogpeppe2  serialized-origin = scheme "://" host [ ":" port ]15:41
hazmatrogpeppe2, depends .. looking at the websocket spec.. its not clear that's it meaningful.. the client can fake whatever they want.. so the server checking here is mostly just of the obnoxious broken sort.15:43
hazmathttp://learnitcorrect.com/blog/websocket-is-great-but-not-the-origin-policy.html15:43
rogpeppe2hazmat: i'm with you that the origin header is fundamentally weird and probably broken15:43
rogpeppe2hazmat: but that doesn't mean that the websocket code isn't correct to check it for syntactic correctness15:44
hazmatrogpeppe2, the checking is also optional15:44
hazmatwhat broke is the changing from optional to required15:44
rogpeppe2hazmat: yeah15:46
rogpeppe2hazmat: looks like i can get around it easily though15:46
hazmatrogpeppe2, thanks for debugging with me15:46
hazmati'll workaround in the client15:46
rogpeppe2hazmat: by creating websocket.Server rather than using websocket.Handler directly15:46
rogpeppe2hazmat: and using a nil handshake function15:47
hazmatrogpeppe2, yeah.. i was wondering why you were doing it that way.. ie not using most of the stuff in the server.go15:47
rogpeppe2hazmat: all that stuff is new15:47
hazmatah15:47
rogpeppe2hazmat: with r4815:47
rogpeppe2hazmat: sorry, 4915:47
rogpeppe2hazmat: i wonder if the default is wrong. who gives a f*** about Origin?15:48
hazmatrogpeppe2, or more to the point, it looks like its there as a policy hook point for people that provider custom handshakes that do care.. just to avoid them having to do the origin parse themselves, as is its mostly useless though15:49
rogpeppe2hazmat: yeah. it's a pity that the default is to do a meaningless check on a header that noone cares about though.15:50
hazmatrogpeppe2, revno 51.. summary:     go.net/websocket: fix handshake error.15:50
hazmatrogpeppe2, agreed15:51
hazmatrogpeppe2, or even if they cared about is trivially faked15:51
rogpeppe2hazmat: i'm not sure r51 fixes the issue we're seeing here.15:51
hazmatrogpeppe2, it doesn't15:51
rogpeppe2hazmat: i think the point is to avoid hoaxing people using normal browsers15:52
rogpeppe2hazmat: because you can't fake it from js15:52
rogpeppe2hazmat: i may be wrong though. it always seemed odd to me.15:52
hazmatrogpeppe2, released new client versions w/ workaround/proper origin, thanks again16:05
rogpeppe2hazmat: np. i learned something new :-)16:05
rogpeppe2hazmat: i think i'll change the server to ignore the origin explicitly16:06
mrammAnybody going to the virtual UDS Juju Core session at 19:05 UTC?17:06
mrammhttp://summit.ubuntu.com/uds-1305/meeting/21818/juju-core-development/17:06
mrammI will be there, but would appreciate help from anybody from core or blue that can attend.17:06
rogpeppe2mramm: i'm out i'm afraid17:20
rogpeppe2mramm: just leaving now17:20
mrammrogpeppe2: understood17:20
mrammjust putting it out there ;)17:20
rogpeppe2mramm: i finally have internet back BTW17:20
mrammrogpeppe2: awesome!17:21
rogpeppe2mramm: lots of ancient lead wiring replaced apparently17:21
rogpeppe2mramm: so my connection may get faster17:21
rogpeppe2mramm: (takes 5-6 days to ramp up they said)17:21
mrammrogpeppe2: that is interesting17:22
mrammrogpeppe2: strange but interesting17:23
rogpeppe2mramm: apparently there *is* a button they can push to say "we know we just replaced the cable, so try the faster speed now" but they're not allowed to use it.17:23
mrammrogpeppe2: interesting17:24
rogpeppe2g'night all17:25
=== deryck is now known as deryck[lunch]
dpb1Hi -- is this a known issue? Am I doing something wrong? var/lib/go/src/launchpad.net/juju-core/environs/openstack/provider.go:547: undefined: identity.AuthKeyPair (during go install -v launchpad.net/juju-core/...)18:32
mrammdpb1: I have not seen it, but perhaps davecheney will know more than me18:33
mrammseems like a version mismatch between juju-core and goose (the openstack API library)18:37
* davecheney pricks up his ears18:47
davecheneyi'm not really here (waiting for a flight)18:47
davecheneybut I can try to help18:47
dpb1davecheney, mramm: if you need me to try something out, let me know18:54
=== deryck[lunch] is now known as deryck
dpb1interesting... go get is pulling in old bits for goose.  /me looks into why19:00
davecheneydpb1: the simplest way to fix this is19:01
davecheneyrm -rf $GOPATH/src/launchpad.net/goose19:01
dpb1ok.19:01
davecheneygo get -u -v launchpad.net/juju-core/....19:01
davecheneythere are more complicated explanations19:02
davecheneybut this one will get you going19:02
* dpb1 tries19:02
dpb1davecheney: awesome.  that is working.  I see the parent branch changed locations.  I guess go doesn't better deal with that?19:06
davecheneythe support for bzr in the go tool is best effort19:09
davecheneywe've moved the bloody project that many times19:09
davecheneymaybe it would be easier to update the instructions to not use the go tool, and just tell people which packages to branch19:09
dpb1davecheney: it is nice to bootstrap.  about as dead simple as I have ever seen a project. :)19:11
davecheneyi don't think we (at canonical) are paying enough attention to what happens when we move projects around19:12
davecheneyi'll add some words to the README19:12
dpb1k19:12
dpb1thx, enjoy your flight. :)19:12
davecheneydpb1: email me, david.cheney@canonical.com if you get stuck again19:13
dpb1davecheney: sure thing19:14
=== wedgwood is now known as wedgwood_away

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