sonic-buildimage/src/system-health
DavidZagury e830491001
[system-health] When disabling a feature the SYSTEM_READY|SYSTEM_STATE was not updated (#14823)
- Why I did it
If you enable feature and then disable it, System Ready status change to Not Ready

A disabled feature should not affect the system ready status.

- How I did it
During the disable flow of dhcp_relay, it entered the dnsrvs_name list, which caused the SYSTEM_STATE key to be set to DOWN. Right after that, the dhcp_relay service was removed from the full service list, however, but, when it was removed from the dnsrvs_name, there was no flow to reset the system state back to UP even though there was no more services in down state.

- How to verify it
root@qa-eth-vt01-2-3700v:/home/admin# config feature state dhcp_relay enabled 
root@qa-eth-vt01-2-3700v:/home/admin# show system-health sysready-status 

root@qa-eth-vt01-2-3700v:/home/admin# config feature state dhcp_relay disabled
root@qa-eth-vt01-2-3700v:/home/admin# show system-health sysready-status 

Should see
System is ready
2023-05-30 10:37:33 +03:00
..
health_checker [system-health] When disabling a feature the SYSTEM_READY|SYSTEM_STATE was not updated (#14823) 2023-05-30 10:37:33 +03:00
scripts [healthd] Use unix_socket_path instead of loopback ip (#14843) 2023-05-26 15:49:21 +03:00
tests [system-health] When disabling a feature the SYSTEM_READY|SYSTEM_STATE was not updated (#14823) 2023-05-30 10:37:33 +03:00
.gitignore [system-health] Update .gitignore file (#5688) 2020-10-22 11:58:27 -07:00
pytest.ini [system-health] Make check interval more accurate (#14085) 2023-03-15 07:21:00 +02:00
setup.cfg [system-health] Add support for monitoring system health (#4835) 2020-10-12 11:12:49 +03:00
setup.py Check SONiC dependencies before installation. (#13850) 2023-03-02 08:20:39 +08:00