ldap/servers/slapd/back-ldbm/ldbm_index_config.c | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 6c77c37ae5ce847ffa2bd75287dbd157c2f2d6af
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Wed Jul 13 16:24:19 2016 -0400
Ticket 48922 - Fix crash when deleting backend while import is running
Bug Description: If you delete a backend from the config while an
import is running the server can crash.
Fix Description: When deleting a backend from the config wait for the
backend instance to not be busy before removing the
indexes. Otherwise the dbenv is not stable and this
can cause the crash.
https://fedorahosted.org/389/ticket/48922
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_index_config.c b/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
index 3e59e72..c5ceacf 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
@@ -151,6 +151,12 @@ ldbm_instance_index_config_delete_callback(Slapi_PBlock *pb, Slapi_Entry* e, Sla
rc = SLAPI_DSE_CALLBACK_ERROR;
goto bail;
}
+
+ while(is_instance_busy(inst)){
+ /* Wait for import/indexing job to complete */
+ DS_Sleep(PR_SecondsToInterval(1));
+ }
+
*returncode = LDAP_SUCCESS;
slapi_entry_attr_find(e, "cn", &attr);
ldap/servers/slapd/back-ldbm/ldbm_modify.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
New commits:
commit 96da572b21f81601d3a6ec73ab64b4370d6caa20
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Wed Jul 13 15:51:56 2016 -0400
Ticket 48924 - Fixup tombstone task needs to set proper flag when updating tombstones
Bug Description: The fixup tombstone task is not updating tombstones due to
TOMBSTONE_INCLUDE not being set when looking up the entry to
modify.
Fix Description: If fixing up tombstones called find_entry2modify_only_ext with
the TOMBSTONE_INCLUDED flag.
https://fedorahosted.org/389/ticket/48924
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit 8cfb650170bbb4f6ce328b827dc294437ee38c4b)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
index fecd3b8..27f5c74 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
@@ -465,9 +465,14 @@ ldbm_back_modify( Slapi_PBlock *pb )
*/
if ( MANAGE_ENTRY_BEFORE_DBLOCK(li)) {
/* find and lock the entry we are about to modify */
- if ( (e = find_entry2modify( pb, be, addr, &txn )) == NULL ) {
+ if (fixup_tombstone) {
+ e = find_entry2modify_only_ext( pb, be, addr, TOMBSTONE_INCLUDED, &txn );
+ } else {
+ e = find_entry2modify( pb, be, addr, &txn );
+ }
+ if (e == NULL) {
ldap_result_code= -1;
- goto error_return; /* error result sent by find_entry2modify() */
+ goto error_return; /* error result sent by find_entry2modify() */
}
}
@@ -545,9 +550,14 @@ ldbm_back_modify( Slapi_PBlock *pb )
if (0 == retry_count) { /* just once */
if ( !MANAGE_ENTRY_BEFORE_DBLOCK(li)) {
/* find and lock the entry we are about to modify */
- if ( (e = find_entry2modify( pb, be, addr, &txn )) == NULL ) {
+ if (fixup_tombstone) {
+ e = find_entry2modify_only_ext( pb, be, addr, TOMBSTONE_INCLUDED, &txn );
+ } else {
+ e = find_entry2modify( pb, be, addr, &txn );
+ }
+ if (e == NULL) {
ldap_result_code= -1;
- goto error_return; /* error result sent by find_entry2modify() */
+ goto error_return; /* error result sent by find_entry2modify() */
}
}
ldap/servers/slapd/back-ldbm/ldbm_modify.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
New commits:
commit 8cfb650170bbb4f6ce328b827dc294437ee38c4b
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Wed Jul 13 15:51:56 2016 -0400
Ticket 48924 - Fixup tombstone task needs to set proper flag when updating tombstones
Bug Description: The fixup tombstone task is not updating tombstones due to
TOMBSTONE_INCLUDE not being set when looking up the entry to
modify.
Fix Description: If fixing up tombstones called find_entry2modify_only_ext with
the TOMBSTONE_INCLUDED flag.
https://fedorahosted.org/389/ticket/48924
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
index 37225cd..9b3062c 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
@@ -465,9 +465,14 @@ ldbm_back_modify( Slapi_PBlock *pb )
*/
if ( MANAGE_ENTRY_BEFORE_DBLOCK(li)) {
/* find and lock the entry we are about to modify */
- if ( (e = find_entry2modify( pb, be, addr, &txn )) == NULL ) {
+ if (fixup_tombstone) {
+ e = find_entry2modify_only_ext( pb, be, addr, TOMBSTONE_INCLUDED, &txn );
+ } else {
+ e = find_entry2modify( pb, be, addr, &txn );
+ }
+ if (e == NULL) {
ldap_result_code= -1;
- goto error_return; /* error result sent by find_entry2modify() */
+ goto error_return; /* error result sent by find_entry2modify() */
}
}
@@ -545,9 +550,14 @@ ldbm_back_modify( Slapi_PBlock *pb )
if (0 == retry_count) { /* just once */
if ( !MANAGE_ENTRY_BEFORE_DBLOCK(li)) {
/* find and lock the entry we are about to modify */
- if ( (e = find_entry2modify( pb, be, addr, &txn )) == NULL ) {
+ if (fixup_tombstone) {
+ e = find_entry2modify_only_ext( pb, be, addr, TOMBSTONE_INCLUDED, &txn );
+ } else {
+ e = find_entry2modify( pb, be, addr, &txn );
+ }
+ if (e == NULL) {
ldap_result_code= -1;
- goto error_return; /* error result sent by find_entry2modify() */
+ goto error_return; /* error result sent by find_entry2modify() */
}
}
ldap/admin/src/scripts/status-dirsrv.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit a8b07cd2671c82421830ae94584b370436ef3434
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Mon Jul 11 19:09:24 2016 -0700
Ticket #48144 - Add /usr/sbin/status-dirsrv script to get the status of the directory server instance.
Description:
Analysis by vashirov(a)redhat.com:
https://bugzilla.redhat.com/show_bug.cgi?id=1209128#c11
The error comes from bash built-in `return`. bash version prior to
4.3 didn't support negative numbers as argument for `return`.
See for reference: http://wiki.bash-hackers.org/scripting/bashchanges
As suggested in the comment, instead of -1, 255 should be returned in
this error case:
> 255 is returned if the instance does not exist.
https://fedorahosted.org/389/ticket/48144
Viktor's proposal is reviewed by nhosoi(a)redhat.com.
diff --git a/ldap/admin/src/scripts/status-dirsrv.in b/ldap/admin/src/scripts/status-dirsrv.in
index 0f01eaa..9042899 100755
--- a/ldap/admin/src/scripts/status-dirsrv.in
+++ b/ldap/admin/src/scripts/status-dirsrv.in
@@ -11,14 +11,14 @@ status_instance() {
SERV_ID=$1
shift
- initfile=`get_init_file $initconfig_dir $SERV_ID` || { echo Instance $SERV_ID not found. ; return -1 ; }
+ initfile=`get_init_file $initconfig_dir $SERV_ID` || { echo Instance $SERV_ID not found. ; return 255 ; }
# source env. for this instance
if [ -f $initfile ] ; then
. $initfile
else
echo Instance $SERV_ID not found.
- return -1
+ return 255
fi
prefix="$DS_ROOT"
ldap/servers/plugins/replication/repl5_inc_protocol.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 6dec417242238791cad12e2420ebb2a1602b8e8f
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Mon Jul 11 10:30:04 2016 -0400
Ticket 48767 - flow control in replication also blocks receiving results
Bug Description: In ticket 47942 a flow control was introduced to reduce
the load of a replication consumer. It adds some pauses
in the asynch sending of updates. Unfortunately while it
pauses it holds the reader lock, so that the result reader
thread is also paused.
Fix Description: If we need to pause the sending of updates then also release
the Result Data lock so the reader thread is not blocked.
https://fedorahosted.org/389/ticket/48767
Reviewed by: nhosi(Thanks!)
(cherry picked from commit ba636587e77423c7773df60894344dea0377c36f)
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index e02e883..fd0e3e5 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -472,9 +472,11 @@ repl5_inc_flow_control_results(Repl_Agmt *agmt, result_data *rd)
if ((rd->last_message_id_received <= rd->last_message_id_sent) &&
((rd->last_message_id_sent - rd->last_message_id_received) >= agmt_get_flowcontrolwindow(agmt))) {
rd->flowcontrol_detection++;
+ PR_Unlock(rd->lock);
DS_Sleep(PR_MillisecondsToInterval(agmt_get_flowcontrolpause(agmt)));
+ } else {
+ PR_Unlock(rd->lock);
}
- PR_Unlock(rd->lock);
}
static int