Change in vdsm[master]: schema: nit schema fix
by lvroyce@linux.vnet.ibm.com
Royce Lv has uploaded a new change for review.
Change subject: schema: nit schema fix
......................................................................
schema: nit schema fix
Change-Id: Ic24083ece5facab57a6f2f71aa150a8b02e82b0f
Signed-off-by: Royce Lv<lvroyce(a)linux.vnet.ibm.com>
---
M vdsm_api/vdsmapi-schema.json
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/50/9150/1
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index d210c7d..4c5997d 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -176,7 +176,7 @@
{'type': 'SetupNetworkNetAttributes',
'data': {'*vlan': 'str', '*bonding': 'str', '*nic': ['str'], '*ipaddr': 'str',
'*netmask': 'str', '*gateway': 'str', '*bootproto': 'str',
- '*delay': 'uint', '*onboot': 'bool', 'remove': 'bool'}}
+ '*delay': 'uint', '*onboot': 'bool', '*remove': 'bool'}}
##
# @SetupNetworkBondAttributes:
--
To view, visit http://gerrit.ovirt.org/9150
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic24083ece5facab57a6f2f71aa150a8b02e82b0f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
11 years, 6 months
Change in vdsm[master]: mom: Redirect mom init stacktrace to debug log
by agl@us.ibm.com
Adam Litke has uploaded a new change for review.
Change subject: mom: Redirect mom init stacktrace to debug log
......................................................................
mom: Redirect mom init stacktrace to debug log
When MOM initialization fails we are currently falling back to the old
KsmMonitor. When this happens we print a warning which is appropriate. Since
the error is handled, we should not print the stack trace at warning level.
This information is useful in debug mode however.
Split the stack trace printout into a separate debug logging message.
Change-Id: I8e85fafadd3e9180b6c5911baa6552b380476e3c
Signed-off-by: Adam Litke <agl(a)us.ibm.com>
---
M vdsm/clientIF.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/9271/1
diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index 38aa0d7..ed3a0f0 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -194,7 +194,8 @@
self.mom = MomThread(momconf)
except:
self.log.warn("MOM initialization failed and fall "
- "back to KsmMonitor", exc_info=True)
+ "back to KsmMonitor")
+ self.log.debug("Details:", exc_info=True)
self.ksmMonitor = ksm.KsmMonitorThread(self)
def _syncLibvirtNetworks(self):
--
To view, visit http://gerrit.ovirt.org/9271
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e85fafadd3e9180b6c5911baa6552b380476e3c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <agl(a)us.ibm.com>
11 years, 6 months
Change in vdsm[master]: sslTests: fix parallel build in Jenkins
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has uploaded a new change for review.
Change subject: sslTests: fix parallel build in Jenkins
......................................................................
sslTests: fix parallel build in Jenkins
sslTests uses a fixed port for binding socket. When it is run in
parallel Jenkins builds, it will fail with port conflicts.
This patch tries to find new available port if the default port is
occupied.
Change-Id: Ia8510eb418de1b045d362231dee24a994ca936ac
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M tests/sslTests.py
1 file changed, 19 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/9254/1
diff --git a/tests/sslTests.py b/tests/sslTests.py
index 1216acc..a9dc396 100644
--- a/tests/sslTests.py
+++ b/tests/sslTests.py
@@ -24,6 +24,7 @@
import tempfile
import threading
import subprocess
+import errno
import testrunner
import SecureXMLRPCServer
@@ -104,12 +105,28 @@
keyfile=self.keyfile,
certfile=self.certfile,
ca_certs=self.certfile)
- self.server.bind(ADDRESS)
+ self.address = self.tryBind(ADDRESS)
self.server.listen(5)
# Start the server thread:
self.thread = SSLServerThread(self.server)
self.thread.start()
+
+ def tryBind(self, address):
+ ipadd, port = address
+ while True:
+ try:
+ self.server.bind((ipadd, port))
+ return (ipadd, port)
+ except socket.error as ex:
+ if ex.errno == errno.EADDRINUSE:
+ port += 1
+ if port > 65535:
+ raise socket.error(
+ errno.EADDRINUSE,
+ "Can not find available port to bind")
+ else:
+ raise
def tearDown(self):
"""Release the resources used by the tests.
@@ -152,7 +169,7 @@
command = [
"openssl",
"s_client",
- "-connect", "%s:%d" % ADDRESS,
+ "-connect", "%s:%d" % self.address,
]
if args:
command += args
--
To view, visit http://gerrit.ovirt.org/9254
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8510eb418de1b045d362231dee24a994ca936ac
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
11 years, 6 months
Change in vdsm[master]: build: Add BuildDepends for m2crypto
by agl@us.ibm.com
Adam Litke has uploaded a new change for review.
Change subject: build: Add BuildDepends for m2crypto
......................................................................
build: Add BuildDepends for m2crypto
During the build, I get the following traceback:
Traceback (most recent call last):
File "../tests/testrunner.py", line 274, in <module>
hackVdsmModule()
File "../tests/testrunner.py", line 252, in hackVdsmModule
sub = __import__(name, globals(), locals(), [], -1)
File "/home/aglitke/rpmbuild/BUILD/vdsm-4.10.2/vdsm/SecureXMLRPCServer.py",
line 39, in <module>
from M2Crypto import SSL, X509
ImportError: No module named M2Crypto
We need the m2crypto package at build time now as well (in order to run tests).
Change-Id: I4bfe0c6ca979f868be665d48bce395c896bec1f7
Signed-off-by: Adam Litke <agl(a)us.ibm.com>
---
M vdsm.spec.in
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/53/9253/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 20ad1dc..9ba254f 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -42,6 +42,7 @@
BuildRequires: libvirt-python
BuildRequires: genisoimage
BuildRequires: openssl
+BuildRequires: m2crypto
%if 0%{?rhel}
BuildRequires: python-ordereddict
%endif
--
To view, visit http://gerrit.ovirt.org/9253
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4bfe0c6ca979f868be665d48bce395c896bec1f7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <agl(a)us.ibm.com>
11 years, 6 months
Change in vdsm[master]: fix two command names of Image class in vdsmapi schema
by shaohef@linux.vnet.ibm.com
ShaoHe Feng has uploaded a new change for review.
Change subject: fix two command names of Image class in vdsmapi schema
......................................................................
fix two command names of Image class in vdsmapi schema
these two command names do not match the their comments
Change-Id: Ia5f75ea62f66771c1e3001a565d24eacf791c473
Signed-off-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
---
M vdsm_api/vdsmapi-schema.json
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/13/9113/1
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index d210c7d..dc62be2 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -2930,7 +2930,7 @@
#
# Since: 4.11.0
##
-{'command': {'class': 'Image', 'name': 'sync'},
+{'command': {'class': 'Image', 'name': 'cloneStructure'},
'data': {'dstSdUUID': 'UUID'},
'returns': 'UUID'}
@@ -2948,7 +2948,7 @@
#
# Since: 4.11.0
##
-{'command': {'class': 'Image', 'name': 'sync'},
+{'command': {'class': 'Image', 'name': 'syncData'},
'data': {'dstSdUUID': 'UUID', 'syncType': 'syncType'},
'returns': 'UUID'}
--
To view, visit http://gerrit.ovirt.org/9113
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5f75ea62f66771c1e3001a565d24eacf791c473
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
11 years, 6 months
Change in vdsm[master]: Not remove volumeless or inexistent images.
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: Not remove volumeless or inexistent images.
......................................................................
Not remove volumeless or inexistent images.
Change-Id: I04af8d9ece52a1973180dc77991364785516a02a
Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=876115
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/image.py
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/44/9244/1
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index 73274fe..0265dcc 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -36,6 +36,8 @@
import resourceFactories
import resourceManager as rm
import outOfProcess as oop
+
+log = logging.getLogger('Storage.Image')
rmanager = rm.ResourceManager.getInstance()
# Disk type
@@ -74,7 +76,10 @@
"""
allVols = dom.getAllVolumes()
imgVols = sd.getVolsOfImage(allVols, imgUUID)
- if postZero:
+ if not imgVols:
+ log.warning("No volumes found for image %s. %s", imgUUID, allVols)
+ return
+ elif postZero:
dom.zeroImage(dom.sdUUID, imgUUID, imgVols)
else:
dom.deleteImage(dom.sdUUID, imgUUID, imgVols)
--
To view, visit http://gerrit.ovirt.org/9244
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I04af8d9ece52a1973180dc77991364785516a02a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
11 years, 6 months
Change in vdsm[master]: join supervdsm subprocess after terminated to avoid defunct ...
by lvroyce@linux.vnet.ibm.com
Royce Lv has uploaded a new change for review.
Change subject: join supervdsm subprocess after terminated to avoid defunct status
......................................................................
join supervdsm subprocess after terminated to avoid defunct status
After validateAccess there leaves a defunct process
clear it by join after termination
Change-Id: I0cdcfb3b467e9226f14a4ebc2845ff2db0f19b5f
Signed-off-by: Royce Lv<lvroyce(a)linux.vnet.ibm.com>
---
M vdsm/supervdsmServer.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/03/6503/1
--
To view, visit http://gerrit.ovirt.org/6503
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cdcfb3b467e9226f14a4ebc2845ff2db0f19b5f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
11 years, 6 months
Change in vdsm[master]: xmlrpcTests: narrow the expected exception when using retry
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has uploaded a new change for review.
Change subject: xmlrpcTests: narrow the expected exception when using retry
......................................................................
xmlrpcTests: narrow the expected exception when using retry
Change the expected exception from the default Exception to
AssertionError
Change-Id: I0deded14d02a21bcfbca49dbdfadfe8652added3
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M tests/functional/xmlrpcTests.py
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/44/8444/1
diff --git a/tests/functional/xmlrpcTests.py b/tests/functional/xmlrpcTests.py
index 6ccaf66..1d44059 100644
--- a/tests/functional/xmlrpcTests.py
+++ b/tests/functional/xmlrpcTests.py
@@ -122,7 +122,8 @@
'vmName': 'foo'})
self.assertVdsOK(r)
try:
- retry(lambda: self.assertVmUp(VMID), timeout=20)
+ retry(lambda: self.assertVmUp(VMID),
+ expectedException=AssertionError, timeout=20)
finally:
# FIXME: if the server dies now, we end up with a leaked VM.
r = self.s.destroy(VMID)
@@ -154,7 +155,8 @@
try:
self.assertVdsOK(self.s.create(conf))
# wait 65 seconds for VM to come up until timeout
- retry(assertVMAndGuestUp, timeout=65)
+ retry(assertVMAndGuestUp, expectedException=AssertionError,
+ timeout=65)
finally:
destroyResult = self.s.destroy(VMID)
--
To view, visit http://gerrit.ovirt.org/8444
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0deded14d02a21bcfbca49dbdfadfe8652added3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
11 years, 6 months
Change in vdsm[master]: Implement SSL session cache
by juan.hernandez@redhat.com
Juan Hernandez has uploaded a new change for review.
Change subject: Implement SSL session cache
......................................................................
Implement SSL session cache
We are currently implementing SSL for the XML-RPC communications with
the ssl module. Unfortunately this module uses OpenSSL in such a way
that a new context is created for each TCP connection. This means that
the heavy part of the SSL handshake (asymmetric encryption) is
performed for each connection. In addition as we use HTTP 1.0 this
also means that we use one connection per request, and thus one
handshake per request. This is a potential performance problem in the
VDSM side and a huge performance problem in the engine side: when the
number of hosts managed by the engine the use of CPU grows to a point
where almost all the CPU is used for SSL handshares.
This patch uses the OpenSSL.SSL module (pyOpenSSL) in a way such that
SSL sessions are cached, thus greatly reducing the amount of CPU
needed for handshakes, specially in the engine.
Bug-Id: https://bugzilla.redhat.com/857035
Change-Id: Ic75adee4070b415b8855af1f2ea289825496fbc1
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
---
M vdsm/SecureXMLRPCServer.py
1 file changed, 125 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/23/8123/1
diff --git a/vdsm/SecureXMLRPCServer.py b/vdsm/SecureXMLRPCServer.py
index 9396a28..744e594 100644
--- a/vdsm/SecureXMLRPCServer.py
+++ b/vdsm/SecureXMLRPCServer.py
@@ -35,6 +35,129 @@
import socket
import SocketServer
+from OpenSSL import SSL
+
+
+class SSLServerSocket(object):
+ """SSL decorator for server sockets.
+
+ This class wraps a normal socket so that when the accept method
+ is called the client socket as also decorated with SSL functionality.
+ The rest of the methods are just delegated to the raw socket.
+ """
+
+ def __init__(self, raw, certfile=None, keyfile=None, ca_certs=None):
+ # Save the reference to the raw socket so that we can delegate
+ # calls to it later:
+ self.raw = raw
+
+ # Create the OpenSSL context:
+ self.context = SSL.Context(SSL.SSLv3_METHOD)
+ self.context.set_session_id("vdsm")
+
+ # Load the crendentials:
+ if certfile and keyfile:
+ self.context.use_certificate_file(certfile)
+ self.context.use_privatekey_file(keyfile)
+
+ # Load the CA certificates used to verify certifictes presented
+ # by the clients:
+ if ca_certs:
+ self.context.load_verify_locations(ca_certs)
+ self.context.set_verify(
+ SSL.VERIFY_PEER |
+ SSL.VERIFY_FAIL_IF_NO_PEER_CERT |
+ SSL.VERIFY_CLIENT_ONCE,
+ SSLServerSocket.verify)
+
+ @staticmethod
+ def verify(connection, certificate, x, y, z):
+ # No need for additional verifications:
+ return True
+
+ def accept(self):
+ # Get the client socket and address calling the accept method of
+ # the raw socket and replace the client socket with a wrapper:
+ client, address = self.raw.accept()
+ client = SSLClientSocket(client, self.context)
+ return client, address
+
+ def bind(self, address):
+ return self.raw.bind(address)
+
+ def fileno(self):
+ return self.raw.fileno()
+
+ def getsockname(self):
+ return self.raw.getsockname()
+
+ def gettimeout(self):
+ return self.raw.gettimeout()
+
+ def listen(self, backlog=5):
+ return self.raw.listen(backlog)
+
+ def setsockopt(self, level, optname, value):
+ return self.raw.setsockopt(level, optname, value)
+
+
+class SSLClientSocket(object):
+ """SSL decorator for client sockets.
+
+ This class wraps a client socket returned by the accept
+ method of a server socket providing the SSL functionality.
+
+ Note that most methods are delegated to the wrapped raw
+ and many are just not implemented because they are not used
+ in our use case.
+ """
+
+ def __init__(self, raw, context):
+ # Save the reference to the raw client socket so that we can
+ # delegate calls to it later:
+ self.raw = raw
+ self.context = context
+
+ # Create a new SSL connection and a file like object on top of it
+ # in order to be able to implement the makefile method used by
+ # the XML RPC server:
+ self.connection = SSL.Connection(self.context, self.raw)
+
+ # Configure the connection to that it will automatically do the
+ # hand shake before the first read or write operation:
+ self.connection.set_accept_state()
+
+ def close(self):
+ return self.connection.close()
+
+ def do_handshake(self):
+ return self.connection.do_handshake()
+
+ def makefile(self, mode="r", bufsize=-1):
+ # In order to implement this method we borrow the _fileobject
+ # function from the socket module, and that forces us to
+ # implement correcty the recv and send family of methods:
+ return socket._fileobject(self, mode, bufsize)
+
+ def recv(self, bufsize, flags=0):
+ return self.connection.recv(bufsize)
+
+ def send(self, string, flags=0):
+ return self.connection.send(string)
+
+ def sendall(self, string, flags=0):
+ return self.connection.sendall(string)
+
+ def setsockopt(self, level, optname, value):
+ self.connection.setsockopt(level, optname, value)
+
+ def shutdown(self, how):
+ # Not completly sure, but I think we should first shutdown the
+ # SSL connection and then the raw socket:
+ self.connection.shutdown()
+ self.raw.shutdown(how)
+
+
SecureXMLRPCRequestHandler = SimpleXMLRPCServer.SimpleXMLRPCRequestHandler
@@ -53,11 +176,9 @@
requestHandler,
logRequests, allow_none, encoding,
bind_and_activate=False)
- self.socket = ssl.wrap_socket(self.socket,
+ self.socket = SSLServerSocket(self.socket,
keyfile=keyfile, certfile=certfile,
- ca_certs=ca_certs, server_side=True,
- cert_reqs=ssl.CERT_REQUIRED,
- do_handshake_on_connect=False)
+ ca_certs=ca_certs)
if timeout is not None:
self.socket.settimeout = timeout
if bind_and_activate:
--
To view, visit http://gerrit.ovirt.org/8123
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic75adee4070b415b8855af1f2ea289825496fbc1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
11 years, 6 months
Change in vdsm[master]: skip supervdsmTests until they work in-tree
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: skip supervdsmTests until they work in-tree
......................................................................
skip supervdsmTests until they work in-tree
Change-Id: I76eda885a8d66ca9c973dbc1a3a1b72d9e2035cd
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/Makefile.am
1 file changed, 0 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/19/9219/1
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9683e7b..b81820f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -48,7 +48,6 @@
restData.py \
restTests.py \
storageMailboxTests.py \
- superVdsmTests.py \
tcTests.py \
vdsClientTests.py \
volumeTests.py \
--
To view, visit http://gerrit.ovirt.org/9219
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I76eda885a8d66ca9c973dbc1a3a1b72d9e2035cd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
11 years, 6 months