automation(a)ovirt.org has posted comments on this change.
Change subject: lib: grub2 module
......................................................................
Patch Set 4:
* 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/47946
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I9e7e0b327882f64196a71fe20dcbd99017b80800
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Martin Betak <mbetak(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
Yeela Kaplan has uploaded a new change for review.
Change subject: jsonrpc cli: allow client to return compatible results
......................................................................
jsonrpc cli: allow client to return compatible results
to xmlrpc.
Bridge transforms the return value for different verbs
results returning from vdsm API.
Some code expects the old return results of API
compatible with xmlrpc.
The compat parameter allows us to return a value
that is compatible with the way xmlrpc is parsed
and we'll be able to remove this once we stop
supporting xmlrpc API.
Until then using this intermediate step is the most
straight-forward way and saves us the unnecessary
hassle of re-translating the bridge work
once its done parsing the result from API.
Change-Id: Id0bbbb46f622e60824cf5d25670fd16889f4fc51
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M lib/vdsm/jsonrpcvdscli.py
M lib/vdsm/response.py
2 files changed, 22 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/23/47923/1
diff --git a/lib/vdsm/jsonrpcvdscli.py b/lib/vdsm/jsonrpcvdscli.py
index c5a4df9..4fb197d 100644
--- a/lib/vdsm/jsonrpcvdscli.py
+++ b/lib/vdsm/jsonrpcvdscli.py
@@ -46,9 +46,10 @@
class _Server(object):
- def __init__(self, client):
+ def __init__(self, client, compat):
self._vdsmapi = vdsmapi.get_api()
self._client = client
+ self._compat = compat
def _prepare_args(self, className, methodName, args, kwargs):
sym = self._vdsmapi['commands'][className][methodName]
@@ -82,6 +83,9 @@
if resp.error is not None:
return response.error_raw(resp.error["code"],
resp.error["message"])
+
+ if not self._compat:
+ return response.success_raw(resp.result)
if resp.result and resp.result is not True:
# None is translated to True inside our JSONRPC implementation
@@ -126,7 +130,7 @@
def connect(requestQueue, stompClient=None,
host=None, port=None,
useSSL=None,
- responseQueue=None):
+ responseQueue=None, compat=True):
if not stompClient:
client = _create(requestQueue,
host, port, useSSL,
@@ -138,4 +142,4 @@
str(uuid4())
)
- return _Server(client)
+ return _Server(client, compat)
diff --git a/lib/vdsm/response.py b/lib/vdsm/response.py
index 62ed49e..160898f 100644
--- a/lib/vdsm/response.py
+++ b/lib/vdsm/response.py
@@ -41,6 +41,21 @@
return kwargs
+def success_raw(result=None, message=None):
+ ret = {
+ 'status':
+ {
+ "code": doneCode["code"],
+ "message": message or doneCode["message"],
+ }
+ }
+
+ if result:
+ ret['result'] = result
+
+ return ret
+
+
def error(name, message=None):
status = errCode[name]["status"]
return {
--
To view, visit https://gerrit.ovirt.org/47923
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0bbbb46f622e60824cf5d25670fd16889f4fc51
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
Yeela Kaplan has uploaded a new change for review.
Change subject: jsonrpc cli: Allow setting timeout for long operations
......................................................................
jsonrpc cli: Allow setting timeout for long operations
Current timeout for operations over jsonrpc is 15
seconds.
Some operations are slower and require
more time.
We want to allow those to set a timeout separately.
If no new timeout is supplied we use the default
jsonrpc timeout.
Change-Id: Ib71a5d58a9b6ba141492b2bcec5aebd5d6249179
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M lib/vdsm/jsonrpcvdscli.py
1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/22/47922/1
diff --git a/lib/vdsm/jsonrpcvdscli.py b/lib/vdsm/jsonrpcvdscli.py
index 7d35d62..c5a4df9 100644
--- a/lib/vdsm/jsonrpcvdscli.py
+++ b/lib/vdsm/jsonrpcvdscli.py
@@ -27,7 +27,8 @@
from yajsonrpc import stompreactor
from yajsonrpc import \
JsonRpcRequest, \
- JsonRpcNoResponseError
+ JsonRpcNoResponseError, \
+ CALL_TIMEOUT
from api import vdsmapi
from vdsm import response
@@ -68,8 +69,11 @@
class_name, method_name = method.split('.')
params = self._prepare_args(class_name, method_name, args, kwargs)
+ timeout = kwargs.pop('longOp', CALL_TIMEOUT)
+
req = JsonRpcRequest(method, params, reqId=str(uuid4()))
- responses = self._client.call(req)
+
+ responses = self._client.call(req, timeout=timeout)
if responses:
resp = responses[0]
else:
--
To view, visit https://gerrit.ovirt.org/47922
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib71a5d58a9b6ba141492b2bcec5aebd5d6249179
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
Francesco Romani has uploaded a new change for review.
Change subject: tests: monkey patch architecture if unsupported
......................................................................
tests: monkey patch architecture if unsupported
Following the effort to make vdsm no-arch depended,
some tests fails while running on unsupported platforms.
This patch monkeyPatch the tests, reporting a fake arch
(x86_64) if code is running on unsupported arch;
otherwise, the real arch is used, as before.
Change-Id: I2b7136e0269f39c8295714dee0be9604d7e2019c
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M tests/testlib.py
1 file changed, 28 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/48012/1
diff --git a/tests/testlib.py b/tests/testlib.py
index 3d00c0c..352a708 100644
--- a/tests/testlib.py
+++ b/tests/testlib.py
@@ -24,6 +24,7 @@
import logging
import os
import pickle
+import platform
import unittest
from functools import wraps
import shutil
@@ -39,6 +40,7 @@
import vdsm
+from monkeypatch import Patch
from testValidation import SlowTestsPlugin, StressTestsPlugin
# /tmp may use tempfs filesystem, not suitable for some of the test assuming a
@@ -46,6 +48,9 @@
TEMPDIR = '/var/tmp'
PERMUTATION_ATTR = "_permutations_"
+
+_ARCH_REAL = platform.machine()
+_ARCH_FAKE = 'x86_64'
def dummyTextGenerator(size):
@@ -153,12 +158,35 @@
f.truncate(size)
+def _vdsm_machine():
+ return (
+ _ARCH_REAL if _ARCH_REAL in (
+ # FIXME: this duplicates caps.Architecture, but
+ # we cannot import caps.py in this module.
+ 'x86_64', 'ppc64', 'ppc64le'
+ ) else _ARCH_FAKE
+ )
+
+
class VdsmTestCase(unittest.TestCase):
+
+ _patch_arch = Patch([
+ (platform, "machine", _vdsm_machine),
+ ])
+
def __init__(self, *args, **kwargs):
unittest.TestCase.__init__(self, *args, **kwargs)
self.log = logging.getLogger(self.__class__.__name__)
self.maxDiff = None # disable truncating diff in assert error messages
+ @classmethod
+ def setUpClass(cls):
+ cls._patch_arch.apply()
+
+ @classmethod
+ def tearDownClass(cls):
+ cls._patch_arch.revert()
+
def retryAssert(self, *args, **kwargs):
'''Keep retrying an assertion if AssertionError is raised.
See function utils.retry for the meaning of the arguments.
--
To view, visit https://gerrit.ovirt.org/48012
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b7136e0269f39c8295714dee0be9604d7e2019c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
Martin Polednik has uploaded a new change for review.
Change subject: virt: un-memoize getNumaTopology
......................................................................
virt: un-memoize getNumaTopology
The numa topology reflects which CPUs belong to which node. There is an
issue with memoization in this case:
If CPU is onlined or offlined while VDSM is running, the changes will
not be reflected. Anything attempting to get the CPUs from this call
(such as HostStatsThread) will not be updated and will try to sample
invalid CPUs.
Change-Id: I3e28688fabf8fc18252b3a35dfdd9a5a4071685b
Bug-Url: https://bugzilla.redhat.com/??????
Signed-off-by: Martin Polednik <mpolednik(a)redhat.com>
---
M vdsm/caps.py
1 file changed, 0 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/06/48006/1
diff --git a/vdsm/caps.py b/vdsm/caps.py
index 862f8cb..41b9b76 100644
--- a/vdsm/caps.py
+++ b/vdsm/caps.py
@@ -302,7 +302,6 @@
return True
-(a)utils.memoized
def getNumaTopology(capabilities=None):
if capabilities is None:
capabilities = _getCapsXMLStr()
--
To view, visit https://gerrit.ovirt.org/48006
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e28688fabf8fc18252b3a35dfdd9a5a4071685b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>