1
0
mirror of synced 2026-02-05 15:34:51 +00:00

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:
Axel Beckert
2010-08-03 17:19:24 +02:00
parent 1ee85ef493
commit 1df7ef41da
2 changed files with 18 additions and 4 deletions

View File

@@ -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");
}
}

View File

@@ -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";