I agree that the volume deletion should not be blocked if the key does not exist, but I think it is proper logic for Castellan to throw an error if the user requests to delete a key with an invalid uuid.
Looking at the cinder code [1], it seems that the exception thrown by the key manager is actually caught correctly, but the *actual* error that is blocking volume deletion is thrown when the warning message is formatted.
***You should be able to resolve this bug if you change e.msg to e.message [2].***
Related bug report for why the uuid of all-zeroes was being requested in the first place: https:/ /bugs.launchpad .net/cinder/ +bug/1621109
It should be fixed in master, but the backport for stable/newton is still outstanding: https:/ /review. openstack. org/#/c/ 376992/
I agree that the volume deletion should not be blocked if the key does not exist, but I think it is proper logic for Castellan to throw an error if the user requests to delete a key with an invalid uuid.
Looking at the cinder code [1], it seems that the exception thrown by the key manager is actually caught correctly, but the *actual* error that is blocking volume deletion is thrown when the warning message is formatted.
***You should be able to resolve this bug if you change e.msg to e.message [2].***
1. https:/ /github. com/openstack/ cinder/ blob/d4cde0393d 1d84a58d9a247c2 36d303cf24d66d8 /cinder/ volume/ api.py# L453-L458
2. https:/ /github. com/openstack/ cinder/ blob/d4cde0393d 1d84a58d9a247c2 36d303cf24d66d8 /cinder/ volume/ api.py# L458