Change in vdsm[master]: migration: Add incoming migration semaphore
mpolednik at redhat.com
mpolednik at redhat.com
Thu Sep 10 11:10:25 UTC 2015
Martin Polednik has posted comments on this change.
Change subject: migration: Add incoming migration semaphore
......................................................................
Patch Set 2:
(3 comments)
https://gerrit.ovirt.org/#/c/45954/2/vdsm/virt/migration.py
File vdsm/virt/migration.py:
Line 54: VIR_MIGRATE_PARAM_GRAPHICS_URI = 'graphics_uri'
Line 55:
Line 56:
Line 57: mig = min(config.getint('vars', 'max_incoming_migrations'),
Line 58: caps.CpuTopology().cores())
> yeah, maybe it does not need a fallback at all. But not sure how would it t
should be exposed as a configuration imho
Line 59:
Line 60: incomingMigrations = threading.BoundedSemaphore(mig)
Line 61:
Line 62:
Line 330: dev._deviceXML, self._vm.conf, dev.custom)
Line 331: hooks.before_vm_migrate_source(self._vm._dom.XMLDesc(0),
Line 332: self._vm.conf)
Line 333:
Line 334: while True:
> For the same reason why the VDSM has an outgoing semaphore. Engine decides
we need something more robust then just retrying - there should be some kind of migration status tracking and acting on that. what if there are multiple long-term migrations that block small ones and by the time they finish there are different hosts that could be suitable for migration?
Line 335: # Do not measure the time spent for creating the VM on the
Line 336: # destination. In some cases some expensive operations can
Line 337: # cause the migration to get cancelled right after the
Line 338: # transfer started.
Line 347: SourceThread._ongoingMigrations.release()
Line 348: # the destination is busy with incoming migrations
Line 349: # release semaphore and give other outgoing migrations
Line 350: # a chance
Line 351: time.sleep(5)
> It is not "wait until migration finishes". It is "wait to not to eat up all
see above
Line 352: SourceThread._ongoingMigrations.acquire()
Line 353: else:
Line 354: break
Line 355:
--
To view, visit https://gerrit.ovirt.org/45954
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8952f732033ed160292b11fbc0c4deac099b2b3e
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list