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>
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>
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>
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
oVirt Jenkins CI Server has posted comments on this change.
Change subject: xmlrpc: marshalling of Long type
......................................................................
Patch Set 3:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/13410/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/13249/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/12459/ : FAILURE
--
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
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