Nir Soffer has posted comments on this change. Change subject: monitoring: Separate storage health monitoring ......................................................................
Patch Set 4: (4 comments) https://gerrit.ovirt.org/#/c/54757/4/lib/vdsm/storage/check.py File lib/vdsm/storage/check.py: Line 35: def monotonic_time(): Line 36: return os.times()[4] Line 37: Line 38: Line 39: class EventLoop(object): This class will be replaced by vdsm.storage.eventloop.EventLoop See previous patch. Line 40: # TODO: schedule calls from other threads on the eventloop thread. Line 41: Line 42: log = logging.getLogger("storage.eventloop") Line 43: DEFAULT_DELAY = 30.0 # Used if no timers are scheduled Line 132: expired.append((deadline, timer)) Line 133: return expired Line 134: Line 135: Line 136: class Timer(object): Will be dropped. Line 137: Line 138: def __init__(self, callback, repeat=0.0): Line 139: self.callback = callback Line 140: self.repeat = repeat Line 252: Line 253: def check(self): Line 254: if not self.running: Line 255: return Line 256: if self._proc: Unneeded, will schedule a new check when the check is finished. Line 257: elapsed = monotonic_time() - self._check_time Line 258: self.log.warning("Path %r stuck for %.02f seocnds", Line 259: self._path, elapsed) Line 260: return Line 288: self._rc = rc Line 289: self._reaper = None Line 290: self._proc = None Line 291: self.log.debug("FINISH check %r rc=%s stats=%r elapsed=%.02f", Line 292: self._path, self._rc, self._stats, elapsed) Schedule a new check here - we don't really need repeating timers, and they are not supporting in asyncio eventloop. Line 293: Line 294: Line 295: # TODO: replace this with tests Line 296: if __name__ == '__main__': -- To view, visit https://gerrit.ovirt.org/54757 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If22fe38b8b29116270f9012b75895506adc48852 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Adam Litke <ali...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches