diff --git a/manifests/containerreconciler.pp b/manifests/containerreconciler.pp index cab66976..811d6a09 100644 --- a/manifests/containerreconciler.pp +++ b/manifests/containerreconciler.pp @@ -103,6 +103,10 @@ # (optional) Location where syslog sends the logs to. # Defaults to '/dev/log'. # +# [*log_max_line_length*] +# (optional) Caps the length of log lines to the value given. +# Defaults to $facts['os_service_default']. +# # [*purge_config*] # (optional) Whether to set only the specified config options # in the proxy config. @@ -129,6 +133,7 @@ class swift::containerreconciler( $log_level = 'INFO', $log_facility = 'LOG_LOCAL2', $log_address = '/dev/log', + $log_max_line_length = $facts['os_service_default'], Boolean $purge_config = false, ) inherits swift::params { @@ -186,17 +191,18 @@ class swift::containerreconciler( } swift_container_reconciler_config { - 'pipeline:main/pipeline': value => join($pipeline, ' '); - 'container-reconciler/interval': value => $interval; - 'container-reconciler/concurrency': value => $concurrency; - 'container-reconciler/process': value => $process; - 'container-reconciler/processes': value => $processes; - 'container-reconciler/reclaim_age': value => $reclaim_age; - 'container-reconciler/request_tries': value => $request_tries; - 'container-reconciler/log_name': value => $log_name; - 'container-reconciler/log_facility': value => $log_facility; - 'container-reconciler/log_level': value => $log_level; - 'container-reconciler/log_address': value => $log_address; + 'pipeline:main/pipeline': value => join($pipeline, ' '); + 'container-reconciler/interval': value => $interval; + 'container-reconciler/concurrency': value => $concurrency; + 'container-reconciler/process': value => $process; + 'container-reconciler/processes': value => $processes; + 'container-reconciler/reclaim_age': value => $reclaim_age; + 'container-reconciler/request_tries': value => $request_tries; + 'container-reconciler/log_name': value => $log_name; + 'container-reconciler/log_facility': value => $log_facility; + 'container-reconciler/log_level': value => $log_level; + 'container-reconciler/log_address': value => $log_address; + 'container-reconciler/log_max_line_length': value => $log_max_line_length; } if $manage_service { diff --git a/manifests/objectexpirer.pp b/manifests/objectexpirer.pp index a410a445..18e99259 100644 --- a/manifests/objectexpirer.pp +++ b/manifests/objectexpirer.pp @@ -109,6 +109,10 @@ # (optional) Location where syslog sends the logs to. # Defaults to '/dev/log'. # +# [*log_max_line_length*] +# (optional) Caps the length of log lines to the value given. +# Defaults to $facts['os_service_default']. +# # [*purge_config*] # (optional) Whether to set only the specified config options # in the object expirer config. @@ -137,6 +141,7 @@ class swift::objectexpirer( $log_level = 'INFO', $log_facility = 'LOG_LOCAL2', $log_address = '/dev/log', + $log_max_line_length = $facts['os_service_default'], Boolean $purge_config = false, ) inherits swift::params { @@ -217,6 +222,7 @@ class swift::objectexpirer( 'object-expirer/log_facility': value => $log_facility; 'object-expirer/log_level': value => $log_level; 'object-expirer/log_address': value => $log_address; + 'object-expirer/log_max_line_length': value => $log_max_line_length; } if $manage_service { diff --git a/manifests/proxy.pp b/manifests/proxy.pp index 6cea70c0..af7c6ffa 100644 --- a/manifests/proxy.pp +++ b/manifests/proxy.pp @@ -75,6 +75,10 @@ # (optional) Configures log_name for swift proxy-server. # Defaults to proxy-server # +# [*log_max_line_length*] +# (optional) Caps the length of log lines to the value given. +# Defaults to $facts['os_service_default']. +# # [*object_chunk_size*] # (optional) Chunk size to read from object servers. # Defaults to $facts['os_service_default']. @@ -212,6 +216,7 @@ class swift::proxy( $log_facility = 'LOG_LOCAL2', $log_handoffs = $facts['os_service_default'], $log_name = 'proxy-server', + $log_max_line_length = $facts['os_service_default'], $cors_allow_origin = $facts['os_service_default'], $strict_cors_mode = $facts['os_service_default'], $cors_expose_headers = $facts['os_service_default'], @@ -292,6 +297,7 @@ class swift::proxy( 'DEFAULT/log_address': value => $log_address; 'DEFAULT/log_udp_host': value => $log_udp_host; 'DEFAULT/log_udp_port': value => $log_udp_port; + 'DEFAULT/log_max_line_length': value => $log_max_line_length; 'DEFAULT/client_timeout': value => $client_timeout; 'DEFAULT/keepalive_timeout': value => $keepalive_timeout; 'pipeline:main/pipeline': value => join($pipeline, ' '); diff --git a/manifests/storage/drive_audit.pp b/manifests/storage/drive_audit.pp index e4ca9667..7bdf167f 100644 --- a/manifests/storage/drive_audit.pp +++ b/manifests/storage/drive_audit.pp @@ -53,6 +53,10 @@ # (Optional) Port value for UDP receiver, if enabled. # Defaults to undef. # +# [*log_max_line_length*] +# (Optional) Caps the length of log lines to the value given. +# Defaults to $facts['os_service_default']. +# # [*device_dir*] # (Optional) Directory devices are mounted under # Defaults to $facts['os_service_default']. @@ -112,6 +116,7 @@ class swift::storage::drive_audit( $log_name = 'drive-audit', $log_udp_host = undef, $log_udp_port = undef, + $log_max_line_length = $facts['os_service_default'], $device_dir = '/srv/node', $minutes = $facts['os_service_default'], $error_limit = $facts['os_service_default'], @@ -142,10 +147,11 @@ class swift::storage::drive_audit( swift_drive_audit_config { - 'drive-audit/log_name' : value => $log_name; - 'drive-audit/log_facility': value => $log_facility; - 'drive-audit/log_level' : value => $log_level; - 'drive-audit/log_address' : value => $log_address; + 'drive-audit/log_name' : value => $log_name; + 'drive-audit/log_facility' : value => $log_facility; + 'drive-audit/log_level' : value => $log_level; + 'drive-audit/log_address' : value => $log_address; + 'drive-audit/log_max_line_length' : value => $log_max_line_length; } if $log_udp_host { diff --git a/manifests/storage/server.pp b/manifests/storage/server.pp index 6490e1ba..05e570e4 100644 --- a/manifests/storage/server.pp +++ b/manifests/storage/server.pp @@ -190,6 +190,10 @@ # (optional) Port value for UDP receiver, if enabled. # Defaults to undef. # +# [*log_max_line_length*] +# (optional) Caps the length of log lines to the value given. +# Defaults to $facts['os_service_default']. +# # [*log_requests*] # (optional) Whether or not log every request. reduces logging output if false, # good for seeing errors if true @@ -327,6 +331,7 @@ define swift::storage::server( $log_udp_host = $facts['os_service_default'], $log_udp_port = $facts['os_service_default'], $log_requests = true, + $log_max_line_length = $facts['os_service_default'], # this parameters needs to be specified after type and name Boolean $statsd_enabled = false, $log_statsd_host = 'localhost', @@ -443,6 +448,7 @@ define swift::storage::server( 'DEFAULT/log_address' => {'value' => $log_address}, 'DEFAULT/log_udp_host' => {'value' => $log_udp_host}, 'DEFAULT/log_udp_port' => {'value' => $log_udp_port}, + 'DEFAULT/log_max_line_length' => {'value' => $log_max_line_length}, # pipeline 'pipeline:main/pipeline' => {'value' => join($pipeline, ' ')}, # server diff --git a/releasenotes/notes/log_max_line_length-140039c59299e878.yaml b/releasenotes/notes/log_max_line_length-140039c59299e878.yaml new file mode 100644 index 00000000..c6394f7b --- /dev/null +++ b/releasenotes/notes/log_max_line_length-140039c59299e878.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``log_max_line_length`` parameter has been added. diff --git a/spec/classes/swift_containerreconciler_spec.rb b/spec/classes/swift_containerreconciler_spec.rb index 2e3af00e..5327b871 100644 --- a/spec/classes/swift_containerreconciler_spec.rb +++ b/spec/classes/swift_containerreconciler_spec.rb @@ -42,6 +42,8 @@ describe 'swift::containerreconciler' do 'container-reconciler/log_facility').with_value('LOG_LOCAL2') is_expected.to contain_swift_container_reconciler_config( 'container-reconciler/log_address').with_value('/dev/log') + is_expected.to contain_swift_container_reconciler_config( + 'container-reconciler/log_max_line_length').with_value('') is_expected.to contain_swift_container_reconciler_config( 'filter:cache/memcache_servers').with_value('127.0.0.1:11211') is_expected.to contain_swift_container_reconciler_config( diff --git a/spec/classes/swift_objectexpirer_spec.rb b/spec/classes/swift_objectexpirer_spec.rb index 94e69954..c1aeca83 100644 --- a/spec/classes/swift_objectexpirer_spec.rb +++ b/spec/classes/swift_objectexpirer_spec.rb @@ -46,6 +46,8 @@ describe 'swift::objectexpirer' do 'object-expirer/log_facility').with_value('LOG_LOCAL2') is_expected.to contain_swift_object_expirer_config( 'object-expirer/log_address').with_value('/dev/log') + is_expected.to contain_swift_object_expirer_config( + 'object-expirer/log_max_line_length').with_value('') is_expected.to contain_swift_object_expirer_config( 'filter:cache/memcache_servers').with_value('127.0.0.1:11211') is_expected.to contain_swift_object_expirer_config( diff --git a/spec/classes/swift_storage_driver_audit_spec.rb b/spec/classes/swift_storage_driver_audit_spec.rb index f0806c3a..d73571a0 100644 --- a/spec/classes/swift_storage_driver_audit_spec.rb +++ b/spec/classes/swift_storage_driver_audit_spec.rb @@ -16,6 +16,7 @@ describe 'swift::storage::drive_audit' do should contain_swift_drive_audit_config('drive-audit/log_facility').with_value('LOG_LOCAL2') should contain_swift_drive_audit_config('drive-audit/log_level').with_value('INFO') should contain_swift_drive_audit_config('drive-audit/log_address').with_value('/dev/log') + should contain_swift_drive_audit_config('drive-audit/log_max_line_length').with_value('') should contain_swift_drive_audit_config('drive-audit/log_udp_host').with_value('') should contain_swift_drive_audit_config('drive-audit/log_udp_port').with_value('') diff --git a/spec/defines/swift_storage_server_spec.rb b/spec/defines/swift_storage_server_spec.rb index 9a625f6c..7003eab1 100644 --- a/spec/defines/swift_storage_server_spec.rb +++ b/spec/defines/swift_storage_server_spec.rb @@ -83,6 +83,7 @@ describe 'swift::storage::server' do is_expected.to contain_swift_account_config('DEFAULT/log_address').with_value('/dev/log') is_expected.to contain_swift_account_config('DEFAULT/log_udp_host').with_value('') is_expected.to contain_swift_account_config('DEFAULT/log_udp_port').with_value('') + is_expected.to contain_swift_account_config('DEFAULT/log_max_line_length').with_value('') is_expected.to contain_swift_account_config('pipeline:main/pipeline').with_value('account-server') is_expected.to contain_swift_account_config('app:account-server/use').with_value('egg:swift#account') is_expected.to contain_swift_account_config('app:account-server/set log_name').with_value('account-server') @@ -273,6 +274,7 @@ describe 'swift::storage::server' do is_expected.to contain_swift_container_config('DEFAULT/log_address').with_value('/dev/log') is_expected.to contain_swift_container_config('DEFAULT/log_udp_host').with_value('') is_expected.to contain_swift_container_config('DEFAULT/log_udp_port').with_value('') + is_expected.to contain_swift_container_config('DEFAULT/log_max_line_length').with_value('') is_expected.to contain_swift_container_config('pipeline:main/pipeline').with_value('container-server') is_expected.to contain_swift_container_config('app:container-server/use').with_value('egg:swift#container') is_expected.to contain_swift_container_config('app:container-server/set log_name').with_value('container-server') @@ -468,6 +470,7 @@ describe 'swift::storage::server' do is_expected.to contain_swift_object_config('DEFAULT/log_address').with_value('/dev/log') is_expected.to contain_swift_object_config('DEFAULT/log_udp_host').with_value('') is_expected.to contain_swift_object_config('DEFAULT/log_udp_port').with_value('') + is_expected.to contain_swift_object_config('DEFAULT/log_max_line_length').with_value('') is_expected.to contain_swift_object_config('pipeline:main/pipeline').with_value('object-server') is_expected.to contain_swift_object_config('app:object-server/use').with_value('egg:swift#object') is_expected.to contain_swift_object_config('app:object-server/set log_name').with_value('object-server')