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

[QA] Problems running securedrop_init handler via tailsconfig #3337

Closed
conorsch opened this issue May 1, 2018 · 2 comments
Closed

[QA] Problems running securedrop_init handler via tailsconfig #3337

conorsch opened this issue May 1, 2018 · 2 comments
Milestone

Comments

@conorsch
Copy link
Contributor

conorsch commented May 1, 2018

Bug

Description

Recently failed to run the network hook via handler as part of ./securedrop-admin tailsconfig.

Steps to Reproduce

Admittedly I haven't actually reproduced it yet, but here's the procedure:

  1. Fire up Admin Workstation to provision prod VMs.
  2. Ensure HTTPS is enabled via sdconfig.
  3. Provision prod VMs via install.
  4. After successful reboot at end of install flow, run ./securedrop-admin tailsconfig.
  5. Observe error on handler to run the securedrop_init.py script.

Expected Behavior

Handler fires without issue.

Actual Behavior

Handler raises an error.

Error output from Ansible
RUNNING HANDLER [tails-config : run securedrop network hook] ***************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["/usr/bin/python", "/home/amnesia/Persistent/.securedrop/securedrop_init.py"], "delta": "0:00:06.858216", "end": "2018-05-01 21:08:06.529290", "msg": "non-zero return code", "rc": 1, "start": "2018-05-01 21:07:59.671074", "stderr": "Cannot parse integer value 'If' for --expire-time\nFrom https://github.com/freedomofpress/securedrop\n * [new branch]        3329-test-gzip-mtime -> origin/3329-test-gzip-mtime\n * [new branch]        ask_all_three        -> origin/ask_all_three\n * [new branch]        backport-3332-0.7.0  -> origin/backport-3332-0.7.0\n   095d08a2..cfaa82e7  develop              -> origin/develop\n(True, '0.6')\nTraceback (most recent call last):\n  File \"/home/amnesia/Persistent/.securedrop/securedrop_init.py\", line 109, in <module>\n  File \"/usr/lib/python2.7/subprocess.py\", line 219, in check_output\n    raise CalledProcessError(retcode, cmd, output=output)\nsubprocess.CalledProcessError: Command '['/home/amnesia/Persistent/securedrop/admin/.venv/bin/python', '/home/amnesia/Persistent/securedrop/admin/securedrop_admin/__init__.py', '--root', '/home/amnesia/Persistent/securedrop', 'check_for_updates']' returned non-zero exit status 1", "stderr_lines": ["Cannot parse integer value 'If' for --expire-time", "From https://github.com/freedomofpress/securedrop", " * [new branch]        3329-test-gzip-mtime -> origin/3329-test-gzip-mtime", " * [new branch]        ask_all_three        -> origin/ask_all_three", " * [new branch]        backport-3332-0.7.0  -> origin/backport-3332-0.7.0", "   095d08a2..cfaa82e7  develop              -> origin/develop", "(True, '0.6')", "Traceback (most recent call last):", "  File \"/home/amnesia/Persistent/.securedrop/securedrop_init.py\", line 109, in <module>", "  File \"/usr/lib/python2.7/subprocess.py\", line 219, in check_output", "    raise CalledProcessError(retcode, cmd, output=output)", "subprocess.CalledProcessError: Command '['/home/amnesia/Persistent/securedrop/admin/.venv/bin/python', '/home/amnesia/Persistent/securedrop/admin/securedrop_admin/__init__.py', '--root', '/home/amnesia/Persistent/securedrop', 'check_for_updates']' returned non-zero exit status 1"], "stdout": "", "stdout_lines": []}
Error output from manual invocation
amnesia@amnesia:~/Persistent/securedrop/install_files/ansible-base$ sudo !!
sudo python /home/amnesia/Persistent/.securedrop/securedrop_init.py
[sudo] password for amnesia: 
Cannot parse integer value 'If' for --expire-time
(True, '0.6')
Traceback (most recent call last):
  File "/home/amnesia/Persistent/.securedrop/securedrop_init.py", line 109, in <module>
  File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/home/amnesia/Persistent/securedrop/admin/.venv/bin/python', '/home/amnesia/Persistent/securedrop/admin/securedrop_admin/__init__.py', '--root', '/home/amnesia/Persistent/securedrop', 'check_for_updates']' returned non-zero exit status 1

Was working on #3299 when this happened, so I could have broken something. I'm able to see the error when running from release/0.7, as well.

@redshiftzero
Copy link
Contributor

It's possible that a regression snuck in with #3327

@redshiftzero
Copy link
Contributor

See #3341 for ticket on improving testing in the future to catch regressions like the above

redshiftzero added a commit that referenced this issue May 1, 2018
Fixes #3337 uses exit code 0 for check_for_updates
redshiftzero pushed a commit that referenced this issue May 1, 2018
@emkll emkll mentioned this issue May 2, 2018
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants