Bug 748987 - If master has leftover replica agreement from a previous failed attempt, next replica install can fail
Summary: If master has leftover replica agreement from a previous failed attempt, nex...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: Namita Soman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-25 19:02 UTC by Namita Soman
Modified: 2014-03-14 19:13 UTC (History)
5 users (show)

Fixed In Version: ipa-3.0.0-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 09:08:15 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0528 0 normal SHIPPED_LIVE Low: ipa security, bug fix and enhancement update 2013-02-21 08:22:21 UTC

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


Note You need to log in before you can comment on or make changes to this bug.