Fix Queens Swift S3 API
Adds new template for Queens that correctly configures swift3, s3token and proxy pipeline. Also fixes amulet tests that are currently failing due to vdb being already mounted in guest and templates that fail py3.5 due to jinja syntax. Change-Id: I8ed8a12d2d6adc1f1f3158808101b123ec6bd20d Closes-Bug: #1775260
This commit is contained in:
parent
2510ba5559
commit
fc14531999
|
@ -119,7 +119,7 @@ super_admin_key = {{ swauth_admin_key }}
|
|||
default_swift_cluster = local#https://{{ proxy_ip }}:8080/v1
|
||||
{% endif %}
|
||||
|
||||
{% if static_large_object_segments > 0 %}
|
||||
{% if static_large_object_segments and static_large_object_segments > 0 %}
|
||||
[filter:slo]
|
||||
use = egg:swift#slo
|
||||
max_manifest_size = 536870912
|
||||
|
|
|
@ -127,7 +127,7 @@ super_admin_key = {{ swauth_admin_key }}
|
|||
default_swift_cluster = local#https://{{ proxy_ip }}:8080/v1
|
||||
{% endif %}
|
||||
|
||||
{% if static_large_object_segments > 0 %}
|
||||
{% if static_large_object_segments and static_large_object_segments > 0 %}
|
||||
[filter:slo]
|
||||
use = egg:swift#slo
|
||||
max_manifest_size = 536870912
|
||||
|
|
|
@ -146,7 +146,7 @@ topic = notifications
|
|||
log_level = WARN
|
||||
{% endif -%}
|
||||
|
||||
{% if static_large_object_segments > 0 %}
|
||||
{% if static_large_object_segments and static_large_object_segments > 0 %}
|
||||
[filter:slo]
|
||||
use = egg:swift#slo
|
||||
max_manifest_size = 536870912
|
||||
|
|
|
@ -0,0 +1,144 @@
|
|||
[DEFAULT]
|
||||
bind_port = {{ bind_port }}
|
||||
workers = {{ workers }}
|
||||
user = swift
|
||||
bind_ip = {{ bind_host }}
|
||||
log_name = swift
|
||||
log_facility = LOG_LOCAL0
|
||||
log_level = {{ log_level }}
|
||||
log_address = /dev/log
|
||||
log_headers = {{ log_headers }}
|
||||
|
||||
{% if statsd_host %}
|
||||
log_statsd_host = {{ statsd_host }}
|
||||
log_statsd_port = {{ statsd_port }}
|
||||
log_statsd_default_sample_rate = {{ statsd_sample_rate }}
|
||||
{% endif %}
|
||||
|
||||
{% if ssl %}
|
||||
cert_file = {{ ssl_cert }}
|
||||
key_file = {{ ssl_key }}
|
||||
{% endif %}
|
||||
|
||||
{% if auth_type == 'keystone' %}
|
||||
[pipeline:main]
|
||||
{% if transport_url %}
|
||||
pipeline = ceilometer catch_errors gatekeeper healthcheck proxy-logging cache swift3 s3token container_sync bulk tempurl slo dlo formpost authtoken keystoneauth staticweb versioned_writes container-quotas account-quotas proxy-logging proxy-server
|
||||
{% else %}
|
||||
pipeline = catch_errors gatekeeper healthcheck proxy-logging cache authtoken swift3 s3token container_sync bulk tempurl slo dlo formpost keystoneauth staticweb versioned_writes container-quotas account-quotas proxy-logging proxy-server
|
||||
{% endif %}
|
||||
{% else %}
|
||||
[pipeline:main]
|
||||
pipeline = catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl slo dlo formpost {{ auth_type }} staticweb versioned_writes container-quotas account-quotas proxy-logging proxy-server
|
||||
{% endif %}
|
||||
|
||||
[app:proxy-server]
|
||||
use = egg:swift#proxy
|
||||
allow_account_management = true
|
||||
{% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
|
||||
node_timeout = {{ node_timeout }}
|
||||
recoverable_node_timeout = {{ recoverable_node_timeout }}
|
||||
|
||||
[filter:tempauth]
|
||||
use = egg:swift#tempauth
|
||||
user_system_root = testpass .admin https://{{ proxy_ip }}:8080/v1/AUTH_system
|
||||
|
||||
[filter:healthcheck]
|
||||
use = egg:swift#healthcheck
|
||||
|
||||
[filter:cache]
|
||||
use = egg:swift#memcache
|
||||
memcache_servers = {{ memcached_ip }}:11211
|
||||
|
||||
[filter:account-quotas]
|
||||
use = egg:swift#account_quotas
|
||||
|
||||
[filter:container-quotas]
|
||||
use = egg:swift#container_quotas
|
||||
|
||||
[filter:proxy-logging]
|
||||
use = egg:swift#proxy_logging
|
||||
|
||||
[filter:staticweb]
|
||||
use = egg:swift#staticweb
|
||||
|
||||
[filter:bulk]
|
||||
use = egg:swift#bulk
|
||||
|
||||
[filter:slo]
|
||||
use = egg:swift#slo
|
||||
|
||||
[filter:dlo]
|
||||
use = egg:swift#dlo
|
||||
|
||||
[filter:formpost]
|
||||
use = egg:swift#formpost
|
||||
|
||||
[filter:tempurl]
|
||||
use = egg:swift#tempurl
|
||||
|
||||
[filter:catch_errors]
|
||||
use = egg:swift#catch_errors
|
||||
|
||||
[filter:versioned_writes]
|
||||
use = egg:swift#versioned_writes
|
||||
|
||||
[filter:container_sync]
|
||||
use = egg:swift#container_sync
|
||||
|
||||
[filter:gatekeeper]
|
||||
use = egg:swift#gatekeeper
|
||||
|
||||
{% if auth_type == 'keystone' %}
|
||||
[filter:keystoneauth]
|
||||
use = egg:swift#keystoneauth
|
||||
operator_roles = {{ operator_roles }}
|
||||
|
||||
[filter:authtoken]
|
||||
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
|
||||
identity_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}
|
||||
auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}
|
||||
auth_plugin = password
|
||||
auth_url = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}
|
||||
auth_version = 3
|
||||
username = {{ service_user }}
|
||||
password = {{ service_password }}
|
||||
project_domain_name = {{ admin_domain_name }}
|
||||
user_domain_name = {{ admin_domain_name }}
|
||||
project_name = {{ admin_tenant_name }}
|
||||
delay_auth_decision = {{ delay_auth_decision|lower }}
|
||||
signing_dir = {{ signing_dir }}
|
||||
cache = swift.cache
|
||||
|
||||
[filter:s3token]
|
||||
use = egg:swift3#s3token
|
||||
auth_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}
|
||||
auth_version = 3
|
||||
|
||||
[filter:swift3]
|
||||
use = egg:swift3#swift3
|
||||
{% endif %}
|
||||
|
||||
{% if auth_type == 'swauth' %}
|
||||
[filter:swauth]
|
||||
use = egg:swauth#swauth
|
||||
set log_name = swauth
|
||||
super_admin_key = {{ swauth_admin_key }}
|
||||
default_swift_cluster = local#https://{{ proxy_ip }}:8080/v1
|
||||
{% endif %}
|
||||
|
||||
{% if transport_url -%}
|
||||
[filter:ceilometer]
|
||||
paste.filter_factory = ceilometermiddleware.swift:filter_factory
|
||||
url = {{ transport_url }}
|
||||
driver = messagingv2
|
||||
topic = notifications
|
||||
log_level = WARN
|
||||
{% endif -%}
|
||||
|
||||
{% if static_large_object_segments and static_large_object_segments > 0 %}
|
||||
[filter:slo]
|
||||
use = egg:swift#slo
|
||||
max_manifest_size = 536870912
|
||||
max_manifest_segments = {{ static_large_object_segments }}
|
||||
{% endif %}
|
|
@ -96,7 +96,8 @@ class SwiftProxyBasicDeployment(OpenStackAmuletDeployment):
|
|||
swift_storage_config = {
|
||||
'zone': '1',
|
||||
'block-device': 'vdb',
|
||||
'overwrite': 'true'
|
||||
'overwrite': 'true',
|
||||
'ephemeral-unmount': '/mnt'
|
||||
}
|
||||
pxc_config = {
|
||||
'innodb-buffer-pool-size': '256M',
|
||||
|
@ -506,7 +507,15 @@ class SwiftProxyBasicDeployment(OpenStackAmuletDeployment):
|
|||
'admin_password': keystone_relation['service_password'],
|
||||
})
|
||||
|
||||
if self._get_openstack_release() >= self.trusty_mitaka:
|
||||
if self._get_openstack_release() >= self.xenial_queens:
|
||||
expected['pipeline:main'] = {
|
||||
'pipeline': 'catch_errors gatekeeper healthcheck proxy-logging'
|
||||
' cache authtoken swift3 s3token container_sync bulk tempurl'
|
||||
' slo dlo formpost keystoneauth staticweb'
|
||||
' versioned_writes container-quotas account-quotas'
|
||||
' proxy-logging proxy-server'
|
||||
}
|
||||
elif self._get_openstack_release() >= self.trusty_mitaka:
|
||||
expected['pipeline:main'] = {
|
||||
'pipeline': 'catch_errors gatekeeper healthcheck proxy-logging'
|
||||
' cache swift3 s3token container_sync bulk tempurl slo dlo'
|
||||
|
@ -525,7 +534,32 @@ class SwiftProxyBasicDeployment(OpenStackAmuletDeployment):
|
|||
'admin_token': keystone_relation['admin_token']
|
||||
}
|
||||
|
||||
if self._get_openstack_release() >= self.trusty_kilo:
|
||||
if self._get_openstack_release() >= self.xenial_queens:
|
||||
expected['filter:authtoken'].update({
|
||||
'paste.filter_factory': 'keystonemiddleware.auth_token:'
|
||||
'filter_factory',
|
||||
})
|
||||
expected['filter:authtoken'].update({
|
||||
'auth_url': '{}://{}:{}'.format(
|
||||
auth_protocol,
|
||||
auth_host,
|
||||
keystone_relation['auth_port']),
|
||||
'auth_plugin': 'password',
|
||||
'username': keystone_relation['service_username'],
|
||||
'password': keystone_relation['service_password'],
|
||||
'project_domain_name': keystone_relation['service_domain'],
|
||||
'user_domain_name': keystone_relation['service_domain'],
|
||||
'project_name': keystone_relation['service_tenant'],
|
||||
})
|
||||
expected['filter:s3token'] = {
|
||||
'use': 'egg:swift3#s3token',
|
||||
'auth_uri': '{}://{}:{}'.format(
|
||||
auth_protocol,
|
||||
auth_host,
|
||||
keystone_relation['auth_port']),
|
||||
'auth_version': '3'
|
||||
}
|
||||
elif self._get_openstack_release() >= self.trusty_kilo:
|
||||
# Kilo and later
|
||||
expected['filter:authtoken'].update({
|
||||
'paste.filter_factory': 'keystonemiddleware.auth_token:'
|
||||
|
|
Loading…
Reference in New Issue