-
Notifications
You must be signed in to change notification settings - Fork 71
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
Template rewrite #55
Template rewrite #55
Conversation
Hi @whiskerz007, I will add a new CI pipeline in the next few days. Then we can release test builds based on your work for all supported devices. |
While looking at |
IMO the monolithic scripts provide better readability than the Vyatta templates and reduce code duplication so I would keep it the way you wrote this. @Lochnair Do you have some input on this? You were the one to suggest the external scripts so I would think this is what you were thinking about? @whiskerz007 It would be great if you could pull in the changes from the current master to run the new CI for this PR. |
@whiskerz007 Thanks for taking the time to work on this =) @FossoresLP Yes something like this is what I had in mind. I've only skimmed over the scripts, but they generally look good to me. I'd be curious to try a build with this whenever you've figured out the CI. |
@FossoresLP Thanks! Gave it a spin on the ERL I use at home. Upgraded and rebooted. Seems fine so far. Checked out the commit log and found this: [ interfaces wireguard wg0 route-allowed-ips false ]
Error: argument "dev" is wrong: "protocol" value is invalid Didn't find anything that seemed obvious to me that would cause that error. |
Kept it running on my box, and somehow managed to break it while reconfiguring the tunnel. Added a new IP address so the config looked like:
Tried to remove one of them: $ delete interfaces wireguard wg0 address 192.168.10.1/30
$ commit
[ interfaces wireguard wg0 address 123.123.123.123/32 ]
RTNETLINK answers: File exists
Commit failed Trying to commit again gives: [ interfaces wireguard wg0 address 192.168.10.1/30 ]
RTNETLINK answers: Cannot assign requested address
Commit failed Current state:
|
Any advise on how to resolve the conflicts would be greatly appreciated. I believe the merge is where it diverged. |
@whiskerz007 Generally you'll want to use a rebase instead of a merge commit when working on a feature branch, so you don't end up with a cluttered history (and conflicts). |
@whiskerz007 You don't have to worry about it, I can pull in the commits manually (instead of merging the PR). |
@FossoresLP I just pushed a new commit for the script to only grab the latest released version by default. You are able to use the same script to install pre-release versions. |
@Lochnair Have you tried the latest commit to this PR? Have you discovered any other problems? |
The changes are now finally available as a pre-release. |
@whiskerz007 Could you please take a look at #63? |
@FossoresLP I've corrected the problem with having the description set on the interface. Should be safe to pull into template-rewrite. |
Yes, commit looks good. I'll do another pre-release as soon as I can. |
@whiskerz007 Pre-release is out now. I'm not quite sure what the best way to get some testers is but I might try the UBNT forums thread. |
The re-write3 code seems to work well on an ER-X that I use for testing. Descriptions present on the peers. |
@FossoresLP Just deployed this on my new EdgeRouter 6P. Seems to work well with a peer in AWS Lightsail. Just have to work on getting routing thru the tunnel. Thanks so much to the team for the effort to develop WG for EdgeOS. I am new to this project. Let me know if I can do any specific testing that would help. |
Thanks @FossoresLP @whiskerz007 Deployed on a Gateway Pro 4 without any dramas at present. Out of curiosity, will this have any effect on the issues raised by @jollyjinx with his scripts here. When I added the info to the README regarding configuration persistence on the USG3/4 Pro I have to admit I didn't realise this was an issue, but have now run into it a bunch of times (can't provision if a link is up - completely borks). Happy to start a new PR to try an incorporate @jollyjinx ideas as effectively, the README info for USG3/4 persistence is wrong. |
@dcava The changes in this PR should correct the problem with deleting the WireGuard node in the configuration. There is another script you can try to use to update WireGuard periodically and maintain WireGuard through firmware upgrades. I do not have any of the UniFi gateways to test with, however I do believe others have had success with using it. The maintainer would gladly accept assistance with testing and documenting the process for the UniFi gear so others can benefit as well. |
@whiskerz007 Thanks - your script works nicely! Very elegant. The main issue on the USG3/UGW4 side is provision failure (not so much a persistence failure - a catastrophic failure to actually boot the device) as the config has to be stored on the controller in the config.gateway.json - it's much more cludgy then the Edge hardware. I've actually been locked out of 2 devices and had to physically connect to the controller and delete the config.gateway.json file to allow a reboot. With this release (rewrite-3) provision does not fail (I've tried on a USG3 and Pro 4 now) and it has also now survived a UGW4 pro upgrade, so the work-arounds from @jollyjinx don't appear necessary, and the config can continue to be stored in config.gateway.json. I'll keep testing - but so far, happy days. |
Re-write 4 seems to be working well on an ER-x. I will install on the house border router (ER4) and test in the next few days. |
The PR is now merged into master. After some additional testing there will be a new release with these changes as well as the new WireGuard tools. |
Wonderful news! Congratulations to you both (@whiskerz007 @FossoresLP ) on a job well done. |
Changes are now in master. Closing since everything is merged. |
Upgrade worked fine for me. Just after upgrade I had to change the owner of the keyfiles to "0:102" and the group needs to have read rights. |
This should be a good start towards rewriting the templates.