Bug 1260001

Summary: cleanallruv should completely clean changelog
Product: Red Hat Enterprise Linux 7 Reporter: Jan Kurik <jkurik>
Component: 389-ds-baseAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED ERRATA QA Contact: Viktor Ashirov <vashirov>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.0CC: gparente, mnavrati, mreynolds, msauton, nhosoi, nkinder, rmeggins, sramling, tbordaz
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.3.1-21.el7_1 Doc Type: Bug Fix
Doc Text:
Previously, after the cleanAllRUV task finished, the change log still contained entries from the cleaned rid. As a consequence, the RUV could contain undesirable data, and the RUV element could be missing the replica URL. Now, cleanAllRUV cleans change log completely as expected.
Story Points: ---
Clone Of: 1240845 Environment:
Last Closed: 2015-11-03 08:21:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1240845, 1270002    
Bug Blocks:    

Description Jan Kurik 2015-09-04 06:57:13 UTC
This bug has been copied from bug #1240845 and has been proposed
to be backported to 7.1 z-stream (EUS).

Comment 5 Sankar Ramalingam 2015-09-22 13:21:13 UTC
1. Created 2 way MMR setup, M1 and M2.
2. Replicated entries from M1 to M2 and vice versa.
3. Stopped M2 and deleted the replication agreement from M1.
4. Ran cleanallruv task.
[22/Sep/2015:09:14:38 -0400] NSMMReplicationPlugin - agmt_delete: begin
[22/Sep/2015:09:15:11 -0400] NSMMReplicationPlugin - CleanAllRUV Task (rid 1232): Cleaning local ruv's... 
[22/Sep/2015:09:15:12 -0400] NSMMReplicationPlugin - CleanAllRUV Task (rid 1232): Waiting for all the replicas to be cleaned... 
[22/Sep/2015:09:15:12 -0400] NSMMReplicationPlugin - CleanAllRUV Task (rid 1232): Waiting for all the replicas to finish cleaning... 
[22/Sep/2015:09:15:12 -0400] NSMMReplicationPlugin - CleanAllRUV Task (rid 1232): Successfully cleaned rid(1232). 

