Skip to content
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

Skip setting the same hwaddr to lag port to avoid disrupting neighbor… #2602

Merged
merged 3 commits into from
Mar 23, 2019

Conversation

jipanyang
Copy link
Collaborator

… entries

Signed-off-by: Jipan Yang jipan.yang@alibaba-inc.com

- What I did
To address issue: #2600

- How I did it
If the hardware address to be set on portchannel is the same as existing one, skip the

- How to verify it
warm upgrade teamd docker.

root@vlab-01:/home/admin# show warm_restart config
name    enable    timer_name    timer_duration
------  --------  ------------  ----------------
teamd   true      NULL          NULL
swss    true      NULL          NULL
system  true      NULL          NULL



root@vlab-01:/home/admin# teamshow
Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available, S - selected, D - deselected
  No.  Team Dev         Protocol     Ports
-----  ---------------  -----------  --------------
 0001  PortChannel0001  LACP(A)(Up)  Ethernet112(S)
 0002  PortChannel0002  LACP(A)(Up)  Ethernet116(S)
 0003  PortChannel0003  LACP(A)(Up)  Ethernet120(S)
 0004  PortChannel0004  LACP(A)(Up)  Ethernet124(S)
root@vlab-01:/home/admin# 
root@vlab-01:/home/admin# vtysh

Hello, this is FRRouting (version 4.0).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

vlab-01# show ip bgp sum

IPv4 Unicast Summary:
BGP router identifier 10.1.0.32, local AS number 65100 vrf-id 0
BGP table version 9447
RIB entries 12007, using 1782 KiB of memory
Peers 8, using 154 KiB of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/P
fxRcd
10.0.0.57       4      64600    3292    3965        0    0    0 01:27:15        
 6002
10.0.0.59       4      64600    3292    3965        0    0    0 01:27:14        
 6002
10.0.0.61       4      64600    3292    3473        0    0    0 01:27:14        
 6002
10.0.0.63       4      64600    3292    3586        0    0    0 01:27:14        
 6002

Total number of neighbors 4
root@vlab-01:/home/admin# 
root@vlab-01:/home/admin# 
root@vlab-01:/home/admin# 
root@vlab-01:/home/admin# time sonic_installer upgrade_docker teamd no_hd_add/docker-teamd.gz -y
Stopping teamd ...
Command: docker exec -i teamd pkill -USR1 teamd > /dev/null

Command: sleep 2

Stopped  teamd ...
Command: systemctl stop teamd

Command: docker rm teamd 
teamd

Command: docker rmi docker-teamd:latest 
Untagged: docker-teamd:latest

Command: docker load < ././docker-teamd.gz
Loaded image: docker-teamd:latest

Command: docker tag docker-teamd:latest docker-teamd:sonic-dirty-20190224.090242

Command: systemctl restart teamd

Command: sleep 5

Done

real	0m20.697s
user	0m0.540s
sys	0m0.508s
root@vlab-01:/home/admin# 
root@vlab-01:/home/admin# vtysh

Hello, this is FRRouting (version 4.0).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

vlab-01# show ip bgp summary 

IPv4 Unicast Summary:
BGP router identifier 10.1.0.32, local AS number 65100 vrf-id 0
BGP table version 9447
RIB entries 12007, using 1782 KiB of memory
Peers 8, using 154 KiB of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/P
fxRcd
10.0.0.57       4      64600    3294    3967        0    0    0 01:29:01        
 6002
10.0.0.59       4      64600    3294    3967        0    0    0 01:29:00        
 6002
10.0.0.61       4      64600    3294    3475        0    0    0 01:29:00        
 6002
10.0.0.63       4      64600    3294    3588        0    0    0 01:29:00        
 6002

Total number of neighbors 4
vlab-01# exit

*** No neigbor delete/new netlink message received during docker restart.

