-
Notifications
You must be signed in to change notification settings - Fork 664
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
[crm]: Fix failures in CLI show commands #221
Conversation
Signed-off-by: Volodymyr Samotiy <[email protected]>
@@ -30,7 +30,8 @@ def show_summary(self): | |||
|
|||
crm_info = configdb.get_entry('CRM', 'Config') | |||
|
|||
print '\nPolling Interval: ' + crm_info['polling_interval'] + ' second(s)\n' | |||
if crm_info: | |||
print '\nPolling Interval: ' + crm_info['polling_interval'] + ' second(s)\n' |
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.
We would need to print some failure message if crm_info is null for some reason!
crm/main.py
Outdated
data.append([res, crm_stats['crm_stats_' + res + "_used"], crm_stats['crm_stats_' + res + "_available"]]) | ||
else: | ||
data.append([resource, crm_stats['crm_stats_' + resource + "_used"], crm_stats['crm_stats_' + resource + "_available"]]) | ||
if crm_stats: |
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.
The else part has to display some message stating crm_stats is not_ready since it would be populated only after the polling interval
* Print appropriate messages if got empty entry from DB Signed-off-by: Volodymyr Samotiy <[email protected]>
Added printing of appropriate messages when get empty entry from DB |
RB=1288101 G=lnos-reviewers R=ntrianta,pmao,rmolina,sfardeen,zxu * github: [acl_loader] Support Service ACL binding to multiple services (sonic-net#236) [show] Rename 'show session' to 'show mirror session' (sonic-net#235) [pfcstat]: create python cli tool to show pfc counters (sonic-net#233) [queuestat] add python CLI tool to show queue counters [acl-loader] Not to crash upon invalid rule (sonic-net#232) Show FDB type in fdbshow/show mac (sonic-net#231) [show] add 'show runningconfiguration all' subcommand (sonic-net#230) [reboot scripts] remove -t option in docker exec commands (sonic-net#228) [reboot] reduce stop service to only stop syncd (sonic-net#223) [crm]: Fix failures in CLI show commands (sonic-net#221) [Fast-reboot]: Gracefully shutdown syncd in fast-reboot (sonic-net#212) add fast-reboot support for nephos platform by stop kernel modules (sonic-net#220) [config bgp] Convert user input ipv6 addr to lower case before comparing (sonic-net#218) [PFCWD]: set default configuration when enabled by default (sonic-net#213) Add fast-reboot support for Aboot based images (sonic-net#214) sonic-utilities: Format show vlan config output (sonic-net#210) [AAA] Support login(ascii) authentication type (sonic-net#217) [sfputil] Adapt new way of getting PLATFORM(sonic-net#216) [Fast-Reboot]: Adapt fast-reboot-dump script for SAIv1.2 (sonic-net#211) Refactor fast-reboot script. Generate fast-reboot-dumps into configurable directory (sonic-net#208) Find correct opennsl module name before stopping it (sonic-net#207) [crm]: Add utility for CRM configuration (sonic-net#187) [reboot] update reboot script to retrieve platform with new format (sonic-net#206) Adapt to config engine change to load platform info properly (sonic-net#205) [config] Add qos clear and qos reload support (sonic-net#204) Dump default routes from APPL_DB table before fast-reboot (sonic-net#203) [acl_loader] Fix a crash issue when appdb is not consistent with cfgdb (sonic-net#202) [pfcwd]: add command to set pfcwd polling interval (sonic-net#192) [acl-loader] Prevent from hanging if run by non-root user (sonic-net#199) [config] Store ConfigDB init indicator boolean value as 1/0 in Redis to be language-agnostic (sonic-net#197) Get Vlan Id from SAI Vlan Object if bvid present (sonic-net#196) [TACACS+]: Fix aaa show error without configuration (sonic-net#191) 'config bgp [shutdown|startup] neighbor <hostname>' now affects all sessions for neighbor (sonic-net#195) [sonic-clear] add a clear fdb command (sonic-net#186)
This PR updates the following commits 0770dec Add retry reading/setting mux status to simulated y-cable driver (sonic-net#221) Signed-off-by: vaibhav-dahiya <[email protected]>
…ic-net#221) Description Add retry reading/setting mux status to simulated y-cable driver Motivation and Context When DUT is rebooted, xcvrd may call the simulated y-cable driver to get mux direction before the mgmt interface is up. The simulated y-cable driver needs to send HTTP request to mux simulator server to read mux status. It has dependency on the mgmt interface. So, this could result in below error: Oct 16 03:15:44.029933 sonic-dut ERR pmon#xcvrd[34]: y_cable_port 1: GET http://192.168.1.33:8082/mux/vms21-6/0 for physical_port 1 failed with URLError(OSError(113, 'No route to host')) Oct 16 03:15:44.030306 sonic-dut ERR pmon#xcvrd[34]: Error: Could not establish the active side for Y cable port Ethernet0 to perform read_y_cable update state db This would cause other problem and may result in same interface on both upper tor and lower tor remains in "standby" state. The fix is to add retry to the simulated y-cable driver for reading or setting mux status. The retry interval is 1 second. Retry timeout is 30 seconds. How Has This Been Tested? * The issue can be reliably reproduced on a 7260 dualtor testbed after run the test_acl::TestAclWithReboot cases. With this fix, the issue cannot be reproduced. * Tested the config mux mode active command with or without icmp responder. * Tested updating mux status by call mux simulator API to see if the new status is reflected to DUTs. Signed-off-by: Xin Wang <[email protected]>
PR sonic-net#221 added retry logic to the simualted y_cable driver and introduced typos. This change is to fix the typos. Signed-off-by: Xin Wang <[email protected]>
Signed-off-by: Volodymyr Samotiy [email protected]
- What I did
Fixed issue "CRM module throws error" (sonic-net/SONiC#159)
- How I did it
Changed output to empty line instead of throwing error when retrieved nothing from config DB
- How to verify it
Execute CRM show commands and observe that error is not shown