mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
DNSSEC: ipa-dns-install: Detect existing master server sooner.
User should get the error before he installs missing packages etc. https://fedorahosted.org/freeipa/ticket/4657 Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
parent
f7c98c650a
commit
c0271b9c87
@ -94,6 +94,7 @@ def install_check(standalone, replica, options, hostname):
|
|||||||
global ip_addresses
|
global ip_addresses
|
||||||
global dns_forwarders
|
global dns_forwarders
|
||||||
global reverse_zones
|
global reverse_zones
|
||||||
|
fstore = sysrestore.FileStore(paths.SYSRESTORE)
|
||||||
|
|
||||||
if standalone:
|
if standalone:
|
||||||
print "=============================================================================="
|
print "=============================================================================="
|
||||||
@ -164,7 +165,18 @@ def install_check(standalone, replica, options, hostname):
|
|||||||
"Your DNS zones will become unavailable if you "
|
"Your DNS zones will become unavailable if you "
|
||||||
"do not reinstall the DNSSEC key master role immediatelly." %
|
"do not reinstall the DNSSEC key master role immediatelly." %
|
||||||
", ".join([str(zone) for zone in dnssec_zones]))
|
", ".join([str(zone) for zone in dnssec_zones]))
|
||||||
|
|
||||||
elif options.dnssec_master:
|
elif options.dnssec_master:
|
||||||
|
ods = opendnssecinstance.OpenDNSSECInstance(
|
||||||
|
fstore, ldapi=True)
|
||||||
|
ods.realm = api.env.realm
|
||||||
|
dnssec_masters = ods.get_masters()
|
||||||
|
# we can reinstall current server if it is dnssec master
|
||||||
|
if dnssec_masters and api.env.host not in dnssec_masters:
|
||||||
|
print "DNSSEC key master(s):", u','.join(dnssec_masters)
|
||||||
|
sys.exit("Only one DNSSEC key master is supported in current "
|
||||||
|
"version.")
|
||||||
|
|
||||||
# check opendnssec packages are installed
|
# check opendnssec packages are installed
|
||||||
if not opendnssecinstance.check_inst():
|
if not opendnssecinstance.check_inst():
|
||||||
sys.exit("Aborting installation")
|
sys.exit("Aborting installation")
|
||||||
@ -214,20 +226,6 @@ def install_check(standalone, replica, options, hostname):
|
|||||||
"the original kasp.db file." %
|
"the original kasp.db file." %
|
||||||
", ".join([str(zone) for zone in dnssec_zones]))
|
", ".join([str(zone) for zone in dnssec_zones]))
|
||||||
|
|
||||||
|
|
||||||
fstore = sysrestore.FileStore(paths.SYSRESTORE)
|
|
||||||
|
|
||||||
if options.dnssec_master:
|
|
||||||
ods = opendnssecinstance.OpenDNSSECInstance(
|
|
||||||
fstore, ldapi=True)
|
|
||||||
ods.realm = api.env.realm
|
|
||||||
dnssec_masters = ods.get_masters()
|
|
||||||
# we can reinstall current server if it is dnssec master
|
|
||||||
if api.env.host not in dnssec_masters and dnssec_masters:
|
|
||||||
print "DNSSEC key master(s):", u','.join(dnssec_masters)
|
|
||||||
sys.exit("Only one DNSSEC key master is supported in current "
|
|
||||||
"version.")
|
|
||||||
|
|
||||||
ip_addresses = get_server_ip_address(
|
ip_addresses = get_server_ip_address(
|
||||||
hostname, fstore, options.unattended, True, options.ip_addresses)
|
hostname, fstore, options.unattended, True, options.ip_addresses)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user