From 65246bdc017bf2753f3de573cbb0be8e2af704b6 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Fri, 17 Jun 2016 10:35:03 -0400 Subject: [PATCH] Ignore 'File exists' error from storage pool build --- xCAT-server/lib/xcat/plugins/kvm.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index 90fe46524..5c0aee544 100755 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -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 $@; } }