Bug 830344 - [RFE] Improve replication agreement status messages
[RFE] Improve replication agreement status messages
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base (Show other bugs)
6.4
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Rich Megginson
Sankar Ramalingam
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-08 17:38 EDT by Nathan Kinder
Modified: 2013-02-21 03:17 EST (History)
3 users (show)

See Also:
Fixed In Version: 389-ds-base-1.2.11.12-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: Previously, replication errors logged in the errors log would contain very little or incorrect information. Negative error code numbers were being ignored due to a limitation in the old mozldap sdk. The new openldap sdk provides more information for negative error return codes. Consequence: Replication errors were incorrect or misleading. Fix: Improve the handling of negative error codes. Result: With this update, the replication errors are more useful in helping diagnose and fix problems.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 03:17:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nathan Kinder 2012-06-08 17:38:14 EDT
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/388

When setting the value for the replication status attributes in replication agreements, we only call ldap_err2string() if the return code is greater than 0.  If the return code is negative, we hard code the error description as "System error".

When using OpenLDAP client libraries, you can get a textual error string for negative LDAP return codes, as demonstrated by this test program output:

--------------------------------------------
[nkinder@localhost test]$ ./ldaperr 
rc: -1, "Can't contact LDAP server"
rc: -2, "Local error"
rc: -3, "Encoding error"
rc: -4, "Decoding error"
rc: -5, "Timed out"
rc: -6, "Unknown authentication method"
rc: -7, "Bad search filter"
rc: -8, "User cancelled operation"
rc: -9, "Bad parameter to an ldap routine"
rc: -10, "Out of memory"
rc: -11, "Connect error"
rc: -12, "Not Supported"
rc: -13, "Control not found"
rc: -14, "No results returned"
rc: -15, "More results to return"
rc: -16, "Client Loop"
rc: -17, "Referral Limit Exceeded"
--------------------------------------------

I believe we avoid calling ldap_err2string() for negative return codes due to a limitation in MozLDAP.  We should get the more informative error strings for negative return codes when using OpenLDAP.
Comment 1 RHEL Product and Program Management 2012-07-10 02:18:01 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 2 RHEL Product and Program Management 2012-07-10 19:00:36 EDT
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
Comment 4 Milan Kubík 2012-11-12 06:14:30 EST
520|0 20 9031 1 2|----------------- Starting Test bug830344_start -------------------------
520|0 20 9031 1 3|Bug 830344: Shut down one instance and create an entry on the supplier.
520|0 20 9031 1 4|                                                                  
520|0 20 9031 1 5|INFO: Stopping M1 instance.
520|0 20 9031 1 6|INFO: Instance M1 successfully stopped.
520|0 20 9031 1 7|INFO: Adding an entry to M2 instance.
520|0 20 9031 1 8|INFO: Entry successfully added.
520|0 20 9031 1 9|INFO: Waiting for the change to 'propagate'.
520|0 20 9031 1 10|TestCase [bug830344_start] result-> [PASS]
220|0 20 0 06:24:48|PASS
200|0 21 06:24:48|TP Start
520|0 21 9031 1 1|                                                                  
520|0 21 9031 1 2|----------------- Starting Test bug830344_run -------------------------
520|0 21 9031 1 3|Bug 830344: Chcek nsds5replicaLastUpdateStatus attribute after replication. Expecting "Can't contact LDAP server" message.
520|0 21 9031 1 4|                                                                  
520|0 21 9031 1 5|INFO: Checking replication agreement status message.
520|0 21 9031 1 6|ldapsearch output: nsds5replicaLastUpdateStatus: -1  - LDAP error: Can't contact LDAP server
520|0 21 9031 1 7|INFO: Found expected error message.
520|0 21 9031 1 8|TestCase [bug830344_run] result-> [PASS]
220|0 21 0 06:24:49|PASS
200|0 22 06:24:49|TP Start
520|0 22 9031 1 1|                                                                  
520|0 22 9031 1 2|----------------- Starting Test bug830344_clean -------------------------
520|0 22 9031 1 3|Bug 830344: Revert test changes -- delete an entry from supplier, propagate it to 2nd master, start stopped instance.
520|0 22 9031 1 4|                                                                  
520|0 22 9031 1 5|INFO: Starting M1 instance.
520|0 22 9031 1 6|INFO: Instance M1 successfully started.
520|0 22 9031 1 7|INFO: Removing test user.
520|0 22 9031 1 8|INFO: Entry successfully deleted.
520|0 22 9031 1 9|INFO: Waiting for replication to take place.
520|0 22 9031 1 10|TestCase [bug830344_clean] result-> [PASS]
220|0 22 0 06:24:55|PASS
Comment 5 Milan Kubík 2012-11-12 06:19:12 EST
rpm -qa | grep 389-ds-base
389-ds-base-1.2.11.15-3.el6.x86_64
Comment 7 errata-xmlrpc 2013-02-21 03:17:42 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0503.html

Note You need to log in before you can comment on or make changes to this bug.