Skip to content
Shea Craig edited this page Feb 13, 2019 · 4 revisions

Care and Feeding for Sal

Periodically, Sal will perform maintenance tasks in the background to minimize stale or dead data. Some maintenance tasks, however, must be manually initiated. This page describes both.

Periodic Maintenance

Sal uses supervisord to schedule ongoing maintenance tasks. You can configure a custom frequency for these tasks with the environment variable MAINT_FREQUENCY (default is 300 seconds).

Periodic maintenance consists of:

  • Search maintenance:
    • Clearing searches older than 30 days old.
    • Clearing SearchFieldCache objects.
    • Rebuilding Fact caches for searching.
  • Server maintenance
    • Deleting inactive/undeployed Machine records (if you have that setting configured).
    • Deleting outdated (based on historical_retention) PluginScriptSubmissions.
    • Deleting outdated (based on historical_retention) UpdateHistorys and UpdateHistoryItems.
    • Deleting outdated (based on historical_retention) HistoricalFacts.

Manual Maintenance

At times, you may want to run some manual maintenance tasks. To do so, you need to shell into the docker container and run ./manage.py <name of task>. (If you run just manage.py you'll get a list of available management commands, most of which are provided by Django).

  • application_maintenance: Deletes Application objects which have no installs within your current machine pool from the application inventory system. This can't be automated because it's possible that it interferes with machine checkins / inventory submissions.
Clone this wiki locally