Change in vdsm[ovirt-3.5]: migration: use context manager for semaphore

fromani at redhat.com fromani at redhat.com
Tue Jan 19 09:16:44 UTC 2016


Francesco Romani has submitted this change and it was merged.

Change subject: migration: use context manager for semaphore
......................................................................


migration: use context manager for semaphore

The migration source code path needs to take the
ongoingMigrations semaphore, to throttle the outgoing
migrations.

The code did so using the pre-2.6 way, explicitly
using acquire() and release().

This patch switches the code to the context manager
semantics, to make the code a bit nicer and to unlock
further refactoring.

Change-Id: I8fb7bd6a66898804eefd9bd286c77fd8b9225bc4
Backport-To: 3.6
Backport-To: 3.5
Bug-Url: https://bugzilla.redhat.com/1298190
Related-To: https://bugzilla.redhat.com/1296936
Signed-off-by: Francesco Romani <fromani at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/51655
Reviewed-by: Milan Zamazal <mzamazal at redhat.com>
Continuous-Integration: Jenkins CI
Reviewed-by: Vinzenz Feenstra <vfeenstr at redhat.com>
Reviewed-by: Martin Polednik <mpolednik at redhat.com>
Reviewed-by: Michal Skrivanek <michal.skrivanek at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/51827
Reviewed-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/52341
---
M vdsm/virt/migration.py
1 file changed, 25 insertions(+), 25 deletions(-)

Approvals:
  Vinzenz Feenstra: Looks good to me, but someone else must approve
  Francesco Romani: Verified; Looks good to me, approved; Passed CI tests
  Milan Zamazal: Looks good to me, but someone else must approve
  Martin Polednik: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/52341
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8fb7bd6a66898804eefd9bd286c77fd8b9225bc4
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the vdsm-patches mailing list