]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add default_idle_timeout to allow override
authorLoic Dachary <loic@dachary.org>
Thu, 14 Aug 2014 12:53:24 +0000 (14:53 +0200)
committerLoic Dachary <loic@dachary.org>
Thu, 14 Aug 2014 12:53:24 +0000 (14:53 +0200)
Globally overriding the rgw idle_timeout is not possible because it it
needs to be done on a per client.0, client.1, etc. basis. Add the
default_idle_timeout key to the rgw config : it defaults to the
previously hardcoded default (30) and can be changed via the override.

The existing tasks that were previously overriding the idle_timeout on a
per client basis are changed to use the default_idle_timeout instead for
consistency and to allow a global override.

Signed-off-by: Loic Dachary <loic@dachary.org>
machine_types/vps.yaml
suites/rgw/verify/tasks/rgw_s3tests_multiregion.yaml
suites/upgrade/dumpling-x/stress-split/9-workload/rgw-s3tests.yaml
suites/upgrade/firefly-x/stress-split/9-workload/rgw-s3tests.yaml
tasks/rgw.py

index 465f3c102e24aa61eff590b9e6fb8c755327214e..d422a374e68df17bcb60ebf479f3311df5d9cc83 100644 (file)
@@ -4,11 +4,4 @@ overrides:
       global:
         osd heartbeat grace: 100
   rgw:
-    client.0:
-      idle_timeout: 1200
-    client.1:
-      idle_timeout: 1200
-    client.2:
-      idle_timeout: 1200
-    client.3:
-      idle_timeout: 1200
+      default_idle_timeout: 1200
index e1c223c3ee6e1fcdc73c568fe908ebaa34b5b9f0..6b8c53f8fabe67d4d8a952cb22fef360950d51d6 100644 (file)
@@ -24,6 +24,7 @@ tasks:
         rgw log data: False
         rgw log meta: False
 - rgw:
+    default_idle_timeout: 300
     regions:
       zero:
         api name: api1
@@ -36,14 +37,12 @@ tasks:
         master zone: r1z1
         zones: [r1z1]
     client.0:
-      idle_timeout: 300
       valgrind: [--tool=memcheck]
       system user:
         name: client0-system-user
         access key: 1te6NH5mcdcq0Tc5i8i2
         secret key: 1y4IOauQoL18Gp2zM7lC1vLmoawgqcYPbYGcWfXv
     client.1:
-      idle_timeout: 300
       valgrind: [--tool=memcheck]
       system user:
         name: client1-system-user
index c324c0325c1d8ef8b1142aa9bdd5714e1d262114..697ff979e6fe066b9ccfd8509a0003499a44aa67 100644 (file)
@@ -1,7 +1,6 @@
 tasks:
 - rgw:
-    client.0:
-      idle_timeout: 300
+    default_idle_timeout: 300
 - swift:
     client.0:
       rgw_server: client.0
index c324c0325c1d8ef8b1142aa9bdd5714e1d262114..697ff979e6fe066b9ccfd8509a0003499a44aa67 100644 (file)
@@ -1,7 +1,6 @@
 tasks:
 - rgw:
-    client.0:
-      idle_timeout: 300
+    default_idle_timeout: 300
 - swift:
     client.0:
       rgw_server: client.0
index 5cf72dc3065b4a6423c78cee0cd1fc7a28ced755..3417a3e472e46f30be54788becb6c60c953b3da7 100644 (file)
@@ -86,7 +86,7 @@ def ship_apache_configs(ctx, config, role_endpoints):
         system_type = teuthology.get_system_type(remote)
         if not conf:
             conf = {}
-        idle_timeout = conf.get('idle_timeout', 30)
+        idle_timeout = conf.get('idle_timeout', ctx.rgw.default_idle_timeout)
         if system_type == 'deb':
             mod_path = '/usr/lib/apache2/modules'
             print_continue = 'on'
@@ -706,6 +706,7 @@ def task(ctx, config):
                 rgw region root pool: .rgw.rroot.bar
                 rgw zone root pool: .rgw.zroot.bar-secondary
         - rgw:
+            default_idle_timeout: 30
             ec-data-pool: true
             regions:
               foo:
@@ -763,6 +764,10 @@ def task(ctx, config):
     if 'ec-data-pool' in config:
         ctx.rgw.ec_data_pool = bool(config['ec-data-pool'])
         del config['ec-data-pool']
+    ctx.rgw.default_idle_timeout = 30
+    if 'idle_timeout' in config:
+        ctx.rgw.default_idle_timeout = int(config['idle_timeout'])
+        del config['idle_timeout']
     ctx.rgw.cache_pools = False
     if 'cache-pools' in config:
         ctx.rgw.cache_pools = bool(config['cache-pools'])