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

Files associated with deleted sources not deleted in dev env #4328

Closed
eloquence opened this issue Apr 9, 2019 · 0 comments · Fixed by #4392
Closed

Files associated with deleted sources not deleted in dev env #4328

eloquence opened this issue Apr 9, 2019 · 0 comments · Fixed by #4392

Comments

@eloquence
Copy link
Member

Description

In the development environment, if you delete a source (as a collection, or individual submissions), the associated files are never deleted from /var/lib/securedrop/store.

Steps to Reproduce

  1. Run Docker dev env with make dev in securedrop directory;
  2. Submit a document or message via the Source Interface at localhost:8080
  3. Delete the source via the Journalist Interface at localhost:8081

Expected Behavior

Source metadata and all associated files in /var/lib/securedrop/store are deleted.

Actual Behavior

Source metadata appears to be deleted; files in /var/lib/securedrop/store are not. redis-cli monitor shows the job being enqueued, but it is never picked up.

Logs also show a GPG-related exception when deleting a source, which is tracked as #4294.

Comments

@kushaldas and I have been unable to replicate this bug in a staging environment (Kushal tested with the pyy3 branch, I tested with develop); it appears to be dev env only.

rmol added a commit to rmol/securedrop that referenced this issue Apr 29, 2019
To ensure asynchronous processes like submission deletion and hashing
happen in dev containers, run supervisord and our rq worker.

This adds a "run_supervisor" function in dev-deps that creates a
supervisor config under /tmp (which just runs the rq worker), and
starts supervisor.

That function is now invoked in securedrop/bin/run.

The Dockerfiles now install supervisor via pip or pip3.

Fixes freedomofpress#4328.
kushaldas pushed a commit that referenced this issue Sep 25, 2019
To ensure asynchronous processes like submission deletion and hashing
happen in dev containers, run supervisord and our rq worker.

This adds a "run_supervisor" function in dev-deps that creates a
supervisor config under /tmp (which just runs the rq worker), and
starts supervisor.

That function is now invoked in securedrop/bin/run.

The Dockerfiles now install supervisor via pip or pip3.

Fixes #4328.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant