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

mode = "bridge" support for FreeBSD #17311

Open
mayakerostasia opened this issue May 25, 2023 · 3 comments
Open

mode = "bridge" support for FreeBSD #17311

mayakerostasia opened this issue May 25, 2023 · 3 comments
Labels
help-wanted We encourage community PRs for these issues! stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/networking theme/platform-freebsd type/enhancement

Comments

@mayakerostasia
Copy link

mayakerostasia commented May 25, 2023

I don't know how possible this might be, but I'm willing to spend some time trying to get it to work. If anybody knows where I might start that would be amazing.

Proposal

FreeBSD support for Bridge networking mode

Use-cases

Some work has been done to make nomad work with pot the jail driver and the only downside is that FreeBSD doesn't seem to be able to support mode = "bridge" so that Consul Service Mesh can be taken advantage of when using Pot as the task driver on FreeBSD systems.

Attempted Solutions

Installed FreeBSD specific CNI plugins and installed them in the default directories.
Tried a custom cni/mynet specification but the error throws that it must use "bridge" and not "cni/mynet"

@lgfa29
Copy link
Contributor

lgfa29 commented May 29, 2023

Hi @nwisemanII 👋

I think this would be great, and we really appreciate the desire to contribute some code for this 😄

I don't have much experience with BSD, so I'm afraid I can't help you much here. But I will check with my colleagues if someone would be able to provide better guidance.

From a Nomad perspective, I imagine you would spend most of your time in the allocrunner and, more specifically, in the network hook and network manager (which has a linux and non-linux version).

Maybe just allowing the network manager to run on FreeBSD would enough, but who knows 😅

https://github.com/hashicorp/nomad/tree/main/contributing has some general guidance on building and testing Nomad. It would also be nice to have a FreeBSD host in our end-to-end test suite, but that can be worked out in the future.

I hope this gives you a place to start. Feel free to reach out if you get stuck 🙂

@lgfa29 lgfa29 added theme/networking theme/platform-freebsd stage/accepted Confirmed, and intend to work on. No timeline committment though. help-wanted We encourage community PRs for these issues! labels May 29, 2023
@tgross
Copy link
Member

tgross commented May 30, 2023

@nwisemanII one challenge that comes to mind is that Nomad rummages around looking for the kernel module for bridge networking, which probably won't work at all on FreeBSD. Unfortunately it does it in a way that's terrible and buggy 😊 (ref #10902 for just one example), which would probably be improved by #6618 and that'd presumably work fine for FreeBSD too.

@lgfa29
Copy link
Contributor

lgfa29 commented May 30, 2023

Another piece of information I received from the team is that FreeBSD doesn't have network namespaces, like in Linux. The closest option would be jail VNETs (https://klarasystems.com/articles/virtualize-your-network-on-freebsd-with-vnet/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted We encourage community PRs for these issues! stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/networking theme/platform-freebsd type/enhancement
Projects
Status: Needs Roadmapping
Development

No branches or pull requests

3 participants