Change in vdsm[master]: migration: added support for convergance schedule
by tjelinek@redhat.com
Tomas Jelinek has posted comments on this change.
Change subject: migration: added support for convergance schedule
......................................................................
Patch Set 4:
(1 comment)
https://gerrit.ovirt.org/#/c/46940/4/vdsm/virt/migration.py
File vdsm/virt/migration.py:
Line 399: self._vm.log.info('starting migration to %s '
Line 400: 'with miguri %s', duri, muri)
Line 401:
Line 402: self._monitorThread = MonitorThread(self._vm, startTime, self._convergenceSchedule)
Line 403: self._do_perform_migration(self, duri, muri)
> Disclosure: I actually missed the _do in the first review :)
hmm, not sure how though. I see this options:
1: in ctor replace the _perform_migration with the decorated version of it (can not really use decorators because I need access to self). so here it would be just self._perform_migration(duri, muri) - but it will not be too explicit that a different method is actually called
2: inline it (as it was before)
3: use OO way (e.g. have a base class doing the base _perform_migration() and two children which will extend it differently) (I guess it is not pythonic ;) )
4: use some magic I don't know :)
So I guess the 4 is the way to go. What you think?
Line 404:
Line 405: self.log.info("migration took %d seconds to complete",
Line 406: (time.time() - startTime) + destCreationTime)
Line 407:
--
To view, visit https://gerrit.ovirt.org/46940
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I989cff12d08ef1cab36bd10df7daaa999a8dac14
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: Yes
8 years, 6 months
Change in vdsm[ovirt-3.6]: ssl: runtime config to choose implementation
by automation@ovirt.org
automation(a)ovirt.org has posted comments on this change.
Change subject: ssl: runtime config to choose implementation
......................................................................
Patch Set 2:
* Update tracker::IGNORE, no Bug-Url found
* Set MODIFIED::IGNORE, no Bug-Url found.
--
To view, visit https://gerrit.ovirt.org/47712
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I9881d11e30ced9c34bfe602bba3d968f57e0fe15
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
8 years, 6 months
Change in vdsm[ovirt-3.6]: ssl: runtime config to choose implementation
by ybronhei@redhat.com
Yaniv Bronhaim has submitted this change and it was merged.
Change subject: ssl: runtime config to choose implementation
......................................................................
ssl: runtime config to choose implementation
During build process we provide which ssl implementation is set as
default depending on distribution we are building for. We can change the
configuration value used in runtime by updating config.py. Vdsm reboot
is required after the update. There are two options supported
- m2c - m2crypto is used
- ssl - standard ssl module is used
For debian we only support standard ssl module.
Change-Id: I9881d11e30ced9c34bfe602bba3d968f57e0fe15
Reviewed-on: https://gerrit.ovirt.org/44689
Signed-off-by: pkliczewski <piotr.kliczewski(a)gmail.com>
Reviewed-on: https://gerrit.ovirt.org/47712
Continuous-Integration: Jenkins CI
Reviewed-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M debian/rules
M debian/vdsm-python.install
M lib/vdsm/Makefile.am
M lib/vdsm/config.py.in
M lib/vdsm/jsonrpcvdscli.py
M lib/vdsm/m2cutils.py
A lib/vdsm/sslcompat.py
A lib/vdsm/sslutils.py
M lib/vdsm/utils.py
M lib/vdsm/vdscli.py
M lib/yajsonrpc/betterAsyncore.py
M lib/yajsonrpc/stompreactor.py
M tests/crossImportsTests.py.in
M tests/integration/Makefile.am
M tests/integration/jsonRpcHelper.py
M tests/integration/m2chelper.py
A tests/integration/sslhelper.py
M tests/protocoldetectorTests.py
M tests/sslTests.py
M tests/stompTests.py
M tests/vdscliTests.py
M vdsm.spec.in
M vdsm/clientIF.py
M vdsm/kaxmlrpclib.py
M vdsm/protocoldetector.py
M vdsm/virt/migration.py
26 files changed, 590 insertions(+), 98 deletions(-)
Approvals:
Piotr Kliczewski: Verified
Yaniv Bronhaim: Looks good to me, approved
Jenkins CI: Passed CI tests
--
To view, visit https://gerrit.ovirt.org/47712
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9881d11e30ced9c34bfe602bba3d968f57e0fe15
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
8 years, 6 months
Change in vdsm[ovirt-3.6]: m2c: rename m2c modules
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: m2c: rename m2c modules
......................................................................
m2c: rename m2c modules
In preparation for configurable usage ssl or m2crypto modules we need
to distinguish modules which use m2c.
Change-Id: I3fa842cb7a1ac0b2593df6f6fe67eee118a50616
Reviewed-on: https://gerrit.ovirt.org/44493
Signed-off-by: pkliczewski <piotr.kliczewski(a)gmail.com>
---
M debian/vdsm-python.install
M lib/vdsm/Makefile.am
M lib/vdsm/jsonrpcvdscli.py
R lib/vdsm/m2cutils.py
M lib/vdsm/vdscli.py
M lib/yajsonrpc/betterAsyncore.py
M lib/yajsonrpc/stompreactor.py
M tests/Makefile.am
M tests/integration/Makefile.am
M tests/integration/jsonRpcHelper.py
R tests/integration/m2chelper.py
M tests/protocoldetectorTests.py
M tests/sslTests.py
M tests/stompTests.py
M tests/vdscliTests.py
M vdsm.spec.in
M vdsm/clientIF.py
M vdsm/kaxmlrpclib.py
M vdsm/protocoldetector.py
M vdsm/virt/migration.py
20 files changed, 38 insertions(+), 37 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/11/47711/1
diff --git a/debian/vdsm-python.install b/debian/vdsm-python.install
index 3770ce7..8ecb62f 100644
--- a/debian/vdsm-python.install
+++ b/debian/vdsm-python.install
@@ -12,6 +12,7 @@
./usr/lib/python2.7/dist-packages/vdsm/ipwrapper.py
./usr/lib/python2.7/dist-packages/vdsm/jsonrpcvdscli.py
./usr/lib/python2.7/dist-packages/vdsm/libvirtconnection.py
+./usr/lib/python2.7/dist-packages/vdsm/m2cutils.py
./usr/lib/python2.7/dist-packages/vdsm/netconfpersistence.py
./usr/lib/python2.7/dist-packages/vdsm/netinfo.py
./usr/lib/python2.7/dist-packages/vdsm/netlink/__init__.py
@@ -29,7 +30,6 @@
./usr/lib/python2.7/dist-packages/vdsm/qemuimg.py
./usr/lib/python2.7/dist-packages/vdsm/response.py
./usr/lib/python2.7/dist-packages/vdsm/schedule.py
-./usr/lib/python2.7/dist-packages/vdsm/sslutils.py
./usr/lib/python2.7/dist-packages/vdsm/supervdsm.py
./usr/lib/python2.7/dist-packages/vdsm/taskset.py
./usr/lib/python2.7/dist-packages/vdsm/tool/__init__.py
diff --git a/lib/vdsm/Makefile.am b/lib/vdsm/Makefile.am
index c9986bf..cf383b9 100644
--- a/lib/vdsm/Makefile.am
+++ b/lib/vdsm/Makefile.am
@@ -32,6 +32,7 @@
ipwrapper.py \
jsonrpcvdscli.py \
libvirtconnection.py \
+ m2cutils.py \
netconfpersistence.py \
netinfo.py \
password.py \
@@ -39,7 +40,6 @@
qemuimg.py \
response.py \
schedule.py \
- sslutils.py \
sysctl.py \
taskset.py \
udevadm.py \
diff --git a/lib/vdsm/jsonrpcvdscli.py b/lib/vdsm/jsonrpcvdscli.py
index eeab1df..1687b6f 100644
--- a/lib/vdsm/jsonrpcvdscli.py
+++ b/lib/vdsm/jsonrpcvdscli.py
@@ -22,7 +22,7 @@
from uuid import uuid4
import socket
-from . import sslutils
+from . import m2cutils
from yajsonrpc import stompreactor
from yajsonrpc import \
JsonRpcRequest, \
@@ -95,7 +95,7 @@
useSSL = config.getboolean('vars', 'ssl')
if useSSL:
- sslctx = sslutils.create_ssl_context()
+ sslctx = m2cutils.create_ssl_context()
else:
sslctx = None
diff --git a/lib/vdsm/sslutils.py b/lib/vdsm/m2cutils.py
similarity index 100%
rename from lib/vdsm/sslutils.py
rename to lib/vdsm/m2cutils.py
diff --git a/lib/vdsm/vdscli.py b/lib/vdsm/vdscli.py
index e0c7a13..a78a67a 100644
--- a/lib/vdsm/vdscli.py
+++ b/lib/vdsm/vdscli.py
@@ -26,7 +26,7 @@
import re
import sys
from xml.parsers.expat import ExpatError
-from . import sslutils
+from . import m2cutils
_USE_SSL = False
@@ -60,7 +60,7 @@
self.timeout = kwargs['timeout']
del kwargs['timeout']
else:
- self.timeout = sslutils.SOCKET_DEFAULT_TIMEOUT
+ self.timeout = m2cutils.SOCKET_DEFAULT_TIMEOUT
xmlrpclib.Transport.__init__(self, *args, **kwargs)
@@ -107,8 +107,8 @@
def connect(hostPort=None, useSSL=None, tsPath=None,
- TransportClass=sslutils.VerifyingSafeTransport,
- timeout=sslutils.SOCKET_DEFAULT_TIMEOUT):
+ TransportClass=m2cutils.VerifyingSafeTransport,
+ timeout=m2cutils.SOCKET_DEFAULT_TIMEOUT):
hostPort = cannonizeHostPort(hostPort)
if useSSL is None:
diff --git a/lib/yajsonrpc/betterAsyncore.py b/lib/yajsonrpc/betterAsyncore.py
index 3d43ffb..6edfdd2 100644
--- a/lib/yajsonrpc/betterAsyncore.py
+++ b/lib/yajsonrpc/betterAsyncore.py
@@ -22,7 +22,7 @@
import socket
from errno import EWOULDBLOCK
-from vdsm.sslutils import SSL
+from vdsm.m2cutils import SSL
from vdsm.infra.eventfd import EventFD
diff --git a/lib/yajsonrpc/stompreactor.py b/lib/yajsonrpc/stompreactor.py
index 57237c9..66a096d 100644
--- a/lib/yajsonrpc/stompreactor.py
+++ b/lib/yajsonrpc/stompreactor.py
@@ -23,7 +23,7 @@
from vdsm import utils
from vdsm.config import config
from vdsm.compat import json
-from vdsm.sslutils import SSLSocket
+from vdsm.m2cutils import SSLSocket
from . import JsonRpcClient, JsonRpcServer
from . import stomp
from .betterAsyncore import Dispatcher, Reactor
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9e52a08..1b33ef8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -94,7 +94,6 @@
schemaValidationTest.py \
securableTests.py \
sourceroutingTests.py \
- sslhelper.py \
sslTests.py \
stompTests.py \
storageMailboxTests.py \
diff --git a/tests/integration/Makefile.am b/tests/integration/Makefile.am
index 9de3a3c..525ddd8 100644
--- a/tests/integration/Makefile.am
+++ b/tests/integration/Makefile.am
@@ -24,4 +24,5 @@
__init__.py \
jsonRpcHelper.py \
jsonRpcTests.py \
+ m2chelper.py \
$(NULL)
diff --git a/tests/integration/jsonRpcHelper.py b/tests/integration/jsonRpcHelper.py
index b456bff..65ec5e3 100644
--- a/tests/integration/jsonRpcHelper.py
+++ b/tests/integration/jsonRpcHelper.py
@@ -37,7 +37,7 @@
from protocoldetector import MultiProtocolAcceptor
from rpc.bindingjsonrpc import BindingJsonRpc
from vdsm import utils
-from sslhelper import DEAFAULT_SSL_CONTEXT
+from m2chelper import DEAFAULT_SSL_CONTEXT
PERMUTATIONS = tuple(product((True, False), ("xml", "stomp")))
diff --git a/tests/sslhelper.py b/tests/integration/m2chelper.py
similarity index 90%
rename from tests/sslhelper.py
rename to tests/integration/m2chelper.py
index 05e657c..77a2767 100644
--- a/tests/sslhelper.py
+++ b/tests/integration/m2chelper.py
@@ -19,9 +19,9 @@
#
import os
-from vdsm.sslutils import SSLContext
+from vdsm.m2cutils import SSLContext
-CERT_DIR = os.path.abspath(os.path.dirname(__file__))
+CERT_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
CRT_FILE = os.path.join(CERT_DIR, "server.crt")
KEY_FILE = os.path.join(CERT_DIR, "server.key")
OTHER_CRT_FILE = os.path.join(CERT_DIR, "other.crt")
diff --git a/tests/protocoldetectorTests.py b/tests/protocoldetectorTests.py
index 695bd76..f90eb43 100644
--- a/tests/protocoldetectorTests.py
+++ b/tests/protocoldetectorTests.py
@@ -26,9 +26,9 @@
from contextlib import contextmanager
from yajsonrpc.betterAsyncore import Reactor
-from vdsm import sslutils
+from vdsm import m2cutils
from protocoldetector import MultiProtocolAcceptor
-from sslhelper import KEY_FILE, CRT_FILE
+from integration.m2chelper import KEY_FILE, CRT_FILE
from testlib import VdsmTestCase, expandPermutations, permutations
@@ -97,7 +97,7 @@
GRACETIME = 0.5
CONCURRENCY = 5
PERMUTATIONS = ((False,), (True,))
- SSLCTX = sslutils.SSLContext(CRT_FILE, KEY_FILE, ca_cert=CRT_FILE)
+ SSLCTX = m2cutils.SSLContext(CRT_FILE, KEY_FILE, ca_cert=CRT_FILE)
BUFSIZE = 512
def setUp(self):
diff --git a/tests/sslTests.py b/tests/sslTests.py
index fde917d..b40f263 100644
--- a/tests/sslTests.py
+++ b/tests/sslTests.py
@@ -32,10 +32,11 @@
from contextlib import contextmanager, closing
from M2Crypto import SSL
-from sslhelper import KEY_FILE, CRT_FILE, OTHER_KEY_FILE, OTHER_CRT_FILE
+from integration.m2chelper import KEY_FILE, \
+ CRT_FILE, OTHER_KEY_FILE, OTHER_CRT_FILE
from testlib import VdsmTestCase as TestCaseBase
-from vdsm.sslutils import SSLServerSocket
-from vdsm.sslutils import VerifyingSafeTransport
+from vdsm.m2cutils import SSLServerSocket
+from vdsm.m2cutils import VerifyingSafeTransport
HOST = '127.0.0.1'
diff --git a/tests/stompTests.py b/tests/stompTests.py
index 1342391..3b38c95 100644
--- a/tests/stompTests.py
+++ b/tests/stompTests.py
@@ -26,7 +26,7 @@
dummyTextGenerator
from integration.jsonRpcHelper import constructAcceptor
-from sslhelper import DEAFAULT_SSL_CONTEXT
+from integration.m2chelper import DEAFAULT_SSL_CONTEXT
from yajsonrpc.stompreactor import StandAloneRpcClient
from vdsm.utils import running
diff --git a/tests/vdscliTests.py b/tests/vdscliTests.py
index 7a80163..ba2cf36 100644
--- a/tests/vdscliTests.py
+++ b/tests/vdscliTests.py
@@ -30,7 +30,7 @@
from testlib import VdsmTestCase as TestCaseBase
from testValidation import ValidateRunningAsRoot
-from vdsm import sslutils
+from vdsm import m2cutils
from vdsm import vdscli
HOST = '127.0.0.1'
@@ -51,7 +51,7 @@
if useSSL:
KEY_FILE = os.path.join(path, 'keys/vdsmkey.pem')
CRT_FILE = os.path.join(path, 'certs/vdsmcert.pem')
- self.server.socket = sslutils.SSLServerSocket(
+ self.server.socket = m2cutils.SSLServerSocket(
raw=self.server.socket,
keyfile=KEY_FILE,
certfile=CRT_FILE,
@@ -74,7 +74,7 @@
@contextmanager
def setupclient(useSSL, tsPath,
- timeout=sslutils.SOCKET_DEFAULT_TIMEOUT):
+ timeout=m2cutils.SOCKET_DEFAULT_TIMEOUT):
server = TestServer(useSSL, tsPath)
server.start()
hostPort = '0:' + str(server.port)
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 95702c6..e6880d0 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -1053,6 +1053,7 @@
%{python_sitelib}/%{vdsm_name}/ipwrapper.py*
%{python_sitelib}/%{vdsm_name}/jsonrpcvdscli.py*
%{python_sitelib}/%{vdsm_name}/libvirtconnection.py*
+%{python_sitelib}/%{vdsm_name}/m2cutils.py*
%{python_sitelib}/%{vdsm_name}/netinfo.py*
%{python_sitelib}/%{vdsm_name}/netlink/__init__.py*
%{python_sitelib}/%{vdsm_name}/netlink/addr.py*
@@ -1070,7 +1071,6 @@
%{python_sitelib}/%{vdsm_name}/response.py*
%{python_sitelib}/%{vdsm_name}/netconfpersistence.py*
%{python_sitelib}/%{vdsm_name}/schedule.py*
-%{python_sitelib}/%{vdsm_name}/sslutils.py*
%{python_sitelib}/%{vdsm_name}/sysctl.py*
%{python_sitelib}/%{vdsm_name}/taskset.py*
%{python_sitelib}/%{vdsm_name}/udevadm.py*
diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index 7b9c490..69d7061 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -37,7 +37,7 @@
from vdsm.compat import pickle
from vdsm.define import doneCode, errCode
import libvirt
-from vdsm import sslutils
+from vdsm import m2cutils
from vdsm import libvirtconnection
from vdsm import constants
from vdsm import utils
@@ -193,7 +193,7 @@
return cls._instance
def _createAcceptor(self, host, port):
- sslctx = sslutils.create_ssl_context()
+ sslctx = m2cutils.create_ssl_context()
self._reactor = Reactor()
self._acceptor = MultiProtocolAcceptor(self._reactor, host,
@@ -205,7 +205,7 @@
broker_port = config.getint('addresses', 'broker_port')
request_queues = config.get('addresses', 'request_queues')
- sslctx = sslutils.create_ssl_context()
+ sslctx = m2cutils.create_ssl_context()
sock = socket.socket()
sock.connect((broker_address, broker_port))
if sslctx:
diff --git a/vdsm/kaxmlrpclib.py b/vdsm/kaxmlrpclib.py
index 6374726..b38031e 100644
--- a/vdsm/kaxmlrpclib.py
+++ b/vdsm/kaxmlrpclib.py
@@ -110,7 +110,7 @@
###################
# the same, for ssl
-from vdsm import sslutils
+from vdsm import m2cutils
import ssl
@@ -122,7 +122,7 @@
SslServerProxy = SslServer
-class TcpkeepSafeTransport(sslutils.VerifyingSafeTransport):
+class TcpkeepSafeTransport(m2cutils.VerifyingSafeTransport):
def make_connection(self, host):
chost, self._extra_headers, x509 = self.get_host_info(host)
@@ -139,17 +139,17 @@
cert_reqs=self.cert_reqs)
-class TcpkeepHTTPSConnection(sslutils.VerifyingHTTPSConnection):
+class TcpkeepHTTPSConnection(m2cutils.VerifyingHTTPSConnection):
def __init__(self, host, port=None, key_file=None, cert_file=None,
strict=None, timeout=CONNECTTIMEOUT,
ca_certs=None, cert_reqs=ssl.CERT_REQUIRED):
- sslutils.VerifyingHTTPSConnection.__init__(
+ m2cutils.VerifyingHTTPSConnection.__init__(
self, host, port=port, key_file=key_file, cert_file=cert_file,
strict=strict, timeout=timeout,
ca_certs=ca_certs, cert_reqs=cert_reqs)
def connect(self):
- sslutils.VerifyingHTTPSConnection.connect(self)
+ m2cutils.VerifyingHTTPSConnection.connect(self)
# after TCP_KEEPIDLE seconds of silence, TCP_KEEPCNT probes would be
# sent, TCP_KEEPINTVL seconds apart of each other. If all of them fail,
@@ -160,5 +160,5 @@
self.sock.setsockopt(socket.SOL_TCP, socket.TCP_KEEPCNT, KEEPCNT)
-class TcpkeepHTTPS(sslutils.VerifyingHTTPS):
+class TcpkeepHTTPS(m2cutils.VerifyingHTTPS):
_connection_class = TcpkeepHTTPSConnection
diff --git a/vdsm/protocoldetector.py b/vdsm/protocoldetector.py
index bf4daa2..6d01a1c 100644
--- a/vdsm/protocoldetector.py
+++ b/vdsm/protocoldetector.py
@@ -24,7 +24,7 @@
import vdsm.infra.filecontrol as filecontrol
from vdsm.utils import monotonic_time
-from vdsm.sslutils import SSLHandshakeDispatcher
+from vdsm.m2cutils import SSLHandshakeDispatcher
def _create_socket(host, port):
diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index a3e5027..32caccb 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -28,7 +28,7 @@
from vdsm import utils
from vdsm import vdscli
from vdsm import jsonrpcvdscli
-from vdsm import sslutils
+from vdsm import m2cutils
from vdsm.compat import pickle
from vdsm.config import config
from vdsm.define import NORMAL, Mbytes
@@ -125,7 +125,7 @@
return self.status
def _createClient(self, port):
- sslctx = sslutils.create_ssl_context()
+ sslctx = m2cutils.create_ssl_context()
client_socket = utils.create_connected_socket(
self.remoteHost, int(port), sslctx)
return self._vm.cif.createStompClient(client_socket)
--
To view, visit https://gerrit.ovirt.org/47711
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3fa842cb7a1ac0b2593df6f6fe67eee118a50616
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
8 years, 6 months
Change in vdsm[master]: Raise python-cpopen requirement to 1.4
by ybronhei@redhat.com
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Raise python-cpopen requirement to 1.4
......................................................................
Raise python-cpopen requirement to 1.4
Change-Id: I4c5d62281cfba20eed51f9960065b192f7a209d3
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1264667
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/46724/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index bced975..e63936e 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -88,7 +88,7 @@
BuildRequires: openssl
BuildRequires: policycoreutils-python
BuildRequires: psmisc
-BuildRequires: python-cpopen >= 1.3
+BuildRequires: python-cpopen >= 1.4
BuildRequires: python-inotify
BuildRequires: python-ioprocess >= 0.14
BuildRequires: python-pthreading
@@ -121,7 +121,7 @@
Requires: python-netaddr
Requires: python-inotify
Requires: python-argparse
-Requires: python-cpopen >= 1.3
+Requires: python-cpopen >= 1.4
Requires: python-ioprocess >= 0.14
Requires: python-pthreading >= 0.1.3-3
Requires: python-six
@@ -298,7 +298,7 @@
%package python
Summary: VDSM python libraries
Requires: %{name}-infra = %{version}-%{release}
-Requires: python-cpopen >= 1.2.3-5
+Requires: python-cpopen >= 1.4
Requires: m2crypto
Requires: python-ioprocess >= 0.14
--
To view, visit https://gerrit.ovirt.org/46724
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c5d62281cfba20eed51f9960065b192f7a209d3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
8 years, 6 months
Change in vdsm[ovirt-3.6]: ssl: change default protocol
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: ssl: change default protocol
......................................................................
ssl: change default protocol
We used 'sslv23' but when Paddle (CVE-2014-3566) was found it
is recommended to switch to 'tlsv1'. On some of the OSes we
see issues that it is already sslv3 is disabled and users need
to switch to tls.
There is an issue when we switch to tls older engines (<= 3.0)
are not able to talk to vdsm anymore.
Change-Id: I40267cb07b19d444c7d85aba6d1160c27e8fe3a6
Signed-off-by: pkliczewski <piotr.kliczewski(a)gmail.com>
Bug-Url: https://bugzilla.redhat.com/1229765
Reviewed-on: https://gerrit.ovirt.org/43457
Continuous-Integration: Jenkins CI
Reviewed-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/config.py.in
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/32/47832/1
diff --git a/lib/vdsm/config.py.in b/lib/vdsm/config.py.in
index 9b2d99b..490669b 100644
--- a/lib/vdsm/config.py.in
+++ b/lib/vdsm/config.py.in
@@ -202,7 +202,7 @@
('transient_disks_repository', '@VDSMLIBDIR@/transient',
'Local path to the transient disks repository.'),
- ('ssl_protocol', 'sslv23',
+ ('ssl_protocol', 'tlsv1',
'SSL protocol used by encrypted connection'),
('connection_stats_timeout', '3600',
--
To view, visit https://gerrit.ovirt.org/47832
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I40267cb07b19d444c7d85aba6d1160c27e8fe3a6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
8 years, 6 months
Change in vdsm[master]: sampling: remove overcautious cpu count check
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: sampling: remove overcautious cpu count check
......................................................................
sampling: remove overcautious cpu count check
It is very unlikely SC_NPROCESSORS_ONLN will ever be
less than 1. The existing defensive code is more likely
to hide a bug somewhere else.
Change-Id: I0a732c0584f487f513b8445c227bccfaab9f92ab
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/sampling.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/91/47991/1
diff --git a/vdsm/virt/sampling.py b/vdsm/virt/sampling.py
index 91a8864..70ea2a4 100644
--- a/vdsm/virt/sampling.py
+++ b/vdsm/virt/sampling.py
@@ -247,7 +247,7 @@
super(HostSample, self).__init__()
self.interfaces = _get_interfaces_and_samples()
self.pidcpu = PidCpuSample(pid)
- self.ncpus = max(os.sysconf('SC_NPROCESSORS_ONLN'), 1)
+ self.ncpus = os.sysconf('SC_NPROCESSORS_ONLN')
self.totcpu = TotalCpuSample()
meminfo = utils.readMemInfo()
freeOrCached = (meminfo['MemFree'] +
--
To view, visit https://gerrit.ovirt.org/47991
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a732c0584f487f513b8445c227bccfaab9f92ab
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 6 months
Change in vdsm[master]: sampling: add 'ncpus' property to HostSample
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: sampling: add 'ncpus' property to HostSample
......................................................................
sampling: add 'ncpus' property to HostSample
to decouple HostStatsThread and hoststats.produce().
Change-Id: I0e7d549b7772e3f38eec2dd9b91bbc6416b549bf
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/hoststats.py
M vdsm/virt/sampling.py
2 files changed, 7 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/42035/1
diff --git a/vdsm/virt/hoststats.py b/vdsm/virt/hoststats.py
index 57c6954..7a23743 100644
--- a/vdsm/virt/hoststats.py
+++ b/vdsm/virt/hoststats.py
@@ -26,7 +26,7 @@
import v2v
-def produce(ncpus, first_sample, last_sample):
+def produce(first_sample, last_sample):
stats = _empty_stats()
if first_sample is None:
@@ -45,10 +45,10 @@
jiffies = (
last_sample.totcpu.user - first_sample.totcpu.user) % (2 ** 32)
- stats['cpuUser'] = jiffies / interval / ncpus
+ stats['cpuUser'] = jiffies / interval / last_sample.ncpus
jiffies = (
last_sample.totcpu.sys - first_sample.totcpu.sys) % (2 ** 32)
- stats['cpuSys'] = jiffies / interval / ncpus
+ stats['cpuSys'] = jiffies / interval / last_sample.ncpus
stats['cpuIdle'] = max(0.0,
100.0 - stats['cpuUser'] - stats['cpuSys'])
stats['memUsed'] = last_sample.memUsed
diff --git a/vdsm/virt/sampling.py b/vdsm/virt/sampling.py
index 5729a54..401bae9 100644
--- a/vdsm/virt/sampling.py
+++ b/vdsm/virt/sampling.py
@@ -232,7 +232,7 @@
d[p] = {'free': str(free)}
return d
- def __init__(self, pid):
+ def __init__(self, pid, ncpus):
"""
Initialize a HostSample.
@@ -242,6 +242,7 @@
super(HostSample, self).__init__()
self.interfaces = _get_interfaces_and_samples()
self.pidcpu = PidCpuSample(pid)
+ self.ncpus = ncpus
self.totcpu = TotalCpuSample()
meminfo = utils.readMemInfo()
freeOrCached = (meminfo['MemFree'] +
@@ -553,7 +554,7 @@
time.sleep(self._sampleInterval)
while not self._stopEvent.isSet():
try:
- sample = HostSample(self._pid)
+ sample = HostSample(self._pid, self._ncpus)
self._samples.append(sample)
second_last = self._samples.last(nth=2)
if second_last is None:
@@ -571,7 +572,7 @@
def get(self):
first_sample, last_sample, _ = self._samples.stats()
- return hoststats.produce(self._ncpus, first_sample, last_sample)
+ return hoststats.produce(first_sample, last_sample)
def _getLinkSpeed(dev):
--
To view, visit https://gerrit.ovirt.org/42035
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e7d549b7772e3f38eec2dd9b91bbc6416b549bf
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 6 months
Change in vdsm[master]: periodic: document missing VmDispatcher argument
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: periodic: document missing VmDispatcher argument
......................................................................
periodic: document missing VmDispatcher argument
We forget to document the 'timeout' argument
of VmDispatcher's __init__.
Change-Id: I6c608729d5bb0f2bab0e9647134a8a88a99f5a5e
Documentation-Only: yes
Backport-To: 3.6
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/periodic.py
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/42/47942/1
diff --git a/vdsm/virt/periodic.py b/vdsm/virt/periodic.py
index 13d7632..632f0ce 100644
--- a/vdsm/virt/periodic.py
+++ b/vdsm/virt/periodic.py
@@ -210,6 +210,8 @@
executor: executor.Executor instance
create: callable to obtain the real callable to
dispatch, with its timeout
+ timeout: per-vm operation timeout, in seconds
+ (fractions allowed).
"""
self._get_vms = get_vms
self._executor = executor
--
To view, visit https://gerrit.ovirt.org/47942
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c608729d5bb0f2bab0e9647134a8a88a99f5a5e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 6 months
Change in vdsm[master]: sampling: rename attributes for clarity
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: sampling: rename attributes for clarity
......................................................................
sampling: rename attributes for clarity
VMBulkSampler has one ExpiringCache to track VMs/Domains believed
to be stuck, in order to avoid further clogging.
Due to an old mistake, the 'ttl' of this cache was set using a variable
named 'timeout'. The choice of names is unfortunate and source of
confusion.
This patch fixes that.
Change-Id: Ida543cf6f41e6e7a0b99277eb447117115fb4df1
Rename-Only: yes
Backport-To: 3.6
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/sampling.py
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/93/47893/1
diff --git a/vdsm/virt/sampling.py b/vdsm/virt/sampling.py
index 68d8330..fca36c9 100644
--- a/vdsm/virt/sampling.py
+++ b/vdsm/virt/sampling.py
@@ -475,17 +475,17 @@
# a multiple of known timeout and period:
# - vm sampling period is 15s (we control that)
# - libvirt (default) qemu monitor timeout is 30s (we DON'T contol this)
-_TIMEOUT = 40.0
+_TTL = 40.0
class VMBulkSampler(object):
def __init__(self, conn, get_vms, stats_cache,
- stats_flags=0, timeout=_TIMEOUT):
+ stats_flags=0, ttl=_TTL):
self._conn = conn
self._get_vms = get_vms
self._stats_cache = stats_cache
self._stats_flags = stats_flags
- self._skip_doms = ExpiringCache(timeout)
+ self._skip_doms = ExpiringCache(ttl)
self._sampling = threading.Semaphore() # used as glorified counter
self._log = logging.getLogger("virt.sampling.VMBulkSampler")
--
To view, visit https://gerrit.ovirt.org/47893
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida543cf6f41e6e7a0b99277eb447117115fb4df1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 6 months