Skip to content

Commit c7aa841

Browse files
authored
[show][muxcable] increase timeout for displaying HW_STATUS (sonic-net#2712)
What I did probe mux direction not always return success. Sample output of: while [ 1 ]; do date; show mux hwmode muxdirection; show mux status; sleep 1; done Mon 27 Feb 2023 03:12:25 PM UTC Port Direction Presence ----------- ----------- ---------- Ethernet16 unknown True PORT STATUS HEALTH HWSTATUS LAST_SWITCHOVER_TIME ----------- -------- -------- ------------ --------------------------- Ethernet16 standby healthy inconsistent 2023-Feb-25 07:55:18.269177 If we increase the timeout to 0.5 secs to get the values back from ycabled, this will remove the inconsistency issue, and display the consistent values, because while telemetry is going on, the time to get actual mux value takes significantly longer than 0.1 seconds. PORT STATUS HEALTH HWSTATUS LAST_SWITCHOVER_TIME ----------- -------- -------- ------------ --------------------------- Ethernet16 standby healthy consistent 2023-Feb-25 07:55:18.269177 How I did it How to verify it Manually run changes on setup worst-case CLI return time could be 16 seconds for 32 ports. on avg each port is 200 mSec if telemetry is going, but on average show command will return in < 1 sec for all 32 ports. Signed-off-by: vaibhav-dahiya <[email protected]>
1 parent 2fc2b82 commit c7aa841

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

show/muxcable.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
REDIS_TIMEOUT_MSECS = 0
2222
SELECT_TIMEOUT = 1000
23-
HWMODE_MUXDIRECTION_TIMEOUT = 0.1
23+
HWMODE_MUXDIRECTION_TIMEOUT = 0.5
2424

2525
# The empty namespace refers to linux host namespace.
2626
EMPTY_NAMESPACE = ''

0 commit comments

Comments
 (0)