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

[Teamd] Question about LAG fallback #951

Open
chenkelly opened this issue Jun 26, 2019 · 11 comments
Open

[Teamd] Question about LAG fallback #951

chenkelly opened this issue Jun 26, 2019 · 11 comments
Assignees

Comments

@chenkelly
Copy link

To check sonic-net/sonic-buildimage#1118, SONiC only support LACP fallback for single-member-port LAG.
After enabling LAG fallback and only add one port to LAG, expected that LAG state shall keep in up state before receiving any LACP PDUs.
We try to test LACP fallback function on 201904 version, but found that single-member-port LAG state is down.
Is this a bug? Are there any configuration errors?
Additionally, refer to
https://github.com/Azure/SONiC/blob/master/doc/lag/LACP%20Fallback%20Feature%20for%20SONiC_v0.5.md and
https://github.com/Azure/SONiC/blob/master/doc/lag/LACP%20Fallback%20Test%20Plan.md#test-case-1---fallback-verification,
we are confused, do LACP fallback support for multiple member ports?
Thanks

[Test Environment]
Connect the LAG to a another device without LACP running.

[Test Procedures]

  1. To create PortChannel001 with fallback is enabled, and add Ethernet0 to LAG.
    sonic-cfggen -j lacp_one_member.json --write-to-db
    Below is the content of lacp_one_member.json.
{
    "PORTCHANNEL": {
            "PortChannel001": {
                "admin_status": "up",
                "min_links": "1",
                "fallback": "true",
                "mtu": "9100"
            }
    },
    "PORTCHANNEL_MEMBER": {
        "PortChannel001|Ethernet0": {}
    }
}
  1. Show LAG information, LAG state is down, member is selected without synced.
root@sonic:/usr# 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
-----  --------------  -----------  -------------
  001  PortChannel001  LACP(A)(Dw)  Ethernet0(S*)

root@sonic:/usr# teamdctl PortChannel001 state dump
{
    "ports": {
        "Ethernet0": {
            "ifinfo": {
                "dev_addr": "cc:37:ab:ec:de:9c",
                "dev_addr_len": 6,
                "ifindex": 6,
                "ifname": "Ethernet0"
            },
            "link": {
                "duplex": "half",
                "speed": 0,
                "up": true
            },
            "link_watches": {
                "list": {
                    "link_watch_0": {
                        "delay_down": 0,
                        "delay_up": 0,
                        "down_count": 0,
                        "name": "ethtool",
                        "up": false
                    }
                },
                "up": false
            },
            "runner": {
                "actor_lacpdu_info": {
                    "key": 0,
                    "port": 1,
                    "port_priority": 255,
                    "state": 77,
                    "system": "cc:37:ab:ec:de:9c",
                    "system_priority": 65535
                },
                "aggregator": {
                    "id": 6,
                    "selected": true
                },
                "key": 0,
                "partner_lacpdu_info": {
                    "key": 0,
                    "port": 0,
                    "port_priority": 0,
                    "state": 0,
                    "system": "00:00:00:00:00:00",
                    "system_priority": 0
                },
                "prio": 255,
                "selected": true,
                "state": "defaulted"
            }
        }
    },
    "runner": {
        "active": true,
        "fallback": true,
        "fast_rate": false,
        "select_policy": "lacp_prio",
        "sys_prio": 65535
    },
    "setup": {
        "daemonized": true,
        "dbus_enabled": false,
        "debug_level": 1,
        "kernel_team_mode_name": "loadbalance",
        "pid": 26,
        "pid_file": "/var/run/teamd/PortChannel001.pid",
        "runner_name": "lacp",
        "zmq_enabled": false
    },
    "team_device": {
        "ifinfo": {
            "dev_addr": "cc:37:ab:ec:de:9c",
            "dev_addr_len": 6,
            "ifindex": 78,
            "ifname": "PortChannel001"
        }
    }
}

admin@sonic:~$ ip link show PortChannel001
78: PortChannel001: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 9100 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether cc:37:ab:ec:de:9c brd ff:ff:ff:ff:ff:ff
admin@sonic:~$ ip link show Ethernet0
6: Ethernet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9100 qdisc pfifo_fast master PortChannel001 state UP mode DEFAULT group default qlen 1000
    link/ether cc:37:ab:ec:de:9c brd ff:ff:ff:ff:ff:ff

[Image Version]
https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201904/25/
root@sonic:~# show version

SONiC Software Version: SONiC.HEAD.24-f0cfa850
Distribution: Debian 9.9
Kernel: 4.9.0-8-2-amd64
Build commit: f0cfa850
Build date: Sat Jun  1 17:26:27 UTC 2019
Built by: johnar@jenkins-worker-4

Platform: x86_64-accton_as5712_54x-r0
HwSKU: Accton-AS5712-54X
ASIC: broadcom
Serial Number: 571254X1625058
Uptime: 18:39:40 up  1:23,  1 user,  load average: 0.37, 0.48, 0.52

