3 ms·
The problem with this jails/zones stuff is that I don't know anyone who seriously trusts jails and zones for real multitenant workloads anyways. The dealbreaker
by tptacek 6y ago
The problem with this jails/zones stuff is that I don't know anyone who seriously trusts jails and zones for real multitenant workloads anyways. The dealbreaker problem remains a shared kernel attack surface between tenants. It's one thing to propose that Zones are better than namespaces (they probably are), but another thing to cross the threshold where the distinction is meaningful in practice.
- jchw 6y agoAlso, tools for improving Docker for multi-tenant workloads exists, like gVisor. I don’t think equivalents exist for jails/zones really.
- tptacek 6y agogVisor isn't a shared-kernel multitenant system; it's essentially kernel emulation. It's a much stronger design.
- jchw 6y agoI mostly mean that it is intended to be a solution to run containers from multiple tenants on the same host. Though I do agree, being essentially a kernel in itself, it is a bit in a different wheelhouse. It still is a huge value add that you can implement something like that on top of Docker, imo.
- tptacek 6y agoYou can run container workloads in "real" VMs too; for instance, check out Kata Containers. Containers are a way of packaging applications; confusingly, they happen to also have a reference standard runtime associated with them. But you don't have to use it.
- jchw 6y agoOf course, and that's the value of the abstraction to me. Docker itself is obviously nothing to do with the Linux container technologies themselves that make up the equivalent functionality of FreeBSD jails, but I'm not aware of any equivalent abstraction that works around jails or zones even though it might be possible. So the way I see containers on Linux is not literally a composition of kernel features like cgroups or seccomp, but as an abstract thing that can be composed out of various primitives. And in practice, there's a number of different runtimes around it, including Docker clones like Podman, or tools that manage effectively chroots much closer to what you would do with jails. That said, I could just be completely wrong, and there could be similar things that can be done using jails and zones. But when I looked around for similar art with FreeBSD jails, either with regards to Docker's style of packaging and distribution, or with regards to additional layers like gVisor, it didn't seem like a thing well-suited to that kind of composition. In comparison, jails, at least, seem kind of like more powerful chroots. To me this is a pretty big difference versus Linux "containers".
- tptacek 6y agoMy mental model of Zones and Jails is that they are a cleaner, more convenient, less error-prone way of expressing a modern, minimally-privileged, locked down Docker runtime. You won't catch me arguing that Zones aren't better than Docker, but the u->k attack surface is untenable for multitenant workloads.
- Koshkin 6y agoSimilar to Xen?
- tptacek 6y agoMuch weirder than Xen.
- bcantrill 6y agoAt Joyent, we deployed public-facing multitenant workloads based on zones (and before that, jails) for many years. We seriously trusted it -- and had serious customers who seriously depended on it. So, now you know someone!
- wmf 6y agoThere were also tons of providers who trusted Linux containers for VPS hosting.
- mixmastamyk 6y agoSecurity requirements (and awareness) have increased over the years, have they not?
- bcantrill 6y agoThey definitely have! And we had a (zones-based) public cloud through it all. On that note, Alex Wilson's description of working with Robert Mustacchi on mitigating Meltdown by adding KPTI to illumos[0] definitely merits a read! [0] https://blog.cooperi.net/a-long-two-months https://blog.cooperi.net/a-long-two-months
- unixhero 6y agoAnd needless to say it became a billion dollar business, with a great product.
- deleted 6y ago[deleted]
- schoen 6y ago> The dealbreaker problem remains a shared kernel attack surface between tenants. Also, now, extremely subtle and hard-to-mitigate timing attacks between tenants.
- tptacek 6y agoIn fairness, that's an attack class that's very difficult to eradicate even with virtualization.