Francesco Romani has uploaded a new change for review.
Change subject: vm: graphdev: fix device hooks post migration
......................................................................
vm: graphdev: fix device hooks post migration
the _deviceXML attribute was not regenerated on
destination VM after migrations.
Change-Id: I6643f81cc5cff1a282da607e7e5759a97b081c7a
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/27933/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index e977ff3..20936a7 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -5122,6 +5122,12 @@
if alias in aliasToDevice:
aliasToDevice[alias]._deviceXML = deviceXML.toxml()
+ elif deviceXML.tagName == GRAPHICS_DEVICES:
+ # graphics device do not have aliases, must match by type
+ graphType = deviceXML.getAttribute('type')
+ for devObj in self._devices[GRAPHICS_DEVICES]:
+ if devObj.device == graphType:
+ devObj._deviceXML = deviceXML.toxml()
def waitForMigrationDestinationPrepare(self):
"""Wait until paths are prepared for migration destination"""
--
To view, visit http://gerrit.ovirt.org/27933
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6643f81cc5cff1a282da607e7e5759a97b081c7a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
Adam Litke has uploaded a new change for review.
Change subject: qemuimg: Handle new output format
......................................................................
qemuimg: Handle new output format
The current qemu-img info parsing logic assumes that if the output is
long enough, the backing image will appear on line 6. In newer qemu
versions, some additional information has been added to the output. In
the case of no backing file, the additional lines will fail to parse.
Handle this by trying to parse line 6 as a backing file and ignoring
regex parse errors for this line only.
Change-Id: Ic229198ab7c2bb9743bdf8629416131186115431
Signed-off-by: Adam Litke <alitke(a)redhat.com>
---
M lib/vdsm/qemuimg.py
1 file changed, 13 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/52/27552/1
diff --git a/lib/vdsm/qemuimg.py b/lib/vdsm/qemuimg.py
index 69912d9..2dfbc4d 100644
--- a/lib/vdsm/qemuimg.py
+++ b/lib/vdsm/qemuimg.py
@@ -43,8 +43,15 @@
}
+class _RegexSearchError(Exception):
+ pass
+
+
def __iregexSearch(pattern, text):
- return __iregex[pattern].search(text).group("value")
+ m = __iregex[pattern].search(text)
+ if m is None:
+ raise _RegexSearchError()
+ return m.group("value")
class QImgError(Exception):
@@ -81,8 +88,11 @@
info['clustersize'] = int(__iregexSearch("clustersize", out[4]))
if len(out) > 5:
- info['backingfile'] = __iregexSearch("backingfile", out[5])
- except:
+ try:
+ info['backingfile'] = __iregexSearch("backingfile", out[5])
+ except _RegexSearchError:
+ pass
+ except _RegexSearchError:
raise QImgError(rc, out, err, "unable to parse qemu-img info output")
return info
--
To view, visit http://gerrit.ovirt.org/27552
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic229198ab7c2bb9743bdf8629416131186115431
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke(a)redhat.com>
Francesco Romani has uploaded a new change for review.
Change subject: vm: reorganize the graphic devices lookup
......................................................................
vm: reorganize the graphic devices lookup
this patch extracts a method to gather and
return all the graphic devices of a Vm, either
new style (proper device) or legacy (reconstructed
from the display* params).
The correct order of the devices is preserved:
* first the one reconstructed from the legacy params,
if any
* then the additional one
and proper locking (using _confLock) is used to avoid
races.
Change-Id: I231087647e515a1f310de45b659e512444bd0a1d
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 14 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/96/27596/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 198cbce..445a750 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -2651,10 +2651,16 @@
# updated in Vm._run (buildConfDevices and the following code).
# easily reproduced with functional tests, but also possible
# in the wild
- for dev in self.conf.get('devices', []) + self.getConfGraphics():
+ for dev in self._getAllConfGraphicDevices():
+ stats.update(getInfo(dev))
+ break
+
+ def _getAllConfGraphicDevices(self):
+ with self._confLock:
+ devices = self.getConfGraphics() + self.conf.get('devices', [])
+ for dev in devices:
if dev['type'] == GRAPHICS_DEVICES:
- stats.update(getInfo(dev))
- break
+ yield dev
def isMigrating(self):
return self._migrationSourceThread.isAlive()
@@ -3016,8 +3022,9 @@
for dev in devices.values():
newDevices.extend(dev)
- self.conf['devices'] = newDevices
- self._cleanLegacyGraphics()
+ with self._confLock:
+ self.conf['devices'] = newDevices
+ self._cleanLegacyGraphics()
def _cleanLegacyGraphics(self):
"""
@@ -4389,10 +4396,8 @@
@property
def hasSpice(self):
- return any(
- dev['device'] == 'spice'
- for dev in self.conf.get('devices', self.getConfGraphics())
- if dev['type'] == GRAPHICS_DEVICES)
+ return any(dev['device'] == 'spice'
+ for dev in self._getAllConfGraphicDevices())
def _getPid(self):
pid = '0'
--
To view, visit http://gerrit.ovirt.org/27596
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I231087647e515a1f310de45b659e512444bd0a1d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
Vered Volansky has uploaded a new change for review.
Change subject: testing storageTest.py as CI job.
......................................................................
testing storageTest.py as CI job.
Change-Id: I4d0caab1749e075f3650c91161b473e66b19977d
Signed-off-by: Vered Volansky <vvolansk(a)redhat.com>
---
M vdsm/storage/sp.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/43/23343/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 0bab95d..0cb7164 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -1,6 +1,7 @@
#
# Copyright 2009-2011 Red Hat, Inc.
#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
--
To view, visit http://gerrit.ovirt.org/23343
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d0caab1749e075f3650c91161b473e66b19977d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vered Volansky <vvolansk(a)redhat.com>
Vinzenz Feenstra has uploaded a new change for review.
Change subject: virt: Avoid timeout log spam due to channel timeouts
......................................................................
virt: Avoid timeout log spam due to channel timeouts
Currently vmchannels.Listener is logging every timeout events every
30 seconds (based on guest_agent_timeout config value):
vmChannels::91::vds::(_handle_timeouts) Timeout on fileno 106.
This patch changes this behaviour to keep track if a timeout has
been logged before and in that case wouldn't log it again until
a new event (like incoming data) has been received.
Change-Id: I82e868ce7c0ab28a9f7983887a097f760c3d0f69
Bug-Url: https://bugzilla.redhat.com/1096312
Signed-off-by: Vinzenz Feenstra <vfeenstr(a)redhat.com>
---
M vdsm/virt/vmchannels.py
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/27/27627/1
diff --git a/vdsm/virt/vmchannels.py b/vdsm/virt/vmchannels.py
index d31cd47..b053a64 100644
--- a/vdsm/virt/vmchannels.py
+++ b/vdsm/virt/vmchannels.py
@@ -59,6 +59,7 @@
event)
elif (event & select.EPOLLIN):
obj = self._channels[fileno]
+ obj['timeout_seen'] = False
obj['reconnects'] = 0
try:
if obj['read_cb'](obj['opaque']):
@@ -73,6 +74,7 @@
def _prepare_reconnect(self, fileno):
obj = self._channels.pop(fileno)
+ obj['timeout_seen'] = False
try:
fileno = obj['create_cb'](obj['opaque'])
except:
@@ -89,7 +91,9 @@
now = time.time()
for (fileno, obj) in self._channels.items():
if (now - obj['read_time']) >= self._timeout:
- self.log.debug("Timeout on fileno %d.", fileno)
+ if not obj.get('timeout_seen', False):
+ self.log.debug("Timeout on fileno %d.", fileno)
+ obj['timeout_seen'] = True
try:
obj['timeout_cb'](obj['opaque'])
obj['read_time'] = now
--
To view, visit http://gerrit.ovirt.org/27627
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I82e868ce7c0ab28a9f7983887a097f760c3d0f69
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr(a)redhat.com>