Warning
This document has not been updated for a while now. It may be out of date.
Last updated:
5 Apr 2022
Rollback Puppet if Jenkins is broken
Sometimes, a Puppet release may break Jenkins and since Jenkins is used to release Puppet, there is no straight forward way to rollback Puppet.
This procedure will rollback Puppet to a previous release so that Jenkins is restored:
- log into the Puppet master machine:
gds govuk connect ssh -e <govuk_environment> puppetmaster
- check the current active release by looking at the symbolic link of
/usr/share/puppet/production/current
:
sudo su
su deploy
ls -lh /usr/share/puppet/production/
- get a list of Puppet available releases on the Puppet master, they are in the format year/month/day/time:
ls /usr/share/puppet/production/releases
- link to another previous release using:
ln -sfn /usr/share/puppet/production/releases/<previous_release_number> /usr/share/puppet/production/current
- restart Puppet service (as root or your admin user):
service puppetserver restart
- log into the Jenkins server and re-run Puppet:
gds govuk connect ssh -e integration jenkins
govuk_puppet --test