Change in vdsm[master]: WIP: RFC: track domain availability

fromani at redhat.com fromani at redhat.com
Fri Aug 7 15:10:48 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: WIP: RFC: track domain availability
......................................................................


Patch Set 4:

(4 comments)

https://gerrit.ovirt.org/#/c/44544/4/vdsm/virt/periodic.py
File vdsm/virt/periodic.py:

Line 51:                               scheduler=_scheduler)
Line 52: _operations = []
Line 53: 
Line 54: 
Line 55: _resources = ResourceTracker()
domains?
Line 56: 
Line 57: 
Line 58: def _timeout_from(interval):
Line 59:     """


Line 242:         for vm_id, vm_obj in vms.iteritems():
Line 243:             try:
Line 244:                 op = self._create(_resources, vm_obj)
Line 245: 
Line 246:                 if not op.required:
in a different patch:

  if op.required:
    self._executor.dispatch(op, self._timeout)
Line 247:                     continue
Line 248: 
Line 249:             except Exception:
Line 250:                 # we want to make sure to have VM UUID logged


Line 253:             else:
Line 254:                 self._executor.dispatch(op, self._timeout)
Line 255: 
Line 256:         if skipped:
Line 257:             self._log.warning('could not run %s on %s: too many tasks',
useful, but unneeded. Move to a different patch.
Line 258:                               self._create, skipped)
Line 259: 
Line 260:     def __repr__(self):
Line 261:         return 'VmDispatcher(%s)' % self._create


https://gerrit.ovirt.org/#/c/44544/4/vdsm/virt/sampling.py
File vdsm/virt/sampling.py:

Line 513:     def __call__(self):
Line 514:         timestamp = self._stats_cache.clock()
Line 515:         # we are deep in the hot path. bool(ExpiringCache)
Line 516:         # *is* costly so we should avoid it if we can.
Line 517:         available, total = self._tracker.resources()
move into an helper and/or document better
Line 518:         fast_path = (
Line 519:             self._sampling.acquire(blocking=False)
Line 520:             and len(available) == len(total)
Line 521:             and not self._skip_doms)


-- 
To view, visit https://gerrit.ovirt.org/44544
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1b1d5173bac8e288474581092b8132dc0df03ad4
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list