mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-18 05:56:23 +00:00
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:
parent
6ad4be69ab
commit
195ae681ca
@ -379,7 +379,11 @@ sub is_any_mds_active {
|
|||||||
}
|
}
|
||||||
my $active_mds = $fs->[0]->{mdsmap}->{info};
|
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 {
|
sub create_mds {
|
||||||
|
Loading…
Reference in New Issue
Block a user