: Fix too early restart in case core dump active
A message that is not in the archive (sent off-list or not yet received): 1697246995.1779611283329132103.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com
PATCH 1/1 : Fix too early restart in case core dump active
Changeset 19546 fix avoidance to restart domain in case of crash. Problem is in case that core dump is active. Time needed for dump can extend guest run time so it is greater than MINIMUM_RESTART_TIME. This cause to dump-restart loop.
This patch store crash time so it can be used instead of current time.
Patch:
--
tools/python/xen/xend/XendDomainInfo.py +5 -1
@@ -2057,6 +2057,7 @@ # the domain for debugging. Leave it alone. return + self.info['crash_time'] = time.time() log.warn('Domain has crashed: name=%s id=%d.', self.info['name_label'], self.domid) self._writeVm(LAST_SHUTDOWN_REASON, 'crash')
@@ -2185,10 +2186,13 @@ self.destroy() return old_domid = self.domid self._writeVm(RESTART_IN_PROGRESS, 'True') - elapse = time.time() - self.info['start_time'] + if self.infoIsSet('crash_time'): + elapse = self.info['crash_time'] - self.info['start_time'] + else: + elapse = time.time() - self.info['start_time'] if elapse < MINIMUM_RESTART_TIME: log.error('VM %s restarting too fast (Elapsed time: %f seconds). ' 'Refusing to restart to avoid loops.',
Signature · 2 lines
Miroslav Rezanina Software Engineer - Virtualization Team - XEN kernel