[Sys Health] Fix the service entry delete in state_db because of timer job#45
Closed
[Sys Health] Fix the service entry delete in state_db because of timer job#45
Conversation
Signed-off-by: Vivek Reddy Karri <[email protected]>
Owner
Author
|
@Junchao-Mellanox, Can you review this? |
Junchao-Mellanox
approved these changes
Apr 18, 2023
vivekrnv
pushed a commit
that referenced
this pull request
Jan 12, 2024
…ly (sonic-net#17572) #### Why I did it src/dhcprelay ``` * 5ae186f - (HEAD -> master, origin/master, origin/HEAD) [counter] Clear counter table when init (#45) (10 hours ago) [Yaqiang Zhu] ``` #### How I did it #### How to verify it #### Description for the changelog
vivekrnv
pushed a commit
that referenced
this pull request
Apr 2, 2024
5ae186f Yaqiang Zhu Tue Dec 19 12:05:15 2023 -0500 [counter] Clear counter table when init (#45)
vivekrnv
pushed a commit
that referenced
this pull request
Mar 24, 2025
… automatically (sonic-net#760) #### Why I did it src/sonic-platform-common ``` * 047e12b - (HEAD -> 202412, origin/202412) [code sync] Merge code from sonic-net/sonic-platform-common:202411 to 202412 (#45) (21 hours ago) [mssonicbld] ``` #### How I did it #### How to verify it #### Description for the changelog
vivekrnv
pushed a commit
that referenced
this pull request
Aug 19, 2025
…sonic-net#23654) #### Why I did it src/dhcpmon ``` * 1cb6ced - (HEAD -> master, origin/master, origin/HEAD) Update clear_counter_timeout to fix clear counter issue (#45) (19 hours ago) [Yaqiang Zhu] * 848304e - [build] Update to use libyang3 (#46) (4 days ago) [Yaqiang Zhu] ``` #### How I did it #### How to verify it #### Description for the changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I did it
systemd stop event on service with timers can sometime delete the state_db entry for the corresponding service.
Note: This won't be observed on the master label since the dependency on timer was removed with the recent config reload enhancement. However, it is better to have the fix since there might be some systemd services added to system health daemon in the future which may contain timers
Expected
Should see a Down entry for SNMP instead of the entry being deleted from the STATE_DB
How I did it
Happens because the timer is usually a PartOf service and thus a stop on service is propagated to timer. Fixed the logic to handle this
How to verify it
Which release branch to backport (provide reason below if selected)
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)