sonic-net / sonic-platform-daemons

Platform module daemons for SONiC
Other
23 stars 152 forks source link

[ycabled] Fix insert delete events for ycabled OIR by subscribing to TRANSCEIVER_INFO instead of TRANSCEIVER_STATUS table #442

Closed vdahiya12 closed 7 months ago

vdahiya12 commented 7 months ago

Description

Due to recent behavioral issue with xcvrd, xcvrd posts/writes "TRANSCEIVER_STATUS" periodically with every DOM telemetry update. In the design of ycabled the change OIR event is listened only on TRANSCEIVER_STATUS going from {status: "0"} for deletion and {status: "1"}for insertion. Since this table is posted again and again ycabled seems to get OIR events even though there are no True OIR events. This in turn will cause y_cable port_instance be it real cable or simulator to be initialized again and again.

To fix this ycabled subscribes now to TRANSCEIVER_INFO table and since this is populated only once, with insert and delete operation subscription ycabled gets the correct state of the cable.

Motivation and Context

How Has This Been Tested?

putting the changes on testbed and UT

Additional Information (Optional)

Microsoft ADO 26281305

prgeor commented 7 months ago

@vdahiya12 can you add the tag for cherry pick

prgeor commented 7 months ago

@vdahiya12 please update

Description Motivation and Context How Has This Been Tested?

vdahiya12 commented 7 months ago

Could you please elaborate why, after this change, pmon will not make any unsolicit mux notifications?

explained in the description as well, ycabled port instances get created repeatedly due to unwanted OIR(hot online insertion removal) events. due to initalization in mux simulator it will cause unwanted requests of state and post that into state DB

vdahiya12 commented 7 months ago

Hi @vdahiya12 - is there an ETA to fix the PR check and merge the change?

only fixing UT and coverage, will merge soon, ETA 3/14

mssonicbld commented 7 months ago

Cherry-pick PR to 202311: https://github.com/sonic-net/sonic-platform-daemons/pull/453

zjswhhh commented 6 months ago

Hi @prgeor @vdahiya12 I think we need to backport his fix to 202305. But I saw it's still not included in the branch, can you please help check?

vdahiya12 commented 6 months ago

Hi @prgeor @vdahiya12 I think we need to backport his fix to 202305. But I saw it's still not included in the branch, can you please help check?

@StormLiangMS are you branch owner for 202305 , if yes please add approval tag ?

mssonicbld commented 6 months ago

Cherry-pick PR to 202305: https://github.com/sonic-net/sonic-platform-daemons/pull/457