* WIP; Started work on Cluster->check_server_constraints() that will track when a server's location constraint needs to be updated when the old preferred node is lost.

* Removed (for now) setting MTU in the ifcfg-X files during anvil-configure-host runs.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 4 years ago
parent e2788f438e
commit 5a343d6d75
  1. 24
      Anvil/Tools/Cluster.pm
  2. 6
      tools/anvil-configure-host

@ -19,6 +19,7 @@ my $THIS_FILE = "Cluster.pm";
# assemble_storage_groups # assemble_storage_groups
# boot_server # boot_server
# check_node_status # check_node_status
# check_server_constraints
# check_stonith_config # check_stonith_config
# delete_server # delete_server
# get_fence_methods # get_fence_methods
@ -750,6 +751,29 @@ sub check_node_status
} }
=head2 check_server_constraints
This method checks to see if the peer node is offline, and the local node is only. If this is the case, the location constraints for servers are checked to ensure that they favour the current host. If not, the location constraint is updated.
This is meant to be used to prevent servers from automatically migrating back to a node after it was fenced.
This method takes no parameters.
=cut
sub check_server_constraints
{
my $self = shift;
my $parameter = shift;
my $anvil = $self->parent;
my $debug = defined $parameter->{debug} ? $parameter->{debug} : 3;
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => $debug, key => "log_0125", variables => { method => "Cluster->check_server_constraints()" }});
return(0);
}
=head2 check_stonith_config =head2 check_stonith_config
This loads the running CIB and compares the fence (stonith) configuration against the records in the database. If a method needs to be updated, added or removed, this method will make those changes. As such, this method must be called on an active Anvil! node in order to work. This loads the running CIB and compares the fence (stonith) configuration against the records in the database. If a method needs to be updated, added or removed, this method will make those changes. As such, this method must be called on an active Anvil! node in order to work.

@ -678,7 +678,7 @@ sub reconfigure_network
$link1_config .= "IPV6INIT=\"no\"\n"; $link1_config .= "IPV6INIT=\"no\"\n";
$link1_config .= "ONBOOT=\"yes\"\n"; $link1_config .= "ONBOOT=\"yes\"\n";
$link1_config .= "USERCTL=\"no\"\n"; $link1_config .= "USERCTL=\"no\"\n";
$link1_config .= "MTU=\"1500\"\n"; # TODO: Make the MTU user-adjustable # $link1_config .= "MTU=\"1500\"\n"; # TODO: Make the MTU user-adjustable
$link1_config .= "NM_CONTROLLED=\"yes\"\n"; $link1_config .= "NM_CONTROLLED=\"yes\"\n";
$link1_config .= "SLAVE=\"yes\"\n"; $link1_config .= "SLAVE=\"yes\"\n";
$link1_config .= "MASTER=\"".$say_interface."_bond1\"\n"; $link1_config .= "MASTER=\"".$say_interface."_bond1\"\n";
@ -694,7 +694,7 @@ sub reconfigure_network
$link2_config .= "IPV6INIT=\"no\"\n"; $link2_config .= "IPV6INIT=\"no\"\n";
$link2_config .= "ONBOOT=\"yes\"\n"; $link2_config .= "ONBOOT=\"yes\"\n";
$link2_config .= "USERCTL=\"no\"\n"; $link2_config .= "USERCTL=\"no\"\n";
$link2_config .= "MTU=\"1500\"\n"; # TODO: Make the MTU user-adjustable # $link2_config .= "MTU=\"1500\"\n"; # TODO: Make the MTU user-adjustable
$link2_config .= "NM_CONTROLLED=\"yes\"\n"; $link2_config .= "NM_CONTROLLED=\"yes\"\n";
$link2_config .= "SLAVE=\"yes\"\n"; $link2_config .= "SLAVE=\"yes\"\n";
$link2_config .= "MASTER=\"".$say_interface."_bond1\"\n"; $link2_config .= "MASTER=\"".$say_interface."_bond1\"\n";
@ -1117,7 +1117,7 @@ sub reconfigure_network
} }
$link1_config .= "DEFROUTE=\"".$say_defroute."\"\n"; $link1_config .= "DEFROUTE=\"".$say_defroute."\"\n";
$link1_config .= "USERCTL=\"no\"\n"; $link1_config .= "USERCTL=\"no\"\n";
$link1_config .= "MTU=\"1500\"\n"; # TODO: Make the MTU user-adjustable # $link1_config .= "MTU=\"1500\"\n"; # TODO: Make the MTU user-adjustable
$link1_config .= "NM_CONTROLLED=\"yes\"\n"; $link1_config .= "NM_CONTROLLED=\"yes\"\n";
$link1_config .= "ZONE=\"".uc($say_interface)."\""; $link1_config .= "ZONE=\"".uc($say_interface)."\"";

Loading…
Cancel
Save