Change in vdsm[master]: snapshot: Add VM.freeze() and VM.thaw() verbs
by automation@ovirt.org
automation(a)ovirt.org has posted comments on this change.
Change subject: snapshot: Add VM.freeze() and VM.thaw() verbs
......................................................................
Patch Set 7:
* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit https://gerrit.ovirt.org/43058
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I44c4237841e44548f48f626f4241d3f2e484930e
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
8 years, 9 months
Change in vdsm[master]: snapshot: Add VM.freeze() and VM.thaw() verbs
by Martin Polednik
Martin Polednik has posted comments on this change.
Change subject: snapshot: Add VM.freeze() and VM.thaw() verbs
......................................................................
Patch Set 6: Code-Review+1
--
To view, visit https://gerrit.ovirt.org/43058
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I44c4237841e44548f48f626f4241d3f2e484930e
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
8 years, 9 months
Change in vdsm[master]: tests: Allow setting custom libvirt error message
by Nir Soffer
Nir Soffer has uploaded a new change for review.
Change subject: tests: Allow setting custom libvirt error message
......................................................................
tests: Allow setting custom libvirt error message
Fake Domain object was repeating the code in Error factory, and was
using a default empty error message. Now we use Error and allow faking
also the error message.
Change-Id: I61e26d50ef7babd8bf9a9aadc38451297631a65b
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/vmfakelib.py
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/20/43020/1
diff --git a/tests/vmfakelib.py b/tests/vmfakelib.py
index 2c841ca..bdaf275 100644
--- a/tests/vmfakelib.py
+++ b/tests/vmfakelib.py
@@ -163,6 +163,7 @@
class Domain(object):
def __init__(self, xml='',
virtError=libvirt.VIR_ERR_OK,
+ errorMessage="",
domState=libvirt.VIR_DOMAIN_RUNNING,
domReason=0,
vmId=''):
@@ -170,6 +171,7 @@
self._xml = xml
self.devXml = ''
self._virtError = virtError
+ self._errorMessage = errorMessage
self._metadata = ""
self._io_tune = {}
self._domState = domState
@@ -180,9 +182,7 @@
def _failIfRequested(self):
if self._virtError != libvirt.VIR_ERR_OK:
- err = libvirt.libvirtError(defmsg='')
- err.err = [self._virtError]
- raise err
+ raise Error(self._virtError, self._errorMessage)
def UUIDString(self):
return self._vmId
--
To view, visit https://gerrit.ovirt.org/43020
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I61e26d50ef7babd8bf9a9aadc38451297631a65b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
8 years, 9 months
Change in vdsm[master]: tests: Add @recorded method decorator
by Nir Soffer
Nir Soffer has uploaded a new change for review.
Change subject: tests: Add @recorded method decorator
......................................................................
tests: Add @recorded method decorator
Manually recording function arguments and keywords again and again is
not fun and error prone. This patch introduces a new decorator to make
this task easier.
To make a class recordable, add a __recording__ list, and mark the
method you want to record:
class Foo:
def __init__(self):
self.__recording__ = []
@recorded
def foo(self, a, b, c=3):
pass
def bar(self):
return 42
Methods decorated with @recorded will record all calls to the
__recording__ list:
f = Foo()
f.foo(1, 2, 4)
f.bar()
f.foo(2, 3)
print(f.__recording__)
[("foo", (1, 2), {"c": 4}), ("foo", (2, 3), {"c": 3})]
The new decorator is used now by vmfakelib.Domain. It may be useful for
other fake objcts as well.
Change-Id: I43c7750ae1deb5fa9bbee40d9f6f624ce1105c4e
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/testlib.py
M tests/vmTests.py
M tests/vmfakelib.py
3 files changed, 15 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/15/43015/1
diff --git a/tests/testlib.py b/tests/testlib.py
index 7f23c1a..78b7f18 100644
--- a/tests/testlib.py
+++ b/tests/testlib.py
@@ -380,3 +380,14 @@
for (section, key, value) in tunables:
cfg.set(section, key, value)
return cfg
+
+
+def recorded(meth):
+ """
+ Method decorator recording calls to instance's __recording__ list.
+ """
+ @wraps(meth)
+ def wrapper(self, *args, **kw):
+ self.__recording__.append((meth.func_name, args, kw))
+ return meth(self, *args, **kw)
+ return wrapper
diff --git a/tests/vmTests.py b/tests/vmTests.py
index e1e7f1a..9e05f50 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -1488,7 +1488,8 @@
target = 256
res = testvm.setBalloonTarget(target) # just to fit in 80 cols
self.assertEqual(res['status']['code'], 0)
- self.assertEqual(testvm._dom.calls, [('setMemory', (target,), {})])
+ self.assertEqual(testvm._dom.__recording__,
+ [('setMemory', (target,), {})])
def testVmWithoutDom(self):
with fake.VM() as testvm:
diff --git a/tests/vmfakelib.py b/tests/vmfakelib.py
index 2e44fb1..f5d2b11 100644
--- a/tests/vmfakelib.py
+++ b/tests/vmfakelib.py
@@ -165,6 +165,7 @@
domState=libvirt.VIR_DOMAIN_RUNNING,
domReason=0,
vmId=''):
+ self.__recording__ = []
self._xml = xml
self.devXml = ''
self._virtError = virtError
@@ -173,7 +174,6 @@
self._domState = domState
self._domReason = domReason
self._vmId = vmId
- self.calls = []
self._diskErrors = {}
self._downtimes = []
@@ -224,9 +224,9 @@
self._io_tune[name] = io_tune
return 1
+ @recorded
def setMemory(self, target):
self._failIfRequested()
- self.calls.append(('setMemory', (target,), {}))
def setDiskErrors(self, diskErrors):
self._diskErrors = diskErrors
--
To view, visit https://gerrit.ovirt.org/43015
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I43c7750ae1deb5fa9bbee40d9f6f624ce1105c4e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
8 years, 9 months
Change in vdsm[master]: tests: Record fake domain calls in a list
by Nir Soffer
Nir Soffer has uploaded a new change for review.
Change subject: tests: Record fake domain calls in a list
......................................................................
tests: Record fake domain calls in a list
Keeping calls in a list allows testing of multiple calls. We can check
how many time a methods was called, what args and kwargs were used on
each call, and we can verify the correct order of the calls.
Change-Id: I279a1fd7a2e07b7adef4f446c9487a51d9df21f4
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/vmTests.py
M tests/vmfakelib.py
2 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/42998/1
diff --git a/tests/vmTests.py b/tests/vmTests.py
index a6b23ac..e1e7f1a 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -1488,7 +1488,7 @@
target = 256
res = testvm.setBalloonTarget(target) # just to fit in 80 cols
self.assertEqual(res['status']['code'], 0)
- self.assertEqual(testvm._dom.calls['setMemory'][0], target)
+ self.assertEqual(testvm._dom.calls, [('setMemory', (target,), {})])
def testVmWithoutDom(self):
with fake.VM() as testvm:
diff --git a/tests/vmfakelib.py b/tests/vmfakelib.py
index ece0a42..2e44fb1 100644
--- a/tests/vmfakelib.py
+++ b/tests/vmfakelib.py
@@ -173,7 +173,7 @@
self._domState = domState
self._domReason = domReason
self._vmId = vmId
- self.calls = {}
+ self.calls = []
self._diskErrors = {}
self._downtimes = []
@@ -226,7 +226,7 @@
def setMemory(self, target):
self._failIfRequested()
- self.calls['setMemory'] = (target,)
+ self.calls.append(('setMemory', (target,), {}))
def setDiskErrors(self, diskErrors):
self._diskErrors = diskErrors
--
To view, visit https://gerrit.ovirt.org/42998
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I279a1fd7a2e07b7adef4f446c9487a51d9df21f4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
8 years, 9 months
Change in vdsm[master]: build: Change dependency on glusterfs-cli and glusterfs-fuse
by ahino@redhat.com
Ala Hino has uploaded a new change for review.
Change subject: build: Change dependency on glusterfs-cli and glusterfs-fuse
......................................................................
build: Change dependency on glusterfs-cli and glusterfs-fuse
Originally, glusterfs-cli and glusterfs-fuse were required only
when not building vdsm on RHEV.
We changed the spec file to always require
gluster-cli and glusterfs-fuse in order to use gluster get volume
info api to implement mounting gluster backup servers
(https://gerrit.ovirt.org/40665).
However, requiring these dependencies fails vdsm build on ppc64le.
This patch revert requiring glusterfs-cli and glusterfs-fuse
dependencies as were originally defined.
Change-Id: I4cf424e7055ad071561d037b65972dde3b1b0b8b
Signed-off-by: Ala Hino <ahino(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 3 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/43097/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index a4dc9f1..defee9e 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -235,10 +235,6 @@
Requires: qemu-img >= 2:2.0.0-1
%endif # rhel
-# GlusterFS client-side RPMs needed for Gluster SD
-Requires: glusterfs-cli >= %{gluster_version}
-Requires: glusterfs-fuse >= %{gluster_version}
-
Requires: psmisc >= 22.6-15
Requires: bridge-utils
Requires: sos
@@ -590,6 +586,7 @@
VDSM hook used for applying IPv6 configuration through custom network
properties
+# GlusterFS client-side RPMs needed for Gluster SD
%if 0%{?with_gluster}
%package gluster
Summary: Gluster Plugin for VDSM
@@ -597,6 +594,8 @@
Requires: glusterfs-server >= %{gluster_version}
Requires: glusterfs-api >= %{gluster_version}
Requires: glusterfs-geo-replication >= %{gluster_version}
+Requires: glusterfs-cli >= %{gluster_version}
+Requires: glusterfs-fuse >= %{gluster_version}
Requires: python-magic
Requires: python-blivet
Requires: xfsprogs
--
To view, visit https://gerrit.ovirt.org/43097
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4cf424e7055ad071561d037b65972dde3b1b0b8b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ahino(a)redhat.com>
8 years, 9 months
Change in vdsm[master]: migration: use the response module
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: migration: use the response module
......................................................................
migration: use the response module
Switch to response module for the sake of code
clarity.
Change-Id: I6d56b93d02467b4e95a29a9a98d4a09b22e64573
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/40492/1
diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index b6b6c15..26f9bad 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -25,11 +25,12 @@
import hooks
import kaxmlrpclib
+from vdsm import response
from vdsm import utils
from vdsm import vdscli
from vdsm.compat import pickle
from vdsm.config import config
-from vdsm.define import NORMAL, errCode, Mbytes
+from vdsm.define import NORMAL, Mbytes
from . import vmexitreason
from . import vmstatus
@@ -128,10 +129,10 @@
status = self._destServer.getVmStats(self._vm.id)
if not status['status']['code']:
self.log.error("Machine already exists on the destination")
- self.status = errCode['exist']
+ self.status = response.error('exist')
except Exception:
self.log.exception("Error initiating connection")
- self.status = errCode['noConPeer']
+ self.status = response.error('noConPeer')
def _setupRemoteMachineParams(self):
self._machineParams.update(self._vm.status())
@@ -179,7 +180,7 @@
def _recover(self, message):
if not self.status['status']['code']:
- self.status = errCode['migrateErr']
+ self.status = response.error('migrateErr')
self.log.error(message)
if not self.hibernating:
try:
@@ -269,9 +270,8 @@
self._finishSuccessfully()
except libvirt.libvirtError as e:
if e.get_error_code() == libvirt.VIR_ERR_OPERATION_ABORTED:
- self.status['status']['code'] = \
- errCode['migCancelErr']['status']['code']
- self.status['status']['message'] = 'Migration canceled'
+ self.status = response.error('migCancelErr',
+ message='Migration canceled')
raise
finally:
if '_migrationParams' in self._vm.conf:
--
To view, visit https://gerrit.ovirt.org/40492
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d56b93d02467b4e95a29a9a98d4a09b22e64573
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 9 months
Change in vdsm[master]: snapshot: Add VM.freeze() and VM.thaw() verbs
by automation@ovirt.org
automation(a)ovirt.org has posted comments on this change.
Change subject: snapshot: Add VM.freeze() and VM.thaw() verbs
......................................................................
Patch Set 6:
* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit https://gerrit.ovirt.org/43058
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I44c4237841e44548f48f626f4241d3f2e484930e
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
8 years, 9 months
Change in vdsm[master]: snapshot: Add VM.freeze() and VM.thaw() verbs
by fromani@redhat.com
Francesco Romani has posted comments on this change.
Change subject: snapshot: Add VM.freeze() and VM.thaw() verbs
......................................................................
Patch Set 5: Code-Review+1
--
To view, visit https://gerrit.ovirt.org/43058
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I44c4237841e44548f48f626f4241d3f2e484930e
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
8 years, 9 months
Change in vdsm[master]: snapshot: Add VM.freeze() and VM.thaw() verbs
by michal.skrivanek@redhat.com
Michal Skrivanek has posted comments on this change.
Change subject: snapshot: Add VM.freeze() and VM.thaw() verbs
......................................................................
Patch Set 5: Code-Review+1
--
To view, visit https://gerrit.ovirt.org/43058
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I44c4237841e44548f48f626f4241d3f2e484930e
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
8 years, 9 months