Change in vdsm[master]: rng: allow urandom as virtio rng entropy source

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

Change subject: rng: allow urandom as virtio rng entropy source
..


Patch Set 5: Code-Review+1

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

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


Change in vdsm[master]: rpc: Add test for 'int' parameters in Bridge

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

Change subject: rpc: Add test for 'int' parameters in Bridge
..


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/56884/2/tests/bridgeTests.py
File tests/bridgeTests.py:

PS2, Line 58: class VM():
> minor: please (always) inherit from object:
Francesco: +9000 but there is this thing -> being the only one in the file :-)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie8a2672c53411bed1ac711fffccb543bcfb16024
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: Piotr Kliczewski 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: rpc: Add test for 'int' parameters in Bridge

2016-05-02 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: rpc: Add test for 'int' parameters in Bridge
..


Patch Set 2: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie8a2672c53411bed1ac711fffccb543bcfb16024
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: Piotr Kliczewski 
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]: rpc: Add test for 'int' parameters in Bridge

2016-05-02 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: rpc: Add test for 'int' parameters in Bridge
..


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/56884/1/tests/bridgeTests.py
File tests/bridgeTests.py:

Line 155: 
Line 156: self.assertEquals(e.exception.code, 100)
Line 157: 
Line 158: @MonkeyPatch(DynamicBridge, '_get_api_instance', 
_get_api_instance)
Line 159: def testMethodWithIntParam(self):
> Please check fenceNode you could check (value/type) it in similar way and h
Done
Line 160: bridge = DynamicBridge()
Line 161: 
Line 162: params = {"vmID": "773adfc7-10d4-4e60-b700-3272ee1871f9",
Line 163:   "params": {"vmID": 
"773adfc7-10d4-4e60-b700-3272ee1871f9"},


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie8a2672c53411bed1ac711fffccb543bcfb16024
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: Piotr Kliczewski 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: rpc: Add test for 'int' parameters in Bridge

2016-05-02 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: rpc: Add test for 'int' parameters in Bridge
..


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/56884/1/tests/bridgeTests.py
File tests/bridgeTests.py:

Line 155: 
Line 156: self.assertEquals(e.exception.code, 100)
Line 157: 
Line 158: @MonkeyPatch(DynamicBridge, '_get_api_instance', 
_get_api_instance)
Line 159: def testMethodWithIntParam(self):
> We test calling migrationCreate verb but I do not see any assets here to ma
key thing here is that the call to dispatch doesn't throw the 'int' is not 
iterable exception -> which would cause the test to fail
Line 160: bridge = DynamicBridge()
Line 161: 
Line 162: params = {"vmID": "773adfc7-10d4-4e60-b700-3272ee1871f9",
Line 163:   "params": {"vmID": 
"773adfc7-10d4-4e60-b700-3272ee1871f9"},


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie8a2672c53411bed1ac711fffccb543bcfb16024
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: Piotr Kliczewski 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: rpc: Make Bridge#_type_fixup more robust

2016-05-01 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: rpc: Make Bridge#_type_fixup more robust
..


Patch Set 1:

(1 comment)

Added a test for this in https://gerrit.ovirt.org/#/c/56884/1 but because it 
depends on the new 'int' parameter in migrationCreate it has to come after the 
`lazy setting` patch -> thus it must be separate from this. 

But with the necessary schema changes it serves as a solid reproducer for this 
bug.

https://gerrit.ovirt.org/#/c/56811/1/lib/vdsm/rpc/Bridge.py
File lib/vdsm/rpc/Bridge.py:

Line 205: typefixups[symTypeName](item)
Line 206: for (k, v) in symbol.get('data', {}).items():
Line 207: k = self._sym_name_filter(k)
Line 208: # first check if the 'item' supports indexing
Line 209: if isinstance(item, collections.Iterable) and k in 
item:
> Yes, please add a test for it.
Done
Line 210: self._type_fixup(k, v, item[k])
Line 211: 
Line 212: def _fixup_args(self, className, methodName, args):
Line 213: argDef = 
self.api['commands'][className][methodName].get('data', {})


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

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


Change in vdsm[master]: rpc: Add test for 'int' parameters in Bridge

2016-05-01 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: rpc: Add test for 'int' parameters in Bridge
..


Patch Set 1: Verified+1

Verified by running tests.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie8a2672c53411bed1ac711fffccb543bcfb16024
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: Piotr Kliczewski 
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]: rpc: Add test for 'int' parameters in Bridge

2016-05-01 Thread mbetak
Martin Betak has uploaded a new change for review.

Change subject: rpc: Add test for 'int' parameters in Bridge
..

rpc: Add test for 'int' parameters in Bridge

Change-Id: Ie8a2672c53411bed1ac711fffccb543bcfb16024
Signed-off-by: Martin Betak 
---
M tests/bridgeTests.py
1 file changed, 21 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/84/56884/1

diff --git a/tests/bridgeTests.py b/tests/bridgeTests.py
index b1f299c..d7058d4 100644
--- a/tests/bridgeTests.py
+++ b/tests/bridgeTests.py
@@ -55,6 +55,17 @@
 raise GeneralException("Kaboom!!!")
 
 
+class VM():
+ctorArgs = ['vmID']
+
+def __init__(self, UUID):
+self._UUID = UUID
+
+def migrationCreate(self, params, incomingLimit):
+return {'status': {'code': 0, 'message': 'Done'},
+'migrationPort': 0, 'params': {}}
+
+
 class StorageDomain():
 ctorArgs = ['storagedomainID']
 
@@ -75,6 +86,7 @@
 _API = __import__('API', globals(), locals(), {}, -1)
 setattr(_newAPI, 'Global', Host)
 setattr(_newAPI, 'StorageDomain', StorageDomain)
+setattr(_newAPI, 'VM', VM)
 
 # Apply the whitelist to our version of API
 for name in apiWhitelist:
@@ -142,3 +154,12 @@
 bridge.dispatch('Host.ping')()
 
 self.assertEquals(e.exception.code, 100)
+
+@MonkeyPatch(DynamicBridge, '_get_api_instance', _get_api_instance)
+def testMethodWithIntParam(self):
+bridge = DynamicBridge()
+
+params = {"vmID": "773adfc7-10d4-4e60-b700-3272ee1871f9",
+  "params": {"vmID": "773adfc7-10d4-4e60-b700-3272ee1871f9"},
+  "incomingLimit": 42}
+bridge.dispatch('VM.migrationCreate')(**params)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8a2672c53411bed1ac711fffccb543bcfb16024
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]: rpc: Make Bridge#_type_fixup more robust

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

Change subject: rpc: Make Bridge#_type_fixup more robust
..


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/56811/1/lib/vdsm/rpc/Bridge.py
File lib/vdsm/rpc/Bridge.py:

Line 205: typefixups[symTypeName](item)
Line 206: for (k, v) in symbol.get('data', {}).items():
Line 207: k = self._sym_name_filter(k)
Line 208: # first check if the 'item' supports indexing
Line 209: if isinstance(item, collections.Iterable) and k in 
item:
in case 'item' is an 'int' this fails with 

  TypeError: argument of type 'int' is not iterable
Line 210: self._type_fixup(k, v, item[k])
Line 211: 
Line 212: def _fixup_args(self, className, methodName, args):
Line 213: argDef = 
self.api['commands'][className][methodName].get('data', {})


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5871f6c08fe384f52bfa190a44290e2489f06981
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: Piotr Kliczewski 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: rpc: Make Bridge#_type_fixup more robust

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

Change subject: rpc: Make Bridge#_type_fixup more robust
..


Patch Set 1: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5871f6c08fe384f52bfa190a44290e2489f06981
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: Piotr Kliczewski 
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 lazy setting of incoming/outgoing limits

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

Change subject: migration: Enable lazy setting of incoming/outgoing limits
..


Patch Set 27: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I79ab97f15788e4024c94d051e4aade713d760acf
Gerrit-PatchSet: 27
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Piotr Kliczewski 
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]: rpc: Make Bridge#_type_fixup more robust

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

Change subject: rpc: Make Bridge#_type_fixup more robust
..

rpc: Make Bridge#_type_fixup more robust

_type_fixup method assumed that all top-level arguments of rpc calls are
dictionaries thus failing with arguments of type e.g. 'int'.

This patch fixes this issues and only recurses deeper if the 'item'
itself is a dictionary.

Change-Id: I5871f6c08fe384f52bfa190a44290e2489f06981
Signed-off-by: Martin Betak 
---
M lib/vdsm/rpc/Bridge.py
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/11/56811/1

