Skip to content

remove staticd.conf.j2 #9182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 24, 2021
Merged

Conversation

arlakshm
Copy link
Contributor

@arlakshm arlakshm commented Nov 5, 2021

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan [email protected]

Why I did it

resolves #8979 and #9055

How I did it

Remove the file static.conf.j2,which adds the default route on eth0 from frr docker

How to verify it

  • Check no default route present on eth0 when all eBGP sessions are shutdown
admin@str2-sonic-lc3-1:~$ show ip bgp summary

IPv4 Unicast Summary:
BGP router identifier 10.3.147.15, local AS number 65100 vrf-id 0
BGP table version 144872
RIB entries 425, using 81600 bytes of memory
Peers 23, using 501768 KiB of memory
Peer groups 3, using 192 bytes of memory


Neighbhor      V     AS    MsgRcvd    MsgSent    TblVer    InQ    OutQ  Up/Down    State/PfxRcd    NeighborName
-----------  ---  -----  ---------  ---------  --------  -----  ------  ---------  --------------  --------------
3.3.3.6        4  65100        806     191275         0      0       0  00:02:59   1458
3.3.3.7        4  65100        806     191275         0      0       0  00:02:59   1458
10.0.0.1       4  65200       4277      10673         0      0       0  00:00:54   Idle (Admin)    ARISTA01T3
10.0.0.9       4  65202       4278      13527         0      0       0  00:00:49   Idle (Admin)    ARISTA05T3
10.0.0.13      4  65203       4276      10985         0      0       0  00:00:54   Idle (Admin)    ARISTA07T3
10.0.0.17      4  65204       4276      11024         0      0       0  00:00:54   Idle (Admin)    ARISTA09T3
10.0.0.21      4  65205       4274      11141         0      0       0  00:00:53   Idle (Admin)    ARISTA11T3
10.0.0.25      4  65206       4276      11219         0      0       0  00:00:53   Idle (Admin)    ARISTA13T3
10.0.0.29      4  65207       4275      11297         0      0       0  00:00:53   Idle (Admin)    ARISTA15T3
10.0.0.33      4  65208       4274      11336         0      0       0  00:00:52   Idle (Admin)    ARISTA17T3
10.0.0.37      4  65210       4276      11454         0      0       0  00:00:52   Idle (Admin)    ARISTA19T3
10.0.0.39      4  65211       4275      11571         0      0       0  00:00:52   Idle (Admin)    ARISTA20T3
10.0.0.41      4  65212       4276      11688         0      0       0  00:00:51   Idle (Admin)    ARISTA21T3
10.0.0.43      4  65213       4276      11805         0      0       0  00:00:51   Idle (Admin)    ARISTA22T3
10.0.0.45      4  65214       4276      11961         0      0       0  00:00:51   Idle (Admin)    ARISTA23T3
10.0.0.47      4  65215       4275      12156         0      0       0  00:00:50   Idle (Admin)    ARISTA24T3
10.0.0.49      4  65216       4278      12312         0      0       0  00:00:50   Idle (Admin)    ARISTA25T3
10.0.0.51      4  65217       4278      12507         0      0       0  00:00:50   Idle (Admin)    ARISTA26T3
10.0.0.53      4  65218       4277      12585         0      0       0  00:00:50   Idle (Admin)    ARISTA27T3
10.0.0.55      4  65219       4277      12780         0      0       0  00:00:49   Idle (Admin)    ARISTA28T3
10.0.0.57      4  65220       4278      12936         0      0       0  00:00:49   Idle (Admin)    ARISTA29T3
10.0.0.59      4  65221       4278      13054         0      0       0  00:00:49   Idle (Admin)    ARISTA30T3
10.0.0.61      4  65222       4278      13296         0      0       0  00:00:49   Idle (Admin)    ARISTA31T3

Total number of neighbors 23
admin@str2-sonic-lc3-1:~$ show ip route 0.0.0.0/0

