Closed vdahiya12 closed 3 months ago
Cherry-pick PR to 202311: https://github.com/sonic-net/sonic-platform-daemons/pull/516
Cherry-pick PR to 202305: https://github.com/sonic-net/sonic-platform-daemons/pull/517
Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-platform-daemons/pull/518
This PR Introduces a an initialization mechanism within the wait_for_state_change function to ensure that the YcableChannelStateTableHelper instance is created only once per port. Also it Adds a check using hasattr to see if table_helper is already an attribute of wait_for_state_change. YcableChannelStateTableHelper instances are keyed by port.
This helps ensure that channel object will have a seperate instance of swsscommon table and they will not interfere with normal functioning of state specific threads.
Description
MSFT ADO
Motivation and Context
How Has This Been Tested?
UTs and deploying changes on Libra Testbeds as well as pilot devices This script was used to test and after each run the output was matched to be as expected. The fwd_state table is continuously written when link goes down and comes up
unknown
andactive
respectively.example output for one iteration
we can also check in syslog how the grpc connectivity state change syslog is posted with each link/up down
Additional Information (Optional)
another way to check thread function is correct is through logging, as seen fwd table is created in different threads