ldap/admin/src/scripts/remove-ds.pl.in | 4 ++++
ldap/servers/slapd/back-ldbm/ldif2ldbm.c | 9 ++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 17dc978c84e6099e4abe884a535067147b618c37
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Wed Jul 27 14:37:13 2016 -0700
Ticket #48940 - DS logs have warning:ancestorid not indexed
Description: When reindexing, the subtree to be reindexed is empty,
a cryptic warning message is logged in the error log:
warning: ancestorid not indexed on 10; possibly, the entry id ##
has no descendants yet.
This message is benign and not to be logged as DEBUG_ANY/FATAL.
The message is logged when the log level is set to BACKLDBM = 0x080000
# vlvindex -Z test -n userRoot -T testIndex -d 524288
as follows:
Info: Entry id ### has no descendants according to ancestorid. Index
file created by this reindex will be empty.
https://fedorahosted.org/389/ticket/48940
Reviewed by wibrown(a)redhat.com (Thank you, William!!)
diff --git a/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
b/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
index 52338c2..5898361 100644
--- a/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
+++ b/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
@@ -903,11 +903,10 @@ static IDList *ldbm_fetch_subtrees(backend *be, char **include, int
*err)
slapi_sdn_done(&sdn);
if (idl == NULL) {
if (DB_NOTFOUND == *err) {
- LDAPDebug(LDAP_DEBUG_ANY,
- "warning: %s not indexed on %lu; "
- "possibly, the entry id %lu has no descendants yet.\n",
-
entryrdn_get_noancestorid()?"entryrdn":"ancestorid",
- id, id);
+ LDAPDebug2Args(LDAP_DEBUG_BACKLDBM,
+ "Info: Entry id %lu has no descendants according to %s. "
+ "Index file created by this reindex will be empty.\n",
+ id,
entryrdn_get_noancestorid()?"entryrdn":"ancestorid");
*err = 0; /* not a problem */
} else {
LDAPDebug(LDAP_DEBUG_ANY,
commit 2b341922a42f305122fbd6eb97e96e0612f8e5d2
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Wed Jul 27 12:40:25 2016 -0700
Ticket #48934 - remove-ds.pl deletes an instance even if wrong prefix was specified
Description: remove-ds.pl skipped to check "slapd" part of
"slapd-instance".
This patch adds the check and if it is not "slapd", it quits with the error
message. For example:
Error: Invalid instance name "bogus-test"
https://fedorahosted.org/389/ticket/48934
Reviewed by mreynolds(a)redhat.com (Thanks, Mark!!)
diff --git a/ldap/admin/src/scripts/remove-ds.pl.in
b/ldap/admin/src/scripts/remove-ds.pl.in
index b35ae32..252f3f9 100755
--- a/ldap/admin/src/scripts/remove-ds.pl.in
+++ b/ldap/admin/src/scripts/remove-ds.pl.in
@@ -52,6 +52,10 @@ unless ($inst) {
print STDERR "Full instance name must be specified (e.g. -
slapd-example)\n";
exit 1;
}
+unless ($slapd eq "slapd") {
+ print STDERR "Error: Invalid instance name \"$instname\"\n";
+ exit 1;
+}
my @errs = removeDSInstance($inst, $force, $all, $initconfig_dir);
if (@errs) {