xen-delete-image also needs at least one of --evms, --lvm, or --dir.
This led to strange error messages from xen-delete-image if an installation failed because they looked like coming from xen-create-image. xen-delete-image now explicitly states that the error was on the deletion of the image. not on its creation. (Closes: #513138)
This commit is contained in:
@@ -4345,9 +4345,24 @@ sub END
|
||||
$CONFIG{ 'verbose' } &&
|
||||
logprint("Removing failed install: $CONFIG{'hostname'}\n");
|
||||
|
||||
$CONFIG{ 'hostname' } &&
|
||||
system("xen-delete-image --hostname=$CONFIG{'hostname'}");
|
||||
if ($CONFIG{ 'hostname' }) {
|
||||
my $options = '';
|
||||
if ($CONFIG{ 'lvm' }) {
|
||||
$options = "--lvm=$CONFIG{'lvm'}"
|
||||
} elsif ($CONFIG{ 'evms' }) {
|
||||
$options = "--evms=$CONFIG{'evms'}"
|
||||
} elsif ($CONFIG{ 'dir' }) {
|
||||
$options = "--dir=$CONFIG{'dir'}"
|
||||
}
|
||||
|
||||
if ($options) {
|
||||
system('xen-delete-image', $options,
|
||||
"--hostname=$CONFIG{'hostname'}");
|
||||
} else {
|
||||
die "Assertion that either --dir, --lvm, or --dir are given".
|
||||
" failed.\nThis is probably a bug, please report it.";
|
||||
}
|
||||
}
|
||||
} elsif ( $FAIL == 0 ) {
|
||||
#
|
||||
# Assume success
|
||||
@@ -4373,4 +4388,3 @@ sub END
|
||||
logprint("\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -413,7 +413,7 @@ sub checkArguments
|
||||
#
|
||||
if ( $count != 1 )
|
||||
{
|
||||
print "Please select one and only one of the installation methods:\n";
|
||||
print "Please select one and only one of the installation methods to delete the DomU:\n";
|
||||
print " --dir\n";
|
||||
print " --evms\n";
|
||||
print " --lvm\n";
|
||||
|
||||
Reference in New Issue
Block a user