Live data from Hacker News

Ubuntu Linux Jail on FreeBSD 12.2-Release

wiki.freebsd.org

41–50 of 86 posts

Re: Ubuntu Linux Jail on FreeBSD 12.2-Release

#41
post #20

Earlier quoted context omitted.

Pretty much. Long predates WSL1, though, and facing many of the same difficulties that prompted the Windows team to just run Linux in a hypervisor (WSL2).

> facing many of the same difficulties that prompted the Windows team to just run Linux in a hypervisor How's that? WSL had serious performance issues due to design differences between linux and NT. Linux and freebsd both being unices, there is no such impedance. Some features (like cgroups) remain unimplemented, true, but there haven't been any big difficulties afaik.

Not just performance issues. WSL1 had so many limitations that it was silly.

WSL2 gives you pretty much the whole linux environment. A truly future of Linux of desktop...

Re: Ubuntu Linux Jail on FreeBSD 12.2-Release

#42
post #6

I wish there was a usable Docker Engine API implementation that could run containers in jails using zfs for image layering. There is a Docker for FreeBSD port, but last time I checked, it was super old. Having Docker as a first class citizen on FreeBSD would make it really incredibly as a server OS.

Maybe not docker, but there is pot: https://potluck.honeyguide.net Which aims to provide something similar as Docker for FreeBSD.

I'm the one behind pot, a framework to manage jails as containers. Here, there is the presentation on how to orchestrate jail using nomad, from Hashicorp: https://archive.fosdem.org/2020/schedule/event/orchestrating...

pot is nothing more than a Proof of Concept, a model that uses FreeBSD technologies to implements a typical container workflow: jail, ZFS, pf, rctl and cpuset.

There is no compatibility to OCI standards, but I believe it would be possible to implement them.

Re: Ubuntu Linux Jail on FreeBSD 12.2-Release

#43
post #20

Earlier quoted context omitted.

Pretty much. Long predates WSL1, though, and facing many of the same difficulties that prompted the Windows team to just run Linux in a hypervisor (WSL2).

> facing many of the same difficulties that prompted the Windows team to just run Linux in a hypervisor How's that? WSL had serious performance issues due to design differences between linux and NT. Linux and freebsd both being unices, there is no such impedance. Some features (like cgroups) remain unimplemented, true, but there haven't been any big difficulties afaik.

Also interested in the response to the parent (loeg)

> facing many of the same difficulties that prompted the Windows team to just run Linux in a hypervisor

If by difficulties, you mean implementing system calls, this is being kept tabs on here: https://wiki.freebsd.org/Linuxulator

One that comes to mind is FreeBSD's kqueue, which opens a file descriptor for every file watched [1]

So inotify, inotify_add_watch, inotify_rm_watch isn't started. Lots of applications need watching of changes on directories. Even plain old FreeBSD gets messed since a large webpack project is going to chew up way too much.

If you're interested in this type of system call across operating systems check out https://github.com/emcrisostomo/fswatch

On WSL1/2:

Namely in WSL1, there were serious issues with package systems like npm, node_modules/ would have file descriptors get clogged, and it took a full system reboot to get WSL working again: https://github.com/microsoft/WSL/issues/1529. WSL2 Fixes it.

[1] https://emcrisostomo.github.io/fswatch/doc/1.8.0/fswatch.htm... See Freebsd -> kqueue -> Peculiarities

Re: Ubuntu Linux Jail on FreeBSD 12.2-Release

#44

Nice progress, but it notes that `systemd` doesn't work, which means all the things that depend on `systemd` won't work either.

Not much of an issue - the world goes on without systemd.

You'll meet a few annoying dependencies on it, but as one will quickly find, it's rarely critical, and mostly because of people using its dbus implementation or similar (which has no relation to the rest of systemd, and yet is entangled in libsystemd...).

Re: Ubuntu Linux Jail on FreeBSD 12.2-Release

#45
post #37

Earlier quoted context omitted.

FreeBSD's point of distinction is that it's carefully designed and fitted together, compared to Linux's comparatively heavy use of glue. I also haven't heard credible reports of it being slow, except for things it's not really used for (like drivers for consumer wifi cards).

Well Linux is just a kernel, so it's a bit unfair to call it glued together...but the rest (a ditro)...lot of glue and clay...sometimes also pure mud.

Don't forget the duct tape, bailing wire, and gum.

Re: Ubuntu Linux Jail on FreeBSD 12.2-Release

#46

Earlier quoted context omitted.

I've been generally OK with systemd, and think most of the complaints about it were over-dramatic, but this is exactly one of the things we were warned about, right?

systemd-as-SysV-init replacement was fine. It's all the other stuff that many people think is overkill: udevd being pulled in, journald, time sync, file system mounting, network management, etc. And all are in one repo with tight coupling. For an "init system".

People keep saying it's tightly coupled, but never supply any proof for that. You can still run udev without systemd, the NTP stuff is completely optional and in separate binaries and the same is true for the network management stuff. The journal is indeed required, but any traditional syslog daemon still works, and you can trivially disable the persistent journal (I even believe that's the default on Debian).

Re: Ubuntu Linux Jail on FreeBSD 12.2-Release

#47
post #34
post #19

BSD subsystem for Linux.

Linux subsytem for FreeBSD you mean?

That would make more grammatical sense, but the parent comment is presumably referencing Windows Subsystem for Linux[1], which is a subsystem for Windows that runs Linux.

1. https://docs.microsoft.com/en-us/windows/wsl/about

Re: Ubuntu Linux Jail on FreeBSD 12.2-Release

#48
post #6

I wish there was a usable Docker Engine API implementation that could run containers in jails using zfs for image layering. There is a Docker for FreeBSD port, but last time I checked, it was super old. Having Docker as a first class citizen on FreeBSD would make it really incredibly as a server OS.

Having played with SmartOS containers using linux compatibility (not docker). I will say this: Use native containers for that OS. The slight differences that you will find, will drive you up the wall. They will be esoteric and happen at the worst time.

And i should say I love SmartOS, it is a really cool bit of tech... I just love simplicity more, and a compatibility layer is never simple.

Re: Ubuntu Linux Jail on FreeBSD 12.2-Release

#49
post #20

Earlier quoted context omitted.

Pretty much. Long predates WSL1, though, and facing many of the same difficulties that prompted the Windows team to just run Linux in a hypervisor (WSL2).

> facing many of the same difficulties that prompted the Windows team to just run Linux in a hypervisor How's that? WSL had serious performance issues due to design differences between linux and NT. Linux and freebsd both being unices, there is no such impedance. Some features (like cgroups) remain unimplemented, true, but there haven't been any big difficulties afaik.

Sure, "BSL" doesn't have all the same difficulties as Windows WSL1 had. There are still design mismatches between FreeBSD and Linux that make implementing Linux features difficult (just for example, compare Linux clone() to FreeBSD fork()), and there are many, many features that remain unimplemented (inotify, cgroups, namespaces, ...).

I agree it's largely "just" a matter of implementing the missing functionality, which has a large surface area and requires building novel infrastructure in the FreeBSD kernel.

Re: Ubuntu Linux Jail on FreeBSD 12.2-Release

#50
post #6

I wish there was a usable Docker Engine API implementation that could run containers in jails using zfs for image layering. There is a Docker for FreeBSD port, but last time I checked, it was super old. Having Docker as a first class citizen on FreeBSD would make it really incredibly as a server OS.

Maybe not docker, but there is pot: https://potluck.honeyguide.net Which aims to provide something similar as Docker for FreeBSD.

There's also Bastille, which looks very interesting: https://bastillebsd.org/
Post reply on HN