2019-02-24.17:20:16.484179|LAG_TABLE:PortChannel0001|SET|mtu:9100
2019-02-24.17:20:16.485022|PORT_TABLE:Ethernet112|SET|mtu:9100
2019-02-24.17:20:16.530185|LAG_TABLE:PortChannel0002|SET|mtu:9100
2019-02-24.17:20:16.530923|PORT_TABLE:Ethernet116|SET|mtu:9100
2019-02-24.17:20:16.580937|LAG_TABLE:PortChannel0003|SET|mtu:9100
2019-02-24.17:20:16.581923|PORT_TABLE:Ethernet120|SET|mtu:9100
2019-02-24.17:20:16.624167|LAG_TABLE:PortChannel0004|SET|mtu:9100
2019-02-24.17:20:16.625899|PORT_TABLE:Ethernet124|SET|mtu:9100
2019-02-24.17:21:28.788478|LAG_TABLE:PortChannel0003|SET|admin_status:up|oper_status:up
2019-02-24.17:21:28.788529|LAG_TABLE:PortChannel0002|SET|admin_status:up|oper_status:up
2019-02-24.17:21:28.788549|LAG_TABLE:PortChannel0004|SET|admin_status:up|oper_status:up
2019-02-24.17:21:28.788565|LAG_TABLE:PortChannel0001|SET|admin_status:up|oper_status:up

*** teamd log shows hw address set skipped


