Change in vdsm[master]: Dont sample domain stat function during comunication errors
ybronhei at redhat.com
ybronhei at redhat.com
Mon Oct 1 18:51:31 UTC 2012
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Dont sample domain stat function during comunication errors
......................................................................
Dont sample domain stat function during comunication errors
when realProduce function is failed we sign sdAlive boolean to false,
stat sample function should check this variable before run the tests
Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=853725
Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
Change-Id: I1d5b28c5d8ecc0a80f1f5d2e69ee591ebb5bf30b
---
M vdsm/libvirtvm.py
M vdsm/storage/hsm.py
M vdsm/storage/sdc.py
3 files changed, 17 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/88/8288/1
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
index 557c1ed..ebadf5b 100644
--- a/vdsm/libvirtvm.py
+++ b/vdsm/libvirtvm.py
@@ -97,7 +97,8 @@
self.sampleDisk, self.sampleDiskLatency, self.sampleNet)
def _highWrite(self):
- if not self._vm._volumesPrepared:
+ if not self._vm._volumesPrepared and \
+ not self._vm.cifs.irs.isSdAlive():
# Avoid queries from storage during recovery process
return
@@ -113,7 +114,8 @@
self._vm._onHighWrite(vmDrive.name, alloc)
def _updateVolumes(self):
- if not self._vm._volumesPrepared:
+ if not self._vm._volumesPrepared and \
+ not self._vm.cifs.irs.isSdAlive():
# Avoid queries from storage during recovery process
return
@@ -133,7 +135,8 @@
return cpuTime / 1000 ** 3
def _sampleDisk(self):
- if not self._vm._volumesPrepared:
+ if not self._vm._volumesPrepared and \
+ not self._vm.cifs.irs.isSdAlive():
# Avoid queries from storage during recovery process
return
@@ -144,7 +147,8 @@
return diskSamples
def _sampleDiskLatency(self):
- if not self._vm._volumesPrepared:
+ if not self._vm._volumesPrepared and \
+ not self._vm.cifs.irs.isSdAlive():
# Avoid queries from storage during recovery process
return
#{'wr_total_times': 0L, 'rd_operations': 9638L,
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 50d6ce1..daabef4 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -192,6 +192,10 @@
pools = {}
log = logging.getLogger('Storage.HSM')
+ @public
+ def isSdAlive(cls, sdUUID):
+ return sdCache.produce(sdUUID=sdUUID).adAlive
+
@classmethod
def validateSdUUID(cls, sdUUID):
"""
diff --git a/vdsm/storage/sdc.py b/vdsm/storage/sdc.py
index 90ccc35..ecd6fc7 100644
--- a/vdsm/storage/sdc.py
+++ b/vdsm/storage/sdc.py
@@ -64,6 +64,7 @@
self.__domainCache = {}
self.storage_repo = storage_repo
self.storageStale = True
+ self.sdAlive = True
def invalidateStorage(self):
self.storageStale = True
@@ -137,10 +138,13 @@
# this changes, please update the order.
for mod in (blockSD, localFsSD, nfsSD):
try:
- return mod.findDomain(sdUUID)
+ dom = mod.findDomain(sdUUID)
+ self.sdAlive = True
+ return dom
except se.StorageDomainDoesNotExist:
pass
except Exception:
+ self.sdAlive = False
self.log.error("Error while looking for domain `%s`", sdUUID,
exc_info=True)
--
To view, visit http://gerrit.ovirt.org/8288
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d5b28c5d8ecc0a80f1f5d2e69ee591ebb5bf30b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
More information about the vdsm-patches
mailing list