Change in vdsm[master]: Introduce a maximum time limit a migration may take

vfeenstr at redhat.com vfeenstr at redhat.com
Tue Dec 3 11:35:53 UTC 2013


Vinzenz Feenstra has posted comments on this change.

Change subject: Introduce a maximum time limit a migration may take
......................................................................


Patch Set 1:

(3 comments)

....................................................
File lib/vdsm/config.py.in
Line 54:             'Maximum time the destination waits since migration is stalled. '
Line 55:             'Please note, that this is not overall migration timeout. '
Line 56:             'Source waits twice as long (to avoid races).'),
Line 57: 
Line 58:         ('migration_max_time', '21600',
Done

4 GiB is actually 256s on 32MiB/s (it's 32 Secs per GiB 50% -> 64s/GiB * 4)

I decided to make it settable on a GiB mem base
Line 59:             'The maximum time in seconds a migration may take before the '
Line 60:             'migration will be aborted.'),
Line 61: 
Line 62:         ('migration_listener_timeout', '30',


....................................................
File vdsm/vm.py
Line 763:              memTotal, memProcessed, memRemaining,
Line 764:              fileTotal, fileProcessed, _) = self._vm._dom.jobInfo()
Line 765: 
Line 766:             abort = False
Line 767:             if time.time() - startTime > migrationMaxTime:
Done

I start setting the time in the beginning of the thread, I think it's ok to go this way.
Line 768:                 self._vm.log.warn('The migration took %d seconds which is '
Line 769:                                   'exceeding the configured maximum time '
Line 770:                                   'for migrations of %d seconds. The '
Line 771:                                   'migration has been aborted.',


Line 767:             if time.time() - startTime > migrationMaxTime:
Line 768:                 self._vm.log.warn('The migration took %d seconds which is '
Line 769:                                   'exceeding the configured maximum time '
Line 770:                                   'for migrations of %d seconds. The '
Line 771:                                   'migration has been aborted.',
Done
Line 772:                                   time.time() - startTime, migrationMaxTime)
Line 773:                 abort = True
Line 774:             elif (smallest_dataRemaining is None or
Line 775:                     smallest_dataRemaining > dataRemaining):


-- 
To view, visit http://gerrit.ovirt.org/21708
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifd2f76b9334fcb7d2db24c081cccae15e8fd0b0c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Lee Yarwood <lyarwood at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Tomáš Došek <tdosek at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list