* 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 <mkelly@alteeve.ca>
main
digimer 2 years ago
parent 109aa1ba3d
commit 1c274ba58d
  1. 6
      Anvil/Tools/Words.pm
  2. 1
      tools/anvil-delete-server

@ -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. 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 =cut
sub clean_spaces 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()" }}); $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => $debug, key => "log_0125", variables => { method => "Words->clean_spaces()" }});
# Setup default values # 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; my $merge_spaces = defined $parameter->{merge_spaces} ? $parameter->{merge_spaces} : 1;
$string =~ s/^\s+//; $string =~ s/^\s+//;

@ -194,7 +194,6 @@ sub run_jobs
job_status => "failed", 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->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({ $anvil->Job->update_progress({

Loading…
Cancel
Save