Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workaround docs for MemoryError during backup #4330

Merged
merged 1 commit into from
Apr 10, 2019
Merged

Conversation

eloquence
Copy link
Member

Time-sensitive due to Xenial updates in progress.

This will be resolved with #4326 in 0.12.1, though we may want to
keep some version of this documentation around in case people
still encounter issues during the playbook run.

Credit to @rmol for authoring the rsync command used here, which
has been used during real-world upgrades.

Status

Ready for review

Checklist

  • Doc linting (make docs-lint) passed locally

heartsucker
heartsucker previously approved these changes Apr 10, 2019
Copy link
Contributor

@heartsucker heartsucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I haven't tested this command. Someone else may want to verify before merging.

@@ -0,0 +1,19 @@
.. note::
When dealing with larger backups, the ``securedrop-admin backup`` command may
fail with a MemoryError at this stage of the operation: "Fetch the backup
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Backticks around "MemoryError" would be more consistent with existing style.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed. :)

Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Followed @rmol 's excellent instructions from #4326 (comment)

  • created a file in /var/lib/securedrop/store
  • observe failure when performing ./securedrop-admin backup:
TASK [backup : Fetch the backup tarball back to the Admin Workstation.] ********
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: MemoryError
  • followed workaround instructions and confirmed the backup is copied and the file is present in the backup (however there might be a mistake in the destination directory?)


.. code:: bash

rsync -av --progress --partial app:$(ssh app ls -1rt /tmp/sd-backup* | tail -1) install_files/ansible_base/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason why it's ansible_base? Backups are normally install_files/ansible-base

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a typo that I didn't catch. It should be ansible-base.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah good catch, I'm guessing that's a hyphen/underscore typo in the original command

Copy link
Contributor

@rmol rmol Apr 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is. You transcribed it accurately.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We didn't catch it during the upgrade because we ended up using rsync to transfer the backup back to the app server.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Fixed.)

Time-sensitive due to Xenial updates in progress.

This will be resolved with #4326 in 0.12.1, though we may want to
keep some version of this documentation around in case people
still encounter issues during the playbook run.

Credit to @rmol for authoring the rsync command used here, which
has been used during real-world upgrades.
Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good to merge when CI passes

@emkll emkll merged commit 5c28415 into develop Apr 10, 2019
@emkll emkll deleted the docs-backup-error branch April 10, 2019 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants