Resetting file sync
You'll need to reset the file sync service if file sync enters a failure state, if file sync consumes all available disk space, or a repository becomes irreparably corrupted.
Resetting the file sync service deletes the commit history for all repositories that file sync tracks. This frees up disk space and returns the service to a fresh state while preserving code in the staging directory.
- On your primary server:
- If you use Code Manager: Make sure the
code you want to deploy is present in the staging directory at
/etc/puppetlabs/code-staging
, and make sure that your most-recently deployed code is present in your control repository (so you can re-sync it). - If you use r10k: Trigger and r10k code deployment, and make sure your most-recently deployed code is present in your control repository (so you can re-sync it).
- If you use file sync by itself: Make sure the code you want to
deploy is present in the staging directory at
/etc/puppetlabs/code-staging
.
- If you use Code Manager: Make sure the
code you want to deploy is present in the staging directory at
- Stop the Puppet Server service by running:
puppet resource service pe-puppetserver ensure=stopped
- Delete the data directory located at:
/opt/puppetlabs/server/data/puppetserver/filesync/storage
- Restart the Puppet Server service by running:
puppet resource service pe-puppetserver ensure=running
- Take the appropriate action to redeploy your code:
- If you use Code Manager: Deploy your code to all environments by Triggering Code Manager on the command line.
- If you use r10k or standalone file sync: Perform a commit.
Results
When you reset the file sync service, it creates fresh repositories on each client and on the storage server for the code it manages.
When you reset the file sync service, it creates fresh repositories on each client and on the storage server for the code it manages.