mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix safety checks to prevent orphaning replicas
This is just a typo, we were checking one side twice and never the other side. So depending on which side you run the command you'd be able or not to remove the replication agreement even if it was the last one. First part of ticket: https://fedorahosted.org/freeipa/ticket/2925
This commit is contained in:
parent
67dbde0156
commit
87040c0af1
@ -211,7 +211,7 @@ def del_link(realm, replica1, replica2, dirman_passwd, force=False):
|
||||
try:
|
||||
repl2 = replication.ReplicationManager(realm, replica2, dirman_passwd)
|
||||
|
||||
repl_list = repl1.find_ipa_replication_agreements()
|
||||
repl_list = repl2.find_ipa_replication_agreements()
|
||||
if not force and len(repl_list) <= 1:
|
||||
print "Cannot remove the last replication link of '%s'" % replica2
|
||||
print "Please use the 'del' command to remove it from the domain"
|
||||
|
Loading…
Reference in New Issue
Block a user