Change in vdsm[master]: vm: Set numatune and guest numa topology
by Jenkins CI RO
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm: Set numatune and guest numa topology
......................................................................
Patch Set 2:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7445/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6653/ : To avoid overloading the infrastructure, a whitelist for running gerrit triggered jobs has been set in place, if you feel like you should be in it, please contact infra at ovirt dot org.
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7554/ : To avoid overloading the infrastructure, a whitelist for running gerrit triggered jobs has been set in place, if you feel like you should be in it, please contact infra at ovirt dot org.
--
To view, visit http://gerrit.ovirt.org/25254
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I88ec56047809b03449a788ead0b97f9ed876712d
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
10 years, 2 months
Change in vdsm[ovirt-3.4]: sos: Support SOS version 3
by Douglas Schilling Landgraf
Hello Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/25553
to review the following change.
Change subject: sos: Support SOS version 3
......................................................................
sos: Support SOS version 3
This patch will add support to sos 3 API and keep compatible
with old API.
Change-Id: I52fbd9431506c5862cc762b4d3f0701ab5cf6a0b
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1060383
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/25188
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/sos/vdsm.py.in
1 file changed, 17 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/53/25553/1
diff --git a/vdsm/sos/vdsm.py.in b/vdsm/sos/vdsm.py.in
index 6bc111a..d90940f 100644
--- a/vdsm/sos/vdsm.py.in
+++ b/vdsm/sos/vdsm.py.in
@@ -18,7 +18,15 @@
# Refer to the README and COPYING files for full details of the license
#
-import sos.plugintools
+try:
+ from sos.plugins import Plugin, RedHatPlugin
+
+ class Base(Plugin, RedHatPlugin):
+ pass
+except ImportError:
+ import sos.plugintools
+ Base = sos.plugintools.PluginBase
+
import subprocess
import os
@@ -39,13 +47,20 @@
config = _importVdsmPylibModule('config').config
-class vdsm(sos.plugintools.PluginBase):
+class vdsm(Base):
"""VDSM server related information
"""
optionList = [("logsize", 'max size (MiB) to collect per log file', '',
False)]
+ # Make compatible com sos version >= 3
+ if not hasattr(Base, 'addCopySpec'):
+ addCopySpec = Base.add_copy_spec
+ addCopySpecLimit = Base.add_copy_spec_limit
+ collectExtOutput = Base.add_cmd_output
+ getOption = Base.get_option
+
def __addCopySpecLogLimit(self, path, logsize=None):
"""
Glob the files in path and ensure that the sorted cumulative
--
To view, visit http://gerrit.ovirt.org/25553
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I52fbd9431506c5862cc762b4d3f0701ab5cf6a0b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: minor changes in passwd.py
by mtayer@redhat.com
mooli tayer has uploaded a new change for review.
Change subject: minor changes in passwd.py
......................................................................
minor changes in passwd.py
Replace Exception with RuntimeError and singleton tuple with variable.
Change-Id: I4ced7980e975e2cce588261812ecdb1847b5941f
Signed-off-by: Mooli Tayer <mtayer(a)redhat.com>
---
M lib/vdsm/tool/passwd.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/89/25489/1
diff --git a/lib/vdsm/tool/passwd.py b/lib/vdsm/tool/passwd.py
index 0b127c8..d88a8db 100644
--- a/lib/vdsm/tool/passwd.py
+++ b/lib/vdsm/tool/passwd.py
@@ -43,4 +43,4 @@
stderr=subprocess.PIPE, close_fds=True)
output, err = p.communicate()
if p.returncode != 0:
- raise Exception("Set password failed: %s" % (err, ))
+ raise RuntimeError("Set password failed: %s" % err)
--
To view, visit http://gerrit.ovirt.org/25489
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ced7980e975e2cce588261812ecdb1847b5941f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <mtayer(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: sos: Support to SOS 3
by Douglas Schilling Landgraf
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: sos: Support to SOS 3
......................................................................
sos: Support to SOS 3
This patch will add support to sos 3 API and keep compatible
with old API.
Change-Id: I52fbd9431506c5862cc762b4d3f0701ab5cf6a0b
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1060383
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M configure.ac
M vdsm.spec.in
M vdsm/sos/vdsm.py.in
3 files changed, 73 insertions(+), 40 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/88/25188/1
diff --git a/configure.ac b/configure.ac
index 55879e7..fd61e03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,6 +55,26 @@
)
AM_CONDITIONAL([HOOKS], [test "${enable_hooks}" = "yes"])
+AC_MSG_CHECKING(sos version)
+ AC_ARG_VAR([SOS_VERSION], [SOS utility version])
+ SOS_VERSION=`$PYTHON -c "import sos; print(sos.__version__)" |cut -c1 2>/dev/null`
+ AC_MSG_RESULT($SOS_VERSION)
+
+# SOS - support API 2 and 3 calls
+if test x"${SOS_VERSION}" = x2; then
+ AC_SUBST([SOS_ADD_COPY_SPEC], ["addCopySpec"])
+ AC_SUBST([SOS_ADD_COPY_SPEC_LIMIT], ["addCopySpecLimit"])
+ AC_SUBST([SOS_CLASS], ["vdsm(sos.plugintools.PluginBase)"])
+ AC_SUBST([SOS_CMD_OUTPUT], ["collectExtOutput"])
+ AC_SUBST([SOS_GET_OPTION], ["getOption"])
+else
+ AC_SUBST([SOS_ADD_COPY_SPEC], ["add_copy_spec"])
+ AC_SUBST([SOS_ADD_COPY_SPEC_LIMIT], ["add_copy_spec_limit"])
+ AC_SUBST([SOS_CLASS], ["Vdsm(Plugin, RedHatPlugin)"])
+ AC_SUBST([SOS_CMD_OUTPUT], ["add_cmd_output"])
+ AC_SUBST([SOS_GET_OPTION], ["get_option"])
+fi
+
AC_ARG_ENABLE(
[libvirt-sanlock],
[AS_HELP_STRING(
@@ -185,6 +205,7 @@
AX_PYTHON_MODULE([pthreading], [fatal])
AX_PYTHON_MODULE([pyinotify], [fatal])
AX_PYTHON_MODULE([selinux], [fatal])
+AX_PYTHON_MODULE([sos], [fatal])
# External programs (sorted, please keep in order)
AC_PATH_PROG([BLKID_PATH], [blkid], [/sbin/blkid])
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 0383532..3be91c7 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -97,6 +97,8 @@
BuildRequires: python-pep8
%endif
+BuildRequires: sos
+
%if 0%{?with_systemd}
BuildRequires: systemd-units
%endif
@@ -241,7 +243,13 @@
Requires: psmisc >= 22.6-15
Requires: bridge-utils
-Requires: sos
+
+%if 0%{fedora} >= 20 || 0%{?rhel} >= 7
+Requires: sos >= 3.1
+%else
+Requires: sos < 3
+%endif
+
Requires: tree
Requires: dosfstools
Requires: genisoimage
diff --git a/vdsm/sos/vdsm.py.in b/vdsm/sos/vdsm.py.in
index 6bc111a..50f0ac2 100644
--- a/vdsm/sos/vdsm.py.in
+++ b/vdsm/sos/vdsm.py.in
@@ -18,7 +18,11 @@
# Refer to the README and COPYING files for full details of the license
#
-import sos.plugintools
+try:
+ from sos.plugins import Plugin, RedHatPlugin
+except:
+ import sos.plugintools
+
import subprocess
import os
@@ -39,7 +43,7 @@
config = _importVdsmPylibModule('config').config
-class vdsm(sos.plugintools.PluginBase):
+class @SOS_CLASS@:
"""VDSM server related information
"""
@@ -54,64 +58,64 @@
irrespective of their size.
"""
if logsize is not None:
- self.addCopySpecLimit(path, logsize)
+ self.@SOS_ADD_COPY_SPEC_LIMIT@(path, logsize)
else:
- self.addCopySpec(path)
+ self.@SOS_ADD_COPY_SPEC@(path)
def setup(self):
os.environ["LVM_SYSTEM_DIR"] = "@VDSMRUNDIR@/lvm"
- self.collectExtOutput("/etc/init.d/vdsmd status")
- self.addCopySpec("/tmp/vds_installer*")
- self.addCopySpec("/tmp/vds_bootstrap*")
- self.addCopySpec("/etc/vdsm/*")
- self.addCopySpec("/etc/vdsm-reg/*")
- logsize = self.getOption('logsize')
+ self.@SOS_CMD_OUTPUT@("/etc/init.d/vdsmd status")
+ self.@SOS_ADD_COPY_SPEC@("/tmp/vds_installer*")
+ self.@SOS_ADD_COPY_SPEC@("/tmp/vds_bootstrap*")
+ self.@SOS_ADD_COPY_SPEC@("/etc/vdsm/*")
+ self.@SOS_ADD_COPY_SPEC@("/etc/vdsm-reg/*")
+ logsize = self.@SOS_GET_OPTION@('logsize')
self.__addCopySpecLogLimit("/var/log/vdsm/*", logsize)
self.__addCopySpecLogLimit("/var/log/vdsm-reg/*", logsize)
self._addVdsmRunDir()
- self.addCopySpec("@TRUSTSTORE@")
- self.addCopySpec("@HOOKSDIR@")
- self.addCopySpec("/var/log/ovirt.log")
- self.addCopySpec("/var/log/sanlock.log")
+ self.@SOS_ADD_COPY_SPEC@("@TRUSTSTORE@")
+ self.@SOS_ADD_COPY_SPEC@("@HOOKSDIR@")
+ self.@SOS_ADD_COPY_SPEC@("/var/log/ovirt.log")
+ self.@SOS_ADD_COPY_SPEC@("/var/log/sanlock.log")
p = subprocess.Popen(['/usr/bin/pgrep', 'qemu-kvm'],
stdout=subprocess.PIPE)
out, err = p.communicate()
for line in out.splitlines():
pid = line.strip()
- self.addCopySpec("/proc/%s/cmdline" % pid)
- self.addCopySpec("/proc/%s/status" % pid)
- self.addCopySpec("/proc/%s/mountstats" % pid)
- self.collectExtOutput("/bin/ls -l /var/log/core")
- self.collectExtOutput("/bin/ls -ldZ /etc/vdsm")
- self.collectExtOutput(
+ self.@SOS_ADD_COPY_SPEC@("/proc/%s/cmdline" % pid)
+ self.@SOS_ADD_COPY_SPEC@("/proc/%s/status" % pid)
+ self.@SOS_ADD_COPY_SPEC@("/proc/%s/mountstats" % pid)
+ self.@SOS_CMD_OUTPUT@("/bin/ls -l /var/log/core")
+ self.@SOS_CMD_OUTPUT@("/bin/ls -ldZ /etc/vdsm")
+ self.@SOS_CMD_OUTPUT@(
"/bin/su vdsm -s /bin/sh -c '/usr/bin/tree -l @VDSMREPO@'")
- self.collectExtOutput(
+ self.@SOS_CMD_OUTPUT@(
"/bin/su vdsm -s /bin/sh -c '/bin/ls -lR @VDSMREPO@'")
- self.collectExtOutput("/sbin/lvm vgs -v -o +tags")
- self.collectExtOutput("/sbin/lvm lvs -v -o +tags")
- self.collectExtOutput("/sbin/lvm pvs -v -o +all")
- self.collectExtOutput("/sbin/fdisk -l")
- self.collectExtOutput("/usr/bin/iostat")
- self.collectExtOutput("/sbin/iscsiadm -m node")
- self.collectExtOutput("/sbin/iscsiadm -m session")
+ self.@SOS_CMD_OUTPUT@("/sbin/lvm vgs -v -o +tags")
+ self.@SOS_CMD_OUTPUT@("/sbin/lvm lvs -v -o +tags")
+ self.@SOS_CMD_OUTPUT@("/sbin/lvm pvs -v -o +all")
+ self.@SOS_CMD_OUTPUT@("/sbin/fdisk -l")
+ self.@SOS_CMD_OUTPUT@("/usr/bin/iostat")
+ self.@SOS_CMD_OUTPUT@("/sbin/iscsiadm -m node")
+ self.@SOS_CMD_OUTPUT@("/sbin/iscsiadm -m session")
sslopt = ['', '-s '][config.getboolean('vars', 'ssl')]
vdsclient = "/usr/bin/vdsClient " + sslopt + "0 "
- self.collectExtOutput(vdsclient + "getVdsCapabilities")
- self.collectExtOutput(vdsclient + "getVdsStats")
- self.collectExtOutput(vdsclient + "getAllVmStats")
- self.collectExtOutput(vdsclient + "list")
- self.collectExtOutput(vdsclient + "getVGList")
- self.collectExtOutput(vdsclient + "getDeviceList")
- self.collectExtOutput(vdsclient + "getAllTasksInfo")
- self.collectExtOutput(vdsclient + "getAllTasksStatuses")
+ self.@SOS_CMD_OUTPUT@(vdsclient + "getVdsCapabilities")
+ self.@SOS_CMD_OUTPUT@(vdsclient + "getVdsStats")
+ self.@SOS_CMD_OUTPUT@(vdsclient + "getAllVmStats")
+ self.@SOS_CMD_OUTPUT@(vdsclient + "list")
+ self.@SOS_CMD_OUTPUT@(vdsclient + "getVGList")
+ self.@SOS_CMD_OUTPUT@(vdsclient + "getDeviceList")
+ self.@SOS_CMD_OUTPUT@(vdsclient + "getAllTasksInfo")
+ self.@SOS_CMD_OUTPUT@(vdsclient + "getAllTasksStatuses")
p = subprocess.Popen(vdsclient + "getConnectedStoragePoolsList",
shell=True, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
out, err = p.communicate()
for line in out.splitlines()[1:-1]:
pool = line.strip()
- self.collectExtOutput(vdsclient + "getSpmStatus " + pool)
- self.collectExtOutput(
+ self.@SOS_CMD_OUTPUT@(vdsclient + "getSpmStatus " + pool)
+ self.@SOS_CMD_OUTPUT@(
'/bin/su vdsm -s @PYTHON@ @VDSMDIR(a)/dumpStorageTable.pyc')
def _addVdsmRunDir(self):
@@ -123,4 +127,4 @@
for f in glob.glob("@VDSMRUNDIR@/*"):
if not f.endswith('.vfd') and not f.endswith('/isoUploader') \
and not f.endswith('/storage'):
- self.addCopySpec(f)
+ self.@SOS_ADD_COPY_SPEC@(f)
--
To view, visit http://gerrit.ovirt.org/25188
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I52fbd9431506c5862cc762b4d3f0701ab5cf6a0b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: cleanup: make VmDevice.custom ever-present
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: cleanup: make VmDevice.custom ever-present
......................................................................
cleanup: make VmDevice.custom ever-present
Device configuration may carry a "custom properties" dictionary that is
copied into its respective VmDevice object. If no such dictionary exist,
the VmDevice.custom is never set.
This patch removes this duality. VmDevice.custom is always there, but it
may be empty if the user has not set any device-specific custom
property.
Change-Id: Icf0677b3d52c3e51c874dcb2b4df12fb3fc22c34
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/vm.py
1 file changed, 14 insertions(+), 17 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/91/25391/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 467e8a5..c03513c 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -1238,12 +1238,13 @@
class VmDevice(object):
__slots__ = ('deviceType', 'device', 'alias', 'specParams', 'deviceId',
- 'conf', 'log', '_deviceXML', 'type')
+ '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)
@@ -1336,7 +1337,7 @@
class NetworkInterfaceDevice(VmDevice):
__slots__ = ('nicModel', 'macAddr', 'network', 'bootOrder', 'address',
- 'linkActive', 'portMirroring', 'custom', 'filter',
+ 'linkActive', 'portMirroring', 'filter',
'sndbufParam', 'driver', 'name')
def __init__(self, conf, log, **kwargs):
@@ -2962,7 +2963,7 @@
for devType in self._devices:
for dev in self._devices[devType]:
- if getattr(dev, 'custom', {}):
+ if dev.custom:
yield dev
def _appendDevices(self, domxml):
@@ -3291,10 +3292,9 @@
nicParams = params['nic']
nic = NetworkInterfaceDevice(self.conf, self.log, **nicParams)
- customProps = getattr(nic, 'custom', {})
nicXml = nic.getXML().toprettyxml(encoding='utf-8')
nicXml = hooks.before_nic_hotplug(nicXml, self.conf,
- params=customProps)
+ params=nic.custom)
nic._deviceXML = nicXml
self.log.debug("Hotplug NIC xml: %s", nicXml)
@@ -3303,7 +3303,7 @@
except libvirt.libvirtError as e:
self.log.error("Hotplug failed", exc_info=True)
nicXml = hooks.after_nic_hotplug_fail(
- nicXml, self.conf, params=customProps)
+ nicXml, self.conf, params=nic.custom)
if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
return errCode['noVM']
return {'status': {'code': errCode['hotplugNic']['status']['code'],
@@ -3319,7 +3319,7 @@
self.saveState()
self._getUnderlyingNetworkInterfaceInfo()
hooks.after_nic_hotplug(nicXml, self.conf,
- params=customProps)
+ params=nic.custom)
if hasattr(nic, 'portMirroring'):
mirroredNetworks = []
@@ -3493,10 +3493,9 @@
for network in nicParams['portMirroring']:
supervdsm.getProxy().unsetPortMirroring(network, nic.name)
- customProps = getattr(nic, 'custom', {})
nicXml = nic.getXML().toprettyxml(encoding='utf-8')
hooks.before_nic_hotunplug(nicXml, self.conf,
- params=customProps)
+ params=nic.custom)
self.log.debug("Hotunplug NIC xml: %s", nicXml)
else:
self.log.error("Hotunplug NIC failed - NIC not found: %s",
@@ -3534,13 +3533,13 @@
self._devices[NIC_DEVICES].append(nic)
self.saveState()
hooks.after_nic_hotunplug_fail(nicXml, self.conf,
- params=customProps)
+ params=nic.custom)
return {
'status': {'code': errCode['hotunplugNic']['status']['code'],
'message': e.message}}
hooks.after_nic_hotunplug(nicXml, self.conf,
- params=customProps)
+ params=nic.custom)
return {'status': doneCode, 'vmList': self.status()}
def setNumberOfCpus(self, numberOfCpus):
@@ -3617,12 +3616,11 @@
if drive.hasVolumeLeases:
return errCode['noimpl']
- customProps = getattr(drive, 'custom', {})
driveXml = drive.getXML().toprettyxml(encoding='utf-8')
self.log.debug("Hotplug disk xml: %s" % (driveXml))
driveXml = hooks.before_disk_hotplug(driveXml, self.conf,
- params=customProps)
+ params=drive.custom)
drive._deviceXML = driveXml
try:
self._dom.attachDevice(driveXml)
@@ -3647,7 +3645,7 @@
self.saveState()
self._getUnderlyingDriveInfo()
hooks.after_disk_hotplug(driveXml, self.conf,
- params=customProps)
+ params=drive.custom)
return {'status': doneCode, 'vmList': self.status()}
@@ -3671,7 +3669,6 @@
if drive.hasVolumeLeases:
return errCode['noimpl']
- customProps = getattr(drive, 'custom', {})
driveXml = drive.getXML().toprettyxml(encoding='utf-8')
self.log.debug("Hotunplug disk xml: %s", driveXml)
# Remove found disk from vm's drives list
@@ -3691,7 +3688,7 @@
self.saveState()
hooks.before_disk_hotunplug(driveXml, self.conf,
- params=customProps)
+ params=drive.custom)
try:
self._dom.detachDevice(driveXml)
except libvirt.libvirtError as e:
@@ -3709,7 +3706,7 @@
'message': e.message}}
else:
hooks.after_disk_hotunplug(driveXml, self.conf,
- params=customProps)
+ params=drive.custom)
self._cleanupDrives(drive)
return {'status': doneCode, 'vmList': self.status()}
--
To view, visit http://gerrit.ovirt.org/25391
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf0677b3d52c3e51c874dcb2b4df12fb3fc22c34
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: interface xml: allow Engine to specify number of queues
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: interface xml: allow Engine to specify number of queues
......................................................................
interface xml: allow Engine to specify number of queues
If a vNIC is used for in-host communication between VMs, its throughput
would gain if it is allocated with multiple queues, numbering as the
vCPUs of the VM. This comes with a price of pinning host memory for this
purpose.
This patch exposes the "queues" per-device custom property which can be
set in a vNIC profile in Engine.
Change-Id: I83e129e3c6900190f9b5d863d832745833fe2699
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/vmTests.py
M vdsm/vm.py
2 files changed, 9 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/25390/1
diff --git a/tests/vmTests.py b/tests/vmTests.py
index 8548808..8b65e06 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -400,7 +400,7 @@
<source bridge="ovirtmgmt"/>
<filterref filter="no-mac-spoofing"/>
<boot order="1"/>
- <driver name="vhost"/>
+ <driver name="vhost" queues="7"/>
<tune>
<sndbuf>0</sndbuf>
</tune>
@@ -416,7 +416,8 @@
'bootOrder': '1', 'filter': 'no-mac-spoofing',
'specParams': {'inbound': {'average': '1000', 'peak': '5000',
'burst': '1024'},
- 'outbound': {'average': '128', 'burst': '256'}}}
+ 'outbound': {'average': '128', 'burst': '256'}},
+ 'custom': {'queues': '7'}}
self.conf['custom'] = {'vhost': 'ovirtmgmt:true', 'sndbuf': '0'}
iface = vm.NetworkInterfaceDevice(self.conf, self.log, **dev)
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 549421c..467e8a5 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -1361,6 +1361,11 @@
self.driver['name'] = vhosts.get(self.network, False)
try:
+ self.driver['queues'] = self.custom['queues']
+ except KeyError:
+ pass # interface queues not specified
+
+ try:
self.sndbufParam = self.conf['custom']['sndbuf']
except KeyError:
pass # custom_sndbuf not specified
@@ -1388,7 +1393,7 @@
<mac address="aa:bb:dd:dd:aa:bb"/>
<model type="virtio"/>
<source bridge="engine"/>
- [<driver name="vhost/qemu"/>]
+ [<driver name="vhost/qemu" queues="int"/>]
[<filterref filter='filter name'/>]
[<tune><sndbuf>0</sndbuf></tune>]
[<link state='up|down'/>]
--
To view, visit http://gerrit.ovirt.org/25390
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I83e129e3c6900190f9b5d863d832745833fe2699
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: interface xml: add <driver> subelement in an extendible way
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: interface xml: add <driver> subelement in an extendible way
......................................................................
interface xml: add <driver> subelement in an extendible way
This patch makes no functional change. A <driver> subelement is added to
an <interface> element iff requested by the "vhost" custom property.
Change-Id: I1514fa11734e8d7e71a8c4aa51733d5087c38828
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/vm.py
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/89/25389/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index af8b3be..549421c 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -1354,8 +1354,12 @@
def _customize(self):
# Customize network device
+ self.driver = {}
+
vhosts = self._getVHostSettings()
- self.driver = vhosts.get(self.network, False)
+ if vhosts:
+ self.driver['name'] = vhosts.get(self.network, False)
+
try:
self.sndbufParam = self.conf['custom']['sndbuf']
except KeyError:
@@ -1384,6 +1388,7 @@
<mac address="aa:bb:dd:dd:aa:bb"/>
<model type="virtio"/>
<source bridge="engine"/>
+ [<driver name="vhost/qemu"/>]
[<filterref filter='filter name'/>]
[<tune><sndbuf>0</sndbuf></tune>]
[<link state='up|down'/>]
@@ -1409,7 +1414,7 @@
iface.appendChildWithArgs('boot', order=self.bootOrder)
if self.driver:
- iface.appendChildWithArgs('driver', name=self.driver)
+ iface.appendChildWithArgs('driver', **self.driver)
if self.sndbufParam:
tune = iface.appendChildWithArgs('tune')
--
To view, visit http://gerrit.ovirt.org/25389
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1514fa11734e8d7e71a8c4aa51733d5087c38828
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
10 years, 2 months
Change in vdsm[ovirt-3.4]: xmlrpc: [Fix] Use correct base class for parsing request
by Gustavo Frederico Temple Pedrosa
Gustavo Frederico Temple Pedrosa has uploaded a new change for review.
Change subject: xmlrpc: [Fix] Use correct base class for parsing request
......................................................................
xmlrpc: [Fix] Use correct base class for parsing request
Previously we always used SecureXMLRPCServer.parse_request, even when
using SimpleXMLRPCServer. That happened to work since both inherit
parse_request from BaseHTTPServer. This patch use the correct base
class, so if one of them will override parse_request, we use the correct
method.
Note: Without this fix ssl=false does not work on python 2.7
Change-Id: I4ef737c02afb97580179f381e0f227ee94e1383f
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1074063
Signed-off-by: Gustavo Pedrosa <gustavo.pedrosa(a)eldorado.org.br>
Reviewed-on: http://gerrit.ovirt.org/24289
---
M vdsm/BindingXMLRPC.py
1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/25524/5
diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py
index bafc7c7..d23235b 100644
--- a/vdsm/BindingXMLRPC.py
+++ b/vdsm/BindingXMLRPC.py
@@ -207,8 +207,7 @@
exc_info=True)
def parse_request(self):
- r = (SecureXMLRPCServer.SecureXMLRPCRequestHandler.
- parse_request(self))
+ r = basehandler.parse_request(self)
threadLocal.flowID = self.headers.get(HTTP_HEADER_FLOWID)
return r
--
To view, visit http://gerrit.ovirt.org/25524
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ef737c02afb97580179f381e0f227ee94e1383f
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Gustavo Frederico Temple Pedrosa <gustavo.pedrosa(a)eldorado.org.br>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa <gustavo.pedrosa(a)eldorado.org.br>
Gerrit-Reviewer: Leonardo Bianconi <leonardo.bianconi(a)eldorado.org.br>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Vitor de Lima <vitor.lima(a)eldorado.org.br>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 2 months
Change in vdsm[master]: stats: report detailed VM down status
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: stats: report detailed VM down status
......................................................................
stats: report detailed VM down status
When a VM goes down it reports exitCode == 1 (ERROR), and the
exitMessage is passed verbarim to the VM log.
In order to have translatable messages, a more detailed
error code is needed.
This patch introduces a new explicit errorCode value, to be
filled with the detailed status code.
The new detailed value is added separately for backward
compatibility with the existing interface.
Change-Id: I8d7064fe79d1cd34499fbb32ed0644757cbe05dd
Bug-Url: https://bugzilla.redhat.com/557125
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M lib/vdsm/define.py
M vdsm/vm.py
M vdsm_api/vdsmapi-schema.json
3 files changed, 50 insertions(+), 10 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/22631/1
diff --git a/lib/vdsm/define.py b/lib/vdsm/define.py
index df8bbf4..50b65c3 100644
--- a/lib/vdsm/define.py
+++ b/lib/vdsm/define.py
@@ -145,3 +145,10 @@
#exitCodes
ERROR = 1
NORMAL = 0
+
+
+class VMDownErrorCode:
+ Success = 0
+ GenericError = 1
+ LostQEMUConnection = 2
+ LibvirtStartFailed = 3
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 534705d..c34c47c 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -43,7 +43,7 @@
from vdsm import utils
from vdsm import vdscli
from vdsm.config import config
-from vdsm.define import ERROR, NORMAL, doneCode, errCode
+from vdsm.define import ERROR, NORMAL, doneCode, errCode, VMDownErrorCode
from vdsm.netinfo import DUMMY_BRIDGE
from storage import outOfProcess as oop
from storage import sd
@@ -2116,7 +2116,7 @@
def _startUnderlyingVm(self):
self.log.debug("Start")
try:
- self.memCommit()
+ self.memCommit() # can raise: ValueError, ConfigParser.Error
self._ongoingCreations.acquire()
self.log.debug("_ongoingCreations acquired")
self._vmCreationEvent.set()
@@ -2162,7 +2162,7 @@
self.log.info("Skipping errors on recovery", exc_info=True)
else:
self.log.error("The vm start process failed", exc_info=True)
- self.setDownStatus(ERROR, str(e))
+ self.setDownStatus(ERROR, str(e), VMDownErrorCode.GenericError)
def _incomingMigrationPending(self):
return 'migrationDest' in self.conf or 'restoreState' in self.conf
@@ -2184,6 +2184,7 @@
# A destroy request has been issued, exit early
break
drive['path'] = self.cif.prepareVolumePath(drive, self.id)
+ # can raise: VolumeError
if drive['device'] == 'disk' and isVdsmImage(drive):
domains.append(drive['domainID'])
else:
@@ -2206,7 +2207,8 @@
elif self.user_destroy:
self.setDownStatus(NORMAL, 'User shut down')
else:
- self.setDownStatus(ERROR, "Lost connection with qemu process")
+ self.setDownStatus(ERROR, "Lost connection with qemu process",
+ VMDownErrorCode.LostQEMUConnection)
def _loadCorrectedTimeout(self, base, doubler=20, load=None):
"""
@@ -2604,7 +2606,8 @@
utils.rmFile(self._guestSocketFile)
- def setDownStatus(self, code, reason):
+ def setDownStatus(self, code, reason,
+ errorCode=VMDownErrorCode.GenericError):
try:
self.lastStatus = 'Down'
with self._confLock:
@@ -2614,6 +2617,8 @@
"Wake up from hibernation failed")
else:
self.conf['exitMessage'] = reason
+ if code == ERROR:
+ self.conf['errorCode'] = errorCode
self.log.debug("Changed state to Down: " + reason)
except DoubleDownError:
pass
@@ -2662,6 +2667,8 @@
stats['exitMessage'] = self.conf['exitMessage']
if 'timeOffset' in self.conf:
stats['timeOffset'] = self.conf['timeOffset']
+ if 'errorCode' in self.conf:
+ stats['errorCode'] = self.conf['errorCode']
return stats
stats = {
@@ -2970,9 +2977,10 @@
self.log.info("VM wrapper has started")
self.conf['smp'] = self.conf.get('smp', '1')
devices = self.buildConfDevices()
+ # can raise: ValueError, RuntimeError, ConfigParser.Error
if not 'recover' in self.conf:
- self.preparePaths(devices[DISK_DEVICES])
+ self.preparePaths(devices[DISK_DEVICES]) # can raise: VolumeError
self._prepareTransientDisks(devices[DISK_DEVICES])
# Update self.conf with updated devices
# For old type vmParams, new 'devices' key will be
@@ -2988,7 +2996,7 @@
# saving we will fail in inconsistent state during recovery.
# So, to get proper device objects during VM recovery flow
# we must to have updated conf before VM run
- self.saveState()
+ self.saveState() # can raise: OSError, IOError
else:
for drive in devices[DISK_DEVICES]:
if drive['device'] == 'disk' and isVdsmImage(drive):
@@ -3006,13 +3014,14 @@
return
if not 'recover' in self.conf:
domxml = hooks.before_vm_start(self._buildCmdLine(), self.conf)
+ # can raise: HookError
self.log.debug(domxml)
if 'recover' in self.conf:
self._dom = NotifyingVirDomain(
self._connection.lookupByUUIDString(self.id),
self._timeoutExperienced)
# Reinitialize the merge statuses
- self._checkMerge()
+ self._checkMerge() # can raise: OSError, IOError
elif 'restoreState' in self.conf:
fromSnapshot = self.conf.get('restoreFromSnapshot', False)
srcDomXML = self.conf.pop('_srcDomXML')
@@ -3020,6 +3029,7 @@
srcDomXML = self._correctDiskVolumes(srcDomXML)
hooks.before_vm_dehibernate(srcDomXML, self.conf,
{'FROM_SNAPSHOT': str(fromSnapshot)})
+ # can raise: HookError
fname = self.cif.prepareVolumePath(self.conf['restoreState'])
try:
@@ -3050,7 +3060,8 @@
dev.custom)
if not self._dom:
- self.setDownStatus(ERROR, 'failed to start libvirt vm')
+ self.setDownStatus(ERROR, 'failed to start libvirt vm',
+ VMDownErrorCode.LibvirtStartFailed)
return
self._domDependentInit()
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index 77ca409..8a1ee8a 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -5220,6 +5220,25 @@
{'enum': 'VmExitCode', 'data': ['NORMAL', 'ERROR']}
##
+# @VmErrorCode:
+#
+# An enumeration of VM error codes if VM exit status code is ERROR.
+#
+# @success: The VM has exited gracefully
+#
+# @generic error: Unspecified error code.
+#
+# @lost qemu connection: The VM has lost the connection with QEMU
+#
+# @libvirt start failed: The VM failed to start thorugh libvirt
+#
+# Since: 4.13.0
+##
+{'enum': 'VmErrorCode',
+ 'data': ['success', 'generic error',
+ 'lost qemu connection', 'libvirt start failed']}
+
+##
# @ExitedVmStats:
#
# Statistics about a VM that no longer running.
@@ -5232,11 +5251,14 @@
#
# @timeOffset: #optional The time difference from host to the VM in seconds
#
+# @errorCode: #optional The specific error code if the VM is exited
+# with error (new in version 4.13.0)
+#
# Since: 4.10.0
##
{'type': 'ExitedVmStats',
'data': {'exitCode': 'VmExitCode', 'status': 'VmStatus', 'exitMessage': 'str',
- '*timeOffset': 'int'}}
+ '*timeOffset': 'int', '*errorCode': 'VmErrorCode'}}
##
# @VmDiskStats:
--
To view, visit http://gerrit.ovirt.org/22631
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d7064fe79d1cd34499fbb32ed0644757cbe05dd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: pep8: whitelist everything
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: pep8: whitelist everything
......................................................................
pep8: whitelist everything
.. except for four auto-generated *.py files
Change-Id: I237e19d5cdd087d8fe0f337f41560b72b1c80a37
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M Makefile.am
M lib/vdsm/tool/dummybr.py
2 files changed, 3 insertions(+), 23 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/25392/1
diff --git a/Makefile.am b/Makefile.am
index 9b1a3c9..3f4266c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,27 +53,7 @@
WITH_HOOKS = --define="with_hooks 1"
endif
-# When fixing a file to conform with pep8 add it to the WL here so it will be
-# checkd from now on
-PEP8_WHITELIST = \
- client \
- lib/vdsm/*.py \
- lib/vdsm/*.py.in \
- tests \
- vds_bootstrap \
- vdsm-tool \
- vdsm/*.py \
- vdsm/*.py.in \
- vdsm/netconf \
- vdsm/sos/vdsm.py.in \
- vdsm/storage \
- vdsm/vdsm \
- vdsm_api \
- vdsm_hooks \
- vdsm_reg \
- $(NULL)
-
-PEP8_BLACKLIST = config.py,constants.py
+PEP8_BLACKLIST = config.py,constants.py,crossImportsTests.py,vdsm.py
SKIP_PYFLAKES_ERR = "\./vdsm/storage/lvm\.py.*: list comprehension redefines \
'lv' from line .*"
@@ -84,8 +64,7 @@
grep -w -v $(SKIP_PYFLAKES_ERR) | \
while read LINE; do echo "$$LINE"; false; done
$(PEP8) --version
- $(PEP8) --exclude="$(PEP8_BLACKLIST)" --filename '*.py,*.py.in' \
- $(PEP8_WHITELIST)
+ $(PEP8) --exclude="$(PEP8_BLACKLIST)" --filename '*.py,*.py.in' .
@if test -f .gitignore; then \
for i in `git ls-files \*.in`; do \
if ! grep -q -x $${i%%.in} .gitignore; then \
diff --git a/lib/vdsm/tool/dummybr.py b/lib/vdsm/tool/dummybr.py
index be4a1da..d5825f2 100644
--- a/lib/vdsm/tool/dummybr.py
+++ b/lib/vdsm/tool/dummybr.py
@@ -40,6 +40,7 @@
'''<network><name>%s</name><forward mode='bridge'/><bridge '''
'''name='%s'/></network>''' % (bridgeName, bridgeName))
+
@expose('dummybr')
def main():
"""
--
To view, visit http://gerrit.ovirt.org/25392
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I237e19d5cdd087d8fe0f337f41560b72b1c80a37
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
10 years, 2 months