Skip to content
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

[system-health] Improve code structure of system health CLIs #2453

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

Junchao-Mellanox
Copy link
Collaborator

@Junchao-Mellanox Junchao-Mellanox commented Oct 25, 2022

What I did

Improve code structure of system health CLIs

How I did it

Remove duplicate code

How to verify it

Existing unit tests all passed

Previous command output (if the output of a command-line utility has changed)

System status summary
  System status LED  red
  Services:
    Status: Not OK
    Not Running: 'telemetry', 'sflowmgrd'
  Hardware:
    Status: Not OK
    Reasons: Failed to get voltage minimum threshold data for PSU 1
	     Failed to get voltage minimum threshold data for PSU 2
System services and devices monitor list
Name            Status    Type
--------------  --------  ----------
telemetry       Not OK    Process
sflowmgrd       Not OK    Process
neighsyncd      OK        Process
vrfmgrd         OK        Process
dialout_client  OK        Process
zebra           OK        Process
rsyslog         OK        Process
snmpd           OK        Process
redis_server    OK        Process
intfmgrd        OK        Process
orchagent       OK        Process
vxlanmgrd       OK        Process
lldpd_monitor   OK        Process
portsyncd       OK        Process
var-log         OK        Filesystem
lldpmgrd        OK        Process
syncd           OK        Process
sonic           OK        System
buffermgrd      OK        Process
portmgrd        OK        Process
staticd         OK        Process
bgpd            OK        Process
lldp_syncd      OK        Process
bgpcfgd         OK        Process
snmp_subagent   OK        Process
root-overlay    OK        Filesystem
fpmsyncd        OK        Process
vlanmgrd        OK        Process
nbrmgrd         OK        Process
PSU 2           Not OK    PSU
PSU 1           Not OK    PSU
psu_1_fan_1     OK        Fan
psu_2_fan_1     OK        Fan
fan11           OK        Fan
fan10           OK        Fan
fan12           OK        Fan
ASIC            OK        ASIC
fan1            OK        Fan
fan3            OK        Fan
fan2            OK        Fan
fan5            OK        Fan
fan4            OK        Fan
fan7            OK        Fan
fan6            OK        Fan
fan9            OK        Fan
fan8            OK        Fan
System services and devices ignore list
Name    Status    Type
------  --------  ------

New command output (if the output of a command-line utility has changed)

System status summary
  System status LED  red
  Services:
    Status: Not OK
    Not Running: telemetry, sflowmgrd
  Hardware:
    Status: Not OK
    Reasons: Failed to get voltage minimum threshold data for PSU 1
	     Failed to get voltage minimum threshold data for PSU 2
System services and devices monitor list
Name            Status    Type
--------------  --------  ----------
telemetry       Not OK    Process
sflowmgrd       Not OK    Process
neighsyncd      OK        Process
vrfmgrd         OK        Process
dialout_client  OK        Process
zebra           OK        Process
rsyslog         OK        Process
snmpd           OK        Process
redis_server    OK        Process
intfmgrd        OK        Process
orchagent       OK        Process
vxlanmgrd       OK        Process
lldpd_monitor   OK        Process
portsyncd       OK        Process
var-log         OK        Filesystem
lldpmgrd        OK        Process
syncd           OK        Process
sonic           OK        System
buffermgrd      OK        Process
portmgrd        OK        Process
staticd         OK        Process
bgpd            OK        Process
lldp_syncd      OK        Process
bgpcfgd         OK        Process
snmp_subagent   OK        Process
root-overlay    OK        Filesystem
fpmsyncd        OK        Process
vlanmgrd        OK        Process
nbrmgrd         OK        Process
PSU 2           Not OK    PSU
PSU 1           Not OK    PSU
psu_1_fan_1     OK        Fan
psu_2_fan_1     OK        Fan
fan11           OK        Fan
fan10           OK        Fan
fan12           OK        Fan
ASIC            OK        ASIC
fan1            OK        Fan
fan3            OK        Fan
fan2            OK        Fan
fan5            OK        Fan
fan4            OK        Fan
fan7            OK        Fan
fan6            OK        Fan
fan9            OK        Fan
fan8            OK        Fan
System services and devices ignore list
Name    Status    Type
------  --------  ------

