Skip to content
anastasiamac edited this page Jul 26, 2016 · 1 revision

mgopurge is tool which help recover Juju deployments affected by transaction related database corruption. It started as a thin wrapper around mgo/txn's PurgeMissing function but has recently grown the ability to fix a number of problems which we've seen in the field.

The specific problems addressed are:

  • runaway transactions on the apiHostPorts document (seen at a recent customer outage)
  • references to transactions in txn-queue fields on documents which don't exist in the txns collection (this is what PurgeMissing does)
  • huge txn-queue lists on machine documents referencing already completed transactions (due to a bad interaction between mgo/txn and historic Juju versions)
  • build up of large amounts of historic transaction data
  • excess disk space used by Juju's MongoDB instances which is never returned to the operating system

Please note that mgopurge must be used with care. Casual use is strongly discouraged. If you are unsure whether mgopurge will help in a given situation or if you're unsure of how to use it, please ask a Juju core developer.

As of today, the mgopurge can now be found at: https://github.com/juju/mgopurge. The old repo at https://github.com/mjs/mgopurge now points there.

Clone this wiki locally