[NEW PATCH] BZ#717658 - Change format signature. (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/640
commit a609d198d38137374db72a7ac3fc416c36ad64d3
Author: Eduardo Warszawski <ewarszaw(a)redhat.com>
Date: Thu Jun 30 16:07:58 2011 +0300
BZ#717658 - Change format signature.
Change-Id: Iea1e5735563087195181c625e57b8ba8e75d3441
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index 214e8a4..5c8f8e2 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -658,11 +658,12 @@ class BlockStorageDomain(sd.StorageDomain):
fileUtils.cleanupdir(os.path.join("/dev", self.sdUUID))
@classmethod
- def format(cls, sdUUID, domaindir):
+ def format(cls, sdUUID):
"""Format detached storage domain.
This removes all data from the storage domain.
"""
# Remove the directory tree
+ domaindir = cls.findDomainPath(sdUUID)
fileUtils.cleanupdir(domaindir, ignoreErrors = True)
# Remove special metadata and service volumes
# Remove all volumes LV if exists
diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py
index 8b40a59..023c197 100644
--- a/vdsm/storage/fileSD.py
+++ b/vdsm/storage/fileSD.py
@@ -195,12 +195,13 @@ class FileStorageDomain(sd.StorageDomain):
return imgList
@classmethod
- def format(cls, sdUUID, domaindir):
+ def format(cls, sdUUID):
"""
Format detached storage domain.
This removes all data from the storage domain.
"""
cls.log.info("Formating domain %s", sdUUID)
+ domaindir = cls.findDomainPath(sdUUID)
processPoolDict[sdUUID].fileUtils.cleanupdir(domaindir, ignoreErrors = False)
return True
diff --git a/vdsm/storage/sd.py b/vdsm/storage/sd.py
index 325da5d..579b282 100644
--- a/vdsm/storage/sd.py
+++ b/vdsm/storage/sd.py
@@ -552,14 +552,6 @@ class StorageDomain:
if self.isBackup():
self.unmountMaster()
-
- def format(self):
- """
- Format detached storage domain.
- This removes all data from the storage domain.
- """
- pass
-
def getAllImages(self):
"""
Fetch the list of the Image UUIDs
diff --git a/vdsm/storage/sdf.py b/vdsm/storage/sdf.py
index da8335c..16faa3e 100644
--- a/vdsm/storage/sdf.py
+++ b/vdsm/storage/sdf.py
@@ -81,13 +81,13 @@ class StorageDomainFactory:
for domClass in (blockSD.BlockStorageDomain, nfsSD.NfsStorageDomain, localFsSD.LocalFsStorageDomain):
try:
- domaindir = domClass.findDomainPath(sdUUID)
+ domClass.findDomainPath(sdUUID)
except (se.StorageDomainDoesNotExist):
pass
except Exception:
cls.log.error("Can't find out domain %s", sdUUID, exc_info=True)
else:
- return domClass.format(sdUUID, domaindir)
+ return domClass.format(sdUUID)
raise se.StorageDomainTypeError(sdUUID)
12 years, 7 months
Change in vdsm[master]: Removing references to SDF.
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: Removing references to SDF.
......................................................................
Patch Set 2: Verified; Looks good to me, approved
--
Gerrit-MessageType: comment
Gerrit-Change-Id: I87ca502ebbb1c6384a8fe3d5f02edf3ed6d084f5
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo Warszawski <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Eduardo Warszawski <ewarszaw(a)redhat.com>
12 years, 7 months
Change in vdsm[master]: Handle EAGAIN and EINTR in ProcessPool.runExternally
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: Handle EAGAIN and EINTR in ProcessPool.runExternally
......................................................................
Patch Set 1: (1 inline comment)
....................................................
File vdsm/storage/processPool.py
Line 145: raise
Line 146:
Line 147: if not pollres:
Line 148: helper.interrupt()
Line 149: if not helper.pipe.poll(self._gracePeriod):
won't you need to have the same handling here?
would you give some background about this patch? it seems quite serious - an exception causes a leaked helper processes.
Line 150: helper.kill()
Line 151: self._helperPool[i] = None
Line 152: raise Timeout("Operation Stuck")
Line 153:
--
To view, visit http://gerrit.usersys.redhat.com/1051
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id1d0f35af9db6e237c87b00438b9ce3ded9faa8f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
12 years, 7 months
Change in vdsm[master]: Handle EAGAIN and EINTR in ProcessPool.runExternally
by Federico Simoncelli
Federico Simoncelli has posted comments on this change.
Change subject: Handle EAGAIN and EINTR in ProcessPool.runExternally
......................................................................
Patch Set 1:
This avoids stuff like:
MainThread::WARNING::2011-10-21 12:38:33,532::persistentDict::150::Storage.PersistentDict::(transaction) Error in transaction, rolling back changes
Traceback (most recent call last):
File "/usr/share/vdsm/storage/persistentDict.py", line 147, in transaction
self.flush(self._metadata)
File "/usr/share/vdsm/storage/persistentDict.py", line 266, in flush
self._metaRW.writelines(lines)
File "/usr/share/vdsm/storage/fileSD.py", line 58, in writelines
self._oop.writeLines(tmpFilePath, metadata)
File "/usr/share/vdsm/storage/processPool.py", line 33, in wrapper
return self.runExternally(func, *args, **kwds)
File "/usr/share/vdsm/storage/processPool.py", line 44, in runExternally
return self._procPool.runExternally(*args, **kwargs)
File "/usr/share/vdsm/storage/processPool.py", line 113, in runExternally
if not helper.pipe.poll(self.timeout):
IOError: [Errno 4] Interrupted system call
--
To view, visit http://gerrit.usersys.redhat.com/1051
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id1d0f35af9db6e237c87b00438b9ce3ded9faa8f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
12 years, 7 months
Change in vdsm[master]: BZ#744755 Don't wait for tasks on shutdown [EXTRA]
by Federico Simoncelli
Federico Simoncelli has posted comments on this change.
Change subject: BZ#744755 Don't wait for tasks on shutdown [EXTRA]
......................................................................
Patch Set 1:
During my tests change 1048 was enough to fix the issue but when I previously tested the fix with Dafna I also used the changes present in this patch (1049). If 1048 is not enough please squash in also these changes.
--
To view, visit http://gerrit.usersys.redhat.com/1049
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I53cf150f3812cf13b2afbf47dab9fb9bd560fa33
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Ayal Baron
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
12 years, 7 months
Change in vdsm[master]: BZ#744704 - Add rollback support for complex tasks
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: BZ#744704 - Add rollback support for complex tasks
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(5 inline comments)
....................................................
File vdsm/storage/blockVolume.py
Line 249: cls.log.warn("Cannot deactivate new created volume %s/%s", sdUUID, volUUID, exc_info=True)
Line 250:
Line 251: # Remove all previous rollbacks for 'halfbaked' volume and add rollback for 'real' volume creation
Line 252: vars.task.replaceRecoveries(task.Recovery("create block volume rollback", "blockVolume", "BlockVolume", "createVolumeRollback",
Line 253: [repoPath, sdUUID, imgUUID, volUUID, imageDir]), True)
seems like a good place to use python's named args..
I almost forgot what True means here.
Line 254: return volUUID
Line 255:
Line 256:
Line 257: def delete(self, postZero, force):
....................................................
File vdsm/storage/task.py
Line 73: FIELD_SEP = ","
Line 74: RESOURCE_SEP = "!"
Line 75: TASK_METADATA_VERSION = 1
Line 76:
Line 77: STUB_ROLLBACK = "stub rollback"
that's actually commony called "sentinel"
http://en.wikipedia.org/wiki/Sentinel_value
Line 78:
Line 79: class State:
Line 80: unknown = "unknown"
Line 81: init = "init"
Line 1047: self.recoveries.append(recovery)
Line 1048: self.persist()
Line 1049:
Line 1050:
Line 1051: def replaceRecoveries(self, recovery, singleTask=False):
Is there ANY need to keep the former semantic? Removing unrelated tasks feels wrong and misleading. Who needs it? Have him call another replaceAllRecoveries function.
Line 1052: if not isinstance(recovery, Recovery):
Line 1053: raise TypeError("recovery param %s(%s) must be Recovery object" % (repr(recovery), type(recovery)))
Line 1054: if not recovery.name:
Line 1055: raise ValueError("replaceRecoveries: name is required")
....................................................
File vdsm/storage/volume.py
Line 327: @classmethod
Line 328: def startCreateVolumeRollback(cls, taskObj, sdUUID, imgUUID, volUUID):
Line 329: cls.log.info("startCreateVolumeRollback: sdUUID=%s imgUUID=%s "\
Line 330: "volUUID=%s " % ( sdUUID, imgUUID, volUUID))
Line 331: # This rollback it's actually do nothing.
it's --> doesn't
Line 332: # In general the createVolume rollbacks are a list of small rollbacks
Line 333: # that replaced by the one major rollback at the end of the task.
Line 334: # This rollback is a simple marker that must to be the first rollback
Line 335: # in the list of createVolume rollbacks.
Line 329: cls.log.info("startCreateVolumeRollback: sdUUID=%s imgUUID=%s "\
Line 330: "volUUID=%s " % ( sdUUID, imgUUID, volUUID))
Line 331: # This rollback it's actually do nothing.
Line 332: # In general the createVolume rollbacks are a list of small rollbacks
Line 333: # that replaced by the one major rollback at the end of the task.
that replaced -> that are replaced
Line 334: # This rollback is a simple marker that must to be the first rollback
Line 335: # in the list of createVolume rollbacks.
Line 336: # We need it in cases when createVolume is a part of more complex task and
Line 337: # not a task by itself. In such cases when we will replace the list of
--
To view, visit http://gerrit.usersys.redhat.com/1041
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie36ac02475f3f6438a63fbcbd26730862216cebd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Igor Lvovsky <ilvovsky(a)redhat.com>
Gerrit-Reviewer: Ayal Baron
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
12 years, 7 months