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

[202211][system-health] When disabling a feature the SYSTEM_READY|SYSTEM_STAT… #15437

Merged

Conversation

DavidZagury
Copy link
Contributor

…E was not updated
Fix issue #14916
Backport of #14823

Why I did it

If you enable feature and then disable it, System Ready status change to Not Ready


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 
System is ready

Service-Name            Service-Status    App-Ready-Status    Down-Reason
----------------------  ----------------  ------------------  -------------
containerd              OK                OK                  -
dhcp_relay              OK                OK                  -
docker                  OK                OK                  -
...


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 
System is not ready - one or more services are not up

Service-Name            Service-Status    App-Ready-Status    Down-Reason
----------------------  ----------------  ------------------  -------------
containerd              OK                OK                  -
docker                  OK                OK                  -
...

A disabled feature should not affect the system ready status.

Work item tracking
  • Microsoft ADO (number only):

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

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@DavidZagury DavidZagury requested a review from lguohan as a code owner June 12, 2023 11:52
@DavidZagury DavidZagury changed the title [system-health] When disabling a feature the SYSTEM_READY|SYSTEM_STAT… [202211][system-health] When disabling a feature the SYSTEM_READY|SYSTEM_STAT… Jun 13, 2023
@dprital dprital requested a review from liat-grozovik June 13, 2023 07:20
@liat-grozovik
Copy link
Collaborator

@StormLiangMS LGTM. can you please help to merge?

@keboliu keboliu requested a review from StormLiangMS June 14, 2023 03:22
@dprital
Copy link
Collaborator

dprital commented Jun 20, 2023

@StormLiangMS , Can you please merge this PR ?

@yxieca yxieca merged commit 2fc3e1e into sonic-net:202211 Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants