]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: use different daemon name and apache module paths
authorJosh Durgin <josh.durgin@inktank.com>
Wed, 10 Jul 2013 01:52:26 +0000 (18:52 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Thu, 11 Jul 2013 01:00:25 +0000 (18:00 -0700)
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
teuthology/task/apache.conf.template
teuthology/task/rgw.py

index 13b6ac9bd190a9a57edb779b74b28c5885886dde..397b1d1ad1910e3c645ba66995eb43a188cb98f5 100644 (file)
@@ -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
index 9a48338b9f06292899711bd95bbe2da5442e82e0..ddac2915c912e750f4ce2057435c26d5b357c59d 100644 (file)
@@ -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),