summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pki/base/ca/shared/conf/CS.cfg2
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java18
2 files changed, 14 insertions, 6 deletions
diff --git a/pki/base/ca/shared/conf/CS.cfg b/pki/base/ca/shared/conf/CS.cfg
index 516006a20..cf295ea1d 100644
--- a/pki/base/ca/shared/conf/CS.cfg
+++ b/pki/base/ca/shared/conf/CS.cfg
@@ -696,7 +696,7 @@ preop.internaldb.ldif=/usr/share/[PKI_FLAVOR]/ca/conf/schema.ldif,/usr/share/[PK
preop.internaldb.data_ldif=/usr/share/[PKI_FLAVOR]/ca/conf/db.ldif,/usr/share/[PKI_FLAVOR]/ca/conf/acl.ldif
preop.internaldb.index_ldif=
preop.internaldb.post_ldif=/usr/share/[PKI_FLAVOR]/ca/conf/index.ldif,/usr/share/[PKI_FLAVOR]/ca/conf/vlv.ldif,/usr/share/[PKI_FLAVOR]/ca/conf/vlvtasks.ldif
-preop.internaldb.wait_dn=cn=index1160589780, cn=index, cn=tasks, cn=config
+preop.internaldb.wait_dn=cn=index1160589769, cn=index, cn=tasks, cn=config
internaldb.multipleSuffix.enable=false
jobsScheduler._000=##
jobsScheduler._001=## jobScheduler
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
index e9523e52b..569978e7d 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
@@ -936,22 +936,30 @@ public class DatabasePanel extends WizardPanelBase {
importLDIFS("preop.internaldb.post_ldif", conn);
/* For vlvtask, we need to check if the task has
- been completed or not
+ been completed or not. Presence of nsTaskExitCode means task is complete
*/
String wait_dn = cs.getString("preop.internaldb.wait_dn", "");
if (!wait_dn.equals("")) {
LDAPEntry task = null;
+ boolean taskComplete = false;
+ CMS.debug("Checking wait_dn " + wait_dn);
do {
+ Thread.sleep(1000);
try {
- CMS.debug("Checking wait_dn " + wait_dn);
task = conn.read(wait_dn, (String[])null);
if (task != null) {
- Thread.sleep(1000);
+ LDAPAttribute attr = task.getAttribute("nsTaskExitCode");
+ if (attr != null) {
+ taskComplete = true;
+ String val = (String) attr.getStringValues().nextElement();
+ if (val.compareTo("0") != 0) {
+ CMS.debug("Error in populating local indexes: nsTaskExitCode=" + val);
+ }
+ }
}
} catch (LDAPException e) {
- task = null;
}
- } while (task != null);
+ } while (!taskComplete);
CMS.debug("Done checking wait_dn " + wait_dn);
}