is_any_mds_active: check if state is correct

a MDS gets transferred to the active MDS info once it got selected as
active, not once it really _is_ active, it can be there in the
'up:creating' state. So ensure that a MDS with 'u:active' could be
found

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2018-11-26 16:52:05 +01:00
parent 6ad4be69ab
commit 195ae681ca

View File

@ -379,7 +379,11 @@ sub is_any_mds_active {
}
my $active_mds = $fs->[0]->{mdsmap}->{info};
return scalar(keys %$active_mds) > 0;
for my $mds (values %$active_mds) {
return 1 if $mds->{state} eq 'up:active';
}
return 0;
}
sub create_mds {