Change in vdsm[master]: Added unit test libvirtvmTests.py:TestLibvirtvm.testBuildCmd...
by Jenkins CI RO
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added unit test libvirtvmTests.py:TestLibvirtvm.testBuildCmdLine
......................................................................
Patch Set 6:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2162/ (1/2)
--
To view, visit http://gerrit.ovirt.org/14111
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I74b898a6398a72608d7933009644703aa3f8d831
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maciej Lichon <maciej.lichon.wroclaw(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Maciej Lichon <maciej.lichon.wroclaw(a)gmail.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 5 months
Change in vdsm[master]: vdsm now prints when a SIGTERM or SIGUSR1 is handled.
by amuller@redhat.com
Assaf Muller has uploaded a new change for review.
Change subject: vdsm now prints when a SIGTERM or SIGUSR1 is handled.
......................................................................
vdsm now prints when a SIGTERM or SIGUSR1 is handled.
In response to:
https://bugzilla.redhat.com/show_bug.cgi?id=958740
Change-Id: I2285a1e4af10bfa40b7e8f1d6a1dba4fd1f7a48c
Signed-off-by: Assaf Muller <amuller(a)redhat.com>
---
M vdsm/vdsm
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/34/14434/1
diff --git a/vdsm/vdsm b/vdsm/vdsm
index 3372596..588452c 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -40,12 +40,16 @@
def serve_clients(log):
cif = None
+ log = logging.getLogger('vds')
+
def sigtermHandler(signum, frame):
if cif:
+ log.debug("SIGTERM received with signal %s" % signum)
cif.prepareForShutdown()
def sigusr1Handler(signum, frame):
if cif and cif.irs:
+ log.debug("SIGUSR1 received with signal %s" % signum)
cif.irs.spmStop(
cif.irs.getConnectedStoragePoolsList()['poollist'][0])
--
To view, visit http://gerrit.ovirt.org/14434
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2285a1e4af10bfa40b7e8f1d6a1dba4fd1f7a48c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <amuller(a)redhat.com>
10 years, 5 months
Change in vdsm[master]: libvirtvm: avoid concurrent saveState during diskReplica
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: libvirtvm: avoid concurrent saveState during diskReplica
......................................................................
libvirtvm: avoid concurrent saveState during diskReplica
When multiple diskReplica requests come in for the same VM there a
chance that the VM configuration is modified during a deepcopy in
the saveState method resulting in an exception (e.g. RuntimeError:
dictionary changed size during iteration). To avoid this problem the
saveState requests are now serialized.
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=923194
Change-Id: Ic08b4073f5e3f5184baa5f1c7dd3ec5a148ff60b
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm/libvirtvm.py
1 file changed, 34 insertions(+), 24 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/13624/1
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
index 607dedb..9c9fd9c 100644
--- a/vdsm/libvirtvm.py
+++ b/vdsm/libvirtvm.py
@@ -1030,6 +1030,9 @@
self._customize()
+ def isDiskReplicationInProgress(self):
+ return hasattr(self, "diskReplicate"):
+
@property
def volExtensionChunk(self):
"""
@@ -1038,7 +1041,7 @@
can also dynamically change according to the VM needs (e.g. increase
during a live storage migration).
"""
- if hasattr(self, "diskReplicate"):
+ if self.isDiskReplicationInProgress():
return self.VOLWM_CHUNK_MB * self.VOLWM_CHUNK_REPLICATE_MULT
return self.VOLWM_CHUNK_MB
@@ -1276,6 +1279,7 @@
self._devXmlHash = '0'
self._released = False
self._releaseLock = threading.Lock()
+ self._diskReplicaLock = threading.Lock()
self.saveState()
self._watchdogEvent = {}
@@ -2252,35 +2256,38 @@
dictionary that is stored on disk (so that the information is not
lost across restarts).
"""
- for device in self.conf["devices"]:
- if (device['type'] == vm.DISK_DEVICES
- and device.get("name") == srcDrive.name):
- device['diskReplicate'] = dstDisk
- break
- else:
- raise LookupError("No such drive: '%s'" % srcDrive.name)
+ with self._diskReplicaLock:
+ if srcDrive.isDiskReplicationInProgress():
+ raise RuntimeError("Disk '%s' already has an ongoing "
+ "replication" % srcDrive.name)
- srcDrive.diskReplicate = dstDisk
- self.saveState()
+ for device in self.conf["devices"]:
+ if (device['type'] == vm.DISK_DEVICES
+ and device.get("name") == srcDrive.name):
+ device['diskReplicate'] = dstDisk
+ break
+ else:
+ raise LookupError("No such drive: '%s'" % srcDrive.name)
- def isDiskReplicationInProgress(self, srcDrive):
- return hasattr(srcDrive, 'diskReplicate')
+ srcDrive.diskReplicate = dstDisk
+ self.saveState()
def _delDiskReplica(self, srcDrive):
"""
This utility method is the inverse of _setDiskReplica, look at the
_setDiskReplica description for more information.
"""
- for device in self.conf["devices"]:
- if (device['type'] == vm.DISK_DEVICES
- and device.get("name") == srcDrive.name):
- del device['diskReplicate']
- break
- else:
- raise LookupError("No such drive: '%s'" % srcDrive.name)
+ with self._diskReplicaLock:
+ for device in self.conf["devices"]:
+ if (device['type'] == vm.DISK_DEVICES
+ and device.get("name") == srcDrive.name):
+ del device['diskReplicate']
+ break
+ else:
+ raise LookupError("No such drive: '%s'" % srcDrive.name)
- del srcDrive.diskReplicate
- self.saveState()
+ del srcDrive.diskReplicate
+ self.saveState()
def diskReplicateStart(self, srcDisk, dstDisk):
try:
@@ -2288,10 +2295,13 @@
except LookupError:
return errCode['imageErr']
- if self.isDiskReplicationInProgress(srcDrive):
+ try:
+ self._setDiskReplica(srcDrive, dstDisk)
+ except:
+ self.log.error("Unable to set the replication for disk %s" %
+ srcDrive.name, exc_info=True)
return errCode['replicaErr']
- self._setDiskReplica(srcDrive, dstDisk)
dstDiskCopy = dstDisk.copy()
# The device entry is enforced because stricly required by
@@ -2332,7 +2342,7 @@
except LookupError:
return errCode['imageErr']
- if not self.isDiskReplicationInProgress(srcDrive):
+ if not srcDrive.isDiskReplicationInProgress():
return errCode['replicaErr']
# Looking for the replication blockJob info (checking its presence)
--
To view, visit http://gerrit.ovirt.org/13624
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic08b4073f5e3f5184baa5f1c7dd3ec5a148ff60b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
10 years, 5 months
Change in vdsm[master]: Added gluster hooks support
by tjeyasin@redhat.com
Hello Ayal Baron, Bala.FA, Saggi Mizrahi, Federico Simoncelli, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/9671
to review the following change.
Change subject: Added gluster hooks support
......................................................................
Added gluster hooks support
New verbs:
* glusterEnableHook,
* glusterDisableHook
* glusterHooksList:
Output structure:
{GLUSTERCOMMAND: {'preHooks': 'enabled': [HOOK1, HOOK2, ...],
'disabled': [HOOK1, HOOK2, ...]},
{'postHooks': 'enabled': [HOOK1, HOOK2, ...],
'disabled': [HOOK1, HOOK2, ...]}, ...}
Change-Id: I3918aa035d90967f1297dc7fadcf14b6a9385c45
Signed-off-by: Timothy Asir <tjeyasin(a)redhat.com>
---
M vdsm/gluster/api.py
M vdsm/gluster/cli.py
M vdsm/gluster/exception.py
M vdsm_cli/vdsClientGluster.py
4 files changed, 247 insertions(+), 65 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/9671/1
diff --git a/vdsm/gluster/api.py b/vdsm/gluster/api.py
index b4c01c7..9aa8bb5 100644
--- a/vdsm/gluster/api.py
+++ b/vdsm/gluster/api.py
@@ -211,6 +211,18 @@
def volumeProfileStop(self, volumeName, options=None):
self.svdsmProxy.glusterVolumeProfileStop(volumeName)
+ @exportAsVerb
+ def hooksList(self, options=None):
+ return self.svdsmProxy.glusterHooksList()
+
+ @exportAsVerb
+ def enableHook(self, glusterCmd, level, hookName, options=None):
+ self.svdsmProxy.glusterEnableHook(glusterCmd, level, hookName)
+
+ @exportAsVerb
+ def disableHook(self, glusterCmd, level, hookName, options=None):
+ self.svdsmProxy.glusterDisableHook(glusterCmd, level, hookName)
+
def getGlusterMethods(gluster):
l = []
diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py
index c2c3542..abad8cb 100644
--- a/vdsm/gluster/cli.py
+++ b/vdsm/gluster/cli.py
@@ -18,6 +18,7 @@
# Refer to the README and COPYING files for full details of the license
#
+import os
import xml.etree.cElementTree as etree
from functools import wraps
@@ -29,6 +30,7 @@
_glusterCommandPath = utils.CommandPath("gluster",
"/usr/sbin/gluster",
)
+_glusterHooksPath = '/var/lib/glusterfs/hooks/1'
def _getGlusterVolCmd():
@@ -70,6 +72,16 @@
class TransportType:
TCP = 'TCP'
RDMA = 'RDMA'
+
+
+class HookLevel:
+ PRE = 'pre'
+ POST = 'post'
+
+
+class HookStatus:
+ ENABLE = 'S'
+ DISABLE = 'K'
def _execGluster(cmd):
@@ -754,3 +766,74 @@
except ge.GlusterCmdFailedException, e:
raise ge.GlusterVolumeProfileStopFailedException(rc=e.rc, err=e.err)
return True
+
+
+@exportToSuperVdsm
+def hooksList():
+ """
+ Returns:
+ {GLUSTERCOMMAND: {'preHooks': 'enabled': [HOOK1, HOOK2, ...],
+ 'disabled': [HOOK1, HOOK2, ...]},
+ {'postHooks': 'enabled': [HOOK1, HOOK2, ...],
+ 'disabled': [HOOK1, HOOK2, ...]}, ...}
+ """
+ def getEnabledHooks(files):
+ return [f[1:] for f in files if f.startswith(HookStatus.ENABLE)]
+
+ def getDisabledHooks(files):
+ return [f[1:] for f in files if f.startswith(HookStatus.DISABLE)]
+ hooks = {}
+ try:
+ for glusterCmd in os.listdir(_glusterHooksPath):
+ preList = os.listdir(os.path.join(
+ _glusterHooksPath, glusterCmd, HookLevel.PRE))
+ postList = os.listdir(os.path.join(
+ _glusterHooksPath, glusterCmd, HookLevel.POST))
+ hooks[glusterCmd] = \
+ {"preHooks": {"enabled": getEnabledHooks(preList),
+ "disabled": getDisabledHooks(preList)},
+ "postHooks": {"enabled": getEnabledHooks(postList),
+ "disabled": getDisabledHooks(postList)}}
+ except OSError, e:
+ raise ge.GlusterHookListException(err=[str(e)])
+ return hooks
+
+
+@exportToSuperVdsm
+def enableHook(glusterCmd, HookLevel, hookName):
+ enabledFile = os.path.join(
+ _glusterHooksPath, glusterCmd, HookLevel, "S%s" % hookName)
+ disabledFile = os.path.join(
+ _glusterHooksPath, glusterCmd, HookLevel, "K%s" % hookName)
+ if os.path.exists(disabledFile):
+ try:
+ os.rename(disabledFile, enabledFile)
+ return True
+ except OSError, e:
+ raise ge.GlusterEnableHookFailedException(err=[str(e)])
+ if os.path.exists(enabledFile):
+ raise ge.GlusterHookAlreadyEnabledException(
+ glusterCmd, HookLevel, hookName)
+ else:
+ raise ge.GlusterHookNotFoundException(
+ glusterCmd, HookLevel, hookName)
+
+
+@exportToSuperVdsm
+def disableHook(glusterCmd, HookLevel, hookName):
+ enabledFile = os.path.join(
+ _glusterHooksPath, glusterCmd, HookLevel, "S%s" % hookName)
+ disabledFile = os.path.join(
+ _glusterHooksPath, glusterCmd, HookLevel, "K%s" % hookName)
+ if os.path.exists(enabledFile):
+ try:
+ os.rename(enabledFile, disabledFile)
+ return True
+ except OSError, e:
+ raise ge.GlusterDisableHookFailedException(err=[str(e)])
+ if os.path.exists(disabledFile):
+ raise ge.GlusterHookAlreadyDisabledException(
+ glusterCmd, HookLevel, hookName)
+ else:
+ raise ge.GlusterHookNotFoundException(
+ glusterCmd, HookLevel, hookName)
diff --git a/vdsm/gluster/exception.py b/vdsm/gluster/exception.py
index 13cff62..9159801 100644
--- a/vdsm/gluster/exception.py
+++ b/vdsm/gluster/exception.py
@@ -346,6 +346,52 @@
message = "Volume profile stop failed"
+class GlusterEnableHookFailedException(GlusterVolumeException):
+ code = 4168
+ message = "enable gluster hooks failed"
+
+
+class GlusterDisableHookFailedException(GlusterVolumeException):
+ code = 4169
+ message = "disable gluster hooks failed"
+
+
+class GlusterHookAlreadyEnabledException(GlusterVolumeException):
+ code = 4170
+
+ def __init__(self, glusterCmd, level, hookName):
+ self.glusterCmd = glusterCmd
+ self.level = level
+ self.hookName = hookName
+ self.message = \
+ 'Hook %s of command %s, level %s already enabled' % \
+ (hookName, glusterCmd, level)
+
+
+class GlusterHookAlreadyDisabledException(GlusterVolumeException):
+ code = 4171
+
+ def __init__(self, glusterCmd, level, hookName):
+ self.glusterCmd = glusterCmd
+ self.level = level
+ self.hookName = hookName
+ self.message = \
+ 'Hook %s of command %s, level %s already disabled' % \
+ (hookName, glusterCmd, level)
+
+
+class GlusterHookNotFoundException(GlusterVolumeException):
+ code = 4172
+
+ def __init__(self, glusterCmd, level, hookName):
+ self.glusterCmd = glusterCmd
+ self.level = level
+ self.hookName = hookName
+ self.message = \
+ 'Hook %s for gluster command %s of action %s not found' % \
+ (hookName, level, glusterCmd)
+
+
# Host
class GlusterHostException(GlusterException):
code = 4400
diff --git a/vdsm_cli/vdsClientGluster.py b/vdsm_cli/vdsClientGluster.py
index 25e7dc6..3712955 100644
--- a/vdsm_cli/vdsClientGluster.py
+++ b/vdsm_cli/vdsClientGluster.py
@@ -257,38 +257,61 @@
status = self.s.glusterVolumeProfileStop(args[0])
return status['status']['code'], status['status']['message']
+ def do_glusterHooksList(self, args):
+ status = self.s.glusterHooksList()
+ pp.pprint(status)
+ return status['status']['code'], status['status']['message']
+
+ def do_glusterEnableHook(self, args):
+ params = self._eqSplit(args)
+ glusterCmd = params.get('glusterCommand', '')
+ level = params.get('level', '')
+ hookName = params.get('hookName', '')
+
+ status = self.s.glusterEnableHook(glusterCmd, level, hookName)
+ return status['status']['code'], status['status']['message']
+
+ def do_glusterDisableHook(self, args):
+ params = self._eqSplit(args)
+ glusterCmd = params.get('glusterCommand', '')
+ level = params.get('level', '')
+ hookName = params.get('hookName', '')
+
+ status = self.s.glusterDisableHook(glusterCmd, level, hookName)
+ return status['status']['code'], status['status']['message']
+
def getGlusterCmdDict(serv):
- return {
- 'glusterVolumeCreate':
- (serv.do_glusterVolumeCreate,
- ('volumeName=<volume_name> bricks=<brick[,brick, ...]> '
- '[replica=<count>] [stripe=<count>] [transport={tcp|rdma}]\n\t'
- '<volume_name> is name of new volume',
- '<brick[,brick, ...]> is brick(s) which will be used to '
- 'create volume',
- 'create gluster volume'
- )),
- 'glusterVolumesList':
- (serv.do_glusterVolumesList,
+ return \
+ {'glusterVolumeCreate': (
+ serv.do_glusterVolumeCreate,
+ ('volumeName=<volume_name> bricks=<brick[,brick, ...]> '
+ '[replica=<count>] [stripe=<count>] [transport={tcp|rdma}]\n\t'
+ '<volume_name> is name of new volume',
+ '<brick[,brick, ...]> is brick(s) which will be used to '
+ 'create volume',
+ 'create gluster volume'
+ )),
+ 'glusterVolumesList': (
+ serv.do_glusterVolumesList,
('[volumeName=<volume_name>]\n\t'
'<volume_name> is existing volume name',
'list all or given gluster volume details'
)),
- 'glusterVolumeStart':
- (serv.do_glusterVolumeStart,
+ 'glusterVolumeStart': (
+ serv.do_glusterVolumeStart,
('volumeName=<volume_name> [force={yes|no}]\n\t'
'<volume_name> is existing volume name',
'start gluster volume'
)),
- 'glusterVolumeStop':
- (serv.do_glusterVolumeStop,
+ 'glusterVolumeStop': (
+ serv.do_glusterVolumeStop,
('volumeName=<volume_name> [force={yes|no}]\n\t'
'<volume_name> is existing volume name',
'stop gluster volume'
)),
- 'glusterVolumeBrickAdd':
- (serv.do_glusterVolumeBrickAdd,
+ 'glusterVolumeBrickAdd': (
+ serv.do_glusterVolumeBrickAdd,
('volumeName=<volume_name> bricks=<brick[,brick, ...]> '
'[replica=<count>] [stripe=<count>]\n\t'
'<volume_name> is existing volume name\n\t'
@@ -296,132 +319,132 @@
'the volume',
'add bricks to gluster volume'
)),
- 'glusterVolumeSet':
- (serv.do_glusterVolumeSet,
+ 'glusterVolumeSet': (
+ serv.do_glusterVolumeSet,
('volumeName=<volume_name> option=<option> value=<value>\n\t'
'<volume_name> is existing volume name\n\t'
'<option> is volume option\n\t'
'<value> is value to volume option',
'set gluster volume option'
)),
- 'glusterVolumeSetOptionsList':
- (serv.do_glusterVolumeSetOptionsList,
+ 'glusterVolumeSetOptionsList': (
+ serv.do_glusterVolumeSetOptionsList,
('',
'list gluster volume set options'
)),
- 'glusterVolumeReset':
- (serv.do_glusterVolumeReset,
+ 'glusterVolumeReset': (
+ serv.do_glusterVolumeReset,
('volumeName=<volume_name> [option=<option>] [force={yes|no}]\n\t'
'<volume_name> is existing volume name',
'reset gluster volume or volume option'
)),
- 'glusterHostAdd':
- (serv.do_glusterHostAdd,
+ 'glusterHostAdd': (
+ serv.do_glusterHostAdd,
('hostName=<host>\n\t'
'<host> is hostname or ip address of new server',
'add new server to gluster cluster'
)),
- 'glusterVolumeRebalanceStart':
- (serv.do_glusterVolumeRebalanceStart,
+ 'glusterVolumeRebalanceStart': (
+ serv.do_glusterVolumeRebalanceStart,
('<volume_name>\n\t<volume_name> is existing volume name',
'start volume rebalance'
)),
- 'glusterVolumeRebalanceStop':
- (serv.do_glusterVolumeRebalanceStop,
+ 'glusterVolumeRebalanceStop': (
+ serv.do_glusterVolumeRebalanceStop,
('<volume_name>\n\t<volume_name> is existing volume name',
'stop volume rebalance'
)),
- 'glusterVolumeRebalanceStatus':
- (serv.do_glusterVolumeRebalanceStatus,
+ 'glusterVolumeRebalanceStatus': (
+ serv.do_glusterVolumeRebalanceStatus,
('<volume_name>\n\t<volume_name> is existing volume name',
'get volume rebalance status'
)),
- 'glusterVolumeDelete':
- (serv.do_glusterVolumeDelete,
+ 'glusterVolumeDelete': (
+ serv.do_glusterVolumeDelete,
('volumeName=<volume_name> \n\t<volume_name> is existing '
'volume name',
'delete gluster volume'
)),
- 'glusterHostRemove':
- (serv.do_glusterHostRemove,
+ 'glusterHostRemove': (
+ serv.do_glusterHostRemove,
('hostName=<host> [force={yes|no}]\n\t'
'<host> is hostname or ip address of a server in '
'gluster cluster',
'remove server from gluster cluster'
)),
- 'glusterVolumeReplaceBrickStart':
- (serv.do_glusterVolumeReplaceBrickStart,
+ 'glusterVolumeReplaceBrickStart': (
+ serv.do_glusterVolumeReplaceBrickStart,
('<volume_name> <existing_brick> <new_brick> \n\t<volume_name> '
'is existing volume name\n\t<brick> is existing brick\n\t'
'<new_brick> is new brick',
'start volume replace brick'
)),
- 'glusterVolumeReplaceBrickAbort':
- (serv.do_glusterVolumeReplaceBrickAbort,
+ 'glusterVolumeReplaceBrickAbort': (
+ serv.do_glusterVolumeReplaceBrickAbort,
('<volume_name> <existing_brick> <new_brick> \n\t<volume_name> '
'is existing volume name\n\t<brick> is existing brick\n\t'
'<new_brick> is new brick',
'abort volume replace brick'
)),
- 'glusterVolumeReplaceBrickPause':
- (serv.do_glusterVolumeReplaceBrickPause,
+ 'glusterVolumeReplaceBrickPause': (
+ serv.do_glusterVolumeReplaceBrickPause,
('<volume_name> <existing_brick> <new_brick> \n\t<volume_name> '
'is existing volume name\n\t<brick> is existing brick\n\t'
'<new_brick> is new brick',
'pause volume replace brick'
)),
- 'glusterVolumeReplaceBrickStatus':
- (serv.do_glusterVolumeReplaceBrickStatus,
+ 'glusterVolumeReplaceBrickStatus': (
+ serv.do_glusterVolumeReplaceBrickStatus,
('<volume_name> <existing_brick> <new_brick> \n\t<volume_name> '
'is existing volume name\n\t<brick> is existing brick\n\t'
'<new_brick> is new brick',
'get volume replace brick status'
)),
- 'glusterVolumeReplaceBrickCommit':
- (serv.do_glusterVolumeReplaceBrickCommit,
+ 'glusterVolumeReplaceBrickCommit': (
+ serv.do_glusterVolumeReplaceBrickCommit,
('<volume_name> <existing_brick> <new_brick> \n\t<volume_name> '
'is existing volume name\n\t<brick> is existing brick\n\t'
'<new_brick> is new brick',
'commit volume replace brick'
)),
- 'glusterVolumeRemoveBrickStart':
- (serv.do_glusterVolumeRemoveBrickStart,
+ 'glusterVolumeRemoveBrickStart': (
+ serv.do_glusterVolumeRemoveBrickStart,
('<volume_name> [replica=<count>] bricks=brick[,brick] ... \n\t'
'<volume_name> is existing volume name\n\t<brick> is '
'existing brick',
'start volume remove bricks'
)),
- 'glusterVolumeRemoveBrickStop':
- (serv.do_glusterVolumeRemoveBrickStop,
+ 'glusterVolumeRemoveBrickStop': (
+ serv.do_glusterVolumeRemoveBrickStop,
('<volume_name> [replica=<count>] bricks=brick[,brick] ... \n\t'
'<volume_name> is existing volume name\n\t<brick> is '
'existing brick',
'stop volume remove bricks'
)),
- 'glusterVolumeRemoveBrickStatus':
- (serv.do_glusterVolumeRemoveBrickStatus,
+ 'glusterVolumeRemoveBrickStatus': (
+ serv.do_glusterVolumeRemoveBrickStatus,
('<volume_name> [replica=<count>] bricks=brick[,brick] ... \n\t'
'<volume_name> is existing volume name\n\t<brick> is '
'existing brick',
'get volume remove bricks status'
)),
- 'glusterVolumeRemoveBrickCommit':
- (serv.do_glusterVolumeRemoveBrickCommit,
+ 'glusterVolumeRemoveBrickCommit': (
+ serv.do_glusterVolumeRemoveBrickCommit,
('<volume_name> [replica=<count>] bricks=brick[,brick] ... \n\t'
'<volume_name> is existing volume name\n\t<brick> is '
'existing brick',
'commit volume remove bricks'
)),
- 'glusterVolumeRemoveBrickForce':
- (serv.do_glusterVolumeRemoveBrickForce,
+ 'glusterVolumeRemoveBrickForce': (
+ serv.do_glusterVolumeRemoveBrickForce,
('volumeName=<volume_name> bricks=<brick[,brick, ...]> '
'[replica=<count>]\n\t'
'<volume_name> is existing volume name\n\t'
'<brick[,brick, ...]> is existing brick(s)',
'force volume remove bricks'
)),
- 'glusterVolumeStatus':
- (serv.do_glusterVolumeStatus,
+ 'glusterVolumeStatus': (
+ serv.do_glusterVolumeStatus,
('volumeName=<volume_name> [brick=<existing_brick>] '
'[option={detail | clients | mem}]\n\t'
'<volume_name> is existing volume name\n\t'
@@ -431,19 +454,37 @@
'get volume status of given volume with its all brick or '
'specified brick'
)),
- 'glusterHostsList':
- (serv.do_glusterHostsList,
+ 'glusterHostsList': (
+ serv.do_glusterHostsList,
('',
'list host info'
)),
- 'glusterVolumeProfileStart':
- (serv.do_glusterVolumeProfileStart,
+ 'glusterVolumeProfileStart': (
+ serv.do_glusterVolumeProfileStart,
('<volume_name>\n\t<volume_name> is existing volume name',
'start gluster volume profile'
)),
- 'glusterVolumeProfileStop':
- (serv.do_glusterVolumeProfileStop,
+ 'glusterVolumeProfileStop': (
+ serv.do_glusterVolumeProfileStop,
('<volume_name>\n\t<volume_name> is existing volume name',
'stop gluster volume profile'
)),
- }
+ 'glusterHooksList': (
+ serv.do_glusterHooksList,
+ ('',
+ 'list hooks info'
+ )),
+ 'glusterEnableHook': (
+ serv.do_glusterEnableHook,
+ ('<glusterCommand>=<gluster_command> <level>=[pre | post] '
+ '<hookName>=<hook_name>\n\t'
+ '<hook_name> is an existing hook name',
+ 'Enable hook script'
+ )),
+ 'glusterDisableHook': (
+ serv.do_glusterDisableHook,
+ ('<glusterCommand>=<gluster_command> <level>=[pre | post] '
+ '<hookName>=<hook_name>\n\t'
+ '<hook_name> is an existing hook name',
+ 'Disable hook script'
+ )), }
--
To view, visit http://gerrit.ovirt.org/9671
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3918aa035d90967f1297dc7fadcf14b6a9385c45
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Timothy Asir <tjeyasin(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
10 years, 5 months
Change in vdsm[master]: vdsm: Don't log irrelevant errors with level ERROR
by Vinzenz Feenstra
Vinzenz Feenstra has uploaded a new change for review.
Change subject: vdsm: Don't log irrelevant errors with level ERROR
......................................................................
vdsm: Don't log irrelevant errors with level ERROR
libvirtconnection.get() wrapMethod logs unhandled libvirtErrors
as ERROR. However it's irrelevant at that point, therefore it
should log it only as DEBUG message.
Change-Id: I62c395734173a996bc8237d24b85f1bb32a0be35
Bug-Url: https://bugzilla.redhat.com/955593
Signed-off-by: Vinzenz Feenstra <vfeenstr(a)redhat.com>
---
M lib/vdsm/libvirtconnection.py
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/26/14226/1
diff --git a/lib/vdsm/libvirtconnection.py b/lib/vdsm/libvirtconnection.py
index cf22384..2c2bfb3 100644
--- a/lib/vdsm/libvirtconnection.py
+++ b/lib/vdsm/libvirtconnection.py
@@ -131,8 +131,9 @@
ecode, edom)
cif.prepareForShutdown()
else:
- cif.log.exception('Unknown libvirterror: ecode: %d '
- 'edom: %d', ecode, edom)
+ cif.log.debug('Unknown libvirterror: ecode: %d edom: %d '
+ 'level: %d message: %s', ecode, edom,
+ e.get_error_level(), e.get_error_message())
raise
wrapper.__name__ = f.__name__
wrapper.__doc__ = f.__doc__
--
To view, visit http://gerrit.ovirt.org/14226
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I62c395734173a996bc8237d24b85f1bb32a0be35
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr(a)redhat.com>
10 years, 5 months
Change in vdsm[master]: vdsm now reports pid when starting up.
by amuller@redhat.com
Assaf Muller has uploaded a new change for review.
Change subject: vdsm now reports pid when starting up.
......................................................................
vdsm now reports pid when starting up.
In response to bug:
https://bugzilla.redhat.com/show_bug.cgi?id=952089
When vdsm starts it now outputs to the vdsm log:
"MainThread::INFO::2013-05-05 11:57:38,609::vdsm::89::vds::(run)
(PID: 14576) I am the actual vdsm..."
Change-Id: I029581f4ab1cc5005a55c0f7ecec8672d08da49e
Signed-off-by: Assaf Muller <amuller(a)redhat.com>
---
M vdsm/vdsm
1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/30/14430/1
diff --git a/vdsm/vdsm b/vdsm/vdsm
index 3372596..ccb6b8d 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -80,12 +80,13 @@
log.handlers.append(logging.StreamHandler())
pidfile = constants.P_VDSM_RUN + 'vdsmd.pid'
- file(pidfile, 'w').write(str(os.getpid()) + "\n")
+ pid = str(os.getpid())
+ file(pidfile, 'w').write(pid + "\n")
os.chmod(pidfile, 0664)
sysname, nodename, release, version, machine = os.uname()
- log.info('I am the actual vdsm %s %s (%s)',
- dsaversion.raw_version_revision, nodename, release)
+ log.info('(PID: %s) I am the actual vdsm %s %s (%s)',
+ pid, dsaversion.raw_version_revision, nodename, release)
serve_clients(log)
except:
log.error("Exception raised", exc_info=True)
--
To view, visit http://gerrit.ovirt.org/14430
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I029581f4ab1cc5005a55c0f7ecec8672d08da49e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <amuller(a)redhat.com>
10 years, 5 months
Change in vdsm[master]: mom: add mom balloon functional tests for running vms
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: mom: add mom balloon functional tests for running vms
......................................................................
Patch Set 5:
I just created a WIKI page for VDSM functional tests http://www.ovirt.org/Vdsm_Functional_Tests . Maybe you can add some instructions on how to setup an environment for MOM functional tests to the WIKI page.
--
To view, visit http://gerrit.ovirt.org/13156
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I922568233dc769d83e2fdffe1c24439d13d03d7e
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mei Liu <liumbj(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck(a)redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Mei Liu <liumbj(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 5 months