Skip to content
Snippets Groups Projects
Commit 478e5fe5 authored by Jason Young's avatar Jason Young
Browse files

Remove svlogd filter from consul configuration

Consul changed the log line format in version 1.7.0 - and at the same
time added in thresholds that made the logging less noisy. This
removes the svlogd filter that we added in !1946 as it is no longer
matching the log line, and is no longer necessary to suppress repeated
log entries.

Closes https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6589

Changelog: changed
parent 7263ff17
No related branches found
No related tags found
1 merge request!81Merged upstream 15.3.0+rc42.ce.0 into heptapod branch
...@@ -15,12 +15,8 @@ ...@@ -15,12 +15,8 @@
'SSL_CERT_DIR' => '/opt/gitlab/embedded/ssl/certs/' 'SSL_CERT_DIR' => '/opt/gitlab/embedded/ssl/certs/'
} }
# Critical state of service:postgresql indicates a node is not a master default['consul']['logging_filters'] = {}
# It does not need to be logged. Health status should be checked from
# the consul cluster.
default['consul']['logging_filters'] = {
postgresql_warning: "-*agent: Check 'service:postgresql' is now critical"
}
default['consul']['monitoring_service_discovery'] = false default['consul']['monitoring_service_discovery'] = false
default['consul']['encryption_key'] = nil default['consul']['encryption_key'] = nil
......
...@@ -118,6 +118,9 @@ ...@@ -118,6 +118,9 @@
group: 'bar', group: 'bar',
configuration: { configuration: {
log_json: true log_json: true
},
logging_filters: {
label: 'filter'
} }
} }
) )
...@@ -137,6 +140,12 @@ ...@@ -137,6 +140,12 @@
} }
end end
it 'renders log config with logging_filters keys/values as comments/values' do
expect(chef_run).to render_file('/opt/gitlab/sv/consul/log/config').with_content { |content|
expect(content).to match(%r{# label\nfilter})
}
end
it_behaves_like 'enabled runit service', 'consul', 'foo', 'bar', 'foo', 'bar' it_behaves_like 'enabled runit service', 'consul', 'foo', 'bar', 'foo', 'bar'
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment