@ -408,8 +408,24 @@ class CryptoBoxContainer:
if self . device . is_luks ( ) :
## luks devices need special care ...
if self . device . holders :
return cryptobox . core . blockdevice . get_blockdevice (
##Note: This is a hack for the CryptoNAS v0.3.5 release.
##There are undoubtedly latent bugs in the device-info
##cache implementation in CryptoNAS which are probably
##causing this. Since the format operation has already
##occurred by the time this exception gets triggered,
##it is safe to ignore in this limited case and when
##there is no possibility of a "Manual Format" operation
##occurring under CryptoNAS's control. Major changes/fixes
##to the device-info caching and block device handling
##code have already been made in the 0.4 code branch, so
##this is probably not worth investigating further here.
try :
theTypeId = cryptobox . core . blockdevice . get_blockdevice (
self . device . holders [ 0 ] ) . type_id
return theTypeId
except IndexError :
self . cbox . log . debug ( " CryptoNAS thinks the device %s does not exist. This is probably due to out of date device cache information right after a format operation. " % self . device . holders [ 0 ] )
return None
else :
## the encrypted container is not open
return None