Feb 24 09:20:16.410574 vlab-01 INFO teamd.sh[10000]: 2019-02-24 17:20:16,409 INFO spawned: 'teammgrd' with pid 24
Feb 24 09:20:16.420344 vlab-01 NOTICE teamd#teammgrd: :- main:25: --- Starting teammrgd ---
Feb 24 09:20:16.421249 vlab-01 NOTICE teamd#teammgrd: :- loadRedisScript:28: lua script loaded, sha: 88270a7c5c90583e56425aca8af8a4b8c39fe757
Feb 24 09:20:16.423165 vlab-01 NOTICE teamd#teammgrd: :- checkWarmStart:136: teammgrd doing warm start, restore count 53
Feb 24 09:20:16.431140 vlab-01 INFO teamd#supervisord: teammgrd Using team device "PortChannel0001".
Feb 24 09:20:16.432003 vlab-01 INFO teamd#supervisord: teammgrd 
Feb 24 09:20:16.432823 vlab-01 INFO teamd#supervisord: teammgrd Using PID file "/var/run/teamd/PortChannel0001.pid"
Feb 24 09:20:16.433638 vlab-01 INFO teamd#supervisord: teammgrd 
Feb 24 09:20:16.434465 vlab-01 INFO teamd#supervisord: teammgrd This program is not intended to be run as root.
Feb 24 09:20:16.435304 vlab-01 INFO teamd#supervisord: teammgrd 
Feb 24 09:20:16.439904 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Hwaddr string: "52:54:00:f2:93:80".
Feb 24 09:20:16.439904 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Skip setting same hwaddr string: "52:54:00:f2:93:80".
Feb 24 09:20:16.439904 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Added loop callback: daemon, 0x9363c0
Feb 24 09:20:16.439904 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Added loop callback: libteam_events, 0x9363c0
Feb 24 09:20:16.439973 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Added loop callback: workq, 0x9363c0
Feb 24 09:20:16.439973 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Using team runner "lacp".
Feb 24 09:20:16.440332 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: No Tx hash recipe found in config.
Feb 24 09:20:16.459377 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Using active "1".
Feb 24 09:20:16.459377 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Using sys_prio "32768".
Feb 24 09:20:16.459377 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Using fast_rate "0".
Feb 24 09:20:16.459377 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Using fallback "0".
Feb 24 09:20:16.459395 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Using min_ports "1".
Feb 24 09:20:16.459395 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Using agg_select_policy "lacp_prio".
Feb 24 09:20:16.459573 vlab-01 INFO teamd#teamd_PortChannel0001[29]: TX balancing disabled.
Feb 24 09:20:16.460402 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: usock: Using sockpath "/var/run/teamd/PortChannel0001.sock"
Feb 24 09:20:16.460542 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Added loop callback: usock, 0x9363c0
Feb 24 09:20:16.462502 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: <ifinfo_list>
Feb 24 09:20:16.462675 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]:  63: Ethernet112: 52:54:00:f2:93:80: 36 
Feb 24 09:20:16.462775 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]:  36: PortChannel0001: 52:54:00:f2:93:80: 0 
Feb 24 09:20:16.462865 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: </ifinfo_list>
Feb 24 09:20:16.462963 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: <port_list>
Feb 24 09:20:16.463080 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]:  63: Ethernet112: up 10Mbit FD 
Feb 24 09:20:16.463205 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: </port_list>
Feb 24 09:20:16.463300 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112: Using implicit link watch.
Feb 24 09:20:16.463392 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112: Got link watch from port config.
Feb 24 09:20:16.463483 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112: Current user link state is "down".
Feb 24 09:20:16.463575 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112: Using lacp_prio "255".
Feb 24 09:20:16.463791 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112: Using lacp_key "0".
Feb 24 09:20:16.464059 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112: Using sticky "0".
Feb 24 09:20:16.464365 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Added loop callback: lacp_socket, 0x93ae80
Feb 24 09:20:16.464578 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Added loop callback: lacp_periodic, 0x93ae80
Feb 24 09:20:16.464826 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112: Setting periodic timer to "slow".
Feb 24 09:20:16.465094 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Added loop callback: lacp_timeout, 0x93ae80
Feb 24 09:20:16.465908 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: <ifinfo_list>
Feb 24 09:20:16.466118 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]:  63: Ethernet112: 52:54:00:f2:93:80: 36 
Feb 24 09:20:16.466372 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]:  36: PortChannel0001: 52:54:00:f2:93:80: 0 
Feb 24 09:20:16.466648 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: </ifinfo_list>
Feb 24 09:20:16.466929 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: <port_list>
Feb 24 09:20:16.467205 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]:  63: Ethernet112: up 10Mbit FD 
Feb 24 09:20:16.467411 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: </port_list>
Feb 24 09:20:16.473213 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112: Setting periodic timer to "fast".
Feb 24 09:20:16.473821 vlab-01 INFO teamd#teamd_PortChannel0001[29]: Ethernet112: Changed port state: "disabled" -> "expired"
Feb 24 09:20:16.473821 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112 fallback eligible state "2 " cfg "0".
Feb 24 09:20:16.474033 vlab-01 INFO teamd#teamd_PortChannel0001[29]: Ethernet112: LACP state was read
Feb 24 09:20:16.474136 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112: Setting periodic timer to "slow".
Feb 24 09:20:16.474239 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112 fallback eligible state "2 " cfg "0".
Feb 24 09:20:16.474328 vlab-01 INFO teamd#teamd_PortChannel0001[29]: Ethernet112: Changed port state: "expired" -> "current"
Feb 24 09:20:16.474412 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112: Selecting LACP port
Feb 24 09:20:16.474671 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112: LACP port selected into aggregator 63
Feb 24 09:20:16.474763 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Selecting aggregator 63
Feb 24 09:20:16.474843 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112: Enabling port
Feb 24 09:20:16.475333 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Added loop callback: lw_ethtool_delay, 0x93aaf0
Feb 24 09:20:16.477002 vlab-01 DEBUG teamd#teamd_PortChannel0001[29]: Ethernet112: Adding port (found ifindex "63").
Feb 24 09:20:16.477875 vlab-01 INFO teamd#teamd_PortChannel0001[29]: 1.26 successfully started.
Feb 24 09:20:16.479025 vlab-01 NOTICE teamd#teammgrd: :- addLag:471: Start port channel PortChannel0001 with teamd
Feb 24 09:20:16.483411 vlab-01 NOTICE teamd#teammgrd: :- setLagAdminStatus:368: Set port channel PortChannel0001 admin status to up
Feb 24 09:20:16.485200 vlab-01 NOTICE teamd#teammgrd: :- setLagMtu:418: Set port channel PortChannel0001 MTU to 9100

- Description for the changelog

… entries

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
@jleveque
Copy link
Contributor

Retest this please

lguohan and others added 2 commits March 22, 2019 16:57
@lguohan lguohan merged commit 4e3bb4d into sonic-net:master Mar 23, 2019
yxieca pushed a commit that referenced this pull request Mar 28, 2019
…ng neighbor… (#2602)

* Skip setting the same hwaddr to lag port to avoid disrupting neighbor entries

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
tiantianlv pushed a commit to SONIC-DEV/sonic-buildimage that referenced this pull request Apr 10, 2019
…ng neighbor… (sonic-net#2602)

* Skip setting the same hwaddr to lag port to avoid disrupting neighbor entries

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
tiantianlv pushed a commit to SONIC-DEV/sonic-buildimage that referenced this pull request Apr 10, 2019
…ng neighbor… (sonic-net#2602)

* Skip setting the same hwaddr to lag port to avoid disrupting neighbor entries

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
tiantianlv pushed a commit to SONIC-DEV/sonic-buildimage that referenced this pull request Apr 10, 2019
…ng neighbor… (sonic-net#2602)

* Skip setting the same hwaddr to lag port to avoid disrupting neighbor entries

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants