Attempts to create an existing fence method no longer fails.

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 10 months ago
parent 04fe4c1bff
commit 27152845fd
  1. 1
      share/words.xml
  2. 36
      tools/anvil-join-anvil

@ -1761,6 +1761,7 @@ Note: This is a permanent action! If you protect this server again later, a full
<key name="job_0478">Preparing the new definition file</key> <key name="job_0478">Preparing the new definition file</key>
<key name="job_0479">The new definition is ready, saving it.</key> <key name="job_0479">The new definition is ready, saving it.</key>
<key name="job_0480">Running as a job, not prompting the user to confirm.</key> <key name="job_0480">Running as a job, not prompting the user to confirm.</key>
<key name="job_0481">The fence device: [#!variable!device!#] already exists.</key>
<!-- Log entries --> <!-- Log entries -->
<key name="log_0001">Starting: [#!variable!program!#].</key> <key name="log_0001">Starting: [#!variable!program!#].</key>

@ -1413,19 +1413,31 @@ sub configure_pacemaker
}}); }});
if ($return_code) if ($return_code)
{ {
# Something went wrong. # See if this was because the fence method already existed.
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 0, priority => "err", key => "error_0138", variables => { if ($output =~ /already exists/)
shell_call => $shell_call, {
output => $output, # It already existed, we're fine.
return_code => $return_code, update_progress($anvil, ($anvil->data->{job}{progress} += 2), "job_0481,!!device!".$stonith_name."!!");
}}); $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 1, key => "job_0120", variables => { device => $stonith_name }});
update_progress($anvil, 0, "error_0138,!!shell_call!".$shell_call."!!,!!output!".$output."!!,!!return_code!".$return_code."!!"); }
sleep 2; else
$anvil->nice_exit({exit_code => 6}); {
# Something went wrong.
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 0, priority => "err", key => "error_0138", variables => {
shell_call => $shell_call,
output => $output,
return_code => $return_code,
}});
update_progress($anvil, 0, "error_0138,!!shell_call!".$shell_call."!!,!!output!".$output."!!,!!return_code!".$return_code."!!");
sleep 2;
$anvil->nice_exit({exit_code => 6});
}
}
else
{
$something_changed->{$node_name} = 1;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { "something_changed->{$node_name}" => $something_changed->{$node_name} }});
} }
$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