diff --git a/lib/vdsm/rpc/Bridge.py b/lib/vdsm/rpc/Bridge.py
index 948787e..4ad7b26 100644
--- a/lib/vdsm/rpc/Bridge.py
+++ b/lib/vdsm/rpc/Bridge.py
@@ -17,6 +17,7 @@
 from __future__ import absolute_import
 from functools import partial
 
+import collections
 import inspect
 import logging
 import threading
@@ -204,7 +205,8 @@
 typefixups[symTypeName](item)
 for (k, v) in symbol.get('data', {}).items():
 k = self._sym_name_filter(k)
-if k in item:
+# first check if the 'item' supports indexing
+if isinstance(item, collections.Iterable) and k in item:
 self._type_fixup(k, v, item[k])
 
 def _fixup_args(self, className, methodName, args):


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5871f6c08fe384f52bfa190a44290e2489f06981
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 lazy setting of incoming/outgoing limits

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

Change subject: migration: Enable lazy setting of incoming/outgoing limits
..


Patch Set 25:

(2 comments)

https://gerrit.ovirt.org/#/c/53305/25//COMMIT_MSG
Commit Message:

PS25, Line 11: t is best time for the engine to update them
> not sure this is always true. Let's pretend Engine decreases the bound, so 
yes, this is exactly the behavior intended by the engine since in the host 
lifecycle as it is defined on the engine there is no suitable event that should 
trigger this setting. 

Really setting it *just* before it is used is the best because it applies the 
new setting lazily and only on those hosts that actually care about it -> so in 
global effect it saves RPC calls. Not to mention it is resistant to VDSM 
restarts, because the value is sent each time it is needed thus making VDSM 
less stateful.


https://gerrit.ovirt.org/#/c/53305/25/vdsm/API.py
File vdsm/API.py:

PS25, Line 592:  not incomingLimit
> I believe 'incomingLimit is None' is both a bit cheaper and clearer.
Done


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

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


Change in vdsm[master]: migration: Enable lazy setting of incoming/outgoing limits

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

Change subject: migration: Enable lazy setting of incoming/outgoing limits
..


Patch Set 21:

(1 comment)

https://gerrit.ovirt.org/#/c/53305/21/vdsm/API.py
File vdsm/API.py:

PS21, Line 584: int
> so it is an int why do we need this cast here?
you are right. your recent modifications to the bridge code seem to have fixed 
the problem which caused me to have defensive casts here. Removed.


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

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


Change in vdsm[master]: migration: Add Dynamic Bounded Semaphores

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

Change subject: migration: Add Dynamic Bounded Semaphores
..


Patch Set 23:

(2 comments)

https://gerrit.ovirt.org/#/c/53304/23/tests/vmUtilsTests.py
File tests/vmUtilsTests.py:

Line 197: self.assertAcquirable(times=added_capacity)
Line 198: self.assertNotAcquirable()
Line 199: 
Line 200: def test_bound_decrease_while_acquired(self):
Line 201: self.assertAcquirable(times=3)
> I guess you can use INITIAL_BOUND also here, right?
here the intention was to test decreasing the semaphore but not to total 
exhaustion so we could still DECREASE and then ACQUIRE, 

I could add more constants for this but I'm kinda running out of good names for 
them :-)
Line 202: self.sem.bound = 4
Line 203: self.assertAcquirable()
Line 204: self.assertNotAcquirable()
Line 205: 


PS23, Line 207: self.assertAcquirable(times=3)
> same, you could most likely use INITIAL_BOUND here
same motivation as above


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
Gerrit-PatchSet: 23
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add Dynamic Bounded Semaphores

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

Change subject: migration: Add Dynamic Bounded Semaphores
..


Patch Set 23: Verified+1

Verfied using unit tests. Since last patch-set was test-only change, restoring 
+V.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
Gerrit-PatchSet: 23
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Milan Zamazal 
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: Add Dynamic Bounded Semaphores

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

Change subject: migration: Add Dynamic Bounded Semaphores
..


Patch Set 22:

(7 comments)

https://gerrit.ovirt.org/#/c/53304/22/tests/vmUtilsTests.py
File tests/vmUtilsTests.py:

Line 157: self.assertTrue(vm.eventToString(code))
Line 158: 
Line 159: 
Line 160: class DynamicSemaphoreTests(TestCaseBase):
Line 161: 
> let's have a constants here
Done
Line 162: def setUp(self):
Line 163: self.sem = utils.DynamicBoundedSemaphore(5)
Line 164: 
Line 165: def assertAcquirable(self, times=1):


PS22, Line 163: 5
> let's use the new constant here
Done


PS22, Line 177: 5
> and here
Done


PS22, Line 191: 5
> and here
Done


PS22, Line 192: 10
> let's use a constant for this value too
Done


PS22, Line 193: 5)
> express like a difference please
Done


https://gerrit.ovirt.org/#/c/53304/22/vdsm/virt/migration.py
File vdsm/virt/migration.py:

Line 52: VIR_MIGRATE_PARAM_URI = 'migrate_uri'
Line 53: VIR_MIGRATE_PARAM_BANDWIDTH = 'bandwidth'
Line 54: VIR_MIGRATE_PARAM_GRAPHICS_URI = 'graphics_uri'
Line 55: 
Line 56: 
> spurious line, if you resubmit please drop it.
I was under the assumption that groups of underalted top level definitions are 
supposed to be separated by 2 blank lines. But I don't mind, will drop.
Line 57: incomingMigrations = DynamicBoundedSemaphore(
Line 58: max(1, config.getint('vars', 'max_incoming_migrations')))
Line 59: 
Line 60: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
Gerrit-PatchSet: 22
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add Dynamic Bounded Semaphores

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

Change subject: migration: Add Dynamic Bounded Semaphores
..


Patch Set 21: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
Gerrit-PatchSet: 21
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Michal Skrivanek 
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: Add retry on full capacity

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

Change subject: migration: Add retry on full capacity
..


Patch Set 27: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 27
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
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: Add retry on full capacity

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

Change subject: migration: Add retry on full capacity
..


Patch Set 27:

(1 comment)

https://gerrit.ovirt.org/#/c/52799/27/vdsm/virt/migration.py
File vdsm/virt/migration.py:

PS27, Line 332: while self._progress < 100:
> would it be enough, and I like it more.
That seems to me as a less safe and slightly less obvious alternative. If you 
look at the implementation of _finishSuccessfully the very first thing it does 
is to set _progress to 100. But the vm.setDownStatus is not called in all 
execution paths immediately - in one case much later after a code that can 
raise exceptions. 

It is true that in this case it is mostly related to the hibernation/migration 
intermingling of code but I still consider the progress version more bullet 
(and future) proof.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 27
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add retry on full capacity

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

Change subject: migration: Add retry on full capacity
..


Patch Set 26:

(1 comment)

https://gerrit.ovirt.org/#/c/52799/26/vdsm/virt/migration.py
File vdsm/virt/migration.py:

Line 121: self._preparingMigrationEvt = True
Line 122: self._migrationCanceledEvt = False
Line 123: self._monitorThread = None
Line 124: self._destServer = None
Line 125: self._completed = False
forgot to delete this, will post another patch set with just this line removed.
Line 126: 
Line 127: progress_timeout = config.getint('vars', 
'migration_progress_timeout')
Line 128: 
Line 129: self._convergence_schedule = {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 26
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Enable lazy setting of incoming/outgoing limits

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

Change subject: migration: Enable lazy setting of incoming/outgoing limits
..


Patch Set 21:

(1 comment)

https://gerrit.ovirt.org/#/c/53305/21/vdsm/API.py
File vdsm/API.py:

PS21, Line 584: int
> I do not like this. We expect an int but we cast because we know that it is
I really expect that to be int, and I would very much prefer that I didn't need 
to do the cast here. Honestly I don't know where the problem could reside since 
I'm reasonably confident that what is passed as an argument from the source is 
an int.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I79ab97f15788e4024c94d051e4aade713d760acf
Gerrit-PatchSet: 21
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
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: Add Dynamic Bounded Semaphores

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

Change subject: migration: Add Dynamic Bounded Semaphores
..


Patch Set 20: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
Gerrit-PatchSet: 20
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Michal Skrivanek 
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: Add Dynamic Bounded Semaphores

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

Change subject: migration: Add Dynamic Bounded Semaphores
..


Patch Set 18:

(1 comment)

https://gerrit.ovirt.org/#/c/53304/18/lib/vdsm/virt/utils.py
File lib/vdsm/virt/utils.py:

PS18, Line 123: DynamicBoundedSemaphore
> OK, this explanation dispelled my remaining doubts, thanks.
Done: included this description in to the class docstring.


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

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


Change in vdsm[master]: migration: Enable lazy setting of incoming/outgoing limits

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

Change subject: migration: Enable lazy setting of incoming/outgoing limits
..


Patch Set 20:

(3 comments)

https://gerrit.ovirt.org/#/c/53305/20/lib/api/vdsmapi-schema.json
File lib/api/vdsmapi-schema.json:

Line 7749: # @VM.migrationCreate:
Line 7750: #
Line 7751: # Start a migrating VM on a destination host.
Line 7752: #
Line 7753: # @vmID:The UUID of the VM
> Please align descriptions for each parameter in line.
Done
Line 7754: #
Line 7755: # @params:  The VM definition
Line 7756: #
Line 7757: # @incomingLimit: Maximum number of incoming migrations


Line 7753: # @vmID:The UUID of the VM
Line 7754: #
Line 7755: # @params:  The VM definition
Line 7756: #
Line 7757: # @incomingLimit: Maximum number of incoming migrations
> You mark this param as optional '*' and I do not see it in description.
Done
Line 7758: #
Line 7759: # Returns:
Line 7760: # Migration creation state
Line 7761: #


https://gerrit.ovirt.org/#/c/53305/20/vdsm/API.py
File vdsm/API.py:

PS20, Line 584: int(
> We defined it as uint in schema. Why it is needed?
This was a bug I couldn't find for a long time but this cast is indeed very 
necessary (unless something radically changed in the json-rpc recently). I 
suspect it has something to do with the fact that this is the only peer-to-peer 
call between VDSMs and then the value arrives as a string for some reason.


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

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


Change in vdsm[master]: migration: Add retry on full capacity

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

Change subject: migration: Add retry on full capacity
..


Patch Set 26: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 26
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
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+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 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: Add retry on full capacity

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

Change subject: migration: Add retry on full capacity
..


Patch Set 23:

(1 comment)

https://gerrit.ovirt.org/#/c/52799/23/vdsm/virt/migration.py
File vdsm/virt/migration.py:

PS23, Line 366: sleep
> this works but if the user cancels while sleeping, we add unneeded wait.
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 23
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add retry on full capacity

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

Change subject: migration: Add retry on full capacity
..


Patch Set 25:

(2 comments)

https://gerrit.ovirt.org/#/c/52799/23/vdsm/virt/migration.py
File vdsm/virt/migration.py:

Line 353: 
self._startUnderlyingMigration(time.time())
Line 354: self._finishSuccessfully()
Line 355: self._completed = True
Line 356: except libvirt.libvirtError as e:
Line 357: if e.get_error_code() == 
libvirt.VIR_ERR_OPERATION_ABORTED:
> we already have finishSuccessfully:
Done
Line 358: self.status = response.error(
Line 359: 'migCancelErr', message='Migration 
canceled')
Line 360: raise
Line 361: except MigrationLimitExceeded:


https://gerrit.ovirt.org/#/c/52799/25/vdsm/virt/migration.py
File vdsm/virt/migration.py:

PS25, Line 401: # Differentiate between general migration failure and a retry
> Sure, I know, but it is pretty obvious from the code that we are going to d
Well, having this comment here was Michal's reasoning for removing the 
is_retry_error helper :-). 

But I don't mind, I can remove it too. I don't think this is the place in the 
code to go into great lengths of explaining the retry reasoning.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 25
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add retry on full capacity

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

Change subject: migration: Add retry on full capacity
..


Patch Set 25:

(1 comment)

https://gerrit.ovirt.org/#/c/52799/25/vdsm/virt/migration.py
File vdsm/virt/migration.py:

PS25, Line 401: # Differentiate between general migration failure and a retry
> since you need a resubmit, please drop or change this comment.
Not sure if I 100% understand your comment. This is part of of the little vdsm 
'logic' that should kick in the case SLA mis-schedules a migration and we want 
to perform a local retry. Not sure how comparison with 
MigrationDestinationSetupError would clarify this particular piece of code.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 25
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add retry on full capacity

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

Change subject: migration: Add retry on full capacity
..


Patch Set 23:

(1 comment)

https://gerrit.ovirt.org/#/c/52799/23/vdsm/virt/migration.py
File vdsm/virt/migration.py:

PS23, Line 673: is_retry_error
> so it's
Ok. With great personal sacrifice I will remove this. I'm a firm believer in 
properly named small methods that reflect the business logic rather than 
extensive comments, but in this case I will concede it may be too much. 

Probably there is too much Java spirit in my heart :-)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 23
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add retry on full capacity

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

Change subject: migration: Add retry on full capacity
..


Patch Set 25:

(1 comment)

https://gerrit.ovirt.org/#/c/52799/25/vdsm/virt/migration.py
File vdsm/virt/migration.py:

PS25, Line 329: 'dst': self._dst,
  : 'mode': self._mode,
  : 'method': METHOD_ONLINE,
  : 'dstparams': self._dstparams,
  : 'dstqemu': self._dstqemu,
> we are returning mutable data so either do a copy or make private.
in that case I believe this no longer needs to be a property and perhaps a 
better name would be in order.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 25
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add DynamicThrottling semaphores

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

Change subject: migration: Add DynamicThrottling semaphores
..


Patch Set 18:

(1 comment)

https://gerrit.ovirt.org/#/c/53304/18/tests/vmUtilsTests.py
File tests/vmUtilsTests.py:

PS18, Line 160: DynamicSemaphoreTests
> Fine, this is why I thought. Let's just add tests to document this behaviou
Done :-) https://gerrit.ovirt.org/#/c/53304/19/tests/vmUtilsTests.py


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

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


Change in vdsm[master]: migration: Add DynamicThrottling semaphores

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

Change subject: migration: Add DynamicThrottling semaphores
..


Patch Set 18:

(1 comment)

https://gerrit.ovirt.org/#/c/53304/18/lib/vdsm/virt/utils.py
File lib/vdsm/virt/utils.py:

PS18, Line 123: DynamicBoundedSemaphore
> I cannot and won't insist on this because this is a feeling rather than a t
I have to admit I am complete confused by what you mean by eviction. Once the 
migration has started (by successful acquisition of the semaphore) there is no 
way for the Semaphore class itself to reverse this decision - some code has 
entered a critical section. Only thing you can is to prevent others to enter 
the same critical sections -> please see my comments at the test.

This is why I find the "Queue" analogy very confusing since this class is 
really just a semaphore that can have its bound dynamically adjusted.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
Gerrit-PatchSet: 18
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: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add DynamicThrottling semaphores

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

Change subject: migration: Add DynamicThrottling semaphores
..


Patch Set 18:

(1 comment)

https://gerrit.ovirt.org/#/c/53304/18/tests/vmUtilsTests.py
File tests/vmUtilsTests.py:

PS18, Line 160: DynamicSemaphoreTests
> please add tests on which we resize the semaphore (both increasing and decr
Yes it is definitely possible and it is actually expected behavior, when you 
have lets say 5 concurrent migrations out of max 10 allowed and then the engine 
decides new limit should be 1. Of course no new migrations can start and the 
semaphore will become acquirable only after all migrations complete (because 
there can be only one concurrent - new limit 1).


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
Gerrit-PatchSet: 18
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: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add retry on full capacity

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

Change subject: migration: Add retry on full capacity
..


Patch Set 23:

(1 comment)

https://gerrit.ovirt.org/#/c/52799/23/vdsm/virt/migration.py
File vdsm/virt/migration.py:

Line 69: class MigrationLimitExceeded(RuntimeError):
Line 70: """
Line 71: Cannot migrate right now: no resources on destination.
Line 72: """
Line 73: # FIXME: should subclass MigrationDestinationSetupError?
> Better not, they are similar but not related, let's keep them separated for
Done
Line 74: 
Line 75: 
Line 76: class SourceThread(threading.Thread):
Line 77: """


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 23
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add retry on full capacity

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

Change subject: migration: Add retry on full capacity
..


Patch Set 23:

(1 comment)

https://gerrit.ovirt.org/#/c/52799/23/vdsm/virt/migration.py
File vdsm/virt/migration.py:

PS23, Line 673: is_retry_error
> I missed the usage - where is it?
https://gerrit.ovirt.org/#/c/53305/19/vdsm/API.py L599


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 23
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add retry on full capacity

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

Change subject: migration: Add retry on full capacity
..


Patch Set 23:

(2 comments)

https://gerrit.ovirt.org/#/c/52799/23/vdsm/virt/migration.py
File vdsm/virt/migration.py:

PS23, Line 338: retry_timeout
> if you move it to line 366 it doesn't get called when everything is smooth.
Done


PS23, Line 673: is_retry_error
> since you have response.is_error() at line 399 I don't think it conveys any
This helper is also being used by dependant patches in API.py. I'd really hate 
for so many different parts of the code to be dependent on specific error code. 

And the comment is in place just to clarify *why* the helper is used and in my 
opinion doesn't make the helper any less useful. But if you insist, I would 
very much rather remove the comment than this helper :-)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 23
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add retry on full capacity

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

Change subject: migration: Add retry on full capacity
..


Patch Set 23:

(2 comments)

https://gerrit.ovirt.org/#/c/52799/23/lib/vdsm/config.py.in
File lib/vdsm/config.py.in:

Line 124: 
Line 125: ('max_incoming_migrations', '3',
Line 126: 'Maximum concurrent incoming migrations'),
Line 127: 
Line 128: ('migration_retry_timeout', '5',
> I would use 10. Completely arbitrary, but sounds better to me:)
Done
Line 129: 'Time (in sec) to wait before retrying failed 
migration.'),
Line 130: 
Line 131: ('sys_shutdown_timeout', '120',
Line 132: 'Destroy and shutdown timeouts (in sec) before completing 
the '


https://gerrit.ovirt.org/#/c/52799/23/vdsm/virt/migration.py
File vdsm/virt/migration.py:

Line 69: class MigrationLimitExceeded(RuntimeError):
Line 70: """
Line 71: Cannot migrate right now: no resources on destination.
Line 72: """
Line 73: # FIXME: should subclass MigrationDestinationSetupError?
> so should it or not?
Francesco: opinions?
Line 74: 
Line 75: 
Line 76: class SourceThread(threading.Thread):
Line 77: """


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 23
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add retry on full capacity

2016-03-31 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add retry on full capacity
..


Patch Set 23:

(3 comments)

https://gerrit.ovirt.org/#/c/52799/23/vdsm/virt/migration.py
File vdsm/virt/migration.py:

PS23, Line 338: retry_timeout
> please move as near as possible to its users
here I just wanted to avoid the repeated call to config.getint inside a while 
loop, that's why it is extracted at this level


PS23, Line 364: self.log.debug("Migration destination busy. 
Initiating "
  :"retry in %d seconds." % 
retry_timeout)
> let's avoid early formatting:
Done


PS23, Line 673: is_retry_error
> I still don't quite get the need of this trivial method, but I don't really
Thank you for not minding :-) I really think it conveys the *intent* of the 
method much more clearly than just inline response.is_error


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 23
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add DynamicThrottling semaphores

2016-03-29 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add DynamicThrottling semaphores
..


Patch Set 17: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
Gerrit-PatchSet: 17
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: Add retry on full capacity

2016-03-29 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add retry on full capacity
..


Patch Set 22: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 22
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
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 lazy setting of incoming/outgoing limits

2016-03-29 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Enable lazy setting of incoming/outgoing limits
..


Patch Set 18: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I79ab97f15788e4024c94d051e4aade713d760acf
Gerrit-PatchSet: 18
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]: vm: Move saveState() out of constructor

2016-03-29 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: vm: Move saveState() out of constructor
..


Patch Set 7: Verified+1

Verified using standard mass migration process with extreme throttling to 
trigger multiple retry attempts.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb38fdc06bf1a7b881cd64d2af45a93b16c935ea
Gerrit-PatchSet: 7
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: Milan Zamazal 
Gerrit-Reviewer: Vinzenz Feenstra 
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]: vm: Move saveState() out of constructor

2016-03-29 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: vm: Move saveState() out of constructor
..


Patch Set 6:

(1 comment)

https://gerrit.ovirt.org/#/c/53950/6/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 685: if not acquired:
Line 686: self._vmAsyncStartError = 
response.error('migrateLimit')
Line 687: self._vmStartEvent.set()
Line 688: return
Line 689: 
> Well, devil's in the details indeed.
yes, after some thought I agree that just before vmStartEvent.set() is the 
safest and most appropriate test. Of course I will need to do some testing 
before this can be merged.
Line 690: self._vmStartEvent.set()
Line 691: try:
Line 692: self.memCommit()
Line 693: with self._ongoingCreations:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb38fdc06bf1a7b881cd64d2af45a93b16c935ea
Gerrit-PatchSet: 6
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: Milan Zamazal 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: Move saveState() out of constructor

2016-03-29 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: vm: Move saveState() out of constructor
..


Patch Set 6:

(1 comment)

https://gerrit.ovirt.org/#/c/53950/6/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 685: if not acquired:
Line 686: self._vmAsyncStartError = 
response.error('migrateLimit')
Line 687: self._vmStartEvent.set()
Line 688: return
Line 689: 
> I'd rather move the saveState() here from line 668 here.
so essentially moving back where it was in first patchset :-)
Only difference I think it was originally *after* _vmStartEvent.set() so we 
just move it before, right?
Line 690: self._vmStartEvent.set()
Line 691: try:
Line 692: self.memCommit()
Line 693: with self._ongoingCreations:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb38fdc06bf1a7b881cd64d2af45a93b16c935ea
Gerrit-PatchSet: 6
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: Milan Zamazal 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: Move saveState() out of constructor

2016-03-20 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: vm: Move saveState() out of constructor
..


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/53950/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 686: self._vmStartEvent.set()
Line 687: return
Line 688: 
Line 689: self._vmStartEvent.set()
Line 690: self.saveState()
> Dan pointed out that we to make sure this is in the sync path. So, it shoul
Done
Line 691: try:
Line 692: self.memCommit()
Line 693: with self._ongoingCreations:
Line 694: self._vmCreationEvent.set()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb38fdc06bf1a7b881cd64d2af45a93b16c935ea
Gerrit-PatchSet: 3
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: Milan Zamazal 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add retry on full capacity

2016-03-19 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add retry on full capacity
..


Patch Set 20:

@Yaniv: Indeed it is true that scheduler in ideal scenario should cover 99% of 
cases. This code is there just to prevent disastrous migration storms caused by 
e.g. bug in SLA code. That is only when the migration limit will be hit and 
this retry logic is there just to handle this transient period when the 
scheduler may not be doing the best decision or be alive at all.

Of course even with this patch the engine will still have the capability to 
cancel ongoing migration and issue another (better?) one.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 20
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Yaniv Kaul 
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]: response: Add support for specific error checking in is_error

2016-03-15 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: response: Add support for specific error checking in is_error
..


Patch Set 2:

@fromani: Sure, verified by running tests and also by full e2e manual tests of 
following patches dependent on this feature.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I00d8d2914983f75293ece5ce05894ca3821b7b24
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: Add retry on full capacity

2016-02-25 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add retry on full capacity
..


Patch Set 18: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 18
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
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 lazy setting of incoming/outgoing limits

2016-02-25 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Enable lazy setting of incoming/outgoing limits
..


Patch Set 14: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I79ab97f15788e4024c94d051e4aade713d760acf
Gerrit-PatchSet: 14
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]: vm: Move saveState() out of constructor

2016-02-25 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: vm: Move saveState() out of constructor
..


Patch Set 3: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb38fdc06bf1a7b881cd64d2af45a93b16c935ea
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: Milan Zamazal 
Gerrit-Reviewer: Vinzenz Feenstra 
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]: response: Add support for specific error checking in is_error

2016-02-25 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: response: Add support for specific error checking in is_error
..


Patch Set 2: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I00d8d2914983f75293ece5ce05894ca3821b7b24
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]: response: Add support for specific error checking in is_error

2016-02-25 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: response: Add support for specific error checking in is_error
..


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/54036/1/tests/responseTests.py
File tests/responseTests.py:

Line 74: self.assertEqual(res[key], args[key])
Line 75: 
Line 76: def test_is_error(self):
Line 77: NAME = 'noVM'  # no special meaning, any error is fine
Line 78: NAME2 = 'hookError'
> let's add a specific testcase for this new code path
Done
Line 79: self.assertTrue(response.is_error(response.error(NAME)))
Line 80: 
Line 81: self.assertTrue(response.is_error(response.error(NAME), 
err=NAME))
Line 82: self.assertFalse(response.is_error(response.error(NAME), 
err=NAME2))


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I00d8d2914983f75293ece5ce05894ca3821b7b24
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: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add DynamicThrottling semaphores

