ldap/admin man/man1
by Mark Reynolds
ldap/admin/src/scripts/repl-monitor.pl.in | 52 ++++++++++++++++----------
man/man1/repl-monitor.1 | 58 +++++++++++++++++++++++++++---
2 files changed, 86 insertions(+), 24 deletions(-)
New commits:
commit 34c929353280b93eebe214f1c21f5b788aff1c39
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jun 28 15:41:42 2016 -0400
Ticket 47538 - Fix repl-monitor color and lag times
Bug Description: Colors do not match the legend, and when the supplier or
consumer max csns are not available, the lag time is displayed
incorrectly.
Fix Description: The color hash table needed to be sorted before processing,
and we were not properly detecting the "Unavailable" state of
a replica which lead to the odd lag times. Also added the
string "Unavailable" for uninitialized values which allowed
for a cleaner report when replicas are offline.
Updated the man page as well.
https://fedorahosted.org/389/ticket/47538
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/admin/src/scripts/repl-monitor.pl.in b/ldap/admin/src/scripts/repl-monitor.pl.in
index 0247f24..248cf8b 100755
--- a/ldap/admin/src/scripts/repl-monitor.pl.in
+++ b/ldap/admin/src/scripts/repl-monitor.pl.in
@@ -596,7 +596,7 @@ sub process_suppliers
# Skip replicas without agreements defined yet
next if (! grep {$_->{ridx} == $ridx} @allagreements);
$maxcsn = &print_master_header ($ridx, $mid);
- if ( "$maxcsn" ne "none" ) {
+ if ( "$maxcsn" ne "Unavailable" ) {
&print_consumer_header ();
&print_consumers ($ridx, $mid);
}
@@ -754,12 +754,12 @@ sub print_consumers
my ($c_maxcsn, $c_maxcsn_str, $c_lastmodified, $c_sidx, $lag, $markcolor);
my ($c_replicaroot, $c_replicatype);
my ($first_entry, $s_ldapurl, $c_ldapurl);
- my $supplier_maxcsn = "_";
+ my $supplier_maxcsn = "Unavailable";
my ($nrows);
my ($found);
undef @ouragreements;
- $c_lastmodified = "";
+ $c_lastmodified = "Unavailable";
# Collect all the consumer replicas for the current master replica
push (@consumers, $m_ridx);
@@ -790,18 +790,20 @@ sub print_consumers
if ($c_ridx >= 0) {
$myruv = $allruvs {"$c_ridx:$mid"};
- ($c_maxcsn, $c_lastmodified) = split ( /;/, $myruv );
- ($c_sidx, $c_replicaroot, $c_replicatype) = split (/:/, $allreplicas[$c_ridx]);
- $c_replicaroot = "same as master" if $m_replicaroot eq $c_replicaroot;
+ if ($myruv) {
+ ($c_maxcsn, $c_lastmodified) = split ( /;/, $myruv );
+ ($c_sidx, $c_replicaroot, $c_replicatype) = split (/:/, $allreplicas[$c_ridx]);
+ $c_replicaroot = "same as master" if $m_replicaroot eq $c_replicaroot;
+ }
}
else {
# $c_ridx is actually -$c_sidx when c is not available
$c_sidx = -$c_ridx;
- $c_maxcsn_str = "_";
+ $c_maxcsn_str = "Unavailable";
$lag = "n/a";
$markcolor = "red";
- $c_replicaroot = "_";
- $c_replicatype = "_";
+ $c_replicaroot = "Unavailable";
+ $c_replicatype = "Unavailable";
}
$nrows = 0;
@@ -932,7 +934,7 @@ sub get_supplier_maxcsn
{
my ($ridx, $s, $cn, $h, $p) = @_;
my $decimalcsn;
- my $csn = "";
+ my $csn = "Unavailable";
# normalize suffix
$s =~ s/ //;
$s =~ lc $s;
@@ -944,7 +946,7 @@ sub get_supplier_maxcsn
last;
}
}
- if($csn ne ""){
+ if($csn && $csn ne "Unavailable"){
$decimalcsn = &to_decimal_csn ($csn);
return "$csn:$decimalcsn";
}
@@ -966,11 +968,16 @@ sub cacl_time_lag
$supplier_csn_str = &to_string_csn ($s_maxcsn);
$csn_str = &to_string_csn ($c_maxcsn);
- if ($s_maxcsn && !$c_maxcsn) {
+ if ((!$s_maxcsn || $s_maxcsn eq "Unavailable") &&
+ (!$c_maxcsn || $c_maxcsn eq "Unavailable")) {
+ $lag_str = "?:??:??";
+ $markcolor = "white"; # Both unknown
+ }
+ elsif ($s_maxcsn && (!$c_maxcsn || $c_maxcsn eq "Unavailable")) {
$lag_str = "- ?:??:??";
$markcolor = &get_color (36000); # assume consumer has big latency
}
- elsif (!$s_maxcsn && $c_maxcsn) {
+ elsif ((!$s_maxcsn || $s_maxcsn eq "Unavailable") && $c_maxcsn) {
$lag_str = "+ ?:??:??";
$markcolor = &get_color (1); # consumer is ahead of supplier
}
@@ -1180,7 +1187,7 @@ sub to_decimal_csn
{
my ($maxcsn) = @_;
if (!$maxcsn || $maxcsn eq "" || $maxcsn eq "Unavailable") {
- return "none";
+ return "Unavailable";
}
my ($tm, $seq, $masterid, $subseq) = unpack("a8 a4 a4 a4", $maxcsn);
@@ -1195,9 +1202,13 @@ sub to_decimal_csn
sub to_string_csn
{
- my ($rawcsn, $decimalcsn) = split(/:/, "@_");
+ my $str = shift;
+ if (!defined($str)){
+ return "Unavailable";
+ }
+ my ($rawcsn, $decimalcsn) = split(/:/, "$str");
if (!$rawcsn || $rawcsn eq "") {
- return "none";
+ return "Unavailable";
}
if ($rawcsn eq "Unavailable"){
return $rawcsn;
@@ -1221,7 +1232,7 @@ sub get_color
$lag_minute /= 60;
my ($color) = $allcolors { $colorkeys[0] };
- foreach ( keys %allcolors) {
+ foreach ( sort keys %allcolors) {
if ($lag_minute >= $_){
$color = $allcolors {$_};
}
@@ -1300,14 +1311,15 @@ sub print_legend
if($opt_s){ return; }
print "\n<center><p><font class=page-subtitle color=#0099cc>Time Lag Legend:</font><p>\n";
print "<table cellpadding=6 cols=$nlegends width=40%>\n<tr>\n";
+ print "\n<td bgcolor=white><center>Unknown</center></td>\n";
my ($i, $j);
for ($i = 0; $i < $nlegends - 1; $i++) {
$j = $colorkeys[$i];
- print "\n<td bgcolor=$allcolors{$j}><center>within $colorkeys[$i+1] min</center></td>\n";
+ print "\n<td bgcolor=$allcolors{$j}><center>Within $colorkeys[$i+1] minutes</center></td>\n";
}
$j = $colorkeys[$i];
- print "\n<td bgcolor=$allcolors{$j}><center>over $colorkeys[$i] min</center></td>\n";
- print "\n<td bgcolor=red><center>server n/a</center></td>\n";
+ print "\n<td bgcolor=$allcolors{$j}><center>Over $colorkeys[$i] minutes</center></td>\n";
+ print "\n<td bgcolor=red><center>Server n/a</center></td>\n";
print "</table></center>\n";
}
diff --git a/man/man1/repl-monitor.1 b/man/man1/repl-monitor.1
index 37a5fa4..17b9c4b 100644
--- a/man/man1/repl-monitor.1
+++ b/man/man1/repl-monitor.1
@@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
-.TH REPL-MONITOR 1 "May 18, 2008"
+.TH REPL-MONITOR 1 "Jun 28, 2016"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@@ -68,6 +68,56 @@ Prompt for passwords
Print plain text report
.br
+.SH CONFIGURATION FILE
+This section describes the various directives that can be used in the configuration file.
+.TP
+.B [connection]
+The connection details about a replica
+.br
+
+host:port:binddn:bindpwd:cert_file
+.br
+
+or,
+.br
+
+host:port=shadowport:binddn:bindpwd:cert_file
+.TP
+.B [alias]
+Define an alias for a server, this alias is used in the report in place of the
+hostname/port
+
+.br
+alias = host:port
+.TP
+.B [color]
+Set a color based on the replicaton lag time lowmark (in minutes)
+.br
+
+.R lowmark = color
+.SH EXAMPLE
+Example of a configuration file:
+
+[connection]
+.br
+localhost.localdomain:3891:cn=directory manager:password:*
+.br
+localhost2.localdomain:3892:cn=directory manager:password:*
+
+[alias]
+.br
+MY_SYSTEM1 = localhost.localdomain:3891
+.br
+MY_SYSTEM2 = localhost2.localdomain:3892
+
+[color]
+.br
+0 = #CCFFCC
+.br
+5 = #FFFFCC
+.br
+60 = #FFCCCC
+
.SH AUTHOR
repl-monitor was written by the 389 Project.
.SH "REPORTING BUGS"
@@ -75,14 +125,14 @@ Report bugs to https://fedorahosted.org/389/newticket.
.SH COPYRIGHT
Copyright \(co 2001 Sun Microsystems, Inc. Used by permission.
.br
-Copyright \(co 2008 Red Hat, Inc.
+Copyright \(co 2016 Red Hat, Inc.
.br
This manual page was written by Michele Baldessari <michele(a)pupazzo.org>,
for the Debian project (but may be used by others).
.br
-Manual page updated by Mark Reynolds <mreynolds(a)redhat.com> 10/11/13
+Manual page updated by Mark Reynolds <mreynolds(a)redhat.com> 6/28/2016
.br
This is free software. You may redistribute copies of it under the terms of
the Directory Server license found in the LICENSE file of this
software distribution. This license is essentially the GNU General Public
-License version 2 with an exception for plug\(hyin distribution.
+License version 3 with an exception for plug\(hyin distribution.
7 years, 10 months
Branch '389-ds-base-1.3.4' - ldap/admin
by Mark Reynolds
ldap/admin/src/logconv.pl | 60 ++++++++++++++++++++++++++--------------------
1 file changed, 35 insertions(+), 25 deletions(-)
New commits:
commit 987481c2983c5fe8f9289a856e4d7ee0ad963657
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Fri Jun 24 11:25:55 2016 -0400
Ticket 48900 - Add connection perf stats to logconv.pl
Description: Add connection peroformace stats to logconv.pl
https://fedorahosted.org/389/ticket/48900
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit 6beeb75cadd281b56efdd7710f75202f153b6a14)
diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
index 9cd9aaa..c296ca6 100755
--- a/ldap/admin/src/logconv.pl
+++ b/ldap/admin/src/logconv.pl
@@ -41,7 +41,7 @@ if ($#ARGV < 0){;
my $file_count = 0;
my $arg_count = 0;
-my $logversion = "8.1";
+my $logversion = "8.2";
my $sizeCount = "20";
my $startFlag = 0;
my $startTime = 0;
@@ -235,6 +235,11 @@ my $startTLSCount = 0;
my $ldapiCount = 0;
my $autobindCount = 0;
my $limit = 25000; # number of lines processed to trigger output
+my $connStat;
+my $ldapiConnStat;
+my $sslConnStat;
+my $ldapConnStat;
+my $tlsConnStat;
my $searchStat;
my $modStat;
my $addStat;
@@ -747,15 +752,27 @@ if($reportStats ne ""){
}
#
-# Continue with standard report
+# Generate stats first
#
+$connStat = sprintf "(%.2f/sec) (%.2f/min)\n",($connectionCount / $totalTimeInSecs), $connectionCount / ($totalTimeInSecs/60);
+$ldapiConnStat = sprintf "(%.2f/sec) (%.2f/min)\n",($ldapiCount / $totalTimeInSecs), $ldapiCount / ($totalTimeInSecs/60);
+$sslConnStat = sprintf "(%.2f/sec) (%.2f/min)\n",($sslCount / $totalTimeInSecs), $sslCount / ($totalTimeInSecs/60);
+$tlsConnStat = sprintf "(%.2f/sec) (%.2f/min)\n",($startTLSCount / $totalTimeInSecs), $startTLSCount / ($totalTimeInSecs/60);
+$ldapConnStat = sprintf "(%.2f/sec) (%.2f/min)\n",(($connectionCount - $sslCount - $ldapiCount) / $totalTimeInSecs),
+ ($connectionCount - $sslCount - $ldapiCount) / ($totalTimeInSecs/60);
+$searchStat = sprintf "(%.2f/sec) (%.2f/min)\n",($srchCount / $totalTimeInSecs), $srchCount / ($totalTimeInSecs/60);
+$modStat = sprintf "(%.2f/sec) (%.2f/min)\n",$modCount / $totalTimeInSecs, $modCount/($totalTimeInSecs/60);
+$addStat = sprintf "(%.2f/sec) (%.2f/min)\n",$addCount/$totalTimeInSecs, $addCount/($totalTimeInSecs/60);
+$deleteStat = sprintf "(%.2f/sec) (%.2f/min)\n",$delCount/$totalTimeInSecs, $delCount/($totalTimeInSecs/60);
+$modrdnStat = sprintf "(%.2f/sec) (%.2f/min)\n",$modrdnCount/$totalTimeInSecs, $modrdnCount/($totalTimeInSecs/60);
+$compareStat = sprintf "(%.2f/sec) (%.2f/min)\n",$cmpCount/$totalTimeInSecs, $cmpCount/($totalTimeInSecs/60);
+$bindCountStat = sprintf "(%.2f/sec) (%.2f/min)\n",$bindCount/$totalTimeInSecs, $bindCount/($totalTimeInSecs/60);
+#
+# Continue with standard report
+#
print "Restarts: $serverRestartCount\n";
-print "Total Connections: $connectionCount\n";
-print " - LDAP Connections: " . ($connectionCount - $sslCount - $ldapiCount) . "\n";
-print " - LDAPI Connections: $ldapiCount\n";
-print " - LDAPS Connections: $sslCount\n";
-print " - StartTLS Extended Ops: $startTLSCount\n";
+
if(%cipher){
print " Secure Protocol Versions:\n";
foreach my $key (sort { $b cmp $a } keys %cipher) {
@@ -774,25 +791,18 @@ if ($allOps ne "0"){
print "Overall Performance: No Operations to evaluate\n\n";
}
-if ($totalTimeInSecs == 0){
- $searchStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
- $modStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
- $addStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
- $deleteStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
- $modrdnStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
- $compareStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
- $bindCountStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
-} else {
- $searchStat = sprintf "(%.2f/sec) (%.2f/min)\n",($srchCount / $totalTimeInSecs), $srchCount / ($totalTimeInSecs/60);
- $modStat = sprintf "(%.2f/sec) (%.2f/min)\n",$modCount / $totalTimeInSecs, $modCount/($totalTimeInSecs/60);
- $addStat = sprintf "(%.2f/sec) (%.2f/min)\n",$addCount/$totalTimeInSecs, $addCount/($totalTimeInSecs/60);
- $deleteStat = sprintf "(%.2f/sec) (%.2f/min)\n",$delCount/$totalTimeInSecs, $delCount/($totalTimeInSecs/60);
- $modrdnStat = sprintf "(%.2f/sec) (%.2f/min)\n",$modrdnCount/$totalTimeInSecs, $modrdnCount/($totalTimeInSecs/60);
- $compareStat = sprintf "(%.2f/sec) (%.2f/min)\n",$cmpCount/$totalTimeInSecs, $cmpCount/($totalTimeInSecs/60);
- $bindCountStat = sprintf "(%.2f/sec) (%.2f/min)\n",$bindCount/$totalTimeInSecs, $bindCount/($totalTimeInSecs/60);
-}
-
format STDOUT =
+Total Connections: @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ $connectionCount, $connStat,
+ - LDAP Connections: @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ ($connectionCount - $sslCount - $ldapiCount), $ldapConnStat
+ - LDAPI Connections: @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ $ldapiCount, $ldapiConnStat
+ - LDAPS Connections: @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ $sslCount, $sslConnStat
+ - StartTLS Extended Ops: @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ $startTLSCount, $tlsConnStat
+
Searches: @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$srchCount, $searchStat,
Modifications: @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
7 years, 10 months
ldap/admin
by Mark Reynolds
ldap/admin/src/logconv.pl | 75 ++++++++++++++++++++++++++++++----------------
1 file changed, 50 insertions(+), 25 deletions(-)
New commits:
commit 6beeb75cadd281b56efdd7710f75202f153b6a14
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Fri Jun 24 11:25:55 2016 -0400
Ticket 48900 - Add connection perf stats to logconv.pl
Description: Add connection peroformace stats to logconv.pl
https://fedorahosted.org/389/ticket/48900
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
index 131a8c0..9b5e34b 100755
--- a/ldap/admin/src/logconv.pl
+++ b/ldap/admin/src/logconv.pl
@@ -42,7 +42,7 @@ if ($#ARGV < 0){;
my $file_count = 0;
my $arg_count = 0;
-my $logversion = "8.1";
+my $logversion = "8.2";
my $sizeCount = "20";
my $startFlag = 0;
my $startTime = 0;
@@ -236,6 +236,11 @@ my $startTLSCount = 0;
my $ldapiCount = 0;
my $autobindCount = 0;
my $limit = 25000; # number of lines processed to trigger output
+my $connStat;
+my $ldapiConnStat;
+my $sslConnStat;
+my $ldapConnStat;
+my $tlsConnStat;
my $searchStat;
my $modStat;
my $addStat;
@@ -767,15 +772,42 @@ if($reportStats ne ""){
}
#
-# Continue with standard report
+# Generate stats first
#
+if ($totalTimeInNsecs == 0){
+ $connStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
+ $ldapiConnStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
+ $sslConnStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
+ $tlsConnStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
+ $ldapConnStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
+ $searchStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
+ $modStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
+ $addStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
+ $deleteStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
+ $modrdnStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
+ $compareStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
+ $bindCountStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
+} else {
+ $connStat = sprintf "(%.2f/sec) (%.2f/min)\n",($connectionCount / $totalTimeInSecs), $connectionCount / ($totalTimeInSecs/60);
+ $ldapiConnStat = sprintf "(%.2f/sec) (%.2f/min)\n",($ldapiCount / $totalTimeInSecs), $ldapiCount / ($totalTimeInSecs/60);
+ $sslConnStat = sprintf "(%.2f/sec) (%.2f/min)\n",($sslCount / $totalTimeInSecs), $sslCount / ($totalTimeInSecs/60);
+ $tlsConnStat = sprintf "(%.2f/sec) (%.2f/min)\n",($startTLSCount / $totalTimeInSecs), $startTLSCount / ($totalTimeInSecs/60);
+ $ldapConnStat = sprintf "(%.2f/sec) (%.2f/min)\n",(($connectionCount - $sslCount - $ldapiCount) / $totalTimeInSecs),
+ ($connectionCount - $sslCount - $ldapiCount) / ($totalTimeInSecs/60);
+ $searchStat = sprintf "(%.2f/sec) (%.2f/min)\n",($srchCount / $totalTimeInSecs), $srchCount / ($totalTimeInSecs/60);
+ $modStat = sprintf "(%.2f/sec) (%.2f/min)\n",$modCount / $totalTimeInSecs, $modCount/($totalTimeInSecs/60);
+ $addStat = sprintf "(%.2f/sec) (%.2f/min)\n",$addCount/$totalTimeInSecs, $addCount/($totalTimeInSecs/60);
+ $deleteStat = sprintf "(%.2f/sec) (%.2f/min)\n",$delCount/$totalTimeInSecs, $delCount/($totalTimeInSecs/60);
+ $modrdnStat = sprintf "(%.2f/sec) (%.2f/min)\n",$modrdnCount/$totalTimeInSecs, $modrdnCount/($totalTimeInSecs/60);
+ $compareStat = sprintf "(%.2f/sec) (%.2f/min)\n",$cmpCount/$totalTimeInSecs, $cmpCount/($totalTimeInSecs/60);
+ $bindCountStat = sprintf "(%.2f/sec) (%.2f/min)\n",$bindCount/$totalTimeInSecs, $bindCount/($totalTimeInSecs/60);
+}
+#
+# Continue with standard report
+#
print "Restarts: $serverRestartCount\n";
-print "Total Connections: $connectionCount\n";
-print " - LDAP Connections: " . ($connectionCount - $sslCount - $ldapiCount) . "\n";
-print " - LDAPI Connections: $ldapiCount\n";
-print " - LDAPS Connections: $sslCount\n";
-print " - StartTLS Extended Ops: $startTLSCount\n";
+
if(%cipher){
print " Secure Protocol Versions:\n";
foreach my $key (sort { $b cmp $a } keys %cipher) {
@@ -794,25 +826,18 @@ if ($allOps ne "0"){
print "Overall Performance: No Operations to evaluate\n\n";
}
-if ($totalTimeInNsecs == 0){
- $searchStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
- $modStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
- $addStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
- $deleteStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
- $modrdnStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
- $compareStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
- $bindCountStat = sprintf "(%.2f/sec) (%.2f/min)\n","0", "0";
-} else {
- $searchStat = sprintf "(%.2f/sec) (%.2f/min)\n",($srchCount / $totalTimeInSecs), $srchCount / ($totalTimeInSecs/60);
- $modStat = sprintf "(%.2f/sec) (%.2f/min)\n",$modCount / $totalTimeInSecs, $modCount/($totalTimeInSecs/60);
- $addStat = sprintf "(%.2f/sec) (%.2f/min)\n",$addCount/$totalTimeInSecs, $addCount/($totalTimeInSecs/60);
- $deleteStat = sprintf "(%.2f/sec) (%.2f/min)\n",$delCount/$totalTimeInSecs, $delCount/($totalTimeInSecs/60);
- $modrdnStat = sprintf "(%.2f/sec) (%.2f/min)\n",$modrdnCount/$totalTimeInSecs, $modrdnCount/($totalTimeInSecs/60);
- $compareStat = sprintf "(%.2f/sec) (%.2f/min)\n",$cmpCount/$totalTimeInSecs, $cmpCount/($totalTimeInSecs/60);
- $bindCountStat = sprintf "(%.2f/sec) (%.2f/min)\n",$bindCount/$totalTimeInSecs, $bindCount/($totalTimeInSecs/60);
-}
-
format STDOUT =
+Total Connections: @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ $connectionCount, $connStat,
+ - LDAP Connections: @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ ($connectionCount - $sslCount - $ldapiCount), $ldapConnStat
+ - LDAPI Connections: @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ $ldapiCount, $ldapiConnStat
+ - LDAPS Connections: @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ $sslCount, $sslConnStat
+ - StartTLS Extended Ops: @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ $startTLSCount, $tlsConnStat
+
Searches: @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$srchCount, $searchStat,
Modifications: @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
7 years, 10 months
ldap/servers
by thierry bordaz
ldap/servers/slapd/daemon.c | 1
ldap/servers/slapd/plugin.c | 47 +++++++++++++++++++++++++++++-----------
ldap/servers/slapd/proto-slap.h | 1
3 files changed, 37 insertions(+), 12 deletions(-)
New commits:
commit 5f7bcdca7a56f017e4cf021be7d07284fa1709e7
Author: Thierry Bordaz <tbordaz(a)redhat.com>
Date: Thu Jun 23 15:48:58 2016 +0200
Ticket 48891 ns-slapd crashes during the shutdown after adding attribute with a matching rule
Bug Description:
This is a followup of a previous fix of the same ticket
During shutdown, plugin close callback is called AND plugins
structures are freed (plugin_closeall).
Free of these structure in plugin_closeall was done to avoid
noise from valgrind (https://fedorahosted.org/389/ticket/47645).
Later, freeing backends (be_cleanupall) calls the plugins cleanup
callback.
The problem is that plugin structure have already been freed and
cleanup callback can be an invalid pointer.
Fix Description:
The free of plugins structure is postponed after plugin_closeall
and be_cleanup with a new function plugin_dependency_freeall.
The fix also fixes a leak in plugin_dependency_startall.
https://fedorahosted.org/389/ticket/48891
Reviewed by: Mark Reynolds and Noriko Hosoi (thanks to you !!)
Platforms tested: F23
Flag Day: no
Doc impact: no
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index bee2fc0..81a54cf 100644
--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -1349,6 +1349,7 @@ void slapd_daemon( daemon_ports_t *ports )
the_connection_table= NULL;
be_cleanupall ();
+ plugin_dependency_freeall();
connection_post_shutdown_cleanup();
LDAPDebug( LDAP_DEBUG_TRACE, "slapd shutting down - backends closed down\n",
0, 0, 0 );
diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c
index d377b33..c801bf4 100644
--- a/ldap/servers/slapd/plugin.c
+++ b/ldap/servers/slapd/plugin.c
@@ -1863,6 +1863,16 @@ plugin_dependency_startall(int argc, char** argv, char *errmsg, int operation, c
*/
plugin_free_plugin_dep_config(&config);
+ if(plugin_head){
+ plugin_dep_type next;
+ while(plugin_head){
+ next = plugin_head->next;
+ slapi_ch_free_string(&plugin_head->type);
+ slapi_ch_free((void *)&plugin_head);
+ plugin_head = next;
+ }
+ }
+
/* Finally enable registered plugin functions */
global_plugin_callbacks_enabled = 1;
@@ -1914,6 +1924,31 @@ plugin_dependency_closeall()
}
}
+/*
+ * Function: plugin_dependency_freeall
+ *
+ * Description: Free the plugin dependency list.
+ * It need to be called after be_cleanupall so that the
+ * ldbm_database plugin is not freed when be_cleanupall calls the cleanup
+ * callback of the backend
+ */
+void
+plugin_dependency_freeall()
+{
+ entry_and_plugin_t *iterp, *nextp;
+
+ /* free the plugin dependency entry list */
+ iterp = dep_plugin_entries;
+ while (iterp) {
+ nextp = iterp->next;
+ slapi_entry_free(iterp->e);
+ plugin_free(iterp->plugin);
+ slapi_ch_free((void **)&iterp);
+ iterp = nextp;
+ }
+ dep_plugin_entries = NULL;
+}
+
/***********************************************************
end of plugin dependency code
************************************************************/
@@ -1948,19 +1983,7 @@ plugin_startall(int argc, char** argv, char **plugin_list)
void
plugin_closeall(int close_backends, int close_globals)
{
- entry_and_plugin_t *iterp, *nextp;
-
plugin_dependency_closeall();
- /* free the plugin dependency entry list */
- iterp = dep_plugin_entries;
- while (iterp) {
- nextp = iterp->next;
- slapi_entry_free(iterp->e);
- plugin_free(iterp->plugin);
- slapi_ch_free((void **)&iterp);
- iterp = nextp;
- }
- dep_plugin_entries = NULL;
}
diff --git a/ldap/servers/slapd/proto-slap.h b/ldap/servers/slapd/proto-slap.h
index 555d15d..6bc1065 100644
--- a/ldap/servers/slapd/proto-slap.h
+++ b/ldap/servers/slapd/proto-slap.h
@@ -884,6 +884,7 @@ int plugin_call_exop_plugins( Slapi_PBlock *pb, struct slapdplugin *p );
Slapi_Backend * plugin_extended_op_getbackend( Slapi_PBlock *pb, struct slapdplugin *p);
const char *plugin_extended_op_oid2string( const char *oid );
void plugin_closeall(int close_backends, int close_globals);
+void plugin_dependency_freeall();
void plugin_startall(int argc, char **argv, char **plugin_list);
void plugin_get_plugin_dependencies(char *plugin_name, char ***names);
struct slapdplugin *get_plugin_list(int plugin_list_index);
7 years, 10 months
ldap/servers
by Noriko Hosoi
ldap/servers/slapd/back-ldbm/monitor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 10949b775aab6fc0e708cae9479a8ee891f50c08
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Wed Jun 22 11:25:33 2016 -0700
Ticket #48899 - Values of dbcachetries/dbcachehits in cn=monitor could overflow.
Description: The internal variable cache_tries is declared as u_int32_t.
The values provided from Berkeley DB are typed as uintmax_t, which has
64 bit width. Since cache_tries stores the sum of st_cache_miss and
mpstat->st_cache_hit, the type should be also uintmax_t so that the
overflow problem is solved.
https://fedorahosted.org/389/ticket/48899
Reviewed by mreynolds(a)redhat.com (Thank you, Mark!!)
diff --git a/ldap/servers/slapd/back-ldbm/monitor.c b/ldap/servers/slapd/back-ldbm/monitor.c
index b89f6cb..dfcc735 100644
--- a/ldap/servers/slapd/back-ldbm/monitor.c
+++ b/ldap/servers/slapd/back-ldbm/monitor.c
@@ -226,7 +226,7 @@ int ldbm_back_monitor_search(Slapi_PBlock *pb, Slapi_Entry *e,
char buf[BUFSIZ];
DB_MPOOL_STAT *mpstat = NULL;
DB_MPOOL_FSTAT **mpfstat = NULL;
- u_int32_t cache_tries;
+ uintmax_t cache_tries;
vals[0] = &val;
vals[1] = NULL;
@@ -247,7 +247,7 @@ int ldbm_back_monitor_search(Slapi_PBlock *pb, Slapi_Entry *e,
/* cache tries*/
cache_tries = (mpstat->st_cache_miss + mpstat->st_cache_hit);
- sprintf(buf, "%u", cache_tries);
+ sprintf(buf, "%lu", cache_tries);
MSET("dbCacheTries");
/* cache hit ratio*/
7 years, 10 months
Branch '389-ds-base-1.2.11' - ldap/schema
by Mark Reynolds
ldap/schema/01core389.ldif | 152 ---------------------------------------------
1 file changed, 152 deletions(-)
New commits:
commit e16b83b424dab982f260a708eaecf8e62150608d
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Thu Jun 23 14:32:32 2016 -0400
Ticket 48636 - Fix cherry pick errors
Description: Fix cherry-pick errors in schema file
https://fedorahosted.org/389/ticket/48636
diff --git a/ldap/schema/01core389.ldif b/ldap/schema/01core389.ldif
index d657470..f013465 100644
--- a/ldap/schema/01core389.ldif
+++ b/ldap/schema/01core389.ldif
@@ -156,161 +156,9 @@ attributeTypes: ( 2.16.840.1.113730.3.1.2152 NAME 'nsds5ReplicaProtocolTimeout'
attributeTypes: ( 2.16.840.1.113730.3.1.2154 NAME 'nsds5ReplicaBackoffMin' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2155 NAME 'nsds5ReplicaBackoffMax' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2156 NAME 'nsslapd-sasl-max-buffer-size' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-<<<<<<< HEAD
attributeTypes: ( 2.16.840.1.113730.3.1.2310 NAME 'nsds5ReplicaFlowControlWindow' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2311 NAME 'nsds5ReplicaFlowControlPause' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2332 NAME 'allowWeakDHParam' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
-=======
-attributeTypes: ( 2.16.840.1.113730.3.1.2165 NAME 'schemaUpdateObjectclassAccept' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2166 NAME 'schemaUpdateObjectclassReject' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2167 NAME 'schemaUpdateAttributeAccept' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2168 NAME 'schemaUpdateAttributeReject' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2169 NAME 'nsslapd-pagedsizelimit' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2170 NAME 'nsslapd-accesslog-level' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2171 NAME 'nsslapd-accesslog-maxlogsperdir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2172 NAME 'nsslapd-accesslog-maxlogsize' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2173 NAME 'nsslapd-errorlog-maxlogsize' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2174 NAME 'nsslapd-auditlog-maxlogsize' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2175 NAME 'nsslapd-accesslog-logrotationsync-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2176 NAME 'nsslapd-errorlog-logrotationsync-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2177 NAME 'nsslapd-auditlog-logrotationsync-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2178 NAME 'nsslapd-accesslog-logrotationsynchour' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2179 NAME 'nsslapd-errorlog-logrotationsynchour' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2180 NAME 'nsslapd-auditlog-logrotationsynchour' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2181 NAME 'nsslapd-accesslog-logrotationsyncmin' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2182 NAME 'nsslapd-errorlog-logrotationsyncmin' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2183 NAME 'nsslapd-audit-logrotationsyncmin' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2184 NAME 'nsslapd-accesslog-logrotationtime' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2185 NAME 'nsslapd-errorlog-logrotationtime' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2186 NAME 'nsslapd-auditlog-logrotationtime' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2187 NAME 'nsslapd-accesslog-logrotationtimeunit' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2188 NAME 'nsslapd-errorlog-logrotationtimeunit' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2189 NAME 'nsslapd-auditlog-logrotationtimeunit' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2190 NAME 'nsslapd-accesslog-logmaxdiskspace' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2191 NAME 'nsslapd-errorlog-logmaxdiskspace' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2192 NAME 'nsslapd-auditlog-logmaxdiskspace' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2193 NAME 'nsslapd-accesslog-logminfreediskspace' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2194 NAME 'nsslapd-errorlog-logminfreediskspace' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2195 NAME 'nsslapd-auditlog-logminfreediskspace' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2196 NAME 'nsslapd-accesslog-logexpirationtime' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2197 NAME 'nsslapd-errorlog-logexpirationtime' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2198 NAME 'nsslapd-auditlog-logexpirationtime' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2199 NAME 'nsslapd-accesslog-logexpirationtimeunit' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2200 NAME 'nsslapd-errorlog-logexpirationtimeunit' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2201 NAME 'nsslapd-auditlog-logexpirationtimeunit' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2202 NAME 'nsslapd-accesslog-logging-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2203 NAME 'nsslapd-errorlog-logging-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2204 NAME 'nsslapd-auditlog-logging-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2205 NAME 'nsslapd-auditlog-logging-hide-unhashed-pw' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2206 NAME 'nsslapd-unhashed-pw-switch' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2207 NAME 'nsslapd-rootdn' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2208 NAME 'nsslapd-rootdnpw' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2209 NAME 'nsslapd-rootpwstoragescheme' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2210 NAME 'nsslapd-auditlog' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2211 NAME 'nsslapd-dynamicconf' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2212 NAME 'nsslapd-useroc' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2213 NAME 'nsslapd-userat' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2214 NAME 'nsslapd-svrtab' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2215 NAME 'nsslapd-allow-unauthenticated-binds' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2216 NAME 'nsslapd-require-secure-binds' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2217 NAME 'nsslapd-allow-anonymous-access' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2218 NAME 'nsslapd-localssf' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2219 NAME 'nsslapd-minssf' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2220 NAME 'nsslapd-minssf-exclude-rootdse' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2221 NAME 'nsslapd-validate-cert' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2222 NAME 'nsslapd-localuser' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2223 NAME 'nsslapd-localhost' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2224 NAME 'nsslapd-port' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2225 NAME 'nsslapd-workingdir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2226 NAME 'nsslapd-listenhost' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2227 NAME 'nsslapd-snmp-index' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2228 NAME 'nsslapd-ldapifilepath' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2229 NAME 'nsslapd-ldapilisten' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2230 NAME 'nsslapd-ldapiautobind' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2231 NAME 'nsslapd-ldapimaprootdn' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2232 NAME 'nsslapd-ldapimaptoentries' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2233 NAME 'nsslapd-ldapiuidnumbertype' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2234 NAME 'nsslapd-ldapigidnumbertype' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2235 NAME 'nsslapd-ldapientrysearchbase' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2236 NAME 'nsslapd-anonlimitsdn' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2237 NAME 'nsslapd-counters' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2238 NAME 'nsslapd-security' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2239 NAME 'nsslapd-SSL3ciphers' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2240 NAME 'nsslapd-accesslog' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2241 NAME 'nsslapd-errorlog' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2242 NAME 'nsslapd-securePort' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2243 NAME 'nsslapd-securelistenhost' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2244 NAME 'nnslapd-threadnumber' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2245 NAME 'nsslapd-maxthreadsperconn' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2246 NAME 'nsslapd-maxdescriptors' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2247 NAME 'nsslapd-conntablesize' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2248 NAME 'nsslapd-reservedescriptors' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2249 NAME 'nsslapd-idletimeout' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2250 NAME 'nsslapd-ioblocktimeout' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2251 NAME 'nsslapd-accesscontrol' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2252 NAME 'nsslapd-groupevalnestlevel' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2253 NAME 'nsslapd-nagle' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2254 NAME 'nsslapd-pwpolicy-local' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2255 NAME 'passwordIsGlobalPolicy' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2256 NAME 'passwordLegacyPolicy' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2257 NAME 'nsslapd-accesslog-logbuffering' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2258 NAME 'nsslapd-csnlogging' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2259 NAME 'nsslapd-return-exact-case' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2260 NAME 'nsslapd-result-tweak' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2261 NAME 'nsslapd-attribute-name-exceptions' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2262 NAME 'nsslapd-maxbersize' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2263 NAME 'nsslapd-maxsasliosize' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2264 NAME 'nsslapd-max-filter-nest-level' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2265 NAME 'nsslapd-versionstring' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2266 NAME 'nsslapd-enquote-sup-oc' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2267 NAME 'nsslapd-certmap-basedn' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2268 NAME 'nsslapd-accesslog-list' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2269 NAME 'nsslapd-errorlog-list' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2270 NAME 'nsslapd-auditlog-list' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2271 NAME 'nsslapd-rewrite-rfc1274' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2272 NAME 'nsslapd-plugin-binddn-tracking' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2273 NAME 'nsslapd-config' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2274 NAME 'nsslapd-instancedir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2275 NAME 'nsslapd-schemadir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2276 NAME 'nsslapd-lockdir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2277 NAME 'nsslapd-tmpdir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2278 NAME 'nsslapd-certdir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2279 NAME 'nsslapd-ldifdir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2280 NAME 'nsslapd-bakdir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2281 NAME 'nsslapd-saslpath' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2282 NAME 'nsslapd-rundir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2283 NAME 'nsslapd-SSLclientAuth' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2284 NAME 'nsslapd-ssl-check-hostname' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2285 NAME 'nsslapd-hash-filters' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2286 NAME 'nsslapd-outbound-ldap-io-timeout' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2287 NAME 'nsslapd-force-sasl-external' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2288 NAME 'nsslapd-defaultnamingcontext' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2289 NAME 'nsslapd-disk-monitoring' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2290 NAME 'nsslapd-disk-monitoring-threshold' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2291 NAME 'nsslapd-disk-monitoring-grace-period' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2292 NAME 'nsslapd-disk-monitoring-logging-critical' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2293 NAME 'nsslapd-ndn-cache-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2294 NAME 'nsslapd-ndn-cache-max-size' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2295 NAME 'nsslapd-allowed-sasl-mechanisms' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2296 NAME 'nsslapd-ignore-virtual-attrs' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2297 NAME 'nsslapd-search-return-original-type-switch' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2298 NAME 'nsslapd-enable-turbo-mode' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2299 NAME 'nsslapd-connection-buffer' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2300 NAME 'nsslapd-connection-nocanon' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2301 NAME 'nsslapd-plugin-logging' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2302 NAME 'nsslapd-listen-backlog-size' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2303 NAME 'nsslapd-ignore-time-skew' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2304 NAME 'nsslapd-dynamic-plugins' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2305 NAME 'nsslapd-moddn-aci' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2306 NAME 'nsslapd-return-default-opattr' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE directoryOperation X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2307 NAME 'nsslapd-allow-hashed-passwords' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2308 NAME 'nstombstonecsn' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2309 NAME 'nsds5ReplicaPreciseTombstonePurging' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2310 NAME 'nsds5ReplicaFlowControlWindow' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2311 NAME 'nsds5ReplicaFlowControlPause' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2313 NAME 'nsslapd-changelogtrim-interval' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2314 NAME 'nsslapd-changelogcompactdb-interval' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
-attributeTypes: ( 2.16.840.1.113730.3.1.2315 NAME 'nsDS5ReplicaWaitForAsyncResults' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2333 NAME 'nsds5ReplicaReleaseTimeout' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
#
# objectclasses
7 years, 10 months
Branch '389-ds-base-1.2.11' - 2 commits - ldap/schema ldap/servers
by Mark Reynolds
ldap/schema/01core389.ldif | 155 +++++++++++++++-
ldap/servers/plugins/replication/repl5.h | 16 +
ldap/servers/plugins/replication/repl5_inc_protocol.c | 99 +++++++---
ldap/servers/plugins/replication/repl5_plugins.c | 3
ldap/servers/plugins/replication/repl5_replica.c | 137 +++++++++++---
ldap/servers/plugins/replication/repl5_replica_config.c | 25 ++
ldap/servers/plugins/replication/repl_globals.c | 1
7 files changed, 382 insertions(+), 54 deletions(-)
New commits:
commit 0c3f203dc72932c827b340289ac1592dae78d188
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jun 14 17:19:48 2016 -0400
Ticket 48636 - Fix config validation check
Bug Description: We were previous checking if an unsigfned int was less than zero
Fix Description: Improve config validation by using long instead of PRUint64
https://fedorahosted.org/389/ticket/48636
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit 43d5ac680f7781f95205db94e5ff2958d39b78a4)
(cherry picked from commit c66ba8cb24c35d186b14f169e9206269067891a0)
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index f8db8e8..a1dceae 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -497,17 +497,20 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
{
if (apply_mods)
{
- PRUint64 val = atoll(config_attr_value);
+ long val = atol(config_attr_value);
- if(val < 0){
+ if (val < 0){
*returncode = LDAP_UNWILLING_TO_PERFORM;
- PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
+ PR_snprintf(errortext, SLAPI_DSE_RETURNTEXT_SIZE,
"attribute %s value (%s) is invalid, must be a number zero or greater.\n",
config_attr, config_attr_value);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_modify: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ "replica_config_modify: %s\n", errortext);
break;
+ } else {
+ /* Set the timeout */
+ replica_set_release_timeout(r, val);
}
- replica_set_release_timeout(r, val);
}
}
else
commit 2fc070e233c904ab0514527e73da28b2f0af10bb
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Wed Jun 8 13:06:46 2016 -0400
Ticket 48636 - Improve replication convergence
Bug Description: In a busy MMR environment where multiple masters are being
updated at the same time the replica sessions stay open for
a very long time. This causes other masters to wait to send
their updates. This causes lop-sided convergence. Where
entries added to the MMR environment, but on different masters,
take a very different amount of time until they are each seen
on all the replicas.
Fix Description: A new configuratoin setting was added (nsds5ReplicaReleaseTimeout)
to the replica configuration entry. So when replica A tries
to acquire a replica B, replica B send a control back to the
master(master C) that is updating replica B to abort the session.
Master C will continue sending updates for the amount of time
specified in the the "release timeout", then it will "yield" its
current session so other replicas can acquire that replica.
https://fedorahosted.org/389/ticket/48636
Reviewed by: lkrispen & nhosoi(Thanks!!)
(cherry picked from commit a1545cdae48e4b4e1fc87a168e4d8f959626f112)
(cherry picked from commit f223b500264d00c5c2b97bf903bd501be1487afe)
diff --git a/ldap/schema/01core389.ldif b/ldap/schema/01core389.ldif
index 4ae6967..d657470 100644
--- a/ldap/schema/01core389.ldif
+++ b/ldap/schema/01core389.ldif
@@ -156,9 +156,162 @@ attributeTypes: ( 2.16.840.1.113730.3.1.2152 NAME 'nsds5ReplicaProtocolTimeout'
attributeTypes: ( 2.16.840.1.113730.3.1.2154 NAME 'nsds5ReplicaBackoffMin' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2155 NAME 'nsds5ReplicaBackoffMax' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2156 NAME 'nsslapd-sasl-max-buffer-size' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+<<<<<<< HEAD
attributeTypes: ( 2.16.840.1.113730.3.1.2310 NAME 'nsds5ReplicaFlowControlWindow' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2311 NAME 'nsds5ReplicaFlowControlPause' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2332 NAME 'allowWeakDHParam' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
+=======
+attributeTypes: ( 2.16.840.1.113730.3.1.2165 NAME 'schemaUpdateObjectclassAccept' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2166 NAME 'schemaUpdateObjectclassReject' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2167 NAME 'schemaUpdateAttributeAccept' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2168 NAME 'schemaUpdateAttributeReject' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2169 NAME 'nsslapd-pagedsizelimit' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2170 NAME 'nsslapd-accesslog-level' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2171 NAME 'nsslapd-accesslog-maxlogsperdir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2172 NAME 'nsslapd-accesslog-maxlogsize' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2173 NAME 'nsslapd-errorlog-maxlogsize' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2174 NAME 'nsslapd-auditlog-maxlogsize' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2175 NAME 'nsslapd-accesslog-logrotationsync-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2176 NAME 'nsslapd-errorlog-logrotationsync-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2177 NAME 'nsslapd-auditlog-logrotationsync-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2178 NAME 'nsslapd-accesslog-logrotationsynchour' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2179 NAME 'nsslapd-errorlog-logrotationsynchour' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2180 NAME 'nsslapd-auditlog-logrotationsynchour' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2181 NAME 'nsslapd-accesslog-logrotationsyncmin' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2182 NAME 'nsslapd-errorlog-logrotationsyncmin' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2183 NAME 'nsslapd-audit-logrotationsyncmin' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2184 NAME 'nsslapd-accesslog-logrotationtime' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2185 NAME 'nsslapd-errorlog-logrotationtime' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2186 NAME 'nsslapd-auditlog-logrotationtime' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2187 NAME 'nsslapd-accesslog-logrotationtimeunit' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2188 NAME 'nsslapd-errorlog-logrotationtimeunit' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2189 NAME 'nsslapd-auditlog-logrotationtimeunit' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2190 NAME 'nsslapd-accesslog-logmaxdiskspace' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2191 NAME 'nsslapd-errorlog-logmaxdiskspace' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2192 NAME 'nsslapd-auditlog-logmaxdiskspace' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2193 NAME 'nsslapd-accesslog-logminfreediskspace' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2194 NAME 'nsslapd-errorlog-logminfreediskspace' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2195 NAME 'nsslapd-auditlog-logminfreediskspace' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2196 NAME 'nsslapd-accesslog-logexpirationtime' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2197 NAME 'nsslapd-errorlog-logexpirationtime' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2198 NAME 'nsslapd-auditlog-logexpirationtime' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2199 NAME 'nsslapd-accesslog-logexpirationtimeunit' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2200 NAME 'nsslapd-errorlog-logexpirationtimeunit' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2201 NAME 'nsslapd-auditlog-logexpirationtimeunit' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2202 NAME 'nsslapd-accesslog-logging-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2203 NAME 'nsslapd-errorlog-logging-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2204 NAME 'nsslapd-auditlog-logging-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2205 NAME 'nsslapd-auditlog-logging-hide-unhashed-pw' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2206 NAME 'nsslapd-unhashed-pw-switch' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2207 NAME 'nsslapd-rootdn' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2208 NAME 'nsslapd-rootdnpw' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2209 NAME 'nsslapd-rootpwstoragescheme' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2210 NAME 'nsslapd-auditlog' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2211 NAME 'nsslapd-dynamicconf' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2212 NAME 'nsslapd-useroc' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2213 NAME 'nsslapd-userat' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2214 NAME 'nsslapd-svrtab' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2215 NAME 'nsslapd-allow-unauthenticated-binds' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2216 NAME 'nsslapd-require-secure-binds' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2217 NAME 'nsslapd-allow-anonymous-access' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2218 NAME 'nsslapd-localssf' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2219 NAME 'nsslapd-minssf' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2220 NAME 'nsslapd-minssf-exclude-rootdse' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2221 NAME 'nsslapd-validate-cert' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2222 NAME 'nsslapd-localuser' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2223 NAME 'nsslapd-localhost' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2224 NAME 'nsslapd-port' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2225 NAME 'nsslapd-workingdir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2226 NAME 'nsslapd-listenhost' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2227 NAME 'nsslapd-snmp-index' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2228 NAME 'nsslapd-ldapifilepath' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2229 NAME 'nsslapd-ldapilisten' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2230 NAME 'nsslapd-ldapiautobind' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2231 NAME 'nsslapd-ldapimaprootdn' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2232 NAME 'nsslapd-ldapimaptoentries' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2233 NAME 'nsslapd-ldapiuidnumbertype' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2234 NAME 'nsslapd-ldapigidnumbertype' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2235 NAME 'nsslapd-ldapientrysearchbase' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2236 NAME 'nsslapd-anonlimitsdn' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2237 NAME 'nsslapd-counters' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2238 NAME 'nsslapd-security' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2239 NAME 'nsslapd-SSL3ciphers' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2240 NAME 'nsslapd-accesslog' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2241 NAME 'nsslapd-errorlog' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2242 NAME 'nsslapd-securePort' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2243 NAME 'nsslapd-securelistenhost' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2244 NAME 'nnslapd-threadnumber' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2245 NAME 'nsslapd-maxthreadsperconn' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2246 NAME 'nsslapd-maxdescriptors' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2247 NAME 'nsslapd-conntablesize' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2248 NAME 'nsslapd-reservedescriptors' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2249 NAME 'nsslapd-idletimeout' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2250 NAME 'nsslapd-ioblocktimeout' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2251 NAME 'nsslapd-accesscontrol' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2252 NAME 'nsslapd-groupevalnestlevel' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2253 NAME 'nsslapd-nagle' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2254 NAME 'nsslapd-pwpolicy-local' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2255 NAME 'passwordIsGlobalPolicy' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2256 NAME 'passwordLegacyPolicy' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2257 NAME 'nsslapd-accesslog-logbuffering' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2258 NAME 'nsslapd-csnlogging' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2259 NAME 'nsslapd-return-exact-case' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2260 NAME 'nsslapd-result-tweak' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2261 NAME 'nsslapd-attribute-name-exceptions' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2262 NAME 'nsslapd-maxbersize' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2263 NAME 'nsslapd-maxsasliosize' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2264 NAME 'nsslapd-max-filter-nest-level' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2265 NAME 'nsslapd-versionstring' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2266 NAME 'nsslapd-enquote-sup-oc' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2267 NAME 'nsslapd-certmap-basedn' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2268 NAME 'nsslapd-accesslog-list' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2269 NAME 'nsslapd-errorlog-list' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2270 NAME 'nsslapd-auditlog-list' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2271 NAME 'nsslapd-rewrite-rfc1274' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2272 NAME 'nsslapd-plugin-binddn-tracking' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2273 NAME 'nsslapd-config' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2274 NAME 'nsslapd-instancedir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2275 NAME 'nsslapd-schemadir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2276 NAME 'nsslapd-lockdir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2277 NAME 'nsslapd-tmpdir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2278 NAME 'nsslapd-certdir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2279 NAME 'nsslapd-ldifdir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2280 NAME 'nsslapd-bakdir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2281 NAME 'nsslapd-saslpath' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2282 NAME 'nsslapd-rundir' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2283 NAME 'nsslapd-SSLclientAuth' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2284 NAME 'nsslapd-ssl-check-hostname' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2285 NAME 'nsslapd-hash-filters' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2286 NAME 'nsslapd-outbound-ldap-io-timeout' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2287 NAME 'nsslapd-force-sasl-external' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2288 NAME 'nsslapd-defaultnamingcontext' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2289 NAME 'nsslapd-disk-monitoring' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2290 NAME 'nsslapd-disk-monitoring-threshold' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2291 NAME 'nsslapd-disk-monitoring-grace-period' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2292 NAME 'nsslapd-disk-monitoring-logging-critical' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2293 NAME 'nsslapd-ndn-cache-enabled' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2294 NAME 'nsslapd-ndn-cache-max-size' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2295 NAME 'nsslapd-allowed-sasl-mechanisms' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2296 NAME 'nsslapd-ignore-virtual-attrs' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2297 NAME 'nsslapd-search-return-original-type-switch' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2298 NAME 'nsslapd-enable-turbo-mode' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2299 NAME 'nsslapd-connection-buffer' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2300 NAME 'nsslapd-connection-nocanon' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2301 NAME 'nsslapd-plugin-logging' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2302 NAME 'nsslapd-listen-backlog-size' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2303 NAME 'nsslapd-ignore-time-skew' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2304 NAME 'nsslapd-dynamic-plugins' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2305 NAME 'nsslapd-moddn-aci' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2306 NAME 'nsslapd-return-default-opattr' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE directoryOperation X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2307 NAME 'nsslapd-allow-hashed-passwords' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2308 NAME 'nstombstonecsn' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2309 NAME 'nsds5ReplicaPreciseTombstonePurging' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2310 NAME 'nsds5ReplicaFlowControlWindow' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2311 NAME 'nsds5ReplicaFlowControlPause' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2313 NAME 'nsslapd-changelogtrim-interval' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2314 NAME 'nsslapd-changelogcompactdb-interval' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2315 NAME 'nsDS5ReplicaWaitForAsyncResults' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2333 NAME 'nsds5ReplicaReleaseTimeout' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
#
# objectclasses
#
@@ -168,7 +321,7 @@ objectClasses: ( 2.16.840.1.113730.3.2.44 NAME 'nsIndex' DESC 'Netscape defined
objectClasses: ( 2.16.840.1.113730.3.2.109 NAME 'nsBackendInstance' DESC 'Netscape defined objectclass' SUP top MUST ( CN ) X-ORIGIN 'Netscape Directory Server' )
objectClasses: ( 2.16.840.1.113730.3.2.110 NAME 'nsMappingTree' DESC 'Netscape defined objectclass' SUP top MUST ( CN ) X-ORIGIN 'Netscape Directory Server' )
objectClasses: ( 2.16.840.1.113730.3.2.104 NAME 'nsContainer' DESC 'Netscape defined objectclass' SUP top MUST ( CN ) X-ORIGIN 'Netscape Directory Server' )
-objectClasses: ( 2.16.840.1.113730.3.2.108 NAME 'nsDS5Replica' DESC 'Netscape defined objectclass' SUP top MUST ( nsDS5ReplicaRoot $ nsDS5ReplicaId ) MAY (cn $ nsds5ReplicaCleanRUV $ nsds5ReplicaAbortCleanRUV $ nsDS5ReplicaType $ nsDS5ReplicaBindDN $ nsState $ nsDS5ReplicaName $ nsDS5Flags $ nsDS5Task $ nsDS5ReplicaReferral $ nsDS5ReplicaAutoReferral $ nsds5ReplicaPurgeDelay $ nsds5ReplicaTombstonePurgeInterval $ nsds5ReplicaChangeCount $ nsds5ReplicaLegacyConsumer) X-ORIGIN 'Netscape Directory Server' )
+objectClasses: ( 2.16.840.1.113730.3.2.108 NAME 'nsDS5Replica' DESC 'Netscape defined objectclass' SUP top MUST ( nsDS5ReplicaRoot $ nsDS5ReplicaId ) MAY (cn $ nsds5ReplicaCleanRUV $ nsds5ReplicaAbortCleanRUV $ nsDS5ReplicaType $ nsDS5ReplicaBindDN $ nsState $ nsDS5ReplicaName $ nsDS5Flags $ nsDS5Task $ nsDS5ReplicaReferral $ nsDS5ReplicaAutoReferral $ nsds5ReplicaPurgeDelay $ nsds5ReplicaTombstonePurgeInterval $ nsds5ReplicaChangeCount $ nsds5ReplicaLegacyConsumer $ nsds5ReplicaReleaseTimeout) X-ORIGIN 'Netscape Directory Server' )
objectClasses: ( 2.16.840.1.113730.3.2.113 NAME 'nsTombstone' DESC 'Netscape defined objectclass' SUP top MAY ( nsParentUniqueId $ nscpEntryDN ) X-ORIGIN 'Netscape Directory Server' )
objectClasses: ( 2.16.840.1.113730.3.2.103 NAME 'nsDS5ReplicationAgreement' DESC 'Netscape defined objectclass' SUP top MUST ( cn ) MAY ( nsds5ReplicaCleanRUVNotified $ nsDS5ReplicaHost $ nsDS5ReplicaPort $ nsDS5ReplicaTransportInfo $ nsDS5ReplicaBindDN $ nsDS5ReplicaCredentials $ nsDS5ReplicaBindMethod $ nsDS5ReplicaRoot $ nsDS5ReplicatedAttributeList $ nsDS5ReplicatedAttributeListTotal $ nsDS5ReplicaUpdateSchedule $ nsds5BeginReplicaRefresh $ description $ nsds50ruv $ nsruvReplicaLastModified $ nsds5ReplicaTimeout $ nsds5replicaChangesSentSinceStartup $ nsds5replicaLastUpdateEnd $ nsds5replicaLastUpdateStart $ nsds5replicaLastUpdateStatus $ nsds5replicaUpdateInProgress $ nsds5replicaLastInitEnd $ nsds5ReplicaEnabled $ nsds5replicaLastInitStart $ nsds5replicaLastInitStatus $ nsds5debugreplicatimeout $ nsds5replicaBusyWaitTime $ nsds5ReplicaStripAttrs $ nsds5replicaSessionPauseTime $ nsds5ReplicaFlowControlWindow $ nsds5ReplicaFlowControlPause ) X-ORIGIN 'Netscape Directory
Server' )
objectClasses: ( 2.16.840.1.113730.3.2.39 NAME 'nsslapdConfig' DESC 'Netscape defined objectclass' SUP top MAY ( cn ) X-ORIGIN 'Netscape Directory Server' )
diff --git a/ldap/servers/plugins/replication/repl5.h b/ldap/servers/plugins/replication/repl5.h
index ee161ef..a521389 100644
--- a/ldap/servers/plugins/replication/repl5.h
+++ b/ldap/servers/plugins/replication/repl5.h
@@ -100,6 +100,10 @@
#define REPL_ABORT_CLEANRUV_OID "2.16.840.1.113730.3.6.6"
#define REPL_CLEANRUV_GET_MAXCSN_OID "2.16.840.1.113730.3.6.7"
#define REPL_CLEANRUV_CHECK_STATUS_OID "2.16.840.1.113730.3.6.8"
+#define REPL_ABORT_SESSION_OID "2.16.840.1.113730.3.6.9"
+#define SESSION_ACQUIRED 0
+#define ABORT_SESSION 1
+#define SESSION_ABORTED 2
#define CLEANRUV_ACCEPTED "accepted"
#define CLEANRUV_REJECTED "rejected"
@@ -170,7 +174,7 @@ extern const char *type_nsds5ReplicaStripAttrs;
extern const char *type_nsds5ReplicaCleanRUVnotified;
extern const char *type_nsds5ReplicaFlowControlWindow;
extern const char *type_nsds5ReplicaFlowControlPause;
-
+extern const char *type_replicaReleaseTimeout;
/* Attribute names for windows replication agreements */
extern const char *type_nsds7WindowsReplicaArea;
@@ -523,9 +527,9 @@ Replica *replica_new_from_entry (Slapi_Entry *e, char *errortext, PRBool is_add_
void replica_destroy(void **arg);
int replica_subentry_update(Slapi_DN *repl_root, ReplicaId rid);
int replica_subentry_check(Slapi_DN *repl_root, ReplicaId rid);
-PRBool replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opid,
- const char *locking_purl,
- char **current_purl);
+PRBool replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid,
+ int opid, const char *locking_purl,
+ char **current_purl);
void replica_relinquish_exclusive_access(Replica *r, PRUint64 connid, int opid);
PRBool replica_get_tombstone_reap_active(const Replica *r);
const Slapi_DN *replica_get_root(const Replica *r);
@@ -589,7 +593,11 @@ void replica_set_ruv_dirty (Replica *r);
int replica_write_ruv (Replica *r);
char *replica_get_dn(Replica *r);
void replica_check_for_tasks(Replica*r, Slapi_Entry *e);
+PRUint64 replica_get_release_timeout(Replica *r);
+void replica_set_release_timeout(Replica *r, PRUint64 timeout);
+void replica_set_groupdn_checkinterval(Replica *r, int timeout);
PRBool ignore_error_and_keep_going(int error);
+void replica_check_release_timeout(Replica *r, Slapi_PBlock *pb);
/* The functions below handles the state flag */
/* Current internal state flags */
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index 02b54b3..e6920e8 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -65,6 +65,11 @@ Perhaps these events should be properties of the main protocol.
#include "repl5_prot_private.h"
#include "cl5_api.h"
+#include "repl5.h"
+#include "repl5_prot_private.h"
+#include "cl5_api.h"
+#include "slapi-plugin.h"
+
extern int slapi_log_urp;
/*** from proto-slap.h ***/
@@ -110,6 +115,7 @@ typedef struct result_data
int last_message_id_received;
int flowcontrol_detection;
int result; /* The UPDATE_TRANSIENT_ERROR etc */
+ time_t abort_time;
} result_data;
/* Various states the incremental protocol can pass through */
@@ -149,6 +155,7 @@ typedef struct result_data
#define EXAMINE_RUV_PARAM_ERROR 405
#define MAX_CHANGES_PER_SESSION 10000
+
/*
* Maximum time to wait between replication sessions. If we
* don't see any updates for a period equal to this interval,
@@ -268,19 +275,21 @@ static void repl5_inc_result_threadmain(void *param)
Repl_Connection *conn = rd->prp->conn;
int finished = 0;
int message_id = 0;
+ int yield_session = 0;
slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain starting\n");
while (!finished)
{
+ LDAPControl **returned_controls = NULL;
repl5_inc_operation *op = NULL;
- int connection_error = 0;
+ ReplicaId replica_id = 0;
char *csn_str = NULL;
char *uniqueid = NULL;
- ReplicaId replica_id = 0;
- int operation_code = 0;
char *ldap_error_string = NULL;
time_t time_now = 0;
time_t start_time = time( NULL );
+ int connection_error = 0;
+ int operation_code = 0;
int backoff_time = 1;
/* Read the next result */
@@ -292,7 +301,7 @@ static void repl5_inc_result_threadmain(void *param)
while (!finished)
{
- conres = conn_read_result_ex(conn, NULL, NULL, NULL, LDAP_RES_ANY, &message_id, 0);
+ conres = conn_read_result_ex(conn, NULL, NULL, &returned_controls, LDAP_RES_ANY, &message_id, 0);
slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: read result for message_id %d\n", message_id);
/* Timeout here means that we didn't block, not a real timeout */
if (CONN_TIMEOUT == conres)
@@ -320,9 +329,19 @@ static void repl5_inc_result_threadmain(void *param)
finished = 1;
}
PR_Unlock(rd->lock);
- } else
- {
- /* Something other than a timeout, so we exit the loop */
+ } else {
+ /*
+ * Something other than a timeout, so we exit the loop.
+ * First check if we were told to abort the session
+ */;
+ Replica *r = (Replica*)object_get_data(rd->prp->replica_object);
+ if (replica_get_release_timeout(r) &&
+ slapi_control_present(returned_controls,
+ REPL_ABORT_SESSION_OID,
+ NULL, NULL))
+ {
+ yield_session = 1;
+ }
break;
}
}
@@ -346,21 +365,29 @@ static void repl5_inc_result_threadmain(void *param)
}
conn_get_error_ex(conn, &operation_code, &connection_error, &ldap_error_string);
- slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: result %d, %d, %d, %d, %s\n", operation_code,connection_error,conres,message_id,ldap_error_string);
- return_value = repl5_inc_update_from_op_result(rd->prp, conres, connection_error, csn_str, uniqueid, replica_id, &should_finish, &(rd->num_changes_sent));
+ slapi_log_error(SLAPI_LOG_REPL, NULL,
+ "repl5_inc_result_threadmain: result %d, %d, %d, %d, %s\n",
+ operation_code,connection_error,conres,message_id,ldap_error_string);
+ return_value = repl5_inc_update_from_op_result(rd->prp, conres, connection_error,
+ csn_str, uniqueid, replica_id, &should_finish,
+ &(rd->num_changes_sent));
if (return_value || should_finish)
{
- slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: got op result %d should finish %d\n", return_value, should_finish);
+ slapi_log_error(SLAPI_LOG_REPL, NULL,
+ "repl5_inc_result_threadmain: got op result %d should finish %d\n",
+ return_value, should_finish);
/* If so then we need to take steps to abort the update process */
PR_Lock(rd->lock);
rd->result = return_value;
- rd->abort = 1;
+ rd->abort = ABORT_SESSION;
PR_Unlock(rd->lock);
- /* We also need to log the error, including details stored from when the operation was sent */
- /* we cannot finish yet - we still need to waitfor the pending results, then
- the main repl code will shut down this thread */
- /* we can finish if we have disconnected - in that case, there will be nothing
- to read */
+ /*
+ * We also need to log the error, including details stored from
+ * when the operation was sent. We cannot finish yet - we still
+ * need to wait for the pending results, then the main repl code
+ * will shut down this thread. We can finish if we have
+ * disconnected - in that case, there will be nothing to read
+ */
if (return_value == UPDATE_CONNECTION_LOST) {
finished = 1;
}
@@ -369,8 +396,16 @@ static void repl5_inc_result_threadmain(void *param)
rd->result = return_value;
}
}
+
/* Should we stop ? */
PR_Lock(rd->lock);
+ if (!finished && yield_session && rd->abort != SESSION_ABORTED && rd->abort_time == 0) {
+ rd->abort_time = time( NULL );
+ rd->abort = SESSION_ABORTED; /* only set the abort time once */
+ slapi_log_error(SLAPI_LOG_REPL, "repl5_inc_result_threadmain",
+ "Abort control detected, setting abort time...(%s)\n",
+ agmt_get_long_name(rd->prp->agmt));
+ }
if (rd->stop_result_thread)
{
finished = 1;
@@ -497,8 +532,7 @@ repl5_inc_waitfor_async_results(result_data *rd)
{
/* If so then we're done */
done = 1;
- }
- if (rd->abort && (rd->result == UPDATE_CONNECTION_LOST))
+ } else if (rd->abort && (rd->result == UPDATE_CONNECTION_LOST))
{
done = 1; /* no connection == no more results */
}
@@ -877,7 +911,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
if (!busywaittime){
busywaittime = PROTOCOL_BUSY_BACKOFF_MINIMUM;
}
- prp_priv->backoff = backoff_new(BACKOFF_FIXED, busywaittime, busywaittime);
+ prp_priv->backoff = backoff_new(BACKOFF_FIXED, busywaittime , busywaittime);
} else {
prp_priv->backoff = backoff_new(BACKOFF_EXPONENTIAL, PROTOCOL_BACKOFF_MINIMUM,
PROTOCOL_BACKOFF_MAXIMUM);
@@ -1075,6 +1109,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
} else if (rc == UPDATE_YIELD){
dev_debug("repl5_inc_run(STATE_SENDING_UPDATES) -> send_updates = UPDATE_YIELD -> STATE_BACKOFF_START");
agmt_set_last_update_status(prp->agmt, 0, 0, "Incremental update succeeded and yielded");
+ use_busy_backoff_timer = PR_TRUE;
next_state = STATE_BACKOFF_START;
} else if (rc == UPDATE_TRANSIENT_ERROR){
dev_debug("repl5_inc_run(STATE_SENDING_UPDATES) -> send_updates = UPDATE_TRANSIENT_ERROR -> STATE_BACKOFF_START");
@@ -1110,6 +1145,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
agmt_set_last_update_end(prp->agmt, current_time());
agmt_set_update_in_progress(prp->agmt, PR_FALSE);
agmt_update_done(prp->agmt, 0);
+
/* If timed out, close the connection after released the replica */
release_replica(prp);
if (rc == UPDATE_TIMEOUT) {
@@ -1697,12 +1733,14 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
}
else
{
- int finished = 0;
ConnResult replay_crc;
- char csn_str[CSN_STRSIZE];
+ Replica *replica = (Replica*) object_get_data(prp->replica_object);
PRBool subentry_update_needed = PR_FALSE;
+ PRUint64 release_timeout = replica_get_release_timeout(replica);
+ char csn_str[CSN_STRSIZE];
int skipped_updates = 0;
int fractional_repl;
+ int finished = 0;
#define FRACTIONAL_SKIPPED_THRESHOLD 100
/* Start the results reading thread */
@@ -1922,7 +1960,20 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
}
PR_Lock(rd->lock);
/* See if the result thread has hit a problem */
- if (!finished && rd->abort)
+
+ if(!finished && rd->abort_time){
+ time_t current_time = time ( NULL );
+ if ((current_time - rd->abort_time) >= release_timeout){
+ rd->result = UPDATE_YIELD;
+ return_value = UPDATE_YIELD;
+ finished = 1;
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "Aborting send_updates...(%s)\n",
+ agmt_get_long_name(rd->prp->agmt));
+ }
+ }
+
+ if (!finished && rd->abort == ABORT_SESSION)
{
return_value = rd->result;
finished = 1;
@@ -1932,9 +1983,9 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
if (fractional_repl && subentry_update_needed)
{
- Replica *replica;
ReplicaId rid = -1; /* Used to create the replica keep alive subentry */
replica = (Replica*) object_get_data(prp->replica_object);
+
if (replica)
{
rid = replica_get_rid(replica);
@@ -1953,7 +2004,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
* If we already have an error, there is no need to check the
* async result thread anymore.
*/
- if (return_value == UPDATE_NO_MORE_UPDATES)
+ if (return_value == UPDATE_NO_MORE_UPDATES || return_value == UPDATE_YIELD)
{
/*
* We need to double check that an error hasn't popped up from
diff --git a/ldap/servers/plugins/replication/repl5_plugins.c b/ldap/servers/plugins/replication/repl5_plugins.c
index e6b0629..9cd3845 100644
--- a/ldap/servers/plugins/replication/repl5_plugins.c
+++ b/ldap/servers/plugins/replication/repl5_plugins.c
@@ -1017,6 +1017,8 @@ write_changelog_and_ruv (Slapi_PBlock *pb)
r = (Replica*)object_get_data (repl_obj);
PR_ASSERT (r);
+ replica_check_release_timeout(r, pb);
+
if (replica_is_flag_set (r, REPLICA_LOG_CHANGES) &&
(cl5GetState () == CL5_STATE_OPEN))
{
@@ -1292,7 +1294,6 @@ process_postop (Slapi_PBlock *pb)
return rc;
}
-
/*
* Cancel an operation CSN. This removes it from any CSN pending lists.
* This function is called when a previously-generated CSN will not
diff --git a/ldap/servers/plugins/replication/repl5_replica.c b/ldap/servers/plugins/replication/repl5_replica.c
index d2f331e..8b1b4e1 100644
--- a/ldap/servers/plugins/replication/repl5_replica.c
+++ b/ldap/servers/plugins/replication/repl5_replica.c
@@ -53,8 +53,8 @@
#define RUV_SAVE_INTERVAL (30 * 1000) /* 30 seconds */
#define START_UPDATE_DELAY 2 /* 2 second */
-#define REPLICA_RDN "cn=replica"
-#define CHANGELOG_RDN "cn=legacy changelog"
+#define REPLICA_RDN "cn=replica"
+#define CHANGELOG_RDN "cn=legacy changelog"
/*
* A replica is a locally-held copy of a portion of the DIT.
@@ -88,6 +88,8 @@ struct replica {
PRBool state_update_inprogress; /* replica state is being updated */
PRLock *agmt_lock; /* protects agreement creation, start and stop */
char *locking_purl; /* supplier who has exclusive access */
+ Slapi_Counter *release_timeout; /* The amount of time to wait before releasing active replica */
+ PRUint64 abort_session; /* Abort the current replica session */
};
@@ -220,6 +222,8 @@ replica_new_from_entry (Slapi_Entry *e, char *errortext, PRBool is_add_operation
goto done;
}
+ r->release_timeout = slapi_counter_new();
+
/* read parameters from the replica config entry */
rc = _replica_init_from_config (r, e, errortext);
if (rc != 0)
@@ -406,6 +410,7 @@ replica_destroy(void **arg)
csnplFree(&r->min_csn_pl);;
}
+ slapi_counter_destroy(&r->release_timeout);
slapi_ch_free((void **)arg);
}
@@ -580,8 +585,7 @@ replica_subentry_update(Slapi_DN *repl_root, ReplicaId rid)
*/
PRBool
replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opid,
- const char *locking_purl,
- char **current_purl)
+ const char *locking_purl, char **current_purl)
{
PRBool rval = PR_TRUE;
@@ -604,6 +608,15 @@ replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opi
{
*current_purl = slapi_ch_strdup(r->locking_purl);
}
+ if (!(r->repl_state_flags & REPLICA_TOTAL_IN_PROGRESS) &&
+ replica_get_release_timeout(r))
+ {
+ /*
+ * We are not doing a total update, so abort the current session
+ * so other replicas can acquire this server.
+ */
+ r->abort_session = ABORT_SESSION;
+ }
}
else
{
@@ -612,14 +625,17 @@ replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opi
connid, opid,
slapi_sdn_get_dn(r->repl_root));
r->repl_state_flags |= REPLICA_IN_USE;
+ r->abort_session = SESSION_ACQUIRED;
if (isInc && *isInc)
{
r->repl_state_flags |= REPLICA_INCREMENTAL_IN_PROGRESS;
}
else
{
- /* if connid or opid != 0, it's a total update */
- /* Both set to 0 means we're disabling replication */
+ /*
+ * If connid or opid != 0, it's a total update.
+ * Both set to 0 means we're disabling replication
+ */
if (connid || opid)
{
r->repl_state_flags |= REPLICA_TOTAL_IN_PROGRESS;
@@ -647,13 +663,13 @@ replica_relinquish_exclusive_access(Replica *r, PRUint64 connid, int opid)
/* check to see if the replica is in use and log a warning if not */
if (!(r->repl_state_flags & REPLICA_IN_USE))
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Replica not in use\n",
connid, opid,
slapi_sdn_get_dn(r->repl_root));
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Released replica held by locking_purl=%s\n",
connid, opid,
@@ -955,6 +971,24 @@ replica_get_type (const Replica *r)
return r->repl_type;
}
+PRUint64
+replica_get_release_timeout(Replica *r)
+{
+ if(r){
+ return slapi_counter_get_value(r->release_timeout);
+ } else {
+ return 0;
+ }
+}
+
+void
+replica_set_release_timeout(Replica *r, PRUint64 limit)
+{
+ if(r){
+ slapi_counter_set_value(r->release_timeout, limit);
+ }
+}
+
/*
* Sets the replica type.
*/
@@ -1034,11 +1068,7 @@ replica_get_legacy_purl (const Replica *r)
char *purl;
replica_lock(r->repl_lock);
-
- PR_ASSERT (r->legacy_consumer);
-
purl = slapi_ch_strdup(r->legacy_purl);
-
replica_unlock(r->repl_lock);
return purl;
@@ -1796,6 +1826,7 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char *errortext)
char buf [SLAPI_DSE_RETURNTEXT_SIZE];
char *errormsg = errortext? errortext : buf;
Slapi_Attr *a = NULL;
+ int release_timeout = 0;
PR_ASSERT (r && e);
@@ -1842,9 +1873,13 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char *errortext)
slapi_ch_free ((void**)&val);
}
- else
- {
- r->legacy_consumer = PR_FALSE;
+
+ /* Get the release timeout */
+ release_timeout = slapi_entry_attr_get_int(e, type_replicaReleaseTimeout);
+ if(release_timeout <= 0){
+ slapi_counter_set_value(r->release_timeout, 0);
+ } else {
+ slapi_counter_set_value(r->release_timeout, release_timeout);
}
/* get replica flags */
@@ -3833,21 +3868,21 @@ replica_disable_replication (Replica *r, Object *r_obj)
ruv_get_first_id_and_purl(repl_ruv, &junkrid, &p_locking_purl);
locking_purl = slapi_ch_strdup(p_locking_purl);
p_locking_purl = NULL;
- repl_ruv = NULL;
- while (!replica_get_exclusive_access(r, &isInc, 0, 0, "replica_disable_replication",
+ repl_ruv = NULL;
+ while (!replica_get_exclusive_access(r, &isInc, 0, 0, "replica_disable_replication",
¤t_purl)) {
- if (!isInc) /* already locked, but not by inc update - break */
- break;
- isInc = PR_FALSE;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ if (!isInc) /* already locked, but not by inc update - break */
+ break;
+ isInc = PR_FALSE;
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"replica_disable_replication: "
"replica %s is already locked by (%s) for incoming "
"incremental update; sleeping 100ms\n",
- slapi_sdn_get_ndn (replica_get_root (r)),
+ slapi_sdn_get_ndn (replica_get_root (r)),
current_purl ? current_purl : "unknown");
slapi_ch_free_string(¤t_purl);
- DS_Sleep(PR_MillisecondsToInterval(100));
- }
+ DS_Sleep(PR_MillisecondsToInterval(100));
+ }
slapi_ch_free_string(¤t_purl);
slapi_ch_free_string(&locking_purl);
@@ -4007,3 +4042,57 @@ replica_get_attr ( Slapi_PBlock *pb, const char* type, void *value )
return rc;
}
+
+/*
+ * Add the "Abort Replication Session" control to the pblock
+ */
+static void
+replica_add_session_abort_control(Slapi_PBlock *pb)
+{
+ LDAPControl ctrl = {0};
+ BerElement *ber;
+ struct berval *bvp;
+ int rc;
+
+ /* Build the BER payload */
+ if ( (ber = der_alloc()) == NULL ) {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "add_session_abort_control: Failed to create ber\n");
+ return;
+ }
+ rc = ber_printf( ber, "{}");
+ if (rc != -1) {
+ rc = ber_flatten( ber, &bvp );
+ }
+ ber_free( ber, 1 );
+ if ( rc == -1 ) {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "add_session_abort_control: Failed to flatten ber\n");
+ return;
+ }
+
+ ctrl.ldctl_oid = slapi_ch_strdup( REPL_ABORT_SESSION_OID );
+ ctrl.ldctl_value = *bvp;
+ bvp->bv_val = NULL;
+ ber_bvfree( bvp );
+ slapi_pblock_set(pb, SLAPI_ADD_RESCONTROL, &ctrl);
+
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "add_session_abort_control: abort control successfully added to result\n");
+}
+
+/*
+ * Check if we have exceeded the failed replica acquire limit,
+ * if so, end the replication session.
+ */
+void
+replica_check_release_timeout(Replica *r, Slapi_PBlock *pb)
+{
+ replica_lock(r->repl_lock);
+ if(r->abort_session == ABORT_SESSION){
+ /* Need to abort this session (just send the control once) */
+ replica_add_session_abort_control(pb);
+ r->abort_session = SESSION_ABORTED;
+ }
+ replica_unlock(r->repl_lock);
+}
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index 68b3ce5..f8db8e8 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -399,6 +399,11 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
/* only allow the deletion of the cleanAllRUV config attributes */
continue;
}
+ else if (strcasecmp (config_attr, type_replicaReleaseTimeout) == 0 )
+ {
+ if (apply_mods)
+ replica_set_release_timeout(r, 0);
+ }
else
{
*returncode = LDAP_UNWILLING_TO_PERFORM;
@@ -488,6 +493,23 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
{
*returncode = LDAP_SUCCESS;
}
+ else if (strcasecmp (config_attr, type_replicaReleaseTimeout) == 0 )
+ {
+ if (apply_mods)
+ {
+ PRUint64 val = atoll(config_attr_value);
+
+ if(val < 0){
+ *returncode = LDAP_UNWILLING_TO_PERFORM;
+ PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
+ "attribute %s value (%s) is invalid, must be a number zero or greater.\n",
+ config_attr, config_attr_value);
+ slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_modify: %s\n", errortext);
+ break;
+ }
+ replica_set_release_timeout(r, val);
+ }
+ }
else
{
*returncode = LDAP_UNWILLING_TO_PERFORM;
diff --git a/ldap/servers/plugins/replication/repl_globals.c b/ldap/servers/plugins/replication/repl_globals.c
index bfcff03..1d35241 100644
--- a/ldap/servers/plugins/replication/repl_globals.c
+++ b/ldap/servers/plugins/replication/repl_globals.c
@@ -112,6 +112,7 @@ const char *type_replicaLegacyConsumer = "nsds5ReplicaLegacyConsumer";
const char *type_ruvElementUpdatetime = "nsruvReplicaLastModified";
const char *type_replicaCleanRUV = "nsds5ReplicaCleanRUV";
const char *type_replicaAbortCleanRUV = "nsds5ReplicaAbortCleanRUV";
+const char *type_replicaReleaseTimeout = "nsds5ReplicaReleaseTimeout";
/* Attribute names for replication agreement attributes */
const char *type_nsds5ReplicaHost = "nsds5ReplicaHost";
7 years, 10 months
Branch '389-ds-base-1.3.3' - ldap/servers
by Mark Reynolds
ldap/servers/plugins/replication/repl5_replica_config.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit c66ba8cb24c35d186b14f169e9206269067891a0
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jun 14 17:19:48 2016 -0400
Ticket 48636 - Fix config validation check
Bug Description: We were previous checking if an unsigfned int was less than zero
Fix Description: Improve config validation by using long instead of PRUint64
https://fedorahosted.org/389/ticket/48636
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit 43d5ac680f7781f95205db94e5ff2958d39b78a4)
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index 4456f58..a013ebf 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -630,17 +630,20 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
{
if (apply_mods)
{
- PRUint64 val = atoll(config_attr_value);
+ long val = atol(config_attr_value);
- if(val < 0){
+ if (val < 0){
*returncode = LDAP_UNWILLING_TO_PERFORM;
- PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
+ PR_snprintf(errortext, SLAPI_DSE_RETURNTEXT_SIZE,
"attribute %s value (%s) is invalid, must be a number zero or greater.\n",
config_attr, config_attr_value);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_modify: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ "replica_config_modify: %s\n", errortext);
break;
+ } else {
+ /* Set the timeout */
+ replica_set_release_timeout(r, val);
}
- replica_set_release_timeout(r, val);
}
}
else
7 years, 10 months
Branch '389-ds-base-1.3.3' - ldap/schema ldap/servers
by Mark Reynolds
ldap/schema/01core389.ldif | 3
ldap/servers/plugins/replication/repl5.h | 14 +
ldap/servers/plugins/replication/repl5_inc_protocol.c | 101 +++++++++--
ldap/servers/plugins/replication/repl5_plugins.c | 3
ldap/servers/plugins/replication/repl5_replica.c | 135 +++++++++++++---
ldap/servers/plugins/replication/repl5_replica_config.c | 22 ++
ldap/servers/plugins/replication/repl_globals.c | 1
7 files changed, 229 insertions(+), 50 deletions(-)
New commits:
commit f223b500264d00c5c2b97bf903bd501be1487afe
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Wed Jun 8 13:06:46 2016 -0400
Ticket 48636 - Improve replication convergence
Bug Description: In a busy MMR environment where multiple masters are being
updated at the same time the replica sessions stay open for
a very long time. This causes other masters to wait to send
their updates. This causes lop-sided convergence. Where
entries added to the MMR environment, but on different masters,
take a very different amount of time until they are each seen
on all the replicas.
Fix Description: A new configuratoin setting was added (nsds5ReplicaReleaseTimeout)
to the replica configuration entry. So when replica A tries
to acquire a replica B, replica B send a control back to the
master(master C) that is updating replica B to abort the session.
Master C will continue sending updates for the amount of time
specified in the the "release timeout", then it will "yield" its
current session so other replicas can acquire that replica.
https://fedorahosted.org/389/ticket/48636
Reviewed by: lkrispen & nhosoi(Thanks!!)
(cherry picked from commit a1545cdae48e4b4e1fc87a168e4d8f959626f112)
diff --git a/ldap/schema/01core389.ldif b/ldap/schema/01core389.ldif
index ffd8710..a668771 100644
--- a/ldap/schema/01core389.ldif
+++ b/ldap/schema/01core389.ldif
@@ -307,6 +307,7 @@ attributeTypes: ( 2.16.840.1.113730.3.1.2311 NAME 'nsds5ReplicaFlowControlPause'
attributeTypes: ( 2.16.840.1.113730.3.1.2313 NAME 'nsslapd-changelogtrim-interval' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2314 NAME 'nsslapd-changelogcompactdb-interval' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2315 NAME 'nsDS5ReplicaWaitForAsyncResults' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2333 NAME 'nsds5ReplicaReleaseTimeout' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
#
# objectclasses
#
@@ -316,7 +317,7 @@ objectClasses: ( 2.16.840.1.113730.3.2.44 NAME 'nsIndex' DESC 'Netscape defined
objectClasses: ( 2.16.840.1.113730.3.2.109 NAME 'nsBackendInstance' DESC 'Netscape defined objectclass' SUP top MUST ( CN ) X-ORIGIN 'Netscape Directory Server' )
objectClasses: ( 2.16.840.1.113730.3.2.110 NAME 'nsMappingTree' DESC 'Netscape defined objectclass' SUP top MUST ( CN ) X-ORIGIN 'Netscape Directory Server' )
objectClasses: ( 2.16.840.1.113730.3.2.104 NAME 'nsContainer' DESC 'Netscape defined objectclass' SUP top MUST ( CN ) X-ORIGIN 'Netscape Directory Server' )
-objectClasses: ( 2.16.840.1.113730.3.2.108 NAME 'nsDS5Replica' DESC 'Netscape defined objectclass' SUP top MUST ( nsDS5ReplicaRoot $ nsDS5ReplicaId ) MAY (cn $ nsds5ReplicaPreciseTombstonePurging $ nsds5ReplicaCleanRUV $ nsds5ReplicaAbortCleanRUV $ nsDS5ReplicaType $ nsDS5ReplicaBindDN $ nsState $ nsDS5ReplicaName $ nsDS5Flags $ nsDS5Task $ nsDS5ReplicaReferral $ nsDS5ReplicaAutoReferral $ nsds5ReplicaPurgeDelay $ nsds5ReplicaTombstonePurgeInterval $ nsds5ReplicaChangeCount $ nsds5ReplicaLegacyConsumer $ nsds5ReplicaProtocolTimeout $ nsds5ReplicaBackoffMin $ nsds5ReplicaBackoffMax ) X-ORIGIN 'Netscape Directory Server' )
+objectClasses: ( 2.16.840.1.113730.3.2.108 NAME 'nsDS5Replica' DESC 'Netscape defined objectclass' SUP top MUST ( nsDS5ReplicaRoot $ nsDS5ReplicaId ) MAY (cn $ nsds5ReplicaPreciseTombstonePurging $ nsds5ReplicaCleanRUV $ nsds5ReplicaAbortCleanRUV $ nsDS5ReplicaType $ nsDS5ReplicaBindDN $ nsState $ nsDS5ReplicaName $ nsDS5Flags $ nsDS5Task $ nsDS5ReplicaReferral $ nsDS5ReplicaAutoReferral $ nsds5ReplicaPurgeDelay $ nsds5ReplicaTombstonePurgeInterval $ nsds5ReplicaChangeCount $ nsds5ReplicaLegacyConsumer $ nsds5ReplicaProtocolTimeout $ nsds5ReplicaBackoffMin $ nsds5ReplicaBackoffMax $ nsds5ReplicaReleaseTimeout ) X-ORIGIN 'Netscape Directory Server' )
objectClasses: ( 2.16.840.1.113730.3.2.113 NAME 'nsTombstone' DESC 'Netscape defined objectclass' SUP top MAY ( nstombstonecsn $ nsParentUniqueId $ nscpEntryDN ) X-ORIGIN 'Netscape Directory Server' )
objectClasses: ( 2.16.840.1.113730.3.2.103 NAME 'nsDS5ReplicationAgreement' DESC 'Netscape defined objectclass' SUP top MUST ( cn ) MAY ( nsds5ReplicaCleanRUVNotified $ nsDS5ReplicaHost $ nsDS5ReplicaPort $ nsDS5ReplicaTransportInfo $ nsDS5ReplicaBindDN $ nsDS5ReplicaCredentials $ nsDS5ReplicaBindMethod $ nsDS5ReplicaRoot $ nsDS5ReplicatedAttributeList $ nsDS5ReplicatedAttributeListTotal $ nsDS5ReplicaUpdateSchedule $ nsds5BeginReplicaRefresh $ description $ nsds50ruv $ nsruvReplicaLastModified $ nsds5ReplicaTimeout $ nsds5replicaChangesSentSinceStartup $ nsds5replicaLastUpdateEnd $ nsds5replicaLastUpdateStart $ nsds5replicaLastUpdateStatus $ nsds5replicaUpdateInProgress $ nsds5replicaLastInitEnd $ nsds5ReplicaEnabled $ nsds5replicaLastInitStart $ nsds5replicaLastInitStatus $ nsds5debugreplicatimeout $ nsds5replicaBusyWaitTime $ nsds5ReplicaStripAttrs $ nsds5replicaSessionPauseTime $ nsds5ReplicaProtocolTimeout $ nsds5ReplicaFlowControlWindow $ nsds5ReplicaFlowControlPause $
nsDS5ReplicaWaitForAsyncResults ) X-ORIGIN 'Netscape Directory Server' )
objectClasses: ( 2.16.840.1.113730.3.2.39 NAME 'nsslapdConfig' DESC 'Netscape defined objectclass' SUP top MAY ( cn ) X-ORIGIN 'Netscape Directory Server' )
diff --git a/ldap/servers/plugins/replication/repl5.h b/ldap/servers/plugins/replication/repl5.h
index 9f943c9..c12b6a4 100644
--- a/ldap/servers/plugins/replication/repl5.h
+++ b/ldap/servers/plugins/replication/repl5.h
@@ -101,6 +101,10 @@
#define REPL_ABORT_CLEANRUV_OID "2.16.840.1.113730.3.6.6"
#define REPL_CLEANRUV_GET_MAXCSN_OID "2.16.840.1.113730.3.6.7"
#define REPL_CLEANRUV_CHECK_STATUS_OID "2.16.840.1.113730.3.6.8"
+#define REPL_ABORT_SESSION_OID "2.16.840.1.113730.3.6.9"
+#define SESSION_ACQUIRED 0
+#define ABORT_SESSION 1
+#define SESSION_ABORTED 2
#define CLEANRUV_ACCEPTED "accepted"
#define CLEANRUV_REJECTED "rejected"
@@ -173,6 +177,7 @@ extern const char *type_nsds5ReplicaStripAttrs;
extern const char *type_nsds5ReplicaFlowControlWindow;
extern const char *type_nsds5ReplicaFlowControlPause;
extern const char *type_replicaProtocolTimeout;
+extern const char *type_replicaReleaseTimeout;
extern const char *type_replicaBackoffMin;
extern const char *type_replicaBackoffMax;
extern const char *type_replicaPrecisePurge;
@@ -558,9 +563,9 @@ Replica *replica_new_from_entry (Slapi_Entry *e, char *errortext, PRBool is_add_
void replica_destroy(void **arg);
int replica_subentry_update(Slapi_DN *repl_root, ReplicaId rid);
int replica_subentry_check(Slapi_DN *repl_root, ReplicaId rid);
-PRBool replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opid,
- const char *locking_purl,
- char **current_purl);
+PRBool replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid,
+ int opid, const char *locking_purl,
+ char **current_purl);
void replica_relinquish_exclusive_access(Replica *r, PRUint64 connid, int opid);
PRBool replica_get_tombstone_reap_active(const Replica *r);
const Slapi_DN *replica_get_root(const Replica *r);
@@ -630,6 +635,8 @@ void replica_update_state (time_t when, void *arg);
void replica_reset_csn_pl(Replica *r);
PRUint64 replica_get_protocol_timeout(Replica *r);
void replica_set_protocol_timeout(Replica *r, PRUint64 timeout);
+PRUint64 replica_get_release_timeout(Replica *r);
+void replica_set_release_timeout(Replica *r, PRUint64 timeout);
void replica_set_groupdn_checkinterval(Replica *r, int timeout);
PRUint64 replica_get_backoff_min(Replica *r);
PRUint64 replica_get_backoff_max(Replica *r);
@@ -641,6 +648,7 @@ void replica_decr_agmt_count(Replica *r);
PRUint64 replica_get_precise_purging(Replica *r);
void replica_set_precise_purging(Replica *r, PRUint64 on_off);
PRBool ignore_error_and_keep_going(int error);
+void replica_check_release_timeout(Replica *r, Slapi_PBlock *pb);
/* The functions below handles the state flag */
/* Current internal state flags */
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index 4c3d90a..bc584be 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -65,6 +65,11 @@ Perhaps these events should be properties of the main protocol.
#include "repl5_prot_private.h"
#include "cl5_api.h"
+#include "repl5.h"
+#include "repl5_prot_private.h"
+#include "cl5_api.h"
+#include "slapi-plugin.h"
+
extern int slapi_log_urp;
/*** from proto-slap.h ***/
@@ -111,6 +116,7 @@ typedef struct result_data
int flowcontrol_detection;
int result; /* The UPDATE_TRANSIENT_ERROR etc */
int WaitForAsyncResults;
+ time_t abort_time;
} result_data;
/* Various states the incremental protocol can pass through */
@@ -150,6 +156,7 @@ typedef struct result_data
#define EXAMINE_RUV_PARAM_ERROR 405
#define MAX_CHANGES_PER_SESSION 10000
+
/*
* Maximum time to wait between replication sessions. If we
* don't see any updates for a period equal to this interval,
@@ -269,19 +276,21 @@ repl5_inc_result_threadmain(void *param)
Repl_Connection *conn = rd->prp->conn;
int finished = 0;
int message_id = 0;
+ int yield_session = 0;
slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain starting\n");
while (!finished)
{
+ LDAPControl **returned_controls = NULL;
repl5_inc_operation *op = NULL;
- int connection_error = 0;
+ ReplicaId replica_id = 0;
char *csn_str = NULL;
char *uniqueid = NULL;
- ReplicaId replica_id = 0;
- int operation_code = 0;
char *ldap_error_string = NULL;
time_t time_now = 0;
time_t start_time = time( NULL );
+ int connection_error = 0;
+ int operation_code = 0;
int backoff_time = 1;
/* Read the next result */
@@ -293,7 +302,7 @@ repl5_inc_result_threadmain(void *param)
while (!finished)
{
- conres = conn_read_result_ex(conn, NULL, NULL, NULL, LDAP_RES_ANY, &message_id, 0);
+ conres = conn_read_result_ex(conn, NULL, NULL, &returned_controls, LDAP_RES_ANY, &message_id, 0);
slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: read result for message_id %d\n", message_id);
/* Timeout here means that we didn't block, not a real timeout */
if (CONN_TIMEOUT == conres)
@@ -321,9 +330,19 @@ repl5_inc_result_threadmain(void *param)
finished = 1;
}
PR_Unlock(rd->lock);
- } else
- {
- /* Something other than a timeout, so we exit the loop */
+ } else {
+ /*
+ * Something other than a timeout, so we exit the loop.
+ * First check if we were told to abort the session
+ */;
+ Replica *r = (Replica*)object_get_data(rd->prp->replica_object);
+ if (replica_get_release_timeout(r) &&
+ slapi_control_present(returned_controls,
+ REPL_ABORT_SESSION_OID,
+ NULL, NULL))
+ {
+ yield_session = 1;
+ }
break;
}
}
@@ -347,21 +366,29 @@ repl5_inc_result_threadmain(void *param)
}
conn_get_error_ex(conn, &operation_code, &connection_error, &ldap_error_string);
- slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: result %d, %d, %d, %d, %s\n", operation_code,connection_error,conres,message_id,ldap_error_string);
- return_value = repl5_inc_update_from_op_result(rd->prp, conres, connection_error, csn_str, uniqueid, replica_id, &should_finish, &(rd->num_changes_sent));
+ slapi_log_error(SLAPI_LOG_REPL, NULL,
+ "repl5_inc_result_threadmain: result %d, %d, %d, %d, %s\n",
+ operation_code,connection_error,conres,message_id,ldap_error_string);
+ return_value = repl5_inc_update_from_op_result(rd->prp, conres, connection_error,
+ csn_str, uniqueid, replica_id, &should_finish,
+ &(rd->num_changes_sent));
if (return_value || should_finish)
{
- slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: got op result %d should finish %d\n", return_value, should_finish);
+ slapi_log_error(SLAPI_LOG_REPL, NULL,
+ "repl5_inc_result_threadmain: got op result %d should finish %d\n",
+ return_value, should_finish);
/* If so then we need to take steps to abort the update process */
PR_Lock(rd->lock);
rd->result = return_value;
- rd->abort = 1;
+ rd->abort = ABORT_SESSION;
PR_Unlock(rd->lock);
- /* We also need to log the error, including details stored from when the operation was sent */
- /* we cannot finish yet - we still need to waitfor the pending results, then
- the main repl code will shut down this thread */
- /* we can finish if we have disconnected - in that case, there will be nothing
- to read */
+ /*
+ * We also need to log the error, including details stored from
+ * when the operation was sent. We cannot finish yet - we still
+ * need to wait for the pending results, then the main repl code
+ * will shut down this thread. We can finish if we have
+ * disconnected - in that case, there will be nothing to read
+ */
if (return_value == UPDATE_CONNECTION_LOST) {
finished = 1;
}
@@ -370,8 +397,16 @@ repl5_inc_result_threadmain(void *param)
rd->result = return_value;
}
}
+
/* Should we stop ? */
PR_Lock(rd->lock);
+ if (!finished && yield_session && rd->abort != SESSION_ABORTED && rd->abort_time == 0) {
+ rd->abort_time = time( NULL );
+ rd->abort = SESSION_ABORTED; /* only set the abort time once */
+ slapi_log_error(SLAPI_LOG_REPL, "repl5_inc_result_threadmain",
+ "Abort control detected, setting abort time...(%s)\n",
+ agmt_get_long_name(rd->prp->agmt));
+ }
if (rd->stop_result_thread)
{
finished = 1;
@@ -497,7 +532,8 @@ repl5_inc_waitfor_async_results(result_data *rd)
if (rd->last_message_id_received >= rd->last_message_id_sent) {
/* If so then we're done */
done = 1;
- } else if (rd->abort && (rd->result == UPDATE_CONNECTION_LOST)) {
+ } else if (rd->abort && (rd->result == UPDATE_CONNECTION_LOST))
+ {
done = 1; /* no connection == no more results */
}
/*
@@ -875,10 +911,10 @@ repl5_inc_run(Private_Repl_Protocol *prp)
if (!busywaittime){
busywaittime = repl5_get_backoff_min(prp);
}
- prp_priv->backoff = backoff_new(BACKOFF_FIXED, busywaittime, busywaittime);
+ prp_priv->backoff = backoff_new(BACKOFF_FIXED, busywaittime , busywaittime);
} else {
prp_priv->backoff = backoff_new(BACKOFF_EXPONENTIAL, repl5_get_backoff_min(prp),
- repl5_get_backoff_max(prp));
+ repl5_get_backoff_max(prp));
}
next_state = STATE_BACKOFF;
backoff_reset(prp_priv->backoff, repl5_inc_backoff_expired, (void *)prp);
@@ -1084,6 +1120,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
} else if (rc == UPDATE_YIELD){
dev_debug("repl5_inc_run(STATE_SENDING_UPDATES) -> send_updates = UPDATE_YIELD -> STATE_BACKOFF_START");
agmt_set_last_update_status(prp->agmt, 0, 0, "Incremental update succeeded and yielded");
+ use_busy_backoff_timer = PR_TRUE;
next_state = STATE_BACKOFF_START;
} else if (rc == UPDATE_TRANSIENT_ERROR){
dev_debug("repl5_inc_run(STATE_SENDING_UPDATES) -> send_updates = UPDATE_TRANSIENT_ERROR -> STATE_BACKOFF_START");
@@ -1128,6 +1165,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
ruv_destroy(&ruv); ruv = NULL;
}
agmt_update_done(prp->agmt, 0);
+
/* If timed out, close the connection after released the replica */
release_replica(prp);
if (rc == UPDATE_TIMEOUT) {
@@ -1710,12 +1748,14 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
}
else
{
- int finished = 0;
ConnResult replay_crc;
- char csn_str[CSN_STRSIZE];
+ Replica *replica = (Replica*) object_get_data(prp->replica_object);
PRBool subentry_update_needed = PR_FALSE;
+ PRUint64 release_timeout = replica_get_release_timeout(replica);
+ char csn_str[CSN_STRSIZE];
int skipped_updates = 0;
int fractional_repl;
+ int finished = 0;
#define FRACTIONAL_SKIPPED_THRESHOLD 100
/* Start the results reading thread */
@@ -1935,7 +1975,20 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
}
PR_Lock(rd->lock);
/* See if the result thread has hit a problem */
- if (!finished && rd->abort)
+
+ if(!finished && rd->abort_time){
+ time_t current_time = time ( NULL );
+ if ((current_time - rd->abort_time) >= release_timeout){
+ rd->result = UPDATE_YIELD;
+ return_value = UPDATE_YIELD;
+ finished = 1;
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "Aborting send_updates...(%s)\n",
+ agmt_get_long_name(rd->prp->agmt));
+ }
+ }
+
+ if (!finished && rd->abort == ABORT_SESSION)
{
return_value = rd->result;
finished = 1;
@@ -1945,9 +1998,9 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
if (fractional_repl && subentry_update_needed)
{
- Replica *replica;
ReplicaId rid = -1; /* Used to create the replica keep alive subentry */
replica = (Replica*) object_get_data(prp->replica_object);
+
if (replica)
{
rid = replica_get_rid(replica);
@@ -1966,7 +2019,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
* If we already have an error, there is no need to check the
* async result thread anymore.
*/
- if (return_value == UPDATE_NO_MORE_UPDATES)
+ if (return_value == UPDATE_NO_MORE_UPDATES || return_value == UPDATE_YIELD)
{
/*
* We need to double check that an error hasn't popped up from
diff --git a/ldap/servers/plugins/replication/repl5_plugins.c b/ldap/servers/plugins/replication/repl5_plugins.c
index a79e305..9f3950e 100644
--- a/ldap/servers/plugins/replication/repl5_plugins.c
+++ b/ldap/servers/plugins/replication/repl5_plugins.c
@@ -1106,6 +1106,8 @@ write_changelog_and_ruv (Slapi_PBlock *pb)
r = (Replica*)object_get_data (repl_obj);
PR_ASSERT (r);
+ replica_check_release_timeout(r, pb);
+
if (replica_is_flag_set (r, REPLICA_LOG_CHANGES) &&
(cl5GetState () == CL5_STATE_OPEN))
{
@@ -1394,7 +1396,6 @@ process_postop (Slapi_PBlock *pb)
return rc;
}
-
/*
* Cancel an operation CSN. This removes it from any CSN pending lists.
* This function is called when a previously-generated CSN will not
diff --git a/ldap/servers/plugins/replication/repl5_replica.c b/ldap/servers/plugins/replication/repl5_replica.c
index 7d405c5..6952751 100644
--- a/ldap/servers/plugins/replication/repl5_replica.c
+++ b/ldap/servers/plugins/replication/repl5_replica.c
@@ -52,8 +52,8 @@
#define RUV_SAVE_INTERVAL (30 * 1000) /* 30 seconds */
-#define REPLICA_RDN "cn=replica"
-#define CHANGELOG_RDN "cn=legacy changelog"
+#define REPLICA_RDN "cn=replica"
+#define CHANGELOG_RDN "cn=legacy changelog"
/*
* A replica is a locally-held copy of a portion of the DIT.
@@ -97,6 +97,8 @@ struct replica {
Slapi_Counter *backoff_max; /* backoff retry maximum */
Slapi_Counter *precise_purging; /* Enable precise tombstone purging */
PRUint64 agmt_count; /* Number of agmts */
+ Slapi_Counter *release_timeout; /* The amount of time to wait before releasing active replica */
+ PRUint64 abort_session; /* Abort the current replica session */
};
@@ -230,6 +232,7 @@ replica_new_from_entry (Slapi_Entry *e, char *errortext, PRBool is_add_operation
/* init the slapi_counter/atomic settings */
r->protocol_timeout = slapi_counter_new();
+ r->release_timeout = slapi_counter_new();
r->backoff_min = slapi_counter_new();
r->backoff_max = slapi_counter_new();
@@ -437,6 +440,7 @@ replica_destroy(void **arg)
}
slapi_counter_destroy(&r->protocol_timeout);
+ slapi_counter_destroy(&r->release_timeout);
slapi_counter_destroy(&r->backoff_min);
slapi_counter_destroy(&r->backoff_max);
@@ -614,8 +618,7 @@ replica_subentry_update(Slapi_DN *repl_root, ReplicaId rid)
*/
PRBool
replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opid,
- const char *locking_purl,
- char **current_purl)
+ const char *locking_purl, char **current_purl)
{
PRBool rval = PR_TRUE;
@@ -638,6 +641,15 @@ replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opi
{
*current_purl = slapi_ch_strdup(r->locking_purl);
}
+ if (!(r->repl_state_flags & REPLICA_TOTAL_IN_PROGRESS) &&
+ replica_get_release_timeout(r))
+ {
+ /*
+ * We are not doing a total update, so abort the current session
+ * so other replicas can acquire this server.
+ */
+ r->abort_session = ABORT_SESSION;
+ }
}
else
{
@@ -646,14 +658,17 @@ replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opi
connid, opid,
slapi_sdn_get_dn(r->repl_root));
r->repl_state_flags |= REPLICA_IN_USE;
+ r->abort_session = SESSION_ACQUIRED;
if (isInc && *isInc)
{
r->repl_state_flags |= REPLICA_INCREMENTAL_IN_PROGRESS;
}
else
{
- /* if connid or opid != 0, it's a total update */
- /* Both set to 0 means we're disabling replication */
+ /*
+ * If connid or opid != 0, it's a total update.
+ * Both set to 0 means we're disabling replication
+ */
if (connid || opid)
{
r->repl_state_flags |= REPLICA_TOTAL_IN_PROGRESS;
@@ -681,13 +696,13 @@ replica_relinquish_exclusive_access(Replica *r, PRUint64 connid, int opid)
/* check to see if the replica is in use and log a warning if not */
if (!(r->repl_state_flags & REPLICA_IN_USE))
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Replica not in use\n",
connid, opid,
slapi_sdn_get_dn(r->repl_root));
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Released replica held by locking_purl=%s\n",
connid, opid,
@@ -999,6 +1014,24 @@ replica_get_protocol_timeout(Replica *r)
}
}
+PRUint64
+replica_get_release_timeout(Replica *r)
+{
+ if(r){
+ return slapi_counter_get_value(r->release_timeout);
+ } else {
+ return 0;
+ }
+}
+
+void
+replica_set_release_timeout(Replica *r, PRUint64 limit)
+{
+ if(r){
+ slapi_counter_set_value(r->release_timeout, limit);
+ }
+}
+
void
replica_set_protocol_timeout(Replica *r, PRUint64 timeout)
{
@@ -1006,6 +1039,7 @@ replica_set_protocol_timeout(Replica *r, PRUint64 timeout)
slapi_counter_set_value(r->protocol_timeout, timeout);
}
}
+
void
replica_set_groupdn_checkinterval(Replica *r, int interval)
{
@@ -1093,11 +1127,7 @@ replica_get_legacy_purl (const Replica *r)
char *purl;
replica_lock(r->repl_lock);
-
- PR_ASSERT (r->legacy_consumer);
-
purl = slapi_ch_strdup(r->legacy_purl);
-
replica_unlock(r->repl_lock);
return purl;
@@ -1953,6 +1983,7 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char *errortext)
int backoff_min;
int backoff_max;
int ptimeout = 0;
+ int release_timeout = 0;
int rc;
PR_ASSERT (r && e);
@@ -2037,6 +2068,14 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char *errortext)
slapi_counter_set_value(r->protocol_timeout, ptimeout);
}
+ /* Get the release timeout */
+ release_timeout = slapi_entry_attr_get_int(e, type_replicaReleaseTimeout);
+ if(release_timeout <= 0){
+ slapi_counter_set_value(r->release_timeout, 0);
+ } else {
+ slapi_counter_set_value(r->release_timeout, release_timeout);
+ }
+
/* check for precise tombstone purging */
precise_purging = slapi_entry_attr_get_charptr(e, type_replicaPrecisePurge);
if(precise_purging){
@@ -4058,21 +4097,21 @@ replica_disable_replication (Replica *r, Object *r_obj)
ruv_get_first_id_and_purl(repl_ruv, &junkrid, &p_locking_purl);
locking_purl = slapi_ch_strdup(p_locking_purl);
p_locking_purl = NULL;
- repl_ruv = NULL;
- while (!replica_get_exclusive_access(r, &isInc, 0, 0, "replica_disable_replication",
+ repl_ruv = NULL;
+ while (!replica_get_exclusive_access(r, &isInc, 0, 0, "replica_disable_replication",
¤t_purl)) {
- if (!isInc) /* already locked, but not by inc update - break */
- break;
- isInc = PR_FALSE;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ if (!isInc) /* already locked, but not by inc update - break */
+ break;
+ isInc = PR_FALSE;
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"replica_disable_replication: "
"replica %s is already locked by (%s) for incoming "
"incremental update; sleeping 100ms\n",
- slapi_sdn_get_ndn (replica_get_root (r)),
+ slapi_sdn_get_ndn (replica_get_root (r)),
current_purl ? current_purl : "unknown");
slapi_ch_free_string(¤t_purl);
- DS_Sleep(PR_MillisecondsToInterval(100));
- }
+ DS_Sleep(PR_MillisecondsToInterval(100));
+ }
slapi_ch_free_string(¤t_purl);
slapi_ch_free_string(&locking_purl);
@@ -4310,3 +4349,57 @@ replica_decr_agmt_count(Replica *r)
}
}
}
+
+/*
+ * Add the "Abort Replication Session" control to the pblock
+ */
+static void
+replica_add_session_abort_control(Slapi_PBlock *pb)
+{
+ LDAPControl ctrl = {0};
+ BerElement *ber;
+ struct berval *bvp;
+ int rc;
+
+ /* Build the BER payload */
+ if ( (ber = der_alloc()) == NULL ) {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "add_session_abort_control: Failed to create ber\n");
+ return;
+ }
+ rc = ber_printf( ber, "{}");
+ if (rc != -1) {
+ rc = ber_flatten( ber, &bvp );
+ }
+ ber_free( ber, 1 );
+ if ( rc == -1 ) {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "add_session_abort_control: Failed to flatten ber\n");
+ return;
+ }
+
+ ctrl.ldctl_oid = slapi_ch_strdup( REPL_ABORT_SESSION_OID );
+ ctrl.ldctl_value = *bvp;
+ bvp->bv_val = NULL;
+ ber_bvfree( bvp );
+ slapi_pblock_set(pb, SLAPI_ADD_RESCONTROL, &ctrl);
+
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "add_session_abort_control: abort control successfully added to result\n");
+}
+
+/*
+ * Check if we have exceeded the failed replica acquire limit,
+ * if so, end the replication session.
+ */
+void
+replica_check_release_timeout(Replica *r, Slapi_PBlock *pb)
+{
+ replica_lock(r->repl_lock);
+ if(r->abort_session == ABORT_SESSION){
+ /* Need to abort this session (just send the control once) */
+ replica_add_session_abort_control(pb);
+ r->abort_session = SESSION_ABORTED;
+ }
+ replica_unlock(r->repl_lock);
+}
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index 849184f..4456f58 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -435,6 +435,11 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
if (apply_mods)
replica_set_precise_purging(r, 0);
}
+ else if (strcasecmp (config_attr, type_replicaReleaseTimeout) == 0 )
+ {
+ if (apply_mods)
+ replica_set_release_timeout(r, 0);
+ }
else
{
*returncode = LDAP_UNWILLING_TO_PERFORM;
@@ -621,6 +626,23 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
}
}
}
+ else if (strcasecmp (config_attr, type_replicaReleaseTimeout) == 0 )
+ {
+ if (apply_mods)
+ {
+ PRUint64 val = atoll(config_attr_value);
+
+ if(val < 0){
+ *returncode = LDAP_UNWILLING_TO_PERFORM;
+ PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
+ "attribute %s value (%s) is invalid, must be a number zero or greater.\n",
+ config_attr, config_attr_value);
+ slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_modify: %s\n", errortext);
+ break;
+ }
+ replica_set_release_timeout(r, val);
+ }
+ }
else
{
*returncode = LDAP_UNWILLING_TO_PERFORM;
diff --git a/ldap/servers/plugins/replication/repl_globals.c b/ldap/servers/plugins/replication/repl_globals.c
index 7f4fcd2..55a6634 100644
--- a/ldap/servers/plugins/replication/repl_globals.c
+++ b/ldap/servers/plugins/replication/repl_globals.c
@@ -116,6 +116,7 @@ const char *type_ruvElementUpdatetime = "nsruvReplicaLastModified";
const char *type_replicaCleanRUV = "nsds5ReplicaCleanRUV";
const char *type_replicaAbortCleanRUV = "nsds5ReplicaAbortCleanRUV";
const char *type_replicaProtocolTimeout = "nsds5ReplicaProtocolTimeout";
+const char *type_replicaReleaseTimeout = "nsds5ReplicaReleaseTimeout";
const char *type_replicaBackoffMin = "nsds5ReplicaBackoffMin";
const char *type_replicaBackoffMax = "nsds5ReplicaBackoffMax";
const char *type_replicaPrecisePurge = "nsds5ReplicaPreciseTombstonePurging";
7 years, 10 months
Branch '389-ds-base-1.3.4' - 2 commits - ldap/schema ldap/servers
by Mark Reynolds
ldap/schema/01core389.ldif | 3
ldap/servers/plugins/replication/repl5.h | 14 +
ldap/servers/plugins/replication/repl5_inc_protocol.c | 102 +++++++++---
ldap/servers/plugins/replication/repl5_plugins.c | 3
ldap/servers/plugins/replication/repl5_replica.c | 135 +++++++++++++---
ldap/servers/plugins/replication/repl5_replica_config.c | 25 ++
ldap/servers/plugins/replication/repl_globals.c | 1
7 files changed, 232 insertions(+), 51 deletions(-)
New commits:
commit b8239e0da865f33cae930088dd2a746a49f2d32a
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jun 14 17:19:48 2016 -0400
Ticket 48636 - Fix config validation check
Bug Description: We were previous checking if an unsigfned int was less than zero
Fix Description: Improve config validation by using long instead of PRUint64
https://fedorahosted.org/389/ticket/48636
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit 43d5ac680f7781f95205db94e5ff2958d39b78a4)
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index 71b3c92..866a712 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -601,17 +601,20 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
{
if (apply_mods)
{
- PRUint64 val = atoll(config_attr_value);
+ long val = atol(config_attr_value);
- if(val < 0){
+ if (val < 0){
*returncode = LDAP_UNWILLING_TO_PERFORM;
- PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
+ PR_snprintf(errortext, SLAPI_DSE_RETURNTEXT_SIZE,
"attribute %s value (%s) is invalid, must be a number zero or greater.\n",
config_attr, config_attr_value);
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_modify: %s\n", errortext);
+ slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ "replica_config_modify: %s\n", errortext);
break;
+ } else {
+ /* Set the timeout */
+ replica_set_release_timeout(r, val);
}
- replica_set_release_timeout(r, val);
}
}
else
commit a085b0cd6b39fc85821777b7bcd2a8a2482a48bf
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Wed Jun 8 13:06:46 2016 -0400
Ticket 48636 - Improve replication convergence
Bug Description: In a busy MMR environment where multiple masters are being
updated at the same time the replica sessions stay open for
a very long time. This causes other masters to wait to send
their updates. This causes lop-sided convergence. Where
entries added to the MMR environment, but on different masters,
take a very different amount of time until they are each seen
on all the replicas.
Fix Description: A new configuratoin setting was added (nsds5ReplicaReleaseTimeout)
to the replica configuration entry. So when replica A tries
to acquire a replica B, replica B send a control back to the
master(master C) that is updating replica B to abort the session.
Master C will continue sending updates for the amount of time
specified in the the "release timeout", then it will "yield" its
current session so other replicas can acquire that replica.
https://fedorahosted.org/389/ticket/48636
Reviewed by: lkrispen & nhosoi(Thanks!!)
(cherry picked from commit a1545cdae48e4b4e1fc87a168e4d8f959626f112)
diff --git a/ldap/schema/01core389.ldif b/ldap/schema/01core389.ldif
index 409ebc0..2d23de5 100644
--- a/ldap/schema/01core389.ldif
+++ b/ldap/schema/01core389.ldif
@@ -279,6 +279,7 @@ attributeTypes: ( 2.16.840.1.113730.3.1.2313 NAME 'nsslapd-changelogtrim-interva
attributeTypes: ( 2.16.840.1.113730.3.1.2314 NAME 'nsslapd-changelogcompactdb-interval' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2315 NAME 'nsDS5ReplicaWaitForAsyncResults' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
attributeTypes: ( 2.16.840.1.113730.3.1.2332 NAME 'allowWeakDHParam' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Directory Server' )
+attributeTypes: ( 2.16.840.1.113730.3.1.2333 NAME 'nsds5ReplicaReleaseTimeout' DESC 'Netscape defined attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'Netscape Directory Server' )
#
# objectclasses
#
@@ -288,7 +289,7 @@ objectClasses: ( 2.16.840.1.113730.3.2.44 NAME 'nsIndex' DESC 'Netscape defined
objectClasses: ( 2.16.840.1.113730.3.2.109 NAME 'nsBackendInstance' DESC 'Netscape defined objectclass' SUP top MUST ( CN ) X-ORIGIN 'Netscape Directory Server' )
objectClasses: ( 2.16.840.1.113730.3.2.110 NAME 'nsMappingTree' DESC 'Netscape defined objectclass' SUP top MUST ( CN ) X-ORIGIN 'Netscape Directory Server' )
objectClasses: ( 2.16.840.1.113730.3.2.104 NAME 'nsContainer' DESC 'Netscape defined objectclass' SUP top MUST ( CN ) X-ORIGIN 'Netscape Directory Server' )
-objectClasses: ( 2.16.840.1.113730.3.2.108 NAME 'nsDS5Replica' DESC 'Netscape defined objectclass' SUP top MUST ( nsDS5ReplicaRoot $ nsDS5ReplicaId ) MAY (cn $ nsds5ReplicaPreciseTombstonePurging $ nsds5ReplicaCleanRUV $ nsds5ReplicaAbortCleanRUV $ nsDS5ReplicaType $ nsDS5ReplicaBindDN $ nsState $ nsDS5ReplicaName $ nsDS5Flags $ nsDS5Task $ nsDS5ReplicaReferral $ nsDS5ReplicaAutoReferral $ nsds5ReplicaPurgeDelay $ nsds5ReplicaTombstonePurgeInterval $ nsds5ReplicaChangeCount $ nsds5ReplicaLegacyConsumer $ nsds5ReplicaProtocolTimeout $ nsds5ReplicaBackoffMin $ nsds5ReplicaBackoffMax ) X-ORIGIN 'Netscape Directory Server' )
+objectClasses: ( 2.16.840.1.113730.3.2.108 NAME 'nsDS5Replica' DESC 'Netscape defined objectclass' SUP top MUST ( nsDS5ReplicaRoot $ nsDS5ReplicaId ) MAY (cn $ nsds5ReplicaPreciseTombstonePurging $ nsds5ReplicaCleanRUV $ nsds5ReplicaAbortCleanRUV $ nsDS5ReplicaType $ nsDS5ReplicaBindDN $ nsState $ nsDS5ReplicaName $ nsDS5Flags $ nsDS5Task $ nsDS5ReplicaReferral $ nsDS5ReplicaAutoReferral $ nsds5ReplicaPurgeDelay $ nsds5ReplicaTombstonePurgeInterval $ nsds5ReplicaChangeCount $ nsds5ReplicaLegacyConsumer $ nsds5ReplicaProtocolTimeout $ nsds5ReplicaBackoffMin $ nsds5ReplicaBackoffMax $ nsds5ReplicaReleaseTimeout ) X-ORIGIN 'Netscape Directory Server' )
objectClasses: ( 2.16.840.1.113730.3.2.113 NAME 'nsTombstone' DESC 'Netscape defined objectclass' SUP top MAY ( nstombstonecsn $ nsParentUniqueId $ nscpEntryDN ) X-ORIGIN 'Netscape Directory Server' )
objectClasses: ( 2.16.840.1.113730.3.2.103 NAME 'nsDS5ReplicationAgreement' DESC 'Netscape defined objectclass' SUP top MUST ( cn ) MAY ( nsds5ReplicaCleanRUVNotified $ nsDS5ReplicaHost $ nsDS5ReplicaPort $ nsDS5ReplicaTransportInfo $ nsDS5ReplicaBindDN $ nsDS5ReplicaCredentials $ nsDS5ReplicaBindMethod $ nsDS5ReplicaRoot $ nsDS5ReplicatedAttributeList $ nsDS5ReplicatedAttributeListTotal $ nsDS5ReplicaUpdateSchedule $ nsds5BeginReplicaRefresh $ description $ nsds50ruv $ nsruvReplicaLastModified $ nsds5ReplicaTimeout $ nsds5replicaChangesSentSinceStartup $ nsds5replicaLastUpdateEnd $ nsds5replicaLastUpdateStart $ nsds5replicaLastUpdateStatus $ nsds5replicaUpdateInProgress $ nsds5replicaLastInitEnd $ nsds5ReplicaEnabled $ nsds5replicaLastInitStart $ nsds5replicaLastInitStatus $ nsds5debugreplicatimeout $ nsds5replicaBusyWaitTime $ nsds5ReplicaStripAttrs $ nsds5replicaSessionPauseTime $ nsds5ReplicaProtocolTimeout $ nsds5ReplicaFlowControlWindow $ nsds5ReplicaFlowControlPause $
nsDS5ReplicaWaitForAsyncResults ) X-ORIGIN 'Netscape Directory Server' )
objectClasses: ( 2.16.840.1.113730.3.2.39 NAME 'nsslapdConfig' DESC 'Netscape defined objectclass' SUP top MAY ( cn ) X-ORIGIN 'Netscape Directory Server' )
diff --git a/ldap/servers/plugins/replication/repl5.h b/ldap/servers/plugins/replication/repl5.h
index 307da82..6f6c81a 100644
--- a/ldap/servers/plugins/replication/repl5.h
+++ b/ldap/servers/plugins/replication/repl5.h
@@ -69,6 +69,10 @@
#define REPL_ABORT_CLEANRUV_OID "2.16.840.1.113730.3.6.6"
#define REPL_CLEANRUV_GET_MAXCSN_OID "2.16.840.1.113730.3.6.7"
#define REPL_CLEANRUV_CHECK_STATUS_OID "2.16.840.1.113730.3.6.8"
+#define REPL_ABORT_SESSION_OID "2.16.840.1.113730.3.6.9"
+#define SESSION_ACQUIRED 0
+#define ABORT_SESSION 1
+#define SESSION_ABORTED 2
#define CLEANRUV_ACCEPTED "accepted"
#define CLEANRUV_REJECTED "rejected"
@@ -141,6 +145,7 @@ extern const char *type_nsds5ReplicaStripAttrs;
extern const char *type_nsds5ReplicaFlowControlWindow;
extern const char *type_nsds5ReplicaFlowControlPause;
extern const char *type_replicaProtocolTimeout;
+extern const char *type_replicaReleaseTimeout;
extern const char *type_replicaBackoffMin;
extern const char *type_replicaBackoffMax;
extern const char *type_replicaPrecisePurge;
@@ -526,9 +531,9 @@ Replica *replica_new_from_entry (Slapi_Entry *e, char *errortext, PRBool is_add_
void replica_destroy(void **arg);
int replica_subentry_update(Slapi_DN *repl_root, ReplicaId rid);
int replica_subentry_check(Slapi_DN *repl_root, ReplicaId rid);
-PRBool replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opid,
- const char *locking_purl,
- char **current_purl);
+PRBool replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid,
+ int opid, const char *locking_purl,
+ char **current_purl);
void replica_relinquish_exclusive_access(Replica *r, PRUint64 connid, int opid);
PRBool replica_get_tombstone_reap_active(const Replica *r);
const Slapi_DN *replica_get_root(const Replica *r);
@@ -598,6 +603,8 @@ void replica_update_state (time_t when, void *arg);
void replica_reset_csn_pl(Replica *r);
PRUint64 replica_get_protocol_timeout(Replica *r);
void replica_set_protocol_timeout(Replica *r, PRUint64 timeout);
+PRUint64 replica_get_release_timeout(Replica *r);
+void replica_set_release_timeout(Replica *r, PRUint64 timeout);
void replica_set_groupdn_checkinterval(Replica *r, int timeout);
PRUint64 replica_get_backoff_min(Replica *r);
PRUint64 replica_get_backoff_max(Replica *r);
@@ -609,6 +616,7 @@ void replica_decr_agmt_count(Replica *r);
PRUint64 replica_get_precise_purging(Replica *r);
void replica_set_precise_purging(Replica *r, PRUint64 on_off);
PRBool ignore_error_and_keep_going(int error);
+void replica_check_release_timeout(Replica *r, Slapi_PBlock *pb);
/* The functions below handles the state flag */
/* Current internal state flags */
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index 927f835..d6fb898 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -36,6 +36,11 @@ Perhaps these events should be properties of the main protocol.
#include "repl5_prot_private.h"
#include "cl5_api.h"
+#include "repl5.h"
+#include "repl5_prot_private.h"
+#include "cl5_api.h"
+#include "slapi-plugin.h"
+
extern int slapi_log_urp;
/*** from proto-slap.h ***/
@@ -82,6 +87,7 @@ typedef struct result_data
int flowcontrol_detection;
int result; /* The UPDATE_TRANSIENT_ERROR etc */
int WaitForAsyncResults;
+ time_t abort_time;
} result_data;
/* Various states the incremental protocol can pass through */
@@ -121,6 +127,7 @@ typedef struct result_data
#define EXAMINE_RUV_PARAM_ERROR 405
#define MAX_CHANGES_PER_SESSION 10000
+
/*
* Maximum time to wait between replication sessions. If we
* don't see any updates for a period equal to this interval,
@@ -240,19 +247,21 @@ repl5_inc_result_threadmain(void *param)
Repl_Connection *conn = rd->prp->conn;
int finished = 0;
int message_id = 0;
+ int yield_session = 0;
slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain starting\n");
while (!finished)
{
+ LDAPControl **returned_controls = NULL;
repl5_inc_operation *op = NULL;
- int connection_error = 0;
+ ReplicaId replica_id = 0;
char *csn_str = NULL;
char *uniqueid = NULL;
- ReplicaId replica_id = 0;
- int operation_code = 0;
char *ldap_error_string = NULL;
time_t time_now = 0;
time_t start_time = time( NULL );
+ int connection_error = 0;
+ int operation_code = 0;
int backoff_time = 1;
/* Read the next result */
@@ -264,7 +273,7 @@ repl5_inc_result_threadmain(void *param)
while (!finished)
{
- conres = conn_read_result_ex(conn, NULL, NULL, NULL, LDAP_RES_ANY, &message_id, 0);
+ conres = conn_read_result_ex(conn, NULL, NULL, &returned_controls, LDAP_RES_ANY, &message_id, 0);
slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: read result for message_id %d\n", message_id);
/* Timeout here means that we didn't block, not a real timeout */
if (CONN_TIMEOUT == conres)
@@ -292,9 +301,19 @@ repl5_inc_result_threadmain(void *param)
finished = 1;
}
PR_Unlock(rd->lock);
- } else
- {
- /* Something other than a timeout, so we exit the loop */
+ } else {
+ /*
+ * Something other than a timeout, so we exit the loop.
+ * First check if we were told to abort the session
+ */;
+ Replica *r = (Replica*)object_get_data(rd->prp->replica_object);
+ if (replica_get_release_timeout(r) &&
+ slapi_control_present(returned_controls,
+ REPL_ABORT_SESSION_OID,
+ NULL, NULL))
+ {
+ yield_session = 1;
+ }
break;
}
}
@@ -318,21 +337,29 @@ repl5_inc_result_threadmain(void *param)
}
conn_get_error_ex(conn, &operation_code, &connection_error, &ldap_error_string);
- slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: result %d, %d, %d, %d, %s\n", operation_code,connection_error,conres,message_id,ldap_error_string);
- return_value = repl5_inc_update_from_op_result(rd->prp, conres, connection_error, csn_str, uniqueid, replica_id, &should_finish, &(rd->num_changes_sent));
+ slapi_log_error(SLAPI_LOG_REPL, NULL,
+ "repl5_inc_result_threadmain: result %d, %d, %d, %d, %s\n",
+ operation_code,connection_error,conres,message_id,ldap_error_string);
+ return_value = repl5_inc_update_from_op_result(rd->prp, conres, connection_error,
+ csn_str, uniqueid, replica_id, &should_finish,
+ &(rd->num_changes_sent));
if (return_value || should_finish)
{
- slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: got op result %d should finish %d\n", return_value, should_finish);
+ slapi_log_error(SLAPI_LOG_REPL, NULL,
+ "repl5_inc_result_threadmain: got op result %d should finish %d\n",
+ return_value, should_finish);
/* If so then we need to take steps to abort the update process */
PR_Lock(rd->lock);
rd->result = return_value;
- rd->abort = 1;
+ rd->abort = ABORT_SESSION;
PR_Unlock(rd->lock);
- /* We also need to log the error, including details stored from when the operation was sent */
- /* we cannot finish yet - we still need to waitfor the pending results, then
- the main repl code will shut down this thread */
- /* we can finish if we have disconnected - in that case, there will be nothing
- to read */
+ /*
+ * We also need to log the error, including details stored from
+ * when the operation was sent. We cannot finish yet - we still
+ * need to wait for the pending results, then the main repl code
+ * will shut down this thread. We can finish if we have
+ * disconnected - in that case, there will be nothing to read
+ */
if (return_value == UPDATE_CONNECTION_LOST) {
finished = 1;
}
@@ -341,8 +368,16 @@ repl5_inc_result_threadmain(void *param)
rd->result = return_value;
}
}
+
/* Should we stop ? */
PR_Lock(rd->lock);
+ if (!finished && yield_session && rd->abort != SESSION_ABORTED && rd->abort_time == 0) {
+ rd->abort_time = time( NULL );
+ rd->abort = SESSION_ABORTED; /* only set the abort time once */
+ slapi_log_error(SLAPI_LOG_REPL, "repl5_inc_result_threadmain",
+ "Abort control detected, setting abort time...(%s)\n",
+ agmt_get_long_name(rd->prp->agmt));
+ }
if (rd->stop_result_thread)
{
finished = 1;
@@ -468,7 +503,8 @@ repl5_inc_waitfor_async_results(result_data *rd)
if (rd->last_message_id_received >= rd->last_message_id_sent) {
/* If so then we're done */
done = 1;
- } else if (rd->abort && (rd->result == UPDATE_CONNECTION_LOST)) {
+ } else if (rd->abort && (rd->result == UPDATE_CONNECTION_LOST))
+ {
done = 1; /* no connection == no more results */
}
/*
@@ -846,10 +882,10 @@ repl5_inc_run(Private_Repl_Protocol *prp)
if (!busywaittime){
busywaittime = repl5_get_backoff_min(prp);
}
- prp_priv->backoff = backoff_new(BACKOFF_FIXED, busywaittime, busywaittime);
+ prp_priv->backoff = backoff_new(BACKOFF_FIXED, busywaittime , busywaittime);
} else {
prp_priv->backoff = backoff_new(BACKOFF_EXPONENTIAL, repl5_get_backoff_min(prp),
- repl5_get_backoff_max(prp));
+ repl5_get_backoff_max(prp));
}
next_state = STATE_BACKOFF;
backoff_reset(prp_priv->backoff, repl5_inc_backoff_expired, (void *)prp);
@@ -1055,6 +1091,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
} else if (rc == UPDATE_YIELD){
dev_debug("repl5_inc_run(STATE_SENDING_UPDATES) -> send_updates = UPDATE_YIELD -> STATE_BACKOFF_START");
agmt_set_last_update_status(prp->agmt, 0, 0, "Incremental update succeeded and yielded");
+ use_busy_backoff_timer = PR_TRUE;
next_state = STATE_BACKOFF_START;
} else if (rc == UPDATE_TRANSIENT_ERROR){
dev_debug("repl5_inc_run(STATE_SENDING_UPDATES) -> send_updates = UPDATE_TRANSIENT_ERROR -> STATE_BACKOFF_START");
@@ -1099,6 +1136,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
ruv_destroy(&ruv); ruv = NULL;
}
agmt_update_done(prp->agmt, 0);
+
/* If timed out, close the connection after released the replica */
release_replica(prp);
if (rc == UPDATE_TIMEOUT) {
@@ -1681,12 +1719,14 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
}
else
{
- int finished = 0;
ConnResult replay_crc;
- char csn_str[CSN_STRSIZE];
+ Replica *replica = (Replica*) object_get_data(prp->replica_object);
PRBool subentry_update_needed = PR_FALSE;
+ PRUint64 release_timeout = replica_get_release_timeout(replica);
+ char csn_str[CSN_STRSIZE];
int skipped_updates = 0;
int fractional_repl;
+ int finished = 0;
#define FRACTIONAL_SKIPPED_THRESHOLD 100
/* Start the results reading thread */
@@ -1906,7 +1946,20 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
}
PR_Lock(rd->lock);
/* See if the result thread has hit a problem */
- if (!finished && rd->abort)
+
+ if(!finished && rd->abort_time){
+ time_t current_time = time ( NULL );
+ if ((current_time - rd->abort_time) >= release_timeout){
+ rd->result = UPDATE_YIELD;
+ return_value = UPDATE_YIELD;
+ finished = 1;
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "Aborting send_updates...(%s)\n",
+ agmt_get_long_name(rd->prp->agmt));
+ }
+ }
+
+ if (!finished && rd->abort == ABORT_SESSION)
{
return_value = rd->result;
finished = 1;
@@ -1916,10 +1969,9 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
if (fractional_repl && subentry_update_needed)
{
- Replica *replica;
ReplicaId rid = -1; /* Used to create the replica keep alive subentry */
Slapi_DN *replarea_sdn = NULL;
- replica = (Replica*) object_get_data(prp->replica_object);
+
if (replica)
{
rid = replica_get_rid(replica);
@@ -1945,7 +1997,7 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
* If we already have an error, there is no need to check the
* async result thread anymore.
*/
- if (return_value == UPDATE_NO_MORE_UPDATES)
+ if (return_value == UPDATE_NO_MORE_UPDATES || return_value == UPDATE_YIELD)
{
/*
* We need to double check that an error hasn't popped up from
diff --git a/ldap/servers/plugins/replication/repl5_plugins.c b/ldap/servers/plugins/replication/repl5_plugins.c
index bb43b9b..9f38d05 100644
--- a/ldap/servers/plugins/replication/repl5_plugins.c
+++ b/ldap/servers/plugins/replication/repl5_plugins.c
@@ -1077,6 +1077,8 @@ write_changelog_and_ruv (Slapi_PBlock *pb)
r = (Replica*)object_get_data (repl_obj);
PR_ASSERT (r);
+ replica_check_release_timeout(r, pb);
+
if (replica_is_flag_set (r, REPLICA_LOG_CHANGES) &&
(cl5GetState () == CL5_STATE_OPEN))
{
@@ -1365,7 +1367,6 @@ process_postop (Slapi_PBlock *pb)
return rc;
}
-
/*
* Cancel an operation CSN. This removes it from any CSN pending lists.
* This function is called when a previously-generated CSN will not
diff --git a/ldap/servers/plugins/replication/repl5_replica.c b/ldap/servers/plugins/replication/repl5_replica.c
index a339777..ef19ad8 100644
--- a/ldap/servers/plugins/replication/repl5_replica.c
+++ b/ldap/servers/plugins/replication/repl5_replica.c
@@ -23,8 +23,8 @@
#define RUV_SAVE_INTERVAL (30 * 1000) /* 30 seconds */
-#define REPLICA_RDN "cn=replica"
-#define CHANGELOG_RDN "cn=legacy changelog"
+#define REPLICA_RDN "cn=replica"
+#define CHANGELOG_RDN "cn=legacy changelog"
/*
* A replica is a locally-held copy of a portion of the DIT.
@@ -68,6 +68,8 @@ struct replica {
Slapi_Counter *backoff_max; /* backoff retry maximum */
Slapi_Counter *precise_purging; /* Enable precise tombstone purging */
PRUint64 agmt_count; /* Number of agmts */
+ Slapi_Counter *release_timeout; /* The amount of time to wait before releasing active replica */
+ PRUint64 abort_session; /* Abort the current replica session */
};
@@ -201,6 +203,7 @@ replica_new_from_entry (Slapi_Entry *e, char *errortext, PRBool is_add_operation
/* init the slapi_counter/atomic settings */
r->protocol_timeout = slapi_counter_new();
+ r->release_timeout = slapi_counter_new();
r->backoff_min = slapi_counter_new();
r->backoff_max = slapi_counter_new();
r->precise_purging = slapi_counter_new();
@@ -409,6 +412,7 @@ replica_destroy(void **arg)
}
slapi_counter_destroy(&r->protocol_timeout);
+ slapi_counter_destroy(&r->release_timeout);
slapi_counter_destroy(&r->backoff_min);
slapi_counter_destroy(&r->backoff_max);
slapi_counter_destroy(&r->precise_purging);
@@ -587,8 +591,7 @@ replica_subentry_update(Slapi_DN *repl_root, ReplicaId rid)
*/
PRBool
replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opid,
- const char *locking_purl,
- char **current_purl)
+ const char *locking_purl, char **current_purl)
{
PRBool rval = PR_TRUE;
@@ -611,6 +614,15 @@ replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opi
{
*current_purl = slapi_ch_strdup(r->locking_purl);
}
+ if (!(r->repl_state_flags & REPLICA_TOTAL_IN_PROGRESS) &&
+ replica_get_release_timeout(r))
+ {
+ /*
+ * We are not doing a total update, so abort the current session
+ * so other replicas can acquire this server.
+ */
+ r->abort_session = ABORT_SESSION;
+ }
}
else
{
@@ -619,14 +631,17 @@ replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opi
connid, opid,
slapi_sdn_get_dn(r->repl_root));
r->repl_state_flags |= REPLICA_IN_USE;
+ r->abort_session = SESSION_ACQUIRED;
if (isInc && *isInc)
{
r->repl_state_flags |= REPLICA_INCREMENTAL_IN_PROGRESS;
}
else
{
- /* if connid or opid != 0, it's a total update */
- /* Both set to 0 means we're disabling replication */
+ /*
+ * If connid or opid != 0, it's a total update.
+ * Both set to 0 means we're disabling replication
+ */
if (connid || opid)
{
r->repl_state_flags |= REPLICA_TOTAL_IN_PROGRESS;
@@ -654,13 +669,13 @@ replica_relinquish_exclusive_access(Replica *r, PRUint64 connid, int opid)
/* check to see if the replica is in use and log a warning if not */
if (!(r->repl_state_flags & REPLICA_IN_USE))
{
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Replica not in use\n",
connid, opid,
slapi_sdn_get_dn(r->repl_root));
} else {
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"conn=%" NSPRIu64 " op=%d repl=\"%s\": "
"Released replica held by locking_purl=%s\n",
connid, opid,
@@ -972,6 +987,24 @@ replica_get_protocol_timeout(Replica *r)
}
}
+PRUint64
+replica_get_release_timeout(Replica *r)
+{
+ if(r){
+ return slapi_counter_get_value(r->release_timeout);
+ } else {
+ return 0;
+ }
+}
+
+void
+replica_set_release_timeout(Replica *r, PRUint64 limit)
+{
+ if(r){
+ slapi_counter_set_value(r->release_timeout, limit);
+ }
+}
+
void
replica_set_protocol_timeout(Replica *r, PRUint64 timeout)
{
@@ -979,6 +1012,7 @@ replica_set_protocol_timeout(Replica *r, PRUint64 timeout)
slapi_counter_set_value(r->protocol_timeout, timeout);
}
}
+
void
replica_set_groupdn_checkinterval(Replica *r, int interval)
{
@@ -1066,11 +1100,7 @@ replica_get_legacy_purl (const Replica *r)
char *purl;
replica_lock(r->repl_lock);
-
- PR_ASSERT (r->legacy_consumer);
-
purl = slapi_ch_strdup(r->legacy_purl);
-
replica_unlock(r->repl_lock);
return purl;
@@ -1926,6 +1956,7 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char *errortext)
int backoff_min;
int backoff_max;
int ptimeout = 0;
+ int release_timeout = 0;
int rc;
PR_ASSERT (r && e);
@@ -2010,6 +2041,14 @@ _replica_init_from_config (Replica *r, Slapi_Entry *e, char *errortext)
slapi_counter_set_value(r->protocol_timeout, ptimeout);
}
+ /* Get the release timeout */
+ release_timeout = slapi_entry_attr_get_int(e, type_replicaReleaseTimeout);
+ if(release_timeout <= 0){
+ slapi_counter_set_value(r->release_timeout, 0);
+ } else {
+ slapi_counter_set_value(r->release_timeout, release_timeout);
+ }
+
/* check for precise tombstone purging */
precise_purging = slapi_entry_attr_get_charptr(e, type_replicaPrecisePurge);
if(precise_purging){
@@ -4031,21 +4070,21 @@ replica_disable_replication (Replica *r, Object *r_obj)
ruv_get_first_id_and_purl(repl_ruv, &junkrid, &p_locking_purl);
locking_purl = slapi_ch_strdup(p_locking_purl);
p_locking_purl = NULL;
- repl_ruv = NULL;
- while (!replica_get_exclusive_access(r, &isInc, 0, 0, "replica_disable_replication",
+ repl_ruv = NULL;
+ while (!replica_get_exclusive_access(r, &isInc, 0, 0, "replica_disable_replication",
¤t_purl)) {
- if (!isInc) /* already locked, but not by inc update - break */
- break;
- isInc = PR_FALSE;
- slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ if (!isInc) /* already locked, but not by inc update - break */
+ break;
+ isInc = PR_FALSE;
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"replica_disable_replication: "
"replica %s is already locked by (%s) for incoming "
"incremental update; sleeping 100ms\n",
- slapi_sdn_get_ndn (replica_get_root (r)),
+ slapi_sdn_get_ndn (replica_get_root (r)),
current_purl ? current_purl : "unknown");
slapi_ch_free_string(¤t_purl);
- DS_Sleep(PR_MillisecondsToInterval(100));
- }
+ DS_Sleep(PR_MillisecondsToInterval(100));
+ }
slapi_ch_free_string(¤t_purl);
slapi_ch_free_string(&locking_purl);
@@ -4283,3 +4322,57 @@ replica_decr_agmt_count(Replica *r)
}
}
}
+
+/*
+ * Add the "Abort Replication Session" control to the pblock
+ */
+static void
+replica_add_session_abort_control(Slapi_PBlock *pb)
+{
+ LDAPControl ctrl = {0};
+ BerElement *ber;
+ struct berval *bvp;
+ int rc;
+
+ /* Build the BER payload */
+ if ( (ber = der_alloc()) == NULL ) {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "add_session_abort_control: Failed to create ber\n");
+ return;
+ }
+ rc = ber_printf( ber, "{}");
+ if (rc != -1) {
+ rc = ber_flatten( ber, &bvp );
+ }
+ ber_free( ber, 1 );
+ if ( rc == -1 ) {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "add_session_abort_control: Failed to flatten ber\n");
+ return;
+ }
+
+ ctrl.ldctl_oid = slapi_ch_strdup( REPL_ABORT_SESSION_OID );
+ ctrl.ldctl_value = *bvp;
+ bvp->bv_val = NULL;
+ ber_bvfree( bvp );
+ slapi_pblock_set(pb, SLAPI_ADD_RESCONTROL, &ctrl);
+
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "add_session_abort_control: abort control successfully added to result\n");
+}
+
+/*
+ * Check if we have exceeded the failed replica acquire limit,
+ * if so, end the replication session.
+ */
+void
+replica_check_release_timeout(Replica *r, Slapi_PBlock *pb)
+{
+ replica_lock(r->repl_lock);
+ if(r->abort_session == ABORT_SESSION){
+ /* Need to abort this session (just send the control once) */
+ replica_add_session_abort_control(pb);
+ r->abort_session = SESSION_ABORTED;
+ }
+ replica_unlock(r->repl_lock);
+}
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index 4d7135c..71b3c92 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -406,6 +406,11 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
if (apply_mods)
replica_set_precise_purging(r, 0);
}
+ else if (strcasecmp (config_attr, type_replicaReleaseTimeout) == 0 )
+ {
+ if (apply_mods)
+ replica_set_release_timeout(r, 0);
+ }
else
{
*returncode = LDAP_UNWILLING_TO_PERFORM;
@@ -592,6 +597,23 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
}
}
}
+ else if (strcasecmp (config_attr, type_replicaReleaseTimeout) == 0 )
+ {
+ if (apply_mods)
+ {
+ PRUint64 val = atoll(config_attr_value);
+
+ if(val < 0){
+ *returncode = LDAP_UNWILLING_TO_PERFORM;
+ PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE,
+ "attribute %s value (%s) is invalid, must be a number zero or greater.\n",
+ config_attr, config_attr_value);
+ slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "replica_config_modify: %s\n", errortext);
+ break;
+ }
+ replica_set_release_timeout(r, val);
+ }
+ }
else
{
*returncode = LDAP_UNWILLING_TO_PERFORM;
diff --git a/ldap/servers/plugins/replication/repl_globals.c b/ldap/servers/plugins/replication/repl_globals.c
index 331f839..8b891fb 100644
--- a/ldap/servers/plugins/replication/repl_globals.c
+++ b/ldap/servers/plugins/replication/repl_globals.c
@@ -87,6 +87,7 @@ const char *type_ruvElementUpdatetime = "nsruvReplicaLastModified";
const char *type_replicaCleanRUV = "nsds5ReplicaCleanRUV";
const char *type_replicaAbortCleanRUV = "nsds5ReplicaAbortCleanRUV";
const char *type_replicaProtocolTimeout = "nsds5ReplicaProtocolTimeout";
+const char *type_replicaReleaseTimeout = "nsds5ReplicaReleaseTimeout";
const char *type_replicaBackoffMin = "nsds5ReplicaBackoffMin";
const char *type_replicaBackoffMax = "nsds5ReplicaBackoffMax";
const char *type_replicaPrecisePurge = "nsds5ReplicaPreciseTombstonePurging";
7 years, 10 months