From: Josh Durgin Date: Wed, 10 Jul 2013 01:52:26 +0000 (-0700) Subject: rgw: use different daemon name and apache module paths X-Git-Tag: 1.1.0~2068^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c0a7808164341731c6e1a464d9ea5ed9a697b96b;p=teuthology.git rgw: use different daemon name and apache module paths Signed-off-by: Josh Durgin --- diff --git a/teuthology/task/apache.conf.template b/teuthology/task/apache.conf.template index 13b6ac9bd1..397b1d1ad1 100644 --- a/teuthology/task/apache.conf.template +++ b/teuthology/task/apache.conf.template @@ -1,6 +1,7 @@ -LoadModule env_module /usr/lib/apache2/modules/mod_env.so -LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so -LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so +LoadModule env_module {mod_path}/mod_env.so +LoadModule rewrite_module {mod_path}/mod_rewrite.so +LoadModule fastcgi_module {mod_path}/mod_fastcgi.so +LoadModule log_config_module {mod_path}/mod_log_config.so Listen 7280 ServerName rgwtest.example.com diff --git a/teuthology/task/rgw.py b/teuthology/task/rgw.py index 9a48338b9f..ddac2915c9 100644 --- a/teuthology/task/rgw.py +++ b/teuthology/task/rgw.py @@ -50,14 +50,19 @@ def ship_config(ctx, config): assert isinstance(config, dict) testdir = teuthology.get_testdir(ctx) log.info('Shipping apache config and rgw.fcgi...') - src = os.path.join(os.path.dirname(__file__) - , 'apache.conf.template').format( - testdir=testdir - ) + src = os.path.join(os.path.dirname(__file__), 'apache.conf.template') for client in config.iterkeys(): (remote,) = ctx.cluster.only(client).remotes.keys() + system_type = teuthology.get_system_type(remote) + if system_type == 'deb': + mod_path = '/usr/lib/apache2/modules' + else: + mod_path = '/usr/lib64/httpd/modules' with file(src, 'rb') as f: - conf = f.read().format(testdir=testdir) + conf = f.read().format( + testdir=testdir, + mod_path=mod_path, + ) teuthology.write_file( remote=remote, path='{tdir}/apache/apache.conf'.format(tdir=testdir), @@ -170,14 +175,19 @@ def start_apache(ctx, config): apaches = {} for client in config.iterkeys(): (remote,) = ctx.cluster.only(client).remotes.keys() + system_type = teuthology.get_system_type(remote) + if system_type == 'deb': + apache_name = 'apache2' + else: + apache_name = '/usr/sbin/httpd' proc = remote.run( args=[ '{tdir}/adjust-ulimits'.format(tdir=testdir), '{tdir}/daemon-helper'.format(tdir=testdir), - 'kill'.format(tdir=testdir), - 'apache2'.format(tdir=testdir), - '-X'.format(tdir=testdir), - '-f'.format(tdir=testdir), + 'kill', + apache_name, + '-X', + '-f', '{tdir}/apache/apache.conf'.format(tdir=testdir), ], logger=log.getChild(client),