Blame SOURCES/pki-core-nsds5replicaLastInitStatus-format.patch

abd338
From 151ecf63106425cada104d141a81722570ba2b28 Mon Sep 17 00:00:00 2001
abd338
From: Alexander Bokovoy <abokovoy@redhat.com>
abd338
Date: Thu, 2 Aug 2018 10:33:08 +0300
abd338
Subject: [PATCH] ConfigurationUtil: support new format for
abd338
 nsds5replicaLastInitStatus value
abd338
abd338
pkispawn is reading the attribute nsds5replicaLastInitStatus in
abd338
cn=masterAgreement1-$hostname-pki-tomcat,cn=replica,cn=o\3Dipaca,cn=mapping
abd338
tree,cn=config in order to find the replication status.  The new format
abd338
(in 389-ds-base-1.3.7) for this attribute is "Error (0) Total update
abd338
succeeded" but pkispawn is expecting "0 Total update succeeded"
abd338
abd338
389-ds-base introduced this change with https://pagure.io/389-ds-base/issue/49599
abd338
abd338
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1596629
abd338
---
abd338
 .../cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java    | 2 +-
abd338
 1 file changed, 1 insertion(+), 1 deletion(-)
abd338
abd338
diff --git a/base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java b/base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
abd338
index 576feff56..e443116d7 100644
abd338
--- a/base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
abd338
+++ b/base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
abd338
@@ -2025,7 +2025,7 @@ public class ConfigurationUtils {
abd338
             }
abd338
 
abd338
             String status = replicationStatus(replicadn, masterConn, masterAgreementName);
abd338
-            if (!status.startsWith("0 ")) {
abd338
+            if (!(status.startsWith("Error (0) ") || status.startsWith("0 "))) {
abd338
                 CMS.debug("setupReplication: consumer initialization failed. " + status);
abd338
                 throw new IOException("consumer initialization failed. " + status);
abd338
             }
abd338
-- 
abd338
2.14.4
abd338