Merge "Warn that object storage parameter mount_check changes next release"

This commit is contained in:
Jenkins 2015-09-24 20:17:56 +00:00 committed by Gerrit Code Review
commit df70d51f16
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
@ -82,7 +82,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',
@ -93,6 +93,14 @@ class swift::storage::all(
$outgoing_chmod = '0644',
) {
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,
}
@ -100,7 +108,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
@ -121,7 +121,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,
@ -147,6 +147,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 %>