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

Fix: Users reported errors with key family absent from entry #345

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

hoh
Copy link
Member

@hoh hoh commented Jun 28, 2023

The error message Debian 11:

python3[1910876]:     if not check_if_table_exists("ip", table):
python3[1910876]:   File "/opt/aleph-vm/vm_supervisor/network/firewall.py", line 91, in check_if_table_exists
python3[1910876]:     and entry["family"] == family
python3[1910876]: KeyError: 'family'

Solution: Use .get() instead of __getitem__

On Debian 11:

```
python3[1910876]:     if not check_if_table_exists("ip", table):
python3[1910876]:   File "/opt/aleph-vm/vm_supervisor/network/firewall.py", line 91, in check_if_table_exists
python3[1910876]:     and entry["family"] == family
python3[1910876]: KeyError: 'family'
```
@hoh hoh added the bug Something isn't working label Jun 28, 2023
@hoh hoh merged commit 8777a0a into release Jun 28, 2023
@Psycojoker Psycojoker deleted the hoh-fix-nftables-family branch July 24, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants