Francesco Romani has uploaded a new change for review. Change subject: lib: executor: log pool status on discard ......................................................................
lib: executor: log pool status on discard Log the pool size and content when a worker is discarded, to make troubleshooting and debug easier. Change-Id: I949181968a97a7bcec703bc36ef9e1a0f30c6858 Signed-off-by: Francesco Romani <from...@redhat.com> --- M lib/vdsm/executor.py 1 file changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/48333/1 diff --git a/lib/vdsm/executor.py b/lib/vdsm/executor.py index 1ce14bc..82c8d8c 100644 --- a/lib/vdsm/executor.py +++ b/lib/vdsm/executor.py @@ -127,6 +127,11 @@ with self._lock: if self._running: self._add_worker() + # this is a debug aid, it is not that important to be precise; + # intentionally done outside the lock + self._log.info('pool[%i]: (%s)', + len(self._workers), + ' '.join(str(w) for w in self._workers)) def _worker_stopped(self, worker): """ @@ -222,10 +227,12 @@ if self._discarded: raise AssertionError("Attempt to discard worker twice") self._discarded = True - self._log.debug("Worker %s discarded while doing '%s'", - self.name, self._task.name) + self._log.debug("Worker %s discarded", str(self)) self._executor._worker_discarded(self) + def __str__(self): + return '%s on %s' % (self.name, self._task.name) + class TaskQueue(object): """ -- To view, visit https://gerrit.ovirt.org/48333 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I949181968a97a7bcec703bc36ef9e1a0f30c6858 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches