Change in vdsm[master]: migration: Add migrateChangeGlobalParams verb
fromani at redhat.com
fromani at redhat.com
Fri Oct 23 12:41:27 UTC 2015
Francesco Romani has posted comments on this change.
Change subject: migration: Add migrateChangeGlobalParams verb
......................................................................
Patch Set 6:
(3 comments)
The whole "dynamic semaphore" concept is a nice hack, but I'm not convinced it is the best way forward.
https://gerrit.ovirt.org/#/c/47409/6/vdsm/API.py
File vdsm/API.py:
Line 1762: max_outgoing = params.get('maxOutgoingMigrations')
Line 1763: if max_outgoing is not None:
Line 1764: self.log('Updating maxOutgoingMigrations to %s',
Line 1765: max_outgoing)
Line 1766: migration.SourceThread.ongoingMigrations.setValue(max_outgoing)
for another patch: let's move this sempahore in the module.
Line 1767:
Line 1768: max_incoming = params.get('maxIncomingMigrations')
Line 1769: if max_incoming is not None:
Line 1770: self.log('Updating maxIncomingMigrations to %s',
Line 1768: max_incoming = params.get('maxIncomingMigrations')
Line 1769: if max_incoming is not None:
Line 1770: self.log('Updating maxIncomingMigrations to %s',
Line 1771: max_incoming)
Line 1772: migration.incomingMigrations.setValue(max_incoming)
for another patch: once both semaphores are module variables, let's rename them
- migration.incoming
- migration.outgoing
Line 1773:
Line 1774: return response.success()
Line 1775: except migration.MigrationConfigurationError:
Line 1776: return response.error('migrateChangeParamsErr')
https://gerrit.ovirt.org/#/c/47409/6/vdsm/virt/utils.py
File vdsm/virt/utils.py:
Line 160:
Line 161: return decorator
Line 162:
Line 163:
Line 164: class DynamicSemaphore(threading._Semaphore):
We learned the hard way from the cpopen saga that messing with python implementation details is a bad idea.
Any other option to avoid this?
Line 165: """
Line 166: Extends standard semaphore with the ability to alter the current "bound"
Line 167: by external actors.
Line 168:
--
To view, visit https://gerrit.ovirt.org/47409
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I4f6d1bcdc29f144d9fcf28a085b7014127cc4f41
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik 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