Change in vdsm[master]: sampling: rename generic window constant
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: sampling: rename generic window constant
......................................................................
sampling: rename generic window constant
Until we have support for one element sampling windows,
we make use of this constant.
This patch just renames it to make it usable for generic samplings.
Change-Id: Ibb9351170c0b0971d01e0c35ed434f0260a12fd9
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/31607/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 5b607b5..ad1ef2f 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -195,7 +195,7 @@
# CPU tune sampling window
# minimum supported value is 2
- CPU_TUNE_SAMPLING_WINDOW = 2
+ GENERIC_SAMPLING_WINDOW = 2
# This flag will prevent excessive log flooding when running
# on libvirt with no support for metadata xml elements.
@@ -258,7 +258,7 @@
AdvancedStatsFunction(
self._sampleCpuTune,
config.getint('vars', 'vm_sample_cpu_tune_interval'),
- self.CPU_TUNE_SAMPLING_WINDOW))
+ self.GENERIC_SAMPLING_WINDOW))
self.addStatsFunction(
self.highWrite, self.updateVolumes, self.sampleCpu,
--
To view, visit http://gerrit.ovirt.org/31607
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb9351170c0b0971d01e0c35ed434f0260a12fd9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
9 years, 6 months
Change in vdsm[master]: jsonrpc: deepcopy result in response
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: jsonrpc: deepcopy result in response
......................................................................
jsonrpc: deepcopy result in response
This patch fixes the RuntimeError below
which was (rarely) spotted in the wild:
Thread-281::ERROR::2014-10-28
16:31:20,971::__init__::244::root::(sendReply)
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/yajsonrpc/__init__.py",
line 242, in sendReply
encodedObjects.append(response.encode())
File "/usr/lib/python2.6/site-packages/yajsonrpc/__init__.py",
line 140, in encode
return json.dumps(res, 'utf-8')
File "/usr/lib64/python2.6/json/__init__.py", line 237, in dumps
**kw).encode(obj)
File "/usr/lib64/python2.6/json/encoder.py", line 367, in encode
chunks = list(self.iterencode(o))
File "/usr/lib64/python2.6/json/encoder.py", line 309, in
_iterencode
for chunk in self._iterencode_dict(o, markers):
File "/usr/lib64/python2.6/json/encoder.py", line 275, in
_iterencode_dict
for chunk in self._iterencode(value, markers):
File "/usr/lib64/python2.6/json/encoder.py", line 309, in
_iterencode
for chunk in self._iterencode_dict(o, markers):
File "/usr/lib64/python2.6/json/encoder.py", line 275, in
_iterencode_dict
for chunk in self._iterencode(value, markers):
File "/usr/lib64/python2.6/json/encoder.py", line 306, in
_iterencode
for chunk in self._iterencode_list(o, markers):
File "/usr/lib64/python2.6/json/encoder.py", line 204, in
_iterencode_list
for chunk in self._iterencode(value, markers):
File "/usr/lib64/python2.6/json/encoder.py", line 309, in
_iterencode
for chunk in self._iterencode_dict(o, markers):
File "/usr/lib64/python2.6/json/encoder.py", line 247, in
_iterencode_dict
for key, value in items:
RuntimeError: dictionary changed size during iteration
Change-Id: I5d3214bce52e410428eeda5ad604fab06b27753c
Relates-To: https://bugzilla.redhat.com/1143968
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M lib/yajsonrpc/__init__.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/80/34580/1
diff --git a/lib/yajsonrpc/__init__.py b/lib/yajsonrpc/__init__.py
index b3fd590..9c93960 100644
--- a/lib/yajsonrpc/__init__.py
+++ b/lib/yajsonrpc/__init__.py
@@ -12,6 +12,7 @@
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+import copy
import json
import logging
from functools import partial
@@ -119,7 +120,7 @@
class JsonRpcResponse(object):
def __init__(self, result=None, error=None, reqId=None):
- self.result = result
+ self.result = copy.deepcopy(result)
self.error = error
self.id = reqId
--
To view, visit http://gerrit.ovirt.org/34580
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d3214bce52e410428eeda5ad604fab06b27753c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
9 years, 6 months
Change in vdsm[ovirt-3.5.0]: hosted-engine: don't log the whole backtrace for expected pr...
by Jiri Moskovcak
Jiří Moskovčák has uploaded a new change for review.
Change subject: hosted-engine: don't log the whole backtrace for expected problems
......................................................................
hosted-engine: don't log the whole backtrace for expected problems
when deploying host for hosted engine, vdsm starts using the HE
broker api before the deployment is finished, and the required config
file is not writen, so it results in the exception which polutes the
log
Change-Id: Ib03fbe80dfd111ef9a2e4f2137433e358f6479bb
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1045053
Signed-off-by: Jiri Moskovcak <jmoskovc(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/31432
Reviewed-by: Sandro Bonazzola <sbonazzo(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
(cherry picked from commit 3edc284263a291330be982b7fbabb6f4070dd61d)
---
M vdsm/API.py
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/34004/1
diff --git a/vdsm/API.py b/vdsm/API.py
index b2caf44..f69361a 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -27,6 +27,7 @@
import copy
import time
import logging
+import errno
from network.errors import ConfigNetworkError
from network.errors import ERR_BAD_NIC
@@ -1683,6 +1684,17 @@
i['active'] = stats[host_id]['live-data']
i['score'] = stats[host_id]['score']
i['localMaintenance'] = stats[host_id]['maintenance']
+ except IOError as ex:
+ if ex.errno == errno.ENOENT:
+ self.log.error(
+ ("failed to retrieve Hosted Engine HA score '{0}'"
+ "Is the Hosted Engine setup finished?")
+ .format(str(ex))
+ )
+ else:
+ self.log.exception(
+ "failed to retrieve Hosted Engine HA score"
+ )
except Exception:
self.log.exception("failed to retrieve Hosted Engine HA info")
return i
--
To view, visit http://gerrit.ovirt.org/34004
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib03fbe80dfd111ef9a2e4f2137433e358f6479bb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5.0
Gerrit-Owner: Jiří Moskovčák <jmoskovc(a)redhat.com>
9 years, 6 months
Change in vdsm[master]: fix broken TestConfigNetwork.testAddNetworkValidation
by ibarkan@redhat.com
Ido Barkan has uploaded a new change for review.
Change subject: fix broken TestConfigNetwork.testAddNetworkValidation
......................................................................
fix broken TestConfigNetwork.testAddNetworkValidation
this was broken after http://gerrit.oveir.org/34538
was merged.
Change-Id: Ic63df1075bfb036a7a0b133111ebb54fd12b6d3e
Signed-off-by: ibarkan <ibarkan(a)redhat.com>
---
M tests/configNetworkTests.py
M tests/outOfProcessTests.py
2 files changed, 6 insertions(+), 20 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/67/34867/1
diff --git a/tests/configNetworkTests.py b/tests/configNetworkTests.py
index 83a4b73..10a5f2a 100644
--- a/tests/configNetworkTests.py
+++ b/tests/configNetworkTests.py
@@ -90,7 +90,12 @@
'fakebr1': {'ports': ['bond00']},
'fakebr2': {'ports': ['eth7.1']}
},
- 'bondings': {'bond00': {'slaves': ['eth5', 'eth6']}}
+ 'bondings': {
+ 'bond00': {
+ 'slaves': ['eth5', 'eth6'],
+ 'cfg': {'BONDING_OPTS': 'mode=802.3ad miimon=150'}
+ }
+ }
}
fakeInfo = netinfo.NetInfo(_netinfo)
@@ -143,23 +148,6 @@
# Test for nic already in a bond.
self._addNetworkWithExc('test', dict(nics=['eth6'], _netinfo=fakeInfo),
errors.ERR_USED_NIC)
-
- # Test for adding a new VLANed bridged network when a non-VLANed
- # bridged network exists
- self._addNetworkWithExc('test', dict(vlan='2', bonding='bond00',
- nics=nics, _netinfo=fakeInfo),
- errors.ERR_BAD_PARAMS)
-
- # Test for adding a new VLANed bridgeless network when a non-VLANed
- # bridged network exists
- self._addNetworkWithExc('test', dict(vlan='2', bonding='bond00',
- nics=nics, bridged=False, _netinfo=fakeInfo),
- errors.ERR_BAD_PARAMS)
-
- # Test for adding a new VLANed bridged network when the interface is in
- # use by any type of networks
- self._addNetworkWithExc('test', dict(nics=['eth7'], _netinfo=fakeInfo),
- errors.ERR_BAD_PARAMS)
# Test for adding a new non-VLANed bridgeless network when a non-VLANed
# bridgeless network exists
diff --git a/tests/outOfProcessTests.py b/tests/outOfProcessTests.py
index f06c71d..974e2e1 100644
--- a/tests/outOfProcessTests.py
+++ b/tests/outOfProcessTests.py
@@ -28,8 +28,6 @@
import re
from weakref import ref
-from vdsm.config import config
-
class OopWrapperTests(TestCaseBase):
--
To view, visit http://gerrit.ovirt.org/34867
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic63df1075bfb036a7a0b133111ebb54fd12b6d3e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan(a)redhat.com>
9 years, 6 months
Change in vdsm[master]: xmlrpc: marshalling of Long type
by Nir Soffer
Nir Soffer has posted comments on this change.
Change subject: xmlrpc: marshalling of Long type
......................................................................
Patch Set 3: Code-Review-1
(1 comment)
http://gerrit.ovirt.org/#/c/34856/3/vdsm/rpc/BindingXMLRPC.py
File vdsm/rpc/BindingXMLRPC.py:
Line 49: class BindingXMLRPC(object):
Line 50: def __init__(self, cif, log, port):
Line 51: xmlrpclib.Marshaller.dispatch[types.LongType] = (
Line 52: lambda _, v, w: w(_STRING_VALUE % v)
Line 53: )
This seems to use the value of the number being marshaled, so the result will be different depending on the value.
We need a conversion which is based on the schema, not on the value.
Assuming that we use this new infrastructure and remove the explicit str() in the verbs responses, we will break compatibility with older engine.
For example, a verb returning free space on a device - when the device is empty, it may return value > 2**3, which will be marshaled as string, and when the disk is fuller, the value may be < 2**32, which will be marshaled as int. On the other side, engine expected to get always a string, and may fail to read the unexpected int.
Look at the schema - in any place the schema promise a string for numeric value, we should always send a string, regardless of the value. Unless older engine code can handle both string and int for numeric values.
Line 54: self.cif = cif
Line 55: self.log = log
Line 56: self.serverPort = port
Line 57:
--
To view, visit http://gerrit.ovirt.org/34856
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I56341566e4add6a093ba89eb81e09ee9e7a631b1
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
9 years, 6 months
Change in vdsm[master]: spec: Require newer version of selinux-policy
by ykaplan@redhat.com
Yeela Kaplan has uploaded a new change for review.
Change subject: spec: Require newer version of selinux-policy
......................................................................
spec: Require newer version of selinux-policy
The newer version of selinux-policy allows logrotate to read
/var/log/core which is tagged as a file of type virt_cache_t
Change-Id: Ie783bcccb1ab39397714fc728336fd65ee4b95a9
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1131460
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/67/33667/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 58ed07c..d35f396 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -204,7 +204,7 @@
Requires: initscripts >= 9.03.31-2.el6_3.1
Requires: policycoreutils >= 2.0.83-19.30
Requires: policycoreutils-python >= 2.0.83-19.30
-Requires: selinux-policy-targeted >= 3.7.19-195.el6_4.13
+Requires: selinux-policy-targeted >= 3.7.19-249.el6
Requires: lvm2 >= 2.02.100-5
Requires: logrotate < 3.8.0
%endif
--
To view, visit http://gerrit.ovirt.org/33667
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie783bcccb1ab39397714fc728336fd65ee4b95a9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
9 years, 6 months
Change in vdsm[master]: xmlrpc: marshalling of Long type
by Nir Soffer
Nir Soffer has posted comments on this change.
Change subject: xmlrpc: marshalling of Long type
......................................................................
Patch Set 3:
Did you verify with older engine which does not include the java side changes?
You should test with ovirt 3.3, 3.4, and 3.5.
--
To view, visit http://gerrit.ovirt.org/34856
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I56341566e4add6a093ba89eb81e09ee9e7a631b1
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 6 months