sonic-net / sonic-buildimage

Scripts which perform an installable binary image build for SONiC
Other
736 stars 1.42k forks source link

everflow monitor port does not update when it is over porchannel and the port goes down. #11841

Open tcusto opened 2 years ago

tcusto commented 2 years ago

Description

If an everflow monitor session is configured, and the destination address of the everflow session is over a portchannel, the software picks one of the portchannel links to be the monitor port. If that interface goes down, but the portchannel remains up, it does not switch to another port in the portchannel.

Steps to reproduce the issue:

  1. Setup everflow session with monitor port over a portchannel. The portchannel should be configured where bringing 1 link down will not bring down the portchannel.
$ show mirror_session 
ERSPAN Sessions
Name            Status                                    SRC IP    DST IP      GRE    DSCP    TTL  Queue    Policer    Monitor Port                          SRC Port    Direction
--------------  ----------------------------------------  --------  --------  -----  ------  -----  -------  ---------  ------------------------------------  ----------  -----------
test_session_1  {'asic0': 'inactive', 'asic1': 'active'}  1.1.1.1   2.2.2.2   35006       8      4                      {'asic0': '', 'asic1': 'Ethernet23'}

$ show interfaces portchannel 
Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available,
       S - selected, D - deselected, * - not synced
  No.  Team Dev        Protocol     Ports
-----  --------------  -----------  ---------------------------
  102  PortChannel102  LACP(A)(Up)  Ethernet6(S) Ethernet10(S)
  106  PortChannel106  LACP(A)(Up)  Ethernet27(S) Ethernet23(S)
  1. Shutdown the monitor port.
$ sudo config interface -n asic1 shutdown Ethernet23
$ show interfaces portchannel 
Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available,
       S - selected, D - deselected, * - not synced
  No.  Team Dev        Protocol     Ports
-----  --------------  -----------  ---------------------------
  102  PortChannel102  LACP(A)(Up)  Ethernet6(S) Ethernet10(S)
  106  PortChannel106  LACP(A)(Up)  Ethernet27(S) Ethernet23(D)
  1. Check the monitor port, the session is still up, but it has selected the down port.
    $ show mirror_session 
    ERSPAN Sessions
    Name            Status                                    SRC IP    DST IP      GRE    DSCP    TTL  Queue    Policer    Monitor Port                          SRC Port    Direction
    --------------  ----------------------------------------  --------  --------  -----  ------  -----  -------  ---------  ------------------------------------  ----------  -----------
    test_session_1  {'asic0': 'inactive', 'asic1': 'active'}  1.1.1.1   2.2.2.2   35006       8      4                      {'asic0': '', 'asic1': 'Ethernet23'}

Describe the results you received:

Monitor port did not update.

Describe the results you expected:

Monitor port switches to a different port on the portchannel.

Output of show version:

msft-2205

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

zhangyanzhao commented 2 years ago

feature gap.

zhangyanzhao commented 2 years ago

Bing, can you please help to take a look and create a proposal to fix this issue? Thanks.