marsadm: fix superfluous peer set

This commit is contained in:
Thomas Schoebel-Theuer 2019-02-06 14:18:56 +01:00
parent 6ad7af5224
commit f8d64c6cc6
1 changed files with 9 additions and 0 deletions

View File

@ -763,6 +763,15 @@ sub get_alive_links {
# peer must be participating in the same resources # peer must be participating in the same resources
my @other = glob("$mars/resource-$res/data-$peer"); my @other = glob("$mars/resource-$res/data-$peer");
next unless @other; next unless @other;
# I must be participating in some of the _same_ resources
my $common = 0;
foreach my $check (@other) {
my $self = `dirname $check`;
chomp $self;
$self .= "/data-$host";
$common++ if -e $self;
}
next unless $common;
# OK: remember peer # OK: remember peer
$peers{$peer} = 1; $peers{$peer} = 1;
} }