diff options
author | Milan KubĂk <mkubik@redhat.com> | 2016-01-06 16:18:17 +0100 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-01-13 10:07:46 +0100 |
commit | c0133778ae6ea207aa3b184af54fea5803e2ac23 (patch) | |
tree | 793292a13f761ab46a0b4a5db4286f2ab7e0c627 /ipatests/test_integration | |
parent | a81e69a796fee2405252838d512e5b950f3be5d8 (diff) | |
download | freeipa-c0133778ae6ea207aa3b184af54fea5803e2ac23.tar.gz freeipa-c0133778ae6ea207aa3b184af54fea5803e2ac23.tar.xz freeipa-c0133778ae6ea207aa3b184af54fea5803e2ac23.zip |
ipatests: Make the A record for hosts in topology conditional
Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipatests/test_integration')
-rw-r--r-- | ipatests/test_integration/tasks.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py index e7984f35f..346c96ea3 100644 --- a/ipatests/test_integration/tasks.py +++ b/ipatests/test_integration/tasks.py @@ -37,7 +37,8 @@ from ipapython.ipa_log_manager import log_mgr from ipatests.test_integration import util from ipatests.test_integration.env_config import env_to_script 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_LEVEL_0 @@ -892,7 +893,13 @@ def add_a_records_for_hosts_in_master_domain(master): for host in master.domain.hosts: # We don't need to take care of the zone creation since it is master # domain - add_a_record(master, host) + 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) def add_a_record(master, host): |