Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 748987

Summary: If master has leftover replica agreement from a previous failed attempt, next replica install can fail
Product: Red Hat Enterprise Linux 6 Reporter: Namita Soman <nsoman>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.1CC: dpal, jgalipea, mgregg, mkosek, spoore
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-3.0.0-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 09:08:15 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 Namita Soman 2011-10-25 19:02:22 UTC
Description of problem:
Created replica package on master, installed replica. But because of a bug in bind-dyndb-ldap, replica install failed when using setup-dns (bug 748901). So using same replica package, or after generating new package, replica install still failed when not using setup-dns (avoid this option to workaround bug 748901). This time with error that it "Failed to start replication"

Had to run:
ipa-replica-manage del ipa-replica.testrelm --force
to delete/clean any replication agreement, and then was able to install successfully.

Would be nice to have an error that specifically suggested to delete the replication agreement to be able to install successfully.

ipareplica-install.log had:
2011-10-25 10:45:42,124 DEBUG stdout=Shutting down dirsrv:
    TESTRELM...^[[60G[^[[0;32m  OK  ^[[0;39m]^M
Starting dirsrv:
    TESTRELM...^[[60G[^[[0;32m  OK  ^[[0;39m]^M

2011-10-25 10:45:42,124 DEBUG stderr=
2011-10-25 10:45:43,553 DEBUG Failed to start replication
  File "/usr/sbin/ipa-replica-install", line 482, in <module>
    main()

  File "/usr/sbin/ipa-replica-install", line 433, in main
    ds = install_replica_ds(config)

  File "/usr/sbin/ipa-replica-install", line 135, in install_replica_ds
    pkcs12_info)

  File "/usr/lib/python2.6/site-packages/ipaserver/install/dsinstance.py", line 284, in create_replica
    self.start_creation("Configuring directory server", 60)

  File "/usr/lib/python2.6/site-packages/ipaserver/install/service.py", line 248, in start_creation
    method()

  File "/usr/lib/python2.6/site-packages/ipaserver/install/dsinstance.py", line 297, in __setup_replica
    r_bindpw=self.dm_password)

  File "/usr/lib/python2.6/site-packages/ipaserver/install/replication.py", line 694, in setup_replication
    raise RuntimeError("Failed to start replication")




Version-Release number of selected component (if applicable):
ipa-server-2.1.3-3.el6.x86_64

How reproducible:
if replica install failed in an attempt

Steps to Reproduce:
1. on master, prepare replica package, then use it to install replica, where the install fails
2. now install replica again, where you know it should pass

  
Actual results:
fails with error - Failed to start replication

Expected results:
fail with error - delete replication agreement from master

Additional info:

Comment 3 Rob Crittenden 2011-10-26 20:50:03 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2030

Comment 6 Martin Kosek 2012-05-17 15:23:56 UTC
Fixed upstream:
master: https://fedorahosted.org/freeipa/changeset/4b539a41d9b562ed3372ea70fbb5d52c141a43f1

The issue can be also reproduced by installing a master and a replica, then uninstalling the replica and deleting the replica host entry.

ipa-replica-install then returned me an error because a replication agreement existed. The new patch will detect this agreement and prompt user to delete it.

Comment 10 Michael Gregg 2012-12-14 03:10:58 UTC
verified/automated

[root@epsilon ipa-replica-install]# svn diff > ./diff.txt
[root@epsilon ipa-replica-install]# cat diff.txt 
Index: t.replica-install.bug.sh
===================================================================
--- t.replica-install.bug.sh	(revision 4484)
+++ t.replica-install.bug.sh	(working copy)
@@ -190,7 +190,7 @@
 		file=/dev/shm/bz823657-output.txt # Output file to be used in next tests
 		rlRun "ipa-replica-manage del $SLAVE" 0 "Disconnect the slave agreement"
 		rlRun "ipa-replica-manage connect $SLAVE $> $file" 0 "Reconnect the SLAVE."
-		rlRun "grep 'Unspecified GSS failure' $file" 2 "Ensure that a failure specified in BZ 82365 does not appear to be in teh output file $file"
+		rlRun "grep 'Unspecified GSS failure' $file" 1 "Ensure that a failure specified in BZ 823657 does not appear to be in the output file $file"
 	rlPhaseEndTest
 }
 
@@ -202,8 +202,8 @@
 		file=/dev/shm/bz824492-output.txt # Output file to be used in next tests
 		rlRun "ipa-replica-manage disconnect $SLAVE" 0 "Disconnect the slave agreement"
 		rlRun "ipa-replica-manage connect $SLAVE $> $file" 0 "Reconnect the SLAVE."
-		rlRun "grep 'You cannot connect to a previously deleted master' $file" 2 "Ensure that a failure specified in BZ 823567 does not appear to be in teh output file $file"
-		rlRun "grep 'list index out of range' $file" 2 "Ensure that a failure specified in BZ 823567 does not appear to be in teh output file $file"
+		rlRun "grep 'You cannot connect to a previously deleted master' $file" 1 "Ensure that a failure specified in BZ 824492 does not appear to be in the output file $file"
+		rlRun "grep 'list index out of range' $file" 1 "Ensure that a failure specified in BZ 824492 does not appear to be in the output file $file"
 	rlPhaseEndTest
 }

Comment 12 errata-xmlrpc 2013-02-21 09:08:15 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.

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