Skip to content

Commit f15584a

Browse files
(SIMP-10410) Reduce journal noise (#13)
- Set the journald LogLevelMax to warning for instances to reduce unnecessary log noise SIMP-10410 #close
1 parent 995ca9c commit f15584a

File tree

7 files changed

+59
-8
lines changed

7 files changed

+59
-8
lines changed

.fixtures.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ fixtures:
1414
repo: https://github.com/simp/pupmod-voxpupuli-selinux.git
1515
branch: simp-master
1616
selinux: https://github.com/simp/pupmod-simp-selinux.git
17+
systemd: https://github.com/simp/puppet-systemd.git
1718

1819
# Testing
1920
auditd: https://github.com/simp/pupmod-simp-auditd.git

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
* Tue Aug 03 2021 Trevor Vaughan <tvaughan@onyxoint.com> - 0.1.1
22
- Fixed
33
- Ensure that dirsrv.target is enabled so that all 389ds instances start at boot
4+
- Set the journald LogLevelMax to warning for instances to reduce unnecessary
5+
log noise
46

57
* Tue Jun 15 2021 Trevor Vaughan <tvaughan@onyxpoint.com> - 0.1.0
68
- Initial release

manifests/instance/service.pp

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,28 @@
66
Enum['stopped','running'] $ensure = simplib::dlookup('ds389::instance::service', 'ensure', $name, { 'default_value' => 'running'}),
77
Boolean $enable = simplib::dlookup('ds389::instance::service', 'enable', $name, { 'default_value' => true}),
88
Boolean $hasrestart = simplib::dlookup('ds389::instance::service', 'hasrestart', $name, { 'default_value' => true})
9-
) {
9+
){
1010
assert_private()
1111

1212
$_instance_name = split($title, /^(dirsrv@)?slapd-/)[-1]
1313

1414
# Ensure that services start at boot time
1515
ensure_resource('service', 'dirsrv.target', { enable => true })
1616

17-
ensure_resource('service', "dirsrv@${_instance_name}",
18-
{
19-
ensure => $ensure,
20-
enable => $enable,
21-
hasrestart => $hasrestart
22-
}
23-
)
17+
$_loglevel_override = @(OVERRIDE)
18+
[Service]
19+
LogLevelMax=warning
20+
| OVERRIDE
21+
22+
ensure_resource('systemd::dropin_file', "00_dirsrv_${_instance_name}_loglevel.conf", {
23+
unit => "dirsrv@${_instance_name}.service",
24+
content => $_loglevel_override
25+
})
26+
27+
ensure_resource('service', "dirsrv@${_instance_name}", {
28+
ensure => $ensure,
29+
enable => $enable,
30+
hasrestart => $hasrestart,
31+
require => Systemd::Dropin_file["00_dirsrv_${_instance_name}_loglevel.conf"]
32+
})
2433
}

metadata.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"project_page": "https://github.com/simp/pupmod-simp-ds389",
99
"issues_url": "https://simp-project.atlassian.net",
1010
"dependencies": [
11+
{
12+
"name": "camptocamp/systemd",
13+
"version_requirement": ">= 2.7.0 < 3.0.0"
14+
},
1115
{
1216
"name": "simp/simplib",
1317
"version_requirement": ">= 4.4.1 < 5.0.0"

spec/acceptance/nodesets/default.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,15 @@ CONFIG:
3333
<% if ENV['BEAKER_PUPPET_ENVIRONMENT'] -%>
3434
puppet_environment: <%= ENV['BEAKER_PUPPET_ENVIRONMENT'] %>
3535
<% end -%>
36+
ssh:
37+
keepalive: true
38+
keepalive_interval: 10
39+
keepalive_maxcount: 120
40+
host_key:
41+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:host_key].join("\n#{' '*6}- ") %>
42+
kex:
43+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:kex].join("\n#{' '*6}- ") %>
44+
encryption:
45+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:encryption].join("\n#{' '*6}- ") %>
46+
hmac:
47+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:hmac].join("\n#{' '*6}- ") %>

spec/acceptance/nodesets/docker.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,14 @@ CONFIG:
2626
password: root
2727
auth_methods:
2828
- password
29+
keepalive: true
30+
keepalive_interval: 10
31+
keepalive_maxcount: 120
32+
host_key:
33+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:host_key].join("\n#{' '*6}- ") %>
34+
kex:
35+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:kex].join("\n#{' '*6}- ") %>
36+
encryption:
37+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:encryption].join("\n#{' '*6}- ") %>
38+
hmac:
39+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:hmac].join("\n#{' '*6}- ") %>

spec/acceptance/nodesets/oel.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,15 @@ CONFIG:
3434
<% if ENV['BEAKER_PUPPET_ENVIRONMENT'] -%>
3535
puppet_environment: <%= ENV['BEAKER_PUPPET_ENVIRONMENT'] %>
3636
<% end -%>
37+
ssh:
38+
keepalive: true
39+
keepalive_interval: 10
40+
keepalive_maxcount: 120
41+
host_key:
42+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:host_key].join("\n#{' '*6}- ") %>
43+
kex:
44+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:kex].join("\n#{' '*6}- ") %>
45+
encryption:
46+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:encryption].join("\n#{' '*6}- ") %>
47+
hmac:
48+
- <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:hmac].join("\n#{' '*6}- ") %>

0 commit comments

Comments
 (0)