nusenu / ansible-relayor

An Ansible Role for Tor Relay Operators
GNU General Public License v3.0
248 stars 43 forks source link

Key generation breaks on Whonix Workstation 16 (Control Machine) #229

Closed jcoscia closed 2 years ago

jcoscia commented 2 years ago

Describe the bug When the playbook is run on Whonix Workstation 16, the Ensure all relay keys exist (LOCAL) task stalls forever.

This is likely because /usr/bin/tor and /usr/sbin/tor are symlinked to a shell script that sleeps forever. The actual tor lives at /usr/bin/tor.anondist-orig This is a Whonix quirk more than a Relayor bug, but it would be nice to automatically detect this and use the correct tor.

Relayor works as expected when /usr/bin/tor is replaced with the tor binary.

To Reproduce Use Whonix Workstation 16 as a control machine, and run a valid playbook to deploy a new relay.

Expected behavior Relayor generates keys for a new relay, and continues running the playbook.

Version information (please include the following information):

Playbook information

OS information Target: Debian 11 Control Machine: Whonix Workstation 16 (based on Debian 11.2)

Debug information

[snipped]

TASK [nusenu.relayor : Ensure all relay keys exist (LOCAL)] **** task path: /home/user/ansible/roles/nusenu.relayor/tasks/configure.yml:16 Using module file /usr/lib/python3/dist-packages/ansible/modules/command.py Pipelining is enabled. <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: user <127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 && sleep 0'

nusenu commented 2 years ago

Thanks for bringing this up.

Can you test the master branch with this setting on Whonix:

tor_binary: tor.anondist-orig

jcoscia commented 2 years ago

It works correctly with the new tor_binary var set, thank you!