Skip to content

Commit 54b72e3

Browse files
Krinklesupertassu
andcommitted
puppetserver: Disable automatic JRE updates
Follows-up bb98142, which added a firewall to the puppetserver so that running an outdated Java version is less of an issue. Based on https://gerrit.wikimedia.org/r/c/operations/puppet/+/1140572 and https://gerrit.wikimedia.org/r/c/operations/puppet/+/1137224 which addresses the same issue at Wikimedia. Ref #76. Co-authored-by: Taavi Väänänen <[email protected]>
1 parent c8922d9 commit 54b72e3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

modules/profile/manifests/puppet/server.pp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,28 @@
77
) {
88
include profile::puppet::common
99

10+
# Prevent automatic Java updates, as this breaks Puppet until someone we
11+
# manually restart the server with `sudo systemctl restart puppetserver`
12+
#
13+
# Example `run-puppet-agent` output:
14+
# > Error 500 on SERVER: Server Error:
15+
# > Exception while executing '/etc/puppet/code/environments/production/bin/config-version.sh':
16+
# > Cannot run program (in directory "."): Failed to exec spawn helper
17+
#
18+
# Example `systemctl status puppetserver` output:
19+
# > java: Incorrect Java version: 17.0.X
20+
# > java: jspawnhelper version 17.0.Y
21+
# > java: This command is not for general use and should only be run as the result of
22+
# > java: ProcessBuilder.start() or Runtime.exec() in a java application
23+
#
24+
# https://github.com/jquery/infrastructure-puppet/issues/76
25+
apt::conf { 'unattended-upgrades-exclude-java':
26+
priority => 60,
27+
# Use trailing '::' in apt.conf key, to append to potentially entries in other files
28+
# https://linux.die.net/man/5/apt.conf
29+
content => 'Unattended-Upgrade::Package-Blacklist:: "openjdk-";',
30+
}
31+
1032
stdlib::ensure_packages([
1133
'rsync',
1234
])

0 commit comments

Comments
 (0)