/srv/irclogs.ubuntu.com/2020/05/12/#juju.txt

timClickswhat is the rationale for prohibiting read access to application-level data (via relation-get/state-get) to non-leader units?00:33
timClicksis the recommended course of action for the leader to read those values, then propogate them via peer relations?00:34
babbageclunktimClicks: the basic idea is that you shouldn't let a unit read a value unless it'll be notified if the value changes.00:47
babbageclunktimClicks: and we don't want the leader setting an application bag value to trigger a hook on the other units.00:47
babbageclunk(except in the case of peer relations)00:48
babbageclunkI mean, triggering a hook on the other units on the same side of the relation.00:49
babbageclunkAnticipating the "why not" though - I'm not totally sure... Having a look in the spec doc for rationale00:50
timClicksbabbageclunk: I can certainly understand the rationale for only allowing leaders to modify application-level values00:56
timClicksbut I'm less clear on why other units are not allowed to access that data00:56
timClicksis there a recommended pattern for propogating data to peers?00:57
babbageclunktimClicks: I think it's to have a peer relation - leader sets the information in application data there, then the units can read it because they're on the "other" side.01:02
hpidcockwallyworld: https://github.com/juju/juju/pull/1156101:05
wallyworldlooking01:05
wallyworldhpidcock: i merged directly01:12
wallyworldhpidcock: so the issue with the rc is that the juju binary in the snap has the OfficialBuild label set. the "stable" release jobs don't do that. and we need to not do it for rc either, or if we do a proper  beta1, ie anything not published to the edge channel01:30
hpidcockhpidcock: ok I'll have a look at that too01:30
wallyworldonly the edge snaps built from a PR need the OfficialBuild set01:31
wallyworldso that juju constructs the qualified image tag01:31
hpidcockwallyworld: problem is the ci-run doesn't know this01:31
hpidcockI have some thoughts, let me look at that first01:32
wallyworldrighto, let me know if you want to chat about it01:32
wallyworldi think the requirements are clear now, we just need to make the jenkins jobs comply01:33
wallyworldwe *could* publish another rc snap without the OfficialBuild to test01:34
wallyworldor just make sure it's fixed for rc201:34
wallyworldhpidcock: for now, i've simply added the missing tag that the rc1 snap expects and it's all good01:40
pmatulisi upgraded the series of a machine hosting a single principle charm (and one subordinate) and the value under the Series column (juju status) did not change. i am using containers and MAAS. is this a charm bug or a juju bug?01:44
wallyworldpmatulis: it looks like a juju bug to me (as an educated guess looking at a few things in the code)02:29
wallyworldi'm not 100% sure though, but it seems like it could be02:29
wallyworldi can't see where the series is updated on the machne02:29
wallyworldthere's an old deprecated method but i can't see a replacement02:30
pmatuliswallyworld, thanks. it actually happened to two charms (different model). but the second one only updated the series of the leade'sr machine02:30
pmatulis(each application/charm had 3 units)02:31
wallyworldhmmm,there must be a code path to do it then if one of the machnes was updated.02:31
wallyworldraise a bug i think is best and the folks who wrote upgrade-series can take a look02:32
wallyworldthey'll probably know straight away what any issue is without having to poke around02:32
pmatuliswallyworld, i will reproduce and open a juju bug. thank you!02:35
wallyworldty, sorry i couldn't help immediately. not 100% familair off hand with the code02:35
hpidcockwallyworld: can we HO?03:13
thumperwallyworld: I think this is the issue we were talking about this morning... https://bugs.launchpad.net/bugs/187811003:31
mupBug #1878110: ErrImagePull on k8s deploys with freshly bootstrapped 2.8-rc1 controller <juju:New> <https://launchpad.net/bugs/1878110>03:31
thumperwallyworld: and perhaps this is another dupe of the other k8s delete model work? https://bugs.launchpad.net/bugs/187808603:32
mupBug #1878086: juju destroy-model of the k8s model hangs <juju:New> <https://launchpad.net/bugs/1878086>03:32
thumperI don't want to triage them incorrectly given this is something you have touched recently03:32
pmatuliswhat is the upgrade-charm syntax to upgrade from https://jaas.ai/percona-cluster/286 to https://jaas.ai/u/openstack-charmers-next/percona-cluster/365 ?03:34
pmatulisthere is a --channel option but i can't get it to work03:34
wallyworldhpidcock: yeah, we can, sorry mssed ping03:46
hpidcockwallyworld: in stdup03:47
wallyworldthumper: that rc1 issue is solved now, i added an image tag to dockerhub03:47
wallyworldrc2 will have it fixed. it's a build issue03:47
thumperwallyworld: I thought it was, but I figured you were best to comment and close / assign the bugs03:49
wallyworldthumper: yup will do, on my list03:49
wallyworldjust messing with gui stuff03:49
* thumper nods03:49
thumperwallyworld: how's it going?03:49
wallyworldthumper: sec, otp03:49
thumperpmatulis: is the charm in the same channel?03:50
thumperah... different owner03:50
thumperI think you need to use --switch03:50
pmatulisthumper, ohh03:50
thumperpmatulis: as far as juju is concerned the charms are unrelated03:51
pmatulisthat actually worked really well03:55
pmatulisand was instantaneous03:56
thumperperhaps just very quick :)03:56
thumperwallyworld: I think perhaps we should land the GUI parts as much as we have them (as we fix the minor issues)03:57
thumperand rely on getting the simplestreams data updated soonish03:57
thumperoutside of our chagnes03:58
wallyworldthumper: that's exactly my plan. i am almost done with code fixes to address *all* the issues I identified. need to test 2.7 -> 2.8 upgrades. code will not care if streams is broken, you can still deploy gui from a local tarball. and i had a longish meeting with jeff this morning to communicate the fixes we need to make to the workflow and behaviour and the streams and i am hoping for updated streams tomorrow04:10
wallyworldkelvinliu: are you having luck with the retriable error concept?04:11
kelvinliuwallyworld:  it didn't work, still investigating04:12
wallyworldkelvinliu: ah, so leaving the operation as pending didn't cause it to be picked up again next time through the loop. i haven't got the exact logic intrnalised right now for the resolved FSM, but let me know if you need help04:14
kelvinliuno, it didn't work..04:15
kelvinliunws, im investigating a bit further04:15
thumperwallyworld: do you remember we we can tweak cert complexity for controllers in tests?04:33
wallyworldhmmm, rings a bell, but details not paged in :-(04:33
wallyworldprobs in same package as the test ModelTag stuff04:34
thumpernah, me neither04:34
thumperI thought briefly that juju conn suite might set it04:34
thumperbut seems not04:34
* thumper digs some more04:34
wallyworldthumper: juju/juju/testing/cert.go04:35
wallyworldpregenerated certs we then use elsewhere04:36
thumperlooks like we are using those for the dummy provider04:37
thumperI'm trying to track down a weird test timeout04:37
thumperwe spin doing 7.5 seconds of nothing04:38
hpidcockwallyworld: thumper: tlm might have touched these in the recent certs work04:53
thumperhpidcock: locally my machine pauses for about 300 ms04:56
thumperso it is clearly doing something04:56
hpidcockyep04:56
thumperon a slower loaded machine, it could easily take a lot longer04:56
hpidcockI had a branch that fixed this, let me have a look04:56
thumpertrying to find out what it is doing04:56
hpidcockthumper: this was my commit that sped up all the cert generation a while back https://github.com/juju/juju/commit/866052a37846a0230e5b3eaf89b373eb5bb5e764 but tlm's recent work might have undone this04:59
thumperhpidcock: that still seems to be there05:01
hpidcockwhich test is taking a long time?05:01
thumpera bootstrap test05:01
thumpertim@terry:~/go/src/github.com/juju/juju/cmd/juju/commands (develop)$ go test -check.vv -check.f TestAutoUploadAfterFailedSync05:01
thumperthe pause is between these two lines:05:02
thumper[LOG] 0:00.031 DEBUG juju.cmd.juju.commands provider attrs: map[broken: controller:false secret:pork]05:02
thumper[LOG] 0:00.370 INFO cmd Adding contents of "/tmp/check-2439852674146353662/1/.ssh/id_rsa.pub" to authorized-keys05:02
thumperon my machine it was 320ms05:02
thumperon the test machine it was 7.5s05:02
hpidcocklet me have a quick look05:02
thumpermy machine is probably faster and doing less05:02
wallyworldthumper: i've pushed a dashboard PR, but there's a fundamental issue (from when it was written) concerning version checking i need to fix, it currently uses the CLI version not the controller version. i'll work on that and push a commit, but what's there *should* work  with the new simplestreams metadata when published tomorrow (hopefully)05:14
thumperok, thanks05:14
tlmhpidcock: thumper Some of my pki tests generate keys05:14
tlmthat could be the slowdown ?05:14
thumpertlm: you aren't doing that in the bootstrap tests though?05:15
tlmthumper: I'll look. Can't remember off the top of my head05:15
hpidcockthumper https://usercontent.irccloud-cdn.com/file/ceDs66KD/out.png05:18
thumperhpidcock: fyi, I made a bug for it https://bugs.launchpad.net/juju/+bug/187813505:24
mupBug #1878135: BootstrapSuite.TestAutoUploadAfterFailedSync times out intermittently <intermittent-failure> <juju:Triaged> <https://launchpad.net/bugs/1878135>05:24
hpidcockthumper: out of interest what architecture was this on?05:24
thumperhpidcock: I need to work out how to get that05:24
thumperhpidcock: pretty sure it was just amd6405:25
hpidcockok amd64 should have been fast05:27
hpidcockbut 3072bit rsa primes are pretty chonky05:27
thumperhpidcock: probably from environs/bootstrap/config.go:21105:28
hpidcockideally for tests that are not testing certs we either use pregenerated certs or drop the key strength to 51205:28
thumperhpidcock: should be fast, but if the machine is very busy and swapping05:28
thumperhpidcock: right05:28
thumperperhaps these tests are just missing some patching of values05:29
hpidcockyeah05:29
* thumper wonders what that bug is05:29
thumperbug 155865705:29
mupBug #1558657: many parts of the code still don't use clocks <tech-debt> <juju:Triaged> <https://launchpad.net/bugs/1558657>05:29
thumperleft there as a todo05:29
thumperdoesn't look like we patch pki.DefaultKeyProfile anywhere05:30
hpidcockI think there is room for us to do work on the test waiting. If we have a known long running operation, if it could suspend test timers05:30
thumperI'd rather use a smaller key for tests so they are faster05:31
wallyworldtlm: i just going to relocate, can look at PR again soon if lyou need me to05:47
tlmwallyworld: just gonna take the dogs for a run and punch on for a little bit longer. Have fixed a few bugs today and done most of your feedback. About to fix the password generation point you made in the PR05:48
wallyworldno worries, enjoy the walk, i might do the same amd come back later05:49
kelvinliuwallyworld: hpidcock  https://github.com/juju/juju/pull/11558 got this WIP pr to let the 137 error retry, could u take a look to see if it makes sense ? ty05:49
wallyworldsure05:49
kelvinliuif all good, i will sort out the test05:49
wallyworldkelvinliu: so it all works now?05:50
kelvinliuso when I turn the wrench on, I can see nextOps returns a new retry==true remote-init operation. then it finishes if I remove the wrench toggle file05:52
kelvinliuI made a bit change in the container resolver, Im not 100% sure if the change makes sense. would be good to get hpidcock to take a look05:54
wallyworldkelvinliu: can we put the retable check inside RemoteInit implementation to avoid importing k8s into uniter worker06:01
wallyworld*retryable06:01
kelvinliuit's currently in remoteInit.go, we need to mutate the local state, not sure if we can do this outside of uniter package06:04
wallyworldkelvinliu: i mea just the error wrapping06:04
wallyworldstate mutation is fine where it is06:04
kelvinliuok, u mean add one more layer of this special error ?06:05
wallyworldthe aim is to avoid importing k8s package into worker/uniter, but i'd need to look closer at the code06:05
wallyworldkelvinliu: so in here func (op *caasOperator) remoteInit(06:07
wallyworldthat's what is ultimatly called by callbacks.RemoteInit()06:07
kelvinliusure, im already on it now06:07
wallyworldawesome, that keeps the k8s stuff in one place06:08
wallyworldkelvinliu: also, i thought for sure we have a generic CanRetry() type error somehwere already. that would then fully abstract away any k8s from the worker/uniter06:09
wallyworldmaybe we don't, i'll check06:09
wallyworldkelvinliu: ah,, this is what i was thinking of.  golang net/Error interface has a Temporary() bool method06:12
wallyworldso not directly usable here as it's not really a network error06:12
wallyworldwe could add a new interface to core package perhaps06:13
wallyworldthat would decouple worker/uniter from k8s related knowledge06:14
* wallyworld bbiab06:15
kelvinliuwallyworld:  I added a new uniter error `retryableError` to detect if an operation should be retried or not06:19
wallyworldtlm: i've unresolved a few comments that were either resolved without the necessary changes, or resolved without a comment as to why the request was invalid06:55
manadartachilleasa: https://github.com/juju/juju/pull/11563.12:09
achilleasamanadart: looking12:10
skayI'd like to deploy another postgresql unit to an environment so that I can have a swapable unit and I've never done it before. is there a post I can read about that somewhere?12:42
skayon the charm page it looks like all one does is add another unit and magic happens. I'd like to know a little more beyond trying to read the src code in the charm about this. like, how long does it take for the database to get replicated (based on size of db)12:45
skayetc etc etc12:45
skayand I never set anything on the charm when I deployed it, do the defaults magically work or do I need to set different ones. etc etc12:46
achilleasahml: the changes in 11523 LGTM. I just have a comment about the relationer constructor. Can you take a look?13:38
hmlachilleasa:  looking13:38
hmlachilleasa:  i’ll give it a try.13:39
hmlachilleasa:  thank you.13:40
achilleasahml: it shouldn't make a difference in total LOC as the PR already lowercaases the type13:40
hmlmanadart:  qa good, looking at the code now13:47
hmlachilleasa:  i agree in principal, however it’s breaking down for me here:  https://github.com/juju/juju/blob/8ed98bba62d60df44e5648962bf25bb10060f488/worker/uniter/relation/statetracker.go#L52.15:25
hmlachilleasa: the StateTracker can’t get the Relationer  at creation.15:26
hmlachilleasa:  there are work arounds, but they seemed to defete the idea behind the change.  Or use a PatchValue call?  eh.15:26
hmlachilleasa:  open to more ideas15:27
achilleasahml: you could hoist the method to RelationStateTrackerConfig and provide a closure 'func(....) Relationer { return relation.NewRelationer(...) }' when you populate the uniter config15:31
achilleasathis way, it can be easily (in relative uniter test-suite terms) mocked at test time15:31
hmlachilleasa:  i did that, but it seemed to defete the purpose of the change for me.15:32
hmlachilleasa:  the only use of it not in test, would require a wrapper15:32
achilleasahml: I guess you are right... it's not like we will have a different Relationer implementation anyway right?15:33
hmlachilleasa:  nope.  the only reason I added the func, was for test.  to avoid doing a PatchValue()15:33
achilleasahml: ok then, I can approve the PR and you can land as-is. Sorry for sending you down a rabbithole; should have spotted that func bit earlier15:34
hmlachilleasa:  it mostly has to do with how the StateTracker is written. no easy way around15:34
hmlachilleasa:  np problem.  it’s a good learning for me.  perhaps i can use it later.  does solve a few things i’ve noticed over time with the take an interface return a struct interacting with mocked testing15:35
hmlif it wasn’t for the darn func.  :-/15:35
achilleasahml: approved15:39
hmlachilleasa:  ty15:39
achilleasahml: can you take a look at the appended commits to get https://github.com/juju/juju/pull/11557 green before I hit merge?16:53
hmlachilleasa:  sure, give me a min or16:53
hml216:53
achilleasahml: since I hit EOD feel free to land the PR if it looks OK17:04
hmlachilleasa:  rgr17:04
=== gabriel1109|away is now known as gabriel1109

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!