Change in vdsm[master]: virt: move XML processing in a module
Martin Polednik has posted comments on this change. Change subject: virt: move XML processing in a module .. Patch Set 3: Code-Review+1 I'd say the name itself sounds better, I'm only afraid not to start naming everything vm* as that would be redundant. Related question: should we really use _domParseStr or new from_string when outside of vm.py we use ParseString? -- To view, visit http://gerrit.ovirt.org/26855 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I77dd048067b8abcb77f4b9bf55fbfd0535672996 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: initial split of vm devices
Martin Polednik has posted comments on this change. Change subject: vdsm: initial split of vm devices .. Patch Set 1: I'd consider moving whole DeviceMapping and *_DEVICES to devices.py in future, the meantime split will unfortunately cause this ugliness -- To view, visit http://gerrit.ovirt.org/29250 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I63b602851c17697259e86dfad3a9063447c57e50 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: move sound device to devices.py
Martin Polednik has uploaded a new change for review. Change subject: vdsm: move sound device to devices.py .. vdsm: move sound device to devices.py No real code changes Change-Id: I42b8ae3475373d39c7d6375ccbc23a85437e19d0 Signed-off-by: Martin Polednik --- M tests/vmTests.py M vdsm/virt/devices.py M vdsm/virt/vm.py 3 files changed, 15 insertions(+), 14 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/65/29265/1 diff --git a/tests/vmTests.py b/tests/vmTests.py index 2b6e82c..bb1e32b 100644 --- a/tests/vmTests.py +++ b/tests/vmTests.py @@ -31,6 +31,7 @@ from virt import vm from virt import vmexitreason from virt import xmldom +from virt import devices from vdsm import constants from vdsm import define from testrunner import VdsmTestCase as TestCaseBase @@ -539,7 +540,7 @@ def testSoundXML(self): soundXML = '' dev = {'device': 'ac97'} -sound = vm.SoundDevice(self.conf, self.log, **dev) +sound = devices.SoundDevice(self.conf, self.log, **dev) self.assertXML(sound.getXML(), soundXML) def testVideoXML(self): diff --git a/vdsm/virt/devices.py b/vdsm/virt/devices.py index d484136..28386aa 100644 --- a/vdsm/virt/devices.py +++ b/vdsm/virt/devices.py @@ -32,3 +32,15 @@ Create domxml for general device """ return self.createXmlElem(self.type, self.device, ['address']) + + +class SoundDevice(VmDevice): +__slots__ = ('address', 'alias') + +def getXML(self): +""" +Create domxml for sound device +""" +sound = self.createXmlElem('sound', None, ['address']) +sound.setAttrs(model=self.device) +return sound diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index a0f4edf..5d52a79 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -645,18 +645,6 @@ return video -class SoundDevice(devices.VmDevice): -__slots__ = ('address', 'alias') - -def getXML(self): -""" -Create domxml for sound device -""" -sound = self.createXmlElem('sound', None, ['address']) -sound.setAttrs(model=self.device) -return sound - - class NetworkInterfaceDevice(devices.VmDevice): __slots__ = ('nicModel', 'macAddr', 'network', 'bootOrder', 'address', 'linkActive', 'portMirroring', 'filter', @@ -1344,7 +1332,7 @@ _ongoingCreations = threading.BoundedSemaphore(4) DeviceMapping = ((DISK_DEVICES, Drive), (NIC_DEVICES, NetworkInterfaceDevice), - (SOUND_DEVICES, SoundDevice), + (SOUND_DEVICES, devices.SoundDevice), (VIDEO_DEVICES, VideoDevice), (GRAPHICS_DEVICES, GraphicsDevice), (CONTROLLER_DEVICES, ControllerDevice), -- To view, visit http://gerrit.ovirt.org/29265 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42b8ae3475373d39c7d6375ccbc23a85437e19d0 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: move video device to devices.py
Martin Polednik has uploaded a new change for review. Change subject: vdsm: move video device to devices.py .. vdsm: move video device to devices.py No real code changes Change-Id: I40ba700e6223490251af86189196f189ae4bad39 Signed-off-by: Martin Polednik --- M tests/vmTests.py M vdsm/virt/devices.py M vdsm/virt/vm.py 3 files changed, 20 insertions(+), 19 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/63/29263/1 diff --git a/tests/vmTests.py b/tests/vmTests.py index 2b6e82c..e31f691 100644 --- a/tests/vmTests.py +++ b/tests/vmTests.py @@ -31,6 +31,7 @@ from virt import vm from virt import vmexitreason from virt import xmldom +from virt import devices from vdsm import constants from vdsm import define from testrunner import VdsmTestCase as TestCaseBase @@ -550,7 +551,7 @@ dev = {'device': 'vga', 'specParams': {'vram': '32768', 'heads': '2'}} -video = vm.VideoDevice(self.conf, self.log, **dev) +video = devices.VideoDevice(self.conf, self.log, **dev) self.assertXML(video.getXML(), videoXML) def testInterfaceXML(self): diff --git a/vdsm/virt/devices.py b/vdsm/virt/devices.py index d484136..4d7fbee 100644 --- a/vdsm/virt/devices.py +++ b/vdsm/virt/devices.py @@ -32,3 +32,20 @@ Create domxml for general device """ return self.createXmlElem(self.type, self.device, ['address']) + + +class VideoDevice(VmDevice): +__slots__ = ('address',) + +def getXML(self): +""" +Create domxml for video device +""" +video = self.createXmlElem('video', None, ['address']) +sourceAttrs = {'vram': self.specParams.get('vram', '32768'), + 'heads': self.specParams.get('heads', '1')} +if 'ram' in self.specParams: +sourceAttrs['ram'] = self.specParams['ram'] + +video.appendChildWithArgs('model', type=self.device, **sourceAttrs) +return video diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index a0f4edf..bf7653c 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -628,23 +628,6 @@ return ctrl -class VideoDevice(devices.VmDevice): -__slots__ = ('address',) - -def getXML(self): -""" -Create domxml for video device -""" -video = self.createXmlElem('video', None, ['address']) -sourceAttrs = {'vram': self.specParams.get('vram', '32768'), - 'heads': self.specParams.get('heads', '1')} -if 'ram' in self.specParams: -sourceAttrs['ram'] = self.specParams['ram'] - -video.appendChildWithArgs('model', type=self.device, **sourceAttrs) -return video - - class SoundDevice(devices.VmDevice): __slots__ = ('address', 'alias') @@ -1345,7 +1328,7 @@ DeviceMapping = ((DISK_DEVICES, Drive), (NIC_DEVICES, NetworkInterfaceDevice), (SOUND_DEVICES, SoundDevice), - (VIDEO_DEVICES, VideoDevice), + (VIDEO_DEVICES, devices.VideoDevice), (GRAPHICS_DEVICES, GraphicsDevice), (CONTROLLER_DEVICES, ControllerDevice), (GENERAL_DEVICES, devices.GeneralDevice), -- To view, visit http://gerrit.ovirt.org/29263 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40ba700e6223490251af86189196f189ae4bad39 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: move controller device to devices.py
Martin Polednik has uploaded a new change for review. Change subject: vdsm: move controller device to devices.py .. vdsm: move controller device to devices.py No real code changes Change-Id: I941a76230fd5cc3c28495c5fa8526f8735bb51ef Signed-off-by: Martin Polednik --- M vdsm/virt/devices.py M vdsm/virt/vm.py 2 files changed, 16 insertions(+), 16 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/61/29261/1 diff --git a/vdsm/virt/devices.py b/vdsm/virt/devices.py index d484136..8e0d302 100644 --- a/vdsm/virt/devices.py +++ b/vdsm/virt/devices.py @@ -32,3 +32,18 @@ Create domxml for general device """ return self.createXmlElem(self.type, self.device, ['address']) + + +class ControllerDevice(VmDevice): +__slots__ = ('address', 'model', 'index', 'master') + +def getXML(self): +""" +Create domxml for controller device +""" +ctrl = self.createXmlElem('controller', self.device, + ['index', 'model', 'master', 'address']) +if self.device == 'virtio-serial': +ctrl.setAttrs(index='0', ports='16') + +return ctrl diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index a0f4edf..41c91bb 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -613,21 +613,6 @@ return f -class ControllerDevice(devices.VmDevice): -__slots__ = ('address', 'model', 'index', 'master') - -def getXML(self): -""" -Create domxml for controller device -""" -ctrl = self.createXmlElem('controller', self.device, - ['index', 'model', 'master', 'address']) -if self.device == 'virtio-serial': -ctrl.setAttrs(index='0', ports='16') - -return ctrl - - class VideoDevice(devices.VmDevice): __slots__ = ('address',) @@ -1347,7 +1332,7 @@ (SOUND_DEVICES, SoundDevice), (VIDEO_DEVICES, VideoDevice), (GRAPHICS_DEVICES, GraphicsDevice), - (CONTROLLER_DEVICES, ControllerDevice), + (CONTROLLER_DEVICES, devices.ControllerDevice), (GENERAL_DEVICES, devices.GeneralDevice), (BALLOON_DEVICES, BalloonDevice), (WATCHDOG_DEVICES, WatchdogDevice), -- To view, visit http://gerrit.ovirt.org/29261 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I941a76230fd5cc3c28495c5fa8526f8735bb51ef Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: initial split of vm devices
Martin Polednik has uploaded a new change for review. Change subject: vdsm: initial split of vm devices .. vdsm: initial split of vm devices initial boostrapping of VmDevice and GeneralDevice from devices.py Change-Id: I63b602851c17697259e86dfad3a9063447c57e50 Signed-off-by: Martin Polednik --- M debian/vdsm.install M vdsm.spec.in A vdsm/virt/devices.py M vdsm/virt/vm.py 4 files changed, 53 insertions(+), 48 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/50/29250/1 diff --git a/debian/vdsm.install b/debian/vdsm.install index aaa1ecc..96b0779 100644 --- a/debian/vdsm.install +++ b/debian/vdsm.install @@ -150,4 +150,5 @@ ./usr/share/vdsm/virt/vmpowerdown.py ./usr/share/vdsm/virt/vmstatus.py ./usr/share/vdsm/virt/xmldom.py +./usr/share/vdsm/virt/devices.py ./var/lib/polkit-1/localauthority/10-vendor.d/10-vdsm-libvirt-access.pkla diff --git a/vdsm.spec.in b/vdsm.spec.in index ac5e1c2..8e54be2 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -937,6 +937,7 @@ %{_datadir}/%{vdsm_name}/virt/vmpowerdown.py* %{_datadir}/%{vdsm_name}/virt/sampling.py* %{_datadir}/%{vdsm_name}/virt/xmldom.py* +%{_datadir}/%{vdsm_name}/virt/devices.py* %{_datadir}/%{vdsm_name}/tool %config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf diff --git a/vdsm/virt/devices.py b/vdsm/virt/devices.py new file mode 100644 index 000..d484136 --- /dev/null +++ b/vdsm/virt/devices.py @@ -0,0 +1,34 @@ +# local package imports +from . import xmldom + + +class VmDevice(xmldom.XMLDevice): +__slots__ = ('deviceType', 'device', 'alias', 'specParams', 'deviceId', + 'conf', 'log', '_deviceXML', 'type', 'custom') + +def __init__(self, conf, log, **kwargs): +self.conf = conf +self.log = log +self.specParams = {} +self.custom = kwargs.pop('custom', {}) +for attr, value in kwargs.iteritems(): +try: +setattr(self, attr, value) +except AttributeError: # skip read-only properties +self.log.debug('Ignoring param (%s, %s) in %s', attr, value, + self.__class__.__name__) +self._deviceXML = None + +def __str__(self): +attrs = [':'.join((a, str(getattr(self, a, None for a in dir(self) + if not a.startswith('__')] +return ' '.join(attrs) + + +class GeneralDevice(VmDevice): + +def getXML(self): +""" +Create domxml for general device +""" +return self.createXmlElem(self.type, self.device, ['address']) diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index d44d96d..a0f4edf 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -63,6 +63,7 @@ from . import vmexitreason from . import vmstatus from . import xmldom +from . import devices from vmpowerdown import VmShutdown, VmReboot @@ -612,39 +613,7 @@ return f -class VmDevice(xmldom.XMLDevice): -__slots__ = ('deviceType', 'device', 'alias', 'specParams', 'deviceId', - 'conf', 'log', '_deviceXML', 'type', 'custom') - -def __init__(self, conf, log, **kwargs): -self.conf = conf -self.log = log -self.specParams = {} -self.custom = kwargs.pop('custom', {}) -for attr, value in kwargs.iteritems(): -try: -setattr(self, attr, value) -except AttributeError: # skip read-only properties -self.log.debug('Ignoring param (%s, %s) in %s', attr, value, - self.__class__.__name__) -self._deviceXML = None - -def __str__(self): -attrs = [':'.join((a, str(getattr(self, a, None for a in dir(self) - if not a.startswith('__')] -return ' '.join(attrs) - - -class GeneralDevice(VmDevice): - -def getXML(self): -""" -Create domxml for general device -""" -return self.createXmlElem(self.type, self.device, ['address']) - - -class ControllerDevice(VmDevice): +class ControllerDevice(devices.VmDevice): __slots__ = ('address', 'model', 'index', 'master') def getXML(self): @@ -659,7 +628,7 @@ return ctrl -class VideoDevice(VmDevice): +class VideoDevice(devices.VmDevice): __slots__ = ('address',) def getXML(self): @@ -676,7 +645,7 @@ return video -class SoundDevice(VmDevice): +class SoundDevice(devices.VmDevice): __slots__ = ('address', 'alias') def getXML(self): @@ -688,7 +657,7 @@ return sound -class NetworkInterfaceDevice(VmDevice): +class NetworkInterfaceDevice(devices.VmDevice): __slots__ = ('nicModel', 'macAddr', 'network', 'bootOrder', 'address', 'linkActive', 'portMirroring', 'filter', 'sndbufParam', 'driver', 'name') @@ -702,7 +671,7 @@ kwargs[attr] = 'virtio' elif attr == 'network' and value == '': kw
Change in vdsm[master]: vdsm: isolate VmDevice xml generation method
Martin Polednik has uploaded a new change for review. Change subject: vdsm: isolate VmDevice xml generation method .. vdsm: isolate VmDevice xml generation method VmDevice class uses helper function 'createXmlElem' to ease generating of XML for devices. This patch moves the function to xmldom in the form of new parent class for VmDevice, separating the logic and xml generation. (inspired by http://gerrit.ovirt.org/#/c/17694/) Change-Id: I026917641da7e1a55b15ae3238ee545023cf129e Signed-off-by: Martin Polednik --- M vdsm/virt/vm.py M vdsm/virt/xmldom.py 2 files changed, 30 insertions(+), 24 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/29249/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index f85369d..d44d96d 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -612,7 +612,7 @@ return f -class VmDevice(object): +class VmDevice(xmldom.XMLDevice): __slots__ = ('deviceType', 'device', 'alias', 'specParams', 'deviceId', 'conf', 'log', '_deviceXML', 'type', 'custom') @@ -633,29 +633,6 @@ attrs = [':'.join((a, str(getattr(self, a, None for a in dir(self) if not a.startswith('__')] return ' '.join(attrs) - -def createXmlElem(self, elemType, deviceType, attributes=()): -""" -Create domxml device element according to passed in params -""" -elemAttrs = {} -element = xmldom.XMLElement(elemType) - -if deviceType: -elemAttrs['type'] = deviceType - -for attrName in attributes: -if not hasattr(self, attrName): -continue - -attr = getattr(self, attrName) -if isinstance(attr, dict): -element.appendChildWithArgs(attrName, **attr) -else: -elemAttrs[attrName] = attr - -element.setAttrs(**elemAttrs) -return element class GeneralDevice(VmDevice): diff --git a/vdsm/virt/xmldom.py b/vdsm/virt/xmldom.py index 8dc2e89..ce48b5e 100644 --- a/vdsm/virt/xmldom.py +++ b/vdsm/virt/xmldom.py @@ -37,6 +37,35 @@ return xmlNode.nodeType == Node.ELEMENT_NODE +class XMLDevice(object): +# since we're inheriting all VM devices from this class, __slots__ must +# be initialized here in order to avoid __dict__ creation +__slots__ = () + +def createXmlElem(self, elemType, deviceType, attributes=()): +""" +Create domxml device element according to passed in params +""" +elemAttrs = {} +element = XMLElement(elemType) + +if deviceType: +elemAttrs['type'] = deviceType + +for attrName in attributes: +if not hasattr(self, attrName): +continue + +attr = getattr(self, attrName) +if isinstance(attr, dict): +element.appendChildWithArgs(attrName, **attr) +else: +elemAttrs[attrName] = attr + +element.setAttrs(**elemAttrs) +return element + + class XMLElement(object): def __init__(self, tagName, text=None, **attrs): -- To view, visit http://gerrit.ovirt.org/29249 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I026917641da7e1a55b15ae3238ee545023cf129e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: disable virtio-rng on rhel < 7.1
Martin Polednik has posted comments on this change. Change subject: vdsm: disable virtio-rng on rhel < 7.1 .. Patch Set 2: still not using distutils as libvirt returns the version in format friendly for simple >= relation -- To view, visit http://gerrit.ovirt.org/28838 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3493fec50d5d0e055a09f3393c86ff76f2a1ce5a Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: virt: move XML processing in a module
Martin Polednik has posted comments on this change. Change subject: virt: move XML processing in a module .. Patch Set 2: i myself find the name quite ok - kinda intuitive and autocomplete friendly -- To view, visit http://gerrit.ovirt.org/26855 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I77dd048067b8abcb77f4b9bf55fbfd0535672996 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: allow window=1 in AdvancedStatsFunction
Martin Polednik has posted comments on this change. Change subject: sampling: allow window=1 in AdvancedStatsFunction .. Patch Set 3: Code-Review+1 as long as invalid values are properly tested, i see no problem with this (and failure of tests might actually show us different problems) -- To view, visit http://gerrit.ovirt.org/28992 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2ce1fed5a211ed58b7df4728d5bfc3c17fccfbd8 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for hot(un)plug of host devices
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for hot(un)plug of host devices .. Patch Set 4: (1 comment) http://gerrit.ovirt.org/#/c/22523/4/vdsm/rpc/vdsmapi-schema.json File vdsm/rpc/vdsmapi-schema.json: Line 6627: # Line 6628: # Returns: Line 6629: # The VM definition, as updated Line 6630: # Line 6631: # Since: 4.14.0 > 4.15.0 shouldn't that be 4.16.0 already? Line 6632: ## Line 6633: {'command': {'class': 'VM', 'name': 'hotplugHostdev'}, Line 6634: 'data': {'vmID': 'UUID', 'hostdevName': 'str'}, Line 6635: 'returns': 'VmDefinition'} -- To view, visit http://gerrit.ovirt.org/22523 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8fbf4a1d62789d9404e5977eb7eb01b17a1a43fb Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Itamar Heim Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm hostdev: add support for SCSI devices
Martin Polednik has uploaded a new change for review. Change subject: vdsm hostdev: add support for SCSI devices .. vdsm hostdev: add support for SCSI devices Libvirt allows passthrough of SCSI devices - this patch exposes the functionality in vdsm Change-Id: Ia953bcd5eda1b97235a8dd2f5f9593d8f302e5d6 Signed-off-by: Martin Polednik --- M vdsm/caps.py M vdsm/rpc/vdsmapi-schema.json M vdsm/virt/vm.py 3 files changed, 51 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/58/29058/1 diff --git a/vdsm/caps.py b/vdsm/caps.py index 8c16af6..6112763 100644 --- a/vdsm/caps.py +++ b/vdsm/caps.py @@ -530,7 +530,7 @@ # back that we could use to uniquely identify and initiate a device continue -if capability in ('pci', 'usb_device'): +if capability in ('pci', 'usb_device', 'scsi'): # Libvirt only allows to attach USB device with capability 'usb', # but the bus identifies itself as 'usb' while device as # 'usb_device' diff --git a/vdsm/rpc/vdsmapi-schema.json b/vdsm/rpc/vdsmapi-schema.json index ac10144..52f20c1 100644 --- a/vdsm/rpc/vdsmapi-schema.json +++ b/vdsm/rpc/vdsmapi-schema.json @@ -3180,9 +3180,11 @@ # # @usb: USB device # +# @scsi:SCSI device +# # Since: 4.16.0 ## -{'enum': 'HostDeviceCapability', 'data': ['pci', 'usb']} +{'enum': 'HostDeviceCapability', 'data': ['pci', 'usb', 'scsi']} ## # @HostDeviceSpecParams: @@ -3200,11 +3202,18 @@ # @startupPolicy: #optional Possible boot handling with attached device # (for @usb) # +# @readonly #optional If present, indicates that the device is read +# only (for @scsi) +# +# @shareable#optional If present, this indicates the device is +# expected to be shared between domains (for @scsi) +# # Since: 4.16.0 ## {'type': 'HostDeviceSpecParams', 'data': {'*bootorder': 'int', '*bar': 'bool', '*file': 'str', - '*startupPolicy': 'StartupPolicy'}} + '*startupPolicy': 'StartupPolicy', '*shareable': 'bool', + '*readonly*': 'bool'}} ## # @HostDevice: diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 6a6978e..3cb2eb9 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -1670,6 +1670,33 @@ addr['vendor_id'], addr['bus'], addr['device']) return addr +def getScsiAddr(self): +capsxml = self._parsecaps() +addr = {} + +addr['type'] = 'scsi' +addr['bus'] = capsxml.getElementsByTagName('bus')[0].firstChild. \ +nodeValue +addr['target'] = capsxml.getElementsByTagName('target')[0]. \ +firstChild.nodeValue +addr['unit'] = capsxml.getElementsByTagName('lun')[0]. \ +firstChild.nodeValue + +self.log.debug('SCSI device %s at address ' + '{bus: %s, target: %s, unit: %s}', + self.name, addr['bus'], addr['target'], addr['unit'], + addr['device']) +return addr + +def getScsiAdapter(self): +capsxml = self._parsecaps() + +adapter = 'scsi_host{}'.format( +capsxml.getElementsByTagName('host')[0].firstChild.nodeValue) + +self.log.debug('SCSI device %s adapter %s', self.name, adapter) +return adapter + def getXML(self): """ Create domxml for a hostdev device. @@ -1717,6 +1744,18 @@ if 'startupPolicy' in self.specParams: source.setAttrs(startupPolicy=self.specParams['startupPolicy']) +elif self.capability == 'scsi': +source.appendChildWithArgs('address', None, + **self.getScsiHost()) +source.appendChildWithArgs('adapter', None, + **self.getScsiAdapter()) + +if 'readonly' in self.specParams: +hostdev.appendChild('readonly') + +if 'shareable' in self.specParams: +hostdev.appendChild('shareable') + return hostdev -- To view, visit http://gerrit.ovirt.org/29058 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia953bcd5eda1b97235a8dd2f5f9593d8f302e5d6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm hostdev: add support for USB devices
Martin Polednik has uploaded a new change for review. Change subject: vdsm hostdev: add support for USB devices .. vdsm hostdev: add support for USB devices Libvirt allows passthrough of USB devices (not busses) - this patch exposes the functionality in vdsm Change-Id: Iac74e7537d56bcb940ef07a4654d45cbcdbb1fb0 Signed-off-by: Martin Polednik --- M vdsm/caps.py M vdsm/rpc/vdsmapi-schema.json M vdsm/virt/vm.py 3 files changed, 71 insertions(+), 10 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/29054/1 diff --git a/vdsm/caps.py b/vdsm/caps.py index d937d4e..8c16af6 100644 --- a/vdsm/caps.py +++ b/vdsm/caps.py @@ -530,7 +530,12 @@ # back that we could use to uniquely identify and initiate a device continue -if capability in ('pci',): +if capability in ('pci', 'usb_device'): +# Libvirt only allows to attach USB device with capability 'usb', +# but the bus identifies itself as 'usb' while device as +# 'usb_device' +if dev['capability'] == 'usb_device': +dev['capability'] = 'usb' devices.append(dev) return devices diff --git a/vdsm/rpc/vdsmapi-schema.json b/vdsm/rpc/vdsmapi-schema.json index 921f3d4..ac10144 100644 --- a/vdsm/rpc/vdsmapi-schema.json +++ b/vdsm/rpc/vdsmapi-schema.json @@ -3156,33 +3156,55 @@ 'specParams': 'VmRngDeviceSpecParams'}} ## +# @StartupPolicy: +# +# Possible policies for startup with device +# +# @mandatory: fail if missing for any reason (the default) +# +# @requisite: fail if missing on boot up, drop if missing +# on migrate/restore/revert +# +# @optional:drop if missing at any start attempt +# +# Since: 4.16.0 +## +{'enum': 'StartupPolicy', 'data': ['mandatory', 'requisite', 'optional']} + +## # @HostDeviceCapability: # # Properties of a host device. # # @pci: PCI device # +# @usb: USB device +# # Since: 4.16.0 ## -{'enum': 'HostDeviceCapability', 'data': ['pci']} +{'enum': 'HostDeviceCapability', 'data': ['pci', 'usb']} ## # @HostDeviceSpecParams: # # Properties of a host device. # -# @bootorder: #optional If specified, this device is part of the boot -# sequence at the specified position +# @bootorder: #optional If specified, this device is part of the boot +# sequence at the specified position (for @pci and @usb) # -# @bar: #optional ROM visibility in the guest's memory map (for @pci) +# @bar: #optional ROM visibility in the guest's +# memory map (for @pci) # -# @file:#optional Binary file to be used as device's ROM (for @pci) +# @file:#optional Binary file to be used as device's ROM (for @pci) +# +# @startupPolicy: #optional Possible boot handling with attached device +# (for @usb) # # Since: 4.16.0 ## {'type': 'HostDeviceSpecParams', - 'data': {'*bootorder': 'int', '*bar': 'bool', - '*file': 'str'}} + 'data': {'*bootorder': 'int', '*bar': 'bool', '*file': 'str', + '*startupPolicy': 'StartupPolicy'}} ## # @HostDevice: diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 6143cfa..6a6978e 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -1631,13 +1631,16 @@ self.log.debug('Detaching hostdev %s', self.name) self._node.dettach() -def getPciAddr(self): +def _parsecaps(self): capsxml = _domParseStr(self._node.XMLDesc(0)).childNodes[0] self.log.debug('Got nodeDevice XML:\n%s', capsxml.toprettyxml(encoding='utf-8')) -capsxml = capsxml.getElementsByTagName('capability')[0] +return capsxml.getElementsByTagName('capability')[0] + +def getPciAddr(self): +capsxml = self._parsecaps() domain = capsxml.getElementsByTagName('domain')[0]. \ firstChild.nodeValue bus = capsxml.getElementsByTagName('bus')[0].firstChild.nodeValue @@ -1646,6 +1649,26 @@ self.log.debug('PCI device %s at address {domain: %s bus: %s ' 'slot: %s}', self.name, domain, bus, slot) return {'domain': domain, 'bus': bus, 'slot': slot} + +def getUsbAddr(self): +capsxml = self._parsecaps() +addr = {} + +addr['bus'] = capsxml.getElementsByTagName('bus')[0].firstChild. \ +nodeValue +addr['device'] = capsxml.getElementsByTagName('device')[0]. \ +firstChild.nodeValue +# TODO: handle nonexistant product_id and vendor_id by not adding them +# to addr +addr['product_id'] = capsxml.getElementsByTagName('product')[0].\ +getAttribute('id') +addr['vendor_id'] = capsxml.getElementsByTagName('vendor')[0].\ +getAttribute('id') + +self.log.debug('USB device %s {product: %s, vendor: %s} at address ' +
Change in vdsm[master]: vdsm: add support for hostdev passthrough
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for hostdev passthrough .. Patch Set 15: (2 comments) http://gerrit.ovirt.org/#/c/22462/15/vdsm/caps.py File vdsm/caps.py: Line 505: # we can still report back the name Line 506: pass Line 507: except IndexError: Line 508: # should device not have a name, there is nothing engine could send Line 509: # back that we could use to uniquely identify and initiate a device > Then please consider to add a warning here. This is in the "should not ever happen" class, and it's occurrence would probably be spotted way sooner - in this case the warning would be irrelevant Line 510: continue Line 511: Line 512: if capability in supportedDevices: Line 513: devices.append(dev) http://gerrit.ovirt.org/#/c/22462/15/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 4569: Line 4570: # we have to manually reattach passthrough devices Line 4571: for dev in self._devices[HOSTDEV_DEVICES]: Line 4572: self.log.debug('Retaching device %s', dev.name) Line 4573: dev._nodeptr.reAttach() > We have the same snippet twice, so we reached the threshold for moving this You have actually spotted a code that happened by mistake, it only belongs here. Line 4574: Line 4575: hooks.before_vm_destroy(self._lastXMLDesc, self.conf) Line 4576: self.destroyed = True Line 4577: -- To view, visit http://gerrit.ovirt.org/22462 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I363d2622d72ca2db75f60032fe0892c348bab121 Gerrit-PatchSet: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Douglas Schilling Landgraf Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: disable virtio-rng on rhel < 7.1
Martin Polednik has uploaded a new change for review. Change subject: vdsm: disable virtio-rng on rhel < 7.1 .. vdsm: disable virtio-rng on rhel < 7.1 Virtio-rng support was added in libvirt 1.0.3, which is unavailable in rhel versions < 7.1. The support can be indicated by not sending the rngSources in hostCapabilities. Change-Id: I3493fec50d5d0e055a09f3393c86ff76f2a1ce5a Signed-off-by: Martin Polednik --- M vdsm/caps.py 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/38/28838/1 diff --git a/vdsm/caps.py b/vdsm/caps.py index 68851c9..fd20b01 100644 --- a/vdsm/caps.py +++ b/vdsm/caps.py @@ -599,7 +599,9 @@ caps['reservedMem'] = str(config.getint('vars', 'host_mem_reserve') + config.getint('vars', 'extra_mem_reserve')) caps['guestOverhead'] = config.get('vars', 'guest_ram_overhead') -caps['rngSources'] = _getRngSources() +# rng device is supported in rhel >= 7.1 +if caps['operatingSystem']['release'] >= '7.1.0.0el6': +caps['rngSources'] = _getRngSources() caps['numaNodes'] = getNumaTopology() caps['numaNodeDistance'] = getNumaNodeDistance() caps['autoNumaBalancing'] = getAutoNumaBalancingInfo() -- To view, visit http://gerrit.ovirt.org/28838 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3493fec50d5d0e055a09f3393c86ff76f2a1ce5a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: faqemu hook: move memory limitation to config
Martin Polednik has posted comments on this change. Change subject: faqemu hook: move memory limitation to config .. Patch Set 5: Verified+1 -- To view, visit http://gerrit.ovirt.org/28320 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0ffeaf7926dac2a0db0bdfb21416919452718531 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for hostdev passthrough
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for hostdev passthrough .. Patch Set 15: Verified+1 Verification warning: I could only verify XML generation and correct function calls, but other than that I have no hardware that supports iommu. Condisder this '+0.5 partially verified'. -- To view, visit http://gerrit.ovirt.org/22462 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I363d2622d72ca2db75f60032fe0892c348bab121 Gerrit-PatchSet: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Douglas Schilling Landgraf Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsmapi-schema: fix typo in tpm device
Martin Polednik has posted comments on this change. Change subject: vdsmapi-schema: fix typo in tpm device .. Patch Set 1: Verified+1 -- To view, visit http://gerrit.ovirt.org/28393 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I38c616af488f0861e9357249c00c47271e033832 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: faqemu hook: move memory limitation to config
Martin Polednik has posted comments on this change. Change subject: faqemu hook: move memory limitation to config .. Patch Set 3: -Verified (1 comment) http://gerrit.ovirt.org/#/c/28320/3/vdsm_hooks/faqemu/before_vm_start.py File vdsm_hooks/faqemu/before_vm_start.py: Line 31: Line 32: memory = config.get('vars', 'fake_kvm_memory', None) Line 33: arch = config.get('vars', 'fake_kvm_architecture') Line 34: Line 35: if memory is None: > How can memory be ever "None"? You define its default as '0' (and as such, I've apparently misunderstood how our config works (missed set_defaults call)... Line 36: if arch == 'x86_64': Line 37: memory = '20480' Line 38: if arch == 'ppc64': Line 39: memory = '262144' -- To view, visit http://gerrit.ovirt.org/28320 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0ffeaf7926dac2a0db0bdfb21416919452718531 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: faqemu hook: move memory limitation to config
Martin Polednik has posted comments on this change. Change subject: faqemu hook: move memory limitation to config .. Patch Set 3: Verified+1 -- To view, visit http://gerrit.ovirt.org/28320 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0ffeaf7926dac2a0db0bdfb21416919452718531 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: faqemu hook: move memory limitation to config
Martin Polednik has posted comments on this change. Change subject: faqemu hook: move memory limitation to config .. Patch Set 3: (1 comment) http://gerrit.ovirt.org/#/c/28320/3/vdsm_hooks/faqemu/before_vm_start.py File vdsm_hooks/faqemu/before_vm_start.py: Line 32: memory = config.get('vars', 'fake_kvm_memory', None) Line 33: arch = config.get('vars', 'fake_kvm_architecture') Line 34: Line 35: if memory is None: Line 36: if arch == 'x86_64': > I think ht efirst version was better - I don't particularly like magic numb Config keys are commented by default, making them more of an indication rather than setting. This way, x86 and ppc is preserved, allowing for setting upper memory limit / using direct vmCreate memory limit. Line 37: memory = '20480' Line 38: if arch == 'ppc64': Line 39: memory = '262144' Line 40: -- To view, visit http://gerrit.ovirt.org/28320 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0ffeaf7926dac2a0db0bdfb21416919452718531 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsmapi-schema: fix typo in tpm device
Martin Polednik has uploaded a new change for review. Change subject: vdsmapi-schema: fix typo in tpm device .. vdsmapi-schema: fix typo in tpm device Small typo in documentation, VmTpmDeviceType is in no way related to smartcard. Change-Id: I38c616af488f0861e9357249c00c47271e033832 Signed-off-by: Martin Polednik --- M vdsm_api/vdsmapi-schema.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/93/28393/1 diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json index 993c7f4..c7d499d 100644 --- a/vdsm_api/vdsmapi-schema.json +++ b/vdsm_api/vdsmapi-schema.json @@ -2957,7 +2957,7 @@ ## # @VmTpmDeviceType: # -# An enumeration of VM smartcard device types. +# An enumeration of VM tpm device types. # # @tpm: A tpm # -- To view, visit http://gerrit.ovirt.org/28393 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38c616af488f0861e9357249c00c47271e033832 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: faqemu hook: move memory limitation to config
Martin Polednik has posted comments on this change. Change subject: faqemu hook: move memory limitation to config .. Patch Set 1: Verified+1 -- To view, visit http://gerrit.ovirt.org/28320 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0ffeaf7926dac2a0db0bdfb21416919452718531 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for hostdev passthrough
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for hostdev passthrough .. Patch Set 10: No, we realized that the libvirt device XML is not usable as hostdev XML, therefore adding the need to generate it in VDSM. Consider version 10 as WIP as it needs a bit more analysis. Also, i'll probably keep it to pci passthrough currently, adding usb and more importantly scsi (more difficult) in separate patches. -- To view, visit http://gerrit.ovirt.org/22462 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I363d2622d72ca2db75f60032fe0892c348bab121 Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Douglas Schilling Landgraf Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: faqemu hook: move memory limitation to config
Martin Polednik has uploaded a new change for review. Change subject: faqemu hook: move memory limitation to config .. faqemu hook: move memory limitation to config Qemu supports more than 20 MB memory[1], removing the need for hardcoded memory limit. This patch allows faqemu memory to be either unchanged, or limited by the configuration file. Usage of > 20 MB memory is required when running faqemu with system kernel/initramfs combo. [1] https://code.launchpad.net/~rvb/maas-test/memory-limit/+merge/198101 Change-Id: I0ffeaf7926dac2a0db0bdfb21416919452718531 Signed-off-by: Martin Polednik --- M lib/vdsm/config.py.in M vdsm_hooks/faqemu/before_vm_start.py 2 files changed, 9 insertions(+), 11 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/20/28320/1 diff --git a/lib/vdsm/config.py.in b/lib/vdsm/config.py.in index 8eb1811..2f9eecc 100644 --- a/lib/vdsm/config.py.in +++ b/lib/vdsm/config.py.in @@ -183,6 +183,8 @@ ('fake_kvm_architecture', 'x86_64', 'Choose the target architecture of the fake KVM mode'), +('fake_kvm_memory', '262144', None), + ('xmlrpc_enable', 'true', 'Enable the xmlrpc server'), ('xmlrpc_http11', 'true', diff --git a/vdsm_hooks/faqemu/before_vm_start.py b/vdsm_hooks/faqemu/before_vm_start.py old mode 100755 new mode 100644 index 9539810..92a4a9e --- a/vdsm_hooks/faqemu/before_vm_start.py +++ b/vdsm_hooks/faqemu/before_vm_start.py @@ -29,19 +29,15 @@ graphics = domxml.getElementsByTagName("graphics")[0] graphics.removeAttribute("passwdValidTo") -for memtag in ("memory", "currentMemory"): -memvalue = domxml.getElementsByTagName(memtag)[0] -while memvalue.firstChild: -memvalue.removeChild(memvalue.firstChild) +memory = config.get('vars', 'fake_kvm_memory', None) -arch = config.get('vars', 'fake_kvm_architecture') +if memory: +for memtag in ("memory", "currentMemory"): +memvalue = domxml.getElementsByTagName(memtag)[0] +while memvalue.firstChild: +memvalue.removeChild(memvalue.firstChild) -if arch == 'x86_64': -memory = '20480' -elif arch == 'ppc64': -memory = '262144' - -memvalue.appendChild(domxml.createTextNode(memory)) +memvalue.appendChild(domxml.createTextNode(memory)) for cputag in domxml.getElementsByTagName("cpu"): cputag.parentNode.removeChild(cputag) -- To view, visit http://gerrit.ovirt.org/28320 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ffeaf7926dac2a0db0bdfb21416919452718531 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for hostdev passthrough
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for hostdev passthrough .. Patch Set 7: (2 comments) http://gerrit.ovirt.org/#/c/22462/7/vdsm/caps.py File vdsm/caps.py: Line 325: # representation of the device Line 326: try: Line 327: dev['name'] = devXML.getElementsByTagName('name')[0].\ Line 328: childNodes[0].data Line 329: capability = devXML.getElementsByTagName('capability')[0] > please consider enhancements in http://gerrit.ovirt.org/#/c/14237 as well, Current implementation's display capabilities are equivalent of virt-manager's, do we want to add lspci parsing? We'd need whole lspci as dependancy. Line 330: try: Line 331: dev['product'] = capability.getElementsByTagName('product')[0]\ Line 332: .childNodes[0].data Line 333: dev['vendor'] = capability.getElementsByTagName('vendor')[0].\ http://gerrit.ovirt.org/#/c/22462/7/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 1405: Line 1406: Line 1407: Line 1408: Line 1409: > does it do startupPolicy? I've missed this but libvirt indeed allows hostdev's to be bootable devices, I'll look at possible integration in future patch (might need to be similar to network in hostdev handling) Line 1410: Line 1411: Line 1412: """ Line 1413: # libvirt gives us direct api call to construct the XML -- To view, visit http://gerrit.ovirt.org/22462 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I363d2622d72ca2db75f60032fe0892c348bab121 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Douglas Schilling Landgraf Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vm: added missing diskReplicate slot in Drive class
Martin Polednik has posted comments on this change. Change subject: vm: added missing diskReplicate slot in Drive class .. Patch Set 2: Code-Review+1 -- To view, visit http://gerrit.ovirt.org/28131 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iffd1e8605786c41920f5c5f171e42fb9a12474dc Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Daniel Erez Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Daniel Erez Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: virt: retry to connect to VDSM at startup
Martin Polednik has posted comments on this change. Change subject: tests: virt: retry to connect to VDSM at startup .. Patch Set 3: Code-Review+1 -- To view, visit http://gerrit.ovirt.org/26638 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic3a6e9e484d7bf0c506b804131b9e958deff5692 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for S3/S4 suspend calls
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for S3/S4 suspend calls .. Patch Set 8: (2 comments) http://gerrit.ovirt.org/#/c/19389/8/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 2304: def pmWakeup(self): Line 2305: self.log.debug('pmWakeup Called') Line 2306: hooks.after_vm_dehibernate(self._dom.XMLDesc(0), self.conf) Line 2307: try: Line 2308: self._dom.pMWakeup() > This looks suspicious. AFAIK is PMWakeup(); however below you use pmWakeup( libvirt.virDomain has pMWakeup(self, flags) atleast in my version, could you verify that this is wrong? pmWakeup() is to reflect the name of function we use in order to keep conventions (imho pmWakeup is correct) Line 2309: except: Line 2310: self.log.error("pmWakeup failed", exc_info=True) Line 2311: return {'status': {'code': errCode['exist']['status']['code'], Line 2312: 'message': 'Failed to wake up VM.'}} Line 2339: self.log.error("pmSuspend failed", exc_info=True) Line 2340: return {'status': {'code': errCode['exist']['status']['code'], Line 2341: 'message': 'Failed to suspend VM.'}} Line 2342: else: Line 2343: # We have to treat hybrid as standard S3 > So it is impossible we get here if target is S4? false, the comment is only to reflect that if hybrid was called, we treat it the same way as suspend (it's a bit tricky as hybrid should never fallback to hibernate in virtual environment) Line 2344: self.log.debug('pmSuspend succeeded') Line 2345: if target in ('mem', 'hybrid'): Line 2346: self.lastStatus = 'Paused' Line 2347: self.conf['pauseCode'] = targets[target]['reason'] -- To view, visit http://gerrit.ovirt.org/19389 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic30016c5cd555f5771dde8db3f1340e1c11b3da7 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Ayal Baron Gerrit-Reviewer: Better Saggi Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for hot(un)plug of pci-passthrough devices
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for hot(un)plug of pci-passthrough devices .. Patch Set 3: waiting for http://gerrit.ovirt.org/#/c/22462/ in case of changes -- To view, visit http://gerrit.ovirt.org/22523 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8fbf4a1d62789d9404e5977eb7eb01b17a1a43fb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Itamar Heim Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: validate cdrom path sent to/received from vdsm
Martin Polednik has posted comments on this change. Change subject: tests: validate cdrom path sent to/received from vdsm .. Patch Set 4: Verified+1 Addresed Francesco's comments. -- To view, visit http://gerrit.ovirt.org/22194 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I620c481056f7ee3b4d3270ba1f4bc45cbb132ebb Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for TPM device passthrough
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for TPM device passthrough .. Patch Set 4: Verified+1 -- To view, visit http://gerrit.ovirt.org/20649 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I53a77a0977d367d1066e85590dd35b18bb5fa32a Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Saggi Mizrahi Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: add initial tests for timeOffset handling
Martin Polednik has posted comments on this change. Change subject: tests: add initial tests for timeOffset handling .. Patch Set 4: Code-Review+1 -- To view, visit http://gerrit.ovirt.org/24252 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8925945686e6dd3a6a83a87e26157aba12ec1bd3 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for hostdev passthrough
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for hostdev passthrough .. Patch Set 6: Verified+1 Verified through supplied functional test (XML being passed to libvirt correctly, caps being reported correctly). -- To view, visit http://gerrit.ovirt.org/22462 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I363d2622d72ca2db75f60032fe0892c348bab121 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vmDevices: add __slots__ to devices
Martin Polednik has posted comments on this change. Change subject: vmDevices: add __slots__ to devices .. Patch Set 6: Verified+1 Tested by functional tests and on oVirt setup, creating VMs with various (exotic) device combinations and multiple drives. -- To view, visit http://gerrit.ovirt.org/21036 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6e8dadabdd02d3b44606f215c4bc7b7e306a591a Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vmDevices: add __slots__ to devices
Martin Polednik has posted comments on this change. Change subject: vmDevices: add __slots__ to devices .. Patch Set 6: Only the suggested cleanup (removed the unneeded pass; changed order of variable initialization in __init__) -- To view, visit http://gerrit.ovirt.org/21036 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6e8dadabdd02d3b44606f215c4bc7b7e306a591a Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vmDevices: add __slots__ to devices
Martin Polednik has posted comments on this change. Change subject: vmDevices: add __slots__ to devices .. Patch Set 5: (1 comment) http://gerrit.ovirt.org/#/c/21036/5//COMMIT_MSG Commit Message: Line 8: Line 9: VDSM devices are created using setattr over **kwargs, making the Line 10: initialization implicit. Implementing __slots__ does define which Line 11: attributes does the device accept and also slightly improves memory footprint. Line 12: > well, it's not really part of the patch, it's just an example of why we wan The patch doesn't relate to the bug and doing so (setting all the attrs to None) is impossible within single patch due to Drive code depending on unset variables (sgio). Line 13: Change-Id: I6e8dadabdd02d3b44606f215c4bc7b7e306a591a -- To view, visit http://gerrit.ovirt.org/21036 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6e8dadabdd02d3b44606f215c4bc7b7e306a591a Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: clientIF: prepareVolumePath payload cleanup
Martin Polednik has posted comments on this change. Change subject: clientIF: prepareVolumePath payload cleanup .. Patch Set 7: Code-Review+1 -- To view, visit http://gerrit.ovirt.org/22928 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3a630d74ec0910c669e0326ad343c5dbea25357e Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Eduardo Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: test virt_functional tests
Martin Polednik has abandoned this change. Change subject: tests: test virt_functional tests .. Abandoned -- To view, visit http://gerrit.ovirt.org/24325 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I96a702579fdad5ff81bf1f525eaadbe3095b4ebf Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: oVirt Jenkins CI Server ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: add initial tests for timeOffset handling
Martin Polednik has posted comments on this change. Change subject: tests: add initial tests for timeOffset handling .. Patch Set 3: Code-Review-1 You could also add test that would issue multiple _rtcUpdate calls and check that the timeOffset is only sum of BASE_OFFSET and UPDATE_OFFSET (which would test correctly against the bug we fixed with rtc update). -- To view, visit http://gerrit.ovirt.org/24252 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8925945686e6dd3a6a83a87e26157aba12ec1bd3 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: test virt_functional tests
Martin Polednik has uploaded a new change for review. Change subject: tests: test virt_functional tests .. tests: test virt_functional tests Change-Id: I96a702579fdad5ff81bf1f525eaadbe3095b4ebf Signed-off-by: Martin Polednik --- M vdsm/vm.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/25/24325/1 diff --git a/vdsm/vm.py b/vdsm/vm.py index e7c1c88..5330b2d 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -19,7 +19,7 @@ # -# stdlib imports +# stdlib imports from contextlib import contextmanager from copy import deepcopy from xml.dom import Node -- To view, visit http://gerrit.ovirt.org/24325 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I96a702579fdad5ff81bf1f525eaadbe3095b4ebf Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sd: fix volume path returned by linkBCImage
Martin Polednik has posted comments on this change. Change subject: sd: fix volume path returned by linkBCImage .. Patch Set 1: Code-Review+1 -- To view, visit http://gerrit.ovirt.org/24315 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iea497b574d9a9a7e0e9b8e234e2bd9b9d983a60c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Ayal Baron Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for S3/S4 suspend calls
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for S3/S4 suspend calls .. Patch Set 7: Verified+1 Jenkins messages seem unrelated; tested by functional test and on oVirt setup with GA installed. -- To view, visit http://gerrit.ovirt.org/19389 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic30016c5cd555f5771dde8db3f1340e1c11b3da7 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Ayal Baron Gerrit-Reviewer: Better Saggi Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: validate cdrom path sent to/received from vdsm
Martin Polednik has posted comments on this change. Change subject: tests: validate cdrom path sent to/received from vdsm .. Patch Set 3: Verified+1 -- To view, visit http://gerrit.ovirt.org/22194 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I620c481056f7ee3b4d3270ba1f4bc45cbb132ebb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.3]: vdsm: fix RTC offset
Martin Polednik has posted comments on this change. Change subject: vdsm: fix RTC offset .. Patch Set 1: Verified+1 Time reported correctly (fortunately no modification required). -- To view, visit http://gerrit.ovirt.org/24260 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I27c70a53f64fb05607e93bffbac25fdee7d1cd2a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.3 Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Peter V. Saveliev Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.4]: vdsm: fix RTC offset
Martin Polednik has posted comments on this change. Change subject: vdsm: fix RTC offset .. Patch Set 1: Verified+1 Behaves same as master. -- To view, visit http://gerrit.ovirt.org/24196 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I27c70a53f64fb05607e93bffbac25fdee7d1cd2a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.4 Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Peter V. Saveliev Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.3]: vdsm: fix RTC offset
Hello Dan Kenigsberg, Peter V. Saveliev, I'd like you to do a code review. Please visit http://gerrit.ovirt.org/24260 to review the following change. Change subject: vdsm: fix RTC offset .. vdsm: fix RTC offset Upon RTC update (hwclock --systohc) on the guest side, libvirt sends the event with RTC offset from the qemu start -rtc value in seconds. The received offset should not replace the previous value, but should be added to it. Since the time update event is relative to the qemu start time, we should store the initial value and use it for the calculation. Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=956741 Change-Id: I27c70a53f64fb05607e93bffbac25fdee7d1cd2a Signed-off-by: Peter V. Saveliev Reviewed-on: http://gerrit.ovirt.org/14750 Tested-by: Martin Polednik Reviewed-by: Dan Kenigsberg --- M vdsm/vm.py 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/60/24260/1 diff --git a/vdsm/vm.py b/vdsm/vm.py index 475f6ce..eabb276 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -1742,6 +1742,7 @@ self.id = self.conf['vmId'] self._volPrepareLock = threading.Lock() self._initTimePauseCode = None +self._initTimeRTC = long(self.conf.get('timeOffset', 0)) self.guestAgent = None self._guestEvent = 'Powering up' self._guestEventTime = 0 @@ -2268,9 +2269,10 @@ timer.start() def _rtcUpdate(self, timeOffset): -self.log.debug('new rtc offset %s', timeOffset) +newTimeOffset = str(self._initTimeRTC + long(timeOffset)) +self.log.debug('new rtc offset %s', newTimeOffset) with self._confLock: -self.conf['timeOffset'] = timeOffset +self.conf['timeOffset'] = newTimeOffset def extendDriveVolume(self, vmDrive): if not vmDrive.blockDev: -- To view, visit http://gerrit.ovirt.org/24260 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I27c70a53f64fb05607e93bffbac25fdee7d1cd2a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.3 Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Peter V. Saveliev ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vm: discover volume path from xml definition
Martin Polednik has posted comments on this change. Change subject: vm: discover volume path from xml definition .. Patch Set 1: Code-Review+1 -- To view, visit http://gerrit.ovirt.org/24202 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I322f1f879fbd5b6415789f3b307e8741d846d694 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli Gerrit-Reviewer: Ayal Baron Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Sergey Gotliv Gerrit-Reviewer: Vinzenz Feenstra Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: add initial tests for timeOffset handling
Martin Polednik has posted comments on this change. Change subject: tests: add initial tests for timeOffset handling .. Patch Set 1: Code-Review+1 Definitely +1 on the code if the test itself is desired. -- To view, visit http://gerrit.ovirt.org/24252 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8925945686e6dd3a6a83a87e26157aba12ec1bd3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: add initial tests for timeOffset handling
Martin Polednik has posted comments on this change. Change subject: tests: add initial tests for timeOffset handling .. Patch Set 1: I'm not sure we need to test it at this moment: according to Michal, timeOffset is mostly legacy and will remain unused, maybe eventually be removed in future. -- To view, visit http://gerrit.ovirt.org/24252 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8925945686e6dd3a6a83a87e26157aba12ec1bd3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.4]: vdsm: fix RTC offset
Martin Polednik has posted comments on this change. Change subject: vdsm: fix RTC offset .. Patch Set 1: Code-Review+1 -- To view, visit http://gerrit.ovirt.org/24196 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I27c70a53f64fb05607e93bffbac25fdee7d1cd2a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.4 Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Peter V. Saveliev Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for S3/S4 suspend calls
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for S3/S4 suspend calls .. Patch Set 6: considered as a code preview, still needs functional tests added -- To view, visit http://gerrit.ovirt.org/19389 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic30016c5cd555f5771dde8db3f1340e1c11b3da7 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Ayal Baron Gerrit-Reviewer: Better Saggi Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: guestIF: Adding guest agent API versioning support
Martin Polednik has posted comments on this change. Change subject: guestIF: Adding guest agent API versioning support .. Patch Set 14: Code-Review+1 -- To view, visit http://gerrit.ovirt.org/17004 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9095b528c2c910f12d5f170088a458bf11c71910 Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Douglas Schilling Landgraf Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Roy Golan Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vmDevices: add __slots__ to devices
Martin Polednik has posted comments on this change. Change subject: vmDevices: add __slots__ to devices .. Patch Set 4: (1 comment) http://gerrit.ovirt.org/#/c/21036/4/vdsm/vm.py File vdsm/vm.py: Line 1253: self.log.debug('Ignoring param (%s, %s) in %s', attr, value, Line 1254:self.__class__.__name__) Line 1255: pass Line 1256: self.conf = conf Line 1257: self._deviceXML = None > We can do this in the same loop setting attributes: If you're ok with that, I'll look into it in different patch - probably listing required params as a tuple and validating that each of these is present in kwargs, raising an exception if it is not (variation of what you've written). Line 1258: Line 1259: def __str__(self): Line 1260: attrs = [':'.join((a, str(getattr(self, a, None for a in dir(self) Line 1261: if not a.startswith('__')] -- To view, visit http://gerrit.ovirt.org/21036 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6e8dadabdd02d3b44606f215c4bc7b7e306a591a Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: validate cdrom path sent to/received from vdsm
Martin Polednik has posted comments on this change. Change subject: tests: validate cdrom path sent to/received from vdsm .. Patch Set 2: Verified+1 -- To view, visit http://gerrit.ovirt.org/22194 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I620c481056f7ee3b4d3270ba1f4bc45cbb132ebb Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: [wip] modeling graphics as a device
Martin Polednik has posted comments on this change. Change subject: vdsm: [wip] modeling graphics as a device .. Patch Set 4: (3 comments) Also try to add functional test for multiple graphics devices configurations. http://gerrit.ovirt.org/#/c/23555/4/vdsm/vm.py File vdsm/vm.py: Line 1175: commandLine.appendChildWithArgs('qemu:arg', value='-usbdevice') Line 1176: commandLine.appendChildWithArgs('qemu:arg', value='keyboard') Line 1177: self.dom.appendChild(commandLine) Line 1178: Line 1179: def appendGraphicsFromDisplay(self): Try to remove this function alltogether and handle legacy graphics device in getConfGraphics / GraphicsDevice. Line 1180: """ Line 1181: Legacy add graphics section to domain xml. Line 1182: Line 1183: Line 1339: keymap='en-us' passwdValidTo='1970-01-01T00:00:01'> Line 1340: Line 1341: Line 1342: Line 1343: """ I'd rather see log messages consistent with other VDSM parts, accessible by some keyword for searching. Also, self.log.debug seems to be more appropriate. Line 1344: self.log.error("=== Using new GraphicsDevice") Line 1345: pprint(self.conf) Line 1346: self.log.error("*** ") Line 1347: pprint(self.specParams) Line 2109: devices[NIC_DEVICES] = self.getConfNetworkInterfaces() Line 2110: devices[SOUND_DEVICES] = self.getConfSound() Line 2111: devices[VIDEO_DEVICES] = self.getConfVideo() Line 2112: # devices[GRAPHICS_DEVICES] = self.getConfVideo() - todo isn't it Line 2113: # handled by appendGraphicsFromDisplay?? Currently yes, but in order to be consistent with other VmDevices the handling should be done in getConfGraphics. Line 2114: devices[CONTROLLER_DEVICES] = self.getConfController() Line 2115: else: Line 2116: for dev in self.conf.get('devices'): Line 2117: try: -- To view, visit http://gerrit.ovirt.org/23555 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia59b933f4cd1e3ab562ad2ec1c237007c83f214c Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Frank Kobzik Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Frank Kobzik Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vmDevices: add __slots__ to devices
Martin Polednik has posted comments on this change. Change subject: vmDevices: add __slots__ to devices .. Patch Set 4: (1 comment) The change does not change any functionality, only preserves it. http://gerrit.ovirt.org/#/c/21036/4/vdsm/vm.py File vdsm/vm.py: Line 4992: # display indexed pairs of ordered values from 2 dicts Line 4993: # such as {key_1: (valueA_1, valueB_1), ...} Line 4994: def mergeDicts(deviceDef, dev): Line 4995: return dict((k, (deviceDef[k], getattr(dev, k, None))) Line 4996: for k in deviceDef.iterkeys()) > How is this change relevant to this patch? Please split it to another patch The only 'change' is to preserve functionality - __dict__ was used before which is not possible now. Line 4997: Line 4998: self.log.debug('Looking for drive with attributes %s', deviceDict) Line 4999: for d in self._devices[DISK_DEVICES]: Line 5000: if d.path == devPath: -- To view, visit http://gerrit.ovirt.org/21036 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6e8dadabdd02d3b44606f215c4bc7b7e306a591a Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vm: implement recommended clock settings
Martin Polednik has posted comments on this change. Change subject: vm: implement recommended clock settings .. Patch Set 2: Code-Review+1 -- To view, visit http://gerrit.ovirt.org/23663 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icb0752e54a4cb9ff609b8ddfaf5c8fe2ed5b9e72 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: fix possible test failure due to reboot event
Martin Polednik has posted comments on this change. Change subject: tests: fix possible test failure due to reboot event .. Patch Set 1: Verified+1 tested multiple runs on 256mb fedora with 1 vcpu, no failure -- To view, visit http://gerrit.ovirt.org/23037 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I469794f20b2b9de5837b7361b952b906b82d8498 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for S3/S4 suspend calls
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for S3/S4 suspend calls .. Patch Set 5: (2 comments) http://gerrit.ovirt.org/#/c/19389/5/vdsm/API.py File vdsm/API.py: Line 357: stats = v.getStats().copy() Line 358: stats['vmId'] = self._UUID Line 359: return {'status': doneCode, 'statsList': [stats]} Line 360: Line 361: def wakeup(self): > From the point of view of VDSM the VM will be still running (qemu process). I've spoken to Michal about this: adding new state is not desired, therefore I'm left to work the state 'paused'. Discovery should be based on whether the engine currently handles state such as hibernation on its side or relies on VDSM: if it's on engine side, we only need to change the state internally based on response of API calls. If we depend solely on what VDSM reports, I propose adding states 'S3' and 'S4' and I'd look into mechanism of discovering these on recovery. Line 362: try: Line 363: v = self._cif.vmContainer[self._UUID] Line 364: response = v.pmWakeup() Line 365: except KeyError: Line 365: except KeyError: Line 366: return errCode['noVM'] Line 367: return response Line 368: Line 369: def hibernate(self, target): > This behaves like shutdown. Should it become an additional option for shutd The verb 'hibernate' already exists (for our migrate to file 'hibernate'). Line 370: """ Line 371: Hibernate a VM. Line 372: Line 373: :param mode: mem/disk/hybrid/hiberVolHandle -- To view, visit http://gerrit.ovirt.org/19389 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic30016c5cd555f5771dde8db3f1340e1c11b3da7 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Ayal Baron Gerrit-Reviewer: Better Saggi Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for PCI passthrough
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for PCI passthrough .. Patch Set 5: (2 comments) http://gerrit.ovirt.org/#/c/22462/5//COMMIT_MSG Commit Message: Line 3: AuthorDate: 2013-12-17 12:54:57 +0100 Line 4: Commit: Martin Polednik Line 5: CommitDate: 2013-12-20 13:04:09 +0100 Line 6: Line 7: vdsm: add support for PCI passthrough > Is this really only for PCI? It seems that it could handle any other type ( Correct, as long as libvirt allows the device to be passthrough'd it will be available. I'll update the commit message later (if some code concerns arise to reduce the number of patchsets) Line 8: Line 9: Adds basic support for PCI-passthrough that includes reporting Line 10: available host devices in vdsCapabilities, reporting VM's attached Line 11: host devices and creation of VM with such device attached using http://gerrit.ovirt.org/#/c/22462/5/vdsm/vm.py File vdsm/vm.py: Line 1656: m.setAttrs(model=self.specParams['model']) Line 1657: return m Line 1658: Line 1659: Line 1660: class HostDevice(VmDevice): > We could start using the __slots__ for the new devices that we add. Sure, but I'd like to keep the patch self-contained: if __slots__ are merged before this patch is I'll do a rebase with __slots__ included, if it isn't the device will be consistent with others for the time being. Line 1661: def getXML(self): Line 1662: """ Line 1663: Create domxml for a hostdev device. Line 1664: -- To view, visit http://gerrit.ovirt.org/22462 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I363d2622d72ca2db75f60032fe0892c348bab121 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vmDevices: add __slots__ to devices
Martin Polednik has posted comments on this change. Change subject: vmDevices: add __slots__ to devices .. Patch Set 4: (2 comments) http://gerrit.ovirt.org/#/c/21036/4/vdsm/vm.py File vdsm/vm.py: Line 1253: self.log.debug('Ignoring param (%s, %s) in %s', attr, value, Line 1254:self.__class__.__name__) Line 1255: pass Line 1256: self.conf = conf Line 1257: self._deviceXML = None > Having slots is not enough - you must initialize *all* attributes, we will I'm not sure I understand correctly: we *should* fail if the required parameter is missing - wouldn't having required param set to none result in a further failure? If that wouldn't be a problem, i suppose we could setup all the __slots__ attributes to None using def __init__(self): for attr in self.__slots__: setattr(self, attr, None) without needing separate patch. Line 1258: Line 1259: def __str__(self): Line 1260: attrs = [':'.join((a, str(getattr(self, a, None for a in dir(self) Line 1261: if not a.startswith('__')] Line 1309: return ctrl Line 1310: Line 1311: Line 1312: class VideoDevice(VmDevice): Line 1313: __slots__ = ('address') > This is not a tuple: Noted, will be fixed in future commit (all of them). Line 1314: Line 1315: def getXML(self): Line 1316: """ Line 1317: Create domxml for video device -- To view, visit http://gerrit.ovirt.org/21036 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6e8dadabdd02d3b44606f215c4bc7b7e306a591a Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: fix RTC offset
Martin Polednik has posted comments on this change. Change subject: vdsm: fix RTC offset .. Patch Set 5: Verified+1 verified using running oVirt and checking logfile rtc differences; changed log message to reflect real RTC (including config) -- To view, visit http://gerrit.ovirt.org/14750 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I27c70a53f64fb05607e93bffbac25fdee7d1cd2a Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Peter V. Saveliev Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Itamar Heim Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Peter V. Saveliev Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vm: add boot menu support
Martin Polednik has posted comments on this change. Change subject: vm: add boot menu support .. Patch Set 2: Code-Review+1 -- To view, visit http://gerrit.ovirt.org/23558 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4a845097294603bbb11e7941995cb1729f388109 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vm: add boot menu support
Martin Polednik has posted comments on this change. Change subject: vm: add boot menu support .. Patch Set 1: Code-Review+1 code itself seems fine, only lacks the "missing option" test -- To view, visit http://gerrit.ovirt.org/23558 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4a845097294603bbb11e7941995cb1729f388109 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vmDevices: introduce VmDeviceContainer
Martin Polednik has posted comments on this change. Change subject: vmDevices: introduce VmDeviceContainer .. Patch Set 7: currently outdated but still relevant, will get to it as this branch progresses -- To view, visit http://gerrit.ovirt.org/21138 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I65debd35115da078df0c0cb6f50c57feb984c5a3 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Itamar Heim Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: Move virt things into vdsm/virt
Martin Polednik has posted comments on this change. Change subject: Move virt things into vdsm/virt .. Patch Set 7: Code-Review+1 much needed patch, seems okay -- To view, visit http://gerrit.ovirt.org/21792 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibdfaefbe8837d2059674fdc4dc83fca431d76f8d Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: fix possible test failure due to reboot event
Martin Polednik has uploaded a new change for review. Change subject: tests: fix possible test failure due to reboot event .. tests: fix possible test failure due to reboot event Virt tests currently have a chance of failing even on successful run if qemu bios startup takes a bit longer than ussual. This leads to halting the VM right before initramfs services start, causing "reboot event" (leading to state "RebootInProgress") causing test for upstates to fail. This patch changes the default wait time to 30 seconds (through constant VM_MINIMAL_UPTIME), giving the test run enough time to finish currectly. In future, we would like to get rid of this time by adding a heartbeat module to initramfs that would indicate successful boot, allowing for faster test runs. Change-Id: I469794f20b2b9de5837b7361b952b906b82d8498 Signed-off-by: Martin Polednik --- M tests/functional/virtTests.py 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/37/23037/1 diff --git a/tests/functional/virtTests.py b/tests/functional/virtTests.py index bd54621..94f9c74 100644 --- a/tests/functional/virtTests.py +++ b/tests/functional/virtTests.py @@ -49,6 +49,8 @@ ] _tmpinitramfs = False +VM_MINIMAL_UPTIME = 30 + def setUpModule(): # global used in order to keep the iniramfs image persistent across @@ -185,7 +187,7 @@ 'vmName': 'testSimpleVm'} with RunningVm(self.vdsm, customization) as vm: -self._waitForStartup(vm, 10) +self._waitForStartup(vm, VM_MINIMAL_UPTIME) @requireKVM @permutations([['localfs'], ['iscsi'], ['nfs']]) @@ -201,7 +203,7 @@ with RollbackContext() as rollback: disk.createVdsmStorageLayout(conf, 3, rollback) with RunningVm(self.vdsm, customization) as vm: -self._waitForStartup(vm, 10) +self._waitForStartup(vm, VM_MINIMAL_UPTIME) @requireKVM @permutations([['hotplugNic'], ['virtioNic'], ['smartcard'], @@ -258,7 +260,7 @@ customization['devices'].append(deviceDef[device]) with RunningVm(self.vdsm, customization) as vm: -self._waitForStartup(vm, 10) +self._waitForStartup(vm, VM_MINIMAL_UPTIME) if 'hotplugNic' in devices: self.retryAssert(partial(self.vdsm.hotplugNic, -- To view, visit http://gerrit.ovirt.org/23037 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I469794f20b2b9de5837b7361b952b906b82d8498 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: fix RTC offset
Martin Polednik has posted comments on this change. Change subject: vdsm: fix RTC offset .. Patch Set 3: Verified+1 -- To view, visit http://gerrit.ovirt.org/14750 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I27c70a53f64fb05607e93bffbac25fdee7d1cd2a Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Peter V. Saveliev Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Peter V. Saveliev Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: fix RTC offset
Martin Polednik has posted comments on this change. Change subject: vdsm: fix RTC offset .. Patch Set 2: (1 comment) File vdsm/vm.py Line 2264: Line 2265: def _rtcUpdate(self, timeOffset): Line 2266: self.log.debug('new rtc offset %s', timeOffset) Line 2267: with self._confLock: Line 2268: self.conf['timeOffset'] = self._initTimeRTC + long(timeOffset) We actually need initTimeRTC in order to avoid multiple syncs adding up the time diff (because the difference will always be absolute to qemu start, not previous sync). Saving the config is not needed due to timeOffset being propagated to engine in next poll interval: should crash occur before it is propagated, we can treat it same as missed event (not making any difference to previous offset). Line 2269: Line 2270: def extendDriveVolume(self, vmDrive): Line 2271: if not vmDrive.blockDev: Line 2272: return -- To view, visit http://gerrit.ovirt.org/14750 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I27c70a53f64fb05607e93bffbac25fdee7d1cd2a Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Peter V. Saveliev Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Peter V. Saveliev Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for PCI passthrough
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for PCI passthrough .. Patch Set 5: Verified+1 Verified by manually starting devices with passthrough hardware assigned and checking logs for vdsCaps report. Also tested by functional test which checks reported data for presence of the device list in capabilities and the device itself in VM. -- To view, visit http://gerrit.ovirt.org/22462 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I363d2622d72ca2db75f60032fe0892c348bab121 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for hot(un)plug of pci-passthrough devices
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for hot(un)plug of pci-passthrough devices .. Patch Set 2: (1 comment) File client/vdsClient.py Line 246: return self.ExecAndExit(self.s.hotunplugDisk(params)) Line 247: Line 248: def hotplugHostdev(self, args): Line 249: params = {'vmId': args[0], 'hostdevName': args[1]} Line 250: return self.ExecAndExit(self.s.hotplugNic(params)) noted, will be fixed in next patchset (same for below) Line 251: Line 252: def hotunplugHostdev(self, args): Line 253: params = {'vmId': args[0], 'hostdevName': args[2]} Line 254: return self.ExecAndExit(self.s.hotunplugNic(params)) -- To view, visit http://gerrit.ovirt.org/22523 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8fbf4a1d62789d9404e5977eb7eb01b17a1a43fb Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for hot(un)plug of pci-passthrough devices
Martin Polednik has uploaded a new change for review. Change subject: vdsm: add support for hot(un)plug of pci-passthrough devices .. vdsm: add support for hot(un)plug of pci-passthrough devices Hot(un)plug ability for pci-passthrough devices is extremely important in order to allow for hotunplugging/migrating/hotplugging workflow as VM cannot be migrated with pci device attached. This patch implements the ability adding new API verbs: hotplugHostdev and hotunplugHostdev, which attempts to append/remove the device from domain XML and reports back the state. Change-Id: I8fbf4a1d62789d9404e5977eb7eb01b17a1a43fb Signed-off-by: Martin Polednik --- M client/vdsClient.py M vdsm/API.py M vdsm/BindingXMLRPC.py M vdsm/vm.py M vdsm_api/vdsmapi-schema.json 5 files changed, 166 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/23/22523/1 diff --git a/client/vdsClient.py b/client/vdsClient.py index d549500..f00180e 100644 --- a/client/vdsClient.py +++ b/client/vdsClient.py @@ -245,6 +245,14 @@ params = {'vmId': args[0], 'drive': drive} return self.ExecAndExit(self.s.hotunplugDisk(params)) +def hotplugHostdev(self, args): +params = {'vmId': args[0], 'hostdevName': args[1]} +return self.ExecAndExit(self.s.hotplugNic(params)) + +def hotunplugHostdev(self, args): +params = {'vmId': args[0], 'hostdevName': args[2]} +return self.ExecAndExit(self.s.hotunplugNic(params)) + def do_changeCD(self, args): vmId = args[0] file = self._parseDriveSpec(args[1]) diff --git a/vdsm/API.py b/vdsm/API.py index 44d5817..51eb506 100644 --- a/vdsm/API.py +++ b/vdsm/API.py @@ -456,6 +456,40 @@ return curVm.hotunplugDisk(params) +def hotplugHostdev(self, params): +try: +utils.validateMinimalKeySet(params, ('vmId', 'hostdevName')) +except ValueError: +self.log.error('Missing one of required parameters: vmId, ' + 'hostdevName') +return {'status': {'code': errCode['MissParam']['status']['code'], + 'message': 'Missing one of required ' + 'parameters: vmId, hostdevName'}} +try: +curVm = self._cif.vmContainer[self._UUID] +except KeyError: +self.log.warning("vm %s doesn't exist", self._UUID) +return errCode['noVM'] + +return curVm.hotplugHostdev(params) + +def hotunplugHostdev(self, params): +try: +utils.validateMinimalKeySet(params, ('vmId', 'hostdevName')) +except ValueError: +self.log.error('Missing one of required parameters: vmId, ' + 'hostdevName') +return {'status': {'code': errCode['MissParam']['status']['code'], + 'message': 'Missing one of required ' + 'parameters: vmId, hostdevName'}} +try: +curVm = self._cif.vmContainer[self._UUID] +except KeyError: +self.log.warning("vm %s doesn't exist", self._UUID) +return errCode['noVM'] + +return curVm.hotunplugHostdev(params) + def migrate(self, params): """ Migrate a VM to a remote host. diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py index 5bcd84c..847ceaf 100644 --- a/vdsm/BindingXMLRPC.py +++ b/vdsm/BindingXMLRPC.py @@ -279,6 +279,14 @@ vm = API.VM(params['vmId']) return vm.hotunplugNic(params) +def vmHotplugHostdev(self, params): +vm = API.VM(params['vmId']) +return vm.hotplugHostdev(params) + +def vmHotunplugHostdev(self, params): +vm = API.VM(params['vmId']) +return vm.hotunplugHostdev(params) + def vmUpdateDevice(self, vmId, params): vm = API.VM(vmId) return vm.vmUpdateDevice(params) @@ -861,6 +869,8 @@ (self.vmHotunplugDisk, 'hotunplugDisk'), (self.vmHotplugNic, 'hotplugNic'), (self.vmHotunplugNic, 'hotunplugNic'), +(self.vmHotplugHostdev, 'hotplugHostdev'), +(self.vmHotunplugHostdev, 'hotunplugHostdev'), (self.vmUpdateDevice, 'vmUpdateDevice')) def getIrsMethods(self): diff --git a/vdsm/vm.py b/vdsm/vm.py index 90a6c0d..224bf7b 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -3183,6 +3183,84 @@ return {'status': doneCode, 'vmList': self.status()} +def hotplugHostdev(self, params): +hostdevName = params['hostdevName'] +hostdev = HostDevice(self.conf, self.log, **hostdevName) +hostdevXML = hostdev.getXML().toprettyxml(encoding='utf-8') +hostdev._deviceXML = hostdevXML +self.log.debug("Hotplug hostdev xml: %s", hostdevXML) + +try: +self._dom.attachDevice(hostdevXML) +exc
Change in vdsm[master]: [WIP] vdsm: add support for PCI passthrough
Martin Polednik has uploaded a new change for review. Change subject: [WIP] vdsm: add support for PCI passthrough .. [WIP] vdsm: add support for PCI passthrough required functionality: * report PCI devices available on host [x] * handle createVm xml generation [x] * hotplugHostdev [ ] (required for after-migration) * hotpunlugHostdev [ ] (required for migration) Change-Id: I363d2622d72ca2db75f60032fe0892c348bab121 Signed-off-by: Martin Polednik --- M lib/vdsm/define.py M vdsm/caps.py M vdsm/vm.py 3 files changed, 83 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/62/22462/1 diff --git a/lib/vdsm/define.py b/lib/vdsm/define.py index eb78633..9605f93 100644 --- a/lib/vdsm/define.py +++ b/lib/vdsm/define.py @@ -132,6 +132,12 @@ 'transientErr': {'status': { 'code': 59, 'message': 'Action not permitted on a VM with transient disks'}}, +'hotplugHostdev': {'status': { +'code': 60, +'message': 'Failed to hotplug hostdev'}}, +'hotunplugHostdev': {'status': { +'code': 61, +'message': 'Failed to hotunplug hostdev'}}, 'recovery': {'status': { 'code': 99, 'message': 'Recovering from crash or Initializing'}}, diff --git a/vdsm/caps.py b/vdsm/caps.py index 3839134..d6af375 100644 --- a/vdsm/caps.py +++ b/vdsm/caps.py @@ -308,6 +308,38 @@ return dict(release=release, version=version, name=osname) +def hostdevList(): +devices = [] +for device in libvirtconnection.get().listAllDevices(): +devXML = minidom.parseString(device.XMLDesc()) +dev = {} + +# we have to grab attributes that will most likely not only +# uniquely identify device, but also serve as human readable +# representation of the device +try: +dev['name'] = devXML.getElementsByTagName('name')[0].\ +childNodes[0].data +capability = devXML.getElementsByTagName('capability')[0] +try: +dev['product'] = capability.getElementsByTagName('product')[0]\ +.childNodes[0].data +dev['vendor'] = capability.getElementsByTagName('vendor')[0].\ +childNodes[0].data +except IndexError: +# althought the retrieval of product/vendor was not successful, +# we can still report back the name +pass +except IndexError: +# should device not have a name, there is nothing engine could send +# back that we could use to uniquely identify and initiate a device +continue + +devices.append(dev) + +return devices + + def get(): targetArch = platform.machine() @@ -360,6 +392,7 @@ config.getint('vars', 'extra_mem_reserve')) caps['guestOverhead'] = config.get('vars', 'guest_ram_overhead') caps['rngSources'] = _getRngSources() +caps['hostDevices'] = hostdevList() return caps diff --git a/vdsm/vm.py b/vdsm/vm.py index a5d923b..a477bc9 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -78,6 +78,7 @@ WATCHDOG_DEVICES = 'watchdog' CONSOLE_DEVICES = 'console' SMARTCARD_DEVICES = 'smartcard' +HOSTDEV_DEVICES = 'hostdev' def isVdsmImage(drive): @@ -1656,6 +1657,27 @@ return m +class HostDevice(VmDevice): +def getXML(self): +""" +Create domxml for a hostdev device. + + + + + + + + + + +""" +# libvirt gives us direct api call to construct the XML +return xml.dom.minidom.parseString(libvirtconnection.get(). + nodeDeviceLookupByName(self.name). + XMLDesc()) + + class WatchdogDevice(VmDevice): def __init__(self, *args, **kwargs): super(WatchdogDevice, self).__init__(*args, **kwargs) @@ -1769,7 +1791,8 @@ (CONSOLE_DEVICES, ConsoleDevice), (REDIR_DEVICES, RedirDevice), (RNG_DEVICES, RngDevice), - (SMARTCARD_DEVICES, SmartCardDevice)) + (SMARTCARD_DEVICES, SmartCardDevice), + (HOSTDEV_DEVICES, HostDevice)) def _makeDeviceDict(self): return dict((dev, []) for dev, _ in self.DeviceMapping) @@ -3127,6 +3150,26 @@ break +def hotplugHostdev(self, params): +hostdev = HostDevice(self.conf, self.log, **params) +self._devices[HOSTDEV_DEVICES].append(hostdev) +hostdevXML = hostdev.getXML().toprettyxml(encoding='utf-8') +hostdev._deviceXML = hostdevXML +self.log.debug("Hotplug hostdev xml: %s", hostdevXML) + +try: +self._dom.attachDevice(hostdevXML) +except libvirt.libvirtError
Change in vdsm[master]: vdsm: add support for S3/S4 suspend calls
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for S3/S4 suspend calls .. Patch Set 5: Verified+1 Verified by testing on real VMs with QGA installed -- To view, visit http://gerrit.ovirt.org/19389 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic30016c5cd555f5771dde8db3f1340e1c11b3da7 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Ayal Baron Gerrit-Reviewer: Better Saggi Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Saggi Mizrahi Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.3]: vdsm: prepareVolumePath correct path handling for cdrom
Martin Polednik has posted comments on this change. Change subject: vdsm: prepareVolumePath correct path handling for cdrom .. Patch Set 1: Verified+1 -- To view, visit http://gerrit.ovirt.org/22324 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I10e5e0c12e7cc37a692c0e5c47eed3e4c8e7cda9 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.3 Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.3]: vdsm: prepareVolumePath correct path handling for cdrom
Hello Federico Simoncelli, Dan Kenigsberg, Michal Skrivanek, I'd like you to do a code review. Please visit http://gerrit.ovirt.org/22324 to review the following change. Change subject: vdsm: prepareVolumePath correct path handling for cdrom .. vdsm: prepareVolumePath correct path handling for cdrom prepareVolumePath looked for 'path' key in specParams without looking at path in device itself, causing empty path in specParams to override device path. This patch adds device.path to checking mechanism to avoid overriding valid path Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1009469 Change-Id: I10e5e0c12e7cc37a692c0e5c47eed3e4c8e7cda9 Signed-off-by: Martin Polednik Reviewed-on: http://gerrit.ovirt.org/20074 Reviewed-by: Michal Skrivanek Reviewed-by: Federico Simoncelli Reviewed-by: Dan Kenigsberg --- M vdsm/clientIF.py 1 file changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/22324/1 diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py index 47851b1..e8fb8d1 100644 --- a/vdsm/clientIF.py +++ b/vdsm/clientIF.py @@ -303,11 +303,13 @@ volPath = self._getUUIDSpecPath(drive["UUID"]) # leave path == '' for empty cdrom and floppy drives ... -elif drive['device'] in ('cdrom', 'floppy') and \ -'specParams' in drive and \ -'path' in drive['specParams'] and \ -drive['specParams']['path'] == '': -volPath = '' +elif (drive['device'] in ('cdrom', 'floppy') and + 'specParams' in drive and + # next line can be removed in future, when < 3.3 engine + # is not supported + drive['specParams'].get('path', '') == '' and + drive.get('path', '') == ''): +volPath = '' # ... or load the drive from vmPayload: elif drive['device'] in ('cdrom', 'floppy') and \ -- To view, visit http://gerrit.ovirt.org/22324 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10e5e0c12e7cc37a692c0e5c47eed3e4c8e7cda9 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.3 Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Michal Skrivanek ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: validate cdrom path sent to/received from vdsm
Martin Polednik has posted comments on this change. Change subject: tests: validate cdrom path sent to/received from vdsm .. Patch Set 1: (2 comments) File tests/functional/virtTests.py Line 271: deviceDef['hotplugDisk']), timeout=10) Line 272: self.retryAssert(partial(self.vdsm.hotunplugDisk, Line 273: deviceDef['hotplugDisk']), timeout=10) Line 274: Line 275: @permutations([['self'], ['specParams'], ['both']]) That would make the test dependant on changeCD itself, causing failure there to incorrectly point to an issue of changing the CD rather than creating a VM with CD. Line 276: def testVmWithCdrom(self, pathLocation): Line 277: fd, path = tempfile.mkstemp() Line 278: os.chmod(path, 0o644) Line 279: Line 289: else: Line 290: # we can use the same path to avoid having to generate another Line 291: # tmpfile Line 292: cdrom['path'] = path Line 293: cdrom['specParams']['path'] = path We don't expect specParams to be used at all, but we want to be sure that it path and specParams['path'] do not affect each other. Making the other one up (such as using /dev/null or /dev/zero or device like that) hasn't proven to be working at all (due to permission issues on mount). Line 294: Line 295: customization = {'vmId': '----', Line 296: 'vmName': 'testVm', 'devices': [cdrom]} Line 297: -- To view, visit http://gerrit.ovirt.org/22194 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I620c481056f7ee3b4d3270ba1f4bc45cbb132ebb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: add xmlrpcTests for cpu pinning
Martin Polednik has posted comments on this change. Change subject: add xmlrpcTests for cpu pinning .. Patch Set 6: This patch in its current form without rebase and a bit of work wouldn't test anything: we would only see if the initial configuration's XML would pass the libvirt create call. I can look into it if such test makes sense but verification that VM's vCPU really runs on specified physical CPU/core might not be trivial. -- To view, visit http://gerrit.ovirt.org/8412 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia865f0d5eb4c9aabff6cef57b088c55df73a309e Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Royce Lv Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Doron Fediuck Gerrit-Reviewer: Ewoud Kohl van Wijngaarden Gerrit-Reviewer: Itamar Heim Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Royce Lv Gerrit-Reviewer: Zhou Zheng Sheng Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: prepareVolumePath correct path handling for cdrom
Martin Polednik has posted comments on this change. Change subject: vdsm: prepareVolumePath correct path handling for cdrom .. Patch Set 6: Test added in http://gerrit.ovirt.org/#/c/22194/ -- To view, visit http://gerrit.ovirt.org/20074 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I10e5e0c12e7cc37a692c0e5c47eed3e4c8e7cda9 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Eduardo Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: validate cdrom path sent to/received from vdsm
Martin Polednik has posted comments on this change. Change subject: tests: validate cdrom path sent to/received from vdsm .. Patch Set 1: Verified+1 correctly detects failure without the fix applied / success with fix applied (also handles more general specParams['path']/path combinations to avoid regression) -- To view, visit http://gerrit.ovirt.org/22194 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I620c481056f7ee3b4d3270ba1f4bc45cbb132ebb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Martin Polednik Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: validate cdrom path sent to/received from vdsm
Martin Polednik has uploaded a new change for review. Change subject: tests: validate cdrom path sent to/received from vdsm .. tests: validate cdrom path sent to/received from vdsm related to http://gerrit.ovirt.org/#/c/20074/ Tests prepareVolumePath for cdrom by verifying that path and specParams['path'] remains unchanged during creation of VM Change-Id: I620c481056f7ee3b4d3270ba1f4bc45cbb132ebb Signed-off-by: Martin Polednik --- M tests/functional/utils.py M tests/functional/virtTests.py 2 files changed, 41 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/94/22194/1 diff --git a/tests/functional/utils.py b/tests/functional/utils.py index 5713db3..8bdd978 100644 --- a/tests/functional/utils.py +++ b/tests/functional/utils.py @@ -210,6 +210,11 @@ else: return result['status']['code'], result['status']['message'] +def getVmList(self, vmId): +result = self.vdscli.list('true', [vmId]) +return result['status']['code'], result['status']['message'],\ +result['vmList'][0] + def getVdsCapabilities(self): result = self.vdscli.getVdsCapabilities() return result['status']['code'], result['status']['message'],\ diff --git a/tests/functional/virtTests.py b/tests/functional/virtTests.py index bd54621..e799eb1 100644 --- a/tests/functional/virtTests.py +++ b/tests/functional/virtTests.py @@ -271,3 +271,39 @@ deviceDef['hotplugDisk']), timeout=10) self.retryAssert(partial(self.vdsm.hotunplugDisk, deviceDef['hotplugDisk']), timeout=10) + +@permutations([['self'], ['specParams'], ['both']]) +def testVmWithCdrom(self, pathLocation): +fd, path = tempfile.mkstemp() +os.chmod(path, 0o644) + +cdrom = {'index': '2', 'iface': 'ide', 'specParams': + {'path': ''}, 'readonly': 'true', 'path': + '', 'device': 'cdrom', 'shared': + 'false', 'type': 'disk'} + +if pathLocation == 'self': +cdrom['path'] = path +elif pathLocation == 'specParams': +cdrom['specParams']['path'] = path +else: +# we can use the same path to avoid having to generate another +# tmpfile +cdrom['path'] = path +cdrom['specParams']['path'] = path + +customization = {'vmId': '----', + 'vmName': 'testVm', 'devices': [cdrom]} + +with RunningVm(self.vdsm, customization) as vm: +self._waitForStartup(vm, 10) + +status, msg, stats = self.vdsm.getVmList(vm) +self.assertEqual(status, SUCCESS, msg) +for device in stats['devices']: +if device['device'] == 'cdrom': +self.assertEqual(device['path'], cdrom['path']) +self.assertEqual(device['specParams']['path'], + cdrom['specParams']['path']) + +os.unlink(path) -- To view, visit http://gerrit.ovirt.org/22194 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I620c481056f7ee3b4d3270ba1f4bc45cbb132ebb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for virtio-rng devices
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for virtio-rng devices .. Patch Set 15: Verified+1 Implemented caps suggestion, fixed API, functional test is now robust in a way that it detects available path and raises SkipTest if no available path exists (as that would fail the test) -- To view, visit http://gerrit.ovirt.org/19091 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4b9b2c355e06bae5f66bbaadffd5fda8d3ed4e9a Gerrit-PatchSet: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Better Saggi Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Frank Kobzik Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Saggi Mizrahi Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: migration progress: count memRemaining also
Martin Polednik has posted comments on this change. Change subject: vdsm: migration progress: count memRemaining also .. Patch Set 9: Verified+1 -- To view, visit http://gerrit.ovirt.org/15124 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I92f37a507ead4cccf835302d25cd02eb344bbcb1 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Peter V. Saveliev Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Omer Frenkel Gerrit-Reviewer: Peter V. Saveliev Gerrit-Reviewer: Roy Golan Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: clientIF: Fix use of getConfDevices
Martin Polednik has posted comments on this change. Change subject: clientIF: Fix use of getConfDevices .. Patch Set 2: Verified+1 manually verified that the function is passed the same parameters as before using log messages inside the functions automated functional test is currently not possible due to expcetions in recoverExistingVms being caught and logged, making the test pass even when failure occurs -- To view, visit http://gerrit.ovirt.org/21832 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaf9776e1237f6799dfccd5ff3edf197c5bf32f5e Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: Revert "vdsm: refactor buildConfDevices and getConfDevices i...
Martin Polednik has posted comments on this change. Change subject: Revert "vdsm: refactor buildConfDevices and getConfDevices into single function" .. Patch Set 1: Code-Review-1 the only caller should be fixed by http://gerrit.ovirt.org/#/c/21832/ - can you verify that it fails even with that patch applied? -- To view, visit http://gerrit.ovirt.org/21900 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I13d07d6de964ecbc7b518fc53adae0b26cef9658 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests/functional/virt: drop testInitramfsReadable
Martin Polednik has posted comments on this change. Change subject: tests/functional/virt: drop testInitramfsReadable .. Patch Set 2: Code-Review+1 -- To view, visit http://gerrit.ovirt.org/21854 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I537b4d56ec6ca4a849c79590c7d934be6e70459f Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: prepareVolumePath correct path handling for cdrom
Martin Polednik has posted comments on this change. Change subject: vdsm: prepareVolumePath correct path handling for cdrom .. Patch Set 6: Verified+1 fixed wrong specParams handling, verified XML against standard cdrom, empty cdrom, path with empty specParams['path'] cdrom -- To view, visit http://gerrit.ovirt.org/20074 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I10e5e0c12e7cc37a692c0e5c47eed3e4c8e7cda9 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Eduardo Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests/functional/virt: drop ever-failing test
Martin Polednik has posted comments on this change. Change subject: tests/functional/virt: drop ever-failing test .. Patch Set 1: Code-Review-1 The previous test implementation always required that the system initramfs will have atleast 604 permissions, failing to run all the tests if it had not. This test is an indicator whether you are running with temp initramfs or you are using the system one. -- To view, visit http://gerrit.ovirt.org/21854 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I537b4d56ec6ca4a849c79590c7d934be6e70459f Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: clientIF: Fix use of getConfDevices
Martin Polednik has posted comments on this change. Change subject: clientIF: Fix use of getConfDevices .. Patch Set 2: Code-Review+1 -- To view, visit http://gerrit.ovirt.org/21832 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaf9776e1237f6799dfccd5ff3edf197c5bf32f5e Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add logging to _getUnderlyingDriveInfo
Martin Polednik has posted comments on this change. Change subject: vdsm: add logging to _getUnderlyingDriveInfo .. Patch Set 7: Verified+1 -- To view, visit http://gerrit.ovirt.org/19928 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I884e6b25c5bcb71ee24ad9ebad8df7c2775c5e19 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: add support for virtio-rng devices
Martin Polednik has posted comments on this change. Change subject: vdsm: add support for virtio-rng devices .. Patch Set 14: Verified+1 -- To view, visit http://gerrit.ovirt.org/19091 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4b9b2c355e06bae5f66bbaadffd5fda8d3ed4e9a Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Better Saggi Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Frank Kobzik Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Saggi Mizrahi Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: refactor buildConfDevices and getConfDevices into sing...
Martin Polednik has posted comments on this change. Change subject: vdsm: refactor buildConfDevices and getConfDevices into single function .. Patch Set 5: Verified+1 (1 comment) File vdsm/vm.py Line 1913: for drv in devices[DISK_DEVICES]: Line 1914: if isVdsmImage(drv): Line 1915: self._normalizeVdsmImg(drv) Line 1916: Line 1917: self.normalizeDrivesIndices(devices[DISK_DEVICES]) correct Line 1918: Line 1919: # Preserve old behavior. Since libvirt add a memory balloon device Line 1920: # to all guests, we need to specifically request not to add it. Line 1921: self._normalizeBalloonDevice(devices[BALLOON_DEVICES]) -- To view, visit http://gerrit.ovirt.org/19348 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd3a209967f97a55fe861c4446e8f93e1a1da08e Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Ayal Baron Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Peter V. Saveliev Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vm: drop unused MigrationSourceThreadClass abstraction
Martin Polednik has posted comments on this change. Change subject: vm: drop unused MigrationSourceThreadClass abstraction .. Patch Set 1: Code-Review+1 exactly what Tony said -- To view, visit http://gerrit.ovirt.org/21560 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia9fac9aa5b66b68c7447df0c460d91f5f4415b73 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: handle migration abort before semaphore acquiration
Martin Polednik has uploaded a new change for review. Change subject: vdsm: handle migration abort before semaphore acquiration .. vdsm: handle migration abort before semaphore acquiration If cancelMigration is called before migrate and migrationSourceThread hasn't yet acquired semaphore, raise VIR_ERR_OPERATION_ABORTED to prevent finishSuccessfully from tearing down the VM and report that the migration had been canceled. Change-Id: Id271a41466bc355ca505f764206457af419f0edd Signed-off-by: Martin Polednik --- M vdsm/vm.py 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/21445/1 diff --git a/vdsm/vm.py b/vdsm/vm.py index e82867c..3ce091b 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -367,6 +367,9 @@ (libvirt.VIR_MIGRATE_ABORT_ON_ERROR if self._abortOnError else 0), None, maxBandwidth) +else: +raise libvirt.VIR_ERR_OPERATION_ABORTED + finally: t.cancel() if MigrationMonitorThread._MIGRATION_MONITOR_INTERVAL: -- To view, visit http://gerrit.ovirt.org/21445 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id271a41466bc355ca505f764206457af419f0edd Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: prepareVolumePath correct path handling for cdrom
Martin Polednik has posted comments on this change. Change subject: vdsm: prepareVolumePath correct path handling for cdrom .. Patch Set 5: Verified+1 cdrom path is always passed in specParams when starting VM from template with cd attached (therefore it is still needed and should be fixed in engine) -- To view, visit http://gerrit.ovirt.org/20074 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I10e5e0c12e7cc37a692c0e5c47eed3e4c8e7cda9 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Eduardo Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: prepareVolumePath correct path handling for cdrom
Martin Polednik has posted comments on this change. Change subject: vdsm: prepareVolumePath correct path handling for cdrom .. Patch Set 5: (1 comment) File vdsm/clientIF.py Line 300: Line 301: # leave path == '' for empty cdrom and floppy drives ... Line 302: elif (drive['device'] in ('cdrom', 'floppy') and Line 303: 'specParams' in drive and Line 304: # next line can be removed in future, when < 3.3 engine The problem is that we are not 100% sure, but as far as I understand according to code in http://gerrit.ovirt.org/#/c/2943/ there is still a possibility of receiving such path - I'd rather live with temporary ugly but safe code than breaking anything. Line 305: # is not supported Line 306: drive.specParams.get('path', '') == '' and Line 307: drive.get('path', '') == ''): Line 308: volPath = '' -- To view, visit http://gerrit.ovirt.org/20074 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I10e5e0c12e7cc37a692c0e5c47eed3e4c8e7cda9 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Eduardo Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Vinzenz Feenstra Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: change network sampling interval to 15 seconds
Martin Polednik has posted comments on this change. Change subject: vdsm: change network sampling interval to 15 seconds .. Patch Set 2: Verified+1 -- To view, visit http://gerrit.ovirt.org/21257 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6c1763c1cc228791e8fa969f05d5bfcf80e2c5bf Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vdsm: change network sampling interval to 15 seconds
Martin Polednik has uploaded a new change for review. Change subject: vdsm: change network sampling interval to 15 seconds .. vdsm: change network sampling interval to 15 seconds Change-Id: I6c1763c1cc228791e8fa969f05d5bfcf80e2c5bf Bug-Url: https://bugzilla.redhat.com/?? Signed-off-by: Martin Polednik --- M lib/vdsm/config.py.in 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/57/21257/1 diff --git a/lib/vdsm/config.py.in b/lib/vdsm/config.py.in index c0bdd53..6df76cc 100644 --- a/lib/vdsm/config.py.in +++ b/lib/vdsm/config.py.in @@ -127,7 +127,7 @@ ('vm_sample_disk_latency_window', '2', None), -('vm_sample_net_interval', '5', None), +('vm_sample_net_interval', '15', None), ('vm_sample_net_window', '2', None), -- To view, visit http://gerrit.ovirt.org/21257 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c1763c1cc228791e8fa969f05d5bfcf80e2c5bf Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: vmDevices: replace self.conf['devices'] by VmDeviceContainer
Martin Polednik has uploaded a new change for review. Change subject: vmDevices: replace self.conf['devices'] by VmDeviceContainer .. vmDevices: replace self.conf['devices'] by VmDeviceContainer This patch servers as an implementation of VmDeviceContainer, removing access to self.conf['devices'] and keeping migration-friendly restore file by pickling structure similar to self.conf['devices'] Change-Id: I3bdb5c331657c1c0d1ae902eabb5d3315d45bf8b Signed-off-by: Martin Polednik --- M vdsm/vm.py 1 file changed, 42 insertions(+), 127 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/62/21162/1 diff --git a/vdsm/vm.py b/vdsm/vm.py index d4ce708..f2e22cf 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -2919,14 +2919,7 @@ if not 'recover' in self.conf: self.preparePaths(devices[DISK_DEVICES]) self._prepareTransientDisks(devices[DISK_DEVICES]) -# Update self.conf with updated devices -# For old type vmParams, new 'devices' key will be -# created with all devices info -newDevices = [] -for dev in devices.values(): -newDevices.extend(dev) -self.conf['devices'] = newDevices # We need to save conf here before we actually run VM. # It's not enough to save conf only on status changes as we did # before, because if vdsm will restarted between VM run and conf @@ -2939,6 +2932,7 @@ for dev in devices[devType]: self._devices[devType].append(devClass(self.conf, self.log, **dev)) +self.conf['devices'] = self._devices.legacy # We should set this event as a last part of drives initialization self._pathsPreparedEvent.set() @@ -3072,9 +3066,8 @@ # we sent command to libvirt and before save conf. In this case # we will gather almost all needed info about this NIC from # the libvirt during recovery process. -self._devices[NIC_DEVICES].append(nic) with self._confLock: -self.conf['devices'].append(nicParams) +self._devices[NIC_DEVICES].append(nic) self.saveState() self._getUnderlyingNetworkInterfaceInfo() hooks.after_nic_hotplug(nicXml, self.conf, @@ -3109,9 +3102,8 @@ 'not found' % alias) def _lookupConfByAlias(self, alias): -for devConf in self.conf['devices'][:]: -if devConf['type'] == NIC_DEVICES and \ -devConf['alias'] == alias: +for devConf in self._devices[NIC_DEVICES]: +if devConf['alias'] == alias: return devConf raise LookupError('Configuration of device identified by alias %s not' 'found' % alias) @@ -3256,15 +3248,6 @@ # Remove found NIC from vm's NICs list if nic: self._devices[NIC_DEVICES].remove(nic) -# Find and remove NIC device from vm's conf -nicDev = None -for dev in self.conf['devices'][:]: -if (dev['type'] == NIC_DEVICES and -dev['macAddr'].lower() == nicParams['macAddr'].lower()): -with self._confLock: -self.conf['devices'].remove(dev) -nicDev = dev -break self.saveState() @@ -3274,10 +3257,7 @@ self.log.error("Hotunplug failed", exc_info=True) if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN: return errCode['noVM'] -# Restore NIC device in vm's conf and _devices -if nicDev: -with self._confLock: -self.conf['devices'].append(nicDev) +# Restore NIC device in vm's deviceContainer if nic: self._devices[NIC_DEVICES].append(nic) self.saveState() @@ -3365,11 +3345,10 @@ # we sent command to libvirt and before save conf. In this case # we will gather almost all needed info about this drive from # the libvirt during recovery process. -self._devices[DISK_DEVICES].append(drive) if vdsmImg: self.sdIds.append(diskParams['domainID']) with self._confLock: -self.conf['devices'].append(diskParams) +self._devices[DISK_DEVICES].append(drive) self.saveState() self._getUnderlyingDriveInfo() hooks.after_disk_hotplug(driveXml, self.conf, @@ -3404,16 +3383,6 @@ if drive.isVdsmImage(): self.sdIds.remove(drive.domainID) self._devices[DISK_DEVICES].remove(drive) -# Find and remove disk device from vm's conf -diskDev = None -for dev in self.conf['devices'][:]: -