admin@str2-sonic-lc3-1:~$ 
  • Start the eBGP session and verify the default route is learnt from all the external peers and install in APP_DB
admin@str2-sonic-lc3-1:~$ sudo config bgp startup all
Starting up BGP session with neighbor 10.0.0.1...
Starting up BGP session with neighbor 10.0.0.13...
Starting up BGP session with neighbor 10.0.0.17...
Starting up BGP session with neighbor 10.0.0.21...
Starting up BGP session with neighbor 10.0.0.25...
Starting up BGP session with neighbor 10.0.0.29...
Starting up BGP session with neighbor 10.0.0.33...
Starting up BGP session with neighbor 10.0.0.37...
Starting up BGP session with neighbor 10.0.0.39...
Starting up BGP session with neighbor 10.0.0.41...
Starting up BGP session with neighbor 10.0.0.43...
Starting up BGP session with neighbor 10.0.0.45...
Starting up BGP session with neighbor 10.0.0.47...
Starting up BGP session with neighbor 10.0.0.49...
Starting up BGP session with neighbor 10.0.0.51...
Starting up BGP session with neighbor 10.0.0.53...
Starting up BGP session with neighbor 10.0.0.55...
Starting up BGP session with neighbor 10.0.0.57...
Starting up BGP session with neighbor 10.0.0.59...
Starting up BGP session with neighbor 10.0.0.61...
Starting up BGP session with neighbor 10.0.0.9...
Starting up BGP session with neighbor fc00::12...
Starting up BGP session with neighbor fc00::1a...
Starting up BGP session with neighbor fc00::2...
Starting up BGP session with neighbor fc00::22...
Starting up BGP session with neighbor fc00::2a...
Starting up BGP session with neighbor fc00::32...
Starting up BGP session with neighbor fc00::3a...
Starting up BGP session with neighbor fc00::42...
Starting up BGP session with neighbor fc00::4a...
Starting up BGP session with neighbor fc00::4e...
Starting up BGP session with neighbor fc00::52...
Starting up BGP session with neighbor fc00::56...
Starting up BGP session with neighbor fc00::5a...
Starting up BGP session with neighbor fc00::5e...
Starting up BGP session with neighbor fc00::62...
Starting up BGP session with neighbor fc00::66...
Starting up BGP session with neighbor fc00::6a...
Starting up BGP session with neighbor fc00::6e...
Starting up BGP session with neighbor fc00::72...
Starting up BGP session with neighbor fc00::76...
Starting up BGP session with neighbor fc00::7a...
admin@str2-sonic-lc3-1:~$ show ip route 0.0.0.0/0
Routing entry for 0.0.0.0/0
  Known via "bgp", distance 20, metric 0, best
  Last update 00:00:15 ago
  * 10.0.0.1, via PortChannel0002, weight 1
  * 10.0.0.9, via PortChannel0004, weight 1
  * 10.0.0.13, via PortChannel0006, weight 1
  * 10.0.0.17, via PortChannel0008, weight 1
  * 10.0.0.21, via PortChannel0010, weight 1
  * 10.0.0.25, via PortChannel0012, weight 1
  * 10.0.0.29, via PortChannel0014, weight 1
  * 10.0.0.33, via Ethernet64, weight 1
  * 10.0.0.37, via Ethernet72, weight 1
  * 10.0.0.39, via Ethernet76, weight 1
  * 10.0.0.41, via Ethernet80, weight 1
  * 10.0.0.43, via Ethernet84, weight 1
  * 10.0.0.45, via Ethernet88, weight 1
  * 10.0.0.47, via Ethernet92, weight 1
  * 10.0.0.49, via Ethernet96, weight 1
  * 10.0.0.51, via Ethernet100, weight 1
  * 10.0.0.53, via Ethernet104, weight 1
  * 10.0.0.55, via Ethernet108, weight 1
  * 10.0.0.57, via Ethernet112, weight 1
  * 10.0.0.59, via Ethernet116, weight 1
  * 10.0.0.61, via Ethernet120, weight 1


