Skip to content

Commit ae215fc

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 <hi@taavi.wtf>
1 parent c8922d9 commit ae215fc

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

modules/profile/manifests/puppet/server.pp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,29 @@
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 the apt.conf key so that we append to, instead of
28+
# replace values that other files may set.
29+
# https://linux.die.net/man/5/apt.conf
30+
content => 'Unattended-Upgrade::Package-Blacklist:: "openjdk-";',
31+
}
32+
1033
stdlib::ensure_packages([
1134
'rsync',
1235
])

0 commit comments

Comments
 (0)