Fix spurious warning in pipeline check
The storage::server class includes a bit of logic that checks the pipeline and warns if ${type}-server isn't included. However, the check has a logic flaw such that if $pipeline is an array and contains ${type}-server, the warning is triggered anyway. This patch corrects the bad logic so that the warning isn't triggered spuriously. Change-Id: I7f81598f2f7910a2175fe772c9d82b2a1067826c Closes-Bug: #1289187
This commit is contained in:
parent
4c86d39972
commit
01a3a40bcc
@ -25,12 +25,13 @@ define swift::storage::server(
|
||||
$config_file_path = "${type}-server/${name}.conf"
|
||||
) {
|
||||
|
||||
# TODO if array does not include type-server, warn
|
||||
if(
|
||||
(is_array($pipeline) and ! member($pipeline, "${type}-server")) or
|
||||
$pipeline != "${type}-server"
|
||||
) {
|
||||
# Warn if ${type-server} isn't included in the pipeline
|
||||
if is_array($pipeline) {
|
||||
if !member($pipeline, "${type}-server") {
|
||||
warning("swift storage server ${type} must specify ${type}-server")
|
||||
}
|
||||
} elsif $pipeline != "${type}-server" {
|
||||
warning("swift storage server ${type} must specify ${type}-server")
|
||||
}
|
||||
|
||||
include "swift::storage::${type}"
|
||||
|
Loading…
Reference in New Issue
Block a user