Reverting previous merge - the amulet tests broke on Precise. Investigating.
This commit is contained in:
parent
d884c8499b
commit
883ecb3892
10
config.yaml
10
config.yaml
|
@ -265,13 +265,3 @@ options:
|
|||
description: |
|
||||
The pecentage of system memory to use for hugepages eg '10%' or the total
|
||||
number of 2M hugepages - eg "1024".
|
||||
api-rate-limit-rules:
|
||||
type: string
|
||||
default:
|
||||
description: |
|
||||
The API rate-limit rules to use for the deployed nova API, if any.
|
||||
Contents of this config options will be inserted in the api-paste.ini file
|
||||
under the "filter:ratelimit" section as "limits". The syntax for these
|
||||
rules is documented at
|
||||
http://docs.openstack.org/kilo/config-reference/content/configuring-compute-API.html
|
||||
|
||||
|
|
|
@ -496,12 +496,3 @@ class HostIPContext(context.OSContextGenerator):
|
|||
ctxt['host_ip'] = host_ip
|
||||
|
||||
return ctxt
|
||||
|
||||
|
||||
class APIRateLimitingContext(context.OSContextGenerator):
|
||||
def __call__(self):
|
||||
ctxt = {}
|
||||
rate_rules = config('api-rate-limit-rules')
|
||||
if rate_rules:
|
||||
ctxt['api_rate_limit_rules'] = rate_rules
|
||||
return ctxt
|
||||
|
|
|
@ -74,7 +74,6 @@ from nova_compute_context import (
|
|||
CEPH_CONF,
|
||||
ceph_config_file,
|
||||
HostIPContext,
|
||||
APIRateLimitingContext
|
||||
)
|
||||
|
||||
CA_CERT_PATH = '/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt'
|
||||
|
@ -151,7 +150,6 @@ LIBVIRTD_CONF = '/etc/libvirt/libvirtd.conf'
|
|||
LIBVIRT_BIN = '/etc/default/libvirt-bin'
|
||||
LIBVIRT_BIN_OVERRIDES = '/etc/init/libvirt-bin.override'
|
||||
NOVA_CONF = '%s/nova.conf' % NOVA_CONF_DIR
|
||||
API_PASTE_INI = '%s/api-paste.ini' % NOVA_CONF_DIR
|
||||
|
||||
BASE_RESOURCE_MAP = {
|
||||
NOVA_CONF: {
|
||||
|
@ -177,9 +175,6 @@ BASE_RESOURCE_MAP = {
|
|||
HostIPContext(),
|
||||
context.LogLevelContext()],
|
||||
},
|
||||
API_PASTE_INI: {
|
||||
'services': ['nova-compute'],
|
||||
'contexts': [APIRateLimitingContext()]}
|
||||
}
|
||||
|
||||
LIBVIRT_RESOURCE_MAP = {
|
||||
|
|
|
@ -1,141 +0,0 @@
|
|||
###############################################################################
|
||||
# [ WARNING ]
|
||||
# Configuration file maintained by Juju. Local changes may be overwritten.
|
||||
###############################################################################
|
||||
############
|
||||
# Metadata #
|
||||
############
|
||||
[composite:metadata]
|
||||
use = egg:Paste#urlmap
|
||||
/: meta
|
||||
|
||||
[pipeline:meta]
|
||||
pipeline = ec2faultwrap logrequest metaapp
|
||||
|
||||
[app:metaapp]
|
||||
paste.app_factory = nova.api.metadata.handler:MetadataRequestHandler.factory
|
||||
|
||||
#######
|
||||
# EC2 #
|
||||
#######
|
||||
|
||||
[composite:ec2]
|
||||
use = egg:Paste#urlmap
|
||||
/: ec2cloud
|
||||
|
||||
[composite:ec2cloud]
|
||||
use = call:nova.api.auth:pipeline_factory
|
||||
noauth = ec2faultwrap logrequest ec2noauth cloudrequest validator ec2executor
|
||||
noauth2 = ec2faultwrap logrequest ec2noauth cloudrequest validator ec2executor
|
||||
keystone = ec2faultwrap logrequest ec2keystoneauth cloudrequest validator ec2executor
|
||||
|
||||
[filter:ec2faultwrap]
|
||||
paste.filter_factory = nova.api.ec2:FaultWrapper.factory
|
||||
|
||||
[filter:logrequest]
|
||||
paste.filter_factory = nova.api.ec2:RequestLogging.factory
|
||||
|
||||
[filter:ec2lockout]
|
||||
paste.filter_factory = nova.api.ec2:Lockout.factory
|
||||
|
||||
[filter:ec2keystoneauth]
|
||||
paste.filter_factory = nova.api.ec2:EC2KeystoneAuth.factory
|
||||
|
||||
[filter:ec2noauth]
|
||||
paste.filter_factory = nova.api.ec2:NoAuth.factory
|
||||
|
||||
[filter:cloudrequest]
|
||||
controller = nova.api.ec2.cloud.CloudController
|
||||
paste.filter_factory = nova.api.ec2:Requestify.factory
|
||||
|
||||
[filter:authorizer]
|
||||
paste.filter_factory = nova.api.ec2:Authorizer.factory
|
||||
|
||||
[filter:validator]
|
||||
paste.filter_factory = nova.api.ec2:Validator.factory
|
||||
|
||||
[app:ec2executor]
|
||||
paste.app_factory = nova.api.ec2:Executor.factory
|
||||
|
||||
#############
|
||||
# OpenStack #
|
||||
#############
|
||||
|
||||
[composite:osapi_compute]
|
||||
use = call:nova.api.openstack.urlmap:urlmap_factory
|
||||
/: oscomputeversions
|
||||
/v1.1: openstack_compute_api_v2
|
||||
/v2: openstack_compute_api_v2
|
||||
/v2.1: openstack_compute_api_v21
|
||||
/v3: openstack_compute_api_v3
|
||||
|
||||
[composite:openstack_compute_api_v2]
|
||||
use = call:nova.api.auth:pipeline_factory
|
||||
noauth = compute_req_id faultwrap sizelimit noauth ratelimit osapi_compute_app_v2
|
||||
noauth2 = compute_req_id faultwrap sizelimit noauth2 ratelimit osapi_compute_app_v2
|
||||
keystone = compute_req_id faultwrap sizelimit authtoken keystonecontext ratelimit osapi_compute_app_v2
|
||||
keystone_nolimit = compute_req_id faultwrap sizelimit authtoken keystonecontext osapi_compute_app_v2
|
||||
|
||||
[composite:openstack_compute_api_v21]
|
||||
use = call:nova.api.auth:pipeline_factory_v21
|
||||
noauth = compute_req_id faultwrap sizelimit noauth osapi_compute_app_v21
|
||||
noauth2 = compute_req_id faultwrap sizelimit noauth2 osapi_compute_app_v21
|
||||
keystone = compute_req_id faultwrap sizelimit authtoken keystonecontext osapi_compute_app_v21
|
||||
|
||||
[composite:openstack_compute_api_v3]
|
||||
use = call:nova.api.auth:pipeline_factory_v21
|
||||
noauth = request_id faultwrap sizelimit noauth_v3 osapi_compute_app_v3
|
||||
noauth2 = request_id faultwrap sizelimit noauth_v3 osapi_compute_app_v3
|
||||
keystone = request_id faultwrap sizelimit authtoken keystonecontext osapi_compute_app_v3
|
||||
|
||||
[filter:request_id]
|
||||
paste.filter_factory = oslo.middleware:RequestId.factory
|
||||
|
||||
[filter:compute_req_id]
|
||||
paste.filter_factory = nova.api.compute_req_id:ComputeReqIdMiddleware.factory
|
||||
|
||||
[filter:faultwrap]
|
||||
paste.filter_factory = nova.api.openstack:FaultWrapper.factory
|
||||
|
||||
[filter:noauth]
|
||||
paste.filter_factory = nova.api.openstack.auth:NoAuthMiddlewareOld.factory
|
||||
|
||||
[filter:noauth2]
|
||||
paste.filter_factory = nova.api.openstack.auth:NoAuthMiddleware.factory
|
||||
|
||||
[filter:noauth_v3]
|
||||
paste.filter_factory = nova.api.openstack.auth:NoAuthMiddlewareV3.factory
|
||||
|
||||
[filter:ratelimit]
|
||||
paste.filter_factory = nova.api.openstack.compute.limits:RateLimitingMiddleware.factory
|
||||
{% if api_rate_limit_rules -%}
|
||||
limits = {{ api_rate_limit_rules}}
|
||||
{% endif -%}
|
||||
|
||||
[filter:sizelimit]
|
||||
paste.filter_factory = oslo.middleware:RequestBodySizeLimiter.factory
|
||||
|
||||
[app:osapi_compute_app_v2]
|
||||
paste.app_factory = nova.api.openstack.compute:APIRouter.factory
|
||||
|
||||
[app:osapi_compute_app_v21]
|
||||
paste.app_factory = nova.api.openstack.compute:APIRouterV21.factory
|
||||
|
||||
[app:osapi_compute_app_v3]
|
||||
paste.app_factory = nova.api.openstack.compute:APIRouterV3.factory
|
||||
|
||||
[pipeline:oscomputeversions]
|
||||
pipeline = faultwrap oscomputeversionapp
|
||||
|
||||
[app:oscomputeversionapp]
|
||||
paste.app_factory = nova.api.openstack.compute.versions:Versions.factory
|
||||
|
||||
##########
|
||||
# Shared #
|
||||
##########
|
||||
|
||||
[filter:keystonecontext]
|
||||
paste.filter_factory = nova.api.auth:NovaKeystoneContext.factory
|
||||
|
||||
[filter:authtoken]
|
||||
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
|
|
@ -68,9 +68,7 @@ class NovaBasicDeployment(OpenStackAmuletDeployment):
|
|||
def _configure_services(self):
|
||||
"""Configure all of the services."""
|
||||
nova_config = {'config-flags': 'auto_assign_floating_ip=False',
|
||||
'enable-live-migration': 'False',
|
||||
'api-rate-limit-rules':
|
||||
'( POST, *, .*, 9999, MINUTE );'}
|
||||
'enable-live-migration': 'False'}
|
||||
nova_cc_config = {}
|
||||
if self.git:
|
||||
amulet_http_proxy = os.environ.get('AMULET_HTTP_PROXY')
|
||||
|
@ -468,20 +466,6 @@ class NovaBasicDeployment(OpenStackAmuletDeployment):
|
|||
message = "nova config error: {}".format(ret)
|
||||
amulet.raise_status(amulet.FAIL, msg=message)
|
||||
|
||||
def test_api_paste_config(self):
|
||||
"""Check that the rate limiting is set on the nova api (for POSTs)."""
|
||||
unit = self.nova_compute_sentry
|
||||
conf = '/etc/nova/api-paste.ini'
|
||||
section = "filter:ratelimit"
|
||||
factory = ("nova.api.openstack.compute.limits:RateLimitingMiddleware"
|
||||
".factory")
|
||||
expected = {"paste.filter_factory": factory,
|
||||
"limits": "( POST, *, .*, 9999, MINUTE );"}
|
||||
ret = u.validate_config_data(unit, conf, section, expected)
|
||||
if ret:
|
||||
message = "api paste config error: {}".format(ret)
|
||||
amulet.raise_status(amulet.FAIL, msg=message)
|
||||
|
||||
def test_image_instance_create(self):
|
||||
"""Create an image/instance, verify they exist, and delete them."""
|
||||
# NOTE(coreycb): Skipping failing test on essex until resolved. essex
|
||||
|
|
Loading…
Reference in New Issue