mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Delete DNS records in ipa-ca on ipa-csreplica-manage del.
https://fedorahosted.org/freeipa/ticket/3547
This commit is contained in:
parent
f684c6d6f8
commit
fe00788bb4
@ -25,7 +25,7 @@ import os
|
|||||||
import krbV
|
import krbV
|
||||||
from ipapython.ipa_log_manager import *
|
from ipapython.ipa_log_manager import *
|
||||||
|
|
||||||
from ipaserver.install import replication, installutils
|
from ipaserver.install import replication, installutils, bindinstance
|
||||||
from ipalib import api, errors, util
|
from ipalib import api, errors, util
|
||||||
from ipapython import ipautil, ipaldap, version, dogtag
|
from ipapython import ipautil, ipaldap, version, dogtag
|
||||||
from ipapython.dn import DN
|
from ipapython.dn import DN
|
||||||
@ -271,6 +271,18 @@ def del_master(realm, hostname, options):
|
|||||||
except Exception, e:
|
except Exception, e:
|
||||||
sys.exit("There were issues removing a connection: %s" % e)
|
sys.exit("There were issues removing a connection: %s" % e)
|
||||||
|
|
||||||
|
# 6. And clean up the removed replica DNS entries if any.
|
||||||
|
try:
|
||||||
|
if bindinstance.dns_container_exists(options.host, api.env.basedn,
|
||||||
|
dm_password=options.dirman_passwd):
|
||||||
|
api.Backend.ldap2.connect(bind_dn=DN(('cn', 'Directory Manager')),
|
||||||
|
bind_pw=options.dirman_passwd)
|
||||||
|
bind = bindinstance.BindInstance()
|
||||||
|
bind.remove_ipa_ca_dns_records(hostname, realm.lower())
|
||||||
|
except Exception, e:
|
||||||
|
print "Failed to cleanup %s DNS entries: %s" % (hostname, e)
|
||||||
|
print "You may need to manually remove them from the tree"
|
||||||
|
|
||||||
def add_link(realm, replica1, replica2, dirman_passwd, options):
|
def add_link(realm, replica1, replica2, dirman_passwd, options):
|
||||||
try:
|
try:
|
||||||
repl2 = replication.get_cs_replication_manager(realm, replica2,
|
repl2 = replication.get_cs_replication_manager(realm, replica2,
|
||||||
|
Loading…
Reference in New Issue
Block a user