Skip to content

Commit

Permalink
Fix sanity not starting missing instances. Group effort fix from debu…
Browse files Browse the repository at this point in the history
…gging session (#1053)
  • Loading branch information
reidsunderland authored and petersilva committed May 18, 2024
1 parent 9716b30 commit b471b23
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sarracenia/sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1981,7 +1981,7 @@ def sanity(self):
component_path = self._find_component_path(c)
if component_path == '':
continue
if self.configs[c][cfg]['status'] in ['stopped']:
if self.configs[c][cfg]['status'] in ['missing']:
numi = self.configs[c][cfg]['instances']
for i in range(1, numi + 1):
if pcount % 10 == 0: print('.', end='', flush=True)
Expand All @@ -1992,9 +1992,9 @@ def sanity(self):
print( f'\nfound hung {c}/{cfg}/{i} pid: {kill_pid}' )
kill_hung.append( kill_pid )
pcount += 1

print('killing hung processes... (no point in SIGTERM if it is hung)')

if (len(kill_hung) > 0) and not self.options.dry_run :
print('killing hung processes... (no point in SIGTERM if it is hung)')
for pid in kill_hung:
signal_pid(pid, signal.SIGKILL)
time.sleep(5)
Expand All @@ -2003,7 +2003,8 @@ def sanity(self):

if pcount != 0:
self._find_missing_instances()
self._clean_missing_proc_state()
if not self.options.dry_run:
self._clean_missing_proc_state()
self._read_states()
self._resolve()
filtered_missing = []
Expand Down

0 comments on commit b471b23

Please sign in to comment.