Skip to content

Commit

Permalink
Fixup sysmonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
fastiuk committed Feb 6, 2024
1 parent f4006dd commit cac3ed8
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/system-health/health_checker/sysmonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

SYSLOG_IDENTIFIER = "system#monitor"
REDIS_TIMEOUT_MS = 0
spl_srv_list = ['database-chassis', 'gbsyncd']
spl_srv_list = ['database-chassis', 'gbsyncd', 'e2scrub_reap']
SELECT_TIMEOUT_MSECS = 1000
QUEUE_TIMEOUT = 15
TASK_STOP_TIMEOUT = 10
Expand Down Expand Up @@ -222,9 +222,6 @@ def get_all_service_list(self):
targets= [
"/etc/systemd/system/multi-user.target.wants",
"/etc/systemd/system/sonic.target.wants",
"/run/systemd/generator/multi-user.target.wants",
"/run/systemd/generator/sonic.target.wants",
"/etc/systemd/system/sym-mgr.target.requires",
]
for path in targets:
srvs_files_list = glob.glob('{}/*.service'.format(path))
Expand Down Expand Up @@ -284,13 +281,10 @@ def get_all_service_list(self):
feature_state = device_metadata.get('sysready_state', 'enabled')

# Handle feature state.
# portsyncmgrd gets status from all swss-ibv0@* containers, so use it
# if it present. Otherwise, use swss.service or swss-ibv0.service
# Use only swss.service to rely on ready state
if feature_state == 'disabled':
# Order matters
desired_srvs = ['portsyncmgrd.service',
'swss-ibv0.service',
'swss.service']
desired_srvs = ['swss.service']
for srv in desired_srvs:
if srv in dir_set:
dir_set = {srv}
Expand Down Expand Up @@ -637,9 +631,7 @@ def check_unit_status(self, event):

if len(self.dnsrvs_name) == 0:
astate = "UP"
else:
astate = "DOWN"
self.publish_system_status(astate)
self.publish_system_status(astate)

srv_name,last = event.split('.')
# stop on service maybe propagated to timers and in that case,
Expand Down

0 comments on commit cac3ed8

Please sign in to comment.