nusenu / ansible-relayor

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

Deploy failed at systemd service start with "code=exited, status=226/NAMESPACE" on Debian 10 (LXD) #211

Closed br-olf closed 3 years ago

br-olf commented 4 years ago

Describe the bug During the deployment of nusenu.relayor ansible fails to start the systemd services for the tor relays. The services show this Error:

* tor@10.128.0.214_9100.service - Anonymizing overlay network for TCP (instance 10.128.0.214_9100)
   Loaded: loaded (/etc/systemd/system/tor@10.128.0.214_9100.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2020-09-28 12:55:04 CEST; 58s ago
  Process: 23208 ExecStartPre=/usr/bin/install -Z -m 02755 -o _tor-10.128.0.214_9100 -g _tor-10.128.0.214_9100 -d /run/tor-instances/10.128.0.214_9100 (code=exited, status=226/NAMESPACE)

Sep 28 12:55:04 tor systemd[1]: Failed to start Anonymizing overlay network for TCP (instance 10.128.0.214_9100).
Sep 28 12:55:04 tor systemd[1]: tor@10.128.0.214_9100.service: Service RestartSec=100ms expired, scheduling restart.
Sep 28 12:55:04 tor systemd[1]: tor@10.128.0.214_9100.service: Scheduled restart job, restart counter is at 5.
Sep 28 12:55:04 tor systemd[1]: Stopped Anonymizing overlay network for TCP (instance 10.128.0.214_9100).
Sep 28 12:55:04 tor systemd[1]: tor@10.128.0.214_9100.service: Start request repeated too quickly.
Sep 28 12:55:04 tor systemd[1]: tor@10.128.0.214_9100.service: Failed with result 'exit-code'.
Sep 28 12:55:04 tor systemd[1]: Failed to start Anonymizing overlay network for TCP (instance 10.128.0.214_9100).
root@tor:~# systemctl status tor@10.128.0.214_9000.service
* tor@10.128.0.214_9000.service - Anonymizing overlay network for TCP (instance 10.128.0.214_9000)
   Loaded: loaded (/lib/systemd/system/tor@.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2020-09-28 13:10:03 CEST; 14min ago
  Process: 24829 ExecStartPre=/usr/bin/install -Z -m 02755 -o _tor-10.128.0.214_9000 -g _tor-10.128.0.214_9000 -d /run/tor-instances/10.128.0.214_9000 (code=exited, status=226/NAMESPACE)

Sep 28 13:10:03 tor systemd[1]: tor@10.128.0.214_9000.service: Control process exited, code=exited, status=226/NAMESPACE
Sep 28 13:10:03 tor systemd[1]: tor@10.128.0.214_9000.service: Failed with result 'exit-code'.
Sep 28 13:10:03 tor systemd[1]: Failed to start Anonymizing overlay network for TCP (instance 10.128.0.214_9000).
Sep 28 13:10:03 tor systemd[1]: tor@10.128.0.214_9000.service: Service RestartSec=100ms expired, scheduling restart.
Sep 28 13:10:03 tor systemd[1]: tor@10.128.0.214_9000.service: Scheduled restart job, restart counter is at 5.
Sep 28 13:10:03 tor systemd[1]: Stopped Anonymizing overlay network for TCP (instance 10.128.0.214_9000).
Sep 28 13:10:03 tor systemd[1]: tor@10.128.0.214_9000.service: Start request repeated too quickly.
Sep 28 13:10:03 tor systemd[1]: tor@10.128.0.214_9000.service: Failed with result 'exit-code'.
Sep 28 13:10:03 tor systemd[1]: Failed to start Anonymizing overlay network for TCP (instance 10.128.0.214_9000).

To Reproduce

  1. Setup a Debian 10 (buster) LXD Container.
  2. Deploy the playbook in Playbook information.

Expected behavior

Version information (please include the following information):

Playbook information

---
- name: deploy tor server
  hosts: tor
  user: root
  gather_facts: no

  vars:
    tor_ContactInfo: xxxxxXXXxxxxx
    tor_signingkeylifetime_days: 90
    tor_nickname: xxxxx
    tor_IPv6: false

  tasks:
    - name: install gpg
      apt:
        name: gnupg
        state: present

  roles:
    - nusenu.relayor

OS information

Debug information Please add the output of your ansible-playbook run using "-vvv".

nusenu commented 4 years ago

Hi, thanks for your report.

I fear this is specific to LXD since I haven't seen anyone using this role with containers.

Can you reproduce this on a Debian 10 VM as well?

br-olf commented 4 years ago

I tried it on the VM and couldn't reproduce the issue.

nusenu commented 3 years ago

this role is meant to be used with VM or on bare metal, closing.