Change in vdsm[master]: migration: Enable cancellation of migrations during retry

2016-04-06 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: migration: Enable cancellation of migrations during retry
..


Patch Set 1:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic638f67ecf311be0b81d1a7a1afe227e45f816d1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Enable cancellation of migrations during retry

2016-04-06 Thread mbetak
Martin Betak has uploaded a new change for review.

Change subject: migration: Enable cancellation of migrations during retry
..

migration: Enable cancellation of migrations during retry

Migrated _migrationCancelledEvent to proper threading.Event() and used wait
instead of sleep in the retry loop to enable cancellation of migrations without
any delays if a retry is in effect.

Change-Id: Ic638f67ecf311be0b81d1a7a1afe227e45f816d1
Signed-off-by: Martin Betak 
---
M vdsm/virt/migration.py
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/42/55742/1

diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index 6bc8287..e6a5f92 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -119,7 +119,7 @@
 self._progress = 0
 threading.Thread.__init__(self)
 self._preparingMigrationEvt = True
-self._migrationCanceledEvt = False
+self._migrationCanceledEvt = threading.Event()
 self._monitorThread = None
 self._destServer = None
 self._completed = False
@@ -333,7 +333,7 @@
 while self._progress < 100:
 try:
 with SourceThread._ongoingMigrations:
-if self._migrationCanceledEvt:
+if self._migrationCanceledEvt.is_set():
 self._raiseAbortError()
 self.log.debug("migration semaphore acquired "
"after %d seconds",
@@ -359,7 +359,7 @@
   'migration_retry_timeout')
 self.log.debug("Migration destination busy. Initiating "
"retry in %d seconds.", retry_timeout)
-time.sleep(retry_timeout)
+self._migrationCanceledEvt.wait(retry_timeout)
 except MigrationDestinationSetupError as e:
 self._recover(str(e))
 # we know what happened, no need to dump hollow stack trace
@@ -436,7 +436,7 @@
 # we may return migration stop but it will start at libvirt
 # side
 self._preparingMigrationEvt = False
-if not self._migrationCanceledEvt:
+if not self._migrationCanceledEvt.is_set():
 # TODO: use libvirt constants when bz#1222795 is fixed
 params = {VIR_MIGRATE_PARAM_URI: str(muri),
   VIR_MIGRATE_PARAM_BANDWIDTH: self._maxBandwidth}
@@ -489,7 +489,7 @@
 # if its locks we are before the migrateToURI3()
 # call so no need to abortJob()
 try:
-self._migrationCanceledEvt = True
+self._migrationCanceledEvt.set()
 self._vm._dom.abortJob()
 except libvirt.libvirtError:
 if not self._preparingMigrationEvt:


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic638f67ecf311be0b81d1a7a1afe227e45f816d1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Enable cancellation of migrations during retry

2016-04-06 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Enable cancellation of migrations during retry
..


Patch Set 1: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic638f67ecf311be0b81d1a7a1afe227e45f816d1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Enable cancellation of migrations during retry

2016-04-06 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: migration: Enable cancellation of migrations during retry
..


Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic638f67ecf311be0b81d1a7a1afe227e45f816d1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Enable cancellation of migrations during retry

2016-04-06 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: migration: Enable cancellation of migrations during retry
..


Patch Set 1: Code-Review+1

Martin, please document how you verified, for the sake of the process. 
Temporary lowering score meanwhile.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic638f67ecf311be0b81d1a7a1afe227e45f816d1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Enable cancellation of migrations during retry

2016-04-06 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Enable cancellation of migrations during retry
..


Patch Set 1:

Verified using the standard mass migration suite and cancelling a migration in 
the 10 second window after the retry attempt.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic638f67ecf311be0b81d1a7a1afe227e45f816d1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Enable cancellation of migrations during retry

2016-04-06 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: migration: Enable cancellation of migrations during retry
..


Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic638f67ecf311be0b81d1a7a1afe227e45f816d1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Enable cancellation of migrations during retry

2016-04-11 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: migration: Enable cancellation of migrations during retry
..


Patch Set 2:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic638f67ecf311be0b81d1a7a1afe227e45f816d1
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Enable cancellation of migrations during retry

2016-04-12 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: migration: Enable cancellation of migrations during retry
..


Patch Set 3:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic638f67ecf311be0b81d1a7a1afe227e45f816d1
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Enable cancellation of migrations during retry

2016-04-12 Thread danken
Dan Kenigsberg has submitted this change and it was merged.

Change subject: migration: Enable cancellation of migrations during retry
..


migration: Enable cancellation of migrations during retry

Migrated _migrationCancelledEvent to proper threading.Event() and used wait
instead of sleep in the retry loop to enable cancellation of migrations without
any delays if a retry is in effect.

Change-Id: Ic638f67ecf311be0b81d1a7a1afe227e45f816d1
Signed-off-by: Martin Betak 
Reviewed-on: https://gerrit.ovirt.org/55742
Reviewed-by: Francesco Romani 
Continuous-Integration: Jenkins CI
---
M vdsm/virt/migration.py
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Jenkins CI: Passed CI tests
  Martin Betak: Verified
  Francesco Romani: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic638f67ecf311be0b81d1a7a1afe227e45f816d1
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Enable cancellation of migrations during retry

2016-04-12 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: migration: Enable cancellation of migrations during retry
..


Patch Set 4:

* Update tracker: IGNORE, no Bug-Url found
* Set MODIFIED::IGNORE, no Bug-Url found.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic638f67ecf311be0b81d1a7a1afe227e45f816d1
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches