Skip to content

Commit

Permalink
fix(middleawared/pool); do not skip importing a pool on first error
Browse files Browse the repository at this point in the history
Ticket:	NAS-101710
  • Loading branch information
william-gr committed May 10, 2019
1 parent b872271 commit 371f2e2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/middlewared/middlewared/plugins/pool.py
Expand Up @@ -2335,11 +2335,11 @@ def import_on_boot(self, job):
'altroot': '/mnt',
'cachefile': 'none',
}, True, zpool_cache_saved if os.path.exists(zpool_cache_saved) else None)
except Exception as e:
# If the pool exists but failed to import skip this one
if not isinstance(e, CallError) or e.errno != errno.ENOENT:
self.logger.error('Failed to import %s', pool['name'], exc_info=True)
continue
except Exception:
# Importing a pool may fail because of out of date guid database entry
# or because bad cachefile. Try again using the pool name and wihout
# the cachefile
self.logger.error('Failed to import %s', pool['name'], exc_info=True)
else:
imported = True
if not imported:
Expand Down

0 comments on commit 371f2e2

Please sign in to comment.