Bug 2038732
Summary: | Auto egressIP for OVN cluster on GCP: podSelector in egressIP configuration does not take effect after egessIP object is created | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | jechen <jechen> |
Component: | Networking | Assignee: | Alexander Constantinescu <aconstan> |
Networking sub component: | ovn-kubernetes | QA Contact: | jechen <jechen> |
Status: | CLOSED NOTABUG | Docs Contact: | |
Severity: | high | ||
Priority: | high | CC: | anbhat, bpickard, huirwang, trozet, zzhao |
Version: | 4.10 | Flags: | jechen:
needinfo-
jechen: needinfo- |
Target Milestone: | --- | ||
Target Release: | 4.10.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-01-26 14:56:08 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
jechen
2022-01-09 22:17:02 UTC
@jechen assign this bug to you for verification this bug, thanks podSelector in egressip1 and egressip2 objects still have {} [jechen@jechen ~]$ oc get egressip -oyaml apiVersion: v1 items: - apiVersion: k8s.ovn.org/v1 kind: EgressIP metadata: creationTimestamp: "2022-01-26T00:04:39Z" generation: 3 name: egressip1 resourceVersion: "59483" uid: edf8efb3-d896-497d-b915-674a95a89fee spec: egressIPs: - 10.0.128.101 - 10.0.128.102 namespaceSelector: matchLabels: department: qe podSelector: {} <-------------------------------------------- did not display actual podSelector value status: items: - egressIP: 10.0.128.102 node: jechen-0125b-qfrcn-worker-b-rgv8t.c.openshift-qe.internal - egressIP: 10.0.128.101 node: jechen-0125b-qfrcn-worker-a-5pjsk.c.openshift-qe.internal - apiVersion: k8s.ovn.org/v1 kind: EgressIP metadata: creationTimestamp: "2022-01-26T00:04:49Z" generation: 3 name: egressip2 resourceVersion: "59552" uid: 58118466-62e4-4f8e-87d7-e995db2aad37 spec: egressIPs: - 10.0.128.201 - 10.0.128.202 namespaceSelector: matchLabels: department: qe podSelector: {} <-------------------------------------------- did not display actual podSelector value status: items: - egressIP: 10.0.128.202 node: jechen-0125b-qfrcn-worker-b-rgv8t.c.openshift-qe.internal - egressIP: 10.0.128.201 node: jechen-0125b-qfrcn-worker-a-5pjsk.c.openshift-qe.internal kind: List metadata: resourceVersion: "" selfLink: "" $ oc project test1 Now using project "test1" on server "https://api.jechen-0125b.qe.gcp.devcluster.openshift.com:6443". $ oc get pod --show-labels NAME READY STATUS RESTARTS AGE LABELS test-rc-58mjb 1/1 Running 0 50m name=test-pods,team=red test-rc-hjzfq 1/1 Running 0 50m name=test-pods $ oc rsh test-rc-58mjb ~ $ curl 10.0.0.2:8888 10.0.128.101~ $ ~ $ curl 10.0.0.2:8888 10.0.128.202~ $ ~ $ curl 10.0.0.2:8888 10.0.128.101~ $ ~ $ curl 10.0.0.2:8888 10.0.128.202~ $ ~ $ curl 10.0.0.2:8888 10.0.128.101~ $ ~ $ curl 10.0.0.2:8888 10.0.128.202~ $ ~ $ curl 10.0.0.2:8888 10.0.128.202~ $ ~ $ curl 10.0.0.2:8888 10.0.128.101~ $ ~ $ curl 10.0.0.2:8888 10.0.128.101~ $ ~ $ exit expect to see 10.0.128.101 or 10.0.128.102 being returned as they are egressIPs in egressip1 object $ oc project test2 Now using project "test2" on server "https://api.jechen-0125b.qe.gcp.devcluster.openshift.com:6443". $ oc get pod --show-labels NAME READY STATUS RESTARTS AGE LABELS test-rc-6sm46 1/1 Running 0 50m name=test-pods,team=blue test-rc-tqnrm 1/1 Running 0 50m name=test-pods $ oc rsh test-rc-6sm46 ~ $ curl 10.0.0.2:8888 10.0.128.101~ $ ~ $ curl 10.0.0.2:8888 10.0.128.102~ $ ~ $ curl 10.0.0.2:8888 10.0.128.101~ $ ~ $ curl 10.0.0.2:8888 10.0.128.101~ $ ~ $ curl 10.0.0.2:8888 10.0.128.101~ $ ~ $ curl 10.0.0.2:8888 10.0.128.102~ $ ~ $ curl 10.0.0.2:8888 10.0.128.101~ $ ~ $ curl 10.0.0.2:8888 10.0.128.102~ $ expect to see 10.0.128.201 or 10.0.128.202 being returned as they are egressIPs in egressip2 object rejecting the fix, change the state back to assigned Most things described in #comment 6 are incorrect. The podSelectors being empty means that you didn't specify any. Both of those EgressIP objects you've defined match only on one thing: all namespaces with the label "department: qe". Moreover, what you've done is have both EgressIP objects match on the same namespace label, both match "department: qe". The problem with that is that this behavior is undefined and considered a user error. All your pods are matching both EgressIP objects and are hence expected to have the egress IPs (10.0.128.101, 10.0.128.102) or (10.0.128.201, 10.0.128.202)...this is also the case. Please see https://bugzilla.redhat.com/show_bug.cgi?id=2034477#c17 for an explanation on another bug where Huiran made the same mistake. @Jean: please let me know why you think this is a bug? |