diff --git a/hooks/ceph_radosgw_context.py b/hooks/ceph_radosgw_context.py index 9b5d67d7..ac8ea4d7 100644 --- a/hooks/ceph_radosgw_context.py +++ b/hooks/ceph_radosgw_context.py @@ -109,6 +109,13 @@ class MonContext(context.OSContextGenerator): if all([os.path.isfile(p) for p in paths]): ctxt['cms'] = True + if (config('use-ceph-optimised-packages') and + not config('use-embedded-webserver')): + ctxt['disable_100_continue'] = False + else: + # NOTE: currently only applied if NOT using embedded webserver + ctxt['disable_100_continue'] = True + if self.context_complete(ctxt): return ctxt diff --git a/templates/ceph.conf b/templates/ceph.conf index 0cc643ca..672968b4 100644 --- a/templates/ceph.conf +++ b/templates/ceph.conf @@ -19,7 +19,7 @@ rgw socket path = /tmp/radosgw.sock log file = /var/log/ceph/radosgw.log {% if embedded_webserver %} rgw frontends = civetweb port=70 -{% else %} +{% elif disable_100_continue %} # Turn off 100-continue optimization as stock mod_fastcgi # does not support it rgw print continue = false diff --git a/unit_tests/test_ceph_radosgw_context.py b/unit_tests/test_ceph_radosgw_context.py index 7a58d4e9..f7e873b6 100644 --- a/unit_tests/test_ceph_radosgw_context.py +++ b/unit_tests/test_ceph_radosgw_context.py @@ -162,6 +162,7 @@ class MonContextTest(CharmTestCase): expect = { 'auth_supported': 'cephx', 'embedded_webserver': False, + 'disable_100_continue': True, 'hostname': '10.0.0.10', 'mon_hosts': '10.5.4.1:6789 10.5.4.2:6789 10.5.4.3:6789', 'old_auth': False, @@ -195,6 +196,7 @@ class MonContextTest(CharmTestCase): expect = { 'auth_supported': 'none', 'embedded_webserver': False, + 'disable_100_continue': True, 'hostname': '10.0.0.10', 'mon_hosts': '10.5.4.1:6789 10.5.4.2:6789 10.5.4.3:6789', 'old_auth': False, @@ -220,6 +222,7 @@ class MonContextTest(CharmTestCase): expect = { 'auth_supported': 'cephx', 'embedded_webserver': False, + 'disable_100_continue': True, 'hostname': '10.0.0.10', 'mon_hosts': '10.5.4.1:6789 10.5.4.2:6789 10.5.4.3:6789', 'old_auth': False,