Merge "Fail if pipeline does not include the proper server"
This commit is contained in:
@@ -62,8 +62,8 @@ class swift::internal_client (
|
||||
|
||||
validate_legacy(Array, 'validate_array', $pipeline)
|
||||
|
||||
if(! member($pipeline, 'proxy-server')) {
|
||||
warning('pipeline parameter must contain proxy-server')
|
||||
if empty($pipeline) or $pipeline[-1] != 'proxy-server' {
|
||||
fail('proxy-server must be the last element in pipeline')
|
||||
}
|
||||
|
||||
swift_internal_client_config {
|
||||
|
||||
@@ -212,8 +212,8 @@ class swift::proxy(
|
||||
warning('no auth type provided in the pipeline')
|
||||
}
|
||||
|
||||
if(! member($pipeline, 'proxy-server')) {
|
||||
warning('pipeline parameter must contain proxy-server')
|
||||
if empty($pipeline) or $pipeline[-1] != 'proxy-server' {
|
||||
fail('proxy-server must be the last element in pipeline')
|
||||
}
|
||||
|
||||
if($auth_type == 'tempauth' and ! $account_autocreate ){
|
||||
|
||||
@@ -257,10 +257,11 @@ define swift::storage::server(
|
||||
|
||||
# Warn if ${type-server} isn't included in the pipeline
|
||||
$pipeline_array = any2array($pipeline)
|
||||
if !member($pipeline_array, "${type}-server") {
|
||||
warning("swift storage server ${type} must specify ${type}-server")
|
||||
if empty($pipeline_array) or $pipeline_array[-1] != "${type}-server" {
|
||||
fail("${type}-server must be the last element in pipeline")
|
||||
}
|
||||
|
||||
|
||||
if ($log_udp_port and !$log_udp_host) {
|
||||
fail ('log_udp_port requires log_udp_host to be set')
|
||||
}
|
||||
|
||||
@@ -36,9 +36,9 @@ describe 'swift::storage::all' do
|
||||
:object_port => "7000",
|
||||
:container_port => "7001",
|
||||
:account_port => "7002",
|
||||
:object_pipeline => ["healthcheck"],
|
||||
:container_pipeline => ["healthcheck"],
|
||||
:account_pipeline => ["healthcheck"],
|
||||
:object_pipeline => ['healthcheck', 'object-server'],
|
||||
:container_pipeline => ['healthcheck', 'container-server'],
|
||||
:account_pipeline => ['healthcheck', 'account-server'],
|
||||
:splice => true,
|
||||
:log_facility => ['LOG_LOCAL2', 'LOG_LOCAL3'],
|
||||
:incoming_chmod => '0644',
|
||||
|
||||
Reference in New Issue
Block a user