[NEW PATCH] [WIP] BZ#719330 - No need to spew unmounted masters to the log. (via gerrit-bot)
by smizrahi@redhat.com
New patch submitted by Saggi Mizrahi (smizrahi(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/683
commit d334c99c34d3a922a89ff75280e927235b0984db
Author: Saggi Mizrahi <smizrahi(a)redhat.com>
Date: Mon Jul 11 12:15:48 2011 +0300
[WIP] BZ#719330 - No need to spew unmounted masters to the log.
Change-Id: Ib0044075f10171bd37613e17b46b28cd7e81dff7
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index b0d5d21..623b09f 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -607,7 +607,7 @@ class HSM:
for sdUUID in domList:
vars.task.getExclusiveLock(STORAGE, sdUUID)
- self.spm.detachAllDomains(pool)
+ self.spm.destroyPool(pool)
return self._disconnectPool(pool, hostID, scsiKey, remove=True)
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 8aed3e6..e9f5c90 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -595,31 +595,11 @@ class StoragePool:
self.log.error("Unexpected error", exc_info=True)
- def __unmountLastMaster(self, sdUUID):
- curmsd = SDF.produce(sdUUID)
- # Check if it's last domain and allow it detaching
- dl = self.getDomains(activeOnly=True)
- domList = dl.keys()
- if curmsd.sdUUID in domList:
- domList.remove(curmsd.sdUUID)
- for item in domList:
- domain = SDF.produce(item)
- if domain.isData():
- # Failure, we have at least one more data domain
- # in the pool and one which can become 'master'
- raise se.StoragePoolHasPotentialMaster(item)
- curmsd.unmountMaster()
-
def masterMigrate(self, sdUUID, msdUUID, masterVersion):
self.log.info("sdUUID=%s spUUID=%s msdUUID=%s", sdUUID, self.spUUID, msdUUID)
- # Check if we are migrating to or just unmounting last master
- if msdUUID != sd.BLANK_UUID:
- self.__masterMigrate(sdUUID, msdUUID, masterVersion)
- return False # not last master
-
- self.__unmountLastMaster(sdUUID)
- return True # last master
+ self.__masterMigrate(sdUUID, msdUUID, masterVersion)
+ return False # not last master
def attachSD(self, sdUUID):
"""
@@ -651,6 +631,21 @@ class StoragePool:
dom.releaseClusterLock()
self.updateMonitoringThreads()
+ def destroy(self):
+ curmsd = self.getMasterDomain()
+ # Check if there is only 1 domain and allow it detaching
+ domList = self.getDomains()
+ if len(domList) > 1:
+ raise se.StoragePoolDestroyingError()
+
+ with self._metadata.transaction():
+ spUUID = self.spUUID
+ self._metadata[PMDK_DOMAINS] = {}
+ self._metadata[PMDK_MASTER_VER] = 0
+ curmsd.detachSD(spUUID)
+
+ curmsd.unmountMaster()
+
def forcedDetachSD(self, sdUUID):
self.log.warn("Force detaching domain `%s`", sdUUID)
diff --git a/vdsm/storage/spm.py b/vdsm/storage/spm.py
index b186d39..a80d03b 100644
--- a/vdsm/storage/spm.py
+++ b/vdsm/storage/spm.py
@@ -201,8 +201,6 @@ class SPM:
blockSD.BlockStorageDomain.doUnmountMaster(master)
except se.StorageDomainMasterUnmountError, e:
misc.panic("unmount %s failed - %s" % (master, e))
- else:
- cls.log.debug("master `%s` is not mounted, skipping", master)
@classmethod
def __cleanupSPMLinks(cls):
@@ -1070,7 +1068,7 @@ class SPM:
pool.detachSD(sdUUID, msdUUID, masterVersion)
- def detachAllDomains(self, pool):
+ def destroyPool(self, pool):
"""
Detach all domains from pool before destroying pool
"""
@@ -1086,7 +1084,8 @@ class SPM:
pool.detachSD(sdUUID=sdUUID, msdUUID=sd.BLANK_UUID, masterVersion=0)
self._stop(pool.spUUID)
# Forced detach 'master' domain after stopping SPM
- pool.detachSD(mDom.sdUUID, sd.BLANK_UUID, 0)
+ pool.destroy()
+ return True # last master
def public_attachStorageDomain(self, sdUUID, spUUID, options = None):
12 years, 11 months
[NEW PATCH] BZ#720425 - No longer using the return value from wait, because there is None. (via gerrit-bot)
by erez@redhat.com
New patch submitted by Erez Sh (erez(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/684
commit b4b7c5efc10d4c0702523c69d4ac54ffba2d87b1
Author: Erez Sh <erez(a)redhat.com>
Date: Mon Jul 11 18:30:48 2011 +0300
BZ#720425 - No longer using the return value from wait, because there is None.
Change-Id: I1f6f22fb4e047dc24335eeef7664c33e1076eb02
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
index 0516c3b..89330c4 100644
--- a/vdsm/libvirtvm.py
+++ b/vdsm/libvirtvm.py
@@ -214,7 +214,8 @@ class MigrationMonitorThread(threading.Thread):
def run(self):
self._vm.log.debug('starting migration monitor thread')
- while not self._stop.wait(self._MIGRATION_MONITOR_INTERVAL):
+ while not self._stop.isSet():
+ self._stop.wait(self._MIGRATION_MONITOR_INTERVAL)
jobType, timeElapsed, _, \
dataTotal, dataProcessed, _, \
memTotal, memProcessed, _, \
12 years, 11 months
Change in vdsm[master]: BZ#720425 - No longer using the return value from wait, beca...
by erez@redhat.com
Erez Sh has posted comments on this change.
Change subject: BZ#720425 - No longer using the return value from wait, because there is None.
......................................................................
Patch Set 1: Verified
Ran migration tests and it worked
--
To view, visit http://gerrit.usersys/684
To unsubscribe, visit http://gerrit.usersys/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1f6f22fb4e047dc24335eeef7664c33e1076eb02
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Erez Sh <erez(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Erez Sh <erez(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
12 years, 11 months
[NEW PATCH] BZ#719857 - Add reboot message to certificate reject (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/715
commit 50f18d38e1ab7106def66a82147bd7590e8a5e70
Author: Yotam Oron <yoron(a)redhat.com>
Date: Sun Jul 17 12:07:54 2011 +0300
BZ#719857 - Add reboot message to certificate reject
When the user rejects the certificate's fingerprint, the host will reboot -
added a message about that.
Change-Id: I6b8a60eeb56e12627e1ad3213d453a7dfb03de0d
diff --git a/vdsm_reg/rhevm.py b/vdsm_reg/rhevm.py
index 5ff8be6..d32c639 100755
--- a/vdsm_reg/rhevm.py
+++ b/vdsm_reg/rhevm.py
@@ -143,8 +143,9 @@ class Plugin(PluginBase):
if deployUtil.getRhevmCert(self.rhevm_server.value(), self.rhevm_server_port.value()):
path, dontCare = deployUtil.certPaths('')
fp = deployUtil.generateFingerPrint(path)
- approval = ButtonChoiceWindow(self.ncs.screen, \
- "Certificate Fingerprint:", fp, buttons = ['Approve', 'Reject'])
+ approval = ButtonChoiceWindow(self.ncs.screen,
+ "Certificate Fingerprint (Rejecting the finrgerprint will reboot the host):",
+ fp, buttons = ['Approve', 'Reject'])
if 'reject' == approval:
out, err, rc = deployUtil._logExec(['/sbin/reboot'])
if rc is not 0:
12 years, 11 months
[NEW PATCH] Related to BZ#713173 - Add killProc rollback to deleteImage (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/707
commit ee4f07f9ed34f6db2aacdbc2678b4f20900ad761
Author: Igor Lvovsky <ilvovsky(a)redhat.com>
Date: Tue Jul 12 16:54:31 2011 +0300
Related to BZ#713173 - Add killProc rollback to deleteImage
Change-Id: I1407626ab06583f5507f3aaa8ebf2a4e4edd60f9
diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py
index 3da76fa..6b04047 100644
--- a/vdsm/storage/blockVolume.py
+++ b/vdsm/storage/blockVolume.py
@@ -261,7 +261,8 @@ class BlockVolume(volume.Volume):
# wipe out the whole volume
idle = config.getfloat('irs', 'idle')
try:
- misc.ddWatchCopy("/dev/zero", vol_path, vars.task.aborting, idle, int(size))
+ misc.ddWatchCopy("/dev/zero", vol_path, vars.task.aborting, idle, int(size),
+ recoveryCallback=volume.baseAsyncTasksRollback)
except se.ActionStopped, e:
raise e
except Exception, e:
12 years, 11 months
[NEW PATCH] Related to BZ#719255 - Release lock if prepare volume failed (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/709
commit bb1cba217e45a05dedcdc689611842b4b64be607
Author: Igor Lvovsky <ilvovsky(a)redhat.com>
Date: Thu Jul 14 15:14:47 2011 +0300
Related to BZ#719255 - Release lock if prepare volume failed
Change-Id: I0eeeda07037824bb822b8d0d1fff869959bdfefc
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index b0d5d21..ccf93d5 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -1671,8 +1671,8 @@ class HSM:
vol.refreshVolume()
vol.prepare(rw=rw)
except:
- imgResource.autoRelease = True
self.log.error("Prepare volume %s in domain %s failed", volUUID, sdUUID, exc_info=True)
+ rmanager.releaseResource(imageResourcesNamespace, imgUUID)
raise
12 years, 11 months
[NEW PATCH] BZ#720670 vdsm-reg: rotate correct log file (via gerrit-bot)
by Dan Kenigsberg
New patch submitted by Dan Kenigsberg (danken(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/694
commit b033abf7a59837d2e15d191049b0f6a23dc716cc
Author: Robert Munilla <rmunilla(a)redhat.com>
Date: Tue Jul 12 16:58:03 2011 +0300
BZ#720670 vdsm-reg: rotate correct log file
Change-Id: Ic950727ba692317be5172053e5e62d01805b7ecd
diff --git a/vdsm_reg/vdsm-reg-logrotate.conf b/vdsm_reg/vdsm-reg-logrotate.conf
index 45572d7..3b590dd 100644
--- a/vdsm_reg/vdsm-reg-logrotate.conf
+++ b/vdsm_reg/vdsm-reg-logrotate.conf
@@ -4,7 +4,7 @@
maxage 30
}
-/var/log/vdsm-reg/vds-reg.log {
+/var/log/vdsm-reg/vdsm-reg.log {
rotate 3
missingok
size=10M
12 years, 11 months
[NEW PATCH] BZ#717847 - Postpone VM's periodic tasks until all volumes will prepared (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/697
commit 7c44b0af0303d7a4876091cc5bfc9783dbcb5ecb
Author: Igor Lvovsky <ilvovsky(a)redhat.com>
Date: Wed Jul 13 15:14:19 2011 +0300
BZ#717847 - Postpone VM's periodic tasks until all volumes will prepared
Change-Id: I9424087c3c9ef06a4a88921dc8ca14e890b7a44f
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
index 40567a5..79da4b2 100644
--- a/vdsm/libvirtvm.py
+++ b/vdsm/libvirtvm.py
@@ -55,6 +55,10 @@ class VmStatsThread(utils.AdvancedStatsThread):
if self._vm._incomingMigrationPending():
return
+ if not self._vm._volumesPrepared:
+ # Avoid queries from storage during recovery process
+ return
+
for vmDrive in self._vm._drives:
if vmDrive.blockDev and vmDrive.format == 'cow':
capacity, alloc, physical = \
@@ -66,7 +70,7 @@ class VmStatsThread(utils.AdvancedStatsThread):
self._vm._onHighWrite(vmDrive.name, alloc)
def _updateVolumes(self):
- if not self._vm.cif.irs.getConnectedStoragePoolsList()['poollist']:
+ if not self._vm._volumesPrepared:
# Avoid queries from storage during recovery process
return
@@ -82,6 +86,10 @@ class VmStatsThread(utils.AdvancedStatsThread):
return cpuTime / 1000**3
def _sampleDisk(self):
+ if not self._vm._volumesPrepared:
+ # Avoid queries from storage during recovery process
+ return
+
diskSamples = {}
for vmDrive in self._vm._drives:
diskSamples[vmDrive.name] = self._vm._dom.blockStats(vmDrive.name)
diff --git a/vdsm/vm.py b/vdsm/vm.py
index ecc8e70..5b30b1e 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -300,6 +300,7 @@ class Vm(object):
self.conf.pop('elapsedTimeOffset', 0))
self._cdromPreparedPath = ''
self._floppyPreparedPath = ''
+ self._volumesPrepared = False
self._pathsPreparedEvent = threading.Event()
self.saveState()
@@ -418,6 +419,8 @@ class Vm(object):
def preparePaths(self):
for drive in self.conf.get('drives', []):
drive['path'] = self._prepareVolumePath(drive)
+ # Now we got all needed locks
+ self._volumesPrepared = True
try:
self._cdromPreparedPath = self._prepareVolumePath(
12 years, 11 months
[NEW PATCH] BZ#720919 spmprotect.sh: remove log noise (via gerrit-bot)
by Dan Kenigsberg
New patch submitted by Dan Kenigsberg (danken(a)redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/696
commit cfcabd3b7bba2d6513b65216017828f326f2f660
Author: Dan Kenigsberg <danken(a)redhat.com>
Date: Wed Jul 13 14:23:45 2011 +0300
BZ#720919 spmprotect.sh: remove log noise
check_renew may have been called after fence or release have removed
RENEWDIR. We should not print nonsense to the log in that case.
Change-Id: I7ce575b863fcbdf6b0bf35747a23882a53ae1a39
diff --git a/vdsm/storage/protect/spmprotect.sh b/vdsm/storage/protect/spmprotect.sh
index 3548b17..f476446 100755
--- a/vdsm/storage/protect/spmprotect.sh
+++ b/vdsm/storage/protect/spmprotect.sh
@@ -135,7 +135,7 @@ function check_renew() {
res=0
fi
fi
- if pushd "$RENEWDIR" > /dev/null; then
+ if pushd "$RENEWDIR" > /dev/null 2>&1 ; then
rm -f $list
popd > /dev/null
fi
12 years, 11 months