Skip to content
Snippets Groups Projects
Commit 6c626518 authored by Iustin Pop's avatar Iustin Pop
Browse files

Block device creation cleanup

Currently when creation LVM-based instances, we always get the
extremely-confusing message "ERROR Can't find LV /dev/xenvg/..." which
is actually expected. This behaviour was introduced before we had
UUID-style LV names, since at that point it was not a unexpected to have
such volumes laying around after a failed creation.

Today, it's much more of an error to see existing volumes, and it's
better to abort with a failure. Since bdev.LogicalVolume.Create() method
will raise an error in case it exists, we can remove this check in
backend before creating the device.

The Create methods for DRBD and FileStorage currently don't raise
exception, as behaviour is not very well defined here.

We also change some exception types raised in bdev so that all
exceptions raised by device creation are a subclass of GenericError.

Reviewed-by: ultrotter
parent e6c1ff2f
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment