[00:00] davecheney: got a golang question [00:00] davecheney: I have a slice of structures back from the api client [00:00] davecheney: and I want to serialize these out using either json or yaml [00:00] but I want some of the fields to be omitted if empty or zero [00:00] but I don't want to annotate the structure in the api [00:01] as it doesn't care about serialization [00:01] how can I handle this sanely? [00:07] ... [00:07] thumper: as i understand it, you use a tag on the struct [00:07] if you don't want to do that, then maybe write something that takes the struct, and returns a map [00:07] but I don't want to annotate the struct [00:07] hmm... [00:07] so you can elide the fields you don't want to seralise [00:07] why don't you want to annotate the struct [00:08] that is like saying 'i want to drive to town', but I don't want to use a car [00:08] because I think it is messy and detracts from the intent [00:08] ok then [00:08] but if it is the simplest way, I'll just leave a mess [00:08] but then you can't complain that this isn't super easy [00:08] I just think it would be nice for golang to support decoupling this [00:09] write a function that takes the struct and returns a map with the fields you want to jsonise [00:09] * thumper vomits a little into his mouth [00:09] * thumper goes to annotate the struct [00:10] thumper: why are you complainin [00:10] davecheney: actually... [00:10] the json package suppors exactly what you want to do [00:10] but you don't want to use it [00:10] davecheney: how does the default serialization handle embedded structs? [00:10] and this is somehow the json package's fault ? [00:11] thumper: from memory, as if they were collapsed into the main struct [00:11] hmm... [00:11] * thumper writes a function [00:11] I think it is cleaner [00:11] afaik it is like a depth first traversal [00:11] type t struct { a int; b int; C; d int } [00:11] order goes [00:12] a, b, C.something, C.something else, d [00:12] a, b and d sohuld be upper case in that example [00:14] * thumper nods [00:57] ahh poo [00:58] wallyworld_: your authentication worker is killing my local provider [01:00] really? [01:01] in what way? [01:03] wallyworld_: http://paste.ubuntu.com/6712278/ [01:03] wallyworld_: I don't have an ubuntu user [01:04] whereas nodes in the cloud do [01:04] aye [01:04] bollocks [01:04] hmmm [01:04] I wonder if we should just skip it for machine 0 on the local provider [01:05] local provider is a little special for machine 0 [01:05] easiest solution for now [01:05] * thumper nods [01:05] care to work something up with that? [01:05] i've got a bunch of stuff in progess [01:05] I'm debugging my run stuff [01:05] .. [01:05] just a sec, door knock [01:05] hmm [01:07] thumper: can it wait till tomorrow? or is it blocking you? [01:07] wallyworld_: it doesn't appear to be blocking [01:07] so I'm just going to hide those error messages for now [01:07] ok, but if it does need attention before tomorrow, let me know [01:20] I've hacked up a branch ti not start it, as hiding the errors wasn't going to cut it [01:40] how can I easily poke (as in read) the internal mongo state? [01:40] for what purpose? [01:42] you can get at the various collections off the state object, and query those directly [01:44] from a shell, I want to poke into the mongo db to read bits [01:48] thumper: mongo --ssl -u admin -p localhost:37017/admin [01:48] then "use juju" [01:53] hmm... auth fails [01:53] I tried the admin secret from the environments file [01:53] this is for the local provider [01:53] from .jenv? [01:53] no [01:54] .jenv is what gets used, would be best to check that they're the same [01:54] tho I thought it got carried over [01:54] axw: it is the same... [01:54] hmk [03:16] oh go... [03:16] * thumper sighs [03:16] * thumper gets bitten by variable capture of anonymous function inside a loop [10:47] mgz: poke === gary_poster|away is now known as gary_poster [14:31] morning jcastro [14:44] jcastro: adding a couple of bullets is easy. you got the text? would rather do this just once. [14:47] yeah [14:47] it's what I sent to the list earlier this week [14:47] let me find it [14:48] https://lists.ubuntu.com/archives/juju/2014-January/003347.html [14:49] jcastro: thanks. will do it right now. [14:50] ok [15:19] merge proposal for Joyent Provider: https://code.launchpad.net/~dstroppa/juju-core/joyent-provider-storage/+merge/200851 [15:19] and https://codereview.appspot.com/49050044/ [15:30] this one does depend on the new gojoyent library, if I could get someone else to have a look at that mp as well that'd be really great [16:48] Someone needs to write a DeepDiff for use in tests instead of DeepEquals. Expected: Obtained: is unhelpful. :/ [16:48] :) === negronjl_ is now known as negronjl [16:50] wonder if it would work to just pipe the output of deep equals into a textual diff [18:46] hi guys [18:46] http://pastebin.ubuntu.com/6716390/ [18:46] I have set default-series: precise for this environment [18:47] and it seems to ignore it? In addition to the error [19:27] jcastro: sorry, have been heads-down... did you figure anything out? [19:27] I found AWS works. :) [19:27] jcastro: local is tricky [19:40] natefinch, ok I was just debating whether to file a bug [19:40] or if you guys knew it was broken in trusty already [19:41] * rogpeppe is done [19:41] g'night all [19:44] rogpeppe: time for a very quick question? [20:00] morning thumper [20:00] morning [20:06] oops [20:06] left my amazon environment up last night [20:06] only four machines [20:06] natefinch: do you know if fwereade is back at work? [20:08] thumper: travelling today I bevieve [20:08] thumper: did you hear about my $2000 AWS bill for last month? [20:08] no... [20:08] ouch [20:08] what happened there? [20:09] thumper: was twiddling with AWS Web gui, since I was having trouble getting juju to bring up the instance type I wanted. Don't rmemeber why, but I was in US-West when I normally do stuff in US-East [20:09] thumper: left up a large dedicated instance all month (dedicated evidently means $2 / hour) [20:10] thumper: because it was in West, and I normally look at east, I didn't even see it [20:10] damn [20:10] thumper: Called Amazon, luckily they were really nice about it, saw I didn't access it all month and after a couple days told me they'd waive the fee [20:12] nice [20:14] thumper: Found out there's some nice notifications you can set up to email you if it looks like you're going over a certain amount for your monthly bill. I set that right up, let me tell you. [20:14] natefinch: can you please email that to the juju-dev list? [20:14] I'd like to know [20:14] thumper: sure ting [20:15] thumper: had actually thought I should, but got bogged down in other things. Definitely a good thing to keep us from similar infractions. [20:18] * thumper nods [20:24] hey thumper [20:24] http://pastebin.ubuntu.com/6716390/ [20:24] hi jcastro [20:24] I can't get local working on trusty. [20:25] ?! [20:25] I know right! [20:25] jcastro: installing edge os releases? y u no compile juju from trunk [20:25] jcastro: can you run lxc-ls yourself? [20:25] o/ marcoceppi_ [20:26] thumper, ah, no I can't, so probably an lxc problem [20:26] \o thumper [20:26] that just manifests in juju? [20:26] * thumper nods [20:26] jcastro: we just use the lxc command line [20:26] ack [20:26] if they aren't working, we are screwed [20:26] I'll go hunt down someone on server [20:26] kk [20:26] you know who to chase? [20:26] serge? [20:26] aye [20:26] he'd be my first target :) [20:27] jcastro: perhaps I should upgrade to trusty? [20:27] with saucy, no devs were running it until just before release [20:28] so issues came late [20:28] thumper: it's a good point. Roger's on Trusty, but I think that's it AFAIK [20:28] yeah so we were just discussing this in our call [20:29] thumper, also [20:29] it looks like it tried to spawn a trusty image even though I set series in environments.yaml as precise [20:30] jcastro: machine 0 is your machine [20:30] and not a container [20:30] the host [20:30] oh, right, the bootstrap is always the host os! [20:41] jcastro: did you sudo bootstrap? [20:41] yeah [20:41] oh dude, did non-needing-sudo-bootstrap land and I not know about it? [20:42] no [20:42] * thumper thinks [20:42] jcastro: I'm thinking... [20:42] natefinch: what was your question? [20:42] jcastro: perhaps the behaviour changed [20:43] jcastro: luckily now we have status doing everything in the api server [20:43] in the past, it was doing some of the processing locally [20:43] so status would try to iterate... [20:43] rogpeppe: you had secondaries stuck in StartupState2, I'm seeing that now... how did you fix it? [20:43] jcastro: try this for me: sudu juju status [20:43] * thumper wonders if that'll work [20:44] thumper, ok give me a few minutes, accidentally bootstrapped into AWS [20:47] jcastro: also, can I get you to try with trunk? [20:48] ok so sudo juju status works [20:49] thumper, is there a guide/instructions for how to build trunk? [20:50] jcastro: I'm guessing that lxc-ls used to work on saucy without sudo [20:50] jcastro: but in trusty it doesn't [20:50] that seems so [20:50] natefinch: do you know if the 1.17 dev build contains the status in api? [20:50] jcastro: which juju version? [20:51] 1.16.5-trusty-amd64 [20:51] jcastro: can you try the 1.17 version from the ppa? [20:52] saves building it [20:52] thumper: I was pretty sure status was pretty recently done, so I would expect not? But I forget [20:52] natefinch: I think dimiter got it in before christmas [20:52] and 1.17 was released after taht [20:52] thumper, I can, should I wait to see what stgraber has to say about lxc-ls? [20:52] jcastro: I'm 91% certain this is the issue [20:52] ok [20:52] Going for it [20:52] thumper: releases are for people who actually use juju. As a developer, I try to be above such things. ;) [20:53] natefinch: obviously I build trunk too :) === hatch_ is now known as hatch [20:54] natefinch: if you wait, it goes from StartUp2 to Recovering and then to Secondary [20:55] natefinch: takes about 30s for me [20:55] jorge@jilldactyl:~$ sudo juju bootstrap [20:55] ERROR Get http://10.0.3.1:8040/provider-state: dial tcp 10.0.3.1:8040: connection refused [20:55] rogpeppe: hmm.... waited 120 seconds, figured that would probably do it. maybe I'm doing someting wrong [20:55] natefinch: did you add the keyfile stuff? [20:56] rogpeppe: oh yeah... no, I did not [20:56] rogpeppe: remind me what that is again? my brain is pretty fried [20:56] natefinch: it can be worth changing the mongo instance stuff so that it logs messages printed by mongo [20:56] rogpeppe: probably, yeah [20:59] thumper, serge and stgraber confirm you need sudo for lxc-ls [20:59] but now I get this crazy connection refused business [21:00] jcastro: really nice of them to let us know that they are changing behaviour... [21:00] at least trunk works... [21:00] rogpeppe: ahh - you mean make them all use the same ssl keyFile? [21:00] natefinch: here's some diffs: http://paste.ubuntu.com/6717106/ [21:00] thumper, hey so I think we dodged a bullet, other than me wasting an hour [21:00] natefinch: yeah [21:01] thumper, aka maybe some of you guys should start testing on trusty? [21:01] right, i'm not here :-) [21:01] jcastro: I'll bring it up at the meeting tonight [21:02] thumper, final release is 99 days, so 3 months "feels" right imo [21:02] way better than 2 cycles ago. :) [21:02] jcastro: what do you mean "feels" right? [21:02] jcastro: as in, start using trusty? [21:03] yeah [21:10] thumper, your 91% is correct [21:11] with 1.17 it works fine [21:13] sinzui, is 1.17 going into trusty or one after that? [21:14] jcastro, we are trying to avoid putting unstable juju into trusty. trusty users can subscribe to the devel ppa [21:14] ok [21:14] but local is broken with 1.16.5 in trusty [21:15] Lots more is broken in 1.17.0...it doesn't work with existing 1.16.5 deployments [21:15] heh, awesome [21:15] jcastro, 1.18 will be available in a few weeks, this Month [21:16] ok [21:16] I'll send a warning to the list [21:17] this really only effects people testing during the audit [21:19] jcastro, how is 1.16.5 on trusty? [21:19] I didn't get past the status [21:20] sinzui, I'll ask for feedback while I am at it! [21:20] jcastro, It works for me. It did this morning and it does for me now [21:21] sinzui: what version of juju are you running? [21:21] http://pastebin.ubuntu.com/6716390/ [21:21] you don't get that? [21:21] 1.16.5 and 1.17.0 I switch through out the day as needed [21:21] I have been on trusty Since November [21:21] are you up to date today? [21:22] jcastro, No I don't [21:24] jcastro, in fact http://pastebin.ubuntu.com/6717232/ status is the same as running it with sudo, which wan't true under saucy [21:24] I can see the machines with trusty+1.16.5 [21:25] huh, so what just happened to me then [21:27] jcastro, do you need to do the dance of checking that the /var/lib/lxc/* is sane, that cloud-init images are fresh, and that the juju local dir is sane? I still need to manually remove lxc container from time to time because destroy-env doesn't [21:29] huh, cloud image is from 5 december [21:30] I'll keep an eye out wrt. clean up though [21:30] I thought we had fixed that [21:30] I thought we had too [21:35] thumper, ooh, forcing me to explicitly mention the environment before I destroy is very nice [21:36] jcastro: I did that. Glad you like it :) [21:36] jcastro: less likely to destroy production now :) [21:36] well done! [21:36] I also like the switch mention [21:36] amazon -> local [21:36] that's nice too [21:36] * natefinch is going to name his production environment DONT_DESTROY_ME____SERIOUSLY [21:38] IF_ITS_FRIDAY_DO_NOT_TOUCH [21:38] lol [21:47] hey, where do you guys install lbox from? [22:06] amrwe build it :-) [22:06] marcoceppi_: we build it [22:07] thumper: cool adding /usr/lib/go/bin to my path now [22:07] thumper, a "how to build and run juju from source" page on the docs wouldn't be a bad idea [22:08] jcastro: sounds like a good idea [22:09] * thumper wishes for list comprehension in golang again [22:10] thumper: for plugins, if I run `juju help charm proof` will juju pass the additional arguments to the plugin in addition to the --help flag? [22:10] thumper, that was a snarky way of assigning something to you. :p [22:11] * thumper dodges that bullet [22:12] marcoceppi_: no, I don't think so [22:12] thumper: cool, jw [22:53] How do you guys log in with your @canonical.com addresses to codereview from lbox? I keep getting authentication denied [22:56] um... [22:56] marcoceppi_: do you have the email address you are trying linked with your launchpad account? [22:57] marcoceppi_: at some stage I had a real password on that email address stored with google [22:57] and that is what I use to authenticate [22:57] I've lost track of how I set that up [22:57] thumper: I'll give that a go [22:59] thumper: i've added some code to not start the auth worker for local provider. but there's no easy way to test it that i can see [22:59] wallyworld_: no, probably not... [22:59] I don't know how to help with that bit [23:00] i'll just propose as is and you can review? [23:00] i don't think we test for the other local provider hackery [23:10] thumper: https://codereview.appspot.com/49340043 i think i did the correct thing [23:17] thumper: the auth worker runs on all nodes, not just bootstrap [23:18] wallyworld_: I know, but we only want it to not work on the bootstrap [23:18] the other nodes are fine [23:18] ah ok [23:18] and i do recall ubuntu user created for null provider, so i'll tweak the check [23:26] OMG!!! [23:27] our tests suck [23:27] FFS [23:27] * thumper tries to work out how to unfuck this test [23:28] * thumper takes a deep breath as he realises it is his fault [23:39] * thumper is heading out to lunch with his birthday girl + rest of the family [23:39] bbl