mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-21 10:40:24 +00:00
Ignore 'File exists' error from storage pool build
This commit is contained in:
@@ -234,7 +234,10 @@ sub get_storage_pool_by_url {
|
||||
eval { $poolobj->build(); };
|
||||
if ($@) {
|
||||
my $error = $@;
|
||||
unless ($error =~ /vgcreate.*exit status 3/ or $error =~ /pvcreate.*exit status 5/) {
|
||||
# Some errors from building storage pool object are safe to ignore.
|
||||
# For example, "File exists" is returned when a directory location for storage pool is already there.
|
||||
# The storage pool still gets built, and the next statement to create storage pool will work.
|
||||
unless ($error =~ /vgcreate.*exit status 3/ or $error =~ /pvcreate.*exit status 5/ or $error =~ /File exists/) {
|
||||
die $@;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user