admin@str2-sonic-lc3-1:~$ redis-cli HGETALL "ROUTE_TABLE:0.0.0.0/0"
1) "ifname"
2) "PortChannel0002,PortChannel0004,PortChannel0006,PortChannel0008,PortChannel0010,PortChannel0012,PortChannel0014,Ethernet64,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120"
3) "nexthop"
4) "10.0.0.1,10.0.0.9,10.0.0.13,10.0.0.17,10.0.0.21,10.0.0.25,10.0.0.29,10.0.0.33,10.0.0.37,10.0.0.39,10.0.0.41,10.0.0.43,10.0.0.45,10.0.0.47,10.0.0.49,10.0.0.51,10.0.0.53,10.0.0.55,10.0.0.57,10.0.0.59,10.0.0.61"
admin@str2-sonic-lc3-1:~$
  • Shutdown eBGP session and verify the default route is removed from kernel and APP_DB
admin@str2-sonic-lc3-1:~$
admin@str2-sonic-lc3-1:~$ sudo config bgp shutdown all
Shutting down BGP session with neighbor 10.0.0.1...
Shutting down BGP session with neighbor 10.0.0.13...
Shutting down BGP session with neighbor 10.0.0.17...
Shutting down BGP session with neighbor 10.0.0.21...
Shutting down BGP session with neighbor 10.0.0.25...
Shutting down BGP session with neighbor 10.0.0.29...
Shutting down BGP session with neighbor 10.0.0.33...
Shutting down BGP session with neighbor 10.0.0.37...
Shutting down BGP session with neighbor 10.0.0.39...
Shutting down BGP session with neighbor 10.0.0.41...
Shutting down BGP session with neighbor 10.0.0.43...
Shutting down BGP session with neighbor 10.0.0.45...
Shutting down BGP session with neighbor 10.0.0.47...
Shutting down BGP session with neighbor 10.0.0.49...
Shutting down BGP session with neighbor 10.0.0.51...
Shutting down BGP session with neighbor 10.0.0.53...
Shutting down BGP session with neighbor 10.0.0.55...
Shutting down BGP session with neighbor 10.0.0.57...
Shutting down BGP session with neighbor 10.0.0.59...
Shutting down BGP session with neighbor 10.0.0.61...
Shutting down BGP session with neighbor 10.0.0.9...
Shutting down BGP session with neighbor fc00::12...
Shutting down BGP session with neighbor fc00::1a...
Shutting down BGP session with neighbor fc00::2...
Shutting down BGP session with neighbor fc00::22...
Shutting down BGP session with neighbor fc00::2a...
Shutting down BGP session with neighbor fc00::32...
Shutting down BGP session with neighbor fc00::3a...
Shutting down BGP session with neighbor fc00::42...
Shutting down BGP session with neighbor fc00::4a...
Shutting down BGP session with neighbor fc00::4e...
Shutting down BGP session with neighbor fc00::52...
Shutting down BGP session with neighbor fc00::56...
Shutting down BGP session with neighbor fc00::5a...
Shutting down BGP session with neighbor fc00::5e...
Shutting down BGP session with neighbor fc00::62...
Shutting down BGP session with neighbor fc00::66...
Shutting down BGP session with neighbor fc00::6a...
Shutting down BGP session with neighbor fc00::6e...
Shutting down BGP session with neighbor fc00::72...
Shutting down BGP session with neighbor fc00::76...
Shutting down BGP session with neighbor fc00::7a...
admin@str2-sonic-lc3-1:~$ redis-cli HGETALL "ROUTE_TABLE:0.0.0.0/0"
(empty array)
admin@str2-sonic-lc3-1:~$

To verify the issue #8979 check if the default route is present in APP_DB on the peer linecard

