Bug 949361

Summary: reinitialization of a master with a disabled agreement hangs
Product: Red Hat Enterprise Linux 7 Reporter: Nathan Kinder <nkinder>
Component: 389-ds-baseAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.0CC: jgalipea, mreynolds, nhosoi, sramling
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.1.2-1.el7 Doc Type: Bug Fix
Doc Text:
Cause: The replication status attribute nsds5beginReplicaRefresh is not correctly set after an initialization is performed against a disabled replication agreement. Consequence: It appears that the replication agreement initialization never finishes. When in fact it never took place. Fix: Return an error when trying to initialize a disabled replication agreement. Result: The replication agreement status attributes contain the correct values.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:22:51 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:

Description Nathan Kinder 2013-04-08 01:33:00 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47304

Tested in the context of IPA.

I installed two masters. On one master I disabled the replication agreement, then did a full re-init. The re-initialization never completes.

To reproduce:

* ipa-server-install ...
* ipa-replica-prepare ...
* ipa-replica-install ...
* ldapmodify -h replica ... nsds5ReplicaEnabled=off
* ipa-replica-manage re-initialize --from=master

389-ds-base-1.3.0.2-1.fc18.x86_64

The context of this is backup and restore in a replicated environment. I'm looking for a way to pause replication when doing a restore, so that all non-restored masters can get re-initialized from the restored master.

Comment 1 Rich Megginson 2013-10-01 23:27:14 UTC
moving all ON_QA bugs to MODIFIED in order to add them to the errata (can't add bugs in the ON_QA state to an errata).  When the errata is created, the bugs should be automatically moved back to ON_QA.

Comment 3 Sankar Ramalingam 2013-11-11 10:32:43 UTC
Disabled one of the consumer from the replication agreement and re-initialized replication agreement to verify whether it hangs. The ldapmodify is exiting with error 53 which is expected. No hangs observed. Hence, marking the bug as Verified.

[root@ibm-x3650m4-01-vm-14 ~]# ldapmodify -x -h localhost -p 1189 -D "cn=directory manager" -w Secret123 << EOF
dn: cn=1189_to_1389_on_ibm-x3650m4-01-vm-14.lab.eng.bos.redhat.com,cn=replica,cn="dc=passsync,dc=com",cn=mapping tree,cn=config
changetype: modify
replace: nsds5ReplicaEnabled
nsds5ReplicaEnabled: Off
EOF

modifying entry "cn=1189_to_1389_on_ibm-x3650m4-01-vm-14.lab.eng.bos.redhat.com,cn=replica,cn="dc=passsync,dc=com",cn=mapping tree,cn=config"

[root@ibm-x3650m4-01-vm-14 ~]# ldapmodify -x -h localhost -p 1289 -D "cn=directory manager" -w Secret123 << EOF
dn: cn=1289_to_1389_on_ibm-x3650m4-01-vm-14.lab.eng.bos.redhat.com,cn=replica,cn="dc=passsync,dc=com",cn=mapping tree,cn=config
changetype: modify
replace: nsds5ReplicaEnabled
nsds5ReplicaEnabled: Off
EOF

modifying entry "cn=1289_to_1389_on_ibm-x3650m4-01-vm-14.lab.eng.bos.redhat.com,cn=replica,cn="dc=passsync,dc=com",cn=mapping tree,cn=config"

[root@ibm-x3650m4-01-vm-14 ~]# 



cat InitReplica.sh
#!/bin/sh

    if [ $# -ne 4 ]; then
	echo 'Usage: $1-FQDN_HOST   $2-INST_PORT   $3-REPL_AGMT   $4-BASE_SUFF'
	exit
    fi
    FQDN_HOST="$1"
    INST_PORT=$2
    REPL_AGMT="$3"
    BASE_SUFF="$4"

    /usr/bin/ldapmodify -x -h $FQDN_HOST -p $INST_PORT -D "cn=Directory Manager" -w Secret123 << EOF
dn: cn=$REPL_AGMT,cn=replica,cn="$BASE_SUFF",cn=mapping tree,cn=config
changetype: modify
add: nsDS5BeginReplicaRefresh
nsDS5BeginReplicaRefresh: start
EOF


./InitReplica.sh "`hostname`" 1189 "1189_to_1389_on_ibm-x3650m4-01-vm-14.lab.eng.bos.redhat.com" "dc=passsync,dc=com"
modifying entry "cn=1189_to_1389_on_ibm-x3650m4-01-vm-14.lab.eng.bos.redhat.com,cn=replica,cn="dc=passsync,dc=com",cn=mapping tree,cn=config"
ldap_modify: Server is unwilling to perform (53)
	additional info: Replication agreement is disabled

[root@ibm-x3650m4-01-vm-14 MMR_WINSYNC]# ./InitReplica.sh "`hostname`" 1289 "1289_to_1389_on_ibm-x3650m4-01-vm-14.lab.eng.bos.redhat.com" "dc=passsync,dc=com"
modifying entry "cn=1289_to_1389_on_ibm-x3650m4-01-vm-14.lab.eng.bos.redhat.com,cn=replica,cn="dc=passsync,dc=com",cn=mapping tree,cn=config"
ldap_modify: Server is unwilling to perform (53)
	additional info: Replication agreement is disabled

Comment 4 Ludek Smid 2014-06-13 11:22:51 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.