Change in vdsm[master]: vdsm-tool: fix qemu-sanlock configuration
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: vdsm-tool: fix qemu-sanlock configuration
......................................................................
vdsm-tool: fix qemu-sanlock configuration
Fixing the logic about qemu-sanlock configuration: if sanlock is
enabled then qemu-sanlock.conf needs to be updated.
Change-Id: I3d2a6b05fb8fbf0ef2e9599fd1a740a7091680d4
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M lib/vdsm/tool/libvirt_configure.sh.in
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/94/19094/1
diff --git a/lib/vdsm/tool/libvirt_configure.sh.in b/lib/vdsm/tool/libvirt_configure.sh.in
index c4f56a9..2ab5334 100755
--- a/lib/vdsm/tool/libvirt_configure.sh.in
+++ b/lib/vdsm/tool/libvirt_configure.sh.in
@@ -30,7 +30,7 @@
QCONF="@sysconfdir(a)/libvirt/qemu.conf"
LDCONF="@sysconfdir@/sysconfig/libvirtd"
QLCONF="@sysconfdir(a)/libvirt/qemu-sanlock.conf"
-[ "${ENABLE_LIBVIRT_SANLOCK}" = "yes" ] && QLCONF="/dev/null"
+[ "${ENABLE_LIBVIRT_SANLOCK}" = "yes" ] || QLCONF="/dev/null"
# trigger for reconfiguration
FORCE_RECONFIGURE="@VDSMLIBDIR@/reconfigure"
--
To view, visit http://gerrit.ovirt.org/19094
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d2a6b05fb8fbf0ef2e9599fd1a740a7091680d4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
10 years
Change in vdsm[master]: Removing validate sd from spm verbs which calls ckvg and ref...
by ykaplan@redhat.com
Yeela Kaplan has uploaded a new change for review.
Change subject: Removing validate sd from spm verbs which calls ckvg and refreshes the domain metadata on the spm even though the spm already controls the changes (i.e. a lot of redundant time is wasted)
......................................................................
Removing validate sd from spm verbs which calls ckvg and refreshes
the domain metadata on the spm even though the spm already controls
the changes (i.e. a lot of redundant time is wasted)
Change-Id: Ibf597a9e53dad04ad7a01fc1d5ceb8a180a542f2
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 16 insertions(+), 19 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/75/18275/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index c754ee8..2c639ca 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -1315,7 +1315,6 @@
pool = self.getPool(spUUID)
if sdUUID and sdUUID != sd.BLANK_UUID:
pool.validatePoolSD(sdUUID)
- self.validateSdUUID(sdUUID)
else:
sdUUID = pool.masterDomain.sdUUID
@@ -1344,7 +1343,6 @@
pool = self.getPool(spUUID)
if sdUUID and sdUUID != sd.BLANK_UUID:
pool.validatePoolSD(sdUUID)
- self.validateSdUUID(sdUUID)
else:
sdUUID = pool.masterDomain.sdUUID
vars.task.getExclusiveLock(STORAGE, "%s_%s" % (vmUUID, sdUUID))
@@ -1367,7 +1365,6 @@
pool = self.getPool(spUUID)
if sdUUID and sdUUID != sd.BLANK_UUID:
pool.validatePoolSD(sdUUID)
- self.validateSdUUID(sdUUID)
else:
sdUUID = pool.masterDomain.sdUUID
vars.task.getSharedLock(STORAGE, sdUUID)
@@ -1451,7 +1448,7 @@
vars.task.setDefaultException(se.VolumeCreationError(argsStr))
# Validates that the pool is connected. WHY?
pool = self.getPool(spUUID)
- sdDom = self.validateSdUUID(sdUUID)
+ dom = sdCache.produce(sdUUID=sdUUID)
misc.validateUUID(imgUUID, 'imgUUID')
misc.validateUUID(volUUID, 'volUUID')
# TODO: For backwards compatibility, we need to support accepting
@@ -1466,7 +1463,7 @@
if srcVolUUID:
misc.validateUUID(srcVolUUID, 'srcVolUUID')
# Validate volume type and format
- sdDom.validateCreateVolumeParams(volFormat, preallocate, srcVolUUID)
+ dom.validateCreateVolumeParams(volFormat, preallocate, srcVolUUID)
vars.task.getSharedLock(STORAGE, sdUUID)
self._spmSchedule(spUUID, "createVolume", pool.createVolume, sdUUID,
@@ -1485,14 +1482,14 @@
vars.task.setDefaultException(se.CannotDeleteVolume(argsStr))
# Validates that the pool is connected. WHY?
pool = self.getPool(spUUID)
- sdDom = self.validateSdUUID(sdUUID)
+ dom = sdCache.produce(sdUUID=sdUUID)
misc.validateUUID(imgUUID, 'imgUUID')
vars.task.getSharedLock(STORAGE, sdUUID)
# Do not validate if forced.
if not misc.parseBool(force):
for volUUID in volumes:
- sdDom.produceVolume(imgUUID, volUUID).validateDelete()
+ dom.produceVolume(imgUUID, volUUID).validateDelete()
self._spmSchedule(spUUID, "deleteVolume", pool.deleteVolume, sdUUID,
imgUUID, volumes, misc.parseBool(postZero),
@@ -1508,7 +1505,7 @@
"""
# vars.task.setDefaultException(se.ChangeMeError("%s" % args))
self.getPool(spUUID) # Validates that the pool is connected. WHY?
- dom = self.validateSdUUID(sdUUID)
+ dom = sdCache.produce(sdUUID=sdUUID)
vars.task.getExclusiveLock(STORAGE, imgUUID)
vars.task.getSharedLock(STORAGE, sdUUID)
@@ -1608,8 +1605,8 @@
raise se.InvalidParameterException(
"srcDom", "must be different from dstDom: %s" % argsStr)
- srcDom = self.validateSdUUID(srcDomUUID)
- dstDom = self.validateSdUUID(dstDomUUID)
+ srcDom = sdCache.produce(sdUUID=srcDomUUID)
+ dstDom = sdCache.produce(sdUUID=dstDomUUID)
# Validates that the pool is connected. WHY?
pool = self.getPool(spUUID)
try:
@@ -1643,8 +1640,8 @@
Clone an image structure (volume chain) to a destination domain within
the same pool.
"""
- self.validateSdUUID(sdUUID)
- self.validateSdUUID(dstSdUUID)
+ sdCache.produce(sdUUID=sdUUID)
+ sdCache.produce(sdUUID=dstSdUUID)
for dom in sorted((sdUUID, dstSdUUID)):
vars.task.getSharedLock(STORAGE, dom)
@@ -1659,8 +1656,8 @@
Copy the internal data between image structures (volume chain) within
the same pool.
"""
- self.validateSdUUID(sdUUID)
- self.validateSdUUID(dstSdUUID)
+ sdCache.produce(sdUUID=sdUUID)
+ sdCache.produce(sdUUID=dstSdUUID)
for dom in sorted((sdUUID, dstSdUUID)):
vars.task.getSharedLock(STORAGE, dom)
@@ -1712,8 +1709,8 @@
# Validates that the pool is connected. WHY?
pool = self.getPool(spUUID)
- srcDom = self.validateSdUUID(srcDomUUID)
- dstDom = self.validateSdUUID(dstDomUUID)
+ srcDom = sdCache.produce(sdUUID=srcDomUUID)
+ dstDom = sdCache.produce(sdUUID=dstDomUUID)
images = {}
for (imgUUID, pZero) in imgDict.iteritems():
images[imgUUID.strip()] = misc.parseBool(pZero)
@@ -1762,7 +1759,7 @@
if srcImgUUID == dstImgUUID:
raise se.InvalidParameterException("dstImgUUID", dstImgUUID)
pool = self.getPool(spUUID)
- self.validateSdUUID(sdUUID)
+ sdCache.produce(sdUUID=sdUUID)
# Avoid VM copy if one of its volume (including template if exists)
# ILLEGAL/FAKE
@@ -1778,7 +1775,7 @@
# If dstSdUUID defined, means we copy image to it
domains = [sdUUID]
if dstSdUUID not in [sdUUID, sd.BLANK_UUID]:
- self.validateSdUUID(dstSdUUID)
+ sdCache.produce(sdUUID=dstSdUUID)
domains.append(dstSdUUID)
domains.sort()
@@ -1803,7 +1800,7 @@
postZero))
vars.task.setDefaultException(se.MergeSnapshotsError("%s" % argsStr))
pool = self.getPool(spUUID)
- self.validateSdUUID(sdUUID)
+ sdCache.produce(sdUUID=sdUUID)
vars.task.getSharedLock(STORAGE, sdUUID)
self._spmSchedule(
spUUID, "mergeSnapshots", pool.mergeSnapshots, sdUUID, vmUUID,
--
To view, visit http://gerrit.ovirt.org/18275
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf597a9e53dad04ad7a01fc1d5ceb8a180a542f2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
10 years
Change in vdsm[master]: Remove redundant check that causes lvm cache to refresh ever...
by ykaplan@redhat.com
Yeela Kaplan has uploaded a new change for review.
Change subject: Remove redundant check that causes lvm cache to refresh every volume creation
......................................................................
Remove redundant check that causes lvm cache to refresh every volume creation
Change-Id: Ib6f3b6ca8313070d0345b5f76ebb0b3d9772d14f
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M vdsm/storage/lvm.py
M vdsm/storage/volume.py
2 files changed, 4 insertions(+), 16 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/74/18274/1
diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index bc9d30c..96b1acd 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -463,6 +463,8 @@
log.warning("Removing stale lv: %s/%s", vgName, lvName)
self._lvs.pop((vgName, lvName), None)
+ log.debug("Finished lvs reload")
+
return updatedLVs
def _reloadAllLvs(self):
diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py
index 014f733..5f90b1f 100644
--- a/vdsm/storage/volume.py
+++ b/vdsm/storage/volume.py
@@ -399,19 +399,10 @@
'srcImgUUID' - source image UUID
'srcVolUUID' - source volume UUID
"""
- # Validate volume parameters should be checked here for all
- # internal flows using volume creation.
- misc.validateUUID(sdUUID, "sdUUID", False)
- misc.validateUUID(imgUUID, "imgUUID", False)
- misc.validateUUID(srcImgUUID, "srcImgUUID", True)
- misc.validateUUID(srcVolUUID, "srcVolUUID", True)
cls.validateCreateVolumeParams(volFormat, preallocate, srcVolUUID)
dom = sdCache.produce(sdUUID)
imgPath = image.Image(repoPath).create(sdUUID, imgUUID)
-
- if dom.volumeExists(imgPath, volUUID):
- raise se.VolumeAlreadyExists(volUUID)
volPath = os.path.join(imgPath, volUUID)
volParent = None
@@ -429,17 +420,12 @@
srcImgUUID = imgUUID
volParent = cls(repoPath, sdUUID, srcImgUUID, srcVolUUID)
-
- if not volParent.isLegal():
- raise se.createIllegalVolumeSnapshotError(
- volParent.volUUID)
+ # Override the size with the size of the parent
+ size = volParent.getSize()
if imgUUID != srcImgUUID:
volParent.share(imgPath)
volParent = cls(repoPath, sdUUID, imgUUID, srcVolUUID)
-
- # Override the size with the size of the parent
- size = volParent.getSize()
except se.StorageException:
cls.log.error("Unexpected error", exc_info=True)
--
To view, visit http://gerrit.ovirt.org/18274
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib6f3b6ca8313070d0345b5f76ebb0b3d9772d14f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
10 years
Change in vdsm[master]: Packaging: Remove hard coded 12- prefix of vdsm-lvm.rules fr...
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has uploaded a new change for review.
Change subject: Packaging: Remove hard coded 12- prefix of vdsm-lvm.rules from upstream
......................................................................
Packaging: Remove hard coded 12- prefix of vdsm-lvm.rules from upstream
vdsm-lvm.rules.in is to fix lvm block device permissions, it should be
applied after the system default lvm rules. On RH family distributions,
12 is correct because system default is 11-dm-lvm.rules. On Ubuntu, 12 is
incorrect and we use 61-vdsm.lvm.rules. This patch removes the 12-prefix
from the upstream file name, and leaves the downstream packaging script
to decide the correct installed name.
Change-Id: I65ae0fa4d83bba0e1622f70d5c8bee0e2d8742dd
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M .gitignore
M configure.ac
M vdsm.spec.in
R vdsm/storage/vdsm-lvm.rules.in
4 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/06/19006/1
diff --git a/.gitignore b/.gitignore
index c6a8584..295e1fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,8 +54,8 @@
vdsm/mk_sysprep_floppy
vdsm/mom.conf
vdsm/sos/vdsm.py
-vdsm/storage/12-vdsm-lvm.rules
vdsm/storage/protect/safelease
+vdsm/storage/vdsm-lvm.rules
vdsm/sudoers.vdsm
vdsm/svdsm.logger.conf
vdsm/vdscli.py
diff --git a/configure.ac b/configure.ac
index 884cd07..fc3c8cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -233,10 +233,10 @@
vdsm/gluster/Makefile
vdsm/netconf/Makefile
vdsm/sos/Makefile
- vdsm/storage/12-vdsm-lvm.rules
vdsm/storage/Makefile
vdsm/storage/imageRepository/Makefile
vdsm/storage/protect/Makefile
+ vdsm/storage/vdsm-lvm.rules
vdsm_api/Makefile
vdsm_hooks/Makefile
vdsm_hooks/checkimages/Makefile
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 4613b13..a84748a 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -565,7 +565,7 @@
%{buildroot}%{_datadir}/%{vdsm_name}/respawn
# Install the lvm rules
-install -Dm 0644 vdsm/storage/12-vdsm-lvm.rules \
+install -Dm 0644 vdsm/storage/vdsm-lvm.rules \
%{buildroot}/lib/udev/rules.d/12-vdsm-lvm.rules
install -Dm 0644 vdsm/limits.conf \
diff --git a/vdsm/storage/12-vdsm-lvm.rules.in b/vdsm/storage/vdsm-lvm.rules.in
similarity index 100%
rename from vdsm/storage/12-vdsm-lvm.rules.in
rename to vdsm/storage/vdsm-lvm.rules.in
--
To view, visit http://gerrit.ovirt.org/19006
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I65ae0fa4d83bba0e1622f70d5c8bee0e2d8742dd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
10 years
Change in vdsm[master]: build: cleanup: reformat AC_ARG_ENABLE
by Alon Bar-Lev
Alon Bar-Lev has uploaded a new change for review.
Change subject: build: cleanup: reformat AC_ARG_ENABLE
......................................................................
build: cleanup: reformat AC_ARG_ENABLE
consistent use of tabs/non-tabs.
consistent use of formatting method for all statements.
consistent indent, single tab, not "drawing" code.
shorter lines as requested.
Change-Id: I105c03e374d9f63017b50444c3f8e1cb17e75b37
Signed-off-by: Alon Bar-Lev <alonbl(a)redhat.com>
---
M configure.ac
1 file changed, 12 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/39/18939/1
diff --git a/configure.ac b/configure.ac
index 2af9953..7613fe3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,10 @@
AC_ARG_ENABLE(
[hooks],
- [AS_HELP_STRING([--enable-hooks], [build hooks packages @<:@default=no@:>@])],
+ [AS_HELP_STRING(
+ [--enable-hooks],
+ [build hooks packages @<:@default=no@:>@]
+ )],
,
[enable_hooks="no"]
)
@@ -54,8 +57,10 @@
AC_ARG_ENABLE(
[libvirt-sanlock],
- [AS_HELP_STRING([--disable-libvirt-sanlock],
- [disable libvirt sanlock plugin @<:@default=yes@:>@])],
+ [AS_HELP_STRING(
+ [--disable-libvirt-sanlock],
+ [disable libvirt sanlock plugin @<:@default=yes@:>@]
+ )],
,
[enable_libvirt_sanlock="yes"]
)
@@ -63,8 +68,10 @@
AC_ARG_ENABLE(
[libvirt-selinux],
- [AS_HELP_STRING([--disable-libvirt-selinux],
- [disable libvirt selinux plugin @<:@default=yes@:>@])],
+ [AS_HELP_STRING(
+ [--disable-libvirt-selinux],
+ [disable libvirt selinux plugin @<:@default=yes@:>@]
+ )],
,
[enable_libvirt_selinux="yes"]
)
--
To view, visit http://gerrit.ovirt.org/18939
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I105c03e374d9f63017b50444c3f8e1cb17e75b37
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
10 years
Change in vdsm[ovirt-3.3]: systemd init: no need to stop conflicting services
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: systemd init: no need to stop conflicting services
......................................................................
systemd init: no need to stop conflicting services
We use the explict systemd Conflicts= statement for that.
This patch is sent only to the ovirt-3.3 branch, as in master branch we
already have an independent systemd service management.
Bug-Url: https://bugzilla.redhat.com/999664
Change-Id: I7b5469ce61ae8aca353c2c7345a8a719ab0e898f
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/vdsmd.init.in
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/46/19046/1
diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
index 56f07bd..b38791d 100755
--- a/vdsm/vdsmd.init.in
+++ b/vdsm/vdsmd.init.in
@@ -186,7 +186,9 @@
local ret_val
"@PYTHON@" "@VDSMDIR(a)/hooks.pyc" before_vdsm_start
- shutdown_conflicting_srv
+ if ! has_systemd; then
+ shutdown_conflicting_srv
+ fi
if ! "@LIBEXECDIR(a)/vdsm-gencerts.sh" --check; then
printf $"Configuring a self-signed VDSM host certificate: "
--
To view, visit http://gerrit.ovirt.org/19046
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b5469ce61ae8aca353c2c7345a8a719ab0e898f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
10 years
Change in vdsm[master]: remoteFileHandler: Add create exclusive option for truncateFile
by ykaplan@redhat.com
Yeela Kaplan has uploaded a new change for review.
Change subject: remoteFileHandler: Add create exclusive option for truncateFile
......................................................................
remoteFileHandler: Add create exclusive option for truncateFile
Change-Id: Idfeff348e0f6fc240954e7d304b794dd99ea098c
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=979193
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M vdsm/storage/remoteFileHandler.py
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/22/19022/1
diff --git a/vdsm/storage/remoteFileHandler.py b/vdsm/storage/remoteFileHandler.py
index 779b045..f01461f 100644
--- a/vdsm/storage/remoteFileHandler.py
+++ b/vdsm/storage/remoteFileHandler.py
@@ -347,8 +347,13 @@
return f.writelines(lines)
-def truncateFile(path, size, mode=None):
- with open(path, "w") as f:
+def truncateFile(path, size, mode=None, creatExcl=False):
+ flags = os.O_CREAT | os.O_WRONLY
+ if creatExcl:
+ flags |= os.O_EXCL
+
+ fd = os.open(path, flags)
+ with os.fdopen(fd, 'w') as f:
if mode is not None:
os.chmod(path, mode)
f.truncate(size)
--
To view, visit http://gerrit.ovirt.org/19022
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfeff348e0f6fc240954e7d304b794dd99ea098c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
10 years
Change in vdsm[master]: hsm: fix sloppy rebase of one shot prepare
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: hsm: fix sloppy rebase of one shot prepare
......................................................................
hsm: fix sloppy rebase of one shot prepare
A sloppy rebase of c072945 "One shot prepare" removed the changes
introduced by cef2d5b "vm: extend shared property to support locking".
Change-Id: I8f0de78bb9865c93dc40f51c1fcc9b6b29cef516
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 6 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/19049/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index f6ba303..8adfda9 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3242,14 +3242,13 @@
'volumeID': volUUID, 'path': path,
'volType': "path"}
- if config.getboolean('irs', 'use_volume_leases'):
- leasePath, leaseOffset = dom.getVolumeLease(imgUUID, volUUID)
+ leasePath, leaseOffset = dom.getVolumeLease(imgUUID, volUUID)
- if leasePath and leaseOffset is not None:
- volInfo.update({
- 'leasePath': leasePath,
- 'leaseOffset': leaseOffset,
- })
+ if leasePath and type(leaseOffset) in (int, long):
+ volInfo.update({
+ 'leasePath': leasePath,
+ 'leaseOffset': leaseOffset,
+ })
imgVolumesInfo.append(volInfo)
if volUUID == leafUUID:
--
To view, visit http://gerrit.ovirt.org/19049
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f0de78bb9865c93dc40f51c1fcc9b6b29cef516
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
10 years
Change in vdsm[master]: tests: bondHwAddress, safeNetworkConfig, volatileConfig
by gvallare@redhat.com
Giuseppe Vallarelli has uploaded a new change for review.
Change subject: tests: bondHwAddress, safeNetworkConfig, volatileConfig
......................................................................
tests: bondHwAddress, safeNetworkConfig, volatileConfig
Added three functional tests:
* testBondHwAddress
* testSafeNetworkConfig
* testVolatileConfig
Change-Id: I2b035155ef715d8456d9c4658ad2cb7ee76c80d0
Signed-off-by: Giuseppe Vallarelli <gvallare(a)redhat.com>
---
M tests/functional/networkTests.py
M tests/functional/utils.py
2 files changed, 89 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/40/17640/1
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index f16f52e..1a8ed65 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -17,12 +17,15 @@
# Refer to the README and COPYING files for full details of the license
#
import neterrors
+from vdsm import utils
from testrunner import (VdsmTestCase as TestCaseBase,
expandPermutations, permutations)
from testValidation import RequireDummyMod, ValidateRunningAsRoot
from utils import cleanupNet, dummyIf, restoreNetConfig, SUCCESS, VdsProxy
+
+from nose import SkipTest
NETWORK_NAME = 'test-network'
@@ -643,3 +646,78 @@
dict(remove=True)},
{})
self.assertEquals(status, SUCCESS, msg)
+
+ @permutations([[True], [False]])
+ @RequireDummyMod
+ @ValidateRunningAsRoot
+ def testBondHwAddress(self, bridged=True):
+ with dummyIf(2) as nics:
+ def _getBondHwAddress(*nics):
+ status, msg = self.vdsm_net.addNetwork(NETWORK_NAME,
+ bond=BONDING_NAME,
+ nics=nics,
+ opts={'bridged':
+ bridged})
+ self.assertEquals(status, SUCCESS, msg)
+
+ status, msg = self.vdsm_net.delNetwork(NETWORK_NAME)
+ self.assertEquals(status, SUCCESS, msg)
+
+ return self.vdsm_net.netinfo.bondings[BONDING_NAME]['hwaddr']
+
+ macAddress1 = _getBondHwAddress(nics[0], nics[1])
+ macAddress2 = _getBondHwAddress(nics[1], nics[0])
+ self.assertEquals(macAddress1, macAddress2)
+
+ @permutations([[True], [False]])
+ @RequireDummyMod
+ @ValidateRunningAsRoot
+ def testSafeNetworkConfig(self, bridged):
+ """
+ Checks that setSafeNetworkConfig saves
+ the configuration between restart.
+ """
+ with dummyIf(1) as nics:
+ status, msg = self.vdsm_net.addNetwork(NETWORK_NAME, nics=nics,
+ opts={'bridged': bridged})
+ self.assertEquals(status, SUCCESS, msg)
+
+ self.vdsm_net.networkExists(NETWORK_NAME, bridged=bridged)
+
+ self.vdsm_net.setSafeNetworkConfig()
+
+ self.vdsm_net.restartDaemon()
+ # Wait for VDSM to become responsive again
+ utils.retry(lambda: self.assertEquals(
+ SUCCESS, self.vdsm_net.ping()), tries=60)
+
+ self.vdsm_net.networkExists(NETWORK_NAME, bridged=bridged)
+
+ status, msg = self.vdsm_net.delNetwork(NETWORK_NAME)
+ self.assertEquals(status, SUCCESS, msg)
+
+ self.vdsm_net.setSafeNetworkConfig()
+
+ @SkipTest
+ @permutations([[True], [False]])
+ @RequireDummyMod
+ @ValidateRunningAsRoot
+ def testVolatileConfig(self, bridged):
+ """
+ Checks that the network doesn't persist over restart
+ """
+ with dummyIf(1) as nics:
+ status, msg = self.vdsm_net.addNetwork(NETWORK_NAME, nics=nics,
+ opts={'bridged':
+ bridged})
+ self.assertEquals(status, SUCCESS, msg)
+
+ self.vdsm_net.networkExists(NETWORK_NAME, bridged=bridged)
+
+ restoreNetConfig()
+ # Wait for VDSM to become responsive again
+ utils.retry(lambda: self.assertEquals(
+ SUCCESS, self.vdsm_net.ping()), tries=30)
+
+ self.assertFalse(self.vdsm_net.networkExists(NETWORK_NAME,
+ bridged=bridged))
diff --git a/tests/functional/utils.py b/tests/functional/utils.py
index 1f1c7d7..88a6247 100644
--- a/tests/functional/utils.py
+++ b/tests/functional/utils.py
@@ -247,3 +247,14 @@
qos = Qos(inbound, outbound)
return qos
+
+ def setSafeNetworkConfig(self):
+ self.vdscli.setSafeNetworkConfig()
+
+ def restartDaemon(self):
+ cmd_service = [service.cmd, "vdsmd", "restart"]
+ utils.execCmd(cmd_service, sudo=True)
+
+ def ping(self):
+ result = self.vdscli.ping()
+ return result['status']['code']
--
To view, visit http://gerrit.ovirt.org/17640
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b035155ef715d8456d9c4658ad2cb7ee76c80d0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Vallarelli <gvallare(a)redhat.com>
10 years
Change in vdsm[master]: lvm: add logs to indicate finshing reload lvs op
by ykaplan@redhat.com
Yeela Kaplan has uploaded a new change for review.
Change subject: lvm: add logs to indicate finshing reload lvs op
......................................................................
lvm: add logs to indicate finshing reload lvs op
Change-Id: I5631ba9960e0098ee376fd47a0f629d7be9d9319
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=979193
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M vdsm/storage/lvm.py
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/21/19021/1
diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index bc9d30c..29d8a1c 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -463,6 +463,8 @@
log.warning("Removing stale lv: %s/%s", vgName, lvName)
self._lvs.pop((vgName, lvName), None)
+ log.debug("lvs reloaded")
+
return updatedLVs
def _reloadAllLvs(self):
--
To view, visit http://gerrit.ovirt.org/19021
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5631ba9960e0098ee376fd47a0f629d7be9d9319
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
10 years