admin@str2-sonic-lc6-1:~$ show ip route 0.0.0.0/0
Routing entry for 0.0.0.0/0
  Known via "bgp", distance 200, metric 0, best
  Last update 00:00:09 ago
    10.0.0.1 (recursive), weight 1
  *   10.0.0.1, via Ethernet-IB0 onlink, weight 1
    10.0.0.9 (recursive), weight 1
  *   10.0.0.9, via Ethernet-IB0 onlink, weight 1
    10.0.0.13 (recursive), weight 1
  *   10.0.0.13, via Ethernet-IB0 onlink, weight 1
    10.0.0.17 (recursive), weight 1
  *   10.0.0.17, via Ethernet-IB0 onlink, weight 1
    10.0.0.21 (recursive), weight 1
  *   10.0.0.21, via Ethernet-IB0 onlink, weight 1
    10.0.0.25 (recursive), weight 1
  *   10.0.0.25, via Ethernet-IB0 onlink, weight 1
    10.0.0.29 (recursive), weight 1
  *   10.0.0.29, via Ethernet-IB0 onlink, weight 1
    10.0.0.33 (recursive), weight 1
  *   10.0.0.33, via Ethernet-IB0 onlink, weight 1
    10.0.0.37 (recursive), weight 1
  *   10.0.0.37, via Ethernet-IB0 onlink, weight 1
    10.0.0.39 (recursive), weight 1
  *   10.0.0.39, via Ethernet-IB0 onlink, weight 1
    10.0.0.41 (recursive), weight 1
  *   10.0.0.41, via Ethernet-IB0 onlink, weight 1
    10.0.0.43 (recursive), weight 1
  *   10.0.0.43, via Ethernet-IB0 onlink, weight 1
    10.0.0.45 (recursive), weight 1
  *   10.0.0.45, via Ethernet-IB0 onlink, weight 1
    10.0.0.47 (recursive), weight 1
  *   10.0.0.47, via Ethernet-IB0 onlink, weight 1
    10.0.0.49 (recursive), weight 1
  *   10.0.0.49, via Ethernet-IB0 onlink, weight 1
    10.0.0.51 (recursive), weight 1
  *   10.0.0.51, via Ethernet-IB0 onlink, weight 1
    10.0.0.53 (recursive), weight 1
  *   10.0.0.53, via Ethernet-IB0 onlink, weight 1
    10.0.0.55 (recursive), weight 1
  *   10.0.0.55, via Ethernet-IB0 onlink, weight 1
    10.0.0.57 (recursive), weight 1
  *   10.0.0.57, via Ethernet-IB0 onlink, weight 1
    10.0.0.59 (recursive), weight 1
  *   10.0.0.59, via Ethernet-IB0 onlink, weight 1
    10.0.0.61 (recursive), weight 1
  *   10.0.0.61, via Ethernet-IB0 onlink, weight 1


admin@str2-sonic-lc6-1:~$ redis-cli -n 0 KEYS *0.0.0.0/0*
1) "ROUTE_TABLE:0.0.0.0/0"
admin@str2-sonic-lc6-1:~$ redis-cli -n 0 HGETALL *0.0.0.0/0*
(empty array)
admin@str2-sonic-lc6-1:~$ redis-cli -n 0 HGETALL "ROUTE_TABLE:0.0.0.0/0"
1) "ifname"
2) "Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0,Ethernet-IB0"
3) "nexthop"
4) "10.0.0.1,10.0.0.9,10.0.0.13,10.0.0.17,10.0.0.21,10.0.0.25,10.0.0.29,10.0.0.33,10.0.0.37,10.0.0.39,10.0.0.41,10.0.0.43,10.0.0.45,10.0.0.47,10.0.0.49,10.0.0.51,10.0.0.53,10.0.0.55,10.0.0.57,10.0.0.59,10.0.0.61"
admin@str2-sonic-lc6-1:~$

Which release branch to backport (provide reason below if selected)

  • 201811
  • [ x] 201911
  • 202006
  • [ x] 202012
  • [ x] 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
@arlakshm arlakshm requested a review from lguohan as a code owner November 5, 2021 06:45
@arlakshm arlakshm requested review from prsunny and abdosi November 5, 2021 06:45
@arlakshm arlakshm linked an issue Nov 5, 2021 that may be closed by this pull request
@abdosi
Copy link
Contributor