Docker images:
REPOSITORY                 TAG                 IMAGE ID            SIZE
docker-syncd-brcm          HEAD.24-f0cfa850    ec09c7a543c3        392MB
docker-syncd-brcm          latest              ec09c7a543c3        392MB
docker-lldp-sv2            HEAD.24-f0cfa850    2461a11cadcd        299MB
docker-lldp-sv2            latest              2461a11cadcd        299MB
docker-dhcp-relay          HEAD.24-f0cfa850    1e1ffcaf62f0        288MB
docker-dhcp-relay          latest              1e1ffcaf62f0        288MB
docker-database            HEAD.24-f0cfa850    56cb7edb880d        281MB
docker-database            latest              56cb7edb880d        281MB
docker-snmp-sv2            HEAD.24-f0cfa850    d69ef63e474b        313MB
docker-snmp-sv2            latest              d69ef63e474b        313MB
docker-orchagent           HEAD.24-f0cfa850    6c162e31ebcc        319MB
docker-orchagent           latest              6c162e31ebcc        319MB
docker-teamd               HEAD.24-f0cfa850    f53fb9bafb83        301MB
docker-teamd               latest              f53fb9bafb83        301MB
docker-sonic-telemetry     HEAD.24-f0cfa850    6b0cab3aab6c        302MB
docker-sonic-telemetry     latest              6b0cab3aab6c        302MB
docker-router-advertiser   HEAD.24-f0cfa850    4b0ecd476cf1        280MB
docker-router-advertiser   latest              4b0ecd476cf1        280MB
docker-platform-monitor    HEAD.24-f0cfa850    30abc329cb42        325MB
docker-platform-monitor    latest              30abc329cb42        325MB
docker-fpm-frr             HEAD.24-f0cfa850    6bcffdf2caa6        309MB
docker-fpm-frr             latest              6bcffdf2caa6        309MB

Best Regards.
/Kelly

@chenkelly
Copy link
Author

Hi @lorchid
Could you teach us? Thanks very much.

@chenkelly
Copy link
Author

Hi @hzheng5 , could you give us some advice about the question? Thanks very much.

@hzheng5
Copy link
Contributor

hzheng5 commented Sep 17, 2019

Hi @hzheng5 , could you give us some advice about the question? Thanks very much.

Hi Kelly,

Can you please remove "min_links": "1", configure and retry?

Lacp fallback and min_links cannot be configured at the same time.

Thanks,
Haiyang

@chenkelly
Copy link
Author

Hi @hzheng5
We remove "min_links": "1", but get same result.
We shall see LACP(A)(Up) abd Ethernet0(S). Right?
Do you know that LACP fallback support for multiple member ports?
Thanks very much.

root@sonic:/usr# 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
-----  --------------  -----------  -------------
  001  PortChannel001  LACP(A)(Dw)  Ethernet0(S*)
  
"PORTCHANNEL": {
    "PortChannel001": {
        "admin_status": "up",
        "fallback": "true",
        "mtu": "9100"
    }
},
"PORTCHANNEL_MEMBER": {
    "PortChannel001|Ethernet0": {}
}

@hzheng5
Copy link
Contributor

hzheng5 commented Sep 17, 2019

HI Kelly,

Looks like the fallback mode was broken on 201904.

Ethernet0(S*) means Ethernet0 is already selected, somehow the carrier is not enabled. Let me check further and get back to you.

Currently we don't support fallback with multiple members.

Thanks,
Haiyang

@hzheng5
Copy link
Contributor

hzheng5 commented Sep 17, 2019

Hi @hzheng5
We remove "min_links": "1", but get same result.
We shall see LACP(A)(Up) abd Ethernet0(S). Right?
Do you know that LACP fallback support for multiple member ports?
Thanks very much.

root@sonic:/usr# 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
-----  --------------  -----------  -------------
  001  PortChannel001  LACP(A)(Dw)  Ethernet0(S*)
  
"PORTCHANNEL": {
    "PortChannel001": {
        "admin_status": "up",
        "fallback": "true",
        "mtu": "9100"
    }
},
"PORTCHANNEL_MEMBER": {
    "PortChannel001|Ethernet0": {}
}

Hi Kelly,

Looks like the following change is conflicting with lacp fallback mode.

jpirko/libteam@54f137c

Can you please revert the above change and verify first?

I will provide a new patch to address the conflict soon.

Thanks,
Haiyang

@chenkelly
Copy link
Author

Hi @hzheng5
After reverting jpirko/libteam@54f137c, behavior is as expected, we can see LACP(A)(Up) and Ethernet0(S).
Thanks your help.

@lguohan
Copy link
Contributor

lguohan commented Sep 24, 2019

@hzheng5
Copy link
Contributor

hzheng5 commented Sep 24, 2019

@hzheng5 , is the test checked in described in the test plan checked in? https://github.com/Azure/SONiC/blob/master/doc/lag/LACP%20Fallback%20Test%20Plan.md#test-case-1---fallback-verification

Hi Guohan,

I submitted the PR for the ansible test together with the fallback feature.

Looks like it's still not merged yet.
https://github.com/Azure/sonic-mgmt/pull/379/files

Thanks,
Haiyang

@chenkelly
Copy link
Author

Hi @hzheng5
Do you plan to address the conflict?
Thanks very much.

@hzheng5
Copy link
Contributor

hzheng5 commented Oct 25, 2019

Hi @hzheng5
Do you plan to address the conflict?
Thanks very much.

Hi @chenkelly the conflict has been addressed by the following commit

sonic-net/sonic-buildimage@7988deb

Thanks,
Haiyang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants