Francesco Romani has uploaded a new change for review.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
virt: migration: merge monitor and downtime thread
This patch merges the MigrationDowntimeThread into the MigrationMonitorThread.
The benefits are * less code * less threads * better (and simpler) integration between migration progress tracking and downtime setting.
Change-Id: I7ac66331b44435a9cffeb9de1454db6843245979 Signed-off-by: Francesco Romani fromani@redhat.com --- M vdsm/migration.py 1 file changed, 22 insertions(+), 41 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/77/25977/1
diff --git a/vdsm/migration.py b/vdsm/migration.py index 1234471..8c33f1e 100644 --- a/vdsm/migration.py +++ b/vdsm/migration.py @@ -293,10 +293,9 @@ self._vm.log.debug('starting migration to %s ' 'with miguri %s', duri, muri)
- t = MigrationDowntimeThread(self._vm, int(self._downtime)) - self._monitorThread = MigrationMonitorThread(self._vm, - startTime) + startTime, + int(self._downtime)) self._monitorThread.start()
try: @@ -325,7 +324,6 @@ self._raiseAbortError()
finally: - t.cancel() self._monitorThread.stop()
def stop(self): @@ -339,53 +337,24 @@ raise
-class MigrationDowntimeThread(threading.Thread): - def __init__(self, vm, downtime): - super(MigrationDowntimeThread, self).__init__() - self.DOWNTIME_STEPS = config.getint('vars', 'migration_downtime_steps') - - self._vm = vm - self._downtime = downtime - self._stop = threading.Event() - - delay_per_gib = config.getint('vars', 'migration_downtime_delay') - memSize = int(vm.conf['memSize']) - self._wait = (delay_per_gib * max(memSize, 2048) + 1023) / 1024 - - self.daemon = True - self.start() - - def run(self): - self._vm.log.debug('migration downtime thread started') - - for i in range(self.DOWNTIME_STEPS): - self._stop.wait(self._wait / self.DOWNTIME_STEPS) - - if self._stop.isSet(): - break - - downtime = self._downtime * (i + 1) / self.DOWNTIME_STEPS - self._vm.log.debug('setting migration downtime to %d', downtime) - self._vm._dom.migrateSetMaxDowntime(downtime, 0) - - self._vm.log.debug('migration downtime thread exiting') - - def cancel(self): - self._vm.log.debug('canceling migration downtime thread') - self._stop.set() - - class MigrationMonitorThread(threading.Thread): _MIGRATION_MONITOR_INTERVAL = config.getint( 'vars', 'migration_monitor_interval') # seconds
- def __init__(self, vm, startTime): + def __init__(self, vm, startTime, downTime): super(MigrationMonitorThread, self).__init__() self._stop = threading.Event() self._vm = vm self._startTime = startTime self.daemon = True self.progress = 0 + + self._downtime = downTime + delay_per_gib = config.getint('vars', 'migration_downtime_delay') + memSize = int(vm.conf['memSize']) + self._wait = (delay_per_gib * max(memSize, 2048) + 1023) / 1024 + self._downtime_interval = self._wait / self.DOWNTIME_STEPS + self._downtime_step = 0
@property def enabled(self): @@ -402,6 +371,7 @@ self._stop.wait(1.0) if self.enabled: self.monitor_migration(step) + self.monitor_downtime(step) step += 1
self._vm.log.debug('migration monitor thread exiting') @@ -467,6 +437,17 @@ ' data processed' % (timeElapsed / 1000, self.progress))
+ def update_downtime(self, i): + return self._downtime * (i + 1) / self.DOWNTIME_STEPS + + def monitor_downtime(self, step): + if self._downtime_step < self.DOWNTIME_STEPS and \ + step % self._downtime_interval == 0: + downtime = self.update_downtime(self._downtime_step) + self._vm.log.debug('setting migration downtime to %d', downtime) + self._vm._dom.migrateSetMaxDowntime(downtime, 0) + self._downtime_step += 1 + def stop(self): self._vm.log.debug('stopping migration monitor thread') self._stop.set()
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6763/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7553/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7663/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6766/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7556/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7666/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 3:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6771/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7561/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7671/ : SUCCESS
Antoni Segura Puimedon has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 3: Code-Review+1
Francesco Romani has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 3: Code-Review-1
(1 comment)
I hate to waste +1s but I need to.
http://gerrit.ovirt.org/#/c/25977/3/vdsm/migration.py File vdsm/migration.py:
Line 370: while not self._stop.isSet(): Line 371: self._stop.wait(1.0) Line 372: if self.enabled: Line 373: self.monitor_migration(step) Line 374: self.monitor_downtime(step) This is a bug. This has to be done even if the monitor is for some reason disabled. Will fix. Line 375: step += 1 Line 376: Line 377: self._vm.log.debug('migration monitor thread exiting') Line 378:
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 4:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6781/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7571/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7681/ : SUCCESS
Antoni Segura Puimedon has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 4: Code-Review+1
I had missed the mistake you fixed :P
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 5:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6786/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7576/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7686/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 6:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6824/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7614/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7724/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 7:
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6829/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7620/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7730/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 8:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6914/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7704/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7816/ : SUCCESS
Antoni Segura Puimedon has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 8: Code-Review-1
(2 comments)
some more small comments
http://gerrit.ovirt.org/#/c/25977/8/vdsm/virt/migration.py File vdsm/virt/migration.py:
Line 356: self._progressTimeout = config.getint('vars', Line 357: 'migrationprogressTimeout') Line 358: Line 359: self._downtime = downTime Line 360: delayPerGiB = config.getint('vars', 'migration_downtime_delay') I'd make this a constant. Line 361: self._wait = (delayPerGiB * max(memSize, 2048) + 1023) / 1024 Line 362: self._downtimeInterval = self._wait / self.DOWNTIME_STEPS Line 363: self._downtimeStep = 0 Line 364:
Line 440: def update_downtime(self, i): Line 441: return self._downtime * (i + 1) / self.DOWNTIME_STEPS Line 442: Line 443: def monitor_downtime(self, step): Line 444: if self._downtimeStep < self.DOWNTIME_STEPS and \ prefer parenthesis to escaping line breaks. Line 445: step % self._downtimeInterval == 0: Line 446: downtime = self.update_downtime(self._downtimeStep) Line 447: self._vm.log.debug('setting migration downtime to %d', downtime) Line 448: self._vm._dom.migrateSetMaxDowntime(downtime, 0)
Francesco Romani has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 8:
(2 comments)
http://gerrit.ovirt.org/#/c/25977/8/vdsm/virt/migration.py File vdsm/virt/migration.py:
Line 356: self._progressTimeout = config.getint('vars', Line 357: 'migrationprogressTimeout') Line 358: Line 359: self._downtime = downTime Line 360: delayPerGiB = config.getint('vars', 'migration_downtime_delay')
I'd make this a constant.
Done Line 361: self._wait = (delayPerGiB * max(memSize, 2048) + 1023) / 1024 Line 362: self._downtimeInterval = self._wait / self.DOWNTIME_STEPS Line 363: self._downtimeStep = 0 Line 364:
Line 440: def update_downtime(self, i): Line 441: return self._downtime * (i + 1) / self.DOWNTIME_STEPS Line 442: Line 443: def monitor_downtime(self, step): Line 444: if self._downtimeStep < self.DOWNTIME_STEPS and \
prefer parenthesis to escaping line breaks.
Done Line 445: step % self._downtimeInterval == 0: Line 446: downtime = self.update_downtime(self._downtimeStep) Line 447: self._vm.log.debug('setting migration downtime to %d', downtime) Line 448: self._vm._dom.migrateSetMaxDowntime(downtime, 0)
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 9:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6927/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7717/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7829/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 10:
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6950/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7852/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7741/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 11:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6957/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7860/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7749/ : SUCCESS
Vinzenz Feenstra has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 11: Code-Review+1
Antoni Segura Puimedon has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 11: Code-Review+1
(1 comment)
http://gerrit.ovirt.org/#/c/25977/11/vdsm/virt/migration.py File vdsm/virt/migration.py:
Line 292: Line 293: self._vm.log.debug('starting migration to %s ' Line 294: 'with miguri %s', duri, muri) Line 295: Line 296: self._monitorThread = MonitorThread(self._vm, I think the "Thread" part of the name is not necessary, but I don't mind too much. Line 297: startTime, Line 298: int(self._downtime)) Line 299: self._monitorThread.start() Line 300:
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 12:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6975/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7877/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7766/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 13:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6982/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7885/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7774/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 14:
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/7007/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7909/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7798/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 14:
Patch set 14: * rebased * improved the commit message
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 15:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8038/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8151/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7248/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 16:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8276/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7486/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8394/ : SUCCESS
Antoni Segura Puimedon has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 16: Code-Review-1
(1 comment)
http://gerrit.ovirt.org/#/c/25977/16/vdsm/virt/migration.py File vdsm/virt/migration.py:
Line 443: self._vm.log.info('Migration Progress: %s seconds elapsed, %s%% of' Line 444: ' data processed' % Line 445: (timeElapsed / 1000, self.progress)) Line 446: Line 447: def update_downtime(self, i): This is just a convenience method. It is not consistent that monitor_migration would have calculateProgress as an internal method (and camel cased) and that monitor_downtime would have update_downtime as an external method (and var_foo cased). What about to have it be calculate_downtime as an internal method? Line 448: return self._downtime * (i + 1) / self._DOWNTIME_STEPS Line 449: Line 450: def monitor_downtime(self, step): Line 451: if (self._downtimeStep < self._DOWNTIME_STEPS and
Francesco Romani has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 16:
(1 comment)
http://gerrit.ovirt.org/#/c/25977/16/vdsm/virt/migration.py File vdsm/virt/migration.py:
Line 443: self._vm.log.info('Migration Progress: %s seconds elapsed, %s%% of' Line 444: ' data processed' % Line 445: (timeElapsed / 1000, self.progress)) Line 446: Line 447: def update_downtime(self, i):
This is just a convenience method. It is not consistent that monitor_migrat
You have a point, will fix. Furthermore, will also post some follow-up patches to make sure this module is style-consistent and follows the new underscore_separated style. Line 448: return self._downtime * (i + 1) / self._DOWNTIME_STEPS Line 449: Line 450: def monitor_downtime(self, step): Line 451: if (self._downtimeStep < self._DOWNTIME_STEPS and
Francesco Romani has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 17: Verified+1
Verified with 25976, 25978, 25979 by running migrations and by inspecting the logs, being the downtime information not exposed anywere else.
Francesco Romani has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 17:
s/25979/26279/
Vinzenz Feenstra has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 17: Code-Review+1
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 17:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/9692/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8759/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/9545/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 18:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8916/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/9700/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/683/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/9855/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 19:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/9235/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/10019/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/846/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/10174/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_verify-error-codes_merged/5101/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_merged/3258/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 20:
rebased
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 20:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/9299/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/10083/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/866/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/10239/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_verify-error-codes_merged/5165/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_merged/3323/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 20:
rebased
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 21:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/9350/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/10134/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/888/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/10289/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_verify-error-codes_merged/5215/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_merged/3373/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 22:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/9522/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/10306/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/10462/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_verify-error-codes_merged/5388/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_merged/3546/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/945/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 23:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/9712/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/10497/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/1046/ : There was an infra issue, please contact infra@ovirt.org
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/10654/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 23: Verified+1
Verified on a patched VDSM doing a few migrations back and forth.
Francesco Romani has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 23:
Tested: 25976, 25977, 25978, 26279
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 24:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10130/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/10915/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/1217/ : There was an infra issue, please contact infra@ovirt.org
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11072/ : SUCCESS
Dan Kenigsberg has posted comments on this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Patch Set 24: Code-Review-1
(1 comment)
http://gerrit.ovirt.org/#/c/25977/24/vdsm/virt/migration.py File vdsm/virt/migration.py:
Line 377: Line 378: self._downtime = downTime Line 379: self._wait = ( Line 380: self._DELAY_PER_GIB * max(memSize, 2048) + 1023) / 1024 Line 381: self._downtimeInterval = self._wait / self._DOWNTIME_STEPS the down side of merging the two threads into one, is that now it is harder to understand that these data members are specific to the setting of down time. You may want to have a _downtime qualifier shared between them all.
But I would find it nicer if we can cosolidate this logic with AdvancedStatsFunc, where each Func has its own fancy object with its own data members. Line 382: self._downtimeStep = 0 Line 383: Line 384: @property Line 385: def enabled(self):
Francesco Romani has abandoned this change.
Change subject: virt: migration: merge monitor and downtime thread ......................................................................
Abandoned
further thoughts on this topic, for example during the discussion of http://gerrit.ovirt.org/#/c/25820/ , proved that this merger may not be so much beneficial after all. So, will take another route to make migration nicer. This patchset will be resumed if more compelling proof arise.
vdsm-patches@lists.fedorahosted.org