Change in vdsm[master]: Misc storage exception class name style
by shuming@linux.vnet.ibm.com
Shu Ming has uploaded a new change for review.
Change subject: Misc storage exception class name style
......................................................................
Misc storage exception class name style
All the misc storage exception class name should
be prefixed with "Misc"
Change-Id: I2f6f279d13b92bbb8f573a0d772d7504860bbbe3
Signed-off-by: Shu Ming <shuming(a)linux.vnet.ibm.com>
---
M vdsm/storage/sp.py
M vdsm/storage/storage_exception.py
2 files changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/47/8847/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 4aa63c0..7622556 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -220,7 +220,7 @@
.. note::
if the SPM is already started the function will fail silently.
- :raises: :exc:`storage_exception.OperationInProgress` if called during an already running connection attempt.
+ :raises: :exc:`storage_exception.MiscOperationInProgress` if called during an already running connection attempt.
(makes the fact that it fails silently does not matter very much).
"""
with self.lock:
@@ -228,7 +228,7 @@
return True
# Since we added the lock the following should NEVER happen
if self.spmRole == SPM_CONTEND:
- raise se.OperationInProgress("spm start %s" % self.spUUID)
+ raise se.MiscOperationInProgress("spm start %s" % self.spUUID)
self.updateMonitoringThreads()
self.invalidateMetadata()
@@ -1934,7 +1934,7 @@
self.log.error("TODO: Implement")
self._maxHostID
self.spmMailer.setMaxHostID(maxID)
- raise se.NotImplementedException
+ raise se.MiscNotImplementedException
def detachAllDomains(self):
diff --git a/vdsm/storage/storage_exception.py b/vdsm/storage/storage_exception.py
index 54e64e6..a25a588 100644
--- a/vdsm/storage/storage_exception.py
+++ b/vdsm/storage/storage_exception.py
@@ -125,7 +125,7 @@
# Misc Exceptions
#################################################
-class NotImplementedException(GeneralException):
+class MiscNotImplementedException(GeneralException):
code = 2000
message = "Method not implemented"
@@ -154,7 +154,7 @@
message = "Internal block device write failure"
-class OperationInProgress(StorageException):
+class MiscOperationInProgress(StorageException):
code = 2005
message = "Operation is already in progress"
--
To view, visit http://gerrit.ovirt.org/8847
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f6f279d13b92bbb8f573a0d772d7504860bbbe3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shu Ming <shuming(a)linux.vnet.ibm.com>
10 years, 1 month
Change in vdsm[master]: confNet: ifcfg's VLAN should be set only on vlan cfg
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: confNet: ifcfg's VLAN should be set only on vlan cfg
......................................................................
confNet: ifcfg's VLAN should be set only on vlan cfg
If a misguided script calls addNetwork with explicit VLAN option, it
sohuld not be blindly copied to the top-most device.
We set VLAN=yes on the ifcfg script for the vlan device, and that's
that.
Change-Id: Ia2c9d6c86e73104424ca8ac901bf09e4b98a47ab
Bug-Id: BZ#847733
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/configNetwork.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/11/7411/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index 3f99a66..2ef0a8a 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -384,7 +384,7 @@
if mtu:
cfg = cfg + 'MTU=%d\n' % mtu
cfg += 'NM_CONTROLLED=no\n'
- BLACKLIST = ['TYPE', 'NAME', 'DEVICE', 'bondingOptions',
+ BLACKLIST = ['TYPE', 'NAME', 'DEVICE', 'VLAN', 'bondingOptions',
'force', 'blockingdhcp',
'connectivityCheck', 'connectivityTimeout',
'implicitBonding']
--
To view, visit http://gerrit.ovirt.org/7411
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2c9d6c86e73104424ca8ac901bf09e4b98a47ab
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]: avoid redundant domain produce() in createStoragePool
by lvroyce@linux.vnet.ibm.com
Royce Lv has uploaded a new change for review.
Change subject: avoid redundant domain produce() in createStoragePool
......................................................................
avoid redundant domain produce() in createStoragePool
Change-Id: If1c236aa3043068ca8f3f376cb340e986cd484bb
Signed-off-by: Royce Lv<lvroyce(a)linux.vnet.ibm.com>
---
M vdsm/storage/hsm.py
M vdsm/storage/sp.py
2 files changed, 4 insertions(+), 13 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/47/7347/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 2227c03..b2c20c0 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -765,19 +765,6 @@
if msdType in sd.BLOCK_DOMAIN_TYPES and msdVersion in blockSD.VERS_METADATA_LV and len(domList) > sp.MAX_DOMAINS:
raise se.TooManyDomainsInStoragePoolError()
- for sdUUID in domList:
- try:
- dom = sdCache.produce(sdUUID=sdUUID)
- # TODO: consider removing validate() from here, as the domains
- # are going to be accessed much later, and may loose validity
- # until then.
- dom.validate()
- except:
- raise se.StorageDomainAccessError(sdUUID)
- #If you remove this condition, remove it from StoragePool.attachSD() too.
- if dom.isData() and (dom.getVersion() != msdVersion):
- raise se.MixedSDVersionError(dom.sdUUID, dom.getVersion(), msd.sdUUID, msdVersion)
-
vars.task.getExclusiveLock(STORAGE, spUUID)
for dom in sorted(domList):
vars.task.getExclusiveLock(STORAGE, dom)
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index ee45151..a5b65c7 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -549,6 +549,7 @@
domain.validate()
if sdUUID == msdUUID:
msd = domain
+ msdVersion = msd.getVersion()
except se.StorageException:
self.log.error("Unexpected error", exc_info=True)
raise se.StorageDomainAccessError(sdUUID)
@@ -560,6 +561,9 @@
# Non ISO domains have only 1 pool
if len(spUUIDs) > 0:
raise se.StorageDomainAlreadyAttached(spUUIDs[0], sdUUID)
+
+ if domain.isData() and (domain.getVersion() != msdVersion):
+ raise se.MixedSDVersionError(domain.sdUUID, domain.getVersion(), msd.sdUUID, msdVersion)
fileUtils.createdir(self.poolPath)
self._acquireTemporaryClusterLock(msdUUID, safeLease)
--
To view, visit http://gerrit.ovirt.org/7347
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If1c236aa3043068ca8f3f376cb340e986cd484bb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
10 years, 2 months
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, 2 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, 3 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, 3 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, 3 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, 3 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, 3 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, 3 months