2016-02-25 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add DynamicThrottling semaphores
..


Patch Set 11:

(1 comment)

https://gerrit.ovirt.org/#/c/53304/11/vdsm/virt/utils.py
File vdsm/virt/utils.py:

Line 157: 
Line 158: def __exit__(self, exc_type, exc_val, exc_tb):
Line 159: self.release()
Line 160: 
Line 161: def set_bound(self, value):
I'm considering if it wouldn't be nicer if the bound was a property with this 
being it's setter and also a simple getter so outside world could easily read 
what the current bound setting is and also set it (perhaps more clearly?) as

  semaphore.bound = 5

rather than

  semaphore.set_bound(5)
Line 162: """ Dynamically updates semaphore bound.
Line 163: 
Line 164: When the the specified value is larger than the previous 
bound,
Line 165: it releases the semaphore the required number of times (and 
possibly


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
Gerrit-PatchSet: 11
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: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: response: Add support for specific error checking in is_error

2016-02-25 Thread mbetak
Martin Betak has uploaded a new change for review.

Change subject: response: Add support for specific error checking in is_error
..

response: Add support for specific error checking in is_error

response.is_error can now take an optional 'err' argument to check
if given response is of that particular error type.

E.g. to check if given response if an instance of 'migrateLimit' error:

  response.is_error(result, 'migrateLimit')

This will return false for successful response as well for all error codes
other than that of 'migrateLimit'.

Change-Id: I00d8d2914983f75293ece5ce05894ca3821b7b24
Signed-off-by: Martin Betak 
---
M lib/vdsm/response.py
M tests/responseTests.py
2 files changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/54036/1

diff --git a/lib/vdsm/response.py b/lib/vdsm/response.py
index 160898f..559c753 100644
--- a/lib/vdsm/response.py
+++ b/lib/vdsm/response.py
@@ -75,10 +75,13 @@
 }
 
 
-def is_error(res):
+def is_error(res, err=None):
 try:
 code = res["status"]["code"]
 except KeyError:
 raise MalformedResponse(res)
 else:
-return code != doneCode["code"]
+if err:
+return code == errCode[err]["status"]["code"]
+else:
+return code != doneCode["code"]
diff --git a/tests/responseTests.py b/tests/responseTests.py
index 569fce3..427bf48 100644
--- a/tests/responseTests.py
+++ b/tests/responseTests.py
@@ -75,8 +75,12 @@
 
 def test_is_error(self):
 NAME = 'noVM'  # no special meaning, any error is fine
+NAME2 = 'hookError'
 self.assertTrue(response.is_error(response.error(NAME)))
 
+self.assertTrue(response.is_error(response.error(NAME), err=NAME))
+self.assertFalse(response.is_error(response.error(NAME), err=NAME2))
+
 def test_malformed_empty(self):
 self.assertRaises(response.MalformedResponse,
   response.is_error,


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00d8d2914983f75293ece5ce05894ca3821b7b24
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: Add retry on full capacity

2016-02-24 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add retry on full capacity
..


Patch Set 14:

(1 comment)

https://gerrit.ovirt.org/#/c/52799/14/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 686: self._vmStartEvent.set()
Line 687: return
Line 688: 
Line 689: self._vmStartEvent.set()
Line 690: self.saveState()
> this important enough to deserve a separate patch, on which this one should
Done
Line 691: try:
Line 692: self.memCommit()
Line 693: with self._ongoingCreations:
Line 694: self._vmCreationEvent.set()


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

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


Change in vdsm[master]: vm: Move saveState() out of constructor

2016-02-24 Thread mbetak
Martin Betak has uploaded a new change for review.

Change subject: vm: Move saveState() out of constructor
..

vm: Move saveState() out of constructor

Moved saveState() call to the begining of async start of VM in order to:
* Make the vm ctor side effect free
* Prevent from saveState being called in case the async start fails (incoming
  migration limit exceeded)

Change-Id: Ifb38fdc06bf1a7b881cd64d2af45a93b16c935ea
Signed-off-by: Martin Betak 
---
M vdsm/virt/vm.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/50/53950/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index a73da42..8586e18 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -292,7 +292,6 @@
 self._domain = DomainDescriptor.from_id(self.id)
 self._released = False
 self._releaseLock = threading.Lock()
-self.saveState()
 self._watchdogEvent = {}
 self.arch = cpuarch.effective()
 self._powerDownEvent = threading.Event()
@@ -688,6 +687,7 @@
 return
 
 self._vmStartEvent.set()
+self.saveState()
 try:
 self.memCommit()
 with self._ongoingCreations:


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb38fdc06bf1a7b881cd64d2af45a93b16c935ea
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: Add retry on full capacity

2016-02-24 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add retry on full capacity
..


Patch Set 14:

(1 comment)

https://gerrit.ovirt.org/#/c/52799/14/vdsm/virt/migration.py
File vdsm/virt/migration.py:

Line 601: self._vm.log.debug('stopping migration monitor thread')
Line 602: self._stop.set()
Line 603: 
Line 604: 
Line 605: def is_retry_error(result):
> let's figure out a nicer helper to be put in the response module
would something like https://gerrit.ovirt.org/#/c/46971/15/lib/vdsm/response.py 
with your comment addressed acceptable?
Line 606: return result['status']['code'] == \


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

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


Change in vdsm[master]: virt: add run_async helper

2016-02-23 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 14:

no longer needed but still pretty nice piece of code I would say. Pity that 
gerrit doesn't have *Archive* feature :-)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
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]: utils: Add @throttle decorator

2016-02-23 Thread mbetak
Martin Betak has abandoned this change.

Change subject: utils: Add @throttle decorator
..


Abandoned

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Iab4cf387f77a9b720afb7794e27ed54efa0d3e3c
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Vinzenz Feenstra 
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: Add migrateChangeGlobalParams verb

2016-02-23 Thread mbetak
Martin Betak has abandoned this change.

Change subject: migration: Add migrateChangeGlobalParams verb
..


Abandoned

superceeded by I79ab97f15788e4024c94d051e4aade713d760acf

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: I4f6d1bcdc29f144d9fcf28a085b7014127cc4f41
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Tomas Jelinek 
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: Add retry logic for incoming limit

2016-02-23 Thread mbetak
Martin Betak has abandoned this change.

Change subject: migration: Add retry logic for incoming limit
..


Abandoned

superceeded by I988fa2e501eb77d121668b22cc533b744a3dc755

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Icabe79dfccb61ce43489a9a242a5390e73979649
Gerrit-PatchSet: 15
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
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]: virt: Make VM domain descriptor accessible

2016-02-22 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: virt: Make VM domain descriptor accessible
..


Patch Set 2: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I58dacec299fd6176b10b4180e2737d6b2f59ccbc
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: Nir Soffer 
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]: virt: Replace vm._dom.XMLDesc(0) with domain descriptor usage

2016-02-22 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: virt: Replace vm._dom.XMLDesc(0) with domain descriptor usage
..


Patch Set 4: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic159cb84049d90cdb2a4279a34145462c8ee6be4
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Vinzenz Feenstra 
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]: virt: vm.py: Make _updateDomainDescriptor() return new XML

2016-02-22 Thread mbetak
Martin Betak has abandoned this change.

Change subject: virt: vm.py: Make _updateDomainDescriptor() return new XML
..


Abandoned

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ic37e3b3eae819a586036dda17021d500f47e4ba7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
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]: virt: Make VM domain descriptor public

2016-02-22 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: virt: Make VM domain descriptor public
..


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/53371/1/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 291: self.domain = DomainDescriptor.from_id(self.id)
> I agree with Nir's comment. This could be public, and having it public inde
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I58dacec299fd6176b10b4180e2737d6b2f59ccbc
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: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add incoming migration semaphore

2016-02-19 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add incoming migration semaphore
..


Patch Set 31: Verified+1

-- 
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: 31
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Vinzenz Feenstra 
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: Add retry on full capacity

2016-02-19 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add retry on full capacity
..


Patch Set 13: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
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 lazy setting of incoming/outgoing limits

2016-02-19 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Enable lazy setting of incoming/outgoing limits
..


Patch Set 9: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I79ab97f15788e4024c94d051e4aade713d760acf
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
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: Add DynamicThrottling semaphores

2016-02-19 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add DynamicThrottling semaphores
..


Patch Set 8: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
Gerrit-PatchSet: 8
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]: vm: Make run() return status

2016-02-19 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: vm: Make run() return status
..


Patch Set 1: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia21eefb7ff9ccb144c000c620788567692489f11
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]: vm: Make run() return status

2016-02-19 Thread mbetak
Martin Betak has uploaded a new change for review.

Change subject: vm: Make run() return status
..

vm: Make run() return status

Change-Id: Ia21eefb7ff9ccb144c000c620788567692489f11
Signed-off-by: Martin Betak 
---
M vdsm/clientIF.py
M vdsm/virt/vm.py
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/53745/1

diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index 0d1e235..7a7ec48 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -439,8 +439,7 @@
 return errCode['exist']
 vm = Vm(self, vmParams, vmRecover)
 self.vmContainer[vmParams['vmId']] = vm
-vm.run()
-return {'status': doneCode, 'vmList': vm.status()}
+return vm.run()
 
 def getAllVmStats(self):
 return [v.getStats() for v in self.vmContainer.values()]
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index df58d1b..420b5b6 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -657,6 +657,7 @@
 
 def run(self):
 self._creationThread.start()
+return response.success(vmList=self.status())
 
 def memCommit(self):
 """


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia21eefb7ff9ccb144c000c620788567692489f11
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 lazy setting of incoming/outgoing limits

