/srv/irclogs.ubuntu.com/2020/02/07/#juju.txt

thumperbabbageclunk: do you have a few minutes for a python question?01:49
thumperor anyone else really who has done testing recently in pylibjuju01:55
tlmI did a little bit thumper but hardly an expert01:58
thumperI'm just having issues with the python path01:58
thumperit is grabbing a version in .local/lib01:59
thumperwhen I set a python path01:59
thumperit fails on an import for toposort01:59
thumperand I'm not sure why01:59
tlmthis is what I do02:15
tlmpython3 -m venv .venv; source .venv/bin/activate; python setup.py egg_info && pip install -r juju.egg-info/requires.txt; pip install asynctest ipdb mock pytest pytest-asyncio pytest-xdist Twine git+https://github.com/johnsca/websockets@bug/client-redirects#egg=websockets && pip install urllib3==1.25.7 && pip install pylxd02:16
tlmharry gave me that when I worked on it. That covers all dependencies from memory02:16
wallyworldbabbageclunk: if you had time before eod, a look at https://github.com/juju/juju/pull/11189 would be gr802:24
babbageclunkwallyworld:  looking02:34
tlmwhat version of go mock are we suppoed to use wallyworld? See a lot of changes when I generate due to version bump02:36
wallyworldyeah, that can happen. it's hard because builds use go 1.10, CI uses 1.12 I think. i normally just ignore gomock changes when doing a review02:37
tlmwallyworld, hpidcock: i did a tidy up for basic structure. Have a look at https://github.com/juju/juju/pull/1119002:41
wallyworldok02:42
hpidcocktlm: might be good if the rbac mapper follows the worker interface02:45
tlmit's going to be used inside of worker thats why I opted out and stuck to kube convention02:45
tlmbut easy change02:45
tlmcan do02:46
wallyworldwhy getRBACLabels2 ?02:46
hpidcockI dunno, maybe wallyworld has stronger opinions on it02:46
tlmI need to break out that function off of the struct but haven't got around to it. Just to illustrate02:46
tlmnot staying02:46
wallyworldah no worries, ta02:46
wallyworldyeah, so typically we do prefer workers in juju to encapulate the management of go routines02:47
tlmnp, it's an easy fix. Functionally will still remain the same02:48
wallyworldall juju go routines/workers are typically started via the dependency engine or as a child worker of another worker, managed by the runner abstraction02:49
wallyworldyup02:49
wallyworldtlm: so we could use a watcher abstraction over the informer event stream (like we did in the other pr) and use a standard worker loop to process those watch events02:54
tlmnot really, our current watcher implementations are not adequate for this type of problem02:55
babbageclunkwallyworld: why have Enqueue and EnqueueV2 on the same API? Shouldn't everything just use EnqueueV2 (if that's what's on the best API)?02:56
wallyworldbabbageclunk: older clients still need enqueue02:56
babbageclunkRight, but wouldn't they talk to the old facade?02:56
babbageclunk(that's why we have them)02:57
wallyworldusually but there's still legacy actions CLI not behind the feature flag that uses enqueue02:57
wallyworldit's only the CLI behind the feature flag that uses v202:57
wallyworldwhen 2.8 beta1 will have both CLIs02:58
wallyworldso we need to support both until juju v302:58
babbageclunkOh, so those commands that use the old method will still be available on the next-released juju CLI?02:58
wallyworldyeah :-(02:58
wallyworldas we can't change CLI until v302:58
wallyworldand new stuff is opt in till then02:59
babbageclunkstill seems like a weird way to do it - we can change the API internally while keeping the cli the same02:59
wallyworldhow? they return different structs03:00
wallyworldand the new struct has less info03:00
wallyworldwe also have AddMachineV2 (rom memory) for similar reasons03:00
wallyworldmaybe it's gone now03:01
wallyworldbabbageclunk: or maybe i'm on crack and am missing something?03:03
wallyworldtlm: what calls enqueueServiceAccount ?03:04
babbageclunkwallyworld: I think really I just don't like that the new method is called EnqueueV2 - it's the one that we're going to be stuck with when the legacy method is removed once the feature flag goes away.03:05
wallyworldwe can rename it then03:06
tlmthe event handlers, I have just fixed that up03:06
tlmmy cleanup had the old code in it03:06
babbageclunkMight make more sense to rename the old one to LegacyEnqueue and have this one as Enqueue in the most recent facade version.03:06
wallyworldbabbageclunk: i could call it EnqueueOperation03:06
babbageclunkyup, that would work too03:06
babbageclunkI'll put that in a comment03:07
wallyworldok03:07
wallyworldtlm: modulo seeing the revised code, i still think we can wrap the informer event handler as a notify watcher, and use a std juju worker to update the uuid->app mapping, but i could be wrong also03:11
tlmperhaps, I can explain it over HO when you are free if you would like03:13
wallyworldtlm: coffee time, give me a few minutes03:23
tlmno rush03:24
wallyworldtlm: free now?03:36
tlmroger03:37
wallyworldthumper: can you remind me - the isResponsible flag - does that ensure we only have one of those workers it wraps per controller?03:54
wallyworldor babbageclunk?03:54
babbageclunkwallyworld: ask again?04:07
wallyworldbabbageclunk: ty for review btw :-)04:07
wallyworldjust checking04:07
babbageclunkhang on, reminding myself...04:07
wallyworldi think if we pass controller agent tag (or machine tag of controller) as the claimant we just get one of that worker that is wrapped04:08
wallyworldtjust want to confirm04:08
babbageclunkyeah, that's right - it tries to claim the lease for that entity and if it fails the flag is false, so any downstream workers won't run04:09
wallyworldbabbageclunk: awsome ty04:10
wallyworldwe want one k8s client cache per controller04:10
wallyworldthe worker maintains it and different model workers use it04:10
wallyworldthe isresponsible worker04:11
babbageclunkyeah, sounds like the isResponsible decorator is what you want04:11
tlmthanks, will try that for wiring this up04:12
babbageclunkwallyworld: oh, hang on - isResponsible is for 1 worker per model across n controllers, the machine-agent-level flag is the ifPrimaryController one04:14
wallyworldwe want one per controller04:15
babbageclunkbut the model level workers might be running in a controller that isn't the primary controller agent, not sure whether that's a problem04:15
wallyworldi think we can set the claimant flag to the controller agent though right?04:15
wallyworldi think isresponsible is what we want, can always test to be sure04:16
babbageclunkjump in a hangout? I think we might be talking at cross-purposes04:16
wallyworldok04:16
=== parlos_afk is now known as parlos
wallyworldstickupkid: hey, 2 things, i'd love a review on a totally mechanical PR to move some unused/deprecated code out of the way https://github.com/juju/juju/pull/1119107:50
wallyworldalso, https://bugs.launchpad.net/juju/+bug/185683207:50
mupBug #1856832: neutron-openvswitch charm lxc profile not getting set with correct configuration <juju:Triaged> <https://launchpad.net/bugs/1856832>07:50
wallyworldi ran a test of a single unit and it worked bu then the reported said it happens when deploying a bundle07:51
wallyworldso seems like it could be some sort of race07:51
wallyworldbut win o'clock here so ran out of time to dig further07:51
wallyworld*wine07:51
stickupkidhaha07:51
stickupkidwin sounds better07:51
wallyworldno, wine :-)07:52
stickupkidi hate wine07:52
stickupkidi'll have a look once I'm up and running, taking dogs for a walk first07:52
wallyworldno worries, i got a dinner guest here so got to go afk07:55
stickupkidmanadart, I'm picking up a bug today, I'll catch up on the openstack cidr issue after that09:19
manadartstickupkid: Ack. I am working on the consuming side of my last patch. I might look at yours with a mind to testing if I get through it today.09:20
stickupkidmanadart, yeah, go for it09:20
flxfooHi all09:28
stickupkidflxfoo, hi09:29
flxfooI have a little issue with `mysql-shared` on a percona-cluster (x3)... a webserver charm is not doing what it is suppose to do09:29
flxfoothe status on mysql-shared is joining09:29
flxfoothe webserver is connectiong to percona charm and send data, but then wait for an answer09:30
flxfoonot sure where to look at09:30
flxfooideas are welcome09:30
stickupkidflxfoo, this might help https://discourse.jujucharms.com/t/debugging-charm-hooks/111609:31
stickupkidflxfoo, failing that, I would log on to the charm machine/container and ensure it can access the outside09:31
stickupkidflxfoo, or check if the relation is up correctly09:32
flxfoostickupkid: thanks will give it a read thanks09:32
flxfoostickupkid: thing is we use the exact same charm on dev platform, which is working fine09:32
flxfooon production difference is cluster members is more than 1 :)09:32
flxfooand communicate through private network without issue09:33
flxfooeverybody is happy except the charm relation :)09:33
flxfoofind that in debug log: host is not in access-network xxxx ignoring09:40
flxfooips are on different subnet09:41
flxfoostickupkid: do you know how I would change the interface they would communicate for that relation? (if ever you know)09:44
stickupkidflxfoo, I don't unfortunately09:44
stickupkidflxfoo, if you want better exposure maybe drop an new topic on https://discourse.jujucharms.com/09:50
flxfoostickupkid: ok thanks09:54
flxfoolittle quick one: how can I see which relations are available in a charm09:55
flxfoostickupkid: I think my issue is that the two leaders are not communicating on the same subnet...09:55
stickupkidflxfoo, juju status --relations09:56
achilleasais it possible to access a unit name from its tag?10:26
achilleasa.Id() seems to apply a transformation10:27
stickupkidi thought Id didn't do that10:31
achilleasastickupkid: for units it replaces last '-' with '/'10:40
achilleasano prob; just have to pass the name as an extra arg10:40
nammn_demanadart: rick_h opened a bug where one should be able to use the spaceID in `show-space` . While at it I wasn't sure whats the best way to solve this from API param sense.10:51
nammn_deOn the cmd part I could decide between sending an int or a tag. On the Apiserver part I could use that information to either search by id or by name. Wdyt?10:51
nammn_deOr we can just stick with the entity Tag. And in case it does not work out on the apiserver tag, try to search by id10:54
achilleasastickupkid: turns out that for the api call I am interested in 'Unit' means 'Tag' :D10:59
stickupkidwhy doesn't this create three containers in lxd, it only does one? juju deploy cs:~juju-qa/bionic/lxd-profile-without-devices-5 --to lxd -n 311:03
stickupkidthis does the same thing... juju add-unit lxd-profile -n 3 --to lxd11:12
stickupkidannoying11:12
nammn_demanadart: I thought something along this line https://github.com/juju/juju/pull/11195/files11:29
manadartnammn_de: A space ID is actually a valid space name, so you can drop the extra DTOs and keep it as `params.Entities`.11:37
nammn_demanadart: ah, yes. But I would need to parse it on the apiserver to check whether I call byName or byID11:38
manadartnammn_de: This also means that testing for an integer is not enough. We'll just have to query both ID and name. Unique=return, Multiple=error with instructions to disambiguate, Nothing=not found.11:39
nammn_demanadart: rgr11:40
achilleasalooking for someone to pair with me in deciphering the way that errors are handled when flushing the hook ctx11:45
stickupkidwallyworld, I'm struggling to get a reproducer for 185683211:50
manadartstickupkid: https://github.com/juju/juju/pull/1119413:07
rick_hmorning13:07
manadartMorning rick_h.13:08
stickupkidmanadart, i'll look into this13:09
rick_hstickupkid:  what about if you did --to lxd,lxd,lxd ?13:12
rick_hstickupkid:  I think the thing is that it reads the list of --to thinking it'll be like --to 0,1,213:12
rick_hso it treats each target as one at a time13:12
stickupkidrick_h, it may well be, but it's very strange13:12
rick_hstickupkid:  I understand it is in that case, but -n3 --to=0 you don't want three of them on the same machine as well13:13
stickupkidrick_h, it not intuitive13:13
rick_hyea, for the lxd case it's not agree13:13
stickupkidhml, this is interesting esp. because it's on the openvswitch 3, which is causing the problemshttps://paste.ubuntu.com/p/qhbzKTNNzz/14:28
nammn_derick_h: in for a cr on column ordering? https://github.com/juju/juju/pull/1119315:05
rick_hnammn_de:  rgr, will do15:05
nammn_demanadart: cr on ID/Name search for show-space? https://github.com/juju/juju/pull/1119515:05
nammn_destickupkid: opened the LP bug https://bugs.launchpad.net/juju/+bug/186237615:06
mupBug #1862376: tests: status output branches output -> race condition <juju:New> <https://launchpad.net/bugs/1862376>15:06
stickupkidnammn_de, nice15:30
hmlstickupkid: looking at the pastebin now.15:36
nammn_demanadart: I can remember why i didn't export ConstraintsBySpaceName and used tag conversion instead.15:39
nammn_deReason was that the  doc `constraintsWithID` is not exported. Should I just export that type instead?15:39
hmlstickupkid: ln 28 looks like a side effect of the neutron-openvswitch unit not coming up correctly with the profile changes15:39
manadartnammn_de: Let me take a look.15:41
manadartnammn_de: BTW, can you get a fix up for this? https://pastebin.canonical.com/p/qxsDM3hwZ9/15:42
stickupkidhml, exactly15:47
stickupkidi'll report back15:47
hmlstickupkid: there are other errors too in there, not just the 1 unit15:48
hmlstickupkid: is this a MAAS setup?15:49
stickupkidhml, quick ho?15:50
hmlstickupkid: sure15:50
nammn_demanadart: will do!16:04
nammn_demanadart: fixed the test by ensure ordering with sorting. I think that was the problem16:14
nammn_deDid you take a look regarding constraints thing? Should have applied the rest. Not 100% sure about your last comment though, added a comment.16:15
stickupkidmanadart, what's wrong with #11194 it's not building with github correctly16:45
mupBug #11194: auto-fsck after 30 boots can be problematic on a laptop <laptop-mode (Ubuntu):Fix Released by thombot> <https://launchpad.net/bugs/11194>16:45
stickupkidbot fail!16:46
manadartNot sure. Will look Monday.16:47
stickupkidjust close it and reopen the PR16:47
=== arif-ali_ is now known as arif-ali

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