Change in vdsm[master]: [poc] vm: do not pause during refreshVolume
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: [poc] vm: do not pause during refreshVolume
......................................................................
[poc] vm: do not pause during refreshVolume
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
Change-Id: I896993c00b94c3255ad2007486e0589bf10b3a98
---
M vdsm/vm.py
1 file changed, 2 insertions(+), 13 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/82/8382/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 64644f0..686a589 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -743,19 +743,8 @@
self.__extendDriveVolume(vmDrive, newSize)
def __refreshDriveVolume(self, volInfo):
- """ Stop vm before refreshing LV. """
-
- self._guestCpuLock.acquire()
- try:
- wasRunning = self._guestCpuRunning
- if wasRunning:
- self.pause(guestCpuLocked=True)
- self.cif.irs.refreshVolume(volInfo['domainID'],
- volInfo['poolID'], volInfo['imageID'], volInfo['volumeID'])
- if wasRunning:
- self.cont(guestCpuLocked=True)
- finally:
- self._guestCpuLock.release()
+ self.cif.irs.refreshVolume(volInfo['domainID'], volInfo['poolID'],
+ volInfo['imageID'], volInfo['volumeID'])
def __afterReplicaExtend(self, volInfo):
self.log.debug("Refreshing replica volume: %s", volInfo)
--
To view, visit http://gerrit.ovirt.org/8382
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I896993c00b94c3255ad2007486e0589bf10b3a98
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
10 years, 3 months
Change in vdsm[master]: storage: refactor nfsSD.py for posix storage
by gpadgett@redhat.com
Greg Padgett has uploaded a new change for review.
Change subject: storage: refactor nfsSD.py for posix storage
......................................................................
storage: refactor nfsSD.py for posix storage
NFS and PosixFs domains are no longer handled the same way, so logic
that differs between them should be appropriately separated into
classes for each connection type. This removes the need to have a
storageType parameter to NfsStorageDomain:_preCreateValidation().
For now, there's no reason to have a PosixFsStorageDomain class for
Posix storage (it would be empty), so just use MountableStorageDomain
until the need for a subclass arises.
Change-Id: Ic5788925f9c11b417aba713c652fc2a92f178830
Signed-off-by: Greg Padgett <gpadgett(a)redhat.com>
---
M Makefile.am
M vdsm.spec.in
M vdsm/storage/Makefile.am
M vdsm/storage/hsm.py
A vdsm/storage/mountableSD.py
M vdsm/storage/nfsSD.py
M vdsm/storage/sdc.py
7 files changed, 148 insertions(+), 114 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/88/9088/1
diff --git a/Makefile.am b/Makefile.am
index bd262af..a96d3f7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -83,6 +83,7 @@
vdsm/storage/lvm.py \
vdsm/storage/misc.py \
vdsm/storage/mount.py \
+ vdsm/storage/mountableSD.py \
vdsm/storage/multipath.py \
vdsm/storage/nfsSD.py \
vdsm/storage/outOfProcess.py \
diff --git a/vdsm.spec.in b/vdsm.spec.in
index c117ee5..d76495c 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -661,6 +661,7 @@
%{_datadir}/%{vdsm_name}/storage/lvm.py*
%{_datadir}/%{vdsm_name}/storage/misc.py*
%{_datadir}/%{vdsm_name}/storage/mount.py*
+%{_datadir}/%{vdsm_name}/storage/mountableSD.py*
%{_datadir}/%{vdsm_name}/storage/multipath.py*
%{_datadir}/%{vdsm_name}/storage/nfsSD.py*
%{_datadir}/%{vdsm_name}/storage/outOfProcess.py*
diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am
index cff09be..cf8f768 100644
--- a/vdsm/storage/Makefile.am
+++ b/vdsm/storage/Makefile.am
@@ -41,6 +41,7 @@
lvm.py \
misc.py \
mount.py \
+ mountableSD.py \
multipath.py \
nfsSD.py \
outOfProcess.py \
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 259676b..f56c8b0 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -41,8 +41,9 @@
import sp
import sd
import blockSD
-import nfsSD
import localFsSD
+import mountableSD
+import nfsSD
import lvm
import fileUtils
import multipath
@@ -2251,16 +2252,18 @@
#getSharedLock(connectionsResource...)
#getExclusiveLock(sdUUID...)
- if storageType in sd.BLOCK_DOMAIN_TYPES:
- newSD = blockSD.BlockStorageDomain.create(sdUUID, domainName,
- domClass, typeSpecificArg, storageType, domVersion)
- elif storageType in (sd.NFS_DOMAIN, sd.POSIXFS_DOMAIN):
- newSD = nfsSD.NfsStorageDomain.create(sdUUID, domainName, domClass,
- typeSpecificArg, storageType, domVersion)
- elif storageType == sd.LOCALFS_DOMAIN:
- newSD = localFsSD.LocalFsStorageDomain.create(sdUUID, domainName,
- domClass, typeSpecificArg, storageType, domVersion)
- else:
+ sdConstructorMap = {
+ sd.NFS_DOMAIN : nfsSD.NfsStorageDomain,
+ sd.POSIXFS_DOMAIN : mountableSD.MountableStorageDomain,
+ sd.LOCALFS_DOMAIN : localFsSD.LocalFsStorageDomain,
+ }
+ for domType in sd.BLOCK_DOMAIN_TYPES:
+ sdConstructorMap[domType] = blockSD.BlockStorageDomain
+
+ try:
+ newSD = sdConstructorMap[storageType].create(sdUUID, domainName,
+ domClass, typeSpecificArg, storageType, domVersion)
+ except KeyError:
raise se.StorageDomainTypeError(storageType)
sdCache.manuallyAddDomain(newSD)
diff --git a/vdsm/storage/mountableSD.py b/vdsm/storage/mountableSD.py
new file mode 100644
index 0000000..05284ab
--- /dev/null
+++ b/vdsm/storage/mountableSD.py
@@ -0,0 +1,122 @@
+#
+# Copyright 2009-2012 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Refer to the README and COPYING files for full details of the license
+#
+
+import os
+
+import sd
+import fileSD
+import fileUtils
+import storage_exception as se
+import outOfProcess as oop
+import mount
+import misc
+
+
+class MountableStorageDomain(fileSD.FileStorageDomain):
+
+ @classmethod
+ def _preCreateValidation(cls, sdUUID, domPath, typeSpecificArg, version):
+ # Some trivial resource validation
+ sd.validateDomainVersion(version)
+
+ # Make sure the underlying file system is mounted
+ if not mount.isMounted(domPath):
+ raise se.StorageDomainFSNotMounted(domPath)
+
+ fileSD.validateDirAccess(domPath)
+
+ # Make sure there are no remnants of other domain
+ mdpat = os.path.join(domPath, "*", sd.DOMAIN_META_DATA)
+ if len(oop.getProcessPool(sdUUID).glob.glob(mdpat)) > 0:
+ raise se.StorageDomainNotEmpty(typeSpecificArg)
+
+ @classmethod
+ def create(cls, sdUUID, domainName, domClass, remotePath, storageType,
+ version):
+ """
+ Create new storage domain.
+ 'sdUUID' - Storage Domain UUID
+ 'domainName' - storage domain name ("iso" or "data domain name")
+ 'domClass' - Data/Iso
+ 'remotePath' - server:/export_path
+ 'storageType' - NFS_DOMAIN, LOCALFS_DOMAIN, &etc.
+ 'version' - DOMAIN_VERSIONS
+ """
+ cls.log.info("sdUUID=%s domainName=%s remotePath=%s "
+ "domClass=%s", sdUUID, domainName, remotePath, domClass)
+
+ if not misc.isAscii(domainName) and not sd.supportsUnicode(version):
+ raise se.UnicodeArgumentException()
+
+ # Create local path
+ mntPath = fileUtils.transformPath(remotePath)
+
+ mntPoint = os.path.join(cls.storage_repository,
+ sd.DOMAIN_MNT_POINT, mntPath)
+
+ cls._preCreateValidation(sdUUID, mntPoint, remotePath, version)
+
+ domainDir = os.path.join(mntPoint, sdUUID)
+ cls._prepareMetadata(domainDir, sdUUID, domainName, domClass,
+ remotePath, storageType, version)
+
+ # create domain images folder
+ imagesDir = os.path.join(domainDir, sd.DOMAIN_IMAGES)
+ oop.getProcessPool(sdUUID).fileUtils.createdir(imagesDir)
+
+ # create special imageUUID for ISO/Floppy volumes
+ if domClass is sd.ISO_DOMAIN:
+ isoDir = os.path.join(imagesDir, sd.ISO_IMAGE_UUID)
+ oop.getProcessPool(sdUUID).fileUtils.createdir(isoDir)
+
+ fsd = cls(os.path.join(mntPoint, sdUUID))
+ fsd.initSPMlease()
+
+ return fsd
+
+ def selftest(self):
+ """
+ Run internal self test
+ """
+ if not mount.isMounted(self.mountpoint):
+ raise se.StorageDomainFSNotMounted(self.mountpoint)
+
+ # Run general part of selftest
+ fileSD.FileStorageDomain.selftest(self)
+
+ @staticmethod
+ def findDomainPath(sdUUID):
+ for tmpSdUUID, domainPath in fileSD.scanDomains("*"):
+ if tmpSdUUID == sdUUID and mount.isMounted(
+ os.path.join(domainPath, "..")):
+ return domainPath
+
+ raise se.StorageDomainDoesNotExist(sdUUID)
+
+ def getRealPath(self):
+ try:
+ return mount.getMountFromTarget(self.mountpoint).fs_spec
+ except mount.MountError:
+ return ""
+
+
+def findDomain(sdUUID):
+ return MountableStorageDomain(MountableStorageDomain
+ .findDomainPath(sdUUID))
diff --git a/vdsm/storage/nfsSD.py b/vdsm/storage/nfsSD.py
index 3a1c90e..15dd137 100644
--- a/vdsm/storage/nfsSD.py
+++ b/vdsm/storage/nfsSD.py
@@ -1,5 +1,5 @@
#
-# Copyright 2009-2011 Red Hat, Inc.
+# Copyright 2009-2012 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,110 +18,16 @@
# Refer to the README and COPYING files for full details of the license
#
-import os
-
-import sd
-import fileSD
-import fileUtils
+import mountableSD
import storage_exception as se
-import outOfProcess as oop
-import mount
-import misc
-class NfsStorageDomain(fileSD.FileStorageDomain):
+class NfsStorageDomain(mountableSD.MountableStorageDomain):
@classmethod
- def _preCreateValidation(cls, sdUUID, domPath, typeSpecificArg,
- storageType, version):
- # Some trivial resource validation
- # TODO Checking storageType==nfs in the nfs class is not clean
- if storageType == sd.NFS_DOMAIN and ":" not in typeSpecificArg:
+ def _preCreateValidation(cls, sdUUID, domPath, typeSpecificArg, version):
+ if ":" not in typeSpecificArg:
raise se.StorageDomainIllegalRemotePath(typeSpecificArg)
- sd.validateDomainVersion(version)
-
- # Make sure the underlying file system is mounted
- if not mount.isMounted(domPath):
- raise se.StorageDomainFSNotMounted(domPath)
-
- fileSD.validateDirAccess(domPath)
-
- # Make sure there are no remnants of other domain
- mdpat = os.path.join(domPath, "*", sd.DOMAIN_META_DATA)
- if len(oop.getProcessPool(sdUUID).glob.glob(mdpat)) > 0:
- raise se.StorageDomainNotEmpty(typeSpecificArg)
-
- @classmethod
- def create(cls, sdUUID, domainName, domClass, remotePath, storageType,
- version):
- """
- Create new storage domain.
- 'sdUUID' - Storage Domain UUID
- 'domainName' - storage domain name ("iso" or "data domain name")
- 'domClass' - Data/Iso
- 'remotePath' - server:/export_path
- 'storageType' - NFS_DOMAIN, LOCALFS_DOMAIN, &etc.
- 'version' - DOMAIN_VERSIONS
- """
- cls.log.info("sdUUID=%s domainName=%s remotePath=%s "
- "domClass=%s", sdUUID, domainName, remotePath, domClass)
-
- if not misc.isAscii(domainName) and not sd.supportsUnicode(version):
- raise se.UnicodeArgumentException()
-
- # Create local path
- mntPath = fileUtils.transformPath(remotePath)
-
- mntPoint = os.path.join(cls.storage_repository,
- sd.DOMAIN_MNT_POINT, mntPath)
-
- cls._preCreateValidation(sdUUID, mntPoint, remotePath, storageType,
- version)
-
- domainDir = os.path.join(mntPoint, sdUUID)
- cls._prepareMetadata(domainDir, sdUUID, domainName, domClass,
- remotePath, storageType, version)
-
- # create domain images folder
- imagesDir = os.path.join(domainDir, sd.DOMAIN_IMAGES)
- oop.getProcessPool(sdUUID).fileUtils.createdir(imagesDir)
-
- # create special imageUUID for ISO/Floppy volumes
- if domClass is sd.ISO_DOMAIN:
- isoDir = os.path.join(imagesDir, sd.ISO_IMAGE_UUID)
- oop.getProcessPool(sdUUID).fileUtils.createdir(isoDir)
-
- fsd = cls(os.path.join(mntPoint, sdUUID))
- fsd.initSPMlease()
-
- return fsd
-
- def selftest(self):
- """
- Run internal self test
- """
- if not mount.isMounted(self.mountpoint):
- raise se.StorageDomainFSNotMounted(self.mountpoint)
-
- # Run general part of selftest
- fileSD.FileStorageDomain.selftest(self)
-
- @staticmethod
- def findDomainPath(sdUUID):
- for tmpSdUUID, domainPath in fileSD.scanDomains("*"):
- if tmpSdUUID == sdUUID and mount.isMounted(
- os.path.join(domainPath, "..")):
- return domainPath
-
- raise se.StorageDomainDoesNotExist(sdUUID)
-
- def getRealPath(self):
- try:
- return mount.getMountFromTarget(self.mountpoint).fs_spec
- except mount.MountError:
- return ""
-
-
-def findDomain(sdUUID):
- return NfsStorageDomain(NfsStorageDomain.findDomainPath(sdUUID))
+ mountableSD.MountableStorageDomain._preCreateValidation(sdUUID,
+ domPath, typeSpecificArg, version)
diff --git a/vdsm/storage/sdc.py b/vdsm/storage/sdc.py
index f2f4534..1064b5e 100644
--- a/vdsm/storage/sdc.py
+++ b/vdsm/storage/sdc.py
@@ -132,7 +132,7 @@
def _findDomain(self, sdUUID):
import blockSD
import localFsSD
- import nfsSD
+ import mountableSD
# The order is somewhat important, it's ordered
# by how quickly get can find the domain. For instance
@@ -140,7 +140,7 @@
# until it times out, this should affect fetching
# of block\local domains. If for any case in the future
# this changes, please update the order.
- for mod in (blockSD, localFsSD, nfsSD):
+ for mod in (blockSD, localFsSD, mountableSD):
try:
return mod.findDomain(sdUUID)
except se.StorageDomainDoesNotExist:
--
To view, visit http://gerrit.ovirt.org/9088
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5788925f9c11b417aba713c652fc2a92f178830
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <gpadgett(a)redhat.com>
10 years, 4 months
Change in vdsm[master]: add emulator pin support to create vm
by lvroyce@linux.vnet.ibm.com
Royce Lv has uploaded a new change for review.
Change subject: add emulator pin support to create vm
......................................................................
add emulator pin support to create vm
move cpupin to a seperate function 'appendTunable'
to add cputune(e.g.cpu_share),memtune limit def when create vm.
add emulator pin support to create vm,
then the cpuPinning dict changs to be:
{0:'1-4','emulator':'2'}
Change-Id: Ic616b825eca94682e1563ab51773d8a23351998d
Signed-off-by: Royce Lv<lvroyce(a)linux.vnet.ibm.com>
---
M vdsm/libvirtvm.py
1 file changed, 21 insertions(+), 12 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/11/8411/1
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
index 64a3b6b..fd80c69 100644
--- a/vdsm/libvirtvm.py
+++ b/vdsm/libvirtvm.py
@@ -716,18 +716,6 @@
topo.setAttribute('threads', str(threads))
cpu.appendChild(topo)
- #CPU-pinning support
- # see http://www.ovirt.org/wiki/Features/Design/cpu-pinning
- if 'cpuPinning' in self.conf:
- cputune = self.doc.createElement('cputune')
- cpuPinning = self.conf.get('cpuPinning')
- for cpuPin in cpuPinning.keys():
- vcpupin = self.doc.createElement('vcpupin')
- vcpupin.setAttribute('vcpu', cpuPin)
- vcpupin.setAttribute('cpuset', cpuPinning[cpuPin])
- cputune.appendChild(vcpupin)
- self.dom.appendChild(cputune)
-
# This hack is for backward compatibility as the libvirt does not allow
# 'qemu64' guest on intel hardware
if model == 'qemu64' and not '+svm' in features:
@@ -747,6 +735,26 @@
f.setAttribute('name', feature[1:])
cpu.appendChild(f)
self.dom.appendChild(cpu)
+
+ def appendTunable(self):
+ #CPU-pinning support
+ # see http://www.ovirt.org/wiki/Features/Design/cpu-pinning
+ if 'cpuPinning' in self.conf:
+ cputune = self.doc.createElement('cputune')
+ cpuPinning = self.conf.get('cpuPinning')
+ try:
+ emulatorset = cpuPinning.pop('emulator')
+ emulatorpin = self.doc.createElement('emulatorpin')
+ emulatorpin.setAttribute('cpuset', emulatorset)
+ cputune.appendChild(emulatorpin)
+ except:
+ pass
+ for cpuPin in cpuPinning.keys():
+ vcpupin = self.doc.createElement('vcpupin')
+ vcpupin.setAttribute('vcpu', cpuPin)
+ vcpupin.setAttribute('cpuset', cpuPinning[cpuPin])
+ cputune.appendChild(vcpupin)
+ self.dom.appendChild(cputune)
def _appendAgentDevice(self, path, name):
"""
@@ -1230,6 +1238,7 @@
domxml.appendClock()
domxml.appendFeatures()
domxml.appendCpu()
+ domxml.appendTunable()
if utils.tobool(self.conf.get('vmchannel', 'true')):
domxml._appendAgentDevice(
self._guestSocketFile.decode('utf-8'),
--
To view, visit http://gerrit.ovirt.org/8411
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic616b825eca94682e1563ab51773d8a23351998d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
10 years, 4 months
Change in vdsm[master]: force reload udev rules to avoid LUN device permission error
by lvroyce@linux.vnet.ibm.com
Royce Lv has uploaded a new change for review.
Change subject: force reload udev rules to avoid LUN device permission error
......................................................................
force reload udev rules to avoid LUN device permission error
udev rules creat symlink for LUN device making it usable for qemu
but the rules are not instantly loaded by udev
result in LUN device symlink not created before vm run
force reload to make the rules take effect instantly
Change-Id: I718d62e67b0a228f2510233c5dd9d1d94c4a736c
Signed-off-by: Royce Lv<lvroyce(a)linux.vnet.ibm.com>
---
M vdsm/storage/hsm.py
M vdsm/supervdsmServer.py
2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/80/6780/1
--
To view, visit http://gerrit.ovirt.org/6780
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I718d62e67b0a228f2510233c5dd9d1d94c4a736c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
10 years, 4 months
Change in vdsm[master]: Encapsulate vdsm-unregister into vdsm-tool function
by lilei@linux.vnet.ibm.com
Lei Li has uploaded a new change for review.
Change subject: Encapsulate vdsm-unregister into vdsm-tool function
......................................................................
Encapsulate vdsm-unregister into vdsm-tool function
Change-Id: I7348baeabbdcbb0c2da64170b6957430feaa1954
Signed-off-by: Lei Li <lilei(a)linux.vnet.ibm.com>
---
M vdsm-tool/Makefile.am
A vdsm-tool/register.py
M vdsm.spec.in
3 files changed, 43 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/27/4527/1
--
To view, visit http://gerrit.ovirt.org/4527
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7348baeabbdcbb0c2da64170b6957430feaa1954
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Lei Li <lilei(a)linux.vnet.ibm.com>
10 years, 4 months
Change in vdsm[master]: [WIP] objectfs integration
by peet@redhat.com
Peter V. Saveliev has uploaded a new change for review.
Change subject: [WIP] objectfs integration
......................................................................
[WIP] objectfs integration
Export VM objects as files in runtime.
Signed-off-by: Peter V. Saveliev <peet(a)redhat.com>
Change-Id: I6dd2ca2245f3f5496eca9f8c14bed79d4638c189
---
M vdsm/vm.py
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/83/8383/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index d49eef1..cd6c6ca 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -33,6 +33,7 @@
from logUtils import SimpleLogAdapter
import libvirt
from vdsm import vdscli
+from pyvfs.objectfs import export
DEFAULT_BRIDGE = config.get("vars", "default_bridge")
@@ -250,6 +251,12 @@
'Restoring state', 'Saving State',
'Up', 'WaitForLaunch')
+
+@export(blacklist=[
+ "/log",
+ "/MigrationSourceThreadClass",
+ "/cif",
+ ])
class Vm(object):
"""
Used for abstracting communication between various parts of the
--
To view, visit http://gerrit.ovirt.org/8383
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6dd2ca2245f3f5496eca9f8c14bed79d4638c189
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Peter V. Saveliev <peet(a)redhat.com>
10 years, 4 months
Change in vdsm[master]: new API call getVersionInfo()
by peet@redhat.com
Peter V. Saveliev has uploaded a new change for review.
Change subject: new API call getVersionInfo()
......................................................................
new API call getVersionInfo()
getCapabilities() is too expensive to discover the target VDSM
version e.g. for migration
Signed-off-by: Peter V. Saveliev <peet(a)redhat.com>
Change-Id: I3f55ef437ca404ca04598d34c41756b1e68ced95
---
M vdsm/API.py
M vdsm/BindingXMLRPC.py
M vdsm_api/vdsmapi-schema.json
3 files changed, 50 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/8431/1
diff --git a/vdsm/API.py b/vdsm/API.py
index bbc3221..f95ac80 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -39,6 +39,7 @@
import storage.image
from vdsm.define import doneCode, errCode, Kbytes, Mbytes
import caps
+import dsaversion
from vdsm.config import config
import supervdsm
@@ -328,6 +329,12 @@
return errCode['noVM']
return v.migrateStatus()
+ def getVersionInfo(self):
+ """
+ """
+ info = dsaversion.version_info
+ return {'status': doneCode, 'info': info}
+
def getStats(self):
"""
Obtain statistics of the specified VM
diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py
index fc57019..351e3a0 100644
--- a/vdsm/BindingXMLRPC.py
+++ b/vdsm/BindingXMLRPC.py
@@ -284,6 +284,10 @@
ret['info'].update(self.getServerInfo())
return ret
+ def getVersionInfo(self):
+ api = API.Global()
+ return api.getVersionInfo()
+
def getStats(self):
api = API.Global()
return api.getStats()
@@ -748,6 +752,7 @@
(self.vmGetMigrationStatus, 'migrateStatus'),
(self.vmMigrationCancel, 'migrateCancel'),
(self.getCapabilities, 'getVdsCapabilities'),
+ (self.getVersionInfo, 'getVersionInfo'),
(self.getStats, 'getVdsStats'),
(self.vmGetStats, 'getVmStats'),
(self.getAllVmStats, 'getAllVmStats'),
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index 10d2aaa..a1b5ba3 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -1515,6 +1515,44 @@
'returns': 'HostStats'}
##
+# @VdsmCapabilities:
+#
+# Host information and capabilities.
+#
+# @version_name: The name given to this version of VDSM
+#
+# @software_version: VDSM version (x.y.z)
+#
+# @software_revision: Extra VDSM version information
+#
+# @supportedRHEVMs: A list of supported ovirt-engine versions
+#
+# @supportedProtocols: A list of supported xmlrpc protocol versions
+#
+# @clusterLevels: A list of supported cluster versions
+#
+# Since: 4.10.1
+#
+##
+{'type': 'HostInfo',
+ 'data': {'version_name': 'str', 'software_version': 'str',
+ 'software_revision': 'str', 'supportedRHEVMs': ['str'],
+ 'supportedProtocols': ['str'], 'clusterLevels': ['str']}}
+
+##
+## @Host.getVersionInfo:
+#
+# Get VDSM version information
+#
+# Returns:
+# The versions dictionary
+#
+# Since: 4.10.1
+##
+{'command': {'class': 'Host', 'name': 'getVersionInfo'},
+ 'returns': 'HostInfo'}
+
+##
# @StorageDomainImageClass:
#
# An enumeration of Storage Domain classes.
--
To view, visit http://gerrit.ovirt.org/8431
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f55ef437ca404ca04598d34c41756b1e68ced95
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Peter V. Saveliev <peet(a)redhat.com>
10 years, 4 months
Change in vdsm[master]: Move uninstall preun section to vdsm-unregister
by lilei@linux.vnet.ibm.com
Lei Li has uploaded a new change for review.
Change subject: Move uninstall preun section to vdsm-unregister
......................................................................
Move uninstall preun section to vdsm-unregister
The specfile vdsm.spec.in has very long %post and %preun
sections, move the install/uninstall hooks into vdsm-tool.
This patch move unregister to a script which will be
encapsulated into a vdsm-tool function stop-vdsm-service.
Change-Id: I4e7b5dc969dfb51e6880b9bb209a363609f5e123
Signed-off-by: Lei Li <lilei(a)linux.vnet.ibm.com>
---
M vdsm.spec.in
M vdsm/Makefile.am
A vdsm/vdsm-unregister.in
3 files changed, 36 insertions(+), 42 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/26/4526/1
--
To view, visit http://gerrit.ovirt.org/4526
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e7b5dc969dfb51e6880b9bb209a363609f5e123
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Lei Li <lilei(a)linux.vnet.ibm.com>
10 years, 4 months
Change in vdsm[master]: utils.py: Add hostUUID retrieval support for KVM on PPC64
by Pradipta Kumar Banerjee
Pradipta Banerjee has uploaded a new change for review.
Change subject: utils.py: Add hostUUID retrieval support for KVM on PPC64
......................................................................
utils.py: Add hostUUID retrieval support for KVM on PPC64
Change-Id: I7a557b096550631e340fcc61bcb3fa4c3ae73837
Signed-off-by: Pradipta Kr. Banerjee <bpradip(a)in.ibm.com>
---
M vdsm/utils.py
1 file changed, 16 insertions(+), 10 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/37/8637/1
diff --git a/vdsm/utils.py b/vdsm/utils.py
index 0dbb342..80582d4 100644
--- a/vdsm/utils.py
+++ b/vdsm/utils.py
@@ -37,6 +37,7 @@
import functools
import stat
import glob
+import platform
import ethtool
@@ -701,19 +702,23 @@
with open(constants.P_VDSM_NODE_ID) as f:
__hostUUID = f.readline().replace("\n", "")
else:
- p = subprocess.Popen([constants.EXT_SUDO,
+ arch = platform.machine()
+ if arch == 'x86_64':
+ p = subprocess.Popen([constants.EXT_SUDO,
constants.EXT_DMIDECODE, "-s", "system-uuid"],
- close_fds=True, stdin=subprocess.PIPE,
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- out, err = p.communicate()
- out = '\n'.join( line for line in out.splitlines()
+ close_fds=True, stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = p.communicate()
+ out = '\n'.join( line for line in out.splitlines()
if not line.startswith('#') )
- if p.returncode == 0 and 'Not' not in out:
- #Avoid error string - 'Not Settable' or 'Not Present'
- __hostUUID = out.strip()
- else:
- logging.warning('Could not find host UUID.')
+ if p.returncode == 0 and 'Not' not in out:
+ #Avoid error string - 'Not Settable' or 'Not Present'
+ __hostUUID = out.strip()
+ elif arch == 'ppc64':
+ if os.path.exists('/proc/device-tree/system-id'):
+ #eg. output IBM,03061C14A
+ __hostUUID = file('/proc/device-tree/system-id').readline().replace(",", "")
try:
mac = sorted(_getAllMacs())[0]
@@ -724,6 +729,7 @@
if __hostUUID != "None":
__hostUUID += "_" + mac
else:
+ logging.warning('Could not find host UUID')
__hostUUID = "_" + mac
except:
logging.error("Error retrieving host UUID", exc_info=True)
--
To view, visit http://gerrit.ovirt.org/8637
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a557b096550631e340fcc61bcb3fa4c3ae73837
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Pradipta Banerjee <bpradip(a)in.ibm.com>
10 years, 4 months
Change in vdsm[master]: Adjust width for usage_command in vdsm-tool
by lilei@linux.vnet.ibm.com
Lei Li has uploaded a new change for review.
Change subject: Adjust width for usage_command in vdsm-tool
......................................................................
Adjust width for usage_command in vdsm-tool
The default value of width is 70 characters. It may not
be long enough for most of the usage_command comments.
So adjust it to add flexibility.
Change-Id: I800384e77452a76f651b73205b3335905274077c
Signed-off-by: Lei Li <lilei(a)linux.vnet.ibm.com>
---
M vdsm-tool/vdsm-tool
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/48/4648/1
--
To view, visit http://gerrit.ovirt.org/4648
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I800384e77452a76f651b73205b3335905274077c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Lei Li <lilei(a)linux.vnet.ibm.com>
10 years, 4 months