2016-02-18 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Enable lazy setting of incoming/outgoing limits
..


Patch Set 6: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I79ab97f15788e4024c94d051e4aade713d760acf
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
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: Add DynamicThrottling semaphores

2016-02-18 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add DynamicThrottling semaphores
..


Patch Set 5: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
Gerrit-PatchSet: 5
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: Add DynamicThrottling semaphores

2016-02-18 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add DynamicThrottling semaphores
..


Patch Set 4: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
Gerrit-PatchSet: 4
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: Add retry on full capacity

2016-02-18 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add retry on full capacity
..


Patch Set 10: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I988fa2e501eb77d121668b22cc533b744a3dc755
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
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: Add incoming migration semaphore

2016-02-18 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add incoming migration semaphore
..


Patch Set 28: Verified+1

-- 
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: 28
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: Vinzenz Feenstra 
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]: virt: add run_async helper

2016-02-18 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 14: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
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: Add DynamicThrottling semaphores

2016-02-18 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add DynamicThrottling semaphores
..


Patch Set 3:

(2 comments)

https://gerrit.ovirt.org/#/c/53304/3/tests/vmUtilsTests.py
File tests/vmUtilsTests.py:

Line 209: self.sem._value
> It could be appropriate, sure. We are not talking about mistakes, but rathe
Done


https://gerrit.ovirt.org/#/c/53304/3/vdsm/virt/utils.py
File vdsm/virt/utils.py:

Line 237: # if we are increasing the bound we need to do this outside of
: # context manager otherwise release() would deadlock since it 
also
: # tries to obtain the lock
> it is fine if is a note to self. Maybe just mark it as such like 
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
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: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add DynamicThrottling semaphores

2016-02-17 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add DynamicThrottling semaphores
..


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/53304/3/tests/vmUtilsTests.py
File tests/vmUtilsTests.py:

Line 209: self.sem._value
> It could be appropriate, sure. We are not talking about mistakes, but rathe
sure, the non blocking idea actually crossed my mind a while back... I'll what 
I can do


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
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: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add DynamicThrottling semaphores

2016-02-17 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add DynamicThrottling semaphores
..


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/53304/3/tests/vmUtilsTests.py
File tests/vmUtilsTests.py:

Line 209: self.sem._value
> maybe better some new method like trylock
I agree that this should not be exposed at all, but then I think for *test* 
purposes it is more than appropriate to do this with private field access. Just 
seems to me the least evil.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
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: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: migration: Add DynamicThrottling semaphores

2016-02-17 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: migration: Add DynamicThrottling semaphores
..


Patch Set 3:

(2 comments)

https://gerrit.ovirt.org/#/c/53304/3/tests/vmUtilsTests.py
File tests/vmUtilsTests.py:

Line 209: self.sem._value
> better avoid to access private fields (=implementation details) unless we d
so e.g. expose read-only property for the semaphore value?


https://gerrit.ovirt.org/#/c/53304/3/vdsm/virt/utils.py
File vdsm/virt/utils.py:

Line 237: # if we are increasing the bound we need to do this outside of
: # context manager otherwise release() would deadlock since it 
also
: # tries to obtain the lock
> maybe better to enforce this?
you mean explicitly check if set_bound is called with the semaphore being held? 
I really don't think that is necessary since the internal lock is acquired only 
for duration of methods acquire, release and set_bound respectively. 

This comment was mostly as note to myself why I moved the code out of the 
context manager on lines 231-235 in the internal implementation of set_bound 
that would deadlock. 

Clients of this class should not be affected IMO.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
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: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: add run_async helper

2016-02-16 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 11:

(3 comments)

https://gerrit.ovirt.org/#/c/49570/11//COMMIT_MSG
Commit Message:

Line 11: support
> supportS
Done


Line 15: used
> drop
Done


Line 16: data
> s/data/code/ (this is not LISP [yet])
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: Replace vm._dom.XMLDesc(0) with domain descriptor usage

2016-02-11 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: virt: Replace vm._dom.XMLDesc(0) with domain descriptor usage
..


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/52882/1/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 3745
Line 3746
Line 3747
Line 3748
Line 3749
> Here we don't need to use the property
Done


Line 3732: @property
Line 3733: def name(self):
Line 3734: return self.conf['vmName']
Line 3735: 
Line 3736: @property
> I agree about using Vm.domain.xml. Every XML access should be mediated by D
Done
Line 3737: def xml(self):
Line 3738: return self._dom.XMLDesc(0)
Line 3739: 
Line 3740: def _getPid(self):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic159cb84049d90cdb2a4279a34145462c8ee6be4
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: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: Make VM domain descriptor public

2016-02-10 Thread mbetak
Martin Betak has uploaded a new change for review.

Change subject: virt: Make VM domain descriptor public
..

virt: Make VM domain descriptor public

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


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/53371/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 4084d05..fb7646e 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -288,7 +288,7 @@
 self.guestAgent = guestagent.GuestAgent(
 self._guestSocketFile, self.cif.channelListener, self.log,
 self._onGuestStatusChange)
-self._domain = DomainDescriptor.from_id(self.id)
+self.domain = DomainDescriptor.from_id(self.id)
 self._released = False
 self._releaseLock = threading.Lock()
 self.saveState()
@@ -1381,7 +1381,7 @@
 stats.update(vmstats.translate(decStats))
 
 stats.update(self._getGraphicsStats())
