Skip to content

Remove lldp as default service for Chassis#13115

Merged
wangxin merged 38 commits intosonic-net:masterfrom
abdosi:master
Jun 5, 2024
Merged

Remove lldp as default service for Chassis#13115
wangxin merged 38 commits intosonic-net:masterfrom
abdosi:master

Conversation

@abdosi
Copy link
Contributor

@abdosi abdosi commented Jun 4, 2024

Why I did:
To fix this sonic-net/sonic-buildimage#19174
On Modular chassis for LC lldp in global scope is not needed.

How I verify:
Manual changes

abdosi and others added 30 commits February 5, 2021 17:00
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
chassis

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
as we are seding packet > 4k in some cases where there is HBM involved
to fill the buffer faster.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
abdosi added 3 commits March 7, 2024 00:44
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
@abdosi
Copy link
Contributor Author

abdosi commented Jun 4, 2024

@anamehra for viz.


_DEFAULT_SERVICES = ["pmon", "snmp", "lldp", "database"]
_DEFAULT_SERVICES = ["pmon", "snmp", "database"]

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not needed here. lldp still applies to Default asic service list

service_list = []
active_asics = self.asics
if self.sonichost.is_supervisor_node() and self.get_facts()['asic_type'] != 'vs':
self._DEFAULT_SERVICES.append("lldp")
Copy link
Contributor

Choose a reason for hiding this comment

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

based on this condition, lldp will not be added in DEFAULT_SERVICES for VS supervisor, is that right?
That will be an issue for VS testbed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@SuvarnaMeenakshi : updated.

@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/common/devices/multi_asic.py:71:121: E501 line too long (121 > 120 characters)

flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
if config_facts['FEATURE'][service]['state'] == "disabled":
self.sonichost.DEFAULT_ASIC_SERVICES.remove(service)
else:
self._DEFAULT_SERVICES.append("lldp")
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need this append here?
This will append lldp DEFAULT_SERVICES for linecard module as well.
Just tried this on a Linecard, and I see that this function https://github.com/sonic-net/sonic-mgmt/blob/67a8074b0bd63c456c315e2649208fcdb4f89045/tests/common/devices/sonic.py#L250C5-L250C35 returns "True"

import sonic_platform
import sonic_platform.platform as P
print(P.Platform().get_chassis().is_modular_chassis())
True

Copy link
Contributor Author

@abdosi abdosi Jun 4, 2024

Choose a reason for hiding this comment

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

@SuvarnaMeenakshi

Yes . LLDP will be added as Default Service for Supervisor and Fixed Platoforms (else is for Fixed platforms)

For Modular chassis LLDP will not be added to Default Service List which means for LC we will not add as per our requirement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Am I missing something?

Copy link
Contributor

Choose a reason for hiding this comment

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

got it, misunderstood the condition logic here.

@abdosi
Copy link
Contributor Author

abdosi commented Jun 4, 2024

@wangxin : please help with merge of this.

@wangxin wangxin merged commit 418d9fb into sonic-net:master Jun 5, 2024
@patrickmacarthur
Copy link
Contributor

Can this be backported to 202405?

@vperumal
Copy link
Collaborator

Hi @abdosi , tests are still failing after this change for lldp, It is because lldp is being added as required status check for RP, but looks like this causes it to get added for LCs too

