diff options
author | Louis Taylor <kragniz@gmail.com> | 2014-11-26 19:55:23 +0000 |
---|---|---|
committer | Louis Taylor <kragniz@gmail.com> | 2014-11-28 23:07:27 +0000 |
commit | 640e08fe58faa96cb81813eb18985800171ad595 (patch) | |
tree | f241906f2f6af7cdff2d0114bb741f73143b027f | |
parent | 430cc40ec743f4b217a8b8d97e70bfcb717fb038 (diff) | |
download | glance-640e08fe58faa96cb81813eb18985800171ad595.tar.gz |
Disable osprofiler by default
This could cause issues when upgrading to juno, since if config files are not
updated osprofiler can crash.
It is disabled by default in other services, such as cinder and heat.
Change-Id: Ide1be0d42e9e3640560564005b2ce1ffdf554e25
Closes-Bug: #1387320
(cherry picked from commit 090cb56ba100d53dc7c95148dde77a8a4969adfe)
-rw-r--r-- | etc/glance-api.conf | 4 | ||||
-rw-r--r-- | etc/glance-registry.conf | 4 | ||||
-rw-r--r-- | glance/common/wsgi.py | 4 | ||||
-rw-r--r-- | glance/tests/unit/common/test_config.py | 12 |
4 files changed, 18 insertions, 6 deletions
diff --git a/etc/glance-api.conf b/etc/glance-api.conf index 5016d24db..cfc214e91 100644 --- a/etc/glance-api.conf +++ b/etc/glance-api.conf @@ -406,10 +406,10 @@ revocation_cache_time = 10 [profiler] # If False fully disable profiling feature. -#enabled = True +#enabled = False # If False doesn't trace SQL requests. -#trace_sqlalchemy = True +#trace_sqlalchemy = False [task] # ================= Glance Tasks Options ============================ diff --git a/etc/glance-registry.conf b/etc/glance-registry.conf index 87d61c457..a72abf8ca 100644 --- a/etc/glance-registry.conf +++ b/etc/glance-registry.conf @@ -238,7 +238,7 @@ admin_password = %SERVICE_PASSWORD% [profiler] # If False fully disable profiling feature. -#enabled = True +#enabled = False # If False doesn't trace SQL requests. -#trace_sqlalchemy = True +#trace_sqlalchemy = False diff --git a/glance/common/wsgi.py b/glance/common/wsgi.py index 99bd1830c..afcf2e05b 100644 --- a/glance/common/wsgi.py +++ b/glance/common/wsgi.py @@ -92,9 +92,9 @@ eventlet_opts = [ ] profiler_opts = [ - cfg.BoolOpt("enabled", default=True, + cfg.BoolOpt("enabled", default=False, help=_('If False fully disable profiling feature.')), - cfg.BoolOpt("trace_sqlalchemy", default=True, + cfg.BoolOpt("trace_sqlalchemy", default=False, help=_("If False doesn't trace SQL requests.")) ] diff --git a/glance/tests/unit/common/test_config.py b/glance/tests/unit/common/test_config.py index b7baee21f..fd67bcd13 100644 --- a/glance/tests/unit/common/test_config.py +++ b/glance/tests/unit/common/test_config.py @@ -97,3 +97,15 @@ class TestPasteApp(test_utils.BaseTestCase): def test_get_path_non_exist(self): self.assertRaises(RuntimeError, config._get_deployment_config_file) + + +class TestDefaultConfig(test_utils.BaseTestCase): + + def setUp(self): + super(TestDefaultConfig, self).setUp() + self.CONF = config.cfg.CONF + self.CONF.import_group('profiler', 'glance.common.wsgi') + + def test_osprofiler_disabled(self): + self.assertFalse(self.CONF.profiler.enabled) + self.assertFalse(self.CONF.profiler.trace_sqlalchemy) |