[00:26] <anastasiamac> axw: ping
[00:28] <wallyworld> babbageclunk: bug 1688635 fwiw
[00:28] <mup> Bug #1688635: 'max-logs-age' panic on bootstrap with lxd provider <juju:In Progress by 2-xtian> <https://launchpad.net/bugs/1688635>
[00:36] <babbageclunk> wallyworld: ok, thanks
[00:36] <wallyworld> babbageclunk: i may have a slightly different solution, just looking into it now
[00:37] <babbageclunk> wallyworld: cool, let me know how it goes.
[00:42] <wallyworld> babbageclunk: yep, i will do a fix elsewhere
[00:43] <babbageclunk> wallyworld: ah, ok - so I don't need to think about config at all then?
[00:43] <wallyworld> no
[00:45] <wallyworld> babbageclunk: was a 3 or 4 line fix, just writing a test
[00:46] <babbageclunk> awse
[00:48] <thumper> babbageclunk: https://github.com/juju/juju/compare/develop...howbazaar:separate-log-dbs?expand=1 updated, I'm heading out for lunch, will test more when I get home.
[01:08] <wallyworld> thumper: was a simple fix, just had to change how restore constructed controller config. Using New() fills in any defaults https://github.com/juju/juju/pull/7442
[01:09] <wallyworld> or babbageclunk ^^^^ if thumper has run away
[02:30] <thumper> babbageclunk: my brach had a bug
[02:30] <thumper> will update
[02:30] <babbageclunk> thumper: ok - luckily I haven't looked at it yet!
[02:30] <babbageclunk> thumper: just sorting out tests for pruning.
[02:54] <thumper> babbageclunk: I'm testing the upgrade test now
[02:54] <thumper> manually
[02:54] <babbageclunk> thumper: cool.
[02:55] <babbageclunk> thumper: do you know whether there's a way to pass a yaml file to model-default or model-config (the way you can to --config or --model-default at bootstrap time)?
[02:55] <thumper> no sorry
[02:56] <babbageclunk> see veebers it's thumper's fault
[02:56] <veebers> babbageclunk: hah :-)
[02:59] <babbageclunk> thumper: also a question from veebers that I don't know the answer to: do you do the model-default sub command on the controller or the model itself?
[03:00] <babbageclunk> thumper: and: does setting model defaults after a  model has been created update the config on that created model?
[03:00] <babbageclunk> I also would like to know the answers to these Qs
[03:00] <thumper> model-defaults are set at bootstrap time
[03:01] <thumper> not sure if they can be set after that...
[03:02] <babbageclunk> thumper: there's a model-defaults command that works just like model-config except presumably it sets defaults. But I don't really understand what it does if it's not working on the controller.
[03:02] <thumper> it probably is working just on the controller'
[03:03] <thumper> also, if you have a model and update the defaults
[03:03] <thumper> I'm not sure if the defaults are re-propagated, wallyworld probably does though
[03:03] <wallyworld> say wot
[03:03] <wallyworld> model defaults are used when add models
[03:04] <wallyworld> adding
[03:04] <wallyworld> the new model config is seeded from the defaults
[03:05] <babbageclunk> wallyworld: yeah, but the model-defaults command can take a model - what's that about?
[03:05] <veebers> wallyworld: so if I bootstrap and have a default model, then set the model-defaults, that default model won't have the defaults?
[03:05] <veebers> wallyworld: but if I add a model after that, the new model will?
[03:06] <wallyworld> babbageclunk: what do you mean "can take a model"? it's a controller command IIANM
[03:06] <wallyworld> veebers: correct, the model defaults are not inherited but copied
[03:07] <wallyworld> veebers: once a model is added, that's it
[03:07] <wallyworld> it has its own config
[03:07] <veebers> wallyworld: ok thanks.
[03:07] <babbageclunk> wallyworld: Ah, you're right! But the examples include a -m version. Which was blowing my tiny mind, 'specially on a Friday afternoon.
[03:07] <babbageclunk> I'mm'a push a fix for that.
[03:08] <veebers> babbageclunk, wallyworld I think that means I have a way forward with the log-forwarding test, gonna try now
[03:08] <wallyworld> babbageclunk: whomever wrote those examples should be shot. hope it wasn't me
[03:08]  * babbageclunk runs a git praise
[03:08] <wallyworld> whew
[03:08] <wallyworld> not me!
[03:09] <babbageclunk> You're safe for now!
[03:11] <thumper> hmm...
[03:11] <thumper> my testing rendered my controller non-responsive
[03:12] <babbageclunk> wallyworld: also, what does it mean to specify a cloud/region for that command?
[03:13] <wallyworld> babbageclunk: different cloud regions can have different defaults, eg proxy
[03:13] <wallyworld> or apt mirror
[03:13] <babbageclunk> wallyworld: but how can a controller have different clouds or regions? Oh, is this a jaas thing?
[03:14] <wallyworld> for a model, if there's no clud region default, it will lookto use a model default sans region
[03:14] <wallyworld> we now support models in differnet region in a sinle controller
[03:14] <wallyworld> the underlying cloud has to be the same for wach model
[03:14] <babbageclunk> wallyworld: oh right, ok - that makes sense. thanks!
[03:15] <wallyworld> np
[03:15] <babbageclunk> thumper: that sounds bad
[03:15] <thumper> yeah, investigating
[03:15] <thumper>  /var/lib/juju/db/collection-69--8034483712429095609.wt: handle-write: pwrite: failed to write 4096 bytes at offset 4849664: No space left on device
[03:16] <thumper> which is weird, because there is space now...
[03:17] <babbageclunk> thumper: and we're only talking ~300M of data right?
[03:17] <thumper> ah
[03:17] <thumper> my zfs system is full
[03:17] <babbageclunk> doh
[03:17] <thumper> I had some old machines lying around
[03:17] <thumper> not sure where they are from
[03:18]  * thumper cleans up
[03:18]  * babbageclunk fights the urge to talk about atm machines and pin numbers.
[03:19] <veebers> wallyworld, babbageclunk: should I be concerned if I see this: WARN  juju.cmd.juju.model defaultscommand.go:592 key "syslog-ca-cert" is not defined in the known model configuration: possible misspelling
[03:20] <wallyworld> we shouldn't see that. it's likely noise but should not be printed
[03:20]  * thumper starts again
[03:21] <wallyworld> if everything works, it's worth a bug
[03:23] <babbageclunk> wallyworld: maybe I need to add it somewhere? Odd though - I didn't change the config settings.
[03:23]  * thumper taps fingers waiting
[03:24] <wallyworld> babbageclunk: there is a check that what the user types belongs to the config schema; not sure off hand why that attr didn't pass muster
[03:24] <babbageclunk> thumper: are your latest changes in your branch? I'll start pulling them optimistically.
[03:24] <thumper> babbageclunk: let me push
[03:25] <thumper> babbageclunk: there now
[03:27] <babbageclunk> thumper: thanks
[03:32] <thumper> oh yeah...
[03:32] <thumper> machine sluggish now
[03:33] <thumper> load over 10, CPU over 70% of every core
[03:33] <thumper> 1323 M of log collection data
[03:34] <thumper> pruning cuts in every 5 minutes
[03:34] <thumper> so I'll wait for that then run the upgrade
[03:36] <babbageclunk> thumper: Removing version - how far should I go? Take it off params.LogStreamRecord too? I think that's ok, api-versioning-wise - logstream's only used from workers in the controller.
[03:36] <thumper> babbageclunk: I think so
[03:37] <babbageclunk> thumper: book
[03:37] <veebers> babbageclunk, wallyworld: Hmm, that didn't work. Have you confirmed this manually? I might be missing some step
[03:37] <wallyworld> i haven't tested, xtian has
[03:38] <babbageclunk> veebers: I haven't tested that though, only at bootstrap time. I'll try it now, hang on.
[03:38] <veebers> babbageclunk: ah, I might not be setting logforward-enabled on the model
[03:39] <veebers> babbageclunk: only on the controller
[03:39] <babbageclunk> veebers: that should do it - that has to be enabled for each model.
[03:39] <veebers> babbageclunk: let me try again
[03:39] <babbageclunk> veebers: although if it's enabled in defaults then it will be for new models.
[03:40] <veebers> babbageclunk: right, need to check that's what I need in the test or if the timing of the start of forwarding is important
[03:43] <thumper> hmm...
[03:43] <thumper> why isn't log pruning happening
[03:44] <babbageclunk> thumper: hmm, version's needed by logforwarding - it goes into the origin for juju in the syslog - I guess I can still rip it out and just have the forwarder add version as it writes to the syslog.
[03:45] <axw> wallyworld thumper: https://private-fileshare.canonical.com/~axw/lp1677434-jujud.tar.xz <- contains the presence and status history fixes on top of 2.1, with version set to 2.1.2
[03:45] <thumper> axw: I think they are on 2.1.3
[03:45] <thumper> hmm...
[03:46] <thumper> well they should be as that is the security release'
[03:46] <axw> thumper: the bug says 2.1.2
[03:46] <babbageclunk> thumper: is your system a bastardised one with your split logs collections? pruning might be a bit bung.
[03:46] <thumper> huh
[03:46] <thumper> you are right
[03:46] <thumper> babbageclunk: no, 2.1.2
[03:47] <thumper> what was the log size? I thought it was 300 meg
[03:47]  * babbageclunk shrugs then
[03:48] <babbageclunk> thumper: ripping version out is getting a bit intense, I'm going to park it for now and hopefully do it later.
[03:48] <axw> thumper: if it turns out they're running a newer version, they can drop a FORCE-VERSION file into the same dir as jujud
[03:48] <thumper> babbageclunk: ack
[03:48] <thumper> axw: ack
[03:50] <thumper> oh fuck
[03:50] <thumper> default max is 4 gig
[03:50]  * thumper isn't going to fill that
[03:50] <thumper> hmm...
[03:50]  * thumper looks again
[03:51] <thumper> ugh... should be ok
[03:51]  * thumper makes more logs
[04:00] <veebers> babbageclunk: on closer inspection, some log forwarding was always working, it's just the added model that's not. I'm checking now
[04:00] <veebers> ah, possible that it needs to be enable specifically
[04:00] <thumper> ok... over 4G of logs
[04:00] <thumper> this should be a good test for upgrade step
[04:09] <babbageclunk> veebers: ok, that sounds good.
[04:14] <thumper> babbageclunk: took 7 minutes
[04:14] <thumper> but it successfully split the logs into 5
[04:14] <thumper> and that was for 4G of logs
[04:14] <thumper> which is the default max of 2.1.2
[04:15] <thumper> now for other interesting bits
[04:15] <thumper> on 4.4G of logs indexes were 89M
[04:15] <thumper> now with the split
[04:15] <thumper> we have...
[04:15]  * thumper queries and adds up
[04:19] <thumper> meh...
[04:19] <thumper> doesn't seem to be that much different in size to be honest
[04:19] <thumper> but faster to clean up
[04:20] <babbageclunk> thumper: Hmm, is there any way we can make it resilient to crashing half-finished? Find the max id in any of the child collections and start from there, maybe?
[04:20] <thumper> babbageclunk: for the upgrade?
[04:20] <babbageclunk> thumper: yup
[04:20] <thumper> babbageclunk: if it crashes half way through it hasn't "upgraded" so agent.conf isn't updated
[04:21] <thumper> next time it starts, it will run the upgrade steps again
[04:21] <thumper> which will just continue
[04:21] <babbageclunk> right, but will we get double-ups in the child log tables?
[04:21]  * thumper thinks...
[04:21] <thumper> yes
[04:21] <thumper> but the'll get pruned
[04:21] <thumper> if it does crash...
[04:22] <thumper> minor problem with dupes
[04:22] <thumper> for a while
[04:22] <thumper> the "correct" way would be to remove each doc as it is moved
[04:22] <thumper> will probably double the time for the upgrade
[04:22] <thumper> but more resiliant to failure
[04:23] <babbageclunk> thumper: but I think finding the latest id in any of the child collections would work too, wouldn't it? Or at least restrict double ups to the time it was up to at the crash.
[04:24] <thumper> are object ids strictly sortable?
[04:25] <babbageclunk> thumper: no, I don't think so in the general case, unless you know they were only generated in one machine
[04:29] <thumper> babbageclunk: actually, perhaps we should batch removals?
[04:29] <thumper> babbageclunk: it would minimise restart dupes
[04:30] <thumper> but also limit the doubling of logs during migration
[04:30] <thumper> babbageclunk: thoughts?
[04:30] <babbageclunk> thumper: yeah, sounds sensible to me.
[04:30] <thumper> babbageclunk: as I'm slightly concerned about disk usage during upgrade
[04:30] <thumper> perhaps bulk insert too
[04:31]  * thumper considers
[04:31] <babbageclunk> thumper: ooh, nice.
[04:32] <thumper> insert takes (docs... interface{})
[04:34] <veebers> babbageclunk: sweet, looks like I have a fix for the test, it was a lot more simple than I first thought
[04:35] <babbageclunk> veebers: awesome
[04:37] <thumper> babbageclunk: ah fark...
[04:38] <babbageclunk> ?
[04:38] <thumper> babbageclunk: harder to do batch inserts
[04:38] <thumper> due to different collections
[04:38] <thumper> can do batch delete
[04:39] <babbageclunk> probably the easier option would be to grab a batch, group them by model, insert each model-batch, then delete the batch from source.
[04:40] <babbageclunk> non-optimal since it's doing smaller inserts, but still better.
[04:44] <thumper> babbageclunk: I've gone for single inserts, batch deletes
[04:44] <thumper> happy medium for effort / reward
[04:44] <babbageclunk> thumper: fair enough.
[04:45] <thumper> babbageclunk: http://paste.ubuntu.com/24744827/
[04:46] <babbageclunk> thumper: are you going to do another perf test to see how much the batch deletes cost?
[04:46] <thumper> babbageclunk: have you grabbed the upgrade steps yet?
[04:46] <thumper> it is more the disk usage during upgrade
[04:46] <thumper> performance will be slightly worse
[04:46] <thumper> no
[04:46] <babbageclunk> thumper: nope - been fixing test failures.
[04:46] <thumper> wasn't going to do another test
[04:47]  * thumper pushes change
[04:47] <babbageclunk> thumper: any chance it'll be lots worse?
[04:47] <thumper> not lots
[04:47] <thumper> a little
[04:48] <babbageclunk> I you could do the test on a much smaller sample to get a feel for how much worse.
[04:49] <babbageclunk> oops -I
[04:49] <thumper> oh alright then
[04:49] <babbageclunk> :)
[04:49] <babbageclunk> anyway, I'm getting the changes and putting them into my tree.
[05:13]  * thumper creates 4G of logs
[05:16] <veebers> babbageclunk, wallyworld: hey thanks for talking me through the log-forwarding stuff, turns out this is the fix: https://github.com/juju/juju/pull/7445 (a lot simpler than I first thought)
[05:16] <veebers> :-P
[05:17] <wallyworld> veebers: told you it was essential transparent :-)
[05:17] <wallyworld> just a tweak to enablement
[05:17] <veebers> indeed, sorry for the noise wallyworld (in my defense I did learn some stuff)
[05:18] <wallyworld> veebers: hey, no problem! always good to question how things are
[05:18] <wallyworld> that's how we discover our mistakes and improve
[05:18] <babbageclunk> veebers: nice one.
[05:18] <wallyworld> by our i mean dev
[05:18] <veebers> ^_^
[05:18] <wallyworld> easy for dev to make assumptions because we are close to it all the time
[05:19] <veebers> There is also a fix for the model migration test (well a general fix, migration test\s are the most affected)
[05:19] <wallyworld> yay, so CI should look pretty sweeeeeet
[05:20] <wallyworld> thumper: you forgot my PR :-(
[05:20] <thumper> yes I did
[05:21] <thumper> sorry, too busy testing and working with babbageclunk
[05:22] <wallyworld> no worries, understand
[05:23] <wallyworld> axw: could you take a look, it's only 4 lines https://github.com/juju/juju/pull/7442
[05:24] <wallyworld> thanks thumper
[05:28] <veebers> wallyworld, thumper, babbageclunk: I'm off o/ I'll check in tomorrow to make sure those test fixes where landed etc. and re-run any tests that might need it
[05:28] <babbageclunk> veebers: thanks!
[05:28] <wallyworld> veebers: thanks for all the help! so close to getting a bles snow
[05:29] <babbageclunk> the best kind of snow
[05:29] <veebers> no worries. Yeah those test results are looking heaps better!
[05:29] <wallyworld> stupid typo
[05:29] <veebers> I think I like "bles now" better than a bless
[05:29] <wallyworld> still a race or two to fix
[05:30] <wallyworld> babbageclunk: i have a branch with the new split consume working. just need to do a couple of more tests. will propose for review next week
[05:31] <babbageclunk> wallyworld: oh cool"
[05:31] <babbageclunk> !
[05:31] <wallyworld> so close to multi-controller cmr but we probs won't productise it
[05:32] <wallyworld> foundations will server other purposes though
[05:32] <wallyworld> *serve
[05:34] <thumper> babbageclunk: um...
[05:34] <babbageclunk> ?
[05:34] <thumper> babbageclunk: my code is broken
[05:34] <babbageclunk> :(
[05:34]  * thumper enfixes
[05:35] <babbageclunk> Ok, as long as the changes are just in the split func and tests it's pretty easy for me to update.
[05:36] <thumper> babbageclunk: have you copied stuff yet?
[05:36] <babbageclunk> yup
[05:37] <babbageclunk> just been fixing tests then pushing.
[05:37] <thumper> http://paste.ubuntu.com/24745126/
[05:38]  * thumper thinks how to copy this to the dead machine
[05:38] <babbageclunk> ta
[05:39] <babbageclunk> thumper: oh, easy fix.
[05:41] <thumper> oh FFS
[05:41] <thumper> babbageclunk: we need to handle dupe inserts
[05:41] <thumper> in the upgrade step
[05:41] <thumper> in the case of restart
[05:41] <thumper> 2017-06-02 05:39:58 ERROR juju.upgrade upgrade.go:149 upgrade step "split log collections" failed: failed to insert log record: E11000 duplicate key error collection: logs.logs.c4bfb84a-fa78-4def-8b7e-e5bb0b3d15b1 index: _id_ dup key: { : ObjectId('5930ef6656401a20508455dc') }
[05:41] <thumper> but I need to leave
[05:42] <thumper> rachel will kill me otherwise
[05:42] <thumper> babbageclunk: so an error from the insert that is a dupe should be ignored
[05:43]  * thumper out
[05:59] <babbageclunk> wallyworld: could you take a gander at https://github.com/juju/juju/pull/7441? I still need to make the fix thumper alluded to there.
[05:59] <wallyworld> ok
[05:59] <babbageclunk> But if I don't stop now to help with dinner then I also will be killed.
[06:00] <babbageclunk> the kids have been especially trying today.
[06:00] <babbageclunk> quick, hide!
[06:21] <wallyworld> babbageclunk: see what you think of my comments
[06:24] <rogpeppe> jam: since you were involved before, you might want to take a look at https://github.com/juju/juju/pull/7438
[09:53] <axw> balloons: I think the windows test machine might be dead? http://juju-ci.vapour.ws:8080/job/github-merge-juju/11077/artifact/artifacts/windows.log/*view*/
[11:00] <wpk> axw: it picked a great day to die
[13:12] <arosales> jam: Thanks for the comment in https://bugs.launchpad.net/juju/+bug/1677434
[13:12] <mup> Bug #1677434: listing models is slow <adrastea> <amd64> <arm64> <canonical-bootstack> <ppc64el> <uosci> <usability> <juju:Triaged> <https://launchpad.net/bugs/1677434>
[13:13] <arosales> jam: is there a recommended way to bet cpuprofile with the 2.1 agents?
[13:13] <arosales> s/bet/get/
[13:30] <balloons> axw, I'll look
[13:48] <balloons> axw, your merge is re-running