Skip to content

Commit

Permalink
Remove services mentioned in exclude service list for system monitori…
Browse files Browse the repository at this point in the history
…ng (#18911)

- Why I did it
To address #18814

- How I did it
Introduce exclude service list in the code to be parsed and remove the services from the system ready tracking.
In this case, it is ztp.service

- How to verify it
show system-health sysready-status output
  • Loading branch information
sg893052 authored and mssonicbld committed May 20, 2024
1 parent 8ea1659 commit e1bc0f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/system-health/health_checker/sysmonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
QUEUE_TIMEOUT = 15
TASK_STOP_TIMEOUT = 10
logger = Logger(log_identifier=SYSLOG_IDENTIFIER)

exclude_srv_list = ['ztp.service']

#Subprocess which subscribes to STATE_DB FEATURE table for any update
#and push service events to main process via queue
Expand Down Expand Up @@ -158,6 +158,11 @@ def get_all_service_list(self):
if srv in dir_list:
dir_list.remove(srv)

#Remove services from exclude list Eg.ztp.service
for srv in exclude_srv_list:
if srv in dir_list:
dir_list.remove(srv)

dir_list.sort()
return dir_list

Expand Down

0 comments on commit e1bc0f3

Please sign in to comment.