Change in vdsm[master]: WIP DONTMERGE: migrationLimit retry
fromani at redhat.com
fromani at redhat.com
Wed Jan 27 12:36:47 UTC 2016
Francesco Romani has posted comments on this change.
Change subject: WIP DONTMERGE: migrationLimit retry
......................................................................
Patch Set 1:
(4 comments)
https://gerrit.ovirt.org/#/c/52799/1/vdsm/virt/migration.py
File vdsm/virt/migration.py:
Line 293: 'mode': self._mode,
Line 294: 'method': METHOD_ONLINE,
Line 295: 'dstparams': self._dstparams,
Line 296: 'dstqemu': self._dstqemu,
Line 297: }
this was just moved here from the with/try nested blocks. It was inside for no special reason.
Line 298:
Line 299: while not self._completed:
Line 300: try:
Line 301: with SourceThread._ongoingMigrations:
Line 295: 'dstparams': self._dstparams,
Line 296: 'dstqemu': self._dstqemu,
Line 297: }
Line 298:
Line 299: while not self._completed:
added this loop
Line 300: try:
Line 301: with SourceThread._ongoingMigrations:
Line 302: if self._migrationCanceledEvt:
Line 303: self._raiseAbortError()
Line 296: 'dstqemu': self._dstqemu,
Line 297: }
Line 298:
Line 299: while not self._completed:
Line 300: try:
swapped try and with blocks. Exception handling should'nt need to be inside the with, and the swap allows us to implement the retry logic
Line 301: with SourceThread._ongoingMigrations:
Line 302: if self._migrationCanceledEvt:
Line 303: self._raiseAbortError()
Line 304: self.log.debug("migration semaphore acquired "
Line 313: if e.get_error_code() == libvirt.VIR_ERR_OPERATION_ABORTED:
Line 314: self.status = response.error(
Line 315: 'migCancelErr', message='Migration canceled')
Line 316: raise
Line 317: except MigrationLimitExceeded:
this exception has to be raised if migrationCreate fails with error='migrationLimit'.
Line 318: time.sleep(5) # FIXME
Line 319: except MigrationDestinationSetupError as e:
Line 320: self._recover(str(e))
Line 321: # we know what happened, no need to dump hollow stack trace
--
To view, visit https://gerrit.ovirt.org/52799
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list