diff --git a/README.md b/README.md index 1bf06408..0fff882b 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,6 @@ To utilize the glance module's functionality you will need to declare multiple r ```puppet class { 'glance::api': - verbose => true, keystone_tenant => 'services', keystone_user => 'glance', keystone_password => '12345', @@ -52,7 +51,6 @@ class { 'glance::api': } class { 'glance::registry': - verbose => true, keystone_tenant => 'services', keystone_user => 'glance', keystone_password => '12345', @@ -112,12 +110,12 @@ class { 'glance::notify::rabbitmq': The `glance_api_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/glance/glance-api.conf` file. ```puppet -glance_api_config { 'DEFAULT/verbose' : - value => true, +glance_api_config { 'DEFAULT/image_cache_dir' : + value => /var/lib/glance/image-cache, } ``` -This will write `verbose=true` in the `[DEFAULT]` section. +This will write `image_cache_dir=/var/lib/glance/image-cache` in the `[DEFAULT]` section. ##### name @@ -140,12 +138,12 @@ If value is equal to ensure_absent_val then the resource will behave as if `ensu The `glance_registry_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/glance/glance-registry.conf` file. ```puppet -glance_registry_config { 'DEFAULT/verbose' : - value => true, +glance_registry_config { 'DEFAULT/workers' : + value => 1, } ``` -This will write `verbose=true` in the `[DEFAULT]` section. +This will write `workers=1` in the `[DEFAULT]` section. ##### name @@ -168,12 +166,12 @@ If value is equal to ensure_absent_val then the resource will behave as if `ensu The `glance_cache_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/glance/glance-cache.conf` file. ```puppet -glance_cache_config { 'DEFAULT/verbose' : - value => true, +glance_cache_config { 'DEFAULT/image_cache_stall_time' : + value => 86400, } ``` -This will write `verbose=true` in the `[DEFAULT]` section. +This will write `image_cache_stall_time=86400` in the `[DEFAULT]` section. ##### name diff --git a/manifests/api.pp b/manifests/api.pp index cdc10c25..7cd64de9 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -12,10 +12,6 @@ # setting is ignored and the setting from the glance class is used # because there is only one glance package. Defaults to 'present'. # -# [*verbose*] -# (optional) Rather to log the glance api service at verbose level. -# Default: undef -# # [*debug*] # (optional) Rather to log the glance api service at debug level. # Default: undef @@ -267,10 +263,13 @@ # Defaults to false. # Example: ['file','http'] # +# [*verbose*] +# (optional) Deprecated. Rather to log the glance api service at verbose level. +# Default: undef + class glance::api( $keystone_password, $package_ensure = 'present', - $verbose = undef, $debug = undef, $bind_host = $::os_service_default, $bind_port = '9292', @@ -326,6 +325,7 @@ class glance::api( $validation_options = {}, # DEPRECATED PARAMETERS $known_stores = false, + $verbose = undef, ) inherits glance { include ::glance::policy @@ -333,6 +333,10 @@ class glance::api( include ::glance::api::logging include ::glance::cache::logging + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } + if ( $glance::params::api_package_name != $glance::params::registry_package_name ) { ensure_packages('glance-api', { diff --git a/manifests/api/logging.pp b/manifests/api/logging.pp index 54137f08..fa972a8a 100644 --- a/manifests/api/logging.pp +++ b/manifests/api/logging.pp @@ -4,10 +4,6 @@ # # == parameters # -# [*verbose*] -# (Optional) Should the daemons log verbose messages -# Defaults to $::os_service_default. -# # [*debug*] # (Optional) Should the daemons log debug messages # Defaults to $::os_service_default. @@ -92,14 +88,19 @@ # (optional) Format string for %%(asctime)s in log records. # Defaults to $::os_service_default. # Example: 'Y-%m-%d %H:%M:%S' - +# +# DEPRECATED PARAMETERS +# +# [*verbose*] +# (Optional) Deprecated. Should the daemons log verbose messages +# Defaults to undef +# class glance::api::logging( $use_syslog = $::os_service_default, $use_stderr = $::os_service_default, $log_facility = $::os_service_default, $log_dir = '/var/log/glance', $log_file = '/var/log/glance/api.log', - $verbose = $::os_service_default, $debug = $::os_service_default, $logging_context_format_string = $::os_service_default, $logging_default_format_string = $::os_service_default, @@ -112,6 +113,8 @@ class glance::api::logging( $instance_format = $::os_service_default, $instance_uuid_format = $::os_service_default, $log_date_format = $::os_service_default, + # Deprecated + $verbose = undef, ) { # NOTE(spredzy): In order to keep backward compatibility we rely on the pick function @@ -121,12 +124,14 @@ class glance::api::logging( $log_facility_real = pick($::glance::api::log_facility,$log_facility) $log_dir_real = pick($::glance::api::log_dir,$log_dir) $log_file_real = pick($::glance::api::log_file,$log_file) - $verbose_real = pick($::glance::api::verbose,$verbose) $debug_real = pick($::glance::api::debug,$debug) + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } + oslo::log { 'glance_api_config': debug => $debug_real, - verbose => $verbose_real, use_stderr => $use_stderr_real, use_syslog => $use_syslog_real, log_dir => $log_dir_real, diff --git a/manifests/cache/logging.pp b/manifests/cache/logging.pp index c0c09d4f..f439ec9a 100644 --- a/manifests/cache/logging.pp +++ b/manifests/cache/logging.pp @@ -4,10 +4,6 @@ # # == parameters # -# [*verbose*] -# (Optional) Should the daemons log verbose messages -# Defaults to $::os_service_default. -# # [*debug*] # (Optional) Should the daemons log debug messages # Defaults to $::os_service_default. @@ -92,6 +88,13 @@ # (optional) Format string for %%(asctime)s in log records. # Defaults to $::os_service_default. # Example: 'Y-%m-%d %H:%M:%S' +# +# DEPRECATED PARAMETERS +# +# [*verbose*] +# (Optional) Deprecated. Should the daemons log verbose messages +# Defaults to undef + class glance::cache::logging( $use_syslog = $::os_service_default, @@ -99,7 +102,6 @@ class glance::cache::logging( $log_facility = $::os_service_default, $log_dir = '/var/log/glance', $log_file = '/var/log/glance/cache.log', - $verbose = $::os_service_default, $debug = $::os_service_default, $logging_context_format_string = $::os_service_default, $logging_default_format_string = $::os_service_default, @@ -112,18 +114,22 @@ class glance::cache::logging( $instance_format = $::os_service_default, $instance_uuid_format = $::os_service_default, $log_date_format = $::os_service_default, + # Deprecated + $verbose = undef, ) { $use_syslog_real = pick($::glance::api::use_syslog,$use_syslog) $use_stderr_real = pick($::glance::api::use_stderr,$use_stderr) $log_facility_real = pick($::glance::api::log_facility,$log_facility) $log_dir_real = pick($::glance::api::log_dir,$log_dir) - $verbose_real = pick($::glance::api::verbose,$verbose) $debug_real = pick($::glance::api::debug,$debug) + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } + oslo::log { 'glance_cache_config': debug => $debug_real, - verbose => $verbose_real, use_stderr => $use_stderr_real, use_syslog => $use_syslog_real, log_dir => $log_dir_real, diff --git a/manifests/glare/logging.pp b/manifests/glare/logging.pp index 0f1ed018..b3ddedb1 100644 --- a/manifests/glare/logging.pp +++ b/manifests/glare/logging.pp @@ -4,10 +4,6 @@ # # === Parameters # -# [*verbose*] -# (Optional) Should the daemons log verbose messages. -# Defaults to $::os_service_default. -# # [*debug*] # (Optional) Should the daemons log debug messages. # Defaults to $::os_service_default. @@ -93,13 +89,18 @@ # Defaults to $::os_service_default. # Example: 'Y-%m-%d %H:%M:%S' # +# DEPRECATED PARAMETERS +# +# [*verbose*] +# (Optional) Deprecated. Should the daemons log verbose messages. +# Defaults to undef +# class glance::glare::logging( $use_syslog = $::os_service_default, $use_stderr = $::os_service_default, $log_facility = $::os_service_default, $log_dir = '/var/log/glance', $log_file = '/var/log/glance/glare.log', - $verbose = $::os_service_default, $debug = $::os_service_default, $logging_context_format_string = $::os_service_default, $logging_default_format_string = $::os_service_default, @@ -112,11 +113,16 @@ class glance::glare::logging( $instance_format = $::os_service_default, $instance_uuid_format = $::os_service_default, $log_date_format = $::os_service_default, + # Deprecated + $verbose = undef, ) { + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } + oslo::log { 'glance_glare_config': debug => $debug, - verbose => $verbose, use_stderr => $use_stderr, use_syslog => $use_syslog, log_dir => $log_dir, diff --git a/manifests/registry.pp b/manifests/registry.pp index 99ac0209..2ffa0bd5 100644 --- a/manifests/registry.pp +++ b/manifests/registry.pp @@ -12,9 +12,6 @@ # platforms this setting is ignored and the setting from the glance class is # used because there is only one glance package. # -# [*verbose*] -# (optional) Enable verbose logs (true|false). Defaults to undef. -# # [*debug*] # (optional) Enable debug logs (true|false). Defaults to undef. # @@ -153,10 +150,14 @@ # Set to -1 to disable caching completely. # Defaults to $::os_service_default. # +# DEPRECATED PARAMETERS +# +# [*verbose*] +# (optional) Deprecated. Enable verbose logs (true|false). Defaults to undef. +# class glance::registry( $keystone_password, $package_ensure = 'present', - $verbose = undef, $debug = undef, $bind_host = $::os_service_default, $bind_port = '9191', @@ -190,11 +191,17 @@ class glance::registry( $signing_dir = $::os_service_default, $memcached_servers = $::os_service_default, $token_cache_time = $::os_service_default, + # Deprecated + $verbose = undef, ) inherits glance { include ::glance::registry::logging include ::glance::registry::db + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } + if ( $glance::params::api_package_name != $glance::params::registry_package_name ) { ensure_packages( 'glance-registry', { diff --git a/manifests/registry/logging.pp b/manifests/registry/logging.pp index b2b4ea31..e30314af 100644 --- a/manifests/registry/logging.pp +++ b/manifests/registry/logging.pp @@ -4,10 +4,6 @@ # # == parameters # -# [*verbose*] -# (Optional) Should the daemons log verbose messages -# Defaults to $::os_service_default. -# # [*debug*] # (Optional) Should the daemons log debug messages # Defaults to $::os_service_default. @@ -92,14 +88,19 @@ # (optional) Format string for %%(asctime)s in log records. # Defaults to $::os_service_default. # Example: 'Y-%m-%d %H:%M:%S' - +# +# DEPRECATED PARAMETERS +# +# [*verbose*] +# (Optional) Deprecated. Should the daemons log verbose messages +# Defaults to undef +# class glance::registry::logging( $use_syslog = $::os_service_default, $use_stderr = $::os_service_default, $log_facility = $::os_service_default, $log_dir = '/var/log/glance', $log_file = '/var/log/glance/registry.log', - $verbose = $::os_service_default, $debug = $::os_service_default, $logging_context_format_string = $::os_service_default, $logging_default_format_string = $::os_service_default, @@ -112,6 +113,8 @@ class glance::registry::logging( $instance_format = $::os_service_default, $instance_uuid_format = $::os_service_default, $log_date_format = $::os_service_default, + # Deprecated + $verbose = undef, ) { # NOTE(spredzy): In order to keep backward compatibility we rely on the pick function @@ -121,12 +124,14 @@ class glance::registry::logging( $log_facility_real = pick($::glance::registry::log_facility,$log_facility) $log_dir_real = pick($::glance::registry::log_dir,$log_dir) $log_file_real = pick($::glance::registry::log_file,$log_file) - $verbose_real = pick($::glance::registry::verbose,$verbose) $debug_real = pick($::glance::registry::debug,$debug) + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } + oslo::log { 'glance_registry_config': debug => $debug_real, - verbose => $verbose_real, use_stderr => $use_stderr_real, use_syslog => $use_syslog_real, log_dir => $log_dir_real, diff --git a/releasenotes/notes/verbose-deprecation-bf94328c56f7a944.yaml b/releasenotes/notes/verbose-deprecation-bf94328c56f7a944.yaml new file mode 100644 index 00000000..ecfc2567 --- /dev/null +++ b/releasenotes/notes/verbose-deprecation-bf94328c56f7a944.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - verbose option is now deprecated for removal, the + parameter has no effect. diff --git a/spec/acceptance/basic_glance_spec.rb b/spec/acceptance/basic_glance_spec.rb index 186fbf6b..8bc60348 100644 --- a/spec/acceptance/basic_glance_spec.rb +++ b/spec/acceptance/basic_glance_spec.rb @@ -26,12 +26,10 @@ describe 'glance class' do } class { '::glance::api': database_connection => 'mysql+pymysql://glance:a_big_secret@127.0.0.1/glance?charset=utf8', - verbose => false, keystone_password => 'a_big_secret', } class { '::glance::registry': database_connection => 'mysql+pymysql://glance:a_big_secret@127.0.0.1/glance?charset=utf8', - verbose => false, keystone_password => 'a_big_secret', } class { '::glance::glare::db': diff --git a/spec/classes/glance_api_logging_spec.rb b/spec/classes/glance_api_logging_spec.rb index a0ee571d..9260d8c4 100644 --- a/spec/classes/glance_api_logging_spec.rb +++ b/spec/classes/glance_api_logging_spec.rb @@ -28,7 +28,6 @@ describe 'glance::api::logging' do :log_facility => 'LOG_FOO', :log_dir => '/var/log', :log_file => '/var/tmp/glance_api_random.log', - :verbose => true, :debug => true, } end @@ -61,7 +60,6 @@ describe 'glance::api::logging' do is_expected.to contain_glance_api_config('DEFAULT/use_stderr').with(:value => '') is_expected.to contain_glance_api_config('DEFAULT/log_dir').with(:value => '/var/log/glance') is_expected.to contain_glance_api_config('DEFAULT/log_file').with(:value => '/var/log/glance/api.log') - is_expected.to contain_glance_api_config('DEFAULT/verbose').with(:value => '') is_expected.to contain_glance_api_config('DEFAULT/debug').with(:value => '') end end @@ -73,7 +71,6 @@ describe 'glance::api::logging' do is_expected.to contain_glance_api_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_FOO') is_expected.to contain_glance_api_config('DEFAULT/log_dir').with(:value => '/var/log') is_expected.to contain_glance_api_config('DEFAULT/log_file').with(:value => '/var/tmp/glance_api_random.log') - is_expected.to contain_glance_api_config('DEFAULT/verbose').with(:value => 'true') is_expected.to contain_glance_api_config('DEFAULT/debug').with(:value => 'true') end end diff --git a/spec/classes/glance_api_spec.rb b/spec/classes/glance_api_spec.rb index 53482677..2c078044 100644 --- a/spec/classes/glance_api_spec.rb +++ b/spec/classes/glance_api_spec.rb @@ -4,7 +4,6 @@ describe 'glance::api' do let :default_params do { - :verbose => false, :debug => false, :use_stderr => '', :bind_host => '', @@ -47,7 +46,6 @@ describe 'glance::api' do shared_examples_for 'glance::api' do [{:keystone_password => 'ChangeMe'}, { - :verbose => true, :debug => true, :bind_host => '127.0.0.1', :bind_port => '9222', diff --git a/spec/classes/glance_cache_logging_spec.rb b/spec/classes/glance_cache_logging_spec.rb index 400f9dae..3726c993 100644 --- a/spec/classes/glance_cache_logging_spec.rb +++ b/spec/classes/glance_cache_logging_spec.rb @@ -28,7 +28,6 @@ describe 'glance::cache::logging' do :log_facility => 'LOG_FOO', :log_dir => '/var/log', :log_file => '/var/tmp/glance_cache_random.log', - :verbose => true, :debug => true, } end @@ -60,7 +59,6 @@ describe 'glance::cache::logging' do is_expected.to contain_glance_cache_config('DEFAULT/use_stderr').with(:value => '') is_expected.to contain_glance_cache_config('DEFAULT/use_syslog').with(:value => '') is_expected.to contain_glance_cache_config('DEFAULT/debug').with(:value => '') - is_expected.to contain_glance_cache_config('DEFAULT/verbose').with(:value => '') is_expected.to contain_glance_cache_config('DEFAULT/log_dir').with(:value => '/var/log/glance') is_expected.to contain_glance_cache_config('DEFAULT/log_file').with(:value => '/var/log/glance/cache.log') end @@ -73,7 +71,6 @@ describe 'glance::cache::logging' do is_expected.to contain_glance_cache_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_FOO') is_expected.to contain_glance_cache_config('DEFAULT/log_dir').with(:value => '/var/log') is_expected.to contain_glance_cache_config('DEFAULT/log_file').with(:value => '/var/tmp/glance_cache_random.log') - is_expected.to contain_glance_cache_config('DEFAULT/verbose').with(:value => 'true') is_expected.to contain_glance_cache_config('DEFAULT/debug').with(:value => 'true') end end diff --git a/spec/classes/glance_glare_logging_spec.rb b/spec/classes/glance_glare_logging_spec.rb index e7c9f9f8..c40b50cd 100644 --- a/spec/classes/glance_glare_logging_spec.rb +++ b/spec/classes/glance_glare_logging_spec.rb @@ -28,7 +28,6 @@ describe 'glance::glare::logging' do :log_facility => 'LOG_FOO', :log_dir => '/var/log', :log_file => '/var/tmp/glance_glare_random.log', - :verbose => true, :debug => true, } end @@ -61,7 +60,6 @@ describe 'glance::glare::logging' do is_expected.to contain_glance_glare_config('DEFAULT/use_stderr').with(:value => '') is_expected.to contain_glance_glare_config('DEFAULT/log_dir').with(:value => '/var/log/glance') is_expected.to contain_glance_glare_config('DEFAULT/log_file').with(:value => '/var/log/glance/glare.log') - is_expected.to contain_glance_glare_config('DEFAULT/verbose').with(:value => '') is_expected.to contain_glance_glare_config('DEFAULT/debug').with(:value => '') end end @@ -73,7 +71,6 @@ describe 'glance::glare::logging' do is_expected.to contain_glance_glare_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_FOO') is_expected.to contain_glance_glare_config('DEFAULT/log_dir').with(:value => '/var/log') is_expected.to contain_glance_glare_config('DEFAULT/log_file').with(:value => '/var/tmp/glance_glare_random.log') - is_expected.to contain_glance_glare_config('DEFAULT/verbose').with(:value => 'true') is_expected.to contain_glance_glare_config('DEFAULT/debug').with(:value => 'true') end end diff --git a/spec/classes/glance_registry_logging_spec.rb b/spec/classes/glance_registry_logging_spec.rb index 8a172b5f..08877fd1 100644 --- a/spec/classes/glance_registry_logging_spec.rb +++ b/spec/classes/glance_registry_logging_spec.rb @@ -28,7 +28,6 @@ describe 'glance::registry::logging' do :log_facility => 'LOG_FOO', :log_dir => '/var/log', :log_file => '/var/tmp/glance_registry_random.log', - :verbose => true, :debug => true, } end @@ -61,7 +60,6 @@ describe 'glance::registry::logging' do is_expected.to contain_glance_registry_config('DEFAULT/use_stderr').with(:value => '') is_expected.to contain_glance_registry_config('DEFAULT/log_dir').with(:value => '/var/log/glance') is_expected.to contain_glance_registry_config('DEFAULT/log_file').with(:value => '/var/log/glance/registry.log') - is_expected.to contain_glance_registry_config('DEFAULT/verbose').with(:value => '') is_expected.to contain_glance_registry_config('DEFAULT/debug').with(:value => '') end end @@ -73,7 +71,6 @@ describe 'glance::registry::logging' do is_expected.to contain_glance_registry_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_FOO') is_expected.to contain_glance_registry_config('DEFAULT/log_dir').with(:value => '/var/log') is_expected.to contain_glance_registry_config('DEFAULT/log_file').with(:value => '/var/tmp/glance_registry_random.log') - is_expected.to contain_glance_registry_config('DEFAULT/verbose').with(:value => 'true') is_expected.to contain_glance_registry_config('DEFAULT/debug').with(:value => 'true') end end diff --git a/spec/classes/glance_registry_spec.rb b/spec/classes/glance_registry_spec.rb index e4fcbd6f..6ee84851 100644 --- a/spec/classes/glance_registry_spec.rb +++ b/spec/classes/glance_registry_spec.rb @@ -2,7 +2,6 @@ describe 'glance::registry' do let :default_params do { - :verbose => false, :debug => false, :use_stderr => '', :bind_host => '', diff --git a/tests/api.pp b/tests/api.pp index eba47007..63527d01 100644 --- a/tests/api.pp +++ b/tests/api.pp @@ -1,4 +1,3 @@ class { '::glance::api': debug => true, - verbose => true, } diff --git a/tests/registry.pp b/tests/registry.pp index 52a2d1ce..cbe84390 100644 --- a/tests/registry.pp +++ b/tests/registry.pp @@ -1,4 +1,3 @@ class { '::glance::registry': debug => true, - verbose => true, } diff --git a/tests/site.pp b/tests/site.pp index 7c3edb74..032cb348 100644 --- a/tests/site.pp +++ b/tests/site.pp @@ -6,7 +6,6 @@ Exec { logoutput => 'on_failure' } node glance_keystone_mysql { class { '::mysql::server': } class { '::keystone': - verbose => true, debug => true, catalog_type => 'sql', admin_token => 'admin_token', @@ -19,7 +18,6 @@ node glance_keystone_mysql { password => 'ChangeMe', } class { '::glance::api': - verbose => true, debug => true, auth_type => 'keystone', keystone_tenant => 'services', @@ -39,7 +37,6 @@ node glance_keystone_mysql { } class { '::glance::registry': - verbose => true, debug => true, auth_type => 'keystone', keystone_tenant => 'services',