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:
@@ -25,12 +25,13 @@ define swift::storage::server(
|
|||||||
$config_file_path = "${type}-server/${name}.conf"
|
$config_file_path = "${type}-server/${name}.conf"
|
||||||
) {
|
) {
|
||||||
|
|
||||||
# TODO if array does not include type-server, warn
|
# Warn if ${type-server} isn't included in the pipeline
|
||||||
if(
|
if is_array($pipeline) {
|
||||||
(is_array($pipeline) and ! member($pipeline, "${type}-server")) or
|
if !member($pipeline, "${type}-server") {
|
||||||
$pipeline != "${type}-server"
|
|
||||||
) {
|
|
||||||
warning("swift storage server ${type} must specify ${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}"
|
include "swift::storage::${type}"
|
||||||
|
Reference in New Issue
Block a user