storage: remove attempt counter from disk allocation thread

Remove the lookup counter from _progress_thread, it's not necessary, the
loop is terminated by _install_finished boolean.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1270277

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2015-11-19 14:48:25 +01:00
parent e68efe8103
commit 0ccbcd8883

View File

@ -809,25 +809,20 @@ class StorageVolume(_StorageObject):
"'%s': '%s'" % (self.name, str(e)))
def _progress_thread(self, meter):
lookup_attempts = 10
vol = None
if not meter:
return
while lookup_attempts > 0:
while True:
try:
if not vol:
vol = self.pool.storageVolLookupByName(self.name)
vol.info()
break
except:
lookup_attempts -= 1
time.sleep(.2)
if self._install_finished:
break
else:
continue
break
if vol is None:
logging.debug("Couldn't lookup storage volume in prog thread.")