[NEW PATCH] BZ#732980 Check block size on VG commands (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/920
commit 1483a9dc59fcad9cd66f3e07cf143f1fd74ea001
Author: Federico Simoncelli <fsimonce(a)redhat.com>
Date: Thu Sep 8 13:38:18 2011 +0000
BZ#732980 Check block size on VG commands
Change-Id: Ie106491328f12f650b6bb234a92238d6c0aa70c8
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index 81c9e5b..9d9cfde 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -37,6 +37,7 @@ import lvm
import safelease
import blockVolume
import multipath
+import devicemapper
import resourceFactories
from resourceFactories import LVM_ACTIVATION_NAMESPACE
from persistentDict import PersistentDict, DictValidator
@@ -504,6 +505,8 @@ class BlockStorageDomain(sd.StorageDomain):
if len(mapping) + len(devlist) > MAX_PVS:
raise se.StorageDomainIsMadeFromTooManyPVs()
+ domBlockSizes = lvm.getVGBlockSizes(self.sdUUID)
+
self._extendlock.acquire()
try:
@@ -511,11 +514,18 @@ class BlockStorageDomain(sd.StorageDomain):
devices = []
for dev in devlist:
- if dev in knowndevs:
- devices.append(dev)
- else:
+ if dev not in knowndevs:
raise se.InvalidPhysDev(dev)
+ dmId = devicemapper.getDmId(dev)
+ devBlockSizes = multipath.getDeviceBlockSizes(dmId)
+
+ if devBlockSizes != domBlockSizes:
+ raise se.VolumeGroupBlockSizeError(
+ domBlockSizes, devBlockSizes)
+
+ devices.append(dev)
+
lvm.extendVG(self.sdUUID, devices)
self.updateMapping()
newsize = self.metaSize(self.sdUUID)
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index aa4d6aa..a58639f 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -839,17 +839,28 @@ class HSM:
#getSharedLock(connectionsResource...)
knowndevs = list(multipath.getMPDevNamesIter())
devices = []
- devSizes = []
+ size = 0
+ domBlockSizes = None
for dev in devlist:
if dev in knowndevs:
+ dmId = devicemapper.getDmId(dev)
+ blkSize = multipath.getDeviceBlockSizes(dmId)
+
+ # Setting the domain block size to the first device found
+ if domBlockSizes == None:
+ domBlockSizes = blkSize
+
+ # Checking device block size
+ if blkSize != domBlockSizes:
+ raise se.VolumeGroupBlockSizeError(domBlockSizes, blkSize)
+
+ size += multipath.getDeviceSize(dmId)
devices.append(dev)
- devSizes.append(multipath.getDeviceSize(devicemapper.getDmId(dev)))
else:
raise se.InvalidPhysDev(dev)
#Minimal size check
- size = sum(devSizes)
if size < MINIMALVGSIZE:
raise se.VolumeGroupSizeError("VG size must be more than %s MiB" % str(MINIMALVGSIZE / constants.MEGAB))
diff --git a/vdsm/storage/storage_exception.py b/vdsm/storage/storage_exception.py
index 0a0ab22..7bb3f1c 100644
--- a/vdsm/storage/storage_exception.py
+++ b/vdsm/storage/storage_exception.py
@@ -1001,6 +1001,15 @@ class VolumeGroupReplaceTagError(StorageException):
code = 516
message = "Replace Volume Group tag error"
+class VolumeGroupBlockSizeError(StorageException):
+ def __init__(self, domsizes, devsizes):
+ self.value = "domlogblksize=%s domphyblksize=%s " \
+ "devlogblksize=%s devphyblksize=%s" % (
+ domsizes[0], domsizes[1],
+ devsizes[0], devsizes[1])
+ code = 517
+ message = "All devices in domain must have the same block size"
+
class CannotCreateLogicalVolume(StorageException):
code = 550
message = "Cannot create Logical Volume"
11 years, 6 months
Change in vdsm[master]: BZ#735725 - Insert a configuration line if not exists
by Dan Kenigsberg
Dan Kenigsberg has submitted this change and it was merged.
Change subject: BZ#735725 - Insert a configuration line if not exists
......................................................................
BZ#735725 - Insert a configuration line if not exists
- Simple configuration line insertion if missing
Change-Id: Ica24a08b66c076e87753cfb198f28822f8ecc044
---
M vdsm_reg/deployUtil.py.in
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Dan Kenigsberg: Looks good to me, approved
Haim Ateya: Verified
--
To view, visit http://gerrit.usersys.redhat.com/972
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ica24a08b66c076e87753cfb198f28822f8ecc044
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yotam Oron <yoron(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Haim Ateya <hateya(a)redhat.com>
Gerrit-Reviewer: Yotam Oron <yoron(a)redhat.com>
11 years, 6 months
Change in vdsm[master]: BZ#735725 - Insert a configuration line if not exists
by Haim Ateya
Haim Ateya has posted comments on this change.
Change subject: BZ#735725 - Insert a configuration line if not exists
......................................................................
Patch Set 3: Verified
ACK - specifiably, on add-host(ovirt)\normal registration flow.
--
To view, visit http://gerrit.usersys.redhat.com/972
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica24a08b66c076e87753cfb198f28822f8ecc044
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yotam Oron <yoron(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Haim Ateya <hateya(a)redhat.com>
Gerrit-Reviewer: Yotam Oron <yoron(a)redhat.com>
11 years, 6 months
Change in vdsm[master]: Replace m2crypto: re-add kaxmlrpclib
by Dan Kenigsberg
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Replace m2crypto: re-add kaxmlrpclib
......................................................................
Replace m2crypto: re-add kaxmlrpclib
Change-Id: I4f03ebfe4f9ab8e153fb38cbbacf0f15035b7ccf
---
M vdsm/kaxmlrpclib.py
M vdsm/vm.py
M vdsm_cli/vdscli.py.in
3 files changed, 35 insertions(+), 67 deletions(-)
Approvals:
Dan Kenigsberg: Verified; Looks good to me, approved
--
Gerrit-MessageType: merged
Gerrit-Change-Id: I4f03ebfe4f9ab8e153fb38cbbacf0f15035b7ccf
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
11 years, 6 months
Change in vdsm[master]: SecureXMLRPC: work with python 2.7, too.
by Dan Kenigsberg
Dan Kenigsberg has submitted this change and it was merged.
Change subject: SecureXMLRPC: work with python 2.7, too.
......................................................................
SecureXMLRPC: work with python 2.7, too.
Change-Id: Id09274ed848632aced7f66bf5322f2f5204ce89e
---
M vdsm/SecureXMLRPCServer.py
1 file changed, 10 insertions(+), 2 deletions(-)
Approvals:
Dan Kenigsberg: Verified; Looks good to me, approved
--
Gerrit-MessageType: merged
Gerrit-Change-Id: Id09274ed848632aced7f66bf5322f2f5204ce89e
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Haim Ateya <hateya(a)redhat.com>
11 years, 6 months
Change in vdsm[master]: Replace m2crypto: re-add timeout
by Dan Kenigsberg
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Replace m2crypto: re-add timeout
......................................................................
Replace m2crypto: re-add timeout
Change-Id: I8003bfc7eba33de53588acc8a2925bcbcea69fe0
---
M vdsm/SecureXMLRPCServer.py
M vdsm/clientIF.py
2 files changed, 7 insertions(+), 3 deletions(-)
Approvals:
Dan Kenigsberg: Verified; Looks good to me, approved
--
Gerrit-MessageType: merged
Gerrit-Change-Id: I8003bfc7eba33de53588acc8a2925bcbcea69fe0
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
11 years, 6 months
Change in vdsm[master]: read thp state from its upstream location first
by Dan Kenigsberg
Dan Kenigsberg has submitted this change and it was merged.
Change subject: read thp state from its upstream location first
......................................................................
read thp state from its upstream location first
Change-Id: I174d1d86a89af405b6bd1f04401e07934ed940d6
---
M vdsm/utils.py
1 file changed, 6 insertions(+), 2 deletions(-)
Approvals:
Dan Kenigsberg: Verified; Looks good to me, approved
--
Gerrit-MessageType: merged
Gerrit-Change-Id: I174d1d86a89af405b6bd1f04401e07934ed940d6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
11 years, 6 months
Change in vdsm[master]: make /etc/init.d/vdsmd workable under F15
by Dan Kenigsberg
Dan Kenigsberg has submitted this change and it was merged.
Change subject: make /etc/init.d/vdsmd workable under F15
......................................................................
make /etc/init.d/vdsmd workable under F15
Change-Id: I50e8859799b8a86d47a50b9fbb068b603a42d49b
---
M vdsm/vdsmd.in
1 file changed, 22 insertions(+), 2 deletions(-)
Approvals:
Dan Kenigsberg: Verified; Looks good to me, approved
--
Gerrit-MessageType: merged
Gerrit-Change-Id: I50e8859799b8a86d47a50b9fbb068b603a42d49b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
11 years, 6 months