Warn that object storage parameter mount_check changes next release

The 'mount_check' parameter is different in this Puppet module than
in Swift. This patch adds a warning() to tell the user that starting
in the next version, the default will change to match the upstream
default from False to True.

Closes-Bug: 1265243

Change-Id: I7f98e523be2f8bbf39b70c544a1965c975c690dd
Signed-off-by: Ben Kero <ben.kero@gmail.com>
This commit is contained in:
Ben Kero
2015-07-14 19:56:34 +00:00
parent 851e0530fd
commit b3ff1ac9d4
5 changed files with 25 additions and 9 deletions

View File

@@ -36,7 +36,7 @@
# [*mount_check*]
# (optional) Whether or not check if the devices are mounted
# to prevent accidentally writing to the root device
# Defaults to false
# Defaults to false. Soon to be changed to 'true' to match Swift defaults.
#
# [*account_pipeline*]
# (optional) Specify the account pipeline
@@ -67,7 +67,7 @@ class swift::storage::all(
$object_pipeline = undef,
$container_pipeline = undef,
$allow_versions = false,
$mount_check = false,
$mount_check = undef,
$account_pipeline = undef,
$log_facility = 'LOG_LOCAL2',
$log_level = 'INFO',
@@ -75,6 +75,14 @@ class swift::storage::all(
$log_udp_port = undef,
) {
if (!$mount_check) {
warning('The default for the mount_check parameter will change from false to true in the next release to match upstream. To disable this warning, set mount_check=false.')
$mount_check_real = false
}
else {
$mount_check_real = $mount_check
}
class { '::swift::storage':
storage_local_net_ip => $storage_local_net_ip,
}
@@ -82,7 +90,7 @@ class swift::storage::all(
Swift::Storage::Server {
devices => $devices,
storage_local_net_ip => $storage_local_net_ip,
mount_check => $mount_check,
mount_check => $mount_check_real,
log_level => $log_level,
log_udp_host => $log_udp_host,
log_udp_port => $log_udp_port,

View File

@@ -47,8 +47,8 @@
#
# [*mount_check*]
# (optional) Whether or not check if the devices are mounted to prevent accidentally
# writing to the root device
# Defaults to false.
# writing to the root device.
# Defaults to false. Soon to be changed to 'true' to match Swift defaults.
#
# [*user*]
# (optional) User to run as
@@ -116,7 +116,7 @@ define swift::storage::server(
$outgoing_chmod = '0644',
$max_connections = 25,
$pipeline = ["${type}-server"],
$mount_check = false,
$mount_check = undef,
$user = 'swift',
$workers = '1',
$allow_versions = false,
@@ -141,6 +141,14 @@ define swift::storage::server(
warning('The default outgoing_chmod set to 0644 may yield in error prone directories and will be changed in a later release.')
}
if (!$mount_check) {
warning('The default for the mount_check parameter will change from false to true in the next release to match upstream. To disable this warning, set mount_check=false.')
$mount_check_real = false
}
else {
$mount_check_real = $mount_check
}
# Warn if ${type-server} isn't included in the pipeline
if is_array($pipeline) {
if !member($pipeline, "${type}-server") {

View File

@@ -2,7 +2,7 @@
devices = <%= @devices %>
bind_ip = <%= @storage_local_net_ip %>
bind_port = <%= @bind_port %>
mount_check = <%= @mount_check %>
mount_check = <%= @mount_check_real %>
user = <%= @user %>
workers = <%= @workers %>
log_name = <%= @log_name %>

View File

@@ -2,7 +2,7 @@
devices = <%= @devices %>
bind_ip = <%= @storage_local_net_ip %>
bind_port = <%= @bind_port %>
mount_check = <%= @mount_check %>
mount_check = <%= @mount_check_real %>
user = <%= @user %>
log_name = <%= @log_name %>
log_facility = <%= @log_facility %>

View File

@@ -2,7 +2,7 @@
devices = <%= @devices %>
bind_ip = <%= @storage_local_net_ip %>
bind_port = <%= @bind_port %>
mount_check = <%= @mount_check %>
mount_check = <%= @mount_check_real %>
user = <%= @user %>
log_name = <%= @log_name %>
log_facility = <%= @log_facility %>