From c087e0dfbef911a297c8bdc9871f8a07ef862c3b Mon Sep 17 00:00:00 2001 From: James Page Date: Fri, 4 Mar 2016 21:23:00 +0000 Subject: [PATCH] Fix issues when using embedded webserver Remove apache configuration files from the context map if embedded webserver is enabled; as this is the recommended way of deploying radosgw, switch the amulet test to exercise this option instead of apache. Change-Id: I83d87c088a264ebd556e5d3285f63c60d4b799d8 Close-Bug: 1553357 --- hooks/utils.py | 10 ++++++++-- tests/basic_deployment.py | 8 +++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/hooks/utils.py b/hooks/utils.py index 9d6413c9..08d53260 100644 --- a/hooks/utils.py +++ b/hooks/utils.py @@ -19,6 +19,7 @@ import ceph_radosgw_context from charmhelpers.core.hookenv import ( relation_ids, status_get, + config, ) from charmhelpers.contrib.openstack import ( context, @@ -84,10 +85,15 @@ def resource_map(): Dynamically generate a map of resources that will be managed for a single hook execution. ''' - if os.path.exists('/etc/apache2/conf-available'): - BASE_RESOURCE_MAP.pop(APACHE_CONF) + if not config('use-embedded-webserver'): + if os.path.exists('/etc/apache2/conf-available'): + BASE_RESOURCE_MAP.pop(APACHE_CONF) + else: + BASE_RESOURCE_MAP.pop(APACHE_24_CONF) else: + BASE_RESOURCE_MAP.pop(APACHE_CONF) BASE_RESOURCE_MAP.pop(APACHE_24_CONF) + BASE_RESOURCE_MAP.pop(APACHE_PORTS_CONF) resource_map = deepcopy(BASE_RESOURCE_MAP) return resource_map diff --git a/tests/basic_deployment.py b/tests/basic_deployment.py index 9c47b49f..79ebb3eb 100644 --- a/tests/basic_deployment.py +++ b/tests/basic_deployment.py @@ -89,11 +89,13 @@ class CephRadosGwBasicDeployment(OpenStackAmuletDeployment): 'ephemeral-unmount': '/mnt', 'osd-devices': '/dev/vdb /srv/ceph' } + radosgw_config = {"use-embedded-webserver": True} configs = {'keystone': keystone_config, 'mysql': mysql_config, 'cinder': cinder_config, - 'ceph': ceph_config} + 'ceph': ceph_config, + 'ceph-radosgw': radosgw_config} super(CephRadosGwBasicDeployment, self)._configure_services(configs) def _initialize_tests(self): @@ -329,12 +331,12 @@ class CephRadosGwBasicDeployment(OpenStackAmuletDeployment): 'keyring': '/etc/ceph/keyring.rados.gateway', 'rgw socket path': '/tmp/radosgw.sock', 'log file': '/var/log/ceph/radosgw.log', - 'rgw print continue': 'false', 'rgw keystone url': 'http://{}:35357/'.format(keystone_ip), 'rgw keystone admin token': 'ubuntutesting', 'rgw keystone accepted roles': 'Member,Admin', 'rgw keystone token cache size': '500', - 'rgw keystone revocation interval': '600' + 'rgw keystone revocation interval': '600', + 'rgw frontends': 'civetweb port=70', }, }