-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Conversation
@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 |
@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. |
b9bc9d6
to
8ccdcb6
Compare
@abdosi @judyjoseph @SuvarnaMeenakshi Please help to review this PR. |
dockers/docker-lldp/lldpmgrd
Outdated
@@ -267,6 +269,15 @@ class LldpManager(daemon_base.DaemonBase): | |||
elif key == "PortConfigDone": | |||
self.port_config_done = True | |||
|
|||
def appdb_contains_lldp_port(self): |
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
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
There was a problem hiding this 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
8ccdcb6
to
4406ebc
Compare
@abdosi Your comment has been addressed. Please review it again. Thanks |
4406ebc
to
37d6d36
Compare
… contain front pannel ports Signed-off-by: mlok <[email protected]>
37d6d36
to
e126e37
Compare
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
@yxieca can you please help merge this. |
Cherry-pick PR to 202305: #15603 |
@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? |
Change has been tested on 202205 branch as well as master branch. |
… 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]>
… 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]>
Cherry-pick PR to 202205: #15669 |
… 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]>
Cherry-pick PR to 202211: #15670 |
… 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]>
… 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]>
Highlight change, the DHCP config removed from master branch. files/image_config/resolv-config/resolv.conf Related work items: sonic-net#49, sonic-net#2598, sonic-net#11862, sonic-net#12530, sonic-net#14000, sonic-net#14549, sonic-net#14814, sonic-net#15077, sonic-net#15252, sonic-net#15253, sonic-net#15357, sonic-net#15384, sonic-net#15394, sonic-net#15399, sonic-net#15405, sonic-net#15566, sonic-net#15591, sonic-net#15592, sonic-net#15593, sonic-net#15602, sonic-net#15604, sonic-net#15611, sonic-net#15621, sonic-net#15625, sonic-net#15634, sonic-net#15635
Merge code from master to internal Related work items: sonic-net#32, sonic-net#49, sonic-net#376, sonic-net#2598, sonic-net#11862, sonic-net#12530, sonic-net#14000, sonic-net#14547, sonic-net#14549, sonic-net#14814, sonic-net#15077, sonic-net#15239, sonic-net#15252, sonic-net#15253, sonic-net#15298, sonic-net#15357, sonic-net#15384, sonic-net#15394, sonic-net#15399, sonic-net#15405, sonic-net#15511, sonic-net#15566, sonic-net#15583, sonic-net#15591, sonic-net#15592, sonic-net#15593, sonic-net#15602, sonic-net#15604, sonic-net#15611, sonic-net#15621, sonic-net#15625, sonic-net#15634, sonic-net#15635, sonic-net#15645, sonic-net#15646, sonic-net#15647, sonic-net#15657, sonic-net#15658, sonic-net#15697, sonic-net#15699
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.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)
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)