On Wed, Apr 3, 2013 at 10:47 AM, Klaus Aehlig <[email protected]> wrote: > _CreateDisk used to just throw an exception if _CreateBlockDev failed > leaving the caller in the state that some disks were created, without > precise knowledge which. Usually, the clean up then overapproximated > by removing all disks of the instance. This can cause data loss in case > the disk creation failed because of a file being already in the place > where the disk is to be created. > > With this patch, upon failure, _CreateDisk removes the disks that were > successfully created, leaving a well-defined state. > > Signed-off-by: Klaus Aehlig <[email protected]>
LGTM, although I wonder if this breaks the case when creating a disk fails after partially doing some work... Thanks, Guido
