summaryrefslogtreecommitdiffstats
path: root/ipatests/test_integration
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2014-04-07 12:40:52 +0200
committerPetr Viktorin <pviktori@redhat.com>2014-04-17 16:31:11 +0200
commitceca0b5591c5a7c9de329eec19968b2d324d4247 (patch)
tree390facda821edf05a1075c88fcf43899fb4bab65 /ipatests/test_integration
parentf85fe1e8513327396ef2f9732810abdffc88abba (diff)
downloadfreeipa-ceca0b5591c5a7c9de329eec19968b2d324d4247.tar.gz
freeipa-ceca0b5591c5a7c9de329eec19968b2d324d4247.tar.xz
freeipa-ceca0b5591c5a7c9de329eec19968b2d324d4247.zip
ipatests: Fix apache semaphores prior to installing IPA server
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'ipatests/test_integration')
-rw-r--r--ipatests/test_integration/tasks.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py
index d03ee6021..7f738e3d0 100644
--- a/ipatests/test_integration/tasks.py
+++ b/ipatests/test_integration/tasks.py
@@ -111,6 +111,18 @@ def fix_resolv_conf(host):
host.put_file_contents('/etc/resolv.conf', contents)
+def fix_apache_semaphores(master):
+ systemd_available = master.transport.file_exists('/bin/systemctl')
+
+ if systemd_available:
+ master.run_command(['systemctl', 'stop', 'httpd'], raiseonerr=False)
+ else:
+ master.run_command(['/sbin/service', 'httpd', 'stop'], raiseonerr=False)
+
+ master.run_command('for line in `ipcs -s | grep apache | cut -d " " -f 2`; '
+ 'do ipcrm -s $line; done', raiseonerr=False)
+
+
def unapply_fixes(host):
restore_files(host)
restore_hostname(host)
@@ -179,6 +191,7 @@ def install_master(host):
host.collect_log('/var/log/dirsrv/slapd-%s/access' % inst)
apply_common_fixes(host)
+ fix_apache_semaphores(host)
host.run_command(['ipa-server-install', '-U',
'-r', host.domain.name,
@@ -197,6 +210,7 @@ def install_replica(master, replica, setup_ca=True):
replica.collect_log('/var/log/ipareplica-conncheck.log')
apply_common_fixes(replica)
+ fix_apache_semaphores(replica)
master.run_command(['ipa-replica-prepare',
'-p', replica.config.dirman_password,