[00:07] <thumper> davecheney: is there a way to use a standard lib function to expand "~/foo" to "/home/tim/foo" if $HOME is /home/tim ?
[00:07] <thumper> davecheney: or is it expected that we do that manually?
[01:58] <davecheney> thumper: sorry I missed your question before
[01:58] <davecheney> i am checking on ~
[01:58] <davecheney> the answer might be 'it's a shell thing'
[01:58] <davecheney> but there might be an expand function
[01:59] <thumper> I didn't find one
[01:59] <thumper> so wrote one in utils
[01:59] <davecheney> SGTM
[01:59] <davecheney> i think that is the correct answer
[01:59]  * thumper is also importing gocheck as gc
[01:59] <davecheney> +1
[02:00]  * davecheney is trying saucy
[02:15] <davecheney> hmm, no xmir when running under vmware ...
[02:20] <davecheney> thumper: wallyworld https://codereview.appspot.com/10818043
[02:20] <davecheney> ^ trivial
[02:20]  * wallyworld looks
[02:21] <wallyworld> davecheney: jeez, that was a hard one
[02:21] <davecheney> thats what she said
[02:23]  * thumper tries to work out why the test is panicing
[02:24] <thumper> ah...
[02:24] <thumper> fark
[02:25]  * thumper sighs...
[02:26] <thumper> panic gone
[02:26] <thumper> now just an error
[02:32] <thumper> wallyworld: wow, tweaking the local provider config tests took *much* longer than expected
[02:32] <wallyworld> usually does
[02:33] <thumper> wallyworld: update coming through
[02:33] <wallyworld> cool. i'm trying to debug a bootstrap issue :-(
[02:38] <davecheney> crap
[02:38] <davecheney> lucky(~) % juju bootstrap -v
[02:38] <davecheney> 2013-07-01 02:38:11 INFO juju ec2.go:144 environs/ec2: opening environment "ap-southeast-2"
[02:38] <davecheney> 2013-07-01 02:38:11 INFO juju ec2.go:254 environs/ec2: bootstrapping environment "ap-southeast-2"
[02:38] <davecheney> 2013-07-01 02:38:18 INFO juju tools.go:25 environs: reading tools with major version 1
[02:38] <davecheney> 2013-07-01 02:38:19 INFO juju tools.go:29 environs: falling back to public bucket
[02:38] <davecheney> 2013-07-01 02:38:20 ERROR juju supercommand.go:234 command failed: use of closed network connection
[02:38] <davecheney> error: use of closed network connection
[02:48] <wallyworld> thumper: could you do me a favour when you have time? could you pull lp:~wallyworld/juju-core/container-constraint and run the tests in ./constraints? They pass locally for me but the bot complains about TestRoundtripYaml and i'm stuffed if i know why
[02:48] <thumper> kk
[02:49] <thumper> davecheney: I've not had ap-southeast-2 actually work for me
[02:49] <thumper> davecheney: it would start instances but then say "nope, no instances for you"
[02:49] <davecheney> us-east-1 fails with the same error
[02:49] <davecheney> why doesn't the error say what failed
[02:49] <davecheney> i'm guessing it fell off the end of the cloud image list
[02:49] <thumper> ugh
[02:50] <thumper> wallyworld: running the tests now
[02:50] <wallyworld> thanks
[03:16] <wallyworld> thumper: how'd you go running the container tests?
[03:19] <wallyworld> /scontainer/constraints
[03:21] <thumper>  fail in ConstraintsSuite.TestRoundtripYaml
[03:21] <thumper>     c.Assert(cons, DeepEquals, t)
[03:21] <thumper> ... obtained constraints.Value = constraints.Value{Arch:(*string)(0xf8400ccab0), Container:(*instance.ContainerType)(nil), CpuCores:(*uint64)(nil), CpuPower:(*uint64)(nil), Mem:(*uint64)(nil)} ("arch=i386")
[03:21] <thumper> ... expected constraints.Value = constraints.Value{Arch:(*string)(0xf840056380), Container:(*instance.ContainerType)(0xf840056370), CpuCores:(*uint64)(0xf84006c158), CpuPower:(*uint64)(0xf84006c160), Mem:(*uint64)(0xf84006c168)} ("arch=i386 container=lxc cpu-cores=4096 cpu-power=9001 mem=18000000000M")
[03:22] <wallyworld> sigh. that's what the bot says but they pass for me
[03:22] <thumper> hmm... that's weird
[03:22] <wallyworld> and the code looks fine
[03:22]  * thumper takes a look
[03:26] <thumper> wallyworld: yeah man, that looks weird
[03:27] <thumper> wallyworld: have you told it how to deserialize instance.ContainerType?
[03:27] <thumper> wallyworld: actually WTF?
[03:28] <thumper> wallyworld: I see the earlier test for the individual container type
[03:28] <wallyworld> the deserialisation is done in the SetYAML
[03:28] <wallyworld> ContainerType is a string, so SetYAML is not required except for the fact that it doesn't handle "" properly
[03:29] <thumper> wallyworld: ok, found it
[03:29] <wallyworld> great cause my eyes didn't
[03:30] <thumper> wallyworld: if you change "Mem:       uint64p(18000000000)," to something smaller, it passes
[03:30] <thumper> don't ask me why
[03:30] <wallyworld> that value was always there
[03:30] <wallyworld> before my changes
[03:30] <wallyworld> oh well, i'll change to smaller. but i wonder why it works for me
[03:31] <wallyworld> thumper: what version og go are you ruinning?
[03:31] <wallyworld> i'm on 1.1
[03:31] <wallyworld> perhaps it's a 1.1 vs 1.03 thing
[03:32] <thumper> go --version and go --help don't work
[03:32] <thumper> ffs
[03:32] <thumper> 1.0-2
[03:32] <thumper> 1.0.2-2
[03:32] <wallyworld> ok, that may explain it
[03:32]  * thumper nods
[03:32] <wallyworld> 1.0.x vs 1.1
[03:32] <wallyworld> thanks for helping with that!
[03:32] <thumper> but why did the test pass before on the bot?
[03:32]  * wallyworld tweaks and re-approves to land
[03:33]  * wallyworld has  no idea
[03:33] <wallyworld> thumper: actually, there wasn't a setYAML before
[03:33] <wallyworld> so parseuint64 wasn't called
[03:34] <thumper> ?!
[03:34] <wallyworld> maybe the issue is in there
[03:34] <wallyworld> thumper: could you perhaps print any error in setyaml
[03:34] <wallyworld> and see what it says
[03:34] <thumper> where is the setyaml?
[03:34] <wallyworld> since decoding will abort on the first error
[03:34] <wallyworld> constraints.go
[03:35] <wallyworld> parseUint64 is in there also
[03:36] <thumper> 2013-07-01 03:36:10 ERROR juju.constraints constraints.go:199 must be a non-negative integer
[03:36] <wallyworld> well there you go. it is in parseUint64
[03:37] <wallyworld> strconv.Atoi
[03:37] <thumper> wat?
[03:38] <thumper> oh, turning a big int into a smaller int
[03:38] <thumper> and causing the signed  bit to flip
[03:38] <wallyworld> maybe there is a AtoUi
[03:38] <wallyworld> i'll look
[03:39] <thumper> wallyworld: why not use ParseUint64?
[03:39] <thumper> in strconv
[03:39] <wallyworld> nope, need to call parseUint directly
[03:39] <wallyworld> yep
[03:39] <thumper> ParseUint(s string, base int, bitSize int) (n uint64, err error)
[03:39] <thumper> right
[03:39] <wallyworld> will make the fix
[03:39] <thumper> want me to try that here?
[03:39] <thumper> as I get the error?
[03:39] <wallyworld> ok, thanks
[03:39]  * wallyworld still wonders how it passed before
[03:41] <thumper> -		if val, err := strconv.Atoi(str); err != nil || val < 0 {
[03:41] <thumper> +		if val, err := strconv.ParseUint(str, 10, 64); err != nil {
[03:41] <thumper> that change makes it pass here
[03:41] <thumper> you may find it was calling ParseUint by default
[03:41] <wallyworld> if val, err := strconv.ParseInt(str, 10, 64); err != nil || val < 0 {
[03:42] <wallyworld> is what we'd want if we want to check for -ve ints, no?
[03:42] <thumper> surely the ParseUint checks for netagives
[03:42] <wallyworld> ok, parseuint might do that
[03:42] <wallyworld> i'll look
[03:45] <wallyworld> yes, you get an invalid syntax error
[03:45] <wallyworld> not as nice as our error message
[03:46] <thumper> davecheney: I need to find out the local ip address
[03:46] <thumper> davecheney: localhost isn't good enough
[03:46] <davecheney> thumper: of what ?
[03:47] <thumper> that's the question isn't it
[03:47] <davecheney> of the bound interfaces
[03:47] <davecheney> ?
[03:47] <thumper> yeah...
[03:47] <thumper> I'm not entirely sure...
[03:47] <thumper> so I want wlan0 or eth0...
[03:47] <davecheney> http://golang.org/pkg/net/#InterfaceAddrs
[03:47] <thumper> but not lxcbr0
[03:47] <davecheney> start with net.Interfaces
[03:47] <thumper> or veth*
[03:47]  * thumper looks
[03:48] <davecheney> then inspect the Name property
[03:48] <davecheney> and then call .Addrs() on it
[03:48] <thumper> kk
[03:48] <davecheney> i *think* that these were all in 1.0
[03:48] <davecheney> they did get a spruce up
[03:49] <davecheney> guess we'll cross that bridge when we get there
[03:49] <thumper> wallyworld: btw, found a weird constraints bug
[03:49] <thumper> "arch=i386 container=lxc cpu-cores=4096 cpu-power=9001 mem=18000000000M"
[03:49] <thumper> wallyworld: it finds the M suffix for mem without removing the digits
[03:50] <thumper> because it isn't that many megabytes
[03:50] <davecheney> thumper: possibly mem is alwasy in megabytes
[03:50] <thumper> davecheney: actually I think you're right
[03:56] <thumper> davecheney: arse
[03:56] <thumper> davecheney: the Name() of them all are "ip+net"
[03:56] <thumper> davecheney: I was hoping to get "eth0" or "wlan0" etc
[03:56] <thumper> sorry, Network()
[04:02] <thumper> wallyworld: yay, it merged
[04:03] <wallyworld> \o/
[04:03] <wallyworld> thanks thumper for the help
[04:03] <thumper> wallyworld: np
[04:04] <thumper> davecheney: I think Interfaces is what I need
[04:35] <davecheney> kk
[04:38]  * thumper away for kids activities....
[05:59] <jam> wallyworld_: /wave
[06:00] <wallyworld_> hi
[06:00] <wallyworld_> oh look at the time
[07:32] <jtv> jam: thanks for your review...  Looking closer at Environ.Instances() and the StateInfo() loop that's duplicated between providers, I am plagued by doubts about what should happen in the case without a state server.
[07:33] <jtv> If Instances() returns success in that case, then the loop will just keep polling.  But this may be by design ("waiting for bootstrap to finish"), or  it may be an accident ("we always have an instance anyway... except maybe in tests").
[07:34] <jtv> If Instances() returns ErrNoInstances, then StateInfo() will return ErrNoInstances which may or may not be appropriate.
[07:35] <jtv> (This is the part people always miss when they say good code needs no comments: computers need to know what to do, humans need to know intent)
[07:37] <jtv> In the OpenStack/EC2 providers, Instances() returns no error in this particular case, so maybe the interface documentation is just not quite right in leaving this particular hole.
[07:59] <rvba> jam, mgz: Hi, would you mind updating gwacl in the landing environment?  (It should not break anything, we've just added new methods that are needed for our work on the provider)
[07:59] <jam> rvba: updating now
[08:00] <rvba> ta
[08:00] <jam> rvba: says we are on r146, does that match?
[08:06] <jam> jtv: the case without a state server is pretty underdefined, given it only happens during bootstrap until the state is up.
[08:06] <jam> jtv: I would guess we are trying to loop until we see the bootstrap node
[08:07] <jam> Certainly today if you do "juju bootstrap; juju status" it polls until the state server is up.
[08:07] <jtv> Ah...  OK, then we'll want to update the spec for Instance().  Thanks.
[08:07] <wallyworld_> anyone know how to do this in mongo: select * from foo where not exists (select from bar where bar.id = foo.id) and foo.acme = 'fred'
[08:09] <jam> wallyworld_: it looks like there is a $nin operator: http://docs.mongodb.org/manual/reference/operator/
[08:10] <jam> though that requires passing the array
[08:10] <wallyworld_> jam: thanks yeah, just saw that myself
[08:10] <wallyworld_> it seems that 2 queries are needed :-(
[08:10] <jam> wallyworld_: well, you have two queries above
[08:10] <jam> it just happens that one is inlined :)
[08:10] <wallyworld_> well
[08:10] <wallyworld_> relational dbs do it all in the db
[08:11] <wallyworld_> so faster, optimised, etc
[08:11] <jam> wallyworld_: well, the query planner can do stuff like do the "and foo.acme" before doing the "select from bar".
[08:11] <jam> sure
[08:11] <wallyworld_> and the data does not have to be serialised back to the client etc
[08:12] <wallyworld_> s/data/intermediate records
[08:19] <jam> wallyworld_: "The second part is impossible. MongoDB does not support joins or any  sort of cross querying between collections in a single query. Querying  from one collection, saving the results and then querying from the  second is your only choice unless you embed the data in the rows  themselves as I mention earlier."
[08:19] <jam> If you can't query between collections, then you can't do what you were asking without 2 requestts.
[08:19] <jam> I thought I remembered something about no-cross-joins
[08:19] <jam> But I also wasn't sure if it is was something that changed wrt mongo version updates.
[08:20] <jam> wallyworld_: http://stackoverflow.com/questions/12437017/group-based-cross-collection-query-in-mongodb-inc-having-clause
[08:20] <jam> seems pretty close to what you were trying to do
[08:20] <jam> it certainly was a 'user_id not in ...'
[08:36] <wallyworld_> jam: thanks, looking
[08:37] <jam> wallyworld_: well, it is saying, you can't really do that, you need to model the data differently.
[08:37] <jam> not exactly what you were hoping for, I'm sure.
[08:37] <wallyworld_> jam: sad thing is, doing it in 2 queries crosses transaction boundaries also
[08:37] <wallyworld_> seems like a pretty bad limitation of mongo :-(
[08:40] <wallyworld_> if you want to avoid contention on document collections, you need to split them up, but then you can't join them again for queries
[08:42] <jam> wallyworld_: it sound like there is a per-db lock anyway: http://docs.mongodb.org/manual/faq/concurrency/
[08:42] <jam> multiple-readers 1 writer
[08:42] <jam> actually similar to SQLite from the sound of it.
[08:44] <wallyworld_> hmmm. if the locks are per database, i wonder why issues with doc contention were brought up in reviews
[08:45] <wallyworld_> per database seems crazy in any case
[08:48] <jam> jcastro: poke
[08:48] <wallyworld_> jam: also, doing it in two queries is "dumb" also because if the data set is large, you can't possibly expect to be able to efficiently read the entire collection into memory just to create the array for the second query
[08:49] <wallyworld_> recipe for disaster really
[09:21] <rvba> Hi there, would someone be free to review this branch: https://codereview.appspot.com/10788043/? (it has already been reviewed and approved — with a few changes — by Jeroen).
[09:52] <jam> rvba: I'm on-call today, I'll try to give it a look.
[09:52] <rvba> Thank you jam.
[09:53] <jam> rvba: you're thread got split between 2 submissions, right?
[09:53] <rvba> jam: no, it's just that every time I run 'lbox propose', a new MP is created.
[09:54] <rvba> jam: here is the original MP: https://codereview.appspot.com/10732045/
[09:59] <jam> rvba: do you happen to use a different email address for your Reitveld account than your LP one? it does generally work correctly for me on 'lbox propose'.
[10:01] <rvba> jam: my Reitveld account is setup with my .c.c email address, my lp account has 2 email addresses associated to it, one of which is the .c.c email address.
[10:03] <jam> rvba: so I don't know the Azure model of things. How are you filtering to only include the instances associated with the environment.
[10:03] <jam> Is that the "ServiceName: container" stuff?
[10:03] <rvba> jam: yes
[10:07] <jam> rvba: unrelated to your changes, a general question about Azure. Are you able to run the common tests in environs/jujutest? Or you don't have a local-only Double implementation of the provider to talk against?
[10:08] <jam> you seem to do more of a 'push these responses into the queue, and test that you parse them out again"
[10:08] <rvba> jam: I haven't tried to run the common tests.
[10:09] <jam> rvba: the idea is to do an interface level test, to ensure that all Environ implementations have the same basic API and semantics.
[10:09] <jam> So far most implement a local-only version, and then also let you run with a "-live" flag to run against an actual remote service
[10:09] <rvba> jam: yeah, we don't have a Double implementation.  We just "patch" the http dispatcher.
[10:10] <rvba> jam: it's a bit less clean than having a double, but it's much less work.
[10:11] <jam> rvba: and you have to rewrite the shared test suite
[10:11] <jam> though it isn't *that* thorough at this point.
[10:11] <jam> though you could still probably use it for live testing.
[10:14] <rvba> jam: yeah, it looks like something we could use, once we have all the methods in place, to test the provider live.
[10:15] <jam> rvba: The method we used for Openstack was after we got a couple things implemented, hook it up, and then stub out methods we don't support yet
[10:15] <jam> so you can get a decent "ratcheting" of passing tests.
[10:18] <rvba> Sounds like a good idea… we're still mostly fighting with Azure at this point, but that's something we could do once we have implemented the methods to start a node and bootstrap the env.
[10:29] <rvba> Thanks for the review jam.
[10:30] <jam> rvba: the goal is that we can test provider-specific things at that level, and then all other tests can just use DummyProvider and not worry about provider-specific differences.
[10:31] <rvba> Okay
[10:31] <jam> rvba: happy to review. It seems mostly about Azure specific bits, which I trust you to know more about than I
[10:34] <jam> rvba: actually, your patch was the next in the review queue anyway
[11:01] <jam> rvba: you need to set a commit message on: https://code.launchpad.net/~rvb/juju-core/az-list-instances/+merge/171966
[11:18] <rvba> Good point, done.
[11:59] <jam> wallyworld_: if you're still around, your patch didn't pass because the regex failed to match.
[11:59] <wallyworld_> oh, let me look
[12:00]  * wallyworld_ sighs, fixing
[12:01] <jam> wallyworld_: I can't help you too much. "This enourmous string" doesn't match "this enormous regex"
[12:01] <wallyworld_> jam: yeah i hate that test. i don't need any help. i've had the misfortune of dealing with it before :-)
[12:40] <mramm> hey hey
[12:41] <mramm> long week of travel and now I'm back in michigan.
[12:41] <mramm> weekend of travel I guess
[17:30] <jtv> Does anyone have time for a refactoring review?  It turned out rather huge, but on the bright side, lots of code disappears!  https://codereview.appspot.com/10830044
[17:30] <jtv> As soon as this is reviewed, I can go and disappear some more of the stuff.  :)
[18:57] <jam> jtv: if you're still here LGTM
[19:24] <jtv> Thanks jam!
[21:03] <thumper> morning
[21:07] <mramm> morning
[21:07] <jtv> Morning thumper
[21:07] <jtv> Say, want to review some code destruction while I sleep?
[21:07] <thumper> jtv: you're up late
[21:08] <jtv> Not very.  I'm in Europe.  :)
[21:08] <thumper> jtv: rack 'em up
[21:08] <thumper> mramm: call?
[21:08] <jtv> Thanks!  Got one vote already: https://codereview.appspot.com/10830044
[21:08] <jtv> nn :)
[21:08] <mramm> sure we can chat for a few, I have to leave in 20 min though
[22:53] <thumper> wallyworld_: hey
[22:53] <wallyworld_> yello
[22:53] <thumper> wallyworld_: got some time to talk?
[22:53] <wallyworld_> sure
[22:53] <thumper> now?
[22:54] <wallyworld_> yep
[22:54]  * thumper starts a hangout
[22:54] <thumper> wallyworld_: https://plus.google.com/hangouts/_/b4eba4c9a6ff830eafe2a6ab79cd49bc4c8d0579?hl=en