Bug 2075444

Summary: openshift-cloud-network-config-controller reports wrong range of IP addresses for Azure worker nodes
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: NetworkingAssignee: Andreas Karis <akaris>
Networking sub component: ovn-kubernetes QA Contact: jechen <jechen>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: low CC: jechen
Version: 4.11Flags: jechen: needinfo-
Target Milestone: ---   
Target Release: 4.10.z   
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-05-18 11:51:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2072439    
Bug Blocks: 2073475    

Comment 1 Andreas Karis 2022-04-14 08:48:58 UTC
*** Bug 2073475 has been marked as a duplicate of this bug. ***

Comment 4 jechen 2022-04-27 21:29:04 UTC
verified with pre-merged image built with cloud-network-config-controller#40

$ oc get clusterversion
NAME      VERSION                                                   AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.10.0-0.ci.test-2022-04-27-143343-ci-ln-csip8bb-latest   True        False         30m     Cluster version is 4.10.0-0.ci.test-2022-04-27-143343-ci-ln-csip8bb-latest


$ oc get -n openshift-cloud-network-config-controller all
NAME                                                  READY   STATUS    RESTARTS   AGE
pod/cloud-network-config-controller-5fcd6c944-f56sg   1/1     Running   0          72m

NAME                                              READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/cloud-network-config-controller   1/1     1            1           72m

NAME                                                        DESIRED   CURRENT   READY   AGE
replicaset.apps/cloud-network-config-controller-5fcd6c944   1         1         1       72m


$  oc logs -n openshift-cloud-network-config-controller pod/cloud-network-config-controller-5fcd6c944-f56sg | tail -10
I0427 20:11:34.579277       1 controller.go:160] Dropping key 'jechen-0427b-dp4lz-worker-westus-1' from the node workqueue
I0427 20:11:35.313930       1 controller.go:182] Assigning key: jechen-0427b-dp4lz-worker-westus-3 to node workqueue
I0427 20:11:35.501937       1 node_controller.go:106] Setting annotation: 'cloud.network.openshift.io/egress-ipconfig: [{"interface":"jechen-0427b-dp4lz-worker-westus-3-nic","ifaddr":{"ipv4":"10.0.1.0/24"},"capacity":{"ip":255}}]' on node: jechen-0427b-dp4lz-worker-westus-3
I0427 20:11:35.531491       1 controller.go:160] Dropping key 'jechen-0427b-dp4lz-worker-westus-3' from the node workqueue
I0427 20:11:36.421837       1 controller.go:182] Assigning key: jechen-0427b-dp4lz-worker-westus-2 to node workqueue
I0427 20:11:36.583916       1 node_controller.go:106] Setting annotation: 'cloud.network.openshift.io/egress-ipconfig: [{"interface":"jechen-0427b-dp4lz-worker-westus-2-nic","ifaddr":{"ipv4":"10.0.1.0/24"},"capacity":{"ip":255}}]' on node: jechen-0427b-dp4lz-worker-westus-2
I0427 20:11:36.656497       1 controller.go:160] Dropping key 'jechen-0427b-dp4lz-worker-westus-2' from the node workqueue
I0427 20:12:35.510755       1 controller.go:182] Assigning key: jechen-0427b-dp4lz-worker-westus-4 to node workqueue
I0427 20:12:35.641969       1 node_controller.go:106] Setting annotation: 'cloud.network.openshift.io/egress-ipconfig: [{"interface":"jechen-0427b-dp4lz-worker-westus-4-nic","ifaddr":{"ipv4":"10.0.1.0/24"},"capacity":{"ip":255}}]' on node: jechen-0427b-dp4lz-worker-westus-4
I0427 20:12:35.695209       1 controller.go:160] Dropping key 'jechen-0427b-dp4lz-worker-westus-4' from the node workqueue


$ oc logs -n openshift-cloud-network-config-controller  -l app=cloud-network-config-controller -f
I0427 20:11:34.579277       1 controller.go:160] Dropping key 'jechen-0427b-dp4lz-worker-westus-1' from the node workqueue
I0427 20:11:35.313930       1 controller.go:182] Assigning key: jechen-0427b-dp4lz-worker-westus-3 to node workqueue
I0427 20:11:35.501937       1 node_controller.go:106] Setting annotation: 'cloud.network.openshift.io/egress-ipconfig: [{"interface":"jechen-0427b-dp4lz-worker-westus-3-nic","ifaddr":{"ipv4":"10.0.1.0/24"},"capacity":{"ip":255}}]' on node: jechen-0427b-dp4lz-worker-westus-3
I0427 20:11:35.531491       1 controller.go:160] Dropping key 'jechen-0427b-dp4lz-worker-westus-3' from the node workqueue
I0427 20:11:36.421837       1 controller.go:182] Assigning key: jechen-0427b-dp4lz-worker-westus-2 to node workqueue
I0427 20:11:36.583916       1 node_controller.go:106] Setting annotation: 'cloud.network.openshift.io/egress-ipconfig: [{"interface":"jechen-0427b-dp4lz-worker-westus-2-nic","ifaddr":{"ipv4":"10.0.1.0/24"},"capacity":{"ip":255}}]' on node: jechen-0427b-dp4lz-worker-westus-2
I0427 20:11:36.656497       1 controller.go:160] Dropping key 'jechen-0427b-dp4lz-worker-westus-2' from the node workqueue
I0427 20:12:35.510755       1 controller.go:182] Assigning key: jechen-0427b-dp4lz-worker-westus-4 to node workqueue
I0427 20:12:35.641969       1 node_controller.go:106] Setting annotation: 'cloud.network.openshift.io/egress-ipconfig: [{"interface":"jechen-0427b-dp4lz-worker-westus-4-nic","ifaddr":{"ipv4":"10.0.1.0/24"},"capacity":{"ip":255}}]' on node: jechen-0427b-dp4lz-worker-westus-4
I0427 20:12:35.695209       1 controller.go:160] Dropping key 'jechen-0427b-dp4lz-worker-westus-4' from the node workqueue


$ oc get node
NAME                                 STATUS   ROLES    AGE   VERSION
jechen-0427b-dp4lz-master-0          Ready    master   75m   v1.23.5+b463d71
jechen-0427b-dp4lz-master-1          Ready    master   75m   v1.23.5+b463d71
jechen-0427b-dp4lz-master-2          Ready    master   75m   v1.23.5+b463d71
jechen-0427b-dp4lz-worker-westus-1   Ready    worker   56m   v1.23.5+b463d71
jechen-0427b-dp4lz-worker-westus-2   Ready    worker   56m   v1.23.5+b463d71
jechen-0427b-dp4lz-worker-westus-3   Ready    worker   56m   v1.23.5+b463d71
jechen-0427b-dp4lz-worker-westus-4   Ready    worker   55m   v1.23.5+b463d71


$ oc get network -o jsonpath='{.items[*].status.networkType}'
OVNKubernetes


$ oc label node jechen-0427b-dp4lz-worker-westus-1 "k8s.ovn.org/egress-assignable"=""
node/jechen-0427b-dp4lz-worker-westus-1 labeled

$ oc new-project test

$ oc label ns test team=red
namespace/test labeled

$ cat config_egressip1_ovn_ns_team_red_azure.yaml
apiVersion: k8s.ovn.org/v1
kind: EgressIP
metadata:
  name: egressip1
spec:
  egressIPs:
  - 10.0.1.201
  namespaceSelector:
    matchLabels:
      team: red 


$ oc create -f ./SDN-1332-test/config_egressip1_ovn_ns_team_red_azure.yaml
egressip.k8s.ovn.org/egressip1 created

$ oc get egressip
NAME        EGRESSIPS    ASSIGNED NODE                        ASSIGNED EGRESSIPS
egressip1   10.0.1.201   jechen-0427b-dp4lz-worker-westus-1   10.0.1.201


# created some test pods
$ oc create -f list_for_pods.json 
replicationcontroller/test-rc created
service/test-service created


$ oc get pod
NAME            READY   STATUS    RESTARTS   AGE
test-rc-cgxrx   1/1     Running   0          18s
test-rc-xd7zr   1/1     Running   0          18s
test-rc-xsr5k   1/1     Running   0          18s


$ oc rsh test-rc-cgxrx 
~ $ curl 10.0.99.4:9152
10.0.1.201~ $ 
~ $ 
~ $ curl 10.0.99.4:9152
10.0.1.201~ $ 
~ $ curl 10.0.99.4:9152
10.0.1.201~ $ 
~ $ curl 10.0.99.4:9152
10.0.1.201~ $ 
~ $ 
~ $ 
~ $ exit



==> egressIP works correctly

Comment 10 errata-xmlrpc 2022-05-18 11:51:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.10.14 bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2178