Change in vdsm[master]: http protocol detection
by Nir Soffer
Nir Soffer has posted comments on this change.
Change subject: http protocol detection
......................................................................
Patch Set 5: Code-Review-1
Thinking more about it, we cannot use this to separate the xmlrpc and http servers.
Protocol detection assume that the first request represent all requests on some connection, so if I got an xmlrpc request, all other requests on this connection will be xmlrpc. This assumption is wrong as the same connection can be used by the engine for both xmlrpc and http.
Since we must support old engine, this can not be solved by using different connection pools on the engine side in future engine versions.
--
To view, visit http://gerrit.ovirt.org/27839
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I4f899cbab4d95ebd184bf32f3ccec1f4fa0e49bc
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.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: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 11 months
Change in vdsm[master]: spec: update sanlock dependencies
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: spec: update sanlock dependencies
......................................................................
spec: update sanlock dependencies
Forcing some old fedora installations to update sanlock to the latest
version. This is mostly to address:
- wdmd: dynamically select working watchdog device
which makes it possible to run sanlock on hardware (generally laptops)
with multiple watchdogs.
Change-Id: Ia9a28d7bf23ab93781bdf3d8cf5769fe149fdeb4
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/12292/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 38838ea..89da7af 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -107,7 +107,7 @@
Requires: device-mapper-multipath >= 0.4.9-52
Requires: e2fsprogs >= 1.41.12-11
Requires: kernel >= 2.6.32-279.9.1
-Requires: sanlock >= 2.3-4, sanlock-python
+Requires: sanlock >= 2.3-4
Requires: initscripts >= 9.03.31-2.el6_3.1
Requires: mom >= 0.3.0
Requires: selinux-policy-targeted >= 3.7.19-155
@@ -125,7 +125,7 @@
Requires: e2fsprogs >= 1.41.14
Requires: kernel >= 3.6
Requires: mom >= 0.3.0
-Requires: sanlock >= 2.4-2, sanlock-python
+Requires: sanlock >= 2.6-4
Requires: sed >= 4.2.1-10
Requires: selinux-policy-targeted >= 3.10.0-149
Requires: lvm2 >= 2.02.95
@@ -151,6 +151,7 @@
Requires: libselinux-python
Requires: %{name}-python = %{version}-%{release}
Requires: pyparted
+Requires: sanlock-python
Requires(post): /usr/sbin/saslpasswd2
Requires(post): /bin/hostname
--
To view, visit http://gerrit.ovirt.org/12292
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9a28d7bf23ab93781bdf3d8cf5769fe149fdeb4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
9 years, 11 months
Change in vdsm[master]: json-rpc: Protocol detection
by Nir Soffer
Nir Soffer has posted comments on this change.
Change subject: json-rpc: Protocol detection
......................................................................
Patch Set 31:
(5 comments)
The issue in version 29 fixed, but I found few easy to fix issues.
Waiting for confirmation that xmlrpc works correctly with last engine stable release.
http://gerrit.ovirt.org/#/c/26300/31/vdsm/BindingXMLRPC.py
File vdsm/BindingXMLRPC.py:
Line 1131: self.xml_binding = xml_binding
Line 1132:
Line 1133: def detect(self, data):
Line 1134: return (data.startswith("PUT /") or data.startswith("GET /") or
Line 1135: data.startswith("POST /RPC2"))
Did you verify that both old and new engine versions use /RPC2?
Line 1136:
Line 1137: def handleSocket(self, client_socket, socket_address):
Line 1138: self.xml_binding.add_socket(client_socket, socket_address)
http://gerrit.ovirt.org/#/c/26300/31/vdsm/protocolDetector.py
File vdsm/protocolDetector.py:
Line 137: def wakeup(self):
Line 138: try:
Line 139: os.write(self._write_fd, '1')
Line 140: except OSError as e:
Line 141: if e.erron not in (errno.EAGAIN, errno.EINPROGRESS):
- A careless reviewer suggested to check EINPROGRESS here - should be EWOULDBLOCK.
- e.erron will raise AttriuteError, should be e.errno
- If we get EINTR, we should retry the call, otherwise the wakeup fill fail.
Line 142: raise
Line 143:
Line 144: def _cleanup_wakeup_pipe(self):
Line 145: try:
Line 144: def _cleanup_wakeup_pipe(self):
Line 145: try:
Line 146: os.read(self._read_fd, 128)
Line 147: except OSError as e:
Line 148: if e.erron not in (errno.EAGAIN, errno.EINPROGRESS):
- A careless reviewer suggested to check EINPROGRESS - here should be EWOULDBLOCK.
- e.erron will raise AttriuteError, should be e.errno
Line 149: raise
Line 150:
Line 151: def _accept_connection(self):
Line 152: client_socket, _ = self._socket.accept()
Line 171: _, client_socket = self._pending_connections[fd]
Line 172: try:
Line 173: data = client_socket.recv(self._required_size, socket.MSG_PEEK)
Line 174: except socket.error as e:
Line 175: if e.errno not in (errno.EAGAIN, errno.EINPROGRESS):
- A careless reviewer suggested to check EINPROGRESS here - should be EWOULDBLOCK.
Line 176: self.log.warning("Not able to read data")
Line 177: self._remove_connection(client_socket)
Line 178: client_socket.close()
Line 179: return
Line 198: % (self._host, str(self._port)))
Line 199: server_socket = socket.socket(addr[0][0], addr[0][1], addr[0][2])
Line 200: server_socket.bind(addr[0][4])
Line 201: server_socket.listen(5)
Line 202: utils.closeOnExec(server_socket.fileno())
This must be done as soon as possible after creating the socket. Performing it after possibly blocking operation like bind and listen is not a good idea.
Line 203:
Line 204: if self._sslctx:
Line 205: server_socket = SSLServerSocket(raw=server_socket,
Line 206: certfile=self._sslctx.cert_file,
--
To view, visit http://gerrit.ovirt.org/26300
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id739a40e2b37dcc175137ec91cd5ec166ad24a75
Gerrit-PatchSet: 31
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Barak Azulay <bazulay(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Liron Ar <laravot(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(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: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
9 years, 11 months
Change in vdsm[master]: virt: Ensure not to handle no longer tacked fds in epoll
by Vinzenz Feenstra
Vinzenz Feenstra has uploaded a new change for review.
Change subject: virt: Ensure not to handle no longer tacked fds in epoll
......................................................................
virt: Ensure not to handle no longer tacked fds in epoll
In some cases it is possible that events from epoll are received before the
socket is closed. This patch ensures that we're still tracking the fd for
which we're receiving the event.
Change-Id: Idde0f89d2859107dd1bb697d1753709137335677
Bug-Url: https://bugzilla.redhat.com/1102072
Signed-off-by: Vinzenz Feenstra <vfeenstr(a)redhat.com>
---
M vdsm/virt/vmchannels.py
1 file changed, 13 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/79/28179/1
diff --git a/vdsm/virt/vmchannels.py b/vdsm/virt/vmchannels.py
index d31cd47..67fb602 100644
--- a/vdsm/virt/vmchannels.py
+++ b/vdsm/virt/vmchannels.py
@@ -58,15 +58,19 @@
self.log.debug("Received %.08X. On fd removed by epoll.",
event)
elif (event & select.EPOLLIN):
- obj = self._channels[fileno]
- obj['reconnects'] = 0
- try:
- if obj['read_cb'](obj['opaque']):
- obj['read_time'] = time.time()
- else:
- reconnect = True
- except:
- self.log.exception("Exception on read callback.")
+ obj = self._channels.get(fileno, None)
+ if obj:
+ obj['reconnects'] = 0
+ try:
+ if obj['read_cb'](obj['opaque']):
+ obj['read_time'] = time.time()
+ else:
+ reconnect = True
+ except:
+ self.log.exception("Exception on read callback.")
+ else:
+ self.log.debug("Received epoll event %.08X for no longer "
+ "untracked fd = %d", event, fileno)
if reconnect:
self._prepare_reconnect(fileno)
--
To view, visit http://gerrit.ovirt.org/28179
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idde0f89d2859107dd1bb697d1753709137335677
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr(a)redhat.com>
9 years, 11 months
Change in vdsm[master]: json-rpc: Protocol detection
by Nir Soffer
Nir Soffer has posted comments on this change.
Change subject: json-rpc: Protocol detection
......................................................................
Patch Set 31:
Please test also with engine from ovirt 3.4 stable release.
--
To view, visit http://gerrit.ovirt.org/26300
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id739a40e2b37dcc175137ec91cd5ec166ad24a75
Gerrit-PatchSet: 31
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Barak Azulay <bazulay(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Liron Ar <laravot(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(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: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 11 months
Change in vdsm[master]: Removing unused logErr parameter from execCmd
by ybronhei@redhat.com
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Removing unused logErr parameter from execCmd
......................................................................
Removing unused logErr parameter from execCmd
Change-Id: Ic07b3524246d8795df8accf35c9a9a82e42d8497
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M lib/vdsm/utils.py
M vdsm/storage/misc.py
2 files changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/50/28050/1
diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py
index 600fc7d..092ef2f 100644
--- a/lib/vdsm/utils.py
+++ b/lib/vdsm/utils.py
@@ -644,7 +644,7 @@
self._poller.close()
-def execCmd(command, sudo=False, cwd=None, data=None, raw=False, logErr=True,
+def execCmd(command, sudo=False, cwd=None, data=None, raw=False,
printable=None, env=None, sync=True, nice=None, ioclass=None,
ioclassdata=None, setsid=False, execCmdLogger=logging.root,
deathSignal=0, childUmask=None):
diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
index 4eb56e7..6dd2679 100644
--- a/vdsm/storage/misc.py
+++ b/vdsm/storage/misc.py
@@ -506,9 +506,9 @@
newName = os.path.join(directory, fd[key]['new'])
if isOvirtNode() and persist and not cp:
try:
- execCmd([constants.EXT_UNPERSIST, oldName], logErr=False,
+ execCmd([constants.EXT_UNPERSIST, oldName],
sudo=True)
- execCmd([constants.EXT_UNPERSIST, newName], logErr=False,
+ execCmd([constants.EXT_UNPERSIST, newName],
sudo=True)
except:
pass
@@ -516,7 +516,7 @@
if cp:
execCmd([constants.EXT_CP, oldName, newName], sudo=True)
if isOvirtNode() and persist and not os.path.exists(newName):
- execCmd([constants.EXT_PERSIST, newName], logErr=False,
+ execCmd([constants.EXT_PERSIST, newName],
sudo=True)
else:
@@ -525,7 +525,7 @@
pass
if isOvirtNode() and persist and not cp:
try:
- execCmd([constants.EXT_PERSIST, newName], logErr=False,
+ execCmd([constants.EXT_PERSIST, newName],
sudo=True)
except:
pass
--
To view, visit http://gerrit.ovirt.org/28050
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic07b3524246d8795df8accf35c9a9a82e42d8497
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
9 years, 11 months
Change in vdsm[master]: json-rpc: Protocol detection
by Nir Soffer
Nir Soffer has posted comments on this change.
Change subject: json-rpc: Protocol detection
......................................................................
Patch Set 31:
Can you describe in details how did you verify this?
In particular, which version of engine did you test? Remember that vdsm must support any previous version of engine.
--
To view, visit http://gerrit.ovirt.org/26300
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id739a40e2b37dcc175137ec91cd5ec166ad24a75
Gerrit-PatchSet: 31
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Barak Azulay <bazulay(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Liron Ar <laravot(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(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: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 11 months
Change in vdsm[master]: json-rpc: Protocol detection
by laravot@redhat.com
Liron Ar has posted comments on this change.
Change subject: json-rpc: Protocol detection
......................................................................
Patch Set 29:
(1 comment)
http://gerrit.ovirt.org/#/c/26300/29/vdsm/BindingXMLRPC.py
File vdsm/BindingXMLRPC.py:
Line 1055: def __init__(self, xml_binding):
Line 1056: self.xml_binding = xml_binding
Line 1057:
Line 1058: def detect(self, data):
Line 1059: return data.startswith("PUT /") or data.startswith("POST /RPC2")
please align this part with http://gerrit.ovirt.org/#/c/26741/
Line 1060:
Line 1061: def handleSocket(self, client_socket, socket_address):
Line 1062: self.xml_binding.add_socket(client_socket, socket_address)
--
To view, visit http://gerrit.ovirt.org/26300
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id739a40e2b37dcc175137ec91cd5ec166ad24a75
Gerrit-PatchSet: 29
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Barak Azulay <bazulay(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Liron Ar <laravot(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(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: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
9 years, 11 months