summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Fayans <ofayans@redhat.com>2015-09-30 12:17:53 +0200
committerMartin Basti <mbasti@redhat.com>2015-10-01 14:46:43 +0200
commit03d696f224642c1c4c4f1a434fecefd1c6270e37 (patch)
treeb798594def502005a0d5e6fea809321609caf181
parentc388dbd4de36442773079a2c6e52547b4b60b993 (diff)
downloadfreeipa-03d696f224642c1c4c4f1a434fecefd1c6270e37.tar.gz
freeipa-03d696f224642c1c4c4f1a434fecefd1c6270e37.tar.xz
freeipa-03d696f224642c1c4c4f1a434fecefd1c6270e37.zip
Added a proper workaround for dnssec test failures in Beaker environment
In beaker lab the situation when master and replica have ip addresses from different subnets is quite frequent. When a replica has ip from different subnet than master's, ipa-replica-prepare looks up a proper reverse zone to add a pointer record, and if it does not find it, it asks a user for permission to create it automatically. It breaks the tests adding the unexpected input. The workaround is to always create a reverse zone for a new replica. Corresponding ticket is https://fedorahosted.org/freeipa/ticket/5306 Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
-rw-r--r--ipatests/test_integration/tasks.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py
index 06049d4ae..63e101838 100644
--- a/ipatests/test_integration/tasks.py
+++ b/ipatests/test_integration/tasks.py
@@ -37,6 +37,7 @@ 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
log = log_mgr.get_logger(__name__)
@@ -58,6 +59,11 @@ def check_arguments_are(slice, instanceof):
return wrapped
return wrapper
+def prepare_reverse_zone(host, ip):
+ zone = get_reverse_zone_default(ip)
+ host.run_command(["ipa",
+ "dnszone-add",
+ zone], raiseonerr=False)
def prepare_host(host):
if isinstance(host, Host):
@@ -240,17 +246,17 @@ def install_replica(master, replica, setup_ca=True, setup_dns=False):
apply_common_fixes(replica)
fix_apache_semaphores(replica)
-
+ prepare_reverse_zone(master, replica.ip)
master.run_command(['ipa-replica-prepare',
'-p', replica.config.dirman_password,
- '--ip-address', replica.ip, '--no-reverse',
+ '--ip-address', replica.ip,
replica.hostname])
replica_bundle = master.get_file_contents(
paths.REPLICA_INFO_GPG_TEMPLATE % replica.hostname)
replica_filename = os.path.join(replica.config.test_dir,
'replica-info.gpg')
replica.put_file_contents(replica_filename, replica_bundle)
- args = ['ipa-replica-install', '-U', '--no-host-dns',
+ args = ['ipa-replica-install', '-U',
'-p', replica.config.dirman_password,
'-w', replica.config.admin_password,
'--ip-address', replica.ip,