5. kill -9 $(pgrep ns-slapd)
6. start-dirsrv M1
7. [root@rhds10-vm2 MMR_WINSYNC]# ldapsearch -H ldap://localhost:1189 -xLLL -D "cn=directory manager" -w Secret123 -b "dc=passsync,dc=com"  '(&(nsuniqueid=ffffffff-ffffffff-ffffffff-ffffffff)(objectclass=nstombstone))' nsds50ruv
dn: cn=replica,cn=dc\3Dpasssync\2Cdc\3Dcom,cn=mapping tree,cn=config
nsds50ruv: {replicageneration} 5571bb01000004cf0000
nsds50ruv: {replica 1231 ldap://rhds10-vm2.lab.eng.blr.redhat.com:1189} 5571bb
 a3000004cf0000 56015416000004cf0000


Search doesn't return ruv for the second replica. Hence, marking the bug as Verified.

Comment 6 Sankar Ramalingam 2015-09-22 13:22:07 UTC
Build tested:
[root@rhds10-vm2 MMR_WINSYNC]# rpm -qa |grep -i 389-ds
389-ds-base-1.3.4.0-17.el7.x86_64
389-ds-base-libs-1.3.4.0-17.el7.x86_64

Comment 7 Sankar Ramalingam 2015-09-22 13:25:42 UTC
Tested it on RHEL7.2 instead of RHEL7.1z. I will update my comments after finishing the tests on RHEL7.1z. So, changing the status back to ON_QA.

Comment 8 Sankar Ramalingam 2015-09-23 11:01:17 UTC
[root@beast MMR_WINSYNC]# /usr/sbin/stop-dirsrv M2
[root@beast MMR_WINSYNC]# PORT="1189"; ldapdelete -x -p $PORT -h localhost -D "cn=Directory Manager" -w Secret123 "cn=1189_to_1626_on_`hostname`,cn=replica,cn=\"dc=passsync,dc=com\",cn=mapping tree,cn=config"
[root@beast MMR_WINSYNC]# TASK_NAME=task123; SUFFIX="dc=passsync,dc=com";REPLICA_ID=1232 ; PORT="1189"; ldapmodify -a -x -p $PORT -h localhost -D "cn=Directory Manager" -w Secret123 << EOF
> dn: cn=$TASK_NAME,cn=cleanallruv,cn=tasks,cn=config
> cn: $TASK_NAME
> objectclass: extensibleObject
> replica-base-dn: $SUFFIX
> replica-id: $REPLICA_ID
> EOF
adding new entry "cn=task123,cn=cleanallruv,cn=tasks,cn=config"

==> /var/log/dirsrv/slapd-M1/errors <==
[23/Sep/2015:06:58:14 -0400] NSMMReplicationPlugin - CleanAllRUV Task: Successfully cleaned rid(1232).

[root@beast MMR_WINSYNC]# kill -9 $(pgrep ns-slapd)
[root@beast MMR_WINSYNC]# start-dirsrv M1

[root@beast MMR_WINSYNC]# ldapsearch -H ldap://localhost:1189 -xLLL -D "cn=directory manager" -w Secret123 -b "dc=passsync,dc=com"  '(&(nsuniqueid=ffffffff-ffffffff-ffffffff-ffffffff)(objectclass=nstombstone))' nsds50ruv
dn: cn=replica,cn=dc\3Dpasssync\2Cdc\3Dcom,cn=mapping tree,cn=config
nsds50ruv: {replicageneration} 5602772f000004cf0000
nsds50ruv: {replica 1231 ldap://beast.idmqe.lab.eng.bos.redhat.com:1189} 56027
 8c6000204cf0000 560278cb000504cf0000
nsds50ruv: {replica 2232 ldap://beast.idmqe.lab.eng.bos.redhat.com:2289}
nsds50ruv: {replica 2231 ldap://beast.idmqe.lab.eng.bos.redhat.com:2189}


Build tested:
[root@beast MMR_WINSYNC]# rpm -qa |grep -i 389-ds
389-ds-base-libs-1.3.3.1-22.el7_1.x86_64
389-ds-base-1.3.3.1-22.el7_1.x86_64
389-ds-base-debuginfo-1.3.3.1-22.el7_1.x86_64

[root@beast MMR_WINSYNC]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.1 (Maipo)

Comment 10 errata-xmlrpc 2015-11-03 08:21:18 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://rhn.redhat.com/errata/RHBA-2015-1960.html

Comment 11 Sankar Ramalingam 2016-03-30 13:19:42 UTC
[root@iceman ~]# ldapsearch -H ldap://localhost:1189 -xLLL -D "cn=directory manager" -w Secret123 -b "dc=passsync,dc=com"  '(&(nsuniqueid=ffffffff-ffffffff-ffffffff-ffffffff)(objectclass=nstombstone))' nsds50ruv
dn: nsuniqueid=ffffffff-ffffffff-ffffffff-ffffffff,dc=passsync,dc=com
nsds50ruv: {replicageneration} 56fb75e7000008a30000
nsds50ruv: {replica 2211 ldap://iceman.idmqe.lab.eng.bos.redhat.com:1189} 56fb
 786c000008a30000 56fb7878000208a30000
nsds50ruv: {replica 2215 ldap://iceman.idmqe.lab.eng.bos.redhat.com:3189}
nsds50ruv: {replica 2213 ldap://iceman.idmqe.lab.eng.bos.redhat.com:2189}
nsds50ruv: {replica 2216 ldap://iceman.idmqe.lab.eng.bos.redhat.com:3289}
nsds50ruv: {replica 2214 ldap://iceman.idmqe.lab.eng.bos.redhat.com:2289}
nsds50ruv: {replica 2212 ldap://iceman.idmqe.lab.eng.bos.redhat.com:1289}