[K8S Nested]: Load balancing is not happening across all the backend POD

Bug #1710811 reported by chhandak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.0
Fix Committed
Critical
Hari Prasad Killi
Trunk
Fix Committed
Critical
Yuvaraja Mariappan

Bug Description

Description:
In K8S nested setup, for a service, traffic is always landing on same backend pod rather load balancing.
For Service IP, agent programmed backend PODs as the active backup instead of active-active.
Vrouter is having only one entry as next hop instead of composite next hop.

Setup Details
--------------
*Single node contrail openstack cluster. Launched 3 VM. 1 acting as K8S master and other 2 as slaves.

*Service is created with 2 backend pods, launched on each nodes (VM)

* When a 3rd POD trying to access service, it is getting redirect to one backend pod only

Debug output
-------------

2017-08-15 05:59:40,796 - WARNING - No http hit seen for one or more pods.Pls check. Hits: {'ctest-nginx-pod-80890072': 10, 'ctest-nginx-pod-36674000': 0}
> /contrail-test/common/k8s/base.py(379)validate_nginx_lb()

root@vm-test-1:~# kubectl describe svc ctest-nginx-svc-76482655 -n ctest-namespace-80473558
Name: ctest-nginx-svc-76482655
Namespace: ctest-namespace-80473558
Labels: <none>
Annotations: <none>
Selector: app=http_test
Type: ClusterIP
IP: 10.107.220.45
Port: <unset> 80/TCP
Endpoints: 10.47.255.248:80,10.47.255.249:80
Session Affinity: None
Events: <none>

root@5b8s38:~# rt --dump 1 | grep 10.107.220.45
10.107.220.45/32 32 PT - 43 -
root@5b8s38:~# nh --get 43
Id:43 Type:Encap Fmly: AF_INET Rid:0 Ref_cnt:5 Vrf:1
              Flags:Valid, Policy, Etree Root,
              EncapFmly:0806 Oif:8 Len:18
              Encap Data: 02 e5 f7 0c 28 81 00 00 5e 00 01 00 81 00 00 32 08 00

root@5b8s38:~# vif --get 8
Vrouter Interface Table

Flags: P=Policy, X=Cross Connect, S=Service Chain, Mr=Receive Mirror
       Mt=Transmit Mirror, Tc=Transmit Checksum Offload, L3=Layer 3, L2=Layer 2
       D=DHCP, Vp=Vhost Physical, Pr=Promiscuous, Vnt=Native Vlan Tagged
       Mnp=No MAC Proxy, Dpdk=DPDK PMD Interface, Rfl=Receive Filtering Offload, Mon=Interface is Monitored
       Uuf=Unknown Unicast Flood, Vof=VLAN insert/strip offload, Df=Drop New Flows, L=MAC Learning Enabled
       Proxy=MAC Requests Proxied Always, Er=Etree Root

vif0/8 ctest-namespace-80473558__ctest-nginx-pod-80890072 Vlan(o/i)(,S): 50/50 Bridge Index: 0 Parent:vif0/4
            Type:Virtual(Vlan) HWaddr:00:00:5e:00:01:00 IPaddr:0 >>> Traffic is also coming to same POD
            Vrf:1 Flags:PL3DEr QOS:-1 Ref:5
            RX packets:476 bytes:26180 errors:0
            TX packets:515 bytes:26532 errors:0
            Drops:427

Agent Config
-------------
type:instance-ip name:ctest-nginx-svc-76482655__aae261e2-18df-4493-9b3f-a372c495826e instance-ip-address:10.107.220.45 instance-ip-secondary:false instance-ip-local-ip:false service-instance-ip:false service-health-check-ip:false id-perms permissions owner:cloud-admin owner-access:7 group:cloud-admin-group group-access:7 other-access:7 uuid uuid-mslong:12313511954892145811 uuid-lslong:11186839712731333230 Uuid : aae261e2-18df-4493-9b3f-a372c495826e enable:true created:2017-08-15T05:59:27 last-modified:2017-08-15T05:59:27 user-visible:true display-name:ctest-nginx-svc-76482655 Adjacencies:

