Bug 1515319

Summary: nsDS5ReplicaId cant be set to the old value it had before
Product: Red Hat Enterprise Linux 7 Reporter: Simon Pichugin <spichugi>
Component: 389-ds-baseAssignee: mreynolds
Status: CLOSED ERRATA QA Contact: RHDS QE <ds-qe-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.5CC: bsmejkal, nkinder, pasik, tbordaz, vashirov
Target Milestone: rc   
Target Release: 7.9   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.10.2-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 19:46:50 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 Simon Pichugin 2017-11-20 14:53:26 UTC
Description of problem:
After setting nsDS5ReplicaId to some value, we currently can't set it back.
 
Version-Release number of selected component (if applicable):
1.3.7.5-9.el7


How reproducible:
Always

Steps to reproduce:
  1. Enable replication
  2. Get current nsDS5ReplicaId value
  3. Set valid value to nsDS5ReplicaId
  4. Set nsDS5ReplicaId to the old value

Expected results:
nsDS5ReplicaId should be successfully changed.

Actual results:
ldap.OPERATIONS_ERROR: {'desc': 'Operations error', 'info': 'replica type is already 2 - not changing'}

Comment 2 thierry bordaz 2019-12-16 13:40:41 UTC
This behavior exists since the NSCP origin. 

The callback function (replica_config_change_type_and_id) changes both replicaId and nsDS5ReplicaType at the  same time.
Values are assumed to be changed together. I do not see the reason why they are not changeable separately.

In addition, the first try succeed, while it changes only the replicaId. After try, any attempt will fail.

IMHO we could relax the controls (oldtype != newtype and oldrid !=newrid)

Comment 3 mreynolds 2020-02-24 15:24:54 UTC
Upstream ticket:
https://pagure.io/389-ds-base/issue/50909

Comment 7 bsmejkal 2020-04-09 08:49:54 UTC
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.6.8, pytest-5.4.1, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-3.10.0-1133.el7.x86_64-x86_64-with-redhat-7.9-Maipo', 'Packages': {'pytest': '5.4.1', 'py': '1.8.1', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.8.0', 'html': '2.1.1'}}
389-ds-base: 1.3.10.2-1.el7
nss: 3.44.0-7.el7_7
nspr: 4.21.0-1.el7
openldap: 2.4.44-21.el7_6
cyrus-sasl: 2.1.26-23.el7
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests, inifile: pytest.ini
plugins: metadata-1.8.0, html-2.1.1
collected 10 items                                                                                                                                                                                                

ds/dirsrvtests/tests/suites/replication/replica_config_test.py::test_replica_num_add[nsDS5ReplicaType--1-4-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED            [ 10%]
ds/dirsrvtests/tests/suites/replication/replica_config_test.py::test_replica_num_add[nsDS5Flags--1-2-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED                  [ 20%]
ds/dirsrvtests/tests/suites/replication/replica_config_test.py::test_replica_num_add[nsDS5ReplicaId-0-65536-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED           [ 30%]
ds/dirsrvtests/tests/suites/replication/replica_config_test.py::test_replica_num_add[nsds5ReplicaPurgeDelay--2-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED [ 40%]
ds/dirsrvtests/tests/suites/replication/replica_config_test.py::test_replica_num_add[nsDS5ReplicaBindDnGroupCheckInterval--2-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED [ 50%]
ds/dirsrvtests/tests/suites/replication/replica_config_test.py::test_replica_num_add[nsds5ReplicaTombstonePurgeInterval--2-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED [ 60%]
ds/dirsrvtests/tests/suites/replication/replica_config_test.py::test_replica_num_add[nsds5ReplicaProtocolTimeout--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED [ 70%]
ds/dirsrvtests/tests/suites/replication/replica_config_test.py::test_replica_num_add[nsds5ReplicaReleaseTimeout--1-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-1] PASSED [ 80%]
ds/dirsrvtests/tests/suites/replication/replica_config_test.py::test_replica_num_add[nsds5ReplicaBackoffMin-0-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-3] PASSED [ 90%]
ds/dirsrvtests/tests/suites/replication/replica_config_test.py::test_replica_num_add[nsds5ReplicaBackoffMax-0-9223372036854775807-9999999999999999999999999999999999999999999999999999999999999999999-invalid-6] PASSED [100%]

========================================================================================= 10 passed in 13.80s =====================================================================================================

Marking as VERIFIED.

Comment 9 errata-xmlrpc 2020-09-29 19:46:50 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 (389-ds-base bug fix and enhancement update), 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-2020:3894