Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 839638 - ipa-replica-manage allows disconnect of last connection for a single replica
ipa-replica-manage allows disconnect of last connection for a single replica
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa (Show other bugs)
6.3
Unspecified Unspecified
high Severity unspecified
: rc
: ---
Assigned To: Rob Crittenden
Namita Soman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-12 09:26 EDT by Scott Poore
Modified: 2013-02-21 04:16 EST (History)
2 users (show)

See Also:
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 04:16:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0528 normal SHIPPED_LIVE Low: ipa security, bug fix and enhancement update 2013-02-21 03:22:21 EST

  None (edit)
Description Scott Poore 2012-07-12 09:26:43 EDT
Description of problem:

ipa-replica-manage is allowing me to disconnect (not delete) the last connection to a replica. 

topo:  R1--M--R2

Since there is not a connection from R1 to R2, I should have to delete the connection between R1 (or R2) and M?

ipa-replica-manage is allowing me to disconnect though:

install vm1 as M
install vm2 as R1 connected to M
install vm3 as R2 connected to M

Then:

[root@vm1 shared]# ipa-replica-manage -p $ADMINPW disconnect vm1.testrelm.com vm2.testrelm.com
Deleted replication agreement from 'vm1.testrelm.com' to 'vm2.testrelm.com'

[root@vm1 shared]# ipa-replica-manage -p $ADMINPW connect vm1.testrelm.com vm2.testrelm.com
You cannot connect to a previously deleted master

[root@vm1 shared]# ipa-replica-manage -p $ADMINPW disconnect vm1.testrelm.com vm3.testrelm.com
Cannot remove the last replication link of 'vm1.testrelm.com'
Please use the 'del' command to remove it from the domain

I should have seen the error on the vm2 disconnect that I saw on vm3?

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


How reproducible:
always

Steps to Reproduce:
1. install ipa Master
2. install 2 replicas each connected to Master
3. install vm3 as R2 connected to M
4. ipa-replica-manage disconnect $MASTER $REPLICA1
  
Actual results:
disconnect succeeds when it should fail:

[root@vm1 shared]# ipa-replica-manage -p $ADMINPW disconnect vm1.testrelm.com vm2.testrelm.com
Deleted replication agreement from 'vm1.testrelm.com' to 'vm2.testrelm.com'


Expected results:
should have seen something more like this?

[root@vm1 shared]# ipa-replica-manage -p $ADMINPW disconnect vm1.testrelm.com vm3.testrelm.com
Cannot remove the last replication link of 'vm1.testrelm.com'
Please use the 'del' command to remove it from the domain

Additional info:
Comment 2 Scott Poore 2012-07-12 10:09:54 EDT
Also, I'm not sure if this requires a new bug or just related to this but, I cannot seem to reconnect to a disconnected server even if there are still connections.

Example:

install vm4 connected to R3
install vm5 connected to R3
connect vm4 to vm5
disconnect vm4 from vm3
connect vm4 to vm3 fails

[root@vm4 shared]# ipa-replica-manage -p $ADMINPW connect vm4.testrelm.com vm5.testrelm.com
Connected 'vm4.testrelm.com' to 'vm5.testrelm.com'

[root@vm4 shared]# ipa-replica-manage -p $ADMINPW list vm4.testrelm.com
vm3.testrelm.com: replica
vm5.testrelm.com: replica

[root@vm4 shared]# ipa-replica-manage -p $ADMINPW list vm5.testrelm.com
vm3.testrelm.com: replica
vm4.testrelm.com: replica

[root@vm4 shared]# ipa-replica-manage -p $ADMINPW disconnect vm3.testrelm.com vm4.testrelm.com
Deleted replication agreement from 'vm3.testrelm.com' to 'vm4.testrelm.com'

[root@vm4 shared]# ipa-replica-manage -p $ADMINPW list vm4.testrelm.com
vm5.testrelm.com: replica

[root@vm4 shared]# ipa-replica-manage -p $ADMINPW connect vm3.testrelm.com vm4.testrelm.com
You cannot connect to a previously deleted master
Comment 3 Rob Crittenden 2012-07-12 14:28:33 EDT
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2925
Comment 4 Rob Crittenden 2012-07-18 14:22:46 EDT
Fixed upstream

This fixes two problems.

1. When deleting a link it wasn't checking both sides to see if it was the last link. This would orphan one of them.
2. When reconnecting do a better job of determining if one of the masters had previously been deleted. 

master:
32c1aa45b3d41e15adb2ca8f8713e774046bc340
87040c0af1e76b5477cd53d515ed8071d941ce24
Comment 6 Scott Poore 2012-10-03 10:37:48 EDT
Verified. 

Version ::

ipa-server-3.0.0-2.el6.x86_64

Manual Test Results ::

[root@vm4 ipa]# ipa-replica-manage -p $ADMINPW disconnect vm5.testrelm.com vm6.testrelm.com
ipa: INFO: Setting agreement cn=meTovm5.testrelm.com,cn=replica,cn=dc\=testrelm\,dc\=com,cn=mapping tree,cn=config schedule to 2358-2359 0 to force synch
ipa: INFO: Deleting schedule 2358-2359 0 from agreement cn=meTovm5.testrelm.com,cn=replica,cn=dc\=testrelm\,dc\=com,cn=mapping tree,cn=config
ipa: INFO: Replication Update in progress: FALSE: status: 0 Replica acquired successfully: Incremental update succeeded: start: 0: end: 0
Deleted replication agreement from 'vm5.testrelm.com' to 'vm6.testrelm.com'

[root@vm4 ipa]# ipa-replica-manage -p $ADMINPW list vm4.testrelm.com
vm5.testrelm.com: replica
vm6.testrelm.com: replica

[root@vm4 ipa]# ipa-replica-manage -p $ADMINPW list vm5.testrelm.com
vm4.testrelm.com: replica

[root@vm4 ipa]# ipa-replica-manage -p $ADMINPW list vm6.testrelm.com
vm4.testrelm.com: replica

[root@vm4 ipa]# ipa-replica-manage -p $ADMINPW disconnect vm4.testrelm.com vm5.testrelm.com
Cannot remove the last replication link of 'vm5.testrelm.com'
Please use the 'del' command to remove it from the domain

[root@vm4 ipa]#
Comment 9 errata-xmlrpc 2013-02-21 04:16:44 EST
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.