Thursday, 2019-03-07

*** mrostecki has quit IRC00:41
*** mrostecki has joined #openstack-kuryr00:42
*** celebdor has quit IRC01:09
*** janki has joined #openstack-kuryr05:05
*** yboaron_ has joined #openstack-kuryr06:04
*** janki has quit IRC06:08
*** gcheresh_ has joined #openstack-kuryr06:08
*** janki has joined #openstack-kuryr06:08
*** lxkong has quit IRC06:52
*** janki has quit IRC06:54
*** janki has joined #openstack-kuryr06:54
*** ccamposr has joined #openstack-kuryr07:14
*** gkadam__ has joined #openstack-kuryr07:21
*** lxkong has joined #openstack-kuryr07:21
*** pcaruana has joined #openstack-kuryr07:25
*** maysams has joined #openstack-kuryr08:02
*** celebdor has joined #openstack-kuryr08:12
dulekmaysams: You were offline yesterday evening so sending again: http://paste.openstack.org/show/747373/08:38
dulekmaysams: 3 out of 8 tests failed, and one might just have been my DNS hiccup.08:39
dulekmaysams: But 5 are totally fine, which is great, because it seems we got most of the stuff right. :)08:39
maysamsdulek: That's great news08:40
openstackgerritLuis Tomas Bolivar proposed openstack/kuryr-kubernetes master: Add support for svc with text targetPorts  https://review.openstack.org/64159808:41
maysamsdulek, thanks for sharing it with me08:41
maysamsdulek, I will later take a look on those failing tests.. maybe we're missing something on the NP support08:42
maysamsddulek: which one do you think it was the dns hiccup?08:42
dulekmaysams: "should support allow-all policy"08:42
dulekmaysams: The last two had something like this in NP:08:43
dulekPort: "serve-80"08:43
dulekI guess we again missed the fact that ports can also be referenced as names, not only as numbers.08:43
dulekBut I'm not sure. ;)08:43
maysamsdulek, you're probably right08:50
dulekmaysams: https://github.com/kubernetes/kubernetes/blob/master/test/e2e/network/network_policy.go#L281-L35608:51
dulekmaysams: Those are the two tests.08:51
maysamsdulek: yup, I was checking them08:52
maysamsdulek: and it does not provide any detailed msg of why it's failling, right?08:53
dulek"should allow egress access on one named port": "Pod client-a should not be able to connect to service svc-server, but was able to connect."08:53
dulek"should allow ingress access on one named port": "Pod client-b should not be able to connect to service svc-server, but was able to connect."08:54
dulekmaysams: I see one 500 from Neutron…08:56
maysamsdulek, thanks.. have the k8s resources gotten deleted?08:57
dulekmaysams: K8s? Yes, tests delete whole namespace, so all K8s stuff is gone.08:58
maysamshmm08:58
maysamsit would be nice to double check what is present in the ports field of the NP08:59
dulekmaysams: "(pymysql.err.IntegrityError) (1451, u'Cannot delete or update a parent row: a foreign key constraint fails (`neutron`.`securitygroupportbindings`, CONSTRAINT `securitygroupportbindings_ibfk_2…"08:59
dulekThat's the Neutron issue.08:59
dulekI guess we've found a Neutron bug as well. xD09:00
dulekmaysams: If I figure out how to run just one test, we can do it.09:00
dulekmaysams: I have a quick call now, will be back in 15-30 minutes.09:00
maysamsdulek, ok ok09:00
maysamsdulek: I'm almost certain that the problem it's because we're not handling the possibility(https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#networkpolicyport-v1beta1-extensions) of named ports09:09
*** alisanhaji has joined #openstack-kuryr09:10
maysamswe're retrieving the port from the NP and requesting a sg rule creation with it09:11
maysamshttps://github.com/openstack/kuryr-kubernetes/blob/master/kuryr_kubernetes/controller/drivers/network_policy.py#L32509:11
maysamshttps://github.com/openstack/kuryr-kubernetes/blob/master/kuryr_kubernetes/controller/drivers/utils.py#L23809:11
dulekmaysams: Shouldn't I see some tracebacks then?09:24
maysamsdulek: hmm maybe09:29
maysamsdulek: don't we have any info on kuryr log?09:29
dulekmaysams: I'll look through it again, but haven't seen any.09:31
maysamsokay09:31
maysamsand you did you see the neutron error on neutron service logs?09:31
dulekmaysams: Got it!09:41
dulekBadRequest: Invalid value for port serve-8009:41
dulekmaysams: And this is the NP in question: http://paste.openstack.org/show/747384/09:42
dulekmaysams: And that Neutron 500 is above - it's some MySQL error about securitygroupportbinding table.09:42
maysamsdulek, Is this badrequest raised from neutron?09:44
dulekmaysams: Yes, yes, it's from Neutron.09:44
dulekmaysams: http://paste.openstack.org/show/747385/ - full traceback.09:45
maysamsdulek, good. So, that was definitely the problem09:45
dulekmaysams: Yup, for sure!09:45
maysamsdulek, Will you open a bug for this? I can fix it, if it's ok for you09:49
dulekmaysams: Sure, opening one now.09:49
dulekmaysams: I prefer you'll fix it, I don't feel that comfortable with NP code. :P09:50
maysamsdulek: okay :P09:50
*** yboaron_ has quit IRC09:52
dulekmaysams: https://bugs.launchpad.net/kuryr-kubernetes/+bug/181898309:54
openstackLaunchpad bug 1818983 in kuryr-kubernetes "NetworkPolicy doesn't support named ports" [High,Confirmed] - Assigned to Maysa de Macedo Souza (maysa)09:54
maysamsdulek: Thank you.09:55
ltomasboohh, we also need named port for policies!10:24
ltomasbomaysams, dulek: serve-80??10:24
ltomasbowhere that is defined?10:24
dulekltomasbo: I believe that's the name of the port on the *Pod*.10:25
dulekltomasbo: That's why I wanted to start discussing your patch, I'm confused if it's right.10:25
ltomasbodulek, maysams: and will that be as simple as, if it is a string, just do .split("-")[-1]10:26
dulekltomasbo: No. xD10:26
ltomasboumm10:26
dulekltomasbo: I'll show you, wait a second.10:26
ltomasboyou mean that allows traffic to go out on port serve-8010:26
ltomasbohow do you know in the local pod what ports are opened?10:27
ltomasboor you mean we should also only open the ports that are opened in the pod definition?10:27
ltomasboI think we are not caring at all about what the pod definition says about ports...10:27
maysamsdulek: I believe ltomasbo patch is okay according to this https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#serviceport-v1-core10:28
dulekltomasbo: So in those NP tests here's the NP definition: https://github.com/kubernetes/kubernetes/blob/master/test/e2e/network/network_policy.go#L294-L29810:28
dulekltomasbo: And this is what it should match: https://github.com/kubernetes/kubernetes/blob/master/test/e2e/network/network_policy.go#L47310:29
ltomasbodulek, yep, so I guess we have a bigger problem there, as we don't use any information regarding the ports on the pod spec in kuryr-kubernetes, right?10:30
ltomasbomaysams, umm, so I got it half right?10:30
ltomasbobased on the definition it is equal to the port field when it is not specified10:31
ltomasboon the pod10:31
dulekltomasbo: Yeah, but if it's a string, then it should be looked up in that pod's ports, by names.10:31
ltomasbodulek, yep, and if not there, then assign it the port value on the svc spec10:32
ltomasbodulek, ok, so that is also assuming all the pods pointed have the very same ports definition10:33
ltomasbonot only the port, but also the names10:33
ltomasbowhich makes sense10:33
dulekltomasbo: Yes, you're right.10:33
ltomasboand seems that at the end of the day, you are using the same name as in the svc spec10:33
ltomasboso, what I propose is a half-fix, but it should be enhance with that checking about the pointed pods definition10:34
maysamsltomasbo: yup10:34
ltomasboand we need to do the same for the network policies...10:35
dulekltomasbo: We don't have definitions of ports for each pointed pod in endpoints?10:35
ltomasbodulek, yes we do10:35
dulekltomasbo: So at least we don't need to fetch pods and so on, all the info is there, we just need to manipulate it correctly, right?10:36
ltomasbobut we have a handler for services and another one for endpoints...10:36
openstackgerritOpenStack Release Bot proposed openstack/kuryr master: Update master for stable/stein  https://review.openstack.org/64162710:36
dulekUh, oh. ^10:36
dulek:P10:36
dulekHad we branched?10:36
dulekltomasbo: Don't we copy stuff from endpoints into annotation on Services?10:37
ltomasbodulek, I think it is the other way around actually10:39
ltomasbomaysams, ^^10:39
maysamsltomasbo: dulek: yup.. is the other way around10:40
dulekHuh? It's LBaaSSpecHandler that waits until lbaas spec is on /services/.10:41
dulekOh no, you're right.10:42
*** yboaron_ has joined #openstack-kuryr10:43
openstackgerritLuis Tomas Bolivar proposed openstack/kuryr-kubernetes master: Update documentation about NP handlers needed  https://review.openstack.org/64162910:47
ltomasbomaysams, dulek,  https://review.openstack.org/64162910:47
dulekltomasbo: Easy stuff first, huh? ;)10:48
ltomasbo:)10:49
ltomasbodulek, I just fixed it on openshift-ansible... so...10:49
*** gkadam__ has quit IRC12:32
*** gkadam__ has joined #openstack-kuryr12:32
*** janki has quit IRC12:40
openstackgerritMichał Dulko proposed openstack/kuryr-kubernetes master: Switch Octavia API calls to openstacksdk  https://review.openstack.org/63825812:59
openstackgerritMichał Dulko proposed openstack/kuryr-kubernetes master: Add option to tag Octavia resources created by us  https://review.openstack.org/63848312:59
openstackgerritGenadi Chereshnya proposed openstack/kuryr-tempest-plugin master: Fixing service connectivity testing  https://review.openstack.org/63632913:00
openstackgerritMichał Dulko proposed openstack/kuryr-kubernetes master: Switch Octavia API calls to openstacksdk  https://review.openstack.org/63825813:18
openstackgerritMichał Dulko proposed openstack/kuryr-kubernetes master: Add option to tag Octavia resources created by us  https://review.openstack.org/63848313:18
*** celebdor has quit IRC13:23
*** rh-jelabarre has joined #openstack-kuryr13:32
*** celebdor has joined #openstack-kuryr13:35
*** janki has joined #openstack-kuryr13:36
*** rh-jelabarre has quit IRC13:37
*** rh-jelabarre has joined #openstack-kuryr14:39
*** gcheresh_ has quit IRC15:30
*** janki has quit IRC16:29
*** rh-jelabarre has quit IRC16:38
openstackgerritMichał Dulko proposed openstack/kuryr-kubernetes master: Switch Octavia API calls to openstacksdk  https://review.openstack.org/63825816:38
openstackgerritMichał Dulko proposed openstack/kuryr-kubernetes master: Add option to tag Octavia resources created by us  https://review.openstack.org/63848316:38
*** yboaron_ has quit IRC16:52
*** premsankar has joined #openstack-kuryr17:03
ltomasbodulek, maysams: this seems totally wrong: https://github.com/openstack/kuryr-kubernetes/blob/master/kuryr_kubernetes/controller/handlers/lbaas.py#L264-L28217:05
ltomasbodulek, maysams L267 should have a not at the beginning...17:05
ltomasbodulek, maysams but my question is, how has this worked all this time?17:06
maysamsltomasbo: I'm creating a svc right know to see what is happening17:06
dulekltomasbo: "_is_lbaas_spec_in_sync". If spec is in sync, then this returns true.17:06
ltomasbodulek, yes, and if that returns true, should_ignore should return true, as if it is already in sync, there is nothing to do17:07
dulekltomasbo: Oh yes…17:07
dulekltomasbo: Heisenbug. Now that you've found it we'll start to see its implications everywhere.17:07
dulekThanks you ltomasbo…17:08
ltomasbodulek, but that has been working... I just changed the targetPort from int to string to see if that was enough and saw that no lbaas were created17:08
*** celebdor has quit IRC17:08
ltomasbolbs17:08
ltomasbodulek, just adding a not in front of that line, creates them17:08
dulekltomasbo: Told ya, heisenbug.17:09
ltomasbobut still, how this is working!!!17:09
dulek:D17:09
ltomasboI check juriarte's env and it is working...17:09
ltomasboit is before adding the targetPort to the spec port, but still17:09
ltomasbounless it was simply timing... due to that rule failing for not having endpoints or spec17:10
ltomasbothat has been there for 2 years!! it cannot be... I must be missing something...17:11
ltomasbomaysa, wait a second, why did you check this at line 272: if ports[0].obj_attr_is_set('targetPort')17:14
ltomasbomaysams, should it be if port.obj_attr_is_set('targetPort') instead?17:14
ltomasboit should not matter for the logic though17:15
maysamsltomasbo, nop17:15
maysamsports refer to lbaas_spec.ports17:15
dulekltomasbo: It's like that to detect if that's old annotation or new.17:16
ltomasboumm, ok, I suppose it should be moved out of the if for efficiency though,17:17
maysamsGuys, I will need to leave. But will be back in a few min17:17
ltomasboI'll leave soon too17:17
dulekmaysams, ltomasbo: BTW - I haven't found better way to represent int or string than plain string, so let's go that route.17:18
ltomasboanyway, good news is that, simply moving targetPort to string seems to fix the problem17:18
ltomasbodulek, my question is, should I update that 'not' in the same patch?17:18
ltomasboit only happened after I changed that to string17:18
dulekltomasbo: I don't really know…17:19
ltomasbobefore it was working... not sure about the relation yet17:19
ltomasboand not sure how it is possible that it is working currently17:19
ltomasboumm I think I got it now...17:21
ltomasbomaybe that function name is a bit misleading17:21
ltomasbodulek, ^^ seems that what is checking is if whatever the svc handler wrote in the endpoint spec is already in sycn with whatever endpoints already have17:21
ltomasboso, until that happens, no further actions should happen on the neutron/octavia side17:22
dulekltomasbo: Oh.17:22
ltomasboso, probably by changing it to string, it never matches and that is why it was blocked there...17:22
ltomasbonow it makes sense... I knew I must have been missing something17:23
*** maysams has quit IRC17:23
ltomasboit could not be such a big bug there for 2 years...17:23
dulekltomasbo: Oh yes, if we start saving string it will never find it.17:26
dulekltomasbo: Because endpoints have it converted.17:26
ltomasbodulek, yep!17:26
dulekltomasbo: Glad you found it, I would spent hours on that.17:26
ltomasbo:)17:27
dulekltomasbo: Now how to do it properly? Obvious answer would be to always save int, but is it easily reachable?17:27
ltomasboit was simply not able to believe the 'not' should be missing...17:27
ltomasbochecking...17:27
ltomasboprobably enhancing the _is_lbaas_spec_in_sycn17:28
ltomasboand if we put 'web' check if that one is defined on the port name17:28
ltomasbothat way we can keep lbaas_spec with string, and just ensure this is ignored until endpoints and endpoints annotations are in sync17:29
ltomasboactually, at _is_lbaas_spec_in_sync, I'm not sure we actually need the port number17:32
ltomasboif the port name is there, it should be enough17:32
ltomasboyep! that is not needed!17:33
dulekltomasbo: Yup, makes sense.17:39
ltomasbothen, it may be simple to fix... updating my commit...17:43
*** gkadam__ has quit IRC17:53
ltomasbodulek, dummy question, as I've updated the LBaaSPortSpec (int to string)17:53
ltomasbodulek, test about the object/hash fail, how are you updating those?17:54
dulekltomasbo: Just copy the correct hash from tests output and put it where it should be.17:54
ltomasboahh ok17:54
dulekltomasbo: We don't care about that incompatibility as we don't support upgrading from inter-release.17:55
ltomasboyep17:55
dulekltomasbo: So inside a single release we assume we can do whatever we want. :P17:55
ltomasbotaht was my understanding17:55
ltomasbothanks!17:56
openstackgerritLuis Tomas Bolivar proposed openstack/kuryr-kubernetes master: Add support for svc with text targetPorts  https://review.openstack.org/64159817:56
*** irclogbot_1 has joined #openstack-kuryr18:03
*** rh-jelabarre has joined #openstack-kuryr18:12
*** maysams has joined #openstack-kuryr18:28
*** ccamposr has quit IRC18:43
*** pcaruana has quit IRC18:46
*** pcaruana has joined #openstack-kuryr19:05
*** pcaruana has quit IRC19:33
*** alisanhaji has quit IRC21:15
*** premsankar has quit IRC22:12
*** rh-jelabarre has quit IRC22:21

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