davecheney | thumper: yes, that was a mistake | 00:19 |
---|---|---|
davecheney | that line doesn't do anything | 00:19 |
davecheney | but commenting it out was a mistake | 00:20 |
davecheney | i will revert that part from the PR | 00:20 |
davecheney | and add some more test coverage to exercise that line | 00:20 |
thumper | davecheney: I'm concerned | 00:24 |
thumper | how do I pull your branch locally? | 00:24 |
thumper | davecheney: do you know what causes the empty caller stack item between the test function and the code? | 00:25 |
thumper | davecheney: I'm wondering if when called in real life, we don't get that | 00:25 |
thumper | davecheney: in particular, the errgo.New method in the global var block gets the wrong location | 00:26 |
thumper | davecheney: as it doesn't have a blank caller entry | 00:26 |
thumper | davecheney: also, when called from juju/errors we get the correct stack | 00:26 |
thumper | but if this change goes in, they will be wrong | 00:26 |
rick_h_ | thumper: toss some notes/feedback in your doc. I can't edit or I'd spell out some of the use cases/etc. Let me know if any of it seems crazy. | 00:26 |
davecheney | thumper: go to the PR, there is link to the instructions on how to checkout my branch | 00:27 |
davecheney | thumper: the final error remaining to be fixed ? | 00:27 |
thumper | davecheney: I'll look again | 00:27 |
davecheney | i don't know the cause at the moent, if I did, I would have fixed it :) | 00:27 |
thumper | davecheney: the pull request doesn't tell me how to get it locally | 00:28 |
thumper | or at least not in any way obvious I can see | 00:28 |
thumper | rick_h_: kk, ta | 00:28 |
thumper | davecheney: do you know how I can get your branch locally? I'm stumped | 00:31 |
davecheney | thumper: https://github.com/juju/errgo/pull/2 | 00:32 |
davecheney | ^ click You can also merge branches on the command line. | 00:32 |
davecheney | do step 1 | 00:32 |
davecheney | don't do step 2 | 00:32 |
thumper | ahh... | 00:33 |
thumper | ta | 00:33 |
davecheney | thumper: welcome to the monoculture | 00:34 |
thumper | davecheney: as expected, with the change to errgo, all of the stack tests in juju/errors now fail | 00:34 |
* thumper has to go do daughter's lunch now | 00:36 | |
davecheney | shit | 00:43 |
* davecheney has a horrible feeling this may not be fixable i the general case | 00:43 | |
sinzui | hi wallyworld_ https://bugs.launchpad.net/juju-core/+bug/1319822 appeared with your branch to change lxc | 00:44 |
_mup_ | Bug #1319822: lxc unit tests broken for trusty <lxc> <regression> <test-failure> <juju-core:Triaged> <https://launchpad.net/bugs/1319822> | 00:44 |
wallyworld_ | sinzui: yeah, it's on my todo list today. sad that it passed the bot but breaks on CI | 00:45 |
sinzui | wallyworld_, can you review what went wrong? | 00:45 |
wallyworld_ | yeah, just finishing another branch first | 00:45 |
sinzui | wallyworld_, It might be CI. I am willing to accept the bame | 00:45 |
wallyworld_ | more likely my fault | 00:45 |
wallyworld_ | i also gotta look to see if precise containers on trusty host has broken again | 00:46 |
sinzui | wallyworld_, I now have aws, canonistack, and lexington under by control. http://juju-ci.vapour.ws:8080/ | 00:49 |
wallyworld_ | great | 00:49 |
sinzui | but alas, I forgot the test I wanted to play needs a built package, and CI doesn't know how to do that ppc64 and arm64 | 00:49 |
wallyworld_ | i like all the blue dots | 00:50 |
* menn0 is being inducted^Wbrainwashed | 01:05 | |
thumper | davecheney: https://github.com/juju/errgo/pull/3 | 01:39 |
* davecheney looks | 01:41 | |
davecheney | thumper: if it passed under gc | 01:42 |
davecheney | check it in | 01:42 |
thumper | it did | 01:42 |
davecheney | cool | 01:42 |
thumper | and it passes with gccgo | 01:42 |
thumper | fwiw | 01:42 |
davecheney | thumper: so here is my concern | 01:42 |
davecheney | runtime.Callers is basically different between gc and gccgo | 01:42 |
davecheney | normally you can work around it by adjusting the offset of the initial runtime.Callers | 01:43 |
thumper | for many values yes | 01:43 |
davecheney | but if we stack these things, and there are embedded strcuts involved | 01:43 |
davecheney | i am not sure it will work for all possible variation | 01:43 |
davecheney | variations | 01:43 |
thumper | however I *think* that the one causing a problem is just for tests | 01:43 |
davecheney | yes | 01:43 |
davecheney | and the effect on real code is you may see an odd line in the stack trace that either has no source line | 01:43 |
thumper | so perhaps we patch the initial level only for gccgo and just for the tests? | 01:43 |
thumper | and it seems to be just the test methods themselves | 01:44 |
thumper | oh... | 01:44 |
thumper | I have a plan | 01:44 |
wallyworld_ | axw: hiya, standup? | 01:44 |
davecheney | the &embed{err} one is the complete fucker | 01:44 |
thumper | davecheney: let me try something | 01:44 |
davecheney | thumper: hold up, i'll update my PR | 01:44 |
thumper | davecheney: I'd like some approval on that test addition PR | 01:44 |
thumper | davecheney: so it looks like I'm getting other feedback :) | 01:44 |
davecheney | thumper: i can drop it from the PR | 01:45 |
thumper | is there a git command to branch and checkout? | 01:45 |
davecheney | keep things simple | 01:45 |
davecheney | thumper: you're asking the wrong man | 01:45 |
davecheney | i use | 01:45 |
davecheney | git checkout -b NAME | 01:45 |
davecheney | which branchs and switchs to NAME | 01:45 |
axw | wallyworld_: hey, yep | 01:45 |
thumper | that what I want | 01:45 |
davecheney | excellent, grammar good | 01:46 |
thumper | davecheney: ya know... | 01:47 |
thumper | davecheney: I bet if we changed errgo to use gocheck, this would work | 01:47 |
thumper | davecheney: so... TestNew failes but TestNewf succeeds | 01:50 |
thumper | with gccgo | 01:50 |
davecheney | https://github.com/juju/errgo/pull/2 | 01:51 |
davecheney | updated | 01:51 |
davecheney | now with less contraversy | 01:51 |
davecheney | --- FAIL: TestNoteUsage (0.00 seconds) | 01:58 |
davecheney | errors_test.go:250: unexpected details: want "[{/home/dfc/src/github.com/juju/errgo/errorstest.go:38: annotate2} {/home/dfc/src/github.com/juju/errgo/errors_test.go:32: annotate1} {/home/dfc/src/github.com/juju/errgo/errors_test.go:29: some error}]"; got "[{/home/dfc/src/github.com/juju/errgo/errors_test.go:43: annotate2} {/home/dfc/src/github.com/juju/errgoj/errors_test.go:37: annotate1} {/tmp/go-build412244215/github.com/juju/errgo/_t | 01:58 |
davecheney | yup, that test fails on my branch with those adjustments | 01:58 |
* davecheney goes back to hunting wumpus' | 01:58 | |
thumper | davecheney: I'm pretty confused as to why TestNew fails but TestNewf succeeds | 01:59 |
davecheney | same | 02:00 |
davecheney | it calls the same damn methods | 02:00 |
thumper | yeah | 02:00 |
davecheney | fyi, % go test && go test -compiler=gccgo | 02:00 |
thumper | who do we know on gccgo that we can throw this at? | 02:00 |
* davecheney raises hands | 02:00 | |
davecheney | seriusly, it might be me | 02:00 |
thumper | handy to do that in one command | 02:00 |
thumper | heh | 02:00 |
davecheney | we did log a bug about this with the upstream | 02:00 |
davecheney | we == michael and me last year | 02:01 |
* davecheney searches | 02:01 | |
thumper | I think a key point would be to focus on that one use case | 02:01 |
thumper | TestNew vs TestNewf | 02:01 |
thumper | if we can work that out | 02:01 |
thumper | the rest should be simple | 02:01 |
thumper | I'm goint to write other emails... | 02:01 |
davecheney | roger | 02:01 |
davecheney | you're trained for that now | 02:01 |
davecheney | with your ceritificate | 02:01 |
thumper | heh | 02:02 |
thumper | mwhudson: you around? | 02:03 |
thumper | mwhudson: have you been poking gccgo too? | 02:04 |
davecheney | thumper: https://code.google.com/p/go/issues/detail?id=6835 | 02:04 |
mwhudson | thumper: not recently | 02:04 |
mwhudson | but i am here | 02:04 |
thumper | davecheney: yeah, read that one, and that is how I fixed the juju/errors work | 02:04 |
davecheney | thumper: bingo | 02:04 |
* thumper jumps on a different hangout | 02:04 | |
stokachu | is juju-core/errors being moved out of the tree? | 02:10 |
thumper | stokachu: it has been | 02:13 |
thumper | yes | 02:13 |
thumper | stokachu: to github.com/juju/errors | 02:13 |
stokachu | thumper: ah ok, go get was giving me errors | 02:13 |
thumper | no pun intended? | 02:13 |
stokachu | so i should be doing go get github.com/juju now? | 02:13 |
stokachu | doesn't look like the core bits are on github -- is this a migration in progress i take it? | 02:17 |
davecheney | stokachu: go get -u launchpad.net/juju-core/... will always pull in the correct dependencies | 02:18 |
davecheney | you should run godeps -u dependencies.tsv afterwards to set all the repos to their correct revisions | 02:18 |
stokachu | so go get -u fails to find launchpad.net/juju-core/errors | 02:18 |
stokachu | ran that a few minutes ago | 02:18 |
davecheney | that ios correct | 02:18 |
davecheney | that has been removed | 02:18 |
stokachu | ah lemme re-run then could be fast on the draw | 02:19 |
stokachu | i should probably stop messing with juju-core so late at night :X | 02:19 |
thumper | davecheney: haha, guess what? | 02:26 |
=== revagomes is now known as mGraf | ||
thumper | davecheney: I have a branch that uses gocheck, and all the tests pass with both compilers | 02:26 |
=== mGraf is now known as revagomes | ||
thumper | davecheney: https://github.com/juju/errgo/pull/4 | 02:28 |
davecheney | i cannot explain that | 02:29 |
davecheney | and it terrifies me | 02:30 |
=== revagomes is now known as mGraf | ||
davecheney | this is the difference between being called from a function or called from a method | 02:30 |
davecheney | which under the hood are EXACTLY THE SAME! | 02:30 |
=== mGraf is now known as revagomes | ||
davecheney | methods on types are just like static methods on C classes | 02:30 |
davecheney | there is no virtual dispact | 02:30 |
davecheney | dispatch | 02:31 |
thumper | mwhudson: which compiler do we use for juju on armhf and armel? | 02:31 |
thumper | davecheney: I know... | 02:31 |
mwhudson | thumper: gc | 02:31 |
mwhudson | i think | 02:31 |
thumper | davecheney: something screwy is happening | 02:31 |
davecheney | thumper: there is no supprt on armel | 02:31 |
mwhudson | thumper: we don't do anything for armel any more do we? | 02:31 |
davecheney | that is harm without a floating point unit | 02:31 |
thumper | kk | 02:31 |
davecheney | armhf, we use gc | 02:31 |
thumper | cheers | 02:31 |
davecheney | but gccgo is also known to work on linux | 02:31 |
davecheney | thumper: but not juju/errors does not pass | 02:32 |
=== revagomes is now known as mGraf | ||
thumper | huh? | 02:33 |
=== mGraf is now known as revagomes | ||
thumper | davecheney: pass here | 02:33 |
=== revagomes is now known as xauz | ||
davecheney | hmm, ok | 02:34 |
=== xauz is now known as revagomes | ||
* davecheney deletes things | 02:34 | |
thumper | davecheney: as expected, I bet that the core testing library is doing weird things, perhaps calling functions using reflect which may well be adding synthetic methods through gccgo | 02:35 |
thumper | with gocheck, those synthetic methods are so far up the stack we don't care | 02:35 |
davecheney | thumper: yes it does | 02:39 |
davecheney | the wya testing works is it builds a list of functions by name at compile time, then uses reflect to find those functions at run time an execute them | 02:39 |
davecheney | ok, i call lunch | 02:40 |
axw | wallyworld_: if I run TestInitiateReplicaSet in a loop inside the testing framework (i.e. no per-test SetUp/TearDown), I can reliably get it to fail on the bot - but not on my laptop | 02:45 |
axw | seems the bot is actually faster than may laptop | 02:46 |
davecheney | axw: lol | 02:46 |
wallyworld_ | hmmm | 02:46 |
wallyworld_ | at least it fails | 02:46 |
davecheney | thumper: [0] for some implementations of great | 02:47 |
davecheney | right, now I really am going for lunch | 02:53 |
waigani | wallyworld_: would you be able to have a look at this: https://codereview.appspot.com/87130045 | 03:06 |
waigani | fwereade has reviewed. Basically, he is happy if you're happy | 03:06 |
waigani | wallyworld_: I have to do school run now, so no rush | 03:06 |
wallyworld_ | ok | 03:06 |
waigani | cya :) | 03:06 |
wallyworld_ | l8tr | 03:06 |
wallyworld_ | axw: i have a fix for the trusty tests on CI https://codereview.appspot.com/99330043 | 03:28 |
axw | looking | 03:31 |
wallyworld_ | thank you | 03:33 |
menn0 | Do I have to worry about compatibility if I'm adding fields to the machine and unit status API responses? | 03:50 |
thumper | hmm... | 03:51 |
thumper | as long as the deserialization code can handle that they are missing | 03:51 |
thumper | you *should* be ok | 03:51 |
thumper | we know that during upgrades, the api server should be done first | 03:52 |
thumper | so an agent should never be a higher version than that api server | 03:52 |
menn0 | understood. | 03:52 |
thumper | however, the agent might not be as up to date as the server | 03:52 |
menn0 | I think I'll be ok as my change only affects the API server. it's exposing information that is already being reported but just wasn't available in the status response. | 03:55 |
menn0 | i'll check the api server / client mismatch issue to make sure there isn't a deserialization issue | 03:55 |
menn0 | as an aside: jam is working on versioning for the API isn't he? | 03:56 |
thumper | menn0: just emailed you leankit stuff | 04:05 |
menn0 | just saw it thanks | 04:05 |
menn0 | "After logging in for the first time, you will have to option to change this temporary password." | 04:10 |
menn0 | or not... :( | 04:10 |
thumper | menn0: have you found out where to change it yet? | 04:11 |
thumper | iirc it isn't entirely obvious | 04:12 |
menn0 | thumper: no. the UI mentioned in the help isn't there for me. I'm hovering over the Leankit logo in the top right and changing my password isn't available on the menu that appears. | 04:12 |
axw | wallyworld_: puttiing replSetInitiate in a retry loop does the trick | 04:12 |
thumper | menn0: priv msg :) | 04:13 |
wallyworld_ | axw: great, a bit hacky but it will server the purpose for now i reckon | 04:13 |
axw | wallyworld_: want me to look at the i386 tests? | 04:41 |
wallyworld_ | axw: yeah, that's the next highest priority, thanks | 04:45 |
wallyworld_ | it might turn into a "fix tools handling" exercise | 04:45 |
* axw nods | 04:46 | |
=== vladk|offline is now known as vladk | ||
=== vladk is now known as vladk|offline | ||
davecheney | axw: thanks for the review | 06:54 |
axw | davecheney: nps | 06:56 |
axw | always glad to be rid of another panic("unreachable") | 06:56 |
wallyworld__ | axw: i'm off to soccer, so have a good weekend. i'm part way through replacing LoggingSuite with BaseSuite and rewriting tests to avoid outgoing http. | 06:56 |
axw | wallyworld__: later, you too. I'm scratching my head at i386 test failures :) | 06:57 |
wallyworld__ | does seem like we should consider pluggin in basesuite when the suite is registered | 06:57 |
wallyworld__ | yeah, i didn't look too closely at the i386 faiures, looke dtools related | 06:58 |
davecheney | axw: can you clarify if we need to support 1.0 style unreachable stuff ? | 06:58 |
davecheney | I was under the understanding that we | 06:58 |
davecheney | a. did have to support precise | 06:58 |
davecheney | b. the version of Go in precise was not capable of compiling Juju | 06:58 |
davecheney | tf. our minimum is actually 1.1 | 06:58 |
axw | davecheney: yeah our minimum is 1.1 (we use 1.1.2 on the bot) | 06:59 |
davecheney | axw: right, in that case there are some more warnings I can address | 06:59 |
axw | bueno | 06:59 |
davecheney | multo gusti! | 06:59 |
axw | and yes we need to support precise. there was talk about moving to 1.2 (and may still), but precise only has 1.1.2 in the ppa right now | 07:00 |
davecheney | given that precise is built from a dependant ppa | 07:00 |
davecheney | and we have to support two compilers anyway | 07:00 |
davecheney | i vote for not shooting ourselves in the foot and having to support two versions of one compiler | 07:01 |
davecheney | that is, Go 1.2 across the board | 07:01 |
davecheney | both as the upper and lower bound | 07:01 |
axw | I would prefer that | 07:01 |
* davecheney will propose | 07:01 | |
davecheney | done | 07:08 |
davecheney | omg, goose bot merges things SO FAST | 07:15 |
voidspace | morning all | 07:52 |
fwereade | wallyworld__, ping | 07:58 |
=== ev_ is now known as ev | ||
fwereade | waigani, LGTM, just trivials | 08:44 |
=== vladk|offline is now known as vladk | ||
jam | fwereade: my thoughts exactly: "LGTM. The yuck of the reflection is more than balanced by the squee of | 10:14 |
jam | the external interface." | 10:14 |
jam | thanks for the reviews | 10:14 |
voidspace | for gccgo should we be testing with the packaged version (apt-get gccgo) or building from source, or something else (building/using a specific version)? | 10:25 |
jam | voidspace: gccgo is packaged on Trusty | 10:25 |
jam | outside of Trusty, you'll probably need to roll your own (or push us to get something into a PPA) | 10:26 |
voidspace | ah, and in the next thread David says "gccgo-4.9" | 10:26 |
voidspace | I'm on trusty | 10:26 |
voidspace | jam: thanks | 10:26 |
jam | voidspace: yeah, the gccgo in trusty is good enough for working with. | 10:26 |
jam | It *is* being used in anger for the ppc64 ports. | 10:26 |
jam | and amd64 | 10:26 |
voidspace | fwereade: you wanted to be pinged about rsyslog-ca-cert in wwitzel3's branch - which is also my branch | 10:27 |
voidspace | jam: yeah, there's a thread that says we should be testing with it | 10:27 |
voidspace | fwereade: so we had a big discussion about this issue (is watching APIHostPorts alone sufficient or not)? | 10:28 |
voidspace | fwereade: and no-one wanted to commit to an answer, but the consensus seemed to be | 10:28 |
voidspace | fwereade: if we're treating the rsyslog config entries as "immutable once set" then watching APIHostPorts alone to trigger rsyslog config rewriting should be enough | 10:29 |
voidspace | fwereade: and it works for the scenarios we've manually tested | 10:29 |
voidspace | non-HA with unit deployed, HA without units, HA then units deployed, non-HA with units deployed then ensure-availability | 10:29 |
voidspace | rsyslog config is rewritten in all these cases and logging happens correctly | 10:29 |
voidspace | fwereade: so the only wrinkle would be if the rsyslog config can be written out *before* the certificate is set for the first time on bootstrap | 10:30 |
voidspace | fwereade: in which case it wouldn't be rewritten | 10:30 |
voidspace | fwereade: when we asked nobody thought that was likely, but no-one would *commit* to it being impossible | 10:30 |
voidspace | fwereade: however "they" (jam and natefinch) did think that if we're treating the rsyslog config as "immutable once set" then watching just APIHostPorts *should* be sufficient | 10:31 |
voidspace | so that's what we did | 10:31 |
vladk | jam: hangout | 10:47 |
jam | vladk: I'm not actually "working" today | 10:48 |
jam | its my weekend | 10:48 |
TheMue | vladk: here | 10:54 |
wwitzel3 | hello | 11:03 |
voidspace | wwitzel3: hey, hi | 11:03 |
voidspace | wwitzel3: there were some comments on the mp from fwereade | 11:04 |
voidspace | wwitzel3: I replied | 11:04 |
voidspace | wwitzel3: one thing we forgot - we made GetRsyslogConfig return HostPorts | 11:04 |
voidspace | wwitzel3: the reason for that is so that the templates can use host-port pairs rather than host plus global port | 11:04 |
voidspace | wwitzel3: but we didn't change the template rendering code to do that | 11:04 |
voidspace | wwitzel3: I've made a start on that (whilst also starting some more manual testing against canonistack and reading William's architecture doc) | 11:05 |
voidspace | wwitzel3: nothing to push yet | 11:05 |
voidspace | wwitzel3: we can probably lose the global port on the RsyslogConfigParams then | 11:05 |
voidspace | but you arrived (as always) just as I need coffee) | 11:06 |
voidspace | natefinch: morning | 11:06 |
davecheney | this is a lie | 11:07 |
davecheney | it is not morning for natefinch | 11:07 |
voidspace | davecheney: it's *always* morning on the internet | 11:07 |
natefinch | +1 | 11:09 |
natefinch | also, yes, it is morning :)( | 11:10 |
natefinch | morning davecheney :) | 11:10 |
wallyworld__ | fwereade: hi, was at soccer, back now | 11:14 |
fwereade | wallyworld__, er, what did I want | 11:14 |
fwereade | wallyworld__, oh yes: are you doing git things? | 11:14 |
wallyworld__ | yes, sorta | 11:14 |
fwereade | wallyworld__, ie landing bot change etc | 11:14 |
fwereade | wallyworld__, can I put the use-go-1.2 stuff on your plate then please? | 11:14 |
wallyworld__ | i have a repo that i've migrated to github https://github.com/wallyworld/core | 11:15 |
wallyworld__ | and i'm working with curtis to get the landing bot sorted out | 11:15 |
wallyworld__ | sure | 11:15 |
wallyworld__ | so we want the bot to use go 1.2? | 11:15 |
wallyworld__ | fwereade: also, i'd like a meeting with you first thing your monday AM to talk about storage, would that be ok? | 11:16 |
fwereade | wallyworld__, sure | 11:17 |
wallyworld__ | ok, just ping me when you're online | 11:17 |
fwereade | wallyworld__, will do | 11:18 |
mattyw | natefinch, myself and tasdomas are available to help with ha, let me know when would be a good time to grab your for a chat about it | 11:21 |
natefinch | mattyw: cool, let me bring up the docs | 11:29 |
fwereade | voidspace, wwitzel3: is anyone free to briefly educate me on rsyslog-ca-cert, where it came from, why it exists, etc? | 11:29 |
fwereade | voidspace, wwitzel3: I suspect it interacts with stuff cmars is doing at the moment but I don't really have a clear picture of how it all ends up interacting | 11:30 |
fwereade | voidspace, wwitzel3: in particular I'm +1 on separate certs for separate services, but less convinced that we need a different ca cert for rsyslog, unless we're thinking of setting up external rsyslog targets | 11:31 |
fwereade | voidspace, wwitzel3: and even then *we* wouldn't be generating server certs from it? | 11:31 |
natefinch | mattyw: sorry, my daughter detected I might get work done and woke up. It'll be an hour or so for my wife to wake up and be ready to take her, so probably don't wait for me for right now | 11:39 |
mattyw | natefinch, ok no problem, I'll take the time to sort my little on out as well :), just ping me when you're ready | 11:40 |
natefinch | mattyw: cool | 11:41 |
voidspace | fwereade: we already have these certs, so no I'm not able to educate you on why we have it :-) | 11:49 |
voidspace | I have to go on lunch | 11:49 |
voidspace | meeting a friend | 11:49 |
voidspace | but I'll be back soonish | 11:49 |
fwereade | voidspace, np, enjoy, I will go hunting | 11:49 |
voidspace | ta, see you all soon | 11:50 |
* bodie_ pings fwereade -- going to slice that commit back down to what you'd mentioned and get it in this morning :) | 12:28 | |
fwereade | bodie_, don't feel you have to, go ahead and propose as it is if you like -- you can slice bits out while I take a first look if you like | 12:32 |
TheMue | lunchtime | 12:38 |
perrito666 | TheMue: I will not lunch at 9 am :p | 12:38 |
bodie_ | on that note fwereade and jcw4 -- the interface{} option for gojsonschema is looking for a raw JSON string. I think it's appropriate to transform the unmarshaled YAML map into a JSON string to check whether it conforms to JSON-schema, but I'm not positive what the behavior will be like (whether it will, e.g., silently truncate nonconformant values from the map) | 12:50 |
fwereade | bodie_, huh, that's really bizarre, Iwonder why on earth they would do that | 12:51 |
fwereade | bodie_, https://github.com/xeipuuv/gojsonschema/blob/master/schemaDocument.go :66 seems to imply it can handle map[string]interface{} at least for schemaDocument | 12:53 |
bodie_ | I could be misinterpreting something, but when I try to "smush" the unmarshaled YAML into the gojsonschema loader, it's saying it "must be a jsonReference string or Json as map[string]interface{}" | 12:53 |
fwereade | bodie_, if we *have* to go via json we could, I guess, but I think it's a last resort | 12:54 |
fwereade | bodie_, I think map[string]interface{} is nice for us all around though | 12:54 |
bodie_ | I agree | 12:54 |
bodie_ | I could be misinterpreting the error, too, or it could be happening for a different reason | 12:54 |
fwereade | bodie_, we could use the juju-core/schema package to coerce that stuff into map[string]interface{} on ingest | 12:54 |
fwereade | bodie_, I suspect it's because it's map[interface{}]interface{} until it's coerced? | 12:55 |
* bodie_ ponders | 12:55 | |
bodie_ | it's probably a silly type issue | 12:57 |
bodie_ | right now an Actions is just an alias for map[string]interface{} but perhaps it doesn't know how to unmarshal yaml into that alias | 12:57 |
bodie_ | either way I need to really cut down the scope on this | 12:57 |
bodie_ | if you'd like to have a look it's here -- https://code.launchpad.net/~binary132/juju-core/charm-actions | 12:58 |
bodie_ | the problem code is here http://bazaar.launchpad.net/~binary132/juju-core/charm-actions/revision/2736 | 13:01 |
bodie_ | actually, if anyone has input on that, it would be welcome. I suspect it's to do with unmarshaling to "actions" and attempting to do NewJsonSchemaDocument on "actions" which is of type ... Actions map[string]interface instead of directly on such a map | 13:02 |
fwereade | bodie_, "Actions" doesn't sound quite right for that type anyway | 13:02 |
bodie_ | that's the type formerly known as ActionsSpec... lol | 13:03 |
bodie_ | it's a charm's Actions | 13:03 |
fwereade | bodie_, giving whatever encloses it a "schema" field of type map[string]interface{} seems like a perfectly reasonable thing to unmarshal the yaml into, then you should be able to hand over to gojsonschema directly, I think | 13:03 |
fwereade | bodie_, I don't think the whole set of actions wants to be a schema, does it? | 13:04 |
bodie_ | rather a <action_name>.yaml for each action in the charm? | 13:04 |
bodie_ | an* | 13:04 |
fwereade | bodie_, we want a map[name]ActionSpec or something, in which an ActionSpec has name, description, schema (or something roughlylike that anyway, I think) | 13:05 |
fwereade | bodie_, yeah, actions.yaml seems like a nice way to express it | 13:05 |
bodie_ | well the idea was to define the loosest possible schema, but a sane charm would have its top level keys be the names of actions | 13:05 |
fwereade | bodie_, not sure, don't we want `actions: {...}` at the top level for forward compatibility? | 13:06 |
fwereade | bodie_, otherwise there's nowhere nice to tack on a version field if (when ;)) we need it | 13:06 |
fwereade | bodie_, (but yeah we don't want name explicitly I guess, that can come from the map keys, ofc) | 13:07 |
bodie_ | presumed version would be for the entire charm? | 13:07 |
bodie_ | if you change the actions, that ought to increment the charm version | 13:08 |
fwereade | bodie_, no, I mean the format of the actions.yaml file itself | 13:08 |
fwereade | bodie_, I have yet to see a v1 of a format that never needed to be changed ;p | 13:08 |
bodie_ | hehe | 13:08 |
fwereade | bodie_, (given a year of two if usage anyway) | 13:08 |
bodie_ | my assumption here was that our goal is to permit the charmer to define his actions spec however he pleases, as long as it's "some kind of" json-schema | 13:10 |
bodie_ | I'm not grasping what you're envisioning | 13:10 |
fwereade | bodie_, well, we need stuff that juju can interpret -- the name comes from the map key, but we want a description; we'll need a field defining the target (service/unit) even if that's implicitly unit for now; probably we'll want something else at some point, eg is it valid to run it in an error state, etc etc | 13:14 |
fwereade | bodie_, then we need another field containing the jsonschema stuff that we use to validate the payload when the action actually gets queued/run | 13:15 |
bodie_ | interesting | 13:15 |
bodie_ | so almost like a schema with an args sub-schema | 13:15 |
bodie_ | the top-level schema being the one WE perform checks against | 13:16 |
fwereade | bodie_, http://paste.ubuntu.com/7472971/ | 13:17 |
fwereade | bodie_, yeah, exactly | 13:17 |
bodie_ | fwereade, to play Devil's advocate, it seems to me like we want to give charmers that ability as a "manual" mode as it were, where we assume defaults if the top-level keys don't match a set we check for | 13:22 |
bodie_ | a more permissive spec could still enable the functionality you're describing while not enforcing a strict format | 13:23 |
fwereade | bodie_, well, we still need a reliable place to add our own fields, right? | 13:24 |
fwereade | bodie_, what are you envisioning? just a top-level dict of name to schema? | 13:24 |
bodie_ | for actions.yaml or for Charm's Actions? | 13:25 |
fwereade | bodie_, what's the distinction between the two? actions.yaml is a serialisation format for a charm's actions definition | 13:27 |
fwereade | bodie_, but I guess I'm talking about actions.yaml | 13:27 |
fwereade | bodie_, I'm just not really considering a hard separation between the charm representation and the in-memory one | 13:27 |
fwereade | bodie_, they won't look exactly the same, that's what our reading code will handle | 13:28 |
bodie_ | I see, what you were saying about having a sub-spec got me thinking that perhaps if there's no encapsulating spec in the user's actions.yaml, we have a default map in the memory representation, something like {actions: {spec: {...}, version: {...}, ...}} | 13:31 |
bodie_ | i.e. if the user doesn't match our schema, we just dump his or her schema into the "spec" subkey of our actions dict | 13:31 |
fwereade | bodie_, I think we can ignore extra keys for forward compatibility's sake, but we really want to be storing it as a type | 13:32 |
fwereade | bodie_, type Actions struct { Actions map[string]Action } | 13:32 |
fwereade | bodie_, type Action struct { Name string; Description string; Schema map[string]interface{} } | 13:33 |
fwereade | bodie_, sort of thing | 13:33 |
fwereade | bodie_, am I making sense? would a hangout help? | 13:34 |
bodie_ | it's a little crazy here right now, michelle just discovered we have a small ant infestation. I need to process for a minute... | 13:34 |
perrito666 | bodie_: ouch, buy a ton of ant gel, that usually works charms | 13:35 |
wwitzel3 | yeah, the gel works nicely because they take it back with them | 13:37 |
bodie_ | we had awesome results at my old place with this chalk that kills them if they cross it | 13:39 |
bodie_ | it's got to be a high-grade neurotoxin, I'm sure, probably wreaking havoc on my DNA | 13:39 |
bodie_ | bet you there's a super easy way to do it | 13:41 |
bodie_ | woops, wrong channel | 13:41 |
natefinch | bodie_: we're having an ant problem here, too, I can sympathize | 13:42 |
bodie_ | let's see | 13:42 |
bodie_ | I've heard there's basically one massive hive that extends from Mexico to Canada | 13:42 |
bodie_ | haven't seen them like that back East | 13:42 |
bodie_ | that was mortal combat.... | 13:42 |
bodie_ | fwereade, you're making sense but I was under the impression we should be parsing and storing the info more as a schemaless blob | 13:43 |
bodie_ | that perhaps the way we'd been doing it (parsing out a spec for each action) was too restrictive and we simply were to let the charmer define the schema according to his or her preference | 13:43 |
bodie_ | so, I'm continuing to have a really hard time understanding which way is preferable (blob versus more detailed parsed map) | 13:44 |
bodie_ | it's very challenging to make progress on this when I feel both ways are nixed in favor of the opposite... heh | 13:45 |
natefinch | bodie_: I had thought the blob was better, but I forgot about the GUI - we need to be able to support people setting values in there without having to type out json in a big text field | 13:45 |
bodie_ | but I want to understand the reasoning and goals so I can move forward | 13:45 |
bodie_ | yes -- which means that shouldn't the Charm's Actions map be a valid JSON-schema and perhaps not more? | 13:45 |
fwereade | bodie_, but we need metadata that juju can interpret cleanly | 13:46 |
fwereade | bodie_, and expose parts of it to the user | 13:46 |
fwereade | bodie_, users will need a rough description of what a given action will do | 13:46 |
fwereade | bodie_, and juju itself will need to know what the action's target is | 13:47 |
bodie_ | I'm getting this tattooed on my arm.... ;) | 13:47 |
bodie_ | OK, that makes good sense | 13:48 |
fwereade | bodie_, actions.yaml itself thus needs to have the data that we (or our users) need in some standard format so we can find it and use it | 13:48 |
fwereade | bodie_, and even the params schema itself has structure, it's just that we can hand over the interpretation of that part of the structure to gojsonschema | 13:48 |
fwereade | bodie_, of the parts that we need to interpret, we don't want to just store a map unless we really have to -- an actual struct with typed fields is far preferable for our own use in code | 13:49 |
bodie_ | yes, that also makes sense | 13:49 |
fwereade | bodie_, of the parts that gojsonschema needs to interpret, a map[string]interface{} is a format that goes well with gojsonschema | 13:50 |
perrito666 | hey agent/mongo/mongo.go has a noauthCommand that is not tested nor used anywere anybody knows what it does? (running blame now) | 13:50 |
perrito666 | ahh it is used sorry | 13:50 |
perrito666 | I missgreped | 13:50 |
perrito666 | :p | 13:50 |
bodie_ | fwereade, my question then is whether we want to enforce that {{metadata}, {actions}} form as the expectation for the charmer's actions.yaml | 13:51 |
bodie_ | or whether something that doesn't conform should instead be assumed to be the {actions} bit | 13:51 |
fwereade | bodie_, I think that if an actions.yaml exists, but it doesn't conform to our expectations, we reject the whole charm as invalid | 13:52 |
fwereade | bodie_, and that applies also to the jsonschema bits -- if it's not a valid json-schema, the file is not valid and so the charm is not valid | 13:53 |
bodie_ | (fwereade++)++ | 13:54 |
voidspace | hah, all my canonistack instances have "disappeared" | 13:54 |
voidspace | that's why juju status was hanging | 13:54 |
voidspace | natefinch: now you're just being *too smart* :-) | 13:59 |
wwitzel3 | voidspace: ship it | 13:59 |
voidspace | wwitzel3: hah, it shipped itself | 13:59 |
natefinch | voidspace: heh | 13:59 |
voidspace | somewhere else | 13:59 |
voidspace | I still have moonstone standup in the calendar twice | 14:02 |
natefinch | voidspace: you have to delete the one off your personal calendar yourself | 14:03 |
voidspace | natefinch: ah right | 14:03 |
voidspace | natefinch: in which case I don't care | 14:03 |
natefinch | fwereade: There's a card about a dead state machine that is replaces by ensure availability, if that machine comes back to life, it should have no vote and no API. I get the no vote part, but I'm not sure why we'd need to remove the API. | 14:34 |
natefinch | fwereade: Seems like running an API is independent of your vote status... and there's very little drawback to having more API servers. | 14:35 |
fwereade | natefinch, mainly just because we don't have a model-level distinction between state server and api server, and until we can express that in the model I think we'll have problems | 14:35 |
fwereade | natefinch, I'm +1 on allowing more api servers in the fullness of time but I don't thin kwe're there yet | 14:35 |
natefinch | fwereade: that's cool | 14:36 |
natefinch | fwereade: makes sense... no need for a state server in some weird in between state | 14:36 |
fwereade | natefinch, yeah, exactly | 14:36 |
fwereade | natefinch, we did at one stage draw the distinction, but since it was a distinction without a difference people drew all sorts of random inferences and removing it was a win | 14:37 |
=== vladk is now known as vladk|offline | ||
perrito666 | man, these hangouts really overheat my computer | 14:49 |
jcw4 | fwereade: 2 quick questions if you haven't started the weekend yet :) | 15:05 |
fwereade | jcw4, sure :) | 15:05 |
jcw4 | 1) we're moving AddAction to the Unit ... but I think the collection stays where it is on state | 15:06 |
jcw4 | and unit just finds it using prefix | 15:06 |
fwereade | jcw4, yep | 15:07 |
jcw4 | 2) in cleanup, I can cleanup all actions with the Dead unit prefix in one Txn right in the cleanup method | 15:07 |
jcw4 | no need to call some method on Unit for each Action | 15:07 |
jcw4 | make sense? | 15:08 |
natefinch | mattyw: sorry, ended up doing a bunch of other stuff, but on the up side, I think I found something bite sized for you and domas to work on, if you wanted to try pairing on a problem. | 15:08 |
jcw4 | fwereade: sort of how the cleanup of relations is working | 15:09 |
jcw4 | obviously not exactly the same | 15:09 |
=== vladk|offline is now known as vladk | ||
fwereade | jcw4, yeah, agreed | 15:11 |
jcw4 | fwereade: cool. tx | 15:12 |
fwereade | jcw4, so long as we assert the unit is not dead on action-add, we can be sure that no additional ones can be created after the cleanup was scheulded | 15:12 |
jcw4 | fwereade: +1 | 15:12 |
=== vladk is now known as vladk|offline | ||
mattyw | natefinch, sorry - only just saw your message - go ahead | 15:30 |
mattyw | natefinch, have I lost you again? | 16:02 |
jam | fwereade: for Use RegisterStandardFacade, a thought occurs to me. We could still track the exact type being returned, and do introspection on it early | 16:05 |
jam | we change Register to require a reflect.Type object along with the factory | 16:05 |
jam | and RegisterStandardFacade pulls that out of the appropriate slot. | 16:05 |
perrito666 | mattyw: iirc, he was leaving for a moment but returning | 16:05 |
jam | That would let us determine all methods that are exposed in the API without having to construct them | 16:05 |
* jam goes to take his son to bed | 16:06 | |
perrito666 | mattyw: I can give you the headstart on what was the task | 16:06 |
mattyw | perrito666, ok great | 16:06 |
perrito666 | mattyw: iirc, we said that, there would be benefit in obtaining a better output from ensure-availability, wwitzel3 correct me if I am wrong | 16:09 |
mattyw | perrito666, better output? | 16:11 |
perrito666 | mattyw: mm, let me explain this | 16:24 |
perrito666 | but first, I need to restart my router | 16:24 |
natefinch | mattyw: sorry... back again | 16:28 |
mattyw | natefinch, no problem | 16:29 |
natefinch | mattyw: there's a command ensure-availability which sets up HA for the state servers, making sure you have at least the number of state servers available specified (for example juju ensure-availability -n 3). Right now the command ends with no output, and the API doesn't return anything useful. | 16:29 |
natefinch | mattyw: we want the api and the command line to output the actions that were taken as a result of the command (for example, added machine 5, added machine 6) | 16:30 |
mattyw | natefinch, the only parts of core I've spent an time with have been the commands and api so it sounds like a something I would be able to do | 16:31 |
natefinch | mattyw: ahh, that works out | 16:32 |
mattyw | natefinch, it's nearly my eod but I'll start work on it on monday | 16:32 |
natefinch | mattyw: cool, I'll try to write up some more about it and send in email. Thanks again for the help. | 16:33 |
mattyw | natefinch, no problem, our standups are at the same time as yours, but I'll try to pop along to yours on monday if I've made some progress | 16:34 |
natefinch | mattyw: ok | 16:35 |
mattyw | natefinch, if you can send more in an email as well that would be great | 16:35 |
natefinch | mattyw: will do | 16:36 |
=== Ursinha is now known as Ursinha-afk | ||
=== Ursinha-afk is now known as Ursinha | ||
perrito666 | mattyw: well natefinch did explain that much better than I | 16:50 |
voidspace | right, EOW | 17:52 |
voidspace | see you all on Monday | 17:52 |
perrito666 | mm, a proper markup would have been EOD, EOW | 17:53 |
perrito666 | :p | 17:53 |
=== vladk|offline is now known as vladk | ||
=== revagomes is now known as mGraf | ||
=== mGraf is now known as revagomes | ||
dannf | trying to get juju to bootstrap a really slow (simulated) system. i increased timeouts in various places, but now its timing out setting up mongo: | 19:18 |
dannf | 2014-05-16 19:07:08 ERROR juju.cmd supercommand.go:304 can't dial mongo to initiate replicaset: no reachable servers | 19:18 |
dannf | i tried bumping up mongoSocketTimeout and defaultDialTimeout, but that doesn't seem to give it any extra patience | 19:18 |
natefinch | dannf: There's a 10 minute connection timeout that is hard coded in the code (which we actually want to fix, but haven't gotten to). That's probably the problem. | 19:43 |
dannf | natefinch: yeah - i'm hacking the code, so i can do a test build. i up'd both mongoSocketTimeout and defaultDialTimeout - is this a different one? | 19:44 |
dannf | right now i'm trying setting FastFail to false in the dials struct to see if that helps | 19:45 |
dannf | its timing out faster than 10minutes | 19:45 |
natefinch | dannf: ahh, hmm, if it's faster than 10 minutes then I'm not sure | 19:45 |
dannf | http://paste.ubuntu.com/7474646/ | 19:46 |
dannf | it does fail in about 10 minutes - but seems like it stopped retrying before then | 19:47 |
natefinch | dannf: I know we've had a mystery 10 minute timeout that we haven't been able to figure out before, this seems like it's hitting the same problem. | 19:49 |
natefinch | dannf: you're welcome to create a bug for it, I think it would be helpful to have a way to track the problem (or I can make one if you prefer) | 19:55 |
dannf | natefinch: ack; yeah, i'll create one | 19:57 |
=== vladk is now known as vladk|offline |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!