mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-26 00:41:25 -06:00
ipatests: Make the A record for hosts in topology conditional
Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
parent
a81e69a796
commit
c0133778ae
@ -37,7 +37,8 @@ from ipapython.ipa_log_manager import log_mgr
|
|||||||
from ipatests.test_integration import util
|
from ipatests.test_integration import util
|
||||||
from ipatests.test_integration.env_config import env_to_script
|
from ipatests.test_integration.env_config import env_to_script
|
||||||
from ipatests.test_integration.host import Host
|
from ipatests.test_integration.host import Host
|
||||||
from ipalib.util import get_reverse_zone_default
|
from ipalib import errors
|
||||||
|
from ipalib.util import get_reverse_zone_default, verify_host_resolvable
|
||||||
from ipalib.constants import DOMAIN_SUFFIX_NAME
|
from ipalib.constants import DOMAIN_SUFFIX_NAME
|
||||||
from ipalib.constants import DOMAIN_LEVEL_0
|
from ipalib.constants import DOMAIN_LEVEL_0
|
||||||
|
|
||||||
@ -892,6 +893,12 @@ def add_a_records_for_hosts_in_master_domain(master):
|
|||||||
for host in master.domain.hosts:
|
for host in master.domain.hosts:
|
||||||
# We don't need to take care of the zone creation since it is master
|
# We don't need to take care of the zone creation since it is master
|
||||||
# domain
|
# domain
|
||||||
|
try:
|
||||||
|
verify_host_resolvable(host.hostname, log)
|
||||||
|
log.debug("The host (%s) is resolvable." % host.domain.name)
|
||||||
|
except errors.DNSNotARecordError:
|
||||||
|
log.debug("Hostname (%s) does not have A/AAAA record. Adding new one.",
|
||||||
|
master.hostname)
|
||||||
add_a_record(master, host)
|
add_a_record(master, host)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user