02:46:39 recover.recover L0185 WARNING| Try to recover aaa14-lc0 using method adaptive
02:46:39 recover.adaptive_recover L0169 WARNING| Restoring {'failed': True, 'check_item': 'processes', 'host': 'aaa14-lc0', 'processes_status': {'pmon': {'status': True, 'exited_critical_process': [], 'running_critical_process': []}, 'snmp': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['snmp-subagent', 'snmpd']}, 'database': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['redis']}, 'lldp': {'status': False, 'exited_critical_process': [], 'running_critical_process': []}, 'bgp0': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['bgpcfgd', 'bgpd', 'fpmsyncd', 'staticd', 'zebra']}, 'database0': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['redis']}, 'lldp0': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['lldp-syncd', 'lldpd', 'lldpmgrd']}, 'swss0': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['buffermgrd', 'coppmgrd', 'fabricmgrd', 'fdbsyncd', 'intfmgrd', 'nbrmgrd', 'neighsyncd', 'orchagent', 'portmgrd', 'portsyncd', 'tunnelmgrd', 'vlanmgrd', 'vrfmgrd', 'vxlanmgrd']}, 'syncd0': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['syncd']}, 'teamd0': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['teammgrd', 'teamsyncd', 'tlm_teamd']}, 'macsec0': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['macsecmgrd']}, 'gbsyncd0': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['syncd']}, 'bgp1': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['bgpcfgd', 'bgpd', 'fpmsyncd', 'staticd', 'zebra']}, 'database1': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['redis']}, 'lldp1': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['lldp-syncd', 'lldpd', 'lldpmgrd']}, 'swss1': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['buffermgrd', 'coppmgrd', 'fabricmgrd', 'fdbsyncd', 'intfmgrd', 'nbrmgrd', 'neighsyncd', 'orchagent', 'portmgrd', 'portsyncd', 'tunnelmgrd', 'vlanmgrd', 'vrfmgrd', 'vxlanmgrd']}, 'syncd1': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['syncd']}, 'teamd1': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['teammgrd', 'teamsyncd', 'tlm_teamd']}, 'macsec1': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['macsecmgrd']}, 'gbsyncd1': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['syncd']}, 'bgp2': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['bgpcfgd', 'bgpd', 'fpmsyncd', 'staticd', 'zebra']}, 'database2': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['redis']}, 'lldp2': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['lldp-syncd', 'lldpd', 'lldpmgrd']}, 'swss2': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['buffermgrd', 'coppmgrd', 'fabricmgrd', 'fdbsyncd', 'intfmgrd', 'nbrmgrd', 'neighsyncd', 'orchagent', 'portmgrd', 'portsyncd', 'tunnelmgrd', 'vlanmgrd', 'vrfmgrd', 'vxlanmgrd']}, 'syncd2': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['syncd']}, 'teamd2': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['teammgrd', 'teamsyncd', 'tlm_teamd']}, 'macsec2': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['macsecmgrd']}, 'gbsyncd2': {'status': True, 'exited_critical_process': [], 'running_critical_process': ['syncd']}}, 'services_status': {'pmon': True, 'snmp': True, 'database': True, 'lldp': False, 'bgp0': True, 'database0': True, 'lldp0': True, 'swss0': True, 'syncd0': True, 'teamd0': True, 'macsec0': True, 'gbsyncd0': True, 'bgp1': True, 'database1': True, 'lldp1': True, 'swss1': True, 'syncd1': True, 'teamd1': True, 'macsec1': True, 'gbsyncd1': True, 'bgp2': True, 'database2': True, 'lldp2': True, 'swss2': True, 'syncd2': True, 'teamd2': True, 'macsec2': True, 'gbsyncd2': True}} with proposed action: config_reload, final action: config_reload

@abdosi
Copy link
Contributor Author

abdosi commented Jun 11, 2024

@vperumal :this should be fix via: #13190

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jun 12, 2024
Why I did:
To fix this sonic-net/sonic-buildimage#19174
On Modular chassis for LC lldp in global scope is not needed.

How I verify:
Manual changes

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #13248

mssonicbld pushed a commit that referenced this pull request Jun 13, 2024
Why I did:
To fix this sonic-net/sonic-buildimage#19174
On Modular chassis for LC lldp in global scope is not needed.

How I verify:
Manual changes

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
mrkcmo pushed a commit to Azarack/sonic-mgmt that referenced this pull request Jul 17, 2024
Why I did:
To fix this sonic-net/sonic-buildimage#19174
On Modular chassis for LC lldp in global scope is not needed.

How I verify:
Manual changes

Signed-off-by: Abhishek Dosi <abdosi@microsoft.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.

8 participants