Set mount_check to True by default

In a previous release, we sent a deprecation warning for mount_check
parameter which was set to False by default, while upstream uses True.

This patch aims to use upstream default, True, by default in our
interface.

Depends-On: I0bb1ccf4c0adc4e217e2989bd50d96741fa156f7
Change-Id: I453e24509a3f05d1fea69d47577cf81535a1ee13
This commit is contained in:
Emilien Macchi
2015-12-24 15:22:01 +01:00
parent 964ec99060
commit 318b900706
6 changed files with 14 additions and 22 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. Soon to be changed to 'true' to match Swift defaults.
# Defaults to true.
#
# [*account_pipeline*]
# (optional) Specify the account pipeline
@@ -80,7 +80,7 @@ class swift::storage::all(
$object_pipeline = undef,
$container_pipeline = undef,
$allow_versions = false,
$mount_check = undef,
$mount_check = true,
$account_pipeline = undef,
$log_facility = 'LOG_LOCAL2',
$log_level = 'INFO',
@@ -91,14 +91,6 @@ class swift::storage::all(
$outgoing_chmod = 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r',
) {
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,
}
@@ -106,7 +98,7 @@ class swift::storage::all(
Swift::Storage::Server {
devices => $devices,
storage_local_net_ip => $storage_local_net_ip,
mount_check => $mount_check_real,
mount_check => $mount_check,
log_level => $log_level,
log_udp_host => $log_udp_host,
log_udp_port => $log_udp_port,

View File

@@ -45,7 +45,7 @@
# [*mount_check*]
# (optional) Whether or not check if the devices are mounted to prevent accidentally
# writing to the root device.
# Defaults to false. Soon to be changed to 'true' to match Swift defaults.
# Defaults to true.
#
# [*user*]
# (optional) User to run as
@@ -119,7 +119,7 @@ define swift::storage::server(
$outgoing_chmod = 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r',
$max_connections = 25,
$pipeline = ["${type}-server"],
$mount_check = undef,
$mount_check = true,
$user = 'swift',
$workers = '1',
$allow_versions = false,
@@ -137,12 +137,12 @@ define swift::storage::server(
$config_file_path = "${type}-server.conf",
) {
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
if ($incoming_chmod == '0644') {
warning('The default incoming_chmod set to 0644 may yield in error prone directories and will be changed in a later release.')
}
else {
$mount_check_real = $mount_check
if ($outgoing_chmod == '0644') {
warning('The default outgoing_chmod set to 0644 may yield in error prone directories and will be changed in a later release.')
}
# Warn if ${type-server} isn't included in the pipeline

View File

@@ -171,7 +171,7 @@ describe 'swift::storage::server' do
it { is_expected.to contain_file(fragment_file).with_content(/^devices\s*=\s*\/srv\/node\s*$/) }
it { is_expected.to contain_file(fragment_file).with_content(/^bind_ip\s*=\s*10\.0\.0\.1\s*$/) }
it { is_expected.to contain_file(fragment_file).with_content(/^bind_port\s*=\s*#{title}\s*$/) }
it { is_expected.to contain_file(fragment_file).with_content(/^mount_check\s*=\s*false\s*$/) }
it { is_expected.to contain_file(fragment_file).with_content(/^mount_check\s*=\s*true\s*$/) }
it { is_expected.to contain_file(fragment_file).with_content(/^user\s*=\s*swift\s*$/) }
it { is_expected.to contain_file(fragment_file).with_content(/^set log_name\s*=\s*#{t}-server\s*$/) }
it { is_expected.to contain_file(fragment_file).with_content(/^set log_facility\s*=\s*LOG_LOCAL2\s*$/) }

View File

@@ -2,7 +2,7 @@
devices = <%= @devices %>
bind_ip = <%= @storage_local_net_ip %>
bind_port = <%= @bind_port %>
mount_check = <%= @mount_check_real %>
mount_check = <%= @mount_check %>
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_real %>
mount_check = <%= @mount_check %>
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_real %>
mount_check = <%= @mount_check %>
user = <%= @user %>
log_name = <%= @log_name %>
log_facility = <%= @log_facility %>