-stats['hash'] = str(hash((self._domain.devices_hash,
+stats['hash'] = str(hash((self.domain.devices_hash,
   self.guestAgent.diskMappingHash)))
 if self._watchdogEvent:
 stats['watchdogEvent'] = self._watchdogEvent
@@ -1718,7 +1718,7 @@
 This is necessary to prevent incoming migrations, restoring of VMs and
 the upgrade of VDSM with running VMs to fail on this.
 """
-for name, path in self._domain.all_channels():
+for name, path in self.domain.all_channels():
 if name not in vmchannels.AGENT_DEVICE_NAMES:
 continue
 
@@ -3647,7 +3647,7 @@
 use updateDevice to select the device.
 """
 try:
-graphics = self._domain.get_device_elements('graphics')[0]
+graphics = self.domain.get_device_elements('graphics')[0]
 except IndexError:
 return response.error('ticketErr',
   'no graphics devices configured')
@@ -3662,7 +3662,7 @@
 graphics.setAttribute('passwdValidTo', validto)
 if graphics.getAttribute('type') == 'spice':
 graphics.setAttribute('connected', connAct)
-hooks.before_vm_set_ticket(self._domain.xml, self.conf, params)
+hooks.before_vm_set_ticket(self.domain.xml, self.conf, params)
 try:
 self._dom.updateDeviceFlags(graphics.toxml(), 0)
 disconnectAction = params.get('disconnectAction',
@@ -3671,7 +3671,7 @@
 except virdomain.TimeoutError as tmo:
 res = response.error('ticketErr', unicode(tmo))
 else:
-hooks.after_vm_set_ticket(self._domain.xml, self.conf, params)
+hooks.after_vm_set_ticket(self.domain.xml, self.conf, params)
 res = {'status': doneCode}
 return res
 
@@ -3772,7 +3772,7 @@
 
 def _updateDomainDescriptor(self):
 domainXML = self._dom.XMLDesc(0)
-self._domain = DomainDescriptor(domainXML)
+self.domain = DomainDescriptor(domainXML)
 
 def _ejectFloppy(self):
 if 'volatileFloppy' in self.conf:
@@ -3824,7 +3824,7 @@
 
 self.cif.irs.inappropriateDevices(self.id)
 
-hooks.after_vm_destroy(self._domain.xml, self.conf)
+hooks.after_vm_destroy(self.domain.xml, self.conf)
 for dev in self._customDevices():
 hooks.after_device_destroy(dev._deviceXML, self.conf,
dev.custom)
@@ -3888,7 +3888,7 @@
 hooks.before_device_destroy(dev._deviceXML, self.conf,
 dev.custom)
 
-hooks.before_vm_destroy(self._domain.xml, self.conf)
+hooks.before_vm_destroy(self.domain.xml, self.conf)
 with self._shutdownLock:
 self._shutdownReason = vmexitreason.ADMIN_SHUTDOWN
 self._destroyed = True
@@ -4013,7 +4013,7 @@
 return True
 return False
 
-for x in self._domain.devices.childNodes:
+for x in self.domain.devices.childNodes:
 # Ignore empty nodes and devices without address
 if (x.nodeName == '#text' or
 not x.getElementsByTagName('address')):
@@ -4035,7 +4035,7 @@
 """
 Obtain controller devices info from libvirt.
 """
-for x in self._domain.get_device_elements('controller'):
+for x in self.domain.get_device_elements('controller'):
 # Ignore controller devices without address
 if not x.getElementsByTagName('address'):
 continue
@@ -4080,7 +4080,7 @@
 """
 Obtain balloon device info from libvirt.
 """
-for x in self._domain.get_device_elements('memballoon'):
+for x in 

Change in vdsm[master]: virt: vm.py: Make _updateDomainDescriptor() return new XML

2016-02-10 Thread mbetak
Martin Betak has uploaded a new change for review.

Change subject: virt: vm.py: Make _updateDomainDescriptor() return new XML
..

virt: vm.py: Make _updateDomainDescriptor() return new XML

Change-Id: Ic37e3b3eae819a586036dda17021d500f47e4ba7
Signed-off-by: Martin Betak 
---
M vdsm/virt/vm.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/53372/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index fb7646e..89940e3 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -3773,6 +3773,7 @@
 def _updateDomainDescriptor(self):
 domainXML = self._dom.XMLDesc(0)
 self.domain = DomainDescriptor(domainXML)
+return domainXML
 
 def _ejectFloppy(self):
 if 'volatileFloppy' in self.conf:


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic37e3b3eae819a586036dda17021d500f47e4ba7
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]: virt: add run_async helper

2016-02-09 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: virt: add run_async helper
..


Patch Set 10: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icfb405389c465d2a8b8fc8b6f958926d58167a26
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Jelinek 
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 lazy setting of incoming/outgoing limits

2016-02-09 Thread mbetak
Martin Betak has uploaded a new change for review.

Change subject: migration: Enable lazy setting of incoming/outgoing limits
..

migration: Enable lazy setting of incoming/outgoing limits

Change-Id: I79ab97f15788e4024c94d051e4aade713d760acf
Signed-off-by: Martin Betak 
---
M lib/api/vdsmapi-schema.json
M vdsm/API.py
M vdsm/virt/migration.py
3 files changed, 27 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/05/53305/1

diff --git a/lib/api/vdsmapi-schema.json b/lib/api/vdsmapi-schema.json
index 69a6802..e188d5b 100644
--- a/lib/api/vdsmapi-schema.json
+++ b/lib/api/vdsmapi-schema.json
@@ -7852,6 +7852,12 @@
 # @maxBandwidth:#optional maximal bandwidth used by the migration (MiB/s)
 #   (new in version 4.18.0)
 #
+# @outgoingLimit:   #optional maximum number of outgoing migrations
+#   (new in version 4.18.0)
+#
+# @incomingLimit:   #optional maximum number of incoming migrations
+#   (new in version 4.18.0)
+#
 # Since: 4.10.0
 ##
 {'type': 'MigrateParams',
@@ -7860,7 +7866,8 @@
   '*tunneled': 'bool', '*abortOnError': 'bool',
   'consoleAddress': 'str', 'dstqemu': 'str',
   '*compressed': 'bool', '*autoConverge': 'bool',
-  '*maxBandwidth': 'int'}}
+  '*maxBandwidth': 'int', '*outgoingLimit': 'int',
+  '*incomingLimit': 'int'}}
 
 ##
 # @VM.migrate:
diff --git a/vdsm/API.py b/vdsm/API.py
index d4a4b5e..c85b647 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -540,6 +540,8 @@
 *compressed* - compress repeated pages during live migration
 *autoConverge* - force convergence during live migration
 *maxBandwidth* - max bandwidth used by this specific migration
+*outgoingLimit* - max number of outgoing migrations
+*incomingLimit* - max number of incoming migrations
 """
 params['vmId'] = self._UUID
 self.log.debug(params)
@@ -592,6 +594,10 @@
 """
 self.log.debug('Migration create')
 
+incomingLimit = params.get('incomingLimit')
+if incomingLimit:
+migration.incomingMigrations.set_bound(incomingLimit)
+
 params['vmId'] = self._UUID
 result = self.create(params, migration.spawn_vm)
 if result['status']['code']:
diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index 090124c..0ab8e7f 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -121,6 +121,8 @@
 )
 self._autoConverge = autoConverge
 self._compressed = compressed