abdosi commented Nov 5, 2021

@arlakshm can we test the behavior if we have default route learnt via bgp and also eth0 default route and if we toggle eth0 interface how does it impact dataplane/app_db default ?

@prsunny prsunny requested a review from shi-su November 5, 2021 21:25
Copy link
Contributor

@shi-su shi-su left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me. Should be ready to merge once there is an agreement that it does not cause any side effects.

@arlakshm
Copy link
Contributor Author

arlakshm commented Nov 6, 2021

@arlakshm can we test the behavior if we have default route learnt via bgp and also eth0 default route and if we toggle eth0 interface how does it impact dataplane/app_db default ?

@abdosi, @prsunny. On toggling the eth0 the default route is removed from APP_DB on master and 201231 images without this fix. Details in issue #9188. This seems to be different issue.

@arlakshm
Copy link
Contributor Author

@arlakshm can we test the behavior if we have default route learnt via bgp and also eth0 default route and if we toggle eth0 interface how does it impact dataplane/app_db default ?

@abdosi, @prsunny. On toggling the eth0 the default route is removed from APP_DB on master and 201231 images without this fix. Details in issue #9188. This seems to be different issue.
@prsunny, @abdosi, on flapping eth0 link by shutting down the port on the peer device, default route is not removed. Please find the logs for image with the changes of this PR.
pr_9182_test.log

@arlakshm
Copy link
Contributor Author

arlakshm commented Nov 24, 2021

@arlakshm can we test the behavior if we have default route learnt via bgp and also eth0 default route and if we toggle eth0 interface how does it impact dataplane/app_db default ?

@abdosi, @prsunny. On toggling the eth0 the default route is removed from APP_DB on master and 201231 images without this fix. Details in issue #9188. This seems to be different issue.
@prsunny, @abdosi, on flapping eth0 link by shutting down the port on the peer device, default route is not removed. Please find the logs for image with the changes of this PR.
pr_9182_test.log

Please take a look and approve if no other comments

Copy link
Contributor

@abdosi abdosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arlakshm can we check for 201911 also so that we can cherry-pick also.

@arlakshm arlakshm merged commit 5830852 into sonic-net:master Nov 24, 2021
qiluo-msft pushed a commit that referenced this pull request Dec 1, 2021
Why I did it
resolves #8979 and #9055

How I did it
Remove the file static.conf.j2,which adds the default route on eth0 from bgp docker

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
antonptashnik added a commit to antonptashnik/sonic-mgmt that referenced this pull request Dec 15, 2021
- added a missing destinatio route
Tests checking the Everflow feature on egress stage rely on a default static route to forward packets but the route was removed recently from SONiC so packets get dropped and mirroring is skipped. The route removed in sonic-net/sonic-buildimage#9182
bingwang-ms pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Dec 20, 2021
… flow (#4850)

* fixed egress Everflow tests
- added a missing destination route
Tests checking the Everflow feature on egress stage rely on a default static route to forward packets but the route was removed recently from SONiC so packets get dropped and mirroring is skipped. The route removed in sonic-net/sonic-buildimage#9182
@arlakshm arlakshm mentioned this pull request Dec 29, 2021
5 tasks
AntonHryshchuk pushed a commit to AntonHryshchuk/sonic-mgmt that referenced this pull request Jan 4, 2022
… flow (sonic-net#4850)

* fixed egress Everflow tests
- added a missing destination route
Tests checking the Everflow feature on egress stage rely on a default static route to forward packets but the route was removed recently from SONiC so packets get dropped and mirroring is skipped. The route removed in sonic-net/sonic-buildimage#9182
arlakshm added a commit that referenced this pull request Jan 19, 2022
Why I did it
resolves #8979 and #9055

How I did it
Remove the file static.conf.j2,which adds the default route on eth0 from bgp docker

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants