[NEW PATCH] BZ#718993 - Remove vgchange --refresh (via gerrit-bot)
by ewarszaw@redhat.com
New patch submitted by Eduardo Warszawski (ewarszaw(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/662
commit d191e2ed17ca6cde26d25e020af32706df064fa5
Author: Eduardo Warszawski <ewarszaw(a)redhat.com>
Date: Tue Jul 5 18:05:39 2011 +0300
BZ#718993 - Remove vgchange --refresh
vgchange --refresh may be too long when are many LVs in the VG.
Change-Id: I123480a2f687bbfacaf8308fbfa3d0a7f5c29c47
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index 06e67b3..3e08aff 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -105,7 +105,7 @@ class VGTagMetadataRW(object):
self._vgName = vgName
def readlines(self):
- lvm.refreshVG(self._vgName)
+ lvm.invalidateVG(self._vgName)
vg = lvm.getVG(self._vgName)
metadata = []
for tag in vg.tags:
@@ -920,7 +920,7 @@ class BlockStorageDomain(sd.StorageDomain):
def refresh(self):
self.refreshDirTree()
- lvm.refreshVG(self.sdUUID)
+ lvm.invalidateVG(self.sdUUID)
self._metadata = selectMetadata(self.sdUUID)
@staticmethod
diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index d6159eb..8a89a01 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -881,14 +881,9 @@ def deactivateVG(vgName):
_setVgAvailability(vgName, available="n")
-def refreshVG(vgName):
- #If any logical volume in the volume group is active, reload its metadata.
- cmd = ['vgchange', '--refresh', vgName]
- rc, out, err = _lvminfo.cmd(cmd)
+def invalidateVG(vgName):
_lvminfo._invalidatevgs(vgName)
_lvminfo._invalidatelvs(vgName)
- if rc != 0:
- raise se.LogicalVolumeRefreshError("vgchange --refresh %s failed" % (vgName,))
#
12 years, 10 months
[NEW PATCH] BZ#699976 Related, use RHEVM leasetime and timeout (via gerrit-bot)
by Federico Simoncelli
New patch submitted by Federico Simoncelli (fsimonce(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/652
commit c51c0cb0f616fa4f2de10f9a28110a23ce4dd9b7
Author: Federico Simoncelli <fsimonce(a)redhat.com>
Date: Mon Jul 4 14:21:56 2011 +0000
BZ#699976 Related, use RHEVM leasetime and timeout
Increase DMDK_IO_OP_TIMEOUT_SEC to 10 seconds and DMDK_LEASE_TIME_SEC
to 60 seconds (RHEVM default values) to avoid spm self-fences when
working on slow storages.
Change-Id: I1d641290521379febca24331d1531f658996956b
diff --git a/vdsm/storage/sd.py b/vdsm/storage/sd.py
index 41363ba..f40236c 100644
--- a/vdsm/storage/sd.py
+++ b/vdsm/storage/sd.py
@@ -108,9 +108,9 @@ DMDK_LEASE_RETRIES = 'LEASERETRIES'
DEFAULT_LEASE_PARAMS = {DMDK_LOCK_POLICY : "ON",
DMDK_LEASE_RETRIES : 3,
- DMDK_LEASE_TIME_SEC : 30,
+ DMDK_LEASE_TIME_SEC : 60,
DMDK_LOCK_RENEWAL_INTERVAL_SEC : 5,
- DMDK_IO_OP_TIMEOUT_SEC : 1}
+ DMDK_IO_OP_TIMEOUT_SEC : 10}
MASTER_FS_DIR = 'master'
VMS_DIR = 'vms'
12 years, 10 months
[NEW PATCH] BZ#716675 Remove timezone from kernelDict (via gerrit-bot)
by David Naori
New patch submitted by David Naori (dnaori(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/660
commit 8e3022ff133233d27af10b7bb5d0f3316b90ca9e
Author: David Naori <dnaori(a)redhat.com>
Date: Tue Jul 5 09:26:13 2011 +0300
BZ#716675 Remove timezone from kernelDict
Change-Id: I472261ec7ff75d5d785f71dfc908442d7eb88d90
diff --git a/vdsm/caps.py b/vdsm/caps.py
index 37af2f5..e943321 100644
--- a/vdsm/caps.py
+++ b/vdsm/caps.py
@@ -200,8 +200,9 @@ def _getKeyPackages():
logging.error('kernel release not found', exc_info=True)
ver, rel = '0', '0'
try:
- t = file('/proc/sys/kernel/version').read().strip().split(None, 2)[2]
- t = time.mktime(time.strptime(t, '%a %b %d %H:%M:%S %Z %Y'))
+ t = file('/proc/sys/kernel/version').read().split()[2:]
+ del t[4] # Delete timezone
+ t = time.mktime(time.strptime(' '.join(t)))
except:
logging.error('kernel build time not found', exc_info=True)
t = '0'
12 years, 10 months
[NEW PATCH] formatStorageDomain removes the VG too. (via gerrit-bot)
by ewarszaw@redhat.com
New patch submitted by Eduardo Warszawski (ewarszaw(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/659
commit 59a64954b5dcab5e37d762452bc0eb18722268dc
Author: Eduardo Warszawski <ewarszaw(a)redhat.com>
Date: Tue Jul 5 15:32:53 2011 +0300
formatStorageDomain removes the VG too.
Change-Id: Ie993abd2a812f1ecec127cc637794994591e48ea
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index 9f744b2..06e67b3 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -679,8 +679,7 @@ class BlockStorageDomain(sd.StorageDomain):
except se.CannotRemoveLogicalVolume, e:
cls.log.warning("Remove logical volume failed %s/%s %s", sdUUID, lv.name, str(e))
- # Remove SD tag
- lvm.replaceVGTag(sdUUID, STORAGE_DOMAIN_TAG, STORAGE_UNREADY_DOMAIN_TAG)
+ lvm.removeVG(sdUUID)
return True
def getInfo(self):
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 7081558..11c32dc 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -828,6 +828,7 @@ class HSM:
return dict(uuid=lvm.getVG(vgname).uuid)
+ #DEPRECATED: formatSD effectively removes the VG.
def public_removeVG(self, vgUUID, options = None):
"""
Removes a volume group.
@@ -835,12 +836,13 @@ class HSM:
:param vgUUID: The UUID of the VG you want removed.
:type vgUUID: UUID
:param options: ?
-
- :raises: :exc:`storage_exception.VolumeGroupDoesNotExist` if no VG with this UUID exists.
"""
vars.task.setDefaultException(se.VolumeGroupActionError("%s" % str(vgUUID)))
#getSharedLock(connectionsResource...)
- lvm.removeVGbyUUID(vgUUID)
+ try:
+ lvm.removeVGbyUUID(vgUUID)
+ except se.VolumeGroupDoesNotExist:
+ pass
def public_getTaskStatus(self, taskID, spUUID=None, options = None):
12 years, 10 months
[NEW PATCH] _initpv should only throw PhysDevInitializationError exceptions, however when a bad device argument is passed to _initpv (say /dev/null) it throws OSError. This patch is fixing this scenario (via gerrit-bot)
by Yotam Oron
New patch submitted by Yotam Oron (yoron(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/653
commit 1d3cb8cbf8a43ec7d110980227b0a9d24deb3c1d
Author: Yotam Oron <yoron(a)redhat.com>
Date: Tue Jul 5 12:14:53 2011 +0300
_initpv should only throw PhysDevInitializationError exceptions, however
when a bad device argument is passed to _initpv (say /dev/null) it throws OSError.
This patch is fixing this scenario
Change-Id: I05e55b361df1523d970428d5453f36e98b2c9a2b
diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index d6159eb..b3d7221 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -676,7 +676,13 @@ def _initpv(device, withmetadata=False):
if isPvPartOfVg(device):
raise se.PhysDevInitializationError(device)
- devicemapper.removeMappingsHoldingDevice(os.path.basename(device))
+ try:
+ devicemapper.removeMappingsHoldingDevice(os.path.basename(device))
+ except OSError:
+ log.warning("removeMappingsHoldingDevice() failed with %s" % device,
+ exc_info=True)
+ raise se.PhysDevInitializationError(device)
+
rc, out, err = _lvminfo.cmd(cmd)
if rc != 0:
raise se.PhysDevInitializationError(device)
12 years, 10 months
[NEW PATCH] BZ#699976 Related, set IO_OP_TIMEOUT to 10 seconds (via gerrit-bot)
by Federico Simoncelli
New patch submitted by Federico Simoncelli (fsimonce(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/652
commit 98f130e72800bd20c8db2ab24687f9bee156f5f9
Author: Federico Simoncelli <fsimonce(a)redhat.com>
Date: Mon Jul 4 14:21:56 2011 +0000
BZ#699976 Related, set IO_OP_TIMEOUT to 10 seconds
Increase DMDK_IO_OP_TIMEOUT_SEC to 10 seconds (RHEVM default) to avoid
spm self-fences when working on slow storages.
Change-Id: I1d641290521379febca24331d1531f658996956b
diff --git a/vdsm/storage/sd.py b/vdsm/storage/sd.py
index 325da5d..e9b6932 100644
--- a/vdsm/storage/sd.py
+++ b/vdsm/storage/sd.py
@@ -108,9 +108,9 @@ DMDK_LEASE_RETRIES = 'LEASERETRIES'
DEFAULT_LEASE_PARAMS = {DMDK_LOCK_POLICY : "ON",
DMDK_LEASE_RETRIES : 3,
- DMDK_LEASE_TIME_SEC : 30,
+ DMDK_LEASE_TIME_SEC : 60,
DMDK_LOCK_RENEWAL_INTERVAL_SEC : 5,
- DMDK_IO_OP_TIMEOUT_SEC : 1}
+ DMDK_IO_OP_TIMEOUT_SEC : 10}
MASTER_FS_DIR = 'master'
VMS_DIR = 'vms'
12 years, 10 months
[NEW PATCH] _initpv should only throw PhysDevInitializationError exceptions, however when a bad device is received (say /dev/null) it throws OSError. This patch is fixing this scenario (via gerrit-bot)
by Yotam Oron
New patch submitted by Yotam Oron (yoron(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/653
commit 46c8d0077575cdcc7353b802b9bd0c8f68136c6e
Author: Yotam Oron <yoron(a)redhat.com>
Date: Tue Jul 5 12:14:53 2011 +0300
_initpv should only throw PhysDevInitializationError exceptions, however
when a bad device is received (say /dev/null) it throws OSError.
This patch is fixing this scenario
Change-Id: I05e55b361df1523d970428d5453f36e98b2c9a2b
diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index d6159eb..f87bf6b 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -676,7 +676,11 @@ def _initpv(device, withmetadata=False):
if isPvPartOfVg(device):
raise se.PhysDevInitializationError(device)
- devicemapper.removeMappingsHoldingDevice(os.path.basename(device))
+ try:
+ devicemapper.removeMappingsHoldingDevice(os.path.basename(device))
+ except OSError:
+ raise se.PhysDevInitializationError(device)
+
rc, out, err = _lvminfo.cmd(cmd)
if rc != 0:
raise se.PhysDevInitializationError(device)
12 years, 10 months
[NEW PATCH] BZ#717658 - Do lvm cache refresh in SDF.refreshStorage (via gerrit-bot)
by ewarszaw@redhat.com
New patch submitted by Eduardo Warszawski (ewarszaw(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/651
commit 0a44575a18343fd2a41c2aff8cb0076191dc25d3
Author: Eduardo Warszawski <ewarszaw(a)redhat.com>
Date: Mon Jul 4 13:44:55 2011 +0300
BZ#717658 - Do lvm cache refresh in SDF.refreshStorage
Change-Id: Ib51dc550def7713eaa23def41a7133bcff2ee46b
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 0e7631b..7081558 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -1327,6 +1327,7 @@ class HSM:
:rtype: dict
"""
vars.task.setDefaultException(se.StorageDomainActionError("spUUID: %s" % str(spUUID)))
+ SDF.refreshStorage()
if spUUID and spUUID != volume.BLANK_UUID:
domList = self.getPool(spUUID).getDomains()
domains = domList.keys()
diff --git a/vdsm/storage/sdc.py b/vdsm/storage/sdc.py
index 93529fd..245c5bf 100644
--- a/vdsm/storage/sdc.py
+++ b/vdsm/storage/sdc.py
@@ -44,6 +44,7 @@ class StorageDomainCache:
def refreshStorage(self):
multipath.rescan()
lvm.updateLvmConf()
+ lvm.getAllVGs()
self.storageStale = False
def _getDomainFromCache(self, sdUUID):
12 years, 10 months
[NEW PATCH] BZ#699976 Related, set IO_OP_TIMEOUT to 5 seconds (via gerrit-bot)
by Federico Simoncelli
New patch submitted by Federico Simoncelli (fsimonce(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/652
commit 984037b465c1171c21713232bbb7c5f98cc4566e
Author: Federico Simoncelli <fsimonce(a)redhat.com>
Date: Mon Jul 4 14:21:56 2011 +0000
BZ#699976 Related, set IO_OP_TIMEOUT to 5 seconds
Increase DMDK_IO_OP_TIMEOUT_SEC to 5 seconds to avoid spm
self-fences when working on slow storages.
Change-Id: I1d641290521379febca24331d1531f658996956b
diff --git a/vdsm/storage/sd.py b/vdsm/storage/sd.py
index 325da5d..cd0caf1 100644
--- a/vdsm/storage/sd.py
+++ b/vdsm/storage/sd.py
@@ -110,7 +110,7 @@ DEFAULT_LEASE_PARAMS = {DMDK_LOCK_POLICY : "ON",
DMDK_LEASE_RETRIES : 3,
DMDK_LEASE_TIME_SEC : 30,
DMDK_LOCK_RENEWAL_INTERVAL_SEC : 5,
- DMDK_IO_OP_TIMEOUT_SEC : 1}
+ DMDK_IO_OP_TIMEOUT_SEC : 5}
MASTER_FS_DIR = 'master'
VMS_DIR = 'vms'
12 years, 10 months