ldap/servers/slapd/back-ldbm/ldbm_add.c | 59 +++++++++++++++++++++++---------
1 file changed, 43 insertions(+), 16 deletions(-)
New commits:
commit 78fdd6165cb2c9da4e30452ebdcdcf7aad3d30c7
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Mon Sep 8 14:29:29 2014 -0700
Ticket #47834 - Tombstone_to_glue: if parents are also converted to glue, the target entry's DN must be adjusted.
Description: Previous fix for the ticket #47834 broke the CI test case
47815.
The fix for 47815 removed the addingentry from the entry cache if
SLAPI_PLUGIN_BE_TXN_POST_ADD_FN failed. The #47834 patch accidentally
deleted the code.
Instead of adding it back, this patch moves the deletion of the entry
from the entry cache to cover both cases SLAPI_PLUGIN_BE_TXN_POST_ADD
_FN successes or fails.
https://fedorahosted.org/389/ticket/47834
Reviewed by mreynolds(a)redhat.com (Thank you, Mark!!)
(cherry picked from commit 7db4fa90caa543b59352046138f453236c0fd652)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_add.c b/ldap/servers/slapd/back-ldbm/ldbm_add.c
index 2f1b398..b74154a 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_add.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_add.c
@@ -1209,21 +1209,6 @@ error_return:
{
next_id_return( be, addingentry->ep_id );
}
- if ( addingentry )
- {
- if (inst && cache_is_in_cache(&inst->inst_cache, addingentry)) {
- CACHE_REMOVE(&inst->inst_cache, addingentry);
- /* tell frontend not to free this entry */
- slapi_pblock_set(pb, SLAPI_ADD_ENTRY, NULL);
- }
- else if (!cache_has_otherref(&inst->inst_cache, addingentry))
- {
- if (!is_resurect_operation) { /* if resurect, tombstoneentry is dupped. */
- backentry_clear_entry(addingentry); /* e is released in the frontend */
- }
- }
- CACHE_RETURN( &inst->inst_cache, &addingentry );
- }
if (rc == DB_RUNRECOVERY) {
dblayer_remember_disk_filled(li);
ldbm_nasty("Add",80,rc);
@@ -1244,6 +1229,20 @@ error_return:
}
diskfull_return:
if (disk_full) {
+ if ( addingentry ) {
+ if (inst && cache_is_in_cache(&inst->inst_cache, addingentry)) {
+ CACHE_REMOVE(&inst->inst_cache, addingentry);
+ /* tell frontend not to free this entry */
+ slapi_pblock_set(pb, SLAPI_ADD_ENTRY, NULL);
+ }
+ else if (!cache_has_otherref(&inst->inst_cache, addingentry))
+ {
+ if (!is_resurect_operation) { /* if resurect, tombstoneentry is dupped. */
+ backentry_clear_entry(addingentry); /* e is released in the frontend */
+ }
+ }
+ CACHE_RETURN( &inst->inst_cache, &addingentry );
+ }
rc = return_on_disk_full(li);
} else {
/* It is safer not to abort when the transaction is not started. */
@@ -1277,13 +1276,41 @@ diskfull_return:
}
slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &ldap_result_message);
}
-
+ if ( addingentry ) {
+ if (inst && cache_is_in_cache(&inst->inst_cache, addingentry)) {
+ CACHE_REMOVE(&inst->inst_cache, addingentry);
+ /* tell frontend not to free this entry */
+ slapi_pblock_set(pb, SLAPI_ADD_ENTRY, NULL);
+ }
+ else if (!cache_has_otherref(&inst->inst_cache, addingentry))
+ {
+ if (!is_resurect_operation) { /* if resurect, tombstoneentry is dupped. */
+ backentry_clear_entry(addingentry); /* e is released in the frontend */
+ }
+ }
+ CACHE_RETURN( &inst->inst_cache, &addingentry );
+ }
/* Release SERIAL LOCK */
if (!noabort) {
dblayer_txn_abort(be, &txn); /* abort crashes in case disk full */
}
/* txn is no longer valid - reset the txn pointer to the parent */
slapi_pblock_set(pb, SLAPI_TXN, parent_txn);
+ } else {
+ if ( addingentry ) {
+ if (inst && cache_is_in_cache(&inst->inst_cache, addingentry)) {
+ CACHE_REMOVE(&inst->inst_cache, addingentry);
+ /* tell frontend not to free this entry */
+ slapi_pblock_set(pb, SLAPI_ADD_ENTRY, NULL);
+ }
+ else if (!cache_has_otherref(&inst->inst_cache, addingentry))
+ {
+ if (!is_resurect_operation) { /* if resurect, tombstoneentry is dupped. */
+ backentry_clear_entry(addingentry); /* e is released in the frontend */
+ }
+ }
+ CACHE_RETURN( &inst->inst_cache, &addingentry );
+ }
}
if (!not_an_error) {
rc = SLAPI_FAIL_GENERAL;
ldap/servers/slapd/back-ldbm/ldbm_add.c | 59 +++++++++++++++++++++++---------
1 file changed, 43 insertions(+), 16 deletions(-)
New commits:
commit 7db4fa90caa543b59352046138f453236c0fd652
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Mon Sep 8 14:29:29 2014 -0700
Ticket #47834 - Tombstone_to_glue: if parents are also converted to glue, the target entry's DN must be adjusted.
Description: Previous fix for the ticket #47834 broke the CI test case
47815.
The fix for 47815 removed the addingentry from the entry cache if
SLAPI_PLUGIN_BE_TXN_POST_ADD_FN failed. The #47834 patch accidentally
deleted the code.
Instead of adding it back, this patch moves the deletion of the entry
from the entry cache to cover both cases SLAPI_PLUGIN_BE_TXN_POST_ADD
_FN successes or fails.
https://fedorahosted.org/389/ticket/47834
Reviewed by mreynolds(a)redhat.com (Thank you, Mark!!)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_add.c b/ldap/servers/slapd/back-ldbm/ldbm_add.c
index 2f1b398..b74154a 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_add.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_add.c
@@ -1209,21 +1209,6 @@ error_return:
{
next_id_return( be, addingentry->ep_id );
}
- if ( addingentry )
- {
- if (inst && cache_is_in_cache(&inst->inst_cache, addingentry)) {
- CACHE_REMOVE(&inst->inst_cache, addingentry);
- /* tell frontend not to free this entry */
- slapi_pblock_set(pb, SLAPI_ADD_ENTRY, NULL);
- }
- else if (!cache_has_otherref(&inst->inst_cache, addingentry))
- {
- if (!is_resurect_operation) { /* if resurect, tombstoneentry is dupped. */
- backentry_clear_entry(addingentry); /* e is released in the frontend */
- }
- }
- CACHE_RETURN( &inst->inst_cache, &addingentry );
- }
if (rc == DB_RUNRECOVERY) {
dblayer_remember_disk_filled(li);
ldbm_nasty("Add",80,rc);
@@ -1244,6 +1229,20 @@ error_return:
}
diskfull_return:
if (disk_full) {
+ if ( addingentry ) {
+ if (inst && cache_is_in_cache(&inst->inst_cache, addingentry)) {
+ CACHE_REMOVE(&inst->inst_cache, addingentry);
+ /* tell frontend not to free this entry */
+ slapi_pblock_set(pb, SLAPI_ADD_ENTRY, NULL);
+ }
+ else if (!cache_has_otherref(&inst->inst_cache, addingentry))
+ {
+ if (!is_resurect_operation) { /* if resurect, tombstoneentry is dupped. */
+ backentry_clear_entry(addingentry); /* e is released in the frontend */
+ }
+ }
+ CACHE_RETURN( &inst->inst_cache, &addingentry );
+ }
rc = return_on_disk_full(li);
} else {
/* It is safer not to abort when the transaction is not started. */
@@ -1277,13 +1276,41 @@ diskfull_return:
}
slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &ldap_result_message);
}
-
+ if ( addingentry ) {
+ if (inst && cache_is_in_cache(&inst->inst_cache, addingentry)) {
+ CACHE_REMOVE(&inst->inst_cache, addingentry);
+ /* tell frontend not to free this entry */
+ slapi_pblock_set(pb, SLAPI_ADD_ENTRY, NULL);
+ }
+ else if (!cache_has_otherref(&inst->inst_cache, addingentry))
+ {
+ if (!is_resurect_operation) { /* if resurect, tombstoneentry is dupped. */
+ backentry_clear_entry(addingentry); /* e is released in the frontend */
+ }
+ }
+ CACHE_RETURN( &inst->inst_cache, &addingentry );
+ }
/* Release SERIAL LOCK */
if (!noabort) {
dblayer_txn_abort(be, &txn); /* abort crashes in case disk full */
}
/* txn is no longer valid - reset the txn pointer to the parent */
slapi_pblock_set(pb, SLAPI_TXN, parent_txn);
+ } else {
+ if ( addingentry ) {
+ if (inst && cache_is_in_cache(&inst->inst_cache, addingentry)) {
+ CACHE_REMOVE(&inst->inst_cache, addingentry);
+ /* tell frontend not to free this entry */
+ slapi_pblock_set(pb, SLAPI_ADD_ENTRY, NULL);
+ }
+ else if (!cache_has_otherref(&inst->inst_cache, addingentry))
+ {
+ if (!is_resurect_operation) { /* if resurect, tombstoneentry is dupped. */
+ backentry_clear_entry(addingentry); /* e is released in the frontend */
+ }
+ }
+ CACHE_RETURN( &inst->inst_cache, &addingentry );
+ }
}
if (!not_an_error) {
rc = SLAPI_FAIL_GENERAL;
man/man8/remove-ds-admin.pl.8 | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 376cb989e9b156e9a11c85cdd2a01585ca2922dd
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Mon Sep 8 17:00:42 2014 -0400
Ticket 47300 - Update man page for remove-ds-admin.pl
Description: The man page does not mention the "-a" option
https://fedorahosted.org/389/ticket/47300
Reviewed by: nhosoi(Thanks!)
diff --git a/man/man8/remove-ds-admin.pl.8 b/man/man8/remove-ds-admin.pl.8
index 1830007..6dd8582 100644
--- a/man/man8/remove-ds-admin.pl.8
+++ b/man/man8/remove-ds-admin.pl.8
@@ -19,7 +19,7 @@
remove\-ds\-admin.pl \- Remove all Directory Servers and Admin Server
.SH SYNOPSIS
.B remove-ds-admin.pl
-[\-f] [\-d \-d ... \-d] [\-y]
+[\-f] [\-d \-d ... \-d] [\-y] [\-a]
.SH DESCRIPTION
Shuts down and removes all Directory Server instances and the Admin Server
from the system. The directory server instance configuration
@@ -45,7 +45,13 @@ Force removal - continue on error - otherwise, the command will abort at the fir
Enable debugging - adding more -d will make output more verbose
.TP
.B \fB\-y\fR
-Do the actual processing. Since the command is very destructive, you must provide the -y argument in order for the operation to proceed. \fBUse with extreme caution!\fR
+Do the actual processing. Since the command is very destructive, you must provide the -y argument
+in order for the operation to proceed. \fBUse with extreme caution!\fR Note, the security/certificate
+files are preserved for future setups.
+.TP
+.B \fB\-a\fR
+Remove all the security/certificate files (used with the \-y option). This ensures a complete clean up of the
+previous installation.
.br
.SH AUTHOR
remove-ds-admin.pl was written by the 389 Project.