ubuntu: route update from physical interface to vhost0 doesnt happen

Bug #1786839 reported by Senthilnathan Murugappan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R5.0
Fix Committed
Critical
alexey-mr
Trunk
Fix Committed
Critical
alexey-mr

Bug Description

1785968 which is suppose to fix the routes upon vrouter bringup doesnt work. Still the static routes are not being added.

root@5c3s1-node4:/etc/contrail/vrouter# docker stop vrouter_vrouter-agent_1
vrouter_vrouter-agent_1
root@5c3s1-node4:/etc/contrail/vrouter# rmmod vrouter
root@5c3s1-node4:/etc/contrail/vrouter# service networking restart
root@5c3s1-node4:/etc/contrail/vrouter# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.87.74.190 0.0.0.0 UG 0 0 0 em1
10.87.74.128 0.0.0.0 255.255.255.192 U 0 0 0 em1
100.64.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 tap0
192.168.1.0 192.168.2.254 255.255.255.0 UG 0 0 0 bond0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0
198.18.0.0 0.0.0.0 255.255.255.0 U 0 0 0 docker0

root@5c3s1-node4:/etc/contrail/vrouter# docker start vrouter_vrouter-agent_1
vrouter_vrouter-agent_1
root@5c3s1-node4:/etc/contrail/vrouter# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.87.74.190 0.0.0.0 UG 0 0 0 em1
10.32.0.0 192.168.2.254 255.240.0.0 UG 0 0 0 vhost0
10.87.74.128 0.0.0.0 255.255.255.192 U 0 0 0 em1
100.64.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 tap0
100.65.0.2 100.64.0.2 255.255.255.255 UGH 0 0 0 tap0
172.16.23.0 100.64.0.2 255.255.255.192 UG 0 0 0 tap0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 vhost0
198.18.0.0 0.0.0.0 255.255.255.0 U 0 0 0 docker0

Reason being when we delete the address from bond0 at https://github.com/Juniper/contrail-container-builder/commit/99ad332626f7191d998672540bc5266dae23cdb9#diff-cb27eb26636c5370a5ac45f717458007R537 the route too gets deleted.

Moving `change_route_dev $phys_int vhost0` to before address delete https://github.com/Juniper/contrail-container-builder/commit/99ad332626f7191d998672540bc5266dae23cdb9#diff-cb27eb26636c5370a5ac45f717458007R532 fixes the issue.

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

Review in progress for https://review.opencontrail.org/45547
Submitter: alexey-mr (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/45548
Submitter: alexey-mr (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/45547
Committed: http://github.com/Juniper/contrail-container-builder/commit/f9ce35bb640c2aba51c6b7104a8a0494c4ceea1d
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit f9ce35bb640c2aba51c6b7104a8a0494c4ceea1d
Author: alexey-mr <email address hidden>
Date: Tue Aug 14 08:41:11 2018 +0300

Move routes before IP deletion

Deletion of IP is lead to route to disappear
before route is moved.

Change-Id: I019f36f981dddb48cfecb761b2774837fee2bf18
Closes-Bug: #1786839

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

Reviewed: https://review.opencontrail.org/45548
Committed: http://github.com/Juniper/contrail-container-builder/commit/014ccdb07329e4ccfec4112c5840abc4e32c4c8c
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit 014ccdb07329e4ccfec4112c5840abc4e32c4c8c
Author: alexey-mr <email address hidden>
Date: Tue Aug 14 08:41:11 2018 +0300

Move routes before IP deletion

Deletion of IP is lead to route to disappear
before route is moved.

Change-Id: I019f36f981dddb48cfecb761b2774837fee2bf18
Closes-Bug: #1786839

Revision history for this message
Ritam Gangopadhyay (ritam) wrote :

Seeing this again with 5.0 build 291. Especially for multiple static routes under one inetrface in /etc/network/interfaces only the first route is being moved to the vhost0 inetrface.

root@5c3s1-node2:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
root@5c3s1-node2:~#

root@5c3s1-node2:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.87.74.190 0.0.0.0 UG 0 0 0 em1
10.87.74.128 0.0.0.0 255.255.255.192 U 0 0 0 em1
172.16.0.0 192.168.1.254 255.255.0.0 UG 0 0 0 bond0 <<<<< This is the second route in network interfaces.
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0
192.168.2.0 192.168.1.254 255.255.255.0 UG 0 0 0 bond0
root@5c3s1-node2:~# docker start vrouter_vrouter-agent_1
vrouter_vrouter-agent_1
root@5c3s1-node2:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.87.74.190 0.0.0.0 UG 0 0 0 em1
10.87.74.128 0.0.0.0 255.255.255.192 U 0 0 0 em1
169.254.0.4 0.0.0.0 255.255.255.255 UH 0 0 0 vhost0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 vhost0
192.168.2.0 192.168.1.254 255.255.255.0 UG 0 0 0 vhost0

Revision history for this message
alexey-mr (alexey-morlang) wrote :

May I get access to the setup?

Revision history for this message
Ritam Gangopadhyay (ritam) wrote :

10.87.74.130 has a compute.

but this is basically reproducible on any vrouter. just stop the vrouter agent add a route to the physical interface and bring up the vrouter agent and you will see the route not getting moved to the vhost0 interface.

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

Review in progress for https://review.opencontrail.org/47224
Submitter: alexey-mr (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/47225
Submitter: alexey-mr (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/47225
Committed: http://github.com/Juniper/contrail-container-builder/commit/e6d068989f2efc72263edbc84bf104cd49090a9e
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit e6d068989f2efc72263edbc84bf104cd49090a9e
Author: alexey-mr <email address hidden>
Date: Tue Oct 23 17:32:07 2018 +0300

Move routes after ip assignment

- in case if no default routes on phys iface
some routes are not moved till a route matched own IP
is assigned.

Change-Id: I493396eb5865fd338241569c59a1680818385b58
Closes-Bug: #1786839

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

Reviewed: https://review.opencontrail.org/47224
Committed: http://github.com/Juniper/contrail-container-builder/commit/2a20c7bd7676ed5fecd0d0e8673d119f839d0e0e
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 2a20c7bd7676ed5fecd0d0e8673d119f839d0e0e
Author: alexey-mr <email address hidden>
Date: Tue Oct 23 17:32:07 2018 +0300

Move routes after ip assignment

- in case if no default routes on phys iface
some routes are not moved till a route matched own IP
is assigned.

Change-Id: I493396eb5865fd338241569c59a1680818385b58
Closes-Bug: #1786839

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.