diff --git a/manifests/storage/all.pp b/manifests/storage/all.pp index bc20a6e7..1064b9e1 100644 --- a/manifests/storage/all.pp +++ b/manifests/storage/all.pp @@ -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, diff --git a/manifests/storage/server.pp b/manifests/storage/server.pp index 3b6d2deb..3637cd6b 100644 --- a/manifests/storage/server.pp +++ b/manifests/storage/server.pp @@ -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") { diff --git a/templates/account-server.conf.erb b/templates/account-server.conf.erb index 6c4ba277..47c7675e 100644 --- a/templates/account-server.conf.erb +++ b/templates/account-server.conf.erb @@ -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 %> diff --git a/templates/container-server.conf.erb b/templates/container-server.conf.erb index fa05fd0d..6d28f8c0 100644 --- a/templates/container-server.conf.erb +++ b/templates/container-server.conf.erb @@ -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 %> diff --git a/templates/object-server.conf.erb b/templates/object-server.conf.erb index e5d79227..212b8e33 100644 --- a/templates/object-server.conf.erb +++ b/templates/object-server.conf.erb @@ -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 %>