No longer fail is fence method exists already when trying to create it.

* Also fixed a string insertion variable typo

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 9 months ago
parent 12bb45aa37
commit 60759cd9aa
  1. 5
      share/words.xml
  2. 12
      tools/anvil-join-anvil

@ -203,8 +203,8 @@ The error was:
<key name="error_0134">Failed to start the daemon: [#!variable!daemon!#] on the local system, unable to boot the server.</key>
<key name="error_0135">Failed to start the daemon: [#!variable!daemon!#] on [#!variable!host!#], unable to boot the server.</key>
<key name="error_0136">System->test_ipmi() was called with an invalid 'lanplus' parameter. It must be 'yes', 'no', 'yes-no' or 'no-yes'. Received: [#!variable!lanplus!#].</key>
<key name="error_0137">All attempts to change the IPMI user: [#!variable!user_name!#] (number: [#!variable!user_number!#] failed. The last try's output (if any) was: [#!variable!output!#] (return code: [#!variable!return code!#]).</key>
<key name="error_0138">The system call: [#!variable!shell_call!#] failed with the return code: [#!variable!return code!#]. The output (if any) was;
<key name="error_0137">All attempts to change the IPMI user: [#!variable!user_name!#] (number: [#!variable!user_number!#] failed. The last try's output (if any) was: [#!variable!output!#] (return code: [#!variable!return_code!#]).</key>
<key name="error_0138">The system call: [#!variable!shell_call!#] failed with the return code: [#!variable!return_code!#]. The output (if any) was;
====
#!variable!output!#
====</key>
@ -4191,6 +4191,7 @@ We will try to proceed anyway.</key>
<key name="warning_0171">[ Warning ] - The daemon: [#!variable!daemon!#] appears to have failed! Attempting to restart it now.</key>
<key name="warning_0172">[ Warning ] - The line: [#!variable!line!#] that was going to be added to the hosts file is invalid, removing it.</key>
<key name="warning_0173">[ Warning ] - Failed to convert: [#!variable!source_file!#] to: [#!variable!new_file!#] (format: [#!variable!format!#]! Return code was: [#!variable!return_code!#], expected '0'.</key>
<key name="warning_0174">[ Warning ] - The fence method: [#!variable!method!#] already existed, proceeding.</key>
</language>
<!-- 日本語 -->

@ -989,7 +989,7 @@ sub configure_pacemaker
pcs_add_command => $pcs_add_command =~ /passw/ ? $anvil->Log->is_secure($pcs_add_command) : $pcs_add_command,
}});
# If there's an entry in the CIB, so if it's different somehow
# If there's an entry in the CIB, see if it's different somehow
if (exists $anvil->data->{cib}{parsed}{data}{node}{$node_name}{fencing}{device}{$ipmi_stonith_name})
{
foreach my $argument (sort {$a cmp $b} keys %{$anvil->data->{cib}{parsed}{data}{node}{$node_name}{fencing}{device}{$ipmi_stonith_name}{argument}})
@ -1114,6 +1114,15 @@ sub configure_pacemaker
return_code => $return_code,
}});
if ($return_code)
{
# If this is because the method already exists, ignore the error.
if ($output =~ /already exists/i)
{
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 1, priority => "alert", key => "warning_0174", variables => {
method => $ipmi_stonith_name,
}});
}
else
{
# Something went wrong.
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 0, priority => "err", key => "error_0138", variables => {
@ -1125,6 +1134,7 @@ sub configure_pacemaker
sleep 2;
$anvil->nice_exit({exit_code => 6});
}
}
$something_changed->{$node_name} = 1;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { "something_changed->{$node_name}" => $something_changed->{$node_name} }});

Loading…
Cancel
Save