+self._incomingLimit = kwargs.get('incomingLimit')
+self._outgoingLimit = kwargs.get('outgoingLimit')
 self.status = {
 'status': {
 'code': 0,
@@ -212,6 +214,8 @@
 del self._machineParams[k]
 if not self.hibernating:
 self._machineParams['migrationDest'] = 'libvirt'
+if self._incomingLimit:
+self._machineParams['incomingLimit'] = self._incomingLimit
 self._machineParams['_srcDomXML'] = self._vm._dom.XMLDesc(0)
 
 def _prepareGuest(self):
@@ -319,7 +323,14 @@
 'dstqemu': self._dstqemu,
 }
 
+def _update_outgoing_limit(self):
+if self._outgoingLimit:
+self.log.debug('Updating outgoing migration limit to %d',
+   self._outgoingLimit)
+SourceThread.ongoingMigrations.set_bound(self._outgoingLimit)
+
 def run(self):
+self._update_outgoing_limit()
 try:
 startTime = time.time()
 self._setupVdsConnection()
@@ -328,7 +339,7 @@
 
 while not self._completed:
 try:
-with SourceThread._ongoingMigrations:
+with SourceThread.ongoingMigrations:
 if self._migrationCanceledEvt:
 self._raiseAbortError()
 self.log.debug("migration semaphore acquired "
@@ -417,7 +428,7 @@
 @staticmethod
 def _is_retry_error(self, result):
 return result['status']['code'] == \
-   errCode['migrateLimit']['status']['code']
+errCode['migrateLimit']['status']['code']
 
 def _perform_migration(self, duri, muri):
 if self._vm.hasSpice and self._vm.conf.get('clientIp'):


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79ab97f15788e4024c94d051e4aade713d760acf
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: Add DynamicThrottling semaphores

2016-02-09 Thread mbetak
Martin Betak has uploaded a new change for review.

Change subject: migration: Add DynamicThrottling semaphores
..

migration: Add DynamicThrottling semaphores

Change-Id: I67376d0bd990f89e0a013887cef1a0cb05fb855d
Signed-off-by: Martin Betak 
---
M tests/vmUtilsTests.py
M vdsm/clientIF.py
M vdsm/virt/migration.py
M vdsm/virt/utils.py
4 files changed, 104 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/53304/1

diff --git a/tests/vmUtilsTests.py b/tests/vmUtilsTests.py
index 19e64e7..abf2fbe 100644
--- a/tests/vmUtilsTests.py
+++ b/tests/vmUtilsTests.py
@@ -194,3 +194,29 @@
 
 def _helper(self):
 self.done.set()
+
+
+class DynamicSemaphoreTests(TestCaseBase):
+
+def setUp(self):
+self.sem = utils.DynamicBoundedSemaphore(5)
+
+def test_basic_operations(self):
+for i in range(5):
+self.sem.acquire()
+for i in range(5):
+self.sem.release()
+self.assertEquals(5, self.sem._value)
+
+def test_set_bound_increase(self):
+self.sem.set_bound(10)
+for i in range(10):
+self.sem.acquire()
+self.assertEquals(0, self.sem._value)
+
+def test_set_bound_decrease(self):
+self.sem.set_bound(0)
+success = self.sem.acquire(blocking=False)
+self.assertFalse(success, 'It should be not possible to obtain '
+  'semaphore with value 0')
+self.assertEqual(0, self.sem._value)
diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index 4f9d85f..39ba2f7 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -471,7 +471,7 @@
 # API response.
 mog = min(config.getint('vars', 'max_outgoing_migrations'),
   caps.CpuTopology().cores())
-migration.SourceThread.setMaxOutgoingMigrations(mog)
+migration.SourceThread.ongoingMigrations.set_bound(mog)
 
 recovery.all_vms(self)
 
diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index 8ae03ad..090124c 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -35,6 +35,7 @@
 from vdsm.define import NORMAL, Mbytes, errCode
 from vdsm.sslcompat import sslutils
 from virt.utils import run_async
+from virt.utils import DynamicBoundedSemaphore
 from yajsonrpc import \
 JsonRpcNoResponseError, \
 JsonRpcBindingsError
@@ -56,16 +57,22 @@
 VIR_MIGRATE_PARAM_GRAPHICS_URI = 'graphics_uri'
 
 
-_incomingMigrations = threading.BoundedSemaphore(
+incomingMigrations = DynamicBoundedSemaphore(
 min(config.getint('vars', 'max_incoming_migrations'),
 caps.CpuTopology().cores()))
 
 
 spawn_vm = functools.partial(
 run_async,
-resource=_incomingMigrations,
+resource=incomingMigrations,
 error='migrateLimit'
 )
+
+
+class MigrationConfigurationError(RuntimeError):
+"""
+Failed to set requested global migration option(s)
+"""
 
 
 class MigrationDestinationSetupError(RuntimeError):
@@ -85,14 +92,7 @@
 """
 A thread that takes care of migration on the source vdsm.
 """
-_ongoingMigrations = threading.BoundedSemaphore(1)
-
-@classmethod
-def setMaxOutgoingMigrations(cls, n):
-"""Set the initial value of the _ongoingMigrations semaphore.
-
-must not be called after any vm has been run."""
-cls._ongoingMigrations = threading.BoundedSemaphore(n)
+ongoingMigrations = DynamicBoundedSemaphore(1)
 
 def __init__(self, vm, dst='', dstparams='',
  mode=MODE_REMOTE, method=METHOD_ONLINE,
diff --git a/vdsm/virt/utils.py b/vdsm/virt/utils.py
index 51b6d54..5ba32b6 100644
--- a/vdsm/virt/utils.py
+++ b/vdsm/virt/utils.py
@@ -173,3 +173,70 @@
 started.wait()
 if starting_error[0] is not None:
 raise AsyncStartError(starting_error[0])
+
+
+class DynamicBoundedSemaphore(object):
+"""
+Bounded Semaphore with the additional ability
+to dynamically adjust its bound.
+"""
+
+def __init__(self, value):
+self._cond = threading.Condition(threading.Lock())
+self._value = value
+self._bound = value
+
+def acquire(self, blocking=True):
+""" Same behavior as threading.BoundedSemaphore.acquire """
+rc = False
+with self._cond:
+# to enable runtime adjustment of semaphore bound
+# we allow the _value counter to reach negative values
+while self._value <= 0:
+if not blocking:
+break
+self._cond.wait()
+else:
+self._value -= 1
+rc = True
+return rc
+
+__enter__ = acquire
+
+def release(self):
+""" Same behavior as threading.BoundedSemaphore.release """
+with self._cond:
+if self._value >= self._bound:
+raise ValueError("Dynamic Semaphore released too 

Change in vdsm[master]: numa: only use libvirt for memory info

2016-02-08 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: numa: only use libvirt for memory info
..


Patch Set 4:

(1 comment)

https://gerrit.ovirt.org/#/c/53091/4//COMMIT_MSG
Commit Message:

Line 10: depending on the state of machine's numa support. For some time,
Line 11: (guaranteed 7.0+) even machines without direct numa support do
Line 12: expose a single node that we can query.
Line 13: 
Line 14: This patch removes the 'UMA' (unified memory access) code branch
s/unified/uniform?
Line 15: and uses libvirt for all numa memory queries.
Line 16: 
Line 17: Change-Id: I0b5594a71047aae53374e4af5da95e3cd56f3835


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

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


Change in vdsm[master]: numa: only use libvirt for memory info

2016-02-08 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: numa: only use libvirt for memory info
..


Patch Set 5: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0b5594a71047aae53374e4af5da95e3cd56f3835
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak 
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Roman Mohr 
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]: hooks: Remove dead code from before_vm_migrate_destination

2016-02-08 Thread mbetak
Martin Betak has posted comments on this change.

Change subject: hooks: Remove dead code from before_vm_migrate_destination
..


Patch Set 3: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibc853b33ee7470581c1dae4ad408639909ea0cd9
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: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Vinzenz Feenstra 
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]: vdsm: Remove unreachable code

2016-02-03 Thread mbetak
Martin Betak has abandoned this change.

Change subject: vdsm: Remove unreachable code
..


Abandoned

duplicate change

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ie84749d01a735bc8177c7d16fb0612636f547004
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak 
Gerrit-Reviewer: Jenkins CI
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]: vdsm: Remove unreachable code

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

Change subject: vdsm: Remove unreachable code
..


Patch Set 2: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I919ca97f7b1077be2415287a43b9a9372e1fa593
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: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Vinzenz Feenstra 
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]: hooks: Remove dead code from before_vm_migrate_destination

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

Change subject: hooks: Remove dead code from before_vm_migrate_destination
..

hooks: Remove dead code from before_vm_migrate_destination

Change-Id: Ibc853b33ee7470581c1dae4ad408639909ea0cd9
Signed-off-by: Martin Betak 
---
M vdsm_hooks/hugepages/before_vm_migrate_destination.py
1 file changed, 0 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/52998/1

diff --git a/vdsm_hooks/hugepages/before_vm_migrate_destination.py 
b/vdsm_hooks/hugepages/before_vm_migrate_destination.py
index af1c4af..bdcd8d9 100755
--- a/vdsm_hooks/hugepages/before_vm_migrate_destination.py
+++ b/vdsm_hooks/hugepages/before_vm_migrate_destination.py
@@ -52,11 +52,3 @@
 sys.stderr.write('hugepages before_vm_migraton_destination: '
  '[unexpected error]: %s\n' % traceback.format_exc())
 sys.exit(2)
-
-# Add system hugepages
-allocatedPages = addSysHugepages(pages)
-if allocatedPages != pages:
-freeSysHugepages(allocatedPages)
-sys.stderr.write('hugepages before_vm_migraton_destination: cannot'
- ' allocate enough pages\n')
-sys.exit(2)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc853b33ee7470581c1dae4ad408639909ea0cd9
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]: vdsm: Remove unreachable code

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

Change subject: vdsm: Remove unreachable code
..

vdsm: Remove unreachable code

Change-Id: Ie84749d01a735bc8177c7d16fb0612636f547004
Signed-off-by: Martin Betak 
---
M lib/vdsm/utils.py
M tests/schemaValidationTest.py
M vdsm/API.py
3 files changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/52997/1

diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py
index 3863d2b..13a8bc1 100644
--- a/lib/vdsm/utils.py
+++ b/lib/vdsm/utils.py
@@ -295,7 +295,6 @@
 if e.args[0] == os.errno.EINTR:
 continue
 raise
-break
 
 
 class CommandStream(object):
diff --git a/tests/schemaValidationTest.py b/tests/schemaValidationTest.py
index 97fcd86..601aa5a 100644
--- a/tests/schemaValidationTest.py
+++ b/tests/schemaValidationTest.py
@@ -111,7 +111,6 @@
 except KeyError:
 raise AssertionError('Missing method %s.%s' % (
  spec_class, method_name))
-continue
 
 # inspect apiobj and gather args and default args
 args = ctorArgs + self._get_args(method_obj)
diff --git a/vdsm/API.py b/vdsm/API.py
index adb20a2..d23b09d 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -256,7 +256,6 @@
'message': 'Failed to create '
   'sysprep floppy image. '
   'No space on /tmp?'}}
-return errCode['createErr']
 
 if not graphics.isSupportedDisplayType(vmParams):
 return {'status': {'code': errCode['createErr']


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie84749d01a735bc8177c7d16fb0612636f547004
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]: vdsm: Remove unreachable code

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

Change subject: vdsm: Remove unreachable code
..


Patch Set 2:

split the hook part as per mpolednik's request

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I919ca97f7b1077be2415287a43b9a9372e1fa593
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: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


  1   2   3   >