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

[xenial] Handle import_ok exception during upgrade #4108

Closed
redshiftzero opened this issue Feb 7, 2019 · 0 comments
Closed

[xenial] Handle import_ok exception during upgrade #4108

redshiftzero opened this issue Feb 7, 2019 · 0 comments
Labels
Milestone

Comments

@redshiftzero
Copy link
Contributor

redshiftzero commented Feb 7, 2019

Description

After upgrade to xenial, a one-time unhandled exception (about a successful gpg key import) occurs in a thread the first time gpg decryption occurs on the application server. This was found by @emkll during review of #4094. It does not cause an OSSEC alert or a regression in functionality, but we should see if we can handle it regardless.

Part of #3204.

Steps to Reproduce

  1. Provision staging VMs
  2. Submit a document as a source
  3. Upgrade to xenial via sudo do-release-upgrade (some nice steps thanks to @zenmonkeykstop here)
  4. make build-debs-xenial
  5. scp the securedrop-app-code deb into app-staging and install it
  6. Submit another document as a source

Expected Behavior

No tracebacks appear in /var/log/apache2/source-error.log

Actual Behavior

[Tue Feb 05 21:18:53.367308 2019] [wsgi:error] [pid 4478:tid 3513516791552] Exception in thread Thread-10:
[Tue Feb 05 21:18:53.367335 2019] [wsgi:error] [pid 4478:tid 3513516791552] Traceback (most recent call last):
[Tue Feb 05 21:18:53.367340 2019] [wsgi:error] [pid 4478:tid 3513516791552]   File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
[Tue Feb 05 21:18:53.367351 2019] [wsgi:error] [pid 4478:tid 3513516791552]     self.run()
[Tue Feb 05 21:18:53.367355 2019] [wsgi:error] [pid 4478:tid 3513516791552]   File "/usr/lib/python2.7/threading.py", line 754, in run
[Tue Feb 05 21:18:53.367358 2019] [wsgi:error] [pid 4478:tid 3513516791552]     self.__target(*self.__args, **self.__kwargs)
[Tue Feb 05 21:18:53.367361 2019] [wsgi:error] [pid 4478:tid 3513516791552]   File "/usr/local/lib/python2.7/dist-packages/pretty_bad_protocol/_meta.py", line 670, in _read_response
[Tue Feb 05 21:18:53.367365 2019] [wsgi:error] [pid 4478:tid 3513516791552]     result._handle_status(keyword, value)
[Tue Feb 05 21:18:53.367368 2019] [wsgi:error] [pid 4478:tid 3513516791552]   File "/usr/local/lib/python2.7/dist-packages/pretty_bad_protocol/_parsers.py", line 995, in _handle_status
[Tue Feb 05 21:18:53.367371 2019] [wsgi:error] [pid 4478:tid 3513516791552]     raise ValueError("Unknown status message: %r" % key)
[Tue Feb 05 21:18:53.367374 2019] [wsgi:error] [pid 4478:tid 3513516791552] ValueError: Unknown status message: u'IMPORT_OK'
[Tue Feb 05 21:18:53.367379 2019] [wsgi:error] [pid 4478:tid 3513516791552] 

Comments

See my comments here.

@redshiftzero redshiftzero added this to the 0.12.0 milestone Feb 7, 2019
@eloquence eloquence changed the title [xenial] handle import_ok exception during upgrade [xenial] Handle import_ok exception during upgrade Feb 7, 2019
kushaldas added a commit that referenced this issue Feb 18, 2019
--batch flag helps to import the gpg keys into gpg2 format
without having the passphrase.
@kushaldas kushaldas mentioned this issue Feb 18, 2019
13 tasks
emkll pushed a commit that referenced this issue Feb 18, 2019
--batch flag helps to import the gpg keys into gpg2 format
without having the passphrase.

(cherry picked from commit 71ac0eb)
kushaldas added a commit that referenced this issue Sep 25, 2019
--batch flag helps to import the gpg keys into gpg2 format
without having the passphrase.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant