Bug 12007 - OVM - Addition of OVM host fails - NPE (edit)

skip scanning stopped VMs on primary storage if it is not existing, because first time fullsync() called the
primary storage has not been mounted

status 12007: resolved fixed

reviewed-by: edison
This commit is contained in:
frank 2011-11-14 10:22:48 -08:00
parent 04e5c842f8
commit 7c231c98f6
1 changed files with 4 additions and 0 deletions

View File

@ -183,6 +183,10 @@ class OvmHost(OvmObject):
mps = OvmStoragePool()._getAllMountPoints()
for mountPoint in mps:
runningPool = join(mountPoint, 'running_pool')
if not exists(runningPool):
logger.debug(OvmHost.getAllVms,, "Primary storage %s not existing, skip it. this should be first getAllVms() called from Ovm resource configure"%runningPool)
continue
for dir in os.listdir(runningPool):
vmDir = join(runningPool, dir)
if not isMyVmDirLink(vmDir):