From 1c274ba58d88749493736edca36c833958104315 Mon Sep 17 00:00:00 2001 From: digimer Date: Mon, 3 Apr 2023 12:39:20 -0400 Subject: [PATCH] * Fixed a bug in anvil-delete-server that was preventing the complete deletion of a server if the DRBD resource had already been removed. Signed-off-by: digimer --- Anvil/Tools/Words.pm | 6 +++--- tools/anvil-delete-server | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Anvil/Tools/Words.pm b/Anvil/Tools/Words.pm index 4746e8e5..ff6fb0b8 100644 --- a/Anvil/Tools/Words.pm +++ b/Anvil/Tools/Words.pm @@ -192,9 +192,9 @@ Parameters; This sets the string to be cleaned. If it is not passed in, or if the string is empty, then an empty string will be returned without error. -=head3 merge_spaces (optional) +=head3 merge_spaces (optional, default 1) -This is a boolean value (0 or 1) that, if set, will merge multiple spaces into a single space. If not set, multiple spaces will be left as is. The default is '1'. +This is a boolean value (0 or 1) that, if set, will merge multiple spaces into a single space. If not set, multiple spaces will be left as is. =cut sub clean_spaces @@ -206,7 +206,7 @@ sub clean_spaces $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => $debug, key => "log_0125", variables => { method => "Words->clean_spaces()" }}); # Setup default values - my $string = defined $parameter->{string} ? $parameter->{string} : ""; + my $string = defined $parameter->{string} ? $parameter->{string} : ""; my $merge_spaces = defined $parameter->{merge_spaces} ? $parameter->{merge_spaces} : 1; $string =~ s/^\s+//; diff --git a/tools/anvil-delete-server b/tools/anvil-delete-server index 6b60bd8b..3dac3791 100755 --- a/tools/anvil-delete-server +++ b/tools/anvil-delete-server @@ -194,7 +194,6 @@ sub run_jobs job_status => "failed", }); $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 0, priority => 'err', key => "error_0228", variables => { resource => $server_name }}); - $anvil->nice_exit({exit_code => 1}); } $anvil->Job->update_progress({