Bug 1379424

Summary: Reset incremental update status after re-initialization
Product: Red Hat Enterprise Linux 7 Reporter: German Parente <gparente>
Component: 389-ds-baseAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED ERRATA QA Contact: Viktor Ashirov <vashirov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: mreynolds, nkinder, pvoborni, rmeggins, spichugi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.6.1-4.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 21:10:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description German Parente 2016-09-26 17:00:25 UTC
Description of problem:

This is not a real bug. It's something that could confuse our customers when using ipa command line. Feel free to change component if needed.

Sometimes we do a re-initialization of the replicas and customer uses the ipa command line to look at the status and we could have something like this:

[root@rz1b022 ~]# ipa-csreplica-manage list -v buxv023.hv.ibb.lan
Directory Manager password:

rz2hh022.rz2hh.ibb.lan
  last init status: 0 Total update succeeded
  last init ended: 2016-09-23 06:16:10+00:00
  last update status: -1 Incremental update has failed and requires administrator actionLDAP error: Can't contact LDAP server
  last update ended: 1970-01-01 00:00:00+00:00


So, the replicas has been re-initialized but as no incremental update took place after that, it seems to me that the attribute nsds5replicaLastUpdateStatus has never been updated. And this is confusing customers very often.

It could be good to reset the nsds5replicaLastUpdateStatus after a re-init. 

But this change could be controversial since someone could have the idea to check both status separatedly.

Another possibility is to change the ipa command line not to display the bare status but to do something with it just to show an unified information.

Feel also free to close this bug if considered not to be relevant.

Comment 2 mreynolds 2016-12-07 18:00:42 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/49062

Comment 3 mreynolds 2017-03-13 20:15:22 UTC
Fixed upstream

Comment 5 Simon Pichugin 2017-05-30 14:52:08 UTC
Hi Mark,
can you please advise about how to reproduce the issue properly?

As I understand from the comments, I need to put the server in the state where "Incremental update has failed" and then reinitialize the agreement to see if the status has changed or not.
If so, can you, please, recommend any easy way to do so?

Comment 6 mreynolds 2017-05-30 15:08:59 UTC
(In reply to Simon Pichugin from comment #5)
> Hi Mark,
> can you please advise about how to reproduce the issue properly?
> 
> As I understand from the comments, I need to put the server in the state
> where "Incremental update has failed" and then reinitialize the agreement to
> see if the status has changed or not.
> If so, can you, please, recommend any easy way to do so?

Yeah...  We could not reproduce the problem, but in the code it was obvious where it wasn't being reset.  So even though we couldn't reproduce it in house, we did the fix anyway since it was really simple.

Comment 7 Simon Pichugin 2017-06-02 09:05:18 UTC
According to Mark's commentary above, we can't reproduce the problem.
Through our CI we check it for regressions. Also sanity testesting.

[root@qeos-67 ds]# py.test -v dirsrvtests/tests/suites/replication/single_master_test.py dirsrvtests/tests/suites/replication/acceptance_test.py
================== test session starts ==================
platform linux2 -- Python 2.7.5, pytest-3.1.1, py-1.4.33, pluggy-0.4.0 -- /usr/bin/python
cachedir: .cache
metadata: {'Python': '2.7.5', 'Platform': 'Linux-3.10.0-671.el7.x86_64-x86_64-with-redhat-7.4-Maipo', 'Packages': {'py': '1.4.33', 'pytest': '3.1.1', 'pluggy': '0.4.0'}, 'Plugins': {'beakerlib': '0.7.1', 'html': '1.14.2', 'cov': '2.5.1', 'metadata': '1.5.0'}}
DS build: 1.3.6.1
389-ds-base: 1.3.6.1-15.el7
nss: 3.28.4-8.el7
nspr: 4.13.1-1.0.el7_3
openldap: 2.4.44-4.el7
svrcore: 4.1.3-2.el7

rootdir: /mnt/tests/rhds/tests/upstream/ds, inifile:
plugins: metadata-1.5.0, html-1.14.2, cov-2.5.1, beakerlib-0.7.1
collected 13 items

dirsrvtests/tests/suites/replication/single_master_test.py::test_mail_attr_repl PASSED
dirsrvtests/tests/suites/replication/single_master_test.py::test_lastupdate_attr_before_init PASSED
dirsrvtests/tests/suites/replication/acceptance_test.py::test_add_entry PASSED
dirsrvtests/tests/suites/replication/acceptance_test.py::test_modify_entry PASSED
dirsrvtests/tests/suites/replication/acceptance_test.py::test_delete_entry PASSED
dirsrvtests/tests/suites/replication/acceptance_test.py::test_modrdn_entry[0] PASSED
dirsrvtests/tests/suites/replication/acceptance_test.py::test_modrdn_entry[1] PASSED
dirsrvtests/tests/suites/replication/acceptance_test.py::test_modrdn_after_pause PASSED
dirsrvtests/tests/suites/replication/acceptance_test.py::test_modify_stripattrs PASSED
dirsrvtests/tests/suites/replication/acceptance_test.py::test_new_suffix PASSED
dirsrvtests/tests/suites/replication/acceptance_test.py::test_many_attrs PASSED
dirsrvtests/tests/suites/replication/acceptance_test.py::test_double_delete PASSED
dirsrvtests/tests/suites/replication/acceptance_test.py::test_password_repl_error PASSED

================== 13 passed in 378.52 seconds ==================

Comment 8 errata-xmlrpc 2017-08-01 21:10:21 UTC
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.

https://access.redhat.com/errata/RHBA-2017:2086