Skip to content

Commit b964fd7

Browse files
author
Robert Breker
committed
Avoid sending misleading notifications during bootstorm, slow boot/shutdown
- Bump MONITOR_TIMEOUT_WARNING_S to 120s - Delete error messsages for shutdown VMs Signed-off-by: Robert Breker <[email protected]>
1 parent 4d7b5dd commit b964fd7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/xscontainer/docker_monitor/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
MONITORRETRYSLEEPINS = 20
2222
MONITOR_EVENTS_POLL_INTERVAL = 1
23-
MONITOR_TIMEOUT_WARNING_S = 75.0
23+
MONITOR_TIMEOUT_WARNING_S = 120.0
2424
REGISTRATION_KEY = "xscontainer-monitor"
2525
REGISTRATION_KEY_ON = 'True'
2626
REGISTRATION_KEY_OFF = 'False'
@@ -114,6 +114,9 @@ def _monitoring_loop(self):
114114
log.info("Could not connect to VM %s, will retry" % (vmuuid))
115115
if not self._stop_monitoring_request:
116116
time.sleep(MONITORRETRYSLEEPINS)
117+
# Make sure that we don't leave back error messsages for VMs that are
118+
# not monitored anymore
119+
self._wipe_monitor_error_message_if_needed()
117120
log.info("monitor_loop returns from handling vm %s" % (vmuuid))
118121

119122
def __monitor_vm_events(self):

0 commit comments

Comments
 (0)