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

Deploy wgkex on workers in a venv #149

Merged
merged 1 commit into from
Jan 6, 2024

Conversation

DasSkelett
Copy link
Member

Long story short, we ran into a bug in an outdated Python dependency (pyroute2 0.5.9) installed through apt. (see below for precise exception)

Let's decouple the wgkex worker installation a bit, by installing it in a venv, and install the dependencies as specified in the requirements.txt, because those versions are the ones the wgkex CI tests against.
This will probably be especially important when we merge and deploy the wgkex loadbalancing PR.

We might want to consider splitting the requirements.txt for wgkex between broker and worker, so you don't have to install unneeded packages from the respective other; but this needs to be done over there.

Another suggestion was to build a static binary using Bazel and deploy that one, which we can also look into (but I'm currently fighting myself with Bazel to get it to run on newer systems with newer Python and Pip versions...), but for now I'm going with this.


2023-12-19 22:30:56,027,27 WARNING  [__init__.py:1489] decoding WGPEER_A_ENDPOINT
2023-12-19 22:30:56,028,28 WARNING  [__init__.py:1490] Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pyroute2/netlink/__init__.py", line 1486, in try_to_decode
    cell.decode()
  File "/usr/lib/python3/dist-packages/pyroute2/netlink/generic/wireguard.py", line 175, in decode
    self['addr'] = inet_ntoa(AF_INET6, self['addr6'])
TypeError: inet_ntoa() takes exactly 1 argument (2 given)
2023-12-19 22:30:56,036,36 WARNING  [__init__.py:1489] decoding WGPEER_A_ENDPOINT
2023-12-19 22:30:56,037,37 WARNING  [__init__.py:1490] Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pyroute2/netlink/__init__.py", line 1486, in try_to_decode
    cell.decode()
  File "/usr/lib/python3/dist-packages/pyroute2/netlink/generic/wireguard.py", line 175, in decode
    self['addr'] = inet_ntoa(AF_INET6, self['addr6'])
TypeError: inet_ntoa() takes exactly 1 argument (2 given)

(Fixed in svinota/pyroute2#882 and/or svinota/pyroute2@877435b)

@DasSkelett DasSkelett requested a review from a team as a code owner December 20, 2023 20:16
@DasSkelett DasSkelett merged commit f25a14e into freifunkMUC:main Jan 6, 2024
4 checks passed
@DasSkelett DasSkelett deleted the wgkex-venv branch January 6, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants