Change in vdsm[master]: Do not validate image during the move operation
by Igor Lvovsky
Igor Lvovsky has uploaded a new change for review.
Change subject: Do not validate image during the move operation
......................................................................
Do not validate image during the move operation
Change-Id: I8c470719c58eef34cf972e379d96b80e379066aa
---
M vdsm/storage/hsm.py
M vdsm/storage/image.py
M vdsm/storage/sp.py
3 files changed, 0 insertions(+), 40 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/56/2756/1
--
To view, visit http://gerrit.ovirt.org/2756
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c470719c58eef34cf972e379d96b80e379066aa
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Igor Lvovsky <ilvovsky(a)redhat.com>
11 years, 11 months
Change in vdsm[master]: Fix "unknown device" issue for balloon device
by wudxw@linux.vnet.ibm.com
Mark Wu has uploaded a new change for review.
Change subject: Fix "unknown device" issue for balloon device
......................................................................
Fix "unknown device" issue for balloon device
The balloon device's 'alias' property should be updated in function
_getUnderlyingBalloonDeviceInfo(), otherwise it will be recognized as a
unknown device in _getUnderlyingUnknownDeviceInfo().
For the 'model' property, it must be included in the balloon device
parameter and libvirt will not change it, so we needn't get back from
libvirt.
For the 'address' property, libvirt may change it on confict addresses.
So change to always update 'address' from libvirt as the way we handle
drives and network interfaces.
Change-Id: Ibb9c371d1f3d90521cc4bfb9516a0bb979843f52
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
M vdsm/libvirtvm.py
1 file changed, 6 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/3901/1
--
To view, visit http://gerrit.ovirt.org/3901
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb9c371d1f3d90521cc4bfb9516a0bb979843f52
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw(a)linux.vnet.ibm.com>
12 years
Change in vdsm[master]: PEP8 fixes for localFsSD
by Ryan Harper
Ryan Harper has uploaded a new change for review.
Change subject: PEP8 fixes for localFsSD
......................................................................
PEP8 fixes for localFsSD
% pep8 vdsm/storage/localFsSD.py
vdsm/storage/localFsSD.py:16:80: E501 line too long (80 characters)
vdsm/storage/localFsSD.py:49:80: E501 line too long (84 characters)
vdsm/storage/localFsSD.py:102:1: E302 expected 2 blank lines, found 1
Change-Id: I7ec53b45fc27b48d21638e405b219a66f2707b5b
Signed-off-by: Ryan Harper <ryanh(a)us.ibm.com>
---
M vdsm/storage/localFsSD.py
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/38/3938/1
--
To view, visit http://gerrit.ovirt.org/3938
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ec53b45fc27b48d21638e405b219a66f2707b5b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ryan Harper <ryanh(a)us.ibm.com>
12 years
Change in vdsm[master]: [WIP] Remove subChainSizeCalc() and getSubChain(). Remove ge...
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: [WIP] Remove subChainSizeCalc() and getSubChain(). Remove getAllChildrenList().
......................................................................
[WIP] Remove subChainSizeCalc() and getSubChain().
Remove getAllChildrenList().
Change-Id: Iffbbf71269eddb53c032c381d10e20b771c47c6b
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/blockVolume.py
M vdsm/storage/fileVolume.py
M vdsm/storage/image.py
3 files changed, 42 insertions(+), 112 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/3468/1
--
To view, visit http://gerrit.ovirt.org/3468
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffbbf71269eddb53c032c381d10e20b771c47c6b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
12 years
Change in vdsm[master]: [WIP] Add sd.getTemplateSelfImg(). Template relink refactore...
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: [WIP] Add sd.getTemplateSelfImg(). Template relink refactored.
......................................................................
[WIP] Add sd.getTemplateSelfImg(). Template relink refactored.
Change-Id: I087fc777e202088615c82be1a88fcde15b846628
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/image.py
M vdsm/storage/sd.py
2 files changed, 35 insertions(+), 14 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/67/3467/1
--
To view, visit http://gerrit.ovirt.org/3467
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I087fc777e202088615c82be1a88fcde15b846628
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
12 years
Change in vdsm[master]: PEP8 fixes for nfsSD
by Ryan Harper
Ryan Harper has uploaded a new change for review.
Change subject: PEP8 fixes for nfsSD
......................................................................
PEP8 fixes for nfsSD
pep8 complaints:
vdsm/storage/nfsSD.py:16:80: E501 line too long (80 characters)
vdsm/storage/nfsSD.py:33:1: E302 expected 2 blank lines, found 1
vdsm/storage/nfsSD.py:54:80: E501 line too long (84 characters)
vdsm/storage/nfsSD.py:97:80: E501 line too long (82 characters)
vdsm/storage/nfsSD.py:111:37: E225 missing whitespace around operator
vdsm/storage/nfsSD.py:114:28: E231 missing whitespace after ':'
vdsm/storage/nfsSD.py:115:80: E501 line too long (87 characters)
vdsm/storage/nfsSD.py:137:5: E303 too many blank lines (2)
vdsm/storage/nfsSD.py:153:1: W391 blank line at end of file
Change-Id: I94a06b5eb75795cd30ca50dbfa91bfd883269359
Signed-off-by: Ryan Harper <ryanh(a)us.ibm.com>
---
M vdsm/storage/nfsSD.py
1 file changed, 11 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/3936/1
--
To view, visit http://gerrit.ovirt.org/3936
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I94a06b5eb75795cd30ca50dbfa91bfd883269359
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ryan Harper <ryanh(a)us.ibm.com>
12 years
Change in vdsm[master]: [WIP: REVIEW ONLY] Added Gluster file system management supp...
by barumuga@redhat.com
Hello Timothy Asir, Saggi Mizrahi, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/2808
to review the following change.
Change subject: [WIP: REVIEW ONLY] Added Gluster file system management support.
......................................................................
[WIP: REVIEW ONLY] Added Gluster file system management support.
Verbs added into vdsm are
glusterVolumesList,
glusterVolumeCreate,
glusterVolumeStart,
glusterVolumeStop,
glusterVolumeDelete,
glusterVolumeSet,
glusterVolumeBrickAdd,
glusterVolumeRebalanceStart,
glusterVolumeRebalanceStop,
glusterVolumeRebalanceStatus,
glusterVolumeReplaceBrickStart,
glusterVolumeReplaceBrickAbort,
glusterVolumeReplaceBrickPause,
glusterVolumeReplaceBrickStatus,
glusterVolumeReplaceBrickCommit,
glusterVolumeRemoveBrickStart,
glusterVolumeRemoveBrickPause,
glusterVolumeRemoveBrickAbort,
glusterVolumeRemoveBrickStatus,
glusterVolumeRemoveBrickCommit,
glusterVolumeRemoveBrickForce,
glusterHostAdd,
glusterHostRemove,
glusterHostsList,
glusterDisksList
Change-Id: Ibd51bec292991f7abdcacf3ba747c9662f660f51
Signed-off-by: Timothy Asir <tjeyasin(a)redhat.com>
Signed-off-by: Bala.FA <barumuga(a)redhat.com>
---
M configure.ac
M vdsm.spec.in
M vdsm/BindingXMLRPC.py
M vdsm/Makefile.am
M vdsm/clientIF.py
A vdsm/gluster/Makefile.am
A vdsm/gluster/__init__.py.in
A vdsm/gluster/gluster_api.py
A vdsm/gluster/gluster_binding.py
A vdsm/gluster/gluster_cli.py
A vdsm/gluster/gluster_exception.py
A vdsm/gluster/gluster_utils.py
M vdsm_cli/Makefile.am
A vdsm_cli/gluster_extension.py
M vdsm_cli/vdsClient.py
15 files changed, 1,824 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/08/2808/1
--
To view, visit http://gerrit.ovirt.org/2808
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd51bec292991f7abdcacf3ba747c9662f660f51
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin(a)redhat.com>
12 years
Change in vdsm[master]: Added gluster tool support in supervdsm.
by barumuga@redhat.com
Hello Saggi Mizrahi, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/2797
to review the following change.
Change subject: Added gluster tool support in supervdsm.
......................................................................
Added gluster tool support in supervdsm.
Now supervdsm has execGluster function helps to run gluster commands.
Change-Id: I2faa261a3c44cf84af14102bdf6479287435793b
Signed-off-by: Bala.FA <barumuga(a)redhat.com>
---
M configure.ac
M vdsm.spec.in
M vdsm/Makefile.am
M vdsm/constants.py.in
A vdsm/gluster.py
M vdsm/supervdsmServer.py
6 files changed, 34 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/2797/1
--
To view, visit http://gerrit.ovirt.org/2797
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2faa261a3c44cf84af14102bdf6479287435793b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
12 years
[NEW PATCH] Change getChain() to return dictionary with chain itself and its template. (via gerrit-bot)
by Igor Lvovsky
New patch submitted by Igor Lvovsky (ilvovsky(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/692
commit 3a09f874889cb372ee84b04a234f7b653458e26f
Author: Igor Lvovsky <ilvovsky(a)redhat.com>
Date: Tue Jul 12 15:18:45 2011 +0300
Change getChain() to return dictionary with chain itself and its template.
This change will avoid unneeded produceVolume and improve
behaviour of different flows.
Change-Id: Ife46d592171aedea087e0d6462b735cd7e0d75e0
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index 1c70a34..102ea6c 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -104,7 +104,7 @@ class Image:
# 1. Remove template's image: Create 'fake' template instead of deleted one
# 2. Remove regular image: Remove parent-'fake' template if nobody need it already
try:
- pvol = self.getTemplate(sdUUID=sdUUID, imgUUID=imgUUID)
+ pvol = self.getChain(sdUUID, imgUUID)['template']
# 1. If we required to delete template's image that have VMs
# based on it, we should create similar 'fake' template instead
if pvol:
@@ -269,17 +269,16 @@ class Image:
return newImgUUID
- def __chainSizeCalc(self, sdUUID, imgUUID, volUUID, size):
+ def __chainSizeCalc(self, sdUUID, imgUUID, size):
"""
Compute an estimate of the whole chain size
using the sum of the actual size of the chain's volumes
"""
- chain = self.getChain(sdUUID, imgUUID, volUUID)
+ chainDict = self.getChain(sdUUID, imgUUID)
newsize = 0
- template = chain[0].getParentVolume()
- if template:
- newsize = template.getVolumeSize()
- for vol in chain:
+ if chainDict['template']:
+ newsize = chainDict['template'].getVolumeSize()
+ for vol in chainDict['chain']:
newsize += vol.getVolumeSize()
if newsize > size:
newsize = size
@@ -301,12 +300,14 @@ class Image:
newsize = int(newsize * 1.1) # allocate %10 more for cow metadata
return newsize
- def getChain(self, sdUUID, imgUUID, volUUID=None):
+ def getChain(self, sdUUID, imgUUID):
"""
- Return the chain of volumes of image as a sorted list
- (not including a shared base (template) if any)
+ Return the dictionary with chain of volumes of image as a sorted list
+ (not including a shared base (template)) and the template if any
"""
- chain = []
+ # 'chain' - chain of volumes of image as a sorted list
+ # 'template' - shared base (template) if any
+ chainDict = {'chain':[], 'template':None}
# Find all volumes of image
volclass = SDF.produce(sdUUID).getVolumeClass()
uuidlist = volclass.getImageVolumes(self.repoPath, sdUUID, imgUUID)
@@ -316,14 +317,13 @@ class Image:
srcVol = volclass(self.repoPath, sdUUID, imgUUID, uuidlist[0])
# For template image include only one volume (template itself)
if len(uuidlist) == 1 and srcVol.isShared():
- return [srcVol]
+ return {'chain':[srcVol], 'template':srcVol}
# find the leaf
for vol in uuidlist:
srcVol = volclass(self.repoPath, sdUUID, imgUUID, vol)
if srcVol.isLeaf():
- if not volUUID or volUUID == srcVol.volUUID:
- break
+ break
srcVol = None
if not srcVol:
@@ -332,38 +332,25 @@ class Image:
# Build up the sorted (parent->child) chain
while not srcVol.isShared():
- chain.insert(0, srcVol)
+ chainDict['chain'].insert(0, srcVol)
if srcVol.getParent() == volume.BLANK_UUID:
break
srcVol = srcVol.getParentVolume()
- self.log.info("sdUUID=%s imgUUID=%s chain=%s ", sdUUID, imgUUID, str(chain))
- return chain
+ if srcVol.isShared():
+ chainDict['template'] = srcVol
- def getTemplate(self, sdUUID, imgUUID):
- """
- Return template of the image
- """
- tmpl = None
- # Find all volumes of image (excluding template)
- chain = self.getChain(sdUUID, imgUUID)
- # check if the chain is build above a template, or it is a standalone
- pvol = chain[0].getParentVolume()
- if pvol:
- tmpl = pvol
- elif chain[0].isShared():
- tmpl = chain[0]
-
- return tmpl
+ self.log.info("sdUUID=%s imgUUID=%s chainDict=%s ", sdUUID, imgUUID, str(chainDict))
+ return chainDict
def validate(self, srcSdUUID, dstSdUUID, imgUUID, op=MOVE_OP):
"""
Validate template on destination domain
"""
- # Find all volumes of source image
- chain = self.getChain(srcSdUUID, imgUUID)
- leafVol = chain[-1]
srcDom = SDF.produce(srcSdUUID)
+ # Find all volumes of source image
+ chainDict = self.getChain(srcSdUUID, imgUUID)
+ leafVol = chainDict['chain'][-1]
# Avoid move template's image if there is a VM based on it (except 'Backup' domain)
if op == MOVE_OP and leafVol.isShared() and not srcDom.isBackup():
chList = leafVol.getAllChildrenList(self.repoPath, srcSdUUID, imgUUID, leafVol.volUUID)
@@ -371,18 +358,16 @@ class Image:
raise se.MoveTemplateImageError(imgUUID)
# check if the chain is build above a template, or it is a standalone
- pvol = chain[0].getParentVolume()
+ pvol = chainDict['template']
if pvol: # this is a shared template based chain
- if not pvol.isShared():
- raise se.ImageIsNotLegalChain("Base image parent vol %s is not shared" % pvol.volUUID)
pimg = pvol.getImage() # pimg == template image
try:
volclass = SDF.produce(dstSdUUID).getVolumeClass()
# Validate that the destination template exists and accessible
volclass(self.repoPath, dstSdUUID, pimg, pvol.volUUID)
- except se.StorageException, e:
- self.log.error("Unexpected error", exc_info=True)
- raise se.CouldNotValideTemplateOnTargetDomain("Template %s Destination domain %s: %s" % (pimg, dstSdUUID, str(e)))
+ except se.StorageException:
+ self.log.error("Cannot validate template %s on target domain %s", pimg, dstSdUUID, exc_info=True)
+ raise se.CouldNotValideTemplateOnTargetDomain()
def __templateRelink(self, destDom, imgUUID, volUUID):
"""
@@ -473,20 +458,15 @@ class Image:
def _createTargetImage(self, destDom, srcSdUUID, imgUUID):
# Before actual data copying we need perform several operation
# such as: create all volumes, create fake template if needed, ...
- try:
- # Find all volumes of source image
- srcChain = self.getChain(srcSdUUID, imgUUID)
- except se.StorageException:
- self.log.error("Unexpected error", exc_info=True)
- raise
- except Exception, e:
- self.log.error("Unexpected error", exc_info=True)
- raise se.SourceImageActionError(imgUUID, srcSdUUID, str(e))
+
+ # Find all volumes of source image
+ srcChainDict = self.getChain(srcSdUUID, imgUUID)
+ srcChain = srcChainDict['chain']
fakeTemplate = False
pimg = volume.BLANK_UUID # standalone chain
# check if the chain is build above a template, or it is a standalone
- pvol = srcChain[0].getParentVolume()
+ pvol = srcChainDict['template']
if pvol:
# find out parent volume parameters
volParams = pvol.getVolumeParams()
@@ -686,11 +666,9 @@ class Image:
"""
if not self.isLegal(sdUUID, imgUUID):
raise se.ImageIsNotLegalChain(imgUUID)
- chain = self.getChain(sdUUID, imgUUID)
- # check if the chain is build above a template, or it is a standalone
- pvol = chain[0].getParentVolume()
- if pvol:
- if not pvol.isLegal() or pvol.isFake():
+ chainDict = self.getChain(sdUUID, imgUUID)
+ if chainDict['template']:
+ if not chainDict['template'].isLegal() or chainDict['template'].isFake():
raise se.ImageIsNotLegalChain(imgUUID)
def copy(self, sdUUID, vmUUID, srcImgUUID, srcVolUUID, dstImgUUID, dstVolUUID,
@@ -735,8 +713,7 @@ class Image:
# using the sum of the actual size of the chain's volumes
if volParams['volFormat'] != volume.COW_FORMAT or volParams['prealloc'] != volume.SPARSE_VOL:
raise se.IncorrectFormat(self)
- volParams['apparentsize'] = self.__chainSizeCalc(sdUUID, srcImgUUID,
- srcVolUUID, volParams['size'])
+ volParams['apparentsize'] = self.__chainSizeCalc(sdUUID, srcImgUUID, volParams['size'])
# Find out dest volume parameters
if preallocate in [volume.PREALLOCATED_VOL, volume.SPARSE_VOL]:
diff --git a/vdsm/storage/resourceFactories.py b/vdsm/storage/resourceFactories.py
index ce3ec70..07df0f0 100644
--- a/vdsm/storage/resourceFactories.py
+++ b/vdsm/storage/resourceFactories.py
@@ -106,20 +106,18 @@ class ImageResourceFactory(rm.SimpleResourceFactory):
# Get the list of the volumes
repoPath = os.path.join(self.storage_repository, dom.getPools()[0])
try:
- chain = image.Image(repoPath).getChain(sdUUID=self.sdUUID, imgUUID=resourceName)
+ chainDict = image.Image(repoPath).getChain(sdUUID=self.sdUUID, imgUUID=resourceName)
+ chain = chainDict['chain']
except se.ImageDoesNotExistInSD:
log.debug("Image %s does not exist in domain %s", resourceName, self.sdUUID)
return []
- # check if the chain is build above a template, or it is a standalone
- pvol = chain[0].getParentVolume()
- if pvol:
- template = pvol.volUUID
- elif chain[0].isShared():
- # Image of template itself,
- # with no other volumes in chain
- template = chain[0].volUUID
- del chain[:]
+ # Image of template itself,
+ # with no other volumes in chain
+ if chainDict['template']:
+ template = chainDict['template'].volUUID
+ if chainDict['template'] in chain:
+ del chain[:]
volUUIDChain = [vol.volUUID for vol in chain]
volUUIDChain.sort()
12 years
Change in vdsm[master]: The vdsm/vdsmd.init.in script is a bit complex, so move some...
by wenyi@linux.vnet.ibm.com
Wenyi Gao has uploaded a new change for review.
Change subject: The vdsm/vdsmd.init.in script is a bit complex, so move some functions to a new script file "vdsmd-init-utils". The new file will be installed in "@VDSMDIR@/vdsm".
......................................................................
The vdsm/vdsmd.init.in script is a bit complex, so move some
functions to a new script file "vdsmd-init-utils". The new
file will be installed in "@VDSMDIR@/vdsm".
Make blkid.py pep8 clean
Change-Id: I0077b80ff9f62aa7722994ee19de929804778a49
Signed-off-by: Wenyi Gao <wenyi(a)linux.vnet.ibm.com>
---
M vdsm.spec.in
M vdsm/Makefile.am
A vdsm/vdsmd-init-utils
M vdsm/vdsmd.init.in
4 files changed, 465 insertions(+), 450 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/10/3910/1
--
To view, visit http://gerrit.ovirt.org/3910
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0077b80ff9f62aa7722994ee19de929804778a49
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Wenyi Gao <wenyi(a)linux.vnet.ibm.com>
12 years