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.

  1. 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.
  2. Stop the Puppet Server service by running:
    puppet resource service pe-puppetserver ensure=stopped
  3. Delete the data directory located at:
    /opt/puppetlabs/server/data/puppetserver/filesync/storage
  4. Restart the Puppet Server service by running:
    puppet resource service pe-puppetserver ensure=running
  5. Take the appropriate action to redeploy your code:
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.