diff options
author | Rich Megginson <rmeggins@redhat.com> | 2010-07-22 13:20:21 -0600 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2010-07-22 14:51:09 -0600 |
commit | 7de9007936a790625258967bfb959bc5989d25f2 (patch) | |
tree | 8ecdedde9a9bae61c90de6841b97c779358f3a42 | |
parent | 472a2c0f2f21205390ba87c31c498b4419a932ba (diff) | |
download | ds-Directory_Server_8_2_Candidate_20100722.tar.gz ds-Directory_Server_8_2_Candidate_20100722.tar.xz ds-Directory_Server_8_2_Candidate_20100722.zip |
Bug 617013 - repl-monitor.pl use cpu upto 90%Directory_Server_8_2_Candidate_20100722
https://bugzilla.redhat.com/show_bug.cgi?id=617013
Resolves: bug 617013
Bug Description: repl-monitor.pl use cpu upto 90%
Reviewed by: nhosoi (Thanks!)
Branch: Directory_Server_8_2_Branch
Fix Description: The script recursively looks for servers - looks at servers
in replication agreements, adds them, then looks for replication agreements
on those servers, etc. When it added the servers, the logic was faulty for
seeing if the server was already in the list. So it just kept recursing
forever. One of the problems was that the script did not like a hostname
with a non \w char in it, such as the "-" char. There was another problem
with matching a server without a shadowport.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
-rwxr-xr-x | ldap/admin/src/scripts/repl-monitor.pl.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ldap/admin/src/scripts/repl-monitor.pl.in b/ldap/admin/src/scripts/repl-monitor.pl.in index 4ae9bf4b..b8e6d2db 100755 --- a/ldap/admin/src/scripts/repl-monitor.pl.in +++ b/ldap/admin/src/scripts/repl-monitor.pl.in @@ -783,7 +783,7 @@ sub add_server # Remove the domain name from the host name my ($hostnode) = $host; - $hostnode = $1 if $host =~ /^(\w+)\./; + $hostnode = $1 if $host =~ /^(.+?)\./; # new host:port if ($binddn eq "" || $bindpwd eq "" && $bindcert eq "") { @@ -819,6 +819,7 @@ sub add_server for ($i = 0; $i <= $#servers; $i++) { return $i if ($servers[$i] =~ /$hostnode($domainpattern)*:\d*=$shadowport\D/i); + return $i if ($servers[$i] =~ /$hostnode($domainpattern)*:$port\D/i); } if ($shadowport) { |