jquery / jquery/infrastructure-puppet

Avoid puppetserver failure after automatic JRE package updates

Open
#76 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Service: Puppet Type: Problem
Dominant language
Puppet
Stars
12
Forks
9
PR merge metrics
No merged PRs in 30d

Description

After a minor package update is released to Debian, puppetserver can sometimes get into a stuck state, which typically looks like this on the side of individual server clients:

krinkle@wp-03:~$ sudo run-puppet-agent
Info: Using environment 'staging'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error:
Exception while executing '/etc/puppet/code/environments/staging/bin/config-version.sh': Cannot run program 

The fix is simply to restart the puppet server:

krinkle@puppet-04:~$ sudo systemctl status puppetserver

Details about the root cause in the comments at https://github.com/jquery/infrastructure-puppet/commit/c08df0271ed84068ea50ff520bd2ac7a943961e4.

@supertassu wrote
At Wikimedia we disabled automatic JRE updates on Puppetservers for this exact reason. We could do that here, but I would prefer to avoid this option as our server is open to the internet. (I guess that'd be relatively trivial to fix, except figuring out how to provision new nodes.) The other option is to hook up some logic to automatically restart the puppetserver service when needed and figure out the systemd magic to run that after the automatic updates finish.

See also:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the puppetserver systemd service and the referenced modules/profile/manifests/puppetserver/wmcs.pp configuration, then review how Debian automatic package updates finish. Define and implement the restart behavior there, and verify with systemctl status puppetserver and a successful run-puppet-agent invocation after a JRE update.

Written by the indexing model from the issue text.

Assessment

Tech stack
debian, java, linux
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.