Shmuel Leib Melamud has uploaded a new change for review.
Change subject: virt: Correct VM state before vm.cont() in _recover()
......................................................................
virt: Correct VM state before vm.cont() in _recover()
In SourceThread._recover(), if error occured while hibernating a VM, set
VM status to PAUSED before calling vm.cont(). Otherwise, vm.cont() will
fail to run in SAVING_STATE state and the VM will be left paused.
Change-Id: I5b1c7b4eecacf87ece48dc563fd2da294af0510b
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1238536
Signed-off-by: Shmuel Melamud <smelamud(a)redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/27/47527/1
diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index 32caccb..f950a6f 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -213,6 +213,7 @@
self.log.exception("Failed to destroy remote VM")
# if the guest was stopped before migration, we need to cont it
if self.hibernating:
+ self._vm.lastStatus = vmstatus.PAUSED
self._vm.cont()
# either way, migration has finished
self._vm.lastStatus = vmstatus.UP
--
To view, visit https://gerrit.ovirt.org/47527
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b1c7b4eecacf87ece48dc563fd2da294af0510b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shmuel Leib Melamud <smelamud(a)redhat.com>
Piotr Kliczewski has uploaded a new change for review.
Change subject: jsonrpcvdscli: make sure not to ignore response queue
......................................................................
jsonrpcvdscli: make sure not to ignore response queue
In jsonrpcvdscli we provide responseQueue but we ignore it and we
generate new queue name by using uuid4(). This patch makes sure not to
ignore provided responseQueue.
Change-Id: I4d6991b22f36b1a62e167a6be5c7229479f895df
Signed-off-by: pkliczewski <piotr.kliczewski(a)gmail.com>
---
M lib/vdsm/jsonrpcvdscli.py
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/09/48609/1
diff --git a/lib/vdsm/jsonrpcvdscli.py b/lib/vdsm/jsonrpcvdscli.py
index 280d26f..c9a8b4d 100644
--- a/lib/vdsm/jsonrpcvdscli.py
+++ b/lib/vdsm/jsonrpcvdscli.py
@@ -147,8 +147,11 @@
else:
sslctx = None
+ if responseQueue is None:
+ responseQueue = str(uuid4())
+
return stompreactor.StandAloneRpcClient(
- host, port, requestQueue, str(uuid4()), sslctx,
+ host, port, requestQueue, responseQueue, sslctx,
lazy_start=False)
--
To view, visit https://gerrit.ovirt.org/48609
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d6991b22f36b1a62e167a6be5c7229479f895df
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Piotr Kliczewski has uploaded a new change for review.
Change subject: stomp: slow data read when connected from localhost
......................................................................
stomp: slow data read when connected from localhost
When jsonrpcvdscli is used to connect to vdsm from localhost there was
an issue with receiving data. Local connection use loopback interface
which do not split data into packets but delivers it as is.
>From asyncore perspective this delivery generates single read event.
When connection is remote there is event generated per packet.
When we receive bigger data than our buffer size and the connection is
local we read only amount which fits into our buffer (4096) and wait for
next event which never arrives. The code wakes up when there is an
attempt to send/receive heartbeat (every 5 seconds). This behavior
delays reading response from calls like getVdsCaps for around 5 seconds.
We solved this issue by checking whether stomp frame was parsed from
data read and if the size of this data equals to buffer size and
connection is local we attempt to read again.
Change-Id: I279b2cde25ed9bb42954cf8f72673bd0aad0a6a5
Signed-off-by: pkliczewski <piotr.kliczewski(a)gmail.com>
---
M lib/yajsonrpc/stomp.py
1 file changed, 18 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/08/48608/1
diff --git a/lib/yajsonrpc/stomp.py b/lib/yajsonrpc/stomp.py
index e480578..e37becf 100644
--- a/lib/yajsonrpc/stomp.py
+++ b/lib/yajsonrpc/stomp.py
@@ -348,19 +348,32 @@
self._frame_handler.handle_connect(self)
def handle_read(self, dispatcher):
+ parser = self._parser
+ try:
+ size = self.read_data(dispatcher, parser)
+
+ if (parser.pending == 0 and
+ size == self._bufferSize and
+ dispatcher.socket.getpeername()[0] == '127.0.0.1'):
+ self.handle_read(dispatcher)
+ except socket.error:
+ dispatcher.handle_error()
+ return
+
+ while parser.pending > 0:
+ self._frame_handler.handle_frame(self, parser.popFrame())
+
+ def read_data(self, dispatcher, parser):
try:
data = dispatcher.recv(self._bufferSize)
except socket.error:
dispatcher.handle_error()
return
- parser = self._parser
-
if data is not None:
parser.parse(data)
-
- while parser.pending > 0:
- self._frame_handler.handle_frame(self, parser.popFrame())
+ return len(data)
+ return None
def popFrame(self):
return self._parser.popFrame()
--
To view, visit https://gerrit.ovirt.org/48608
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I279b2cde25ed9bb42954cf8f72673bd0aad0a6a5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Piotr Kliczewski has uploaded a new change for review.
Change subject: jsonrpcvdscli: improve functional network tests duration time
......................................................................
jsonrpcvdscli: improve functional network tests duration time
The tests were creating new jsonrpcvdscli#_Server every time before test
invocation. In __init__ method we perform schema parsing which is time
consuming operation. We improved duration time of the test by creating
the objects only once instead of before every test method.
Change-Id: Id1fd202566edd389f06d49876e5b83391686b53b
Signed-off-by: pkliczewski <piotr.kliczewski(a)gmail.com>
---
M tests/functional/networkTests.py
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/56/48356/1
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index 3f4053e..a00e042 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -204,8 +204,10 @@
@expandPermutations
class NetworkTest(TestCaseBase):
- def setUp(self):
- self.vdsm_net = VdsProxy()
+ @classmethod
+ def setUpClass(cls):
+ cls._patch_arch.apply()
+ cls.vdsm_net = VdsProxy()
def cleanupNet(func):
"""
--
To view, visit https://gerrit.ovirt.org/48356
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1fd202566edd389f06d49876e5b83391686b53b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Piotr Kliczewski has uploaded a new change for review.
Change subject: asyncore: remove misleading log entry
......................................................................
asyncore: remove misleading log entry
>From time to time I can see misleading warning in the logs:
betterAsyncore::144::vds.dispatcher::(log_info) unhandled close event
In order to get rid of it we make sure that we handle close event for
all the dispatchers that we have and we call close on dispatcher.
Change-Id: Ib35eb35c7ffe52b090c329136041bc21694fbdaf
Signed-off-by: pkliczewski <piotr.kliczewski(a)gmail.com>
---
M lib/vdsm/sslutils.py
M vdsm/protocoldetector.py
2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/75/48375/1
diff --git a/lib/vdsm/sslutils.py b/lib/vdsm/sslutils.py
index 443ae8c..3b52a81 100644
--- a/lib/vdsm/sslutils.py
+++ b/lib/vdsm/sslutils.py
@@ -297,6 +297,9 @@
self.want_read = self.want_write = True
self._is_handshaking = False
+ def handle_close(self, dispatcher):
+ dispatcher.close()
+
def create_ssl_context():
sslctx = None
diff --git a/vdsm/protocoldetector.py b/vdsm/protocoldetector.py
index 0bcc7a6..af7818d 100644
--- a/vdsm/protocoldetector.py
+++ b/vdsm/protocoldetector.py
@@ -72,6 +72,9 @@
*client.getpeername())
self._dispatcher_factory(client)
+ def handle_close(self, dispatcher):
+ dispatcher.close()
+
class _ProtocolDetector(object):
log = logging.getLogger("ProtocolDetector.Detector")
@@ -128,6 +131,9 @@
def has_expired(self):
return monotonic_time() >= self._give_up_at
+ def handle_close(self, dispatcher):
+ dispatcher.close()
+
class MultiProtocolAcceptor:
"""
--
To view, visit https://gerrit.ovirt.org/48375
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib35eb35c7ffe52b090c329136041bc21694fbdaf
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Ala Hino has uploaded a new change for review.
Change subject: gluster: Set mount path based on gluster volume info
......................................................................
gluster: Set mount path based on gluster volume info
There are cases where gluter server and ovirt are configured
differently regarding ip addresses and domain names. To avoid
any issues that could happen due to this misconfiguration, we
have to use info retuned from gluster volume info to set the
mount path as well as the backup-volfile-servers.
Change-Id: Id3386b37cd407c52e1b8f38d54c236bffc143e2f
Signed-off-by: Ala Hino <ahino(a)redhat.com>
---
M vdsm/storage/storageServer.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/08/48308/1
diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py
index 6636bd8..a6fe39b 100644
--- a/vdsm/storage/storageServer.py
+++ b/vdsm/storage/storageServer.py
@@ -336,6 +336,7 @@
raise se.UnsupportedGlusterVolumeReplicaCountError(replicaCount)
def _get_backup_servers_option(self):
+ self._volfileserver = self.volinfo['bricks'][0].split(":")[0]
servers = [brick.split(":")[0] for brick in self.volinfo['bricks']]
servers.remove(self._volfileserver)
if not servers:
--
To view, visit https://gerrit.ovirt.org/48308
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3386b37cd407c52e1b8f38d54c236bffc143e2f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ahino(a)redhat.com>
Francesco Romani has uploaded a new change for review.
Change subject: vm: add support for "Crashed" event
......................................................................
vm: add support for "Crashed" event
Libvirt recently added this event.
We seen this first on libvirt 1.2.17 on ppc64le.
Change-Id: I96e98cf7dc9c2c9e7507cc39e181fb2953032989
Related-To: https://bugzilla.redhat.com/1273891
Backport-To: 3.6
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/94/48594/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 7dd0247..6ea0ff3 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -167,6 +167,7 @@
"Stopped",
"Shutdown",
"PM-Suspended",
+ "Crashed",
)
--
To view, visit https://gerrit.ovirt.org/48594
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I96e98cf7dc9c2c9e7507cc39e181fb2953032989
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>