Uploaded image for project: 'HipChat'
  1. HipChat
  2. HCPUB-3031

Exports do not purge on HipChat Server 2.2.3 and newer

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Severity 2 - Major

    Description

      Summary

      Purging old exports never removes the encrypted export files from the filesystem

      Environment

      HipChat Server 2.2.3 and newer. HipChat Server 2.2.3 included a migration from Cumulus as an S3-like file system to local storage.

      Steps to Reproduce

      1. Run a purge of export data, for example:
        hipchat export --purge-older-than 5
        
      2. Purge appears to be deleting something:
        Deleted 1cf3f256-343d-492b-b5b7-bab765b6ade3
        Deleted 7149e804-534f-42f7-8562-0085b0dbd2d0
        Deleted 3231efe3-f13c-4d9f-a013-23664e286a84
        

      Actual Results

      Export files are not removed...searching for large export files that should have been deleted shows that they still exist on /file_store/local/1/1/, for example:

      find / -path /sys -prune -o -path /proc -prune -o -printf "%s - %p\n" 2>/dev/null | sort -n | tail -10
      1736136160 - /file_store/local/files/1/1/bWdRgd0lkpShEEj/hipchat-2017-04-21_17-05-03.tar.gz.aes
      1736312896 - /file_store/local/files/1/1/F3lGYnPkqgGKuJ0/hipchat-2017-04-23_17-05-03.tar.gz.aes
      1736315072 - /file_store/local/files/1/1/OlY9jOqzAYPgAyN/hipchat-2017-04-22_17-05-03.tar.gz.aes
      ....
      

      Expected Results

      Files should have been removed from the server.

      Workaround

      • Create a cron job that would delete the export archives older than three days manually:
        find /file_store/local/files -name 'hipchat-*.tar.gz.aes' -mtime +3 | xargs rm -v
        

        Be sure to refer to How to schedule a recurring job (cron job) to make the cron job persist over reboots and Chef runs.
        OR

      • Migrate to HipChat Data Center and backup your Postgres database as you wish.

      Attachments

        Issue Links

          Activity

            People

              rberrelleza Ramiro Berrelleza (Inactive)
              kbaxley Kent Baxley
              Archiver:
              mandreacchio Michael Andreacchio

              Dates

                Created:
                Updated:
                Resolved:
                Archived: