-
Notifications
You must be signed in to change notification settings - Fork 345
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
T4930: Allow WireGuard peers via DNS hostname #4200
base: current
Are you sure you want to change the base?
Conversation
👍 |
Build package fails (based on CI)
|
Updated. My IDE was set python3.12, that syntax is acceptable in 3.12 but not in 3.11 XD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the WG_ENDPOINT_RESOLUTION_RETRIES
var block execution while waiting to resolve?
Sorry, I don't understand your question. WG_ENDPOINT_RESOLUTION_RETRIES is an environment variable use in
By default, BTW, the |
That's what I was concerned by, we want to avoid long boot/commit time because of DNS resolution not being available. |
Yes, that's why I set it to 5 and I still feel it costs too much time. How about 3x? Or 3x by default and let user can customize it in somewhere like |
|
Hi reviewers, Still need help:
|
The current design seems promising, we'll get back to you with comments about implementation if we find anything that we think we can improve. |
Hi @sskaje, thanks for the PR! I did a testdrive with this implementation and in general it works for me. Please also rebase your work on |
I'm trying to build and run tests, but I see Any Idea how I build and run tests? Revert code in T6746 or just update ============= Updated: I modified |
FRR 10.2 is part of the official VyOS repositories now. You do not need to build it on your own. You could grab a fresh build from e.g. https://github.com/vyos/vyos-nightly-build/actions/runs/12521976266/artifacts/2367044381 It contains some minor smoketest issues but would be fine for your development. If you're uncertain ant would rather NOT rebase that would work, too - we can rebase in the end after all changes got applied. |
@sskaje you can also force package installation and omit the FRR 10.2 dependency dpkg --install --force-all *.deb |
if 'peers_need_resolve' in wireguard and len(wireguard['peers_need_resolve']) > 0: | ||
text = f'# Automatically generated by interfaces_wireguard.py\nThis file indicates that vyos-domain-resolver service is used by the interfaces_wireguard.\n' | ||
text += "intefaces:\n" + "".join([f" - {peer}\n" for peer in wireguard['peers_need_resolve']]) | ||
Path(domain_resolver_usage).write_text(text) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use our common vyos.utils.file.write_file()
instead.
Other then that it formally looks good to me - waiting for some more reviewers for this piece of code and another real world test from me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dec 29 10:29:43 LR1.wue3 python3[2210]: Resetting wg1000 peer BMj7LgeZS1aoZRQ6rweeKpz+9+HdicT0F590f+7iDH4= endpoint to wg-dynamic.vyos.io:10000 ... done
Dec 29 10:29:43 LR1.wue3 python3[2210]: Wireguard: reset wg1000 peer BMj7LgeZS1aoZRQ6rweeKpz+9+HdicT0F590f+7iDH4=
Working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I perform this file writing change?
Bug: When moving from a FQDN address back to an IP address, vyos-domain-resolver is not stopped. |
I tested on my vm, when I move it back to ip address, the /run/use-vyos-domain-resolver-interfaces-wireguard-wgX is gone, and vyos-domain-resolver turn stopped here.
Can you please check if there is any other |
In you example vyos-domain-resolver is started again after you |
This branch has conflicts that must be resolved
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
T4930: print previous/current endpoint when resetting peer T4930: resolve code change requests T4930: Fix ConfigTreeQuery usages T4930: resolve code change requests T4930: make wireguard domain resolver run flag files separated by interface; code style T4930: Move dns resolution to vyos-domain-resolver T4930: make wg dns retry configurable through `interfaces wireguard wgX max-dns-retry` T4930: simplify reset-wireguard.xml.in T4930: code style changes for python 3.11 T4930: code style changes T4930: code style changes T4930: limit wg retry times by using environment variable T4930: Ensure peer is created even if dns not working T4930: Allow WireGuard peers via DNS hostname + new script resetting peer
Conflicts have been resolved. A maintainer will review the pull request shortly. |
CI integration 👍 passed! Details
|
Change Summary
T4930: Allow WireGuard peers via DNS hostname + new script resetting peer
T4930: Ensure peer is created even if dns not working
T4930: limit wg retry times by using environment variable
T4930: make wg dns retry configurable through interfaces wireguard wgX max-dns-retry
Types of changes
Related Task(s)
https://vyos.dev/T4930
Related PR(s)
Component(s) name
wireguard
Proposed changes
wg
retries for dns resolution no more than 5 times;reset wireguard
, if user want to usewg set
to force wireguard redo dns resolution;How to test
config mode
op mode
vyos without working dns
I've provided screenshots in task's comments.
configure max dns resolution retry times
Smoketest result
Checklist: