Francesco Romani has posted comments on this change.
Change subject: vm: per-attribute monitor response check
......................................................................
Patch Set 3:
(2 comments)
Nir, thanks for the review.
In the new version of the patch, amended as you suggested, we use just three set
operations: add(), remove() and len() which are all atomic, but I purposefully kept the
lock to make it explicit the `attributeTimeouts` set is accessed from multiple threads.
http://gerrit.ovirt.org/#/c/23138/3/vdsm/vm.py
File vdsm/vm.py:
Line 1939: if (self.arch not in ['ppc64', 'x86_64']):
Line 1940: raise RuntimeError('Unsupported architecture: %s' %
self.arch)
Line 1941:
Line 1942: self._attrTimeoutLock = threading.Lock()
Line 1943: self._attrTimeoutExperienced = {} # will keep track of timeout data
First, I think it makes more sense when you first create the
container, and
Good points. Done.
Line 1944:
Line 1945: def _get_lastStatus(self):
Line 1946: PAUSED_STATES = ('Powering down', 'RebootInProgress',
'Up')
Line 1947: if not self._guestCpuRunning and self._lastStatus in PAUSED_STATES:
Line 3639: self._attrTimeoutExperienced[attrName] = timeout
Line 3640: if any(self._attrTimeoutExperienced.itervalues()):
Line 3641: self._monitorResponse = -1
Line 3642: else:
Line 3643: self._monitorResponse = 0
Since you keep only True or False for each attribute, we can replace
the di
This is way nicer. Thanks! Done.
Line 3644:
Line 3645: def _waitForIncomingMigrationFinish(self):
Line 3646: if 'restoreState' in self.conf:
Line 3647: self.cont()
--
To view, visit
http://gerrit.ovirt.org/23138
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I32a98d34cde91fa9dc3d07f03c47a5f2f22da620
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes