Exemplo n.º 1
0
 def remove_volume_on_error(self, path):
     try:
         yield
     except Exception:
         with excutils.save_and_reraise_exception():
             if self.ephemeral_key_uuid is None:
                 lvm.remove_volumes([path])
             else:
                 dmcrypt.delete_volume(path.rpartition('/')[2])
                 lvm.remove_volumes([self.lv_path])
Exemplo n.º 2
0
 def remove_volume_on_error(self, path):
     try:
         yield
     except Exception:
         with excutils.save_and_reraise_exception():
             if self.ephemeral_key_uuid is None:
                 lvm.remove_volumes([path])
             else:
                 dmcrypt.delete_volume(path.rpartition('/')[2])
                 lvm.remove_volumes([self.lv_path])
Exemplo n.º 3
0
 def remove_volume_on_error(self, path):
     try:
         yield
     except Exception:
         with excutils.save_and_reraise_exception():
             lvm.remove_volumes(path)
Exemplo n.º 4
0
 def remove_volume_on_error(self, path):
     try:
         yield
     except Exception:
         with excutils.save_and_reraise_exception():
             lvm.remove_volumes(path)