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
Loading
Please register or sign in to comment