[Build 3060] K8S : Ingress : When service getting removed and added back, haproxy config is not getting updated
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
R4.0 |
Fix Committed
|
High
|
Yuvaraja Mariappan | |||
Trunk |
Fix Committed
|
High
|
Yuvaraja Mariappan |
Bug Description
Description:
When the service behind the Ingress is getting deleted and readded back with the same name (automatically get created with different clusterIP), Load balancer haproxy config is not getting updated in agent. Haproxy backend still pointing to old service reference. Observing a traceback in contrail-
Steps:
1. Create Service
2. Create Ingress with service
3. Delete the Service
4. Add the service back with same name.
Output
-------
1. Service is created
-------
[root@5b7s18 ~]# kubectl get svc
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes 10.96.0.1 <none> 443/TCP 8h
my-service 10.102.238.154 <none> 80/TCP 7m
2. Ingress is created
-------
[root@5b7s18 ~]# kubectl get ing
NAME HOSTS ADDRESS PORTS AGE
test-ingress * 80 6m
[root@5b7s18 ~]# kubectl get ing -o=custom-
NAME CLUSTER-IP EXTERNAL-IP
test-ingress 10.47.255.248 10.87.117.251
Haproxy config in Agent
-------
global
daemon
user haproxy
group haproxy
log /dev/log local0
log /dev/log local1 notice
ulimit-n 200000
maxconn 65000
stats socket /var/lib/
defaults
log global
retries 3
option redispatch
timeout connect 5000
timeout client 300000
timeout server 300000
frontend e3cd0c9c-
option tcplog
bind 10.47.255.248:80
mode http
option forwardfor
acl 914e7571-
use_backend 914e7571-
backend 914e7571-
mode http
balance roundrobin
option forwardfor
server 73716d04-
3. Delete the service
-------
[root@5b7s18 ~]# kubectl delete svc
error: resource(s) were provided, but no name, label selector, or --all flag specified
[root@5b7s18 ~]# kubectl delete svc my-service
service "my-service" deleted
[root@5b7s18 ~]#
[root@5b7s18 ~]#
4. Adding the service back but got created with diffrent clusterIP
-------
[root@5b7s18 ~]# kubectl create -f svc.yaml
service "my-service" created
[root@5b7s18 ~]# kubectl get svc
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes 10.96.0.1 <none> 443/TCP 8h
my-service 10.100.196.88 <none> 80/TCP 4s
Haproxy config in agent
-------
global
daemon
user haproxy
group haproxy
log /dev/log local0
log /dev/log local1 notice
ulimit-n 200000
maxconn 65000
stats socket /var/lib/
defaults
log global
retries 3
option redispatch
timeout connect 5000
timeout client 300000
timeout server 300000
frontend e3cd0c9c-
option tcplog
bind 10.47.255.248:80
mode http
option forwardfor
acl 914e7571-
use_backend 914e7571-
backend 914e7571-
mode http
balance roundrobin
option forwardfor
server 73716d04-
Traceback
-----------
The above is a description of an error in a Python program. Here is
the original traceback:
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
for port in ports:
TypeError: 'NoneType' object is not iterable
Changed in juniperopenstack: | |
importance: | Undecided → High |
assignee: | nobody → ymariappan (ymariappan) |
milestone: | none → r4.0 |
summary: |
- [Build 3060] K8S : Ingress : When service getting removed and added back - haproxy config is not getting updated + [Build 3060] K8S : Ingress : When service getting removed and added + back, haproxy config is not getting updated |
description: | updated |
information type: | Proprietary → Public |
Logs copied in below location ------- ------- ------- -- kube-manager. log build04: /auto/cores/ 1686331> pwd
-------
-rwxrwxrwx 1 chhandak epbg 3209282 Apr 26 00:53 contrail-
ubuntu-
/auto/cores/1686331