Deprecate support for swift3 middlware
... because swift3 is no longer maintained since s3api middleware was merged into swift. Change-Id: I287258ee6ee24a6f44d2e22d01c798da570d1fa8
This commit is contained in:
parent
a74a03cc47
commit
f24fd8c73e
|
@ -207,7 +207,7 @@ node /swift-proxy/ {
|
|||
'healthcheck',
|
||||
'cache',
|
||||
'ratelimit',
|
||||
'swift3',
|
||||
's3api',
|
||||
's3token',
|
||||
'authtoken',
|
||||
'keystone',
|
||||
|
@ -226,7 +226,7 @@ node /swift-proxy/ {
|
|||
'::swift::proxy::container_quotas',
|
||||
'::swift::proxy::healthcheck',
|
||||
'::swift::proxy::cache',
|
||||
'::swift::proxy::swift3',
|
||||
'::swift::proxy::s3api',
|
||||
]: }
|
||||
class { 'swift::proxy::bulk':
|
||||
max_containers_per_extraction => 10000,
|
||||
|
|
|
@ -34,7 +34,6 @@ class swift::params {
|
|||
$account_auditor_service_name = 'swift-account-auditor'
|
||||
$account_reaper_service_name = 'swift-account-reaper'
|
||||
$account_replicator_service_name = 'swift-account-replicator'
|
||||
$swift3 = 'swift-plugin-s3'
|
||||
if ($::os_package_type == 'debian') {
|
||||
$signing_dir = '/var/lib/swift'
|
||||
}else{
|
||||
|
@ -65,7 +64,6 @@ class swift::params {
|
|||
$account_auditor_service_name = 'openstack-swift-account-auditor'
|
||||
$account_reaper_service_name = 'openstack-swift-account-reaper'
|
||||
$account_replicator_service_name = 'openstack-swift-account-replicator'
|
||||
$swift3 = 'openstack-swift-plugin-swift3'
|
||||
$signing_dir = '/var/cache/swift'
|
||||
}
|
||||
default: {
|
||||
|
|
|
@ -207,6 +207,12 @@ class swift::proxy(
|
|||
warning('pipeline parameter must contain proxy-server')
|
||||
}
|
||||
|
||||
# TODO(tkajinam): Remove this when we remove swift::proxy::swift3
|
||||
if member($pipeline, 'swift3') {
|
||||
fail('swift3 is no longer supported by puppet-swift. Use s3api middleware \
|
||||
and swift::proxy::s3api instead')
|
||||
}
|
||||
|
||||
if($auth_type == 'tempauth' and ! $account_autocreate ){
|
||||
fail('account_autocreate must be set to true when auth_type is tempauth')
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#
|
||||
# DEPRECATED!
|
||||
# Configure swift swift3.
|
||||
#
|
||||
# == Dependencies
|
||||
|
@ -7,7 +8,7 @@
|
|||
#
|
||||
# [*ensure*]
|
||||
# Enable or not swift3 middleware
|
||||
# Defaults to 'present'
|
||||
# Defaults to undef
|
||||
#
|
||||
# == Examples
|
||||
#
|
||||
|
@ -21,19 +22,10 @@
|
|||
# Copyright 2012 eNovance licensing@enovance.com
|
||||
#
|
||||
class swift::proxy::swift3(
|
||||
$ensure = 'present'
|
||||
$ensure = undef
|
||||
) {
|
||||
|
||||
include swift::deps
|
||||
include swift::params
|
||||
warning('swift::proxy::swift3 is deprecated and has no effect. \
|
||||
Use swift::proxy::s3api to use s3api middleware implemented in swift.')
|
||||
|
||||
package { 'swift-plugin-s3':
|
||||
ensure => $ensure,
|
||||
name => $::swift::params::swift3,
|
||||
tag => ['openstack','swift-package']
|
||||
}
|
||||
|
||||
swift_proxy_config {
|
||||
'filter:swift3/use': value => 'egg:swift3#swift3';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
puppet-swift now fails if swift3 is included in ``swift::proxy::pipeline``,
|
||||
because it no longer supports configuration for swift3 middleware. Use
|
||||
s3api instead to provide S3-compatible API.
|
||||
deprecations:
|
||||
- |
|
||||
The ``swift::proxy::swift3`` class has been deprecated because swift3
|
||||
middleware is no longer maintained. Use ``swift::proxy::s3api`` instead
|
||||
to use built-in s3api middleware in swift.
|
|
@ -253,6 +253,18 @@ describe 'swift::proxy' do
|
|||
should raise_error(Puppet::Error, /write_affinity_node_count requires write_affinity/)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'when unsupported swift3 is used' do
|
||||
let :params do
|
||||
{
|
||||
:pipeline => ['swift3', 'swauth', 'proxy-server']
|
||||
}
|
||||
end
|
||||
|
||||
it 'should fail if swift3 is included in pipeline' do
|
||||
should raise_error(Puppet::Error)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'swift::proxy::swift3' do
|
||||
shared_examples 'swift::proxy::swift3' do
|
||||
it { is_expected.to contain_swift_proxy_config('filter:swift3/use').with_value('egg:swift3#swift3') }
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_configures 'swift::proxy::swift3'
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue