From 480b7c62e7f72d84061cfe4e8381a18dbd90b638 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Thu, 15 Mar 2012 16:21:01 +0000
Subject: [PATCH] Final fix for OPENDJ-249: dsreplication disable --disableAll error removing contents of "cn=admin data"
---
opends/src/ads/org/opends/admin/ads/ADSContext.java | 8 +-------
opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java | 16 ----------------
2 files changed, 1 insertions(+), 23 deletions(-)
diff --git a/opends/src/ads/org/opends/admin/ads/ADSContext.java b/opends/src/ads/org/opends/admin/ads/ADSContext.java
index 83d0563..eb22631 100644
--- a/opends/src/ads/org/opends/admin/ads/ADSContext.java
+++ b/opends/src/ads/org/opends/admin/ads/ADSContext.java
@@ -563,12 +563,6 @@
LdapName dn = makeDNFromServerProperties(serverProperties);
try
{
- if (serverProperties.containsKey(
- ServerProperty.INSTANCE_PUBLIC_KEY_CERTIFICATE))
- {
- unregisterInstanceKeyCertificate(serverProperties, dn);
- }
-
// Unregister the server from the server groups.
String member = "cn="
+ Rdn.escapeValue(serverProperties.get(ServerProperty.ID));
@@ -1251,7 +1245,6 @@
{
String[] dns = {getServerContainerDN(),
getServerGroupContainerDN(),
- getInstanceKeysContainerDN(),
removeAdministrators ? getAdministratorContainerDN() : null };
try
{
@@ -2511,6 +2504,7 @@
@param serverEntryDn The server's ADS entry DN.
@throws NamingException In case some JNDI operation fails.
*/
+ @SuppressWarnings("unused")
private void unregisterInstanceKeyCertificate(
Map<ServerProperty, Object> serverProperties,
LdapName serverEntryDn)
diff --git a/opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java b/opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
index 2d25f5f..b8f32f0 100644
--- a/opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
+++ b/opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
@@ -7017,22 +7017,6 @@
ERR_REPLICATION_UPDATING_ADS.get(adce.getMessageObject()),
ERROR_UPDATING_ADS, adce);
}
- try
- {
- // Delete all contents from truststore.
- printProgress(formatter.getFormattedWithPoints(
- INFO_REPLICATION_REMOVE_TRUSTSTORE_CONTENTS.get()));
- ServerDescriptor.cleanAdsTrustStore(adsCtx.getDirContext());
- printProgress(formatter.getFormattedDone());
- printlnProgress();
- }
- catch (Throwable t)
- {
- LOG.log(Level.SEVERE, "Error removing contents of truststore: "+t, t);
- throw new ReplicationCliException(
- ERR_REPLICATION_UPDATING_ADS.get(t.toString()),
- ERROR_UPDATING_ADS, t);
- }
}
else if (disableAllBaseDns &&
(disableReplicationServer || !server.isReplicationServer()))
--
Gitblit v1.10.0