ceph-volume util.encryption if crypt path does not exist, skip it

Signed-off-by: Alfredo Deza <adeza@redhat.com>
This commit is contained in:
Alfredo Deza 2018-08-13 15:41:46 -04:00
parent 549109c1de
commit 635f8e9e2e

View File

@ -96,6 +96,10 @@ def dmcrypt_close(mapping):
:param mapping:
"""
if not os.path.exists(mapping):
logger.debug('device mapper path does not exist %s' % mapping)
logger.debug('will skip cryptsetup removal')
return
process.run(['cryptsetup', 'remove', mapping])