summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-10-18 01:20:46 -0400
committerEndi Sukma Dewata <edewata@vm-117.idm.lab.bos.redhat.com>2012-10-22 10:36:50 -0400
commita191e9632cebe547b3e23c1d7dca688b294dd880 (patch)
treea236e137a47ab0bd9c9d6433a4b93e275c50ebd3
parent98ad9c109ec41d0977d4249ac5e41dcf4c484a22 (diff)
downloadpki-a191e9632cebe547b3e23c1d7dca688b294dd880.zip
pki-a191e9632cebe547b3e23c1d7dca688b294dd880.tar.gz
pki-a191e9632cebe547b3e23c1d7dca688b294dd880.tar.xz
Reorder VLV indexing for clones to avoid errors
-rw-r--r--base/ca/shared/conf/CS.cfg.in4
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java8
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java7
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java8
-rw-r--r--base/kra/shared/conf/CS.cfg.in4
5 files changed, 15 insertions, 16 deletions
diff --git a/base/ca/shared/conf/CS.cfg.in b/base/ca/shared/conf/CS.cfg.in
index 94a3e5b..5a2eea6 100644
--- a/base/ca/shared/conf/CS.cfg.in
+++ b/base/ca/shared/conf/CS.cfg.in
@@ -818,9 +818,9 @@ internaldb.ldapconn.secureConn=false
preop.internaldb.schema.ldif=/usr/share/pki/ca/conf/schema.ldif
preop.internaldb.ldif=/usr/share/pki/ca/conf/database.ldif
preop.internaldb.data_ldif=/usr/share/pki/ca/conf/db.ldif,/usr/share/pki/ca/conf/acl.ldif
-preop.internaldb.index_ldif=
+preop.internaldb.index_ldif=/usr/share/pki/ca/conf/index.ldif
preop.internaldb.manager_ldif=/usr/share/pki/ca/conf/manager.ldif
-preop.internaldb.post_ldif=/usr/share/pki/ca/conf/index.ldif,/usr/share/pki/ca/conf/vlv.ldif,/usr/share/pki/ca/conf/vlvtasks.ldif
+preop.internaldb.post_ldif=/usr/share/pki/ca/conf/vlv.ldif,/usr/share/pki/ca/conf/vlvtasks.ldif
preop.internaldb.wait_dn=cn=index1160589769, cn=index, cn=tasks, cn=config
internaldb.multipleSuffix.enable=false
jobsScheduler._000=##
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java b/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
index e247b42..c5804f2 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
+++ b/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
@@ -1506,8 +1506,8 @@ public class ConfigurationUtils {
return dir.delete();
}
- public static void populateIndexes() throws Exception {
- CMS.debug("populateIndexes(): start");
+ public static void populateVLVIndexes() throws Exception {
+ CMS.debug("populateVLVIndexes(): start");
IConfigStore cs = CMS.getConfigStore();
IConfigStore dbCfg = cs.getSubStore("internaldb");
@@ -1542,7 +1542,7 @@ public class ConfigurationUtils {
taskComplete = true;
String val = (String) attr.getStringValues().nextElement();
if (val.compareTo("0") != 0) {
- CMS.debug("Error in populating local indexes: nsTaskExitCode=" + val);
+ CMS.debug("Error in populating local VLV indexes: nsTaskExitCode=" + val);
}
}
}
@@ -1552,7 +1552,7 @@ public class ConfigurationUtils {
} while (!taskComplete);
}
} catch (Exception e) {
- CMS.debug("populateIndexes(): Exception thrown: " + e);
+ CMS.debug("populateVLVIndexes(): Exception thrown: " + e);
throw e;
} finally {
releaseConnection(conn);
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java b/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
index 89f01e0..67f10bd 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
+++ b/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
@@ -483,15 +483,14 @@ public class DatabasePanel extends WizardPanelBase {
cs.putString("preop.internaldb.replicationpwd", replicationpwd);
cs.putString("preop.database.removeData", "false");
- ConfigurationUtils.reInitSubsystem(csType);
- ConfigurationUtils.populateIndexes();
-
if (select.equals("clone")) {
CMS.debug("Start setting up replication.");
ConfigurationUtils.setupReplication();
- ConfigurationUtils.reInitSubsystem(csType);
}
+ ConfigurationUtils.reInitSubsystem(csType);
+ ConfigurationUtils.populateVLVIndexes();
+
cs.putBoolean("preop.Database.done", true);
cs.commit(false);
} catch (Exception e) {
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java
index 8bc3c59..800f123 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java
+++ b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java
@@ -380,14 +380,14 @@ public class SystemConfigService extends PKIService implements SystemConfigResou
cs.putString("preop.database.removeData", "false");
cs.commit(false);
- ConfigurationUtils.reInitSubsystem(csType);
- ConfigurationUtils.populateIndexes();
-
if (data.getIsClone().equals("true")) {
CMS.debug("Start setting up replication.");
ConfigurationUtils.setupReplication();
- ConfigurationUtils.reInitSubsystem(csType);
}
+
+ ConfigurationUtils.reInitSubsystem(csType);
+ ConfigurationUtils.populateVLVIndexes();
+
} catch (Exception e) {
throw new PKIException("Error in populating database" + e);
}
diff --git a/base/kra/shared/conf/CS.cfg.in b/base/kra/shared/conf/CS.cfg.in
index 28653a9..087e40c 100644
--- a/base/kra/shared/conf/CS.cfg.in
+++ b/base/kra/shared/conf/CS.cfg.in
@@ -225,9 +225,9 @@ internaldb.ldapconn.secureConn=false
preop.internaldb.schema.ldif=/usr/share/pki/kra/conf/schema.ldif
preop.internaldb.ldif=/usr/share/pki/kra/conf/database.ldif
preop.internaldb.data_ldif=/usr/share/pki/kra/conf/db.ldif,/usr/share/pki/kra/conf/acl.ldif
-preop.internaldb.index_ldif=
+preop.internaldb.index_ldif=/usr/share/pki/kra/conf/index.ldif
preop.internaldb.manager_ldif=/usr/share/pki/ca/conf/manager.ldif
-preop.internaldb.post_ldif=/usr/share/pki/kra/conf/index.ldif,/usr/share/pki/kra/conf/vlv.ldif,/usr/share/pki/kra/conf/vlvtasks.ldif
+preop.internaldb.post_ldif=/usr/share/pki/kra/conf/vlv.ldif,/usr/share/pki/kra/conf/vlvtasks.ldif
preop.internaldb.wait_dn=cn=index1160527115, cn=index, cn=tasks, cn=config
internaldb.multipleSuffix.enable=false
jobsScheduler._000=##