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

[chassis][lldp] Fix the lldp error log in host instance which doesn't contain front panel ports #14814

Merged
merged 2 commits into from
Jun 23, 2023

Conversation

mlok-nokia
Copy link
Contributor

@mlok-nokia mlok-nokia commented Apr 23, 2023

Why I did it

Fix issue #14251
In multiasic platform, there is NO front panel port in the host lldp docker. Because of there is NO front panel port, the host APPL_DB database will not genernate the "PORT_CONFIG_DONE" and "PORT_INIT_DONE" event. Therefore, the lldpmgrd log the error log - Port init timeout reached (300 seconds), resuming lldpd... in syslog.

Apr 18 01:57:03.993698 ixre-cpm-chassis9 ERR lldp#lldpmgrd[29]: Port init timeout reached (300 seconds), resuming lldpd...

OC test case failed-- autorestart/test_container_autorestart.py::test_containers_autorestart[ixre-cpm-chassis9-10-snmp

Work item tracking

How I did it

Since there is NO front panel ports in the host database in the multiasic platform , there won't be PORT_CONFIG_DONE and PORT_INIT_DONE event from the APPL_DB. The error log ``Port init timeout reached (300 seconds), resuming lldpd...``` is not applicable to the host lldp. In or to suppress this error message, add function appdb_contains_lldp_port() to return False for the supervisor card and host instance in the multasic platform which NAMESPACE_ID is none. And use this function to determine and not to log this error log for the supervisor card and host database in the multasic platform.

How to verify it

Running image with this fix in the multiasic platform, verify this error log Port init timeout reached (300 seconds), resuming lldpd... should not be logged in the syslog.

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

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

@mlok-nokia mlok-nokia requested a review from lguohan as a code owner April 23, 2023 20:54
@mlok-nokia
Copy link
Contributor Author

@judyjoseph @rlhui Judy and Rita, I have created this PR to supress the lldp error log for the host instance lldp. Please review it. THanks

@mlok-nokia
Copy link
Contributor Author

@SuvarnaMeenakshi Hi Suvarna, I am not if you are working on this issue which show SNMP in the test case name. Please review this change. Thanks.

@mlok-nokia
Copy link
Contributor Author

@abdosi @judyjoseph @SuvarnaMeenakshi Please help to review this PR.

@rlhui rlhui requested a review from abdosi May 3, 2023 17:13
@@ -267,6 +269,15 @@ class LldpManager(daemon_base.DaemonBase):
elif key == "PortConfigDone":
self.port_config_done = True

def appdb_contains_lldp_port(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

let's make it utility function and add in device_info.py as rename something as is_frontend_port_present_in_host()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

let's make it utility function and add in device_info.py as rename something as is_frontend_port_present_in_host()

Addressed the comment as the suggestion. Define the utility function `is_frontend_port_present_in_host()' in the device_inof.py and use it in the lldpmgrd file

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.

as added in comments

@mlok-nokia mlok-nokia force-pushed the fix-lldp-error-log branch from 8ccdcb6 to 4406ebc Compare June 3, 2023 20:15
@mlok-nokia
Copy link
Contributor Author

@abdosi Your comment has been addressed. Please review it again. Thanks

@mlok-nokia mlok-nokia force-pushed the fix-lldp-error-log branch from 4406ebc to 37d6d36 Compare June 6, 2023 04:38
@mlok-nokia mlok-nokia force-pushed the fix-lldp-error-log branch from 37d6d36 to e126e37 Compare June 8, 2023 15:43
@abdosi abdosi added Request for 202205 Branch Request for 202111 Branch For PRs being requested for 202111 branch labels Jun 12, 2023
@abdosi
Copy link
Contributor

abdosi commented Jun 13, 2023

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mlok-nokia
Copy link
Contributor Author

@abdosi @rlhui Could you please help to merge this PR?

@abdosi
Copy link
Contributor

abdosi commented Jun 23, 2023

@yxieca can you please help merge this.

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #15603

@gechiang
Copy link
Collaborator

gechiang commented Jun 23, 2023

@mlok-nokia Goot catch! I have removed the wrong label and added the 202211 branch label.

Also, can you comment if this change was tested with the 202205 branch already or only on master branch?
Thanks!

@mlok-nokia
Copy link
Contributor Author

@mlok-nokia Goot catch! I have removed the wrong label and added the 202211 branch label.

Also, can you comment if this change was tested with the 202205 branch already or only on master branch? Thanks!

Change has been tested on 202205 branch as well as master branch.

mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Jun 29, 2023
… contain front panel ports (sonic-net#14814)

* [chassis][lldp] Fix the lldp error log in host instance which doesn't contain front pannel ports

---------

Signed-off-by: mlok <[email protected]>
mssonicbld added a commit that referenced this pull request Jun 29, 2023
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Jun 29, 2023
… contain front panel ports (sonic-net#14814)

* [chassis][lldp] Fix the lldp error log in host instance which doesn't contain front pannel ports

---------

Signed-off-by: mlok <[email protected]>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202205: #15669

mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Jun 29, 2023
… contain front panel ports (sonic-net#14814)

* [chassis][lldp] Fix the lldp error log in host instance which doesn't contain front pannel ports

---------

Signed-off-by: mlok <[email protected]>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202211: #15670

mssonicbld added a commit that referenced this pull request Jun 30, 2023
yxieca pushed a commit that referenced this pull request Jun 30, 2023
… contain front panel ports (#14814) (#15669)

* [chassis][lldp] Fix the lldp error log in host instance which doesn't contain front pannel ports

---------

Signed-off-by: mlok <[email protected]>
Co-authored-by: Marty Y. Lok <[email protected]>
sonic-otn pushed a commit to sonic-otn/sonic-buildimage that referenced this pull request Sep 20, 2023
… contain front panel ports (sonic-net#14814)

* [chassis][lldp] Fix the lldp error log in host instance which doesn't contain front pannel ports

---------

Signed-off-by: mlok <[email protected]>
@mlok-nokia mlok-nokia deleted the fix-lldp-error-log branch September 27, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants