2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-07-29 15:51:18 +00:00

Extra checking

This commit is contained in:
Mark Gurevich
2017-03-10 16:15:14 -05:00
parent e265d5401d
commit 6a2164b6cb

View File

@@ -1777,6 +1777,7 @@ sub rmvm {
if ($disktype eq "cdrom") { next; }
my @driver = $disk->parentNode()->findnodes("driver");
unless ($driver[0]) { next; }
my $drivertype = $driver[0]->getAttribute("type");
if (($drivertype eq "raw") || ($disktype eq "block")) {
#For raw or block devices, do not remove, even if purge was specified. Log info message.
@@ -1784,6 +1785,7 @@ sub rmvm {
next;
}
my $file = $disk->getAttribute("file");
unless ($file) { next; }
# try to check the existence first, if cannot find, do nothing.
# we do retry because we found sometimes the delete might fail