Api Server Loadbalancer memebers
---------------------------------
{
    "loadbalancer-pool": {
        "display_name": "ctest-nginx-svc-76482655__e5b2434e-817e-11e7-b94d-02a4b482907a-TCP-80-f11a51a9-5df0-40a8-ac20-6ee40b917b5b",
        "fq_name": [
            "default-domain",
            "admin",
            "ctest-nginx-svc-76482655__e5b2434e-817e-11e7-b94d-02a4b482907a-TCP-80-f11a51a9-5df0-40a8-ac20-6ee40b917b5b"
        ],
        "href": "http://127.0.0.1:8095/loadbalancer-pool/c9b845de-c5d2-4a0d-908c-f4eb71911455",
        "id_perms": {
            "created": "2017-08-15T05:59:28.100687",
            "creator": null,
            "description": null,
            "enable": true,
            "last_modified": "2017-08-15T05:59:28.100687",
            "permissions": {
                "group": "admin",
                "group_access": 7,
                "other_access": 7,
                "owner": "admin",
                "owner_access": 7
            },
            "user_visible": true,
            "uuid": {
                "uuid_lslong": 10415969330260939861,
                "uuid_mslong": 14535444620442225165
            }
        },
        "loadbalancer_listener_refs": [
            {
                "attr": null,
                "href": "http://127.0.0.1:8095/loadbalancer-listener/f11a51a9-5df0-40a8-ac20-6ee40b917b5b",
                "to": [
                    "default-domain",
                    "admin",
                    "ctest-nginx-svc-76482655__e5b2434e-817e-11e7-b94d-02a4b482907a-TCP-80-f11a51a9-5df0-40a8-ac20-6ee40b917b5b"
                ],
                "uuid": "f11a51a9-5df0-40a8-ac20-6ee40b917b5b"
            }
        ],
        "loadbalancer_members": [
            {
                "href": "http://127.0.0.1:8095/loadbalancer-member/8e035f17-a65a-4e36-ae03-8c91054e75b0",
                "to": [
                    "default-domain",
                    "admin",
                    "ctest-nginx-svc-76482655__e5b2434e-817e-11e7-b94d-02a4b482907a-TCP-80-f11a51a9-5df0-40a8-ac20-6ee40b917b5b",
                    "8e035f17-a65a-4e36-ae03-8c91054e75b0"
                ],
                "uuid": "8e035f17-a65a-4e36-ae03-8c91054e75b0"
            },
            {
                "href": "http://127.0.0.1:8095/loadbalancer-member/6cc3abdd-3ca6-422d-be34-9bf7c8737471",
                "to": [
                    "default-domain",
                    "admin",
                    "ctest-nginx-svc-76482655__e5b2434e-817e-11e7-b94d-02a4b482907a-TCP-80-f11a51a9-5df0-40a8-ac20-6ee40b917b5b",
                    "6cc3abdd-3ca6-422d-be34-9bf7c8737471"
                ],
                "uuid": "6cc3abdd-3ca6-422d-be34-9bf7c8737471"
            }

chhandak (chhandak)
Changed in juniperopenstack:
importance: Undecided → Critical
assignee: nobody → Sachchidanand Vaidya (vaidyasd)
milestone: none → r4.0.1.0
tags: added: contrail-kube-manager
tags: added: blocker
information type: Proprietary → Public
chhandak (chhandak)
description: updated
chhandak (chhandak)
description: updated
Changed in juniperopenstack:
assignee: Sachchidanand Vaidya (vaidyasd) → Yuvaraja Mariappan (ymariappan)
Revision history for this message
Yuvaraja Mariappan (ymariappan) wrote :

It seems config is good. It has to be analyzed in the agent side.
hari is looking into it. so reassigning to hari.

Changed in juniperopenstack:
assignee: Yuvaraja Mariappan (ymariappan) → Hari Prasad Killi (haripk)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/35033
Submitter: Hari Prasad Killi (<email address hidden>)

Changed in juniperopenstack:
milestone: r4.0.1.0 → r4.1.0.0-fcs
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/35033
Committed: http://github.com/Juniper/contrail-controller/commit/b9637384356dbe9de34ac3643784bd150afb63c2
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit b9637384356dbe9de34ac3643784bd150afb63c2
Author: Hari Prasad Killi <email address hidden>
Date: Tue Aug 29 14:25:38 2017 +0530

Use the correct mac as source MAC while sending ARP requests

While sending ARP request for a sub-interface, agent is using parent interface
as the source MAC.

Change-Id: I4b63c1176213144818a35799ecaa99280a050db6
partial-bug: #1710811

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/35111
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/35130
Submitter: Hari Prasad Killi (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/35170
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/35111
Committed: http://github.com/Juniper/contrail-controller/commit/12568e778c9bbd6c07a71ddb3d852ebc1c92f0ab
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit 12568e778c9bbd6c07a71ddb3d852ebc1c92f0ab
Author: Yuvaraja Mariappan <email address hidden>
Date: Wed Aug 30 14:34:14 2017 -0700

Fixed k8s-nested service issues

1. VMVN add and delete message wont be sent to agent
for nested mode
2. Exception handler is added in deallocate_floating_ips
in vnc_service.py

Change-Id: I4c094d8c2075ca67dc10f238be3b931bc5ab164d
Partial-bug: #1710811

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/35130
Committed: http://github.com/Juniper/contrail-controller/commit/7e6bdccadb4a0847b8303dd7d2dd4b56da0bd4ac
Submitter: Zuul (<email address hidden>)
Branch: master

commit 7e6bdccadb4a0847b8303dd7d2dd4b56da0bd4ac
Author: Hari Prasad Killi <email address hidden>
Date: Thu Aug 31 13:35:16 2017 +0530

Use the correct mac as source MAC while sending ARP requests

While sending ARP request for a sub-interface, agent is using parent interface
as the source MAC.

Change-Id: I26e1d88dbb85368ae867a3258689d9bf7d56241d
partial-bug: #1710811

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/35170
Committed: http://github.com/Juniper/contrail-controller/commit/811bb769e211d2e03525d531741f72c2dd385898
Submitter: Zuul (<email address hidden>)
Branch: master

commit 811bb769e211d2e03525d531741f72c2dd385898
Author: Yuvaraja Mariappan <email address hidden>
Date: Wed Aug 30 14:34:14 2017 -0700

Fixed k8s-nested service issues

1. VMVN add and delete message wont be sent to agent
for nested mode
2. Exception handler is added in deallocate_floating_ips
in vnc_service.py

Change-Id: I4c094d8c2075ca67dc10f238be3b931bc5ab164d
Partial-bug: #1710811

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.