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. 14
      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>

@ -1412,6 +1412,15 @@ sub configure_pacemaker
return_code => $return_code, return_code => $return_code,
}}); }});
if ($return_code) if ($return_code)
{
# See if this was because the fence method already existed.
if ($output =~ /already exists/)
{
# It already existed, we're fine.
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 }});
}
else
{ {
# Something went wrong. # Something went wrong.
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 0, priority => "err", key => "error_0138", variables => { $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 0, priority => "err", key => "error_0138", variables => {
@ -1423,11 +1432,14 @@ sub configure_pacemaker
sleep 2; sleep 2;
$anvil->nice_exit({exit_code => 6}); $anvil->nice_exit({exit_code => 6});
} }
}
else
{
$something_changed->{$node_name} = 1; $something_changed->{$node_name} = 1;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { "something_changed->{$node_name}" => $something_changed->{$node_name} }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { "something_changed->{$node_name}" => $something_changed->{$node_name} }});
} }
} }
}
### If we had a fence_ipmilan entry, add a 'fence_delay' entry, if needed. ### If we had a fence_ipmilan entry, add a 'fence_delay' entry, if needed.

Loading…
Cancel
Save