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

Is only FreeBSD on scope? #41

Open
tuxillo opened this issue Mar 20, 2023 · 5 comments
Open

Is only FreeBSD on scope? #41

tuxillo opened this issue Mar 20, 2023 · 5 comments

Comments

@tuxillo
Copy link

tuxillo commented Mar 20, 2023

There are other FreeBSD-based OSes like DragonFly BSD that will likely take a, somewhat, different approach wrt jails and that don't have a linux compatibility layer.

I'm wondering if such would be considered, ofc by submitting PRs ourselves.

@samuelkarp
Copy link
Owner

Apologies for the lengthy delay in getting back to you. runj is focused on FreeBSD for now as I only have a FreeBSD VM set up to test with (and I'd rather get runj more complete before starting work on another OS). However, if the patches to make runj work on DragonFly BSD are relatively small, that could be reasonable to incorporate into runj.

What are some of the differences in approaches between FreeBSD and DragonFly BSD with respect to jails?

@tuxillo
Copy link
Author

tuxillo commented Aug 20, 2023

Basically, DragonFly BSD jails are FreeBSD's late 4.x or early 5.x jails. We haven't ported new changes from FreeBSD and we haven't developed jails further yet. Now I'm thinking it might just be easier for everyone that we add some sort of compatibility layer with the idea of being able to run whatever that runs for FreeBSD.

In any case this was just a thought that I wanted to get input on. Many thanks!

@igalic
Copy link

igalic commented Aug 21, 2023

I think it's gonna be really tricky without vnet support

@tuxillo
Copy link
Author

tuxillo commented Sep 16, 2023

I think it's gonna be really tricky without vnet support

Can you expand on that a bit? Thanks!

@igalic
Copy link

igalic commented Sep 17, 2023

VNET(9) is the way we isolate networking between jails, but it looks like you can create containers without network isolation, if I'm reading this right

runj/oci/config.go

Lines 82 to 108 in 8ab46e9

if freebsd.Network != nil {
if spec.FreeBSD.Network == nil {
spec.FreeBSD.Network = &runtimespec.FreeBSDNetwork{}
}
if freebsd.Network.IPv4 != nil {
if spec.FreeBSD.Network.IPv4 == nil {
spec.FreeBSD.Network.IPv4 = &runtimespec.FreeBSDIPv4{}
}
if freebsd.Network.IPv4.Mode != "" {
spec.FreeBSD.Network.IPv4.Mode = freebsd.Network.IPv4.Mode
}
if len(freebsd.Network.IPv4.Addr) > 0 {
spec.FreeBSD.Network.IPv4.Addr = append(spec.FreeBSD.Network.IPv4.Addr, freebsd.Network.IPv4.Addr...)
}
}
if freebsd.Network.VNet != nil {
if spec.FreeBSD.Network.VNet == nil {
spec.FreeBSD.Network.VNet = &runtimespec.FreeBSDVNet{}
}
if freebsd.Network.VNet.Mode != "" {
spec.FreeBSD.Network.VNet.Mode = freebsd.Network.VNet.Mode
}
if len(freebsd.Network.VNet.Interfaces) > 0 {
spec.FreeBSD.Network.VNet.Interfaces = append(spec.FreeBSD.Network.VNet.Interfaces, freebsd.Network.VNet.Interfaces...)
}
}
}

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

No branches or pull requests

3 participants