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