Change in vdsm[master]: logging: Enable all storage loggers
by Nir Soffer
Nir Soffer has uploaded a new change for review.
Change subject: logging: Enable all storage loggers
......................................................................
logging: Enable all storage loggers
Only loggers mentioned in logger.conf, or their child loggers are used
by the logging system. This make debugging the code much harder.
This patch enable 23 storage loggers by making them child loggers of the
Storage logger.
If we want to disable some loggers, the proper place to do it is in
logger.conf.
Change-Id: I1dd8cd29377b12dc290f90b7c6bf314d5624a830
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M vdsm/storage/blockSD.py
M vdsm/storage/clusterlock.py
M vdsm/storage/fileSD.py
M vdsm/storage/misc.py
M vdsm/storage/remoteFileHandler.py
M vdsm/storage/resourceManager.py
M vdsm/storage/storageServer.py
M vdsm/storage/task.py
M vdsm/storage/taskManager.py
M vdsm/storage/threadPool.py
10 files changed, 23 insertions(+), 23 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/23924/1
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index 55bd796..35c4f45 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -277,7 +277,7 @@
class VGTagMetadataRW(object):
- log = logging.getLogger("storage.Metadata.VGTagMetadataRW")
+ log = logging.getLogger("Storage.Metadata.VGTagMetadataRW")
METADATA_TAG_PREFIX = "MDT_"
METADATA_TAG_PREFIX_LEN = len(METADATA_TAG_PREFIX)
@@ -320,7 +320,7 @@
"""
Block Storage Domain metadata implementation
"""
- log = logging.getLogger("storage.Metadata.LvMetadataRW")
+ log = logging.getLogger("Storage.Metadata.LvMetadataRW")
def __init__(self, vgName, lvName, offset, size):
self._size = size
diff --git a/vdsm/storage/clusterlock.py b/vdsm/storage/clusterlock.py
index f7e7fb6..83b2b9f 100644
--- a/vdsm/storage/clusterlock.py
+++ b/vdsm/storage/clusterlock.py
@@ -47,7 +47,7 @@
class SafeLease(object):
- log = logging.getLogger("SafeLease")
+ log = logging.getLogger("Storage.SafeLease")
lockUtilPath = config.get('irs', 'lock_util_path')
lockCmd = config.get('irs', 'lock_cmd')
@@ -137,7 +137,7 @@
self.log.debug("Cluster lock released successfully")
-initSANLockLog = logging.getLogger("initSANLock")
+initSANLockLog = logging.getLogger("Storage.initSANLock")
def initSANLock(sdUUID, idsPath, leasesPath):
@@ -154,7 +154,7 @@
class SANLock(object):
- log = logging.getLogger("SANLock")
+ log = logging.getLogger("Storage.SANLock")
_sanlock_fd = None
_sanlock_lock = threading.Lock()
@@ -290,7 +290,7 @@
class LocalLock(object):
- log = logging.getLogger("LocalLock")
+ log = logging.getLogger("Storage.LocalLock")
LVER = 0
diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py
index 180a43f..98bb909 100644
--- a/vdsm/storage/fileSD.py
+++ b/vdsm/storage/fileSD.py
@@ -616,7 +616,7 @@
def scanDomains(pattern="*"):
- log = logging.getLogger("scanDomains")
+ log = logging.getLogger("Storage.scanDomains")
mntList = getMountsList(pattern)
diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
index 2c06af3..e464dcd 100644
--- a/vdsm/storage/misc.py
+++ b/vdsm/storage/misc.py
@@ -736,7 +736,7 @@
Supporting parameters or exception passing to all functions would
make the code much more complex for no reason.
"""
- _log = logging.getLogger("SamplingMethod")
+ _log = logging.getLogger("Storage.SamplingMethod")
def __init__(self, func):
self.__func = func
@@ -866,7 +866,7 @@
class Event(object):
def __init__(self, name, sync=False):
- self._log = logging.getLogger("Event.%s" % name)
+ self._log = logging.getLogger("Storage.Event.%s" % name)
self.name = name
self._syncRoot = threading.Lock()
self._registrar = {}
@@ -910,7 +910,7 @@
class OperationMutex(object):
- log = enableLogSkip(logging.getLogger("OperationMutex"),
+ log = enableLogSkip(logging.getLogger("Storage.OperationMutex"),
ignoreSourceFiles=[__file__, contextlib.__file__])
def __init__(self):
diff --git a/vdsm/storage/remoteFileHandler.py b/vdsm/storage/remoteFileHandler.py
index cacafbf..d5a4ff7 100644
--- a/vdsm/storage/remoteFileHandler.py
+++ b/vdsm/storage/remoteFileHandler.py
@@ -217,7 +217,7 @@
class PoolHandler(object):
- log = logging.getLogger("RepoFileHelper.PoolHandler")
+ log = logging.getLogger("Storage.RepoFileHelper.PoolHandler")
def __init__(self):
myRead, hisWrite = os.pipe()
diff --git a/vdsm/storage/resourceManager.py b/vdsm/storage/resourceManager.py
index 1be1450..64a5e86 100644
--- a/vdsm/storage/resourceManager.py
+++ b/vdsm/storage/resourceManager.py
@@ -168,7 +168,7 @@
"""
Internal request object, don't use directly
"""
- _log = logging.getLogger("ResourceManager.Request")
+ _log = logging.getLogger("Storage.ResourceManager.Request")
namespace = property(lambda self: self._namespace)
name = property(lambda self: self._name)
fullName = property(lambda self: "%s.%s" % (self._namespace, self._name))
@@ -190,7 +190,7 @@
# Because findCaller is expensive. We make sure it wll be printed
# before calculating it
- if logging.getLogger("ResourceManager.ResourceRef").\
+ if logging.getLogger("Storage.ResourceManager.ResourceRef").\
isEnabledFor(logging.WARN):
createdAt = misc.findCaller(ignoreSourceFiles=[__file__],
logSkipName="ResourceManager")
@@ -266,7 +266,7 @@
This object will auto release the referenced resource unless autorelease
is set to `False`
"""
- _log = logging.getLogger("ResourceManager.ResourceRef")
+ _log = logging.getLogger("Storage.ResourceManager.ResourceRef")
namespace = property(lambda self: self._namespace)
name = property(lambda self: self._name)
fullName = property(lambda self: "%s.%s" % (self._namespace, self._name))
@@ -354,7 +354,7 @@
This class is a singleton. use `getInstance()` to get the global instance
"""
- _log = logging.getLogger("ResourceManager")
+ _log = logging.getLogger("Storage.ResourceManager")
_namespaceValidator = re.compile(r"^[\w\d_-]+$")
_resourceNameValidator = re.compile(r"^[^\s.]+$")
@@ -721,7 +721,7 @@
class Owner(object):
- log = logging.getLogger('ResourceManager.Owner')
+ log = logging.getLogger('Storage.ResourceManager.Owner')
def __init__(self, ownerobject, raiseonfailure=False):
self.ownerobject = ownerobject
diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py
index 786fba4..669dbd0 100644
--- a/vdsm/storage/storageServer.py
+++ b/vdsm/storage/storageServer.py
@@ -163,7 +163,7 @@
class MountConnection(object):
- log = logging.getLogger("StorageServer.MountConnection")
+ log = logging.getLogger("Storage.StorageServer.MountConnection")
localPathBase = "/tmp"
@property
@@ -514,7 +514,7 @@
class ConnectionAliasRegistrar(object):
- log = logging.getLogger("StorageServer.ConnectionAliasRegistrar")
+ log = logging.getLogger("Storage.StorageServer.ConnectionAliasRegistrar")
def __init__(self, persistDir):
self._aliases = {}
@@ -616,7 +616,7 @@
class ConnectionMonitor(object):
- _log = logging.getLogger("ConnectionMonitor")
+ _log = logging.getLogger("Storage.ConnectionMonitor")
TAG = "managed"
diff --git a/vdsm/storage/task.py b/vdsm/storage/task.py
index 4eff5c1..2837aa8 100644
--- a/vdsm/storage/task.py
+++ b/vdsm/storage/task.py
@@ -440,7 +440,7 @@
"metadataVersion": int
}
- log = logging.getLogger('TaskManager.Task')
+ log = logging.getLogger('Storage.TaskManager.Task')
def __init__(self, id, name="", tag="",
recovery=TaskRecoveryType.none,
diff --git a/vdsm/storage/taskManager.py b/vdsm/storage/taskManager.py
index ab7f898..0c54426 100644
--- a/vdsm/storage/taskManager.py
+++ b/vdsm/storage/taskManager.py
@@ -28,7 +28,7 @@
class TaskManager:
- log = logging.getLogger('TaskManager')
+ log = logging.getLogger('Storage.TaskManager')
def __init__(self,
tpSize=config.getfloat('irs', 'thread_pool_size'),
diff --git a/vdsm/storage/threadPool.py b/vdsm/storage/threadPool.py
index 2eb255e..f59b25c 100644
--- a/vdsm/storage/threadPool.py
+++ b/vdsm/storage/threadPool.py
@@ -25,7 +25,7 @@
accepts tasks that will be dispatched to the next available
thread."""
- log = logging.getLogger('Misc.ThreadPool')
+ log = logging.getLogger('Storage.ThreadPool')
def __init__(self, numThreads, waitTimeout=3, maxTasks=100):
@@ -175,7 +175,7 @@
""" Pooled thread class. """
- log = logging.getLogger('Misc.ThreadPool.WorkerThread')
+ log = logging.getLogger('Storage.ThreadPool.WorkerThread')
def __init__(self, pool):
--
To view, visit http://gerrit.ovirt.org/23924
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1dd8cd29377b12dc290f90b7c6bf314d5624a830
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
9 years, 11 months
Change in vdsm[master]: utils: add ovirt-node persistence functions
by Alon Bar-Lev
Alon Bar-Lev has uploaded a new change for review.
Change subject: utils: add ovirt-node persistence functions
......................................................................
utils: add ovirt-node persistence functions
Change-Id: Ib93af61a44a52c37faf92d6f6081babefa3a09aa
Signed-off-by: Alon Bar-Lev <alonbl(a)redhat.com>
---
M lib/vdsm/utils.py
1 file changed, 24 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/11/20811/1
diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py
index 78d055e..acb284c 100644
--- a/lib/vdsm/utils.py
+++ b/lib/vdsm/utils.py
@@ -877,3 +877,27 @@
logging.error("Panic: %s", msg, exc_info=True)
os.killpg(0, 9)
sys.exit(-3)
+
+
+@memoized
+def isOvirtNode():
+ return (
+ os.path.exists('/etc/rhev-hypervisor-release') or
+ glob.glob('/etc/ovirt-node-*-release')
+ )
+
+
+def ovirtNodePersist(files):
+ if isOvirtNode():
+ from ovirtnode import ovirtfunctions
+ ovirtfunctions.ovirt_store_config(files)
+
+
+def ovirtNodeUnpersist(files):
+ if isOvirtNode():
+ from ovirtnode import ovirtfunctions
+ todo = []
+ for f in files:
+ if ovirtfunctions.is_persisted(f):
+ todo.append(f)
+ ovirtfunctions.remove_config([todo])
--
To view, visit http://gerrit.ovirt.org/20811
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib93af61a44a52c37faf92d6f6081babefa3a09aa
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
9 years, 11 months
Change in vdsm[master]: drop ominous log for libvirt errors
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: drop ominous log for libvirt errors
......................................................................
drop ominous log for libvirt errors
Patch http://gerrit.ovirt.org/13990 has introduced a log line whenever a
libvirt exception flows through our libvirtconnection.
E.g. Unknown libvirterror: ecode: 9 edom: 19 level: 2 message: operation
failed: network 'vdsm-ovirtmgmt' already exists...
The log line appears out of context and is repeated once its traceback
is properly caught.
Change-Id: Icd2a53ffee7fb78cb1c8d171093e93e233ed5ad4
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/libvirtconnection.py
1 file changed, 0 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/17324/1
diff --git a/lib/vdsm/libvirtconnection.py b/lib/vdsm/libvirtconnection.py
index cdba57c..9891691 100644
--- a/lib/vdsm/libvirtconnection.py
+++ b/lib/vdsm/libvirtconnection.py
@@ -95,10 +95,6 @@
if killOnFailure:
log.error('taking calling process down.')
os.kill(os.getpid(), signal.SIGTERM)
- else:
- 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/17324
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd2a53ffee7fb78cb1c8d171093e93e233ed5ad4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
9 years, 11 months
Change in vdsm[master]: spec: update sanlock dependencies
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: spec: update sanlock dependencies
......................................................................
spec: update sanlock dependencies
Forcing some old fedora installations to update sanlock to the latest
version. This is mostly to address:
- wdmd: dynamically select working watchdog device
which makes it possible to run sanlock on hardware (generally laptops)
with multiple watchdogs.
Change-Id: Ia9a28d7bf23ab93781bdf3d8cf5769fe149fdeb4
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/12292/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 38838ea..89da7af 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -107,7 +107,7 @@
Requires: device-mapper-multipath >= 0.4.9-52
Requires: e2fsprogs >= 1.41.12-11
Requires: kernel >= 2.6.32-279.9.1
-Requires: sanlock >= 2.3-4, sanlock-python
+Requires: sanlock >= 2.3-4
Requires: initscripts >= 9.03.31-2.el6_3.1
Requires: mom >= 0.3.0
Requires: selinux-policy-targeted >= 3.7.19-155
@@ -125,7 +125,7 @@
Requires: e2fsprogs >= 1.41.14
Requires: kernel >= 3.6
Requires: mom >= 0.3.0
-Requires: sanlock >= 2.4-2, sanlock-python
+Requires: sanlock >= 2.6-4
Requires: sed >= 4.2.1-10
Requires: selinux-policy-targeted >= 3.10.0-149
Requires: lvm2 >= 2.02.95
@@ -151,6 +151,7 @@
Requires: libselinux-python
Requires: %{name}-python = %{version}-%{release}
Requires: pyparted
+Requires: sanlock-python
Requires(post): /usr/sbin/saslpasswd2
Requires(post): /bin/hostname
--
To view, visit http://gerrit.ovirt.org/12292
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9a28d7bf23ab93781bdf3d8cf5769fe149fdeb4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
9 years, 11 months
Change in vdsm[master]: [WIP] api: Define the VmJobs API
by alitke@redhat.com
Adam Litke has uploaded a new change for review.
Change subject: [WIP] api: Define the VmJobs API
......................................................................
[WIP] api: Define the VmJobs API
As part of the work being done to enable live merge usecases (deleting
snapshots while a VM is running), we need an API for ovirt-engine to
monitor the state of ongoing libvirt Block Jobs. In the future we would
also like to extend this API to support other use cases (eg. migration).
The libvirt API only reports about block jobs while they are active.
Once finished (whether successfully or in error) the job ceases to
exist. We will mirror the same behavior in vdsm to avoid issues related
to persisting information and needing to clean it later.
Here is an example of how this API would be used by ovirt-engine:
1. The user initiates the removal of a VM snapshot.
2. ovirt-engine starts a blockCommit operation using an as yet
unimplemented vdsm API.
3. ovirt-engine monitors the VmStats that are already being collected
to gather progress information on the running live merge.
4. At some point the job will stop appearing in VmStats.
5. ovirt-engine will call an as yet unimplemented API to list the volume
chain for the affected VM Disk. This information will tell
ovirt-engine whether the operation succeeded or failed.
What's missing? This API does not provide a reliable way to report
detailed error messages about the operation. This is because block jobs
disappear as soon as they succeed or fail. To solve this problem on a
best errort basis, vdsm can subscribe to libvirt events to receive block
job error messages which can be relayed to engine in the same way that
other errors are relayed. This would not be fool proof because if
libvirt or vdsm is restarted, some events may be missed. In any case,
the detailed error reporting is a separate issue that can be implemented
by another patch.
Change-Id: I92d8afc2526ba0d2fe930a4227adc2b91f87ba8a
Signed-off-by: Adam Litke <alitke(a)redhat.com>
---
M vdsm/vm.py
M vdsm_api/vdsmapi-schema.json
2 files changed, 102 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/24133/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 77f9683..c4220fd 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -2734,6 +2734,9 @@
stats["watchdogEvent"] = self._watchdogEvent
return stats
+ def _getVmJobs(self):
+ return []
+
def _getStatsInternal(self):
# used by API.Vm.getStats
@@ -2818,6 +2821,7 @@
stats['clientIp'] = self.conf.get('clientIp', '')
if 'pauseCode' in self.conf:
stats['pauseCode'] = self.conf['pauseCode']
+ stats['jobs'] = self._getVmJobs()
try:
stats.update(self.guestAgent.getGuestInfo())
except Exception:
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index 6d8c333..037b8be 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -5589,6 +5589,100 @@
'data': {'time': 'float', 'action': 'WatchdogEventAction'}}
##
+# @VmJobState:
+#
+# An enumeration of VmJob states.
+#
+# @unknown: The state is not known
+#
+# @normal: The job is running normally
+#
+# Since: 4.14.2
+##
+{'enum': 'VmJobState', 'data': ['unknown', 'normal']}
+
+##
+# @VmJobType:
+#
+# An enumeration of VmJob Types.
+#
+# @unknown: The job type is not known
+#
+# @block: A job related to a Vm block device
+#
+# Since: 4.14.2
+##
+{'enum': 'VmJobType', 'data': ['unknown', 'block']}
+
+##
+# @BlockJobType:
+#
+# An enumeration of VM Block Job Types.
+#
+# @copy: A block rebase operation in copy mode
+#
+# @rebase: A block rebase operation
+#
+# @commit: A block commit operation
+#
+# Since: 4.14.2
+##
+{'enum': 'BlockJobType', 'data': ['copy', 'rebase', 'commit']}
+
+##
+# @VmJobInfoBlock:
+#
+# Detailed information about a block job.
+#
+# @jobType: The VmJobType (always @block)
+#
+# @opType: The specific type of operation being performed
+#
+# @bandwidth: Indicates a bandwidth limit in MB/s
+#
+# @cur: A cursor value indicating the job's current position
+#
+# @end: A cursor value indicating the the end of the job
+#
+# @imgUUID: The UUID of the image that this job is working with
+#
+# Since: 4.14.2
+##
+{'type': 'VmJobInfoBlock',
+ 'data': {'jobType': 'VmJobType', 'opType': 'BlockJobType',
+ 'bandwidth': 'uint', 'cur': 'uint', 'end': 'uint',
+ 'imgUUID': 'UUID'}}
+
+##
+# @VmJobInfo:
+#
+# A discriminated record of job type-specific metadata.
+#
+# @jobType: The type of VmJob this metadata describes
+#
+# Since: 4.14.2
+##
+{'type': 'VmJobInfo',
+ 'data': {'jobType': 'VmJobType'},
+ 'union': ['VmJobInfoBlock']}
+
+##
+# @VmJob:
+#
+# Information about an ongoing operation related to a VM.
+#
+# @state: The current state of the job. Note that as soon as jobs finish they
+# will no longer be reported. This field is designed to report any
+# conditions which may require further intervention.
+#
+# @info: Type-specific such as progress information
+#
+# Since: 4.14.2
+##
+{'type': 'VmJob',
+ 'data': {'state': 'VmJobState', 'info': 'VmJobInfo'}}
+
+##
# @RunningVmStats:
#
# Statistics for a running virtual machine.
@@ -5656,6 +5750,8 @@
# @guestFQDN: Fully qualified domain name of the guest OS. (Reported
# by the guest agent)
#
+# @jobs: #optional A list of active Vm Jobs
+#
# Since: 4.10.0
##
{'type': 'RunningVmStats',
@@ -5674,7 +5770,8 @@
'memoryStats': 'GuestMemoryStats', 'balloonInfo': 'BalloonInfo',
'disksUsage': ['GuestMountInfo'],
'netIfaces': ['GuestNetworkDeviceInfo'],
- '*watchdogEvent': 'WatchdogEvent', 'guestFQDN': 'str'}}
+ '*watchdogEvent': 'WatchdogEvent', 'guestFQDN': 'str',
+ '*jobs': ['VmJob']}}
##
# @VmStats:
--
To view, visit http://gerrit.ovirt.org/24133
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I92d8afc2526ba0d2fe930a4227adc2b91f87ba8a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke(a)redhat.com>
9 years, 11 months
Change in vdsm[master]: vm: spice support to clipboard copypaste disable
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: vm: spice support to clipboard copypaste disable
......................................................................
vm: spice support to clipboard copypaste disable
since version 0.9.3, libvirt allows to optionally disable copy and paste
in the spice protocolol:
http://libvirt.org/formatdomain.html#elementsGraphics
this patch expose this capability in VDSM, in the VM definition.
The new parameter is optional and enabled by default for backward
compatibility.
No XML changes are produced at all unless the new parameter is
specified.
Change-Id: I1f8195da0c3ba2663027b77ea8a858e5ba17c48e
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M tests/vmTests.py
M vdsm/vm.py
M vdsm_api/vdsmapi-schema.json
3 files changed, 38 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/46/22646/1
diff --git a/tests/vmTests.py b/tests/vmTests.py
index f9f2785..be1c6c1 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -229,6 +229,20 @@
<channel mode="secure" name="playback"/>
<channel mode="secure" name="record"/>
<channel mode="secure" name="display"/>
+ </graphics>""",
+
+ """
+ <graphics autoport="yes" listen="0" passwd="*****"
+ passwdValidTo="1970-01-01T00:00:01" port="-1"
+ tlsPort="-1" type="spice">
+ <clipboard copypaste="no"/>
+ </graphics>""",
+
+ """
+ <graphics autoport="yes" listen="0" passwd="*****"
+ passwdValidTo="1970-01-01T00:00:01" port="-1"
+ tlsPort="-1" type="spice">
+ <channel mode="secure" name="main"/>
</graphics>"""]
spiceChannelXML = """
@@ -242,7 +256,13 @@
{'display': 'qxl', 'displayPort': '-1', 'displaySecurePort': '-1',
'spiceSecureChannels':
- "smain,sinputs,scursor,splayback,srecord,sdisplay"}]
+ "smain,sinputs,scursor,splayback,srecord,sdisplay"},
+
+ {'display': 'qxl', 'displayPort': '-1', 'displaySecurePort': '-1',
+ 'copyPasteEnable': 'false'},
+
+ {'display': 'qxl', 'displayPort': '-1', 'displaySecurePort': '-1',
+ 'copyPasteEnable': 'true', 'spiceSecureChannels': "smain"}]
for vmConf, xml in zip(vmConfs, expectedXMLs):
vmConf.update(self.conf)
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 0a602cb..306ceb3 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -1108,6 +1108,12 @@
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
</channel>
+
+ or
+
+ <graphics autoport="yes" port="5910" tlsPort="5890" type="spice">
+ <clipboard copypaste='no'/>
+ </graphics>
"""
graphicsAttrs = {'port': self.conf['displayPort'], 'autoport': 'yes'}
if self.conf['display'] == 'vnc':
@@ -1129,6 +1135,9 @@
for channel in self.conf['spiceSecureChannels'].split(','):
graphics.appendChildWithArgs('channel', name=channel[1:],
mode='secure')
+ if not utils.tobool(self.conf.get('copyPasteEnable', True)):
+ clipboard = XMLElement('clipboard', copypaste='no')
+ graphics.appendChild(clipboard)
vmc = XMLElement('channel', type='spicevmc')
vmc.appendChildWithArgs('target', type='virtio',
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index ce9204f..f813e77 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -2781,6 +2781,10 @@
#
# @clientIp: The IP address of the client connected to the display
#
+# @copyPasteEnable: #optional Specify if copy and paste is enabled.
+# Currently relevant for @qxl devices only.
+# (new in version 4.13.0)
+#
# @cpuShares: #optional The host scheduling priority (relative to
# other VMs). In case both cpuShares and nice are
# present, cpuShares will be used.
@@ -2847,10 +2851,10 @@
# Since: 4.10.0
##
{'type': 'VmDefinition',
- 'data': {'acpiEnable': 'bool', 'clientIp': 'str', 'cpuShares': 'str',
- '*cpuType': 'str', '*custom': 'StringMap', '*devices': ['VmDevice'],
- 'display': 'VmDisplayType', 'displayIp': 'str',
- 'displayPort': 'int', 'displaySecurePort': 'int',
+ 'data': {'acpiEnable': 'bool', 'clientIp': 'str', '*copyPasteEnable': 'bool',
+ 'cpuShares': 'str', '*cpuType': 'str', '*custom': 'StringMap',
+ '*devices': ['VmDevice'], 'display': 'VmDisplayType',
+ 'displayIp': 'str', 'displayPort': 'int', 'displaySecurePort': 'int',
'*emulatedMachine': 'str', '*keyboardLayout': 'str',
'kvmEnable': 'bool', 'memSize': 'uint', 'memGuaranteedSize': 'uint',
'nicModel': 'str', 'nice': 'int', '*pauseCode': 'str',
--
To view, visit http://gerrit.ovirt.org/22646
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f8195da0c3ba2663027b77ea8a858e5ba17c48e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
9 years, 11 months
Change in vdsm[master]: Rename *Volume.extend method to *Volume.enlarge
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: Rename *Volume.extend method to *Volume.enlarge
......................................................................
Rename *Volume.extend method to *Volume.enlarge
Change-Id: Id7b88067fa3fe2c19faab31d0c882b4494f0bc12
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/blockVolume.py
M vdsm/storage/image.py
M vdsm/storage/sp.py
M vdsm/storage/volume.py
4 files changed, 8 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/02/17802/1
diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py
index effd3a5..5a99333 100644
--- a/vdsm/storage/blockVolume.py
+++ b/vdsm/storage/blockVolume.py
@@ -284,7 +284,7 @@
raise eFound
- def extend(self, newSize):
+ def enlarge(self, newSize):
"""Extend a logical volume
'newSize' - new size in blocks
"""
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index e3414b4..eb37f09 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -394,7 +394,7 @@
volUUID=srcVol.volUUID)
# Extend volume (for LV only) size to the actual size
- dstVol.extend((volParams['apparentsize'] + 511) / 512)
+ dstVol.enlarge((volParams['apparentsize'] + 511) / 512)
# Change destination volume metadata back to the original
# type.
@@ -742,7 +742,7 @@
newsize = volParams['size']
else:
newsize = volParams['apparentsize']
- dstVol.extend(newsize)
+ dstVol.enlarge(newsize)
dstPath = dstVol.getVolumePath()
# Change destination volume metadata back to the original size.
dstVol.setSize(volParams['size'])
@@ -882,7 +882,7 @@
srcVol = sdDom.produceVolume(imgUUID=srcVolParams['imgUUID'],
volUUID=srcVolParams['volUUID'])
# Extend successor volume to new accumulated subchain size
- srcVol.extend(newSize)
+ srcVol.enlarge(newSize)
srcVol.prepare(rw=True, chainrw=True, setrw=True)
try:
@@ -918,7 +918,7 @@
srcVol = sdDom.produceVolume(imgUUID=srcVolParams['imgUUID'],
volUUID=srcVolParams['volUUID'])
# Extend successor volume to new accumulated subchain size
- srcVol.extend(newSize)
+ srcVol.enlarge(newSize)
# Step 1: Create temporary volume with destination volume's parent
# parameters
newUUID = str(uuid.uuid4())
@@ -1178,7 +1178,7 @@
vol = self._activateVolumeForImportExport(domain, imgUUID, volUUID)
try:
# Extend the volume (if relevant) to the image size
- vol.extend(imageSharing.getSize(methodArgs) / volume.BLOCK_SIZE)
+ vol.enlarge(imageSharing.getSize(methodArgs) / volume.BLOCK_SIZE)
imageSharing.download(vol.getVolumePath(), methodArgs)
finally:
domain.deactivateVolumes(imgUUID, volUUIDs=[vol.volUUID])
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 3f3c1bf..348c02a 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -2071,7 +2071,7 @@
raise se.NonLeafVolumeNotWritable(vol)
targetPath = vol.getVolumePath()
if vol.isSparse():
- vol.extend(int(size))
+ vol.enlarge(int(size))
vol.prepare(rw=True, setrw=False)
try:
diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py
index 10b3363..6a028e4 100644
--- a/vdsm/storage/volume.py
+++ b/vdsm/storage/volume.py
@@ -540,7 +540,7 @@
self.log.warn("Volume %s metadata error (%s)",
self.volUUID, str(e))
- def extend(self, newsize):
+ def enlarge(self, newsize):
"""
Extend the apparent size of logical volume (thin provisioning)
"""
--
To view, visit http://gerrit.ovirt.org/17802
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7b88067fa3fe2c19faab31d0c882b4494f0bc12
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
10 years
Change in vdsm[master]: [WIP] Small objects repository file implementation
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: [WIP] Small objects repository file implementation
......................................................................
[WIP] Small objects repository file implementation
Change-Id: I3003f8652a58c68a966bc37e591c1d1d2308c164
---
M vdsm/storage/fileSD.py
M vdsm/storage/hsm.py
M vdsm/storage/outOfProcess.py
M vdsm/storage/sd.py
M vdsm/storage/sp.py
M vdsm_cli/vdsClient.py
6 files changed, 83 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/42/242/1
--
To view, visit http://gerrit.ovirt.org/242
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3003f8652a58c68a966bc37e591c1d1d2308c164
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
10 years
Change in vdsm[master]: Add a chown implementation that looks up uid and gid
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: Add a chown implementation that looks up uid and gid
......................................................................
Add a chown implementation that looks up uid and gid
We already have a case in vdsm (configNetwork) where we need to use
a chown function that is capable to convert the owner and group names
to uid and gid. Going forward this can be reused for the deployment
utilities and to prepare the paths needed by vdsm (eg: /rhev and
/var/run/vdsm).
Change-Id: Iab6f67ba93a0d9cbac775992623f3bb2ab996555
---
M vdsm/configNetwork.py
M vdsm/utils.py
2 files changed, 21 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/87/387/1
--
To view, visit http://gerrit.ovirt.org/387
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab6f67ba93a0d9cbac775992623f3bb2ab996555
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
10 years
Change in vdsm[master]: constants: unify the BLANK_UUID definition
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: constants: unify the BLANK_UUID definition
......................................................................
constants: unify the BLANK_UUID definition
Change-Id: Ib9260d74ae1da1382394a375843b2edff112e6f7
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M client/vdsClient.py
M lib/vdsm/constants.py.in
M vdsm/API.py
M vdsm/storage/misc.py
M vdsm/storage/sd.py
M vdsm/storage/volume.py
6 files changed, 11 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/42/15442/1
diff --git a/client/vdsClient.py b/client/vdsClient.py
index 332b438..0aabd5b 100644
--- a/client/vdsClient.py
+++ b/client/vdsClient.py
@@ -26,13 +26,13 @@
import pprint as pp
from vdsm import vdscli
+from vdsm.constants import BLANK_UUID
+
try:
import vdsClientGluster as ge
_glusterEnabled = True
except ImportError:
_glusterEnabled = False
-
-BLANK_UUID = '00000000-0000-0000-0000-000000000000'
STATUS_ERROR = {'status': {'code': 100, 'message': "ERROR"}}
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index 63771f6..c750462 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -53,6 +53,7 @@
SUPPORTED_DOMAIN_VERSIONS = DOMAIN_VERSIONS
UUID_GLOB_PATTERN = '*-*-*-*-*'
+BLANK_UUID = '00000000-0000-0000-0000-000000000000'
MEGAB = 2 ** 20 # = 1024 ** 2 = 1 MiB
diff --git a/vdsm/API.py b/vdsm/API.py
index e04e894..0eb23b4 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -104,6 +104,8 @@
class VM(APIBase):
ctorArgs = ['vmID']
+ BLANK_UUID = constants.BLANK_UUID
+
def __init__(self, UUID):
APIBase.__init__(self)
self._UUID = UUID
@@ -676,7 +678,7 @@
SHARED = storage.volume.SHARED_VOL
LEAF = storage.volume.LEAF_VOL
- BLANK_UUID = storage.volume.BLANK_UUID
+ BLANK_UUID = constants.BLANK_UUID
def __init__(self, UUID, spUUID, sdUUID, imgUUID):
APIBase.__init__(self)
@@ -747,7 +749,7 @@
class Image(APIBase):
ctorArgs = ['imageID', 'storagepoolID', 'storagedomainID']
- BLANK_UUID = storage.volume.BLANK_UUID
+ BLANK_UUID = constants.BLANK_UUID
class DiskTypes:
UNKNOWN = storage.image.UNKNOWN_DISK_TYPE
@@ -855,7 +857,7 @@
ISO = storage.sd.ISO_DOMAIN
BACKUP = storage.sd.BACKUP_DOMAIN
- BLANK_UUID = storage.sd.BLANK_UUID
+ BLANK_UUID = constants.BLANK_UUID
def __init__(self, UUID):
APIBase.__init__(self)
diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
index e5ba760..a107fb6 100644
--- a/vdsm/storage/misc.py
+++ b/vdsm/storage/misc.py
@@ -433,7 +433,6 @@
UUID_REGEX = re.compile("^[a-f0-9]{8}-(?:[a-f0-9]{4}-){3}[a-f0-9]{12}$")
-UUID_BLANK = "00000000-0000-0000-0000-000000000000"
def validateUUID(uuid, name="uuid", blank=True):
@@ -455,7 +454,7 @@
if m is None:
raise se.InvalidParameterException(name, uuid)
- if not blank and uuid == UUID_BLANK:
+ if not blank and uuid == constants.BLANK_UUID:
raise se.InvalidParameterException(name, uuid)
diff --git a/vdsm/storage/sd.py b/vdsm/storage/sd.py
index 8c55c09..0f71b3d 100644
--- a/vdsm/storage/sd.py
+++ b/vdsm/storage/sd.py
@@ -133,7 +133,7 @@
ImgsPar = namedtuple("ImgsPar", "imgs,parent")
ISO_IMAGE_UUID = '11111111-1111-1111-1111-111111111111'
-BLANK_UUID = '00000000-0000-0000-0000-000000000000'
+BLANK_UUID = constants.BLANK_UUID
REMOVED_IMAGE_PREFIX = "_remove_me_"
ZEROED_IMAGE_PREFIX = REMOVED_IMAGE_PREFIX + "ZERO_"
diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py
index 36e8d30..737f24e 100644
--- a/vdsm/storage/volume.py
+++ b/vdsm/storage/volume.py
@@ -68,7 +68,7 @@
SHARED_VOL: 'SHARED', INTERNAL_VOL: 'INTERNAL',
LEAF_VOL: 'LEAF'}
-BLANK_UUID = misc.UUID_BLANK
+BLANK_UUID = constants.BLANK_UUID
# Volume meta data fields
SIZE = "SIZE"
--
To view, visit http://gerrit.ovirt.org/15442
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9260d74ae1da1382394a375843b2edff112e6f7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
10 years