@Junchao-Mellanox Junchao-Mellanox marked this pull request as draft October 25, 2022 11:05
@Junchao-Mellanox Junchao-Mellanox marked this pull request as ready for review October 26, 2022 02:38
@liat-grozovik
Copy link
Collaborator

@qiluo-msft could you suggest someone to review and signoff? LGTM

@liat-grozovik
Copy link
Collaborator

@qiluo-msft kindly reminder to get your review feedback

@liat-grozovik liat-grozovik requested review from prgeor and removed request for qiluo-msft November 14, 2022 19:47
@Junchao-Mellanox
Copy link
Collaborator Author

Hi @qiluo-msft , kindly reminder to get your review feedback

@prgeor
Copy link
Contributor

prgeor commented Dec 5, 2022

@Junchao-Mellanox please update the section:-
`

  1. Previous command output (if the output of a command-line utility has changed)
  2. New command output (if the output of a command-line utility has changed)
    `

@Junchao-Mellanox
Copy link
Collaborator Author

@Junchao-Mellanox please update the section:- `

  1. Previous command output (if the output of a command-line utility has changed)
  2. New command output (if the output of a command-line utility has changed)
    `

Done.

@prgeor prgeor merged commit e8130f5 into sonic-net:master Dec 6, 2022
preetham-singh pushed a commit to preetham-singh/sonic-utilities that referenced this pull request Dec 6, 2022
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Dec 6, 2022
Update sonic-utilities submodule pointer to include the following:
* ca9a020 [generate_dump] [Mellanox] Fix the duplicate dfw dump collection problem by adding symlinks ([sonic-net#2536](sonic-net/sonic-utilities#2536))
* 92c7001 [config] Add check in config interface ip command to block if the interface is portchannel member ([sonic-net#2539](sonic-net/sonic-utilities#2539))
* e8130f5 [system-health] Improve code structure of system health CLIs ([sonic-net#2453](sonic-net/sonic-utilities#2453))
* 00c01b3 Transceiver eeprom dom CLI modification to show output from TRANSCEIVER_DOM_THRESHOLD table ([sonic-net#2535](sonic-net/sonic-utilities#2535))
* 42f51c2 sonic-utilities: Update config reload() to verify formatting of an input file ([sonic-net#2529](sonic-net/sonic-utilities#2529))
* a5e1e2b [GCU] Add RemoveCreateOnlyDependency Validator/Generator ([sonic-net#2500](sonic-net/sonic-utilities#2500))
* 6411b52 [QoS] Introduce delay to the qos reload flow ([sonic-net#2503](sonic-net/sonic-utilities#2503))
* fce7ec3 Use github code scanning instead of LGTM ([sonic-net#2530](sonic-net/sonic-utilities#2530))
* 91bd6de Change show kube command default value of insecure key to True ([sonic-net#2517](sonic-net/sonic-utilities#2517))
* c44c584 Add db_migrator_constants.py script to setup.py ([sonic-net#2534](sonic-net/sonic-utilities#2534))
* 6a3238e [drop counters] Fix CLI script for unconfigured PGs ([sonic-net#2518](sonic-net/sonic-utilities#2518))
* 263810b Update vrf add, del commands for duplicate/non-existing VRFs ([sonic-net#2467](sonic-net/sonic-utilities#2467))
* addae73 Port 202012 DB migration changes to newer branches ([sonic-net#2515](sonic-net/sonic-utilities#2515))
* 2af8cfa [VXLAN]Fixing traceback in show remotemac when mac moves during command execution ([sonic-net#2506](sonic-net/sonic-utilities#2506))

Signed-off-by: dprital <drorp@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants