Friday, 2019-02-08

*** celebdor has quit IRC00:15
*** rh-jelabarre has quit IRC01:29
*** gkadam has joined #openstack-kuryr03:18
*** gkadam_ has joined #openstack-kuryr03:28
*** gkadam has quit IRC03:31
*** kiseok7 has quit IRC04:16
*** premsankar has quit IRC05:01
*** janki has joined #openstack-kuryr06:05
openstackgerritAshish Billore proposed openstack/kuryr-kubernetes master: Update HA doc with corections and minor fixes  https://review.openstack.org/63544606:25
openstackgerritAshish Billore proposed openstack/kuryr-kubernetes master: Update and add the docstrings to the functions  https://review.openstack.org/62751106:32
*** ccamposr has joined #openstack-kuryr07:06
*** pcaruana has joined #openstack-kuryr07:23
*** maysams has joined #openstack-kuryr07:29
*** takamatsu has joined #openstack-kuryr08:00
*** celebdor has joined #openstack-kuryr08:18
openstackgerritMerged openstack/kuryr-kubernetes master: Update HA doc with corections and minor fixes  https://review.openstack.org/63544609:37
*** EricAdamsZNC has quit IRC09:56
*** EricAdamsZNC has joined #openstack-kuryr10:00
*** aperevalov has joined #openstack-kuryr10:18
*** takamatsu_ has joined #openstack-kuryr11:20
*** takamatsu has quit IRC11:20
*** ccamposr has quit IRC11:20
*** mrostecki has quit IRC13:06
*** mrostecki has joined #openstack-kuryr13:06
*** rh-jelabarre has joined #openstack-kuryr13:34
maysamsltomasbo, dulek: Could you take a look again whenever possible? https://review.openstack.org/#/c/635039/13:43
ltomasbomaysams, sure!13:43
maysamsltomasbo, thanks13:44
dulekLooking!13:44
ltomasbomaysams, regarding this https://review.openstack.org/#/c/634674/6/kuryr_kubernetes/controller/drivers/vif_pool.py13:45
ltomasbomaysams, yuou mean doing list.extend() for each port_list in the pool, right?13:46
ltomasbomaysams, I'm actually not sure what will be faster... checking the ports or copying it over to a new array13:47
ltomasbodulek, any preferences?13:47
maysamspool_members.extend(port_list)13:48
dulekltomasbo: Do we even have performance issue here? Let's worry once we have it. ;)13:48
ltomasbodulek, and what option do you prefer?13:49
ltomasbothe extend or the list comprehension?13:49
ltomasbo(I don't have strong opinion... and not even sure performance wise what is better13:49
dulekltomasbo: Extension will be faster here, IIUC.13:50
ltomasbocool, I'll update it then13:50
dulekltomasbo: List comprehension will be a generator in Python 3, won't it?13:50
* dulek needs to check. :D13:50
dulekltomasbo: Nooope, it won't be.13:51
ltomasbo:)13:52
dulekltomasbo: Okay, so lists in Python are arrays.13:55
dulekltomasbo: That means this shouldn't really matter too much, in any case we'll iterate.13:55
dulekClarification - lists in CPython are arrays. ;)13:55
dulekmaysams: Okay, so you mean that on_present with updated annotation never happens?14:01
maysamsdulek, yes14:03
dulekmaysams: This would be really weird…14:03
maysamsdulek, I tested removing the k8s API requests that I added and just raise a resourceNotReady14:04
maysamsthe endpoint received on on_present always had the same resourceVersion14:04
maysamsso it would keep raising the exception until the controller dies14:05
maysamsdulek, and by getting from the API this is avoided14:05
maysamsdulek, and yes.. I do agree it's really weird14:06
ltomasbomaysams, but what if you simply return? instead of the resourceNotReady? then once the other handlers annotates the endpoints spec, a new on-present will be triggered, right?14:13
ltomasbomaysams, I guess the difficult part will be when to wait for the other handler to update the state14:14
maysamswill try that ltomasbo14:20
maysamsty!14:22
aperevalovdulek, hello. I would like to ask you about issues mentioned in https://docs.openstack.org/kuryr-kubernetes/latest/devref/high_availability.html, with orphaned openstack ports.14:33
aperevalovLooks like it's not yet fixed. Does anybody start this task, is there any bug for it on launchpad?14:35
dulekaperevalov: yboaron looked at creating some kind of garbage colector a while ago, but never progressed with that. And I don't think he'll be able to do so now due to some priorities changes.14:36
dulekaperevalov: Why asking? Are you hitting those issues or want to work on them?14:38
aperevalovYes, looks like it rare case, but it's not only HA issue, it could happen during development and testing. Do you know details, is it some kind of watcher inside controller/cni daemon or separate process?14:38
dulekaperevalov: I would put it as periodic_task inside kuryr-controller.14:40
aperevalovI'm asking because of two reason 1) our team want to know more about it 2) personally I faced with issue of orphaned port during development (it's not for production). I clear ports just with bash script.14:40
aperevalovdulek, thank you very much for info )14:41
dulekaperevalov: No problem. If you want to work on this, I'm happy to discuss implementation details once there's some design. :)14:42
*** janki has quit IRC14:50
aperevalovAlso, some periodic_task which updates information about openstack network/subnet would be interesting. Currently we keep physnet->subnet_id mapping and use it in controller driver as well as physnet->PF mapping which used in binding driver. So if user introduce new sriov subnet we need to add it into kuryr.conf and restart cni/controller, but it would be flexible to obtain such information in kuryr-kubernetes dynamically.15:05
aperevalovStraightforward approach, when we do request in drivers is not perfect due to performance penalty. So it's better to keep such information updated.15:06
openstackgerritMaysa de Macedo Souza proposed openstack/kuryr-kubernetes master: Fix SG rules on targetPort update  https://review.openstack.org/63503915:24
maysamsltomasbo, dulek: now it works without the API requests ^15:28
dulekmaysams: Magic?15:29
dulekmaysams: So now it's not raising an exception and just ignores events that aren't matching?15:31
maysamsdulek: haha just added the targetPort when checking if should ignore the event15:31
maysamshttps://review.openstack.org/#/c/635039/8/kuryr_kubernetes/controller/handlers/lbaas.py@32015:31
maysamsdulek: yes.. and when the lbaas spec handler finish to process the lbaas handler will be called again15:31
*** pcaruana has quit IRC15:31
dulekmaysams: I need to put on my anti-radiation suit and jump into watcher.py code to understand why there's a difference when we raise an exception…15:32
dulekmaysams: As I'm pretty sure that code in watcher.py isn't good for my health.15:33
dulekMostly mental.15:33
maysamsXD15:33
ltomasboxD15:36
ltomasbomaysams, so, using the target port to decide on changes helped?15:36
ltomasbomaysams, and even made the patch smaller! \o/15:37
ltomasbomaysams, going to give it a try!15:37
maysamsltomasbo: yes, it helped :)15:38
*** mrostecki has quit IRC15:56
openstackgerritLuis Tomas Bolivar proposed openstack/kuryr-kubernetes master: Pools support with Network Policies  https://review.openstack.org/63467416:18
*** aperevalov has quit IRC16:45
dulekltomasbo: That's second board: https://jira.coreos.com/secure/RapidBoard.jspa?rapidView=217&view=planning.nodetail16:49
dulekWhooops, wrong channel. ;)16:49
dulekmaysams: Want to know what's the difference between raising ResourceNotReady and returning?17:02
dulekmaysams, ltomasbo: https://github.com/openstack/kuryr-kubernetes/blob/60213747a3eadf93437d96caf59530e28b847bb7/kuryr_kubernetes/controller/handlers/pipeline.py#L55-L5817:02
dulekIf maysams was raising ResourceNotReady, the event was retried with exponential backoff.17:03
dulekAnd this is blocking for a single path, IIUC.17:04
dulekSo until that event was processed no new event could be handled.17:04
dulekAnd as maysams made it always raise ResourceNotReady, we pretty quickly made kuryr-controller to set unhealthy in probes.17:04
dulekAt least I can +2 the patch as I understand what happened. :D17:05
maysamsand so that event would keep retrying with the same resource version17:05
dulekmaysams: With exactly the same event.17:05
maysamsdulek, yup17:05
dulekmaysams: ResourceNotReady is supposed to be used when we wait for something else to get updated.17:05
dulekmaysams: Oh, damn, you also add something to the o.vo… We also need to consider upgrades here.17:06
dulekmaysams: Basically we can expect that after Kuryr gets upgraded there will be older annotations and Kuryr should still work.17:06
maysamsdulek: hmmm.. I see17:07
dulekmaysams: So line 320 of lbaas.py is potentially dangerous, right?17:08
dulekBecause targetPort may not be there.17:09
maysamsdulek, yes17:10
maysamsdulek: I need to rework this17:11
dulekmaysams: A lot? :P17:13
dulekmaysams: It's totally fair that in case targetPort is missing, we fetch it from K8s API.17:16
dulekI mean it's missing in annotation.17:16
dulekmaysams: Wait, we should even have it, as it should be in the event we're processing, right?17:17
dulekAnd you can easily assume that there were no NP before the upgrade.17:17
dulekSo it's not that bad, we just need a fall back.17:17
maysamsdulek: you mean that we should give a default value if the lbaas_spec port does not contains the targetPort?17:24
dulekmaysams: Where is targetPort taken from initially?17:25
dulekmaysams: Service definition, right?17:25
maysamsfrom the lbaas_spec annotation17:26
maysamsin the service, right17:26
dulekmaysams: Yeah, but initially it's copied from Service.17:28
dulekmaysams: So if it's missing from annotated LBaaSSpec we can fetch the Service and fill it.17:29
dulekmaysams: We can just check the version of the object we load.17:29
dulekmaysams: Am I right that we can get this from Service in K8s API?17:29
dulekI mean Service spec, not any annotations.17:30
maysamsdulek, we can, and also we get it from the endpoints17:31
maysamshttps://review.openstack.org/#/c/635039/8/kuryr_kubernetes/controller/handlers/lbaas.py@31717:31
maysamsas we already have it there17:32
*** gkadam_ has quit IRC17:32
dulekmaysams: Oh, okay. So whatever works better for you.17:33
dulekmaysams: Because alternative could be to increment o.vo version of LBaaSServiceSpec as well.17:33
dulekAnd then when loading the annotation obj_make_compatible() can take care of fetching additional data.17:34
dulekNah, the latter is a bit too complicated, o.vo layer shouldn't have access to K8s API.17:34
dulekmaysams: Let me just check how to test for value in o.vo being set…17:35
maysamsdulek, okay17:36
dulekmaysams: Something like this should work: `port.obj_attr_is_set('targetPort')`.17:37
dulekmaysams: Another thing to take care of is to be able to drop that compatibility code one day.17:38
dulekmaysams: Imagine that Kuryr is in version X, gets updated to X+1 which requires targetPort, but does that fallback, then gets updated to X+2 that drops the fallback.17:39
maysamsyes17:39
dulekWe need to make sure that before upgrading to X+2 we have all the annotations converted to have targetPort.17:39
dulekmaysams: https://github.com/openstack/kuryr-kubernetes/blob/aa5ec451f79fc94d99f1c07e553240753bc4df74/kuryr_kubernetes/cmd/status.py#L150-L19417:40
dulekmaysams: We have something like this for that purpose. But let's implement conversion tool in a follow up patch, I think I can do that. :)17:41
maysamsvery well, thanks a lot for pointing this out dulek17:41
dulekmaysams: No problem. I know this sucks, but being able to live upgrade is always hard.17:42
maysamsdulek, indeed17:42
dulekmaysams: And at least we only care about K8s API and not RPC, SQL (MariaDB vs MySQL vs PostgreSQL quirks) and REST API. xD17:43
maysamsdulek, thanks God17:44
maysamsdulek, did you work on some project that required all that?17:44
dulekmaysams: Yeah, OpenStack Cinder. :D17:45
maysamsdulek, ohh ok ok.. I imagined you had lots of fun :P17:45
maysamss/imagined/imagine17:45
dulekmaysams: Yup, needed to write this doc: https://docs.openstack.org/cinder/latest/contributor/rolling.upgrades.html17:46
maysamsdulek, nice17:47
dulekmaysams: I think I'll start the weekend now, if we continue talking about rolling upgrades I might have nightmares later on. ;)17:49
dulekHave a great weekend!17:50
maysamsdulek: hahah17:50
*** gcheresh_ has joined #openstack-kuryr17:50
maysamsdulek, a nice weekend to you too!17:50
*** premsankar has joined #openstack-kuryr18:07
*** maysams has quit IRC18:07
*** gcheresh_ has quit IRC18:08
*** rh-jelabarre has quit IRC23:39

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