def validate(self): """ Validate that the storage domain metadata """ self.log.info("sdUUID=%s", self.sdUUID) lvm.chkVG(self.sdUUID) self.invalidateMetadata() if not len(self.getMetadata()): raise se.StorageDomainAccessError(self.sdUUID)
def selftest(self): """ Run the underlying VG validation routine """ timeout = config.getint("irs", "repo_stats_cache_refresh_timeout") now = time.time() if now - self._lastUncachedSelftest > timeout: self._lastUncachedSelftest = now lvm.chkVG(self.sdUUID) elif lvm.getVG(self.sdUUID).partial != lvm.VG_OK: raise se.StorageDomainAccessError(self.sdUUID)