mirror of https://github.com/schoebel/mars
marsadm: improve handover speed
This commit is contained in:
parent
7dca5b0364
commit
71a5cc71eb
|
@ -1079,6 +1079,7 @@ sub wait_cluster {
|
|||
my $abort = shift;
|
||||
$abort = $force unless defined($abort);
|
||||
my $old_timeout = $timeout;
|
||||
finish_links();
|
||||
my $start_time = mars_time();
|
||||
my %old_status = get_alive_links($res, "time", $hosts);
|
||||
_trigger($hosts =~ m/\*/ ? 3 : 2);
|
||||
|
@ -3549,6 +3550,10 @@ sub primary_phase1 {
|
|||
_primary_res($res, $new, $old);
|
||||
}
|
||||
|
||||
sub primary_phase1b {
|
||||
finish_links();
|
||||
}
|
||||
|
||||
# when necessary, wait
|
||||
sub primary_phase2 {
|
||||
my ($cmd, $res) = @_;
|
||||
|
@ -3571,6 +3576,10 @@ sub primary_phase3 {
|
|||
_primary_res($res, $new, $old);
|
||||
}
|
||||
|
||||
sub primary_phase3b {
|
||||
finish_links();
|
||||
}
|
||||
|
||||
# wait for device to appear / disappear
|
||||
sub primary_phase4 {
|
||||
my ($cmd, $res) = @_;
|
||||
|
@ -6281,10 +6290,14 @@ my %cmd_table =
|
|||
"wait for systemd",
|
||||
\&primary_phase1,
|
||||
"leave primary state",
|
||||
\&primary_phase1b,
|
||||
"trigger remote",
|
||||
\&primary_phase2,
|
||||
"wait when necessary",
|
||||
\&primary_phase3,
|
||||
"switch to primary",
|
||||
\&primary_phase3b,
|
||||
"trigger remote",
|
||||
\&primary_phase4,
|
||||
"wait for device",
|
||||
],
|
||||
|
@ -6306,6 +6319,8 @@ my %cmd_table =
|
|||
"check preconditions",
|
||||
\&primary_phase1,
|
||||
"leave primary state",
|
||||
\&primary_phase1b,
|
||||
"trigger remote",
|
||||
\&primary_phase4,
|
||||
"wait for effect",
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue