Add containers_pid_namespace compatibility flag#6063
Conversation
ed55127 to
b163a4a
Compare
| # for `brotliContentEncoding`, flags with this annotation have no effect when `workerd` is used | ||
| # outside of Cloudflare.) | ||
|
|
||
| annotation neededByContainers @0xecce934ea47d2ca9 (field) :Void; |
There was a problem hiding this comment.
Since we talk to the containers service over capnp, it's probably cheaper and easier to just send the entire CompatibilityFlags struct over capnp to the container. Sending even one string name probably ends up being larger than sending the entire bitfield.
So I don't think we actually need this annotation and I definitely don't think we should be sending string names to the container service.
There was a problem hiding this comment.
(The neededByFl annotation is a bit different since we talk to FL over HTTP, not capnp, and sending an encoded bitfield would be awkward there. Though perhaps we should have done it that way as the string names are still quite bulky in that case too...)
There was a problem hiding this comment.
Well that makes this PR much simpler then :) Updated
There was a problem hiding this comment.
Well, there's no point in adding the compat flag if it's not actually being passed to containers. So I'd like to see that mechanism added to this PR. That should be part of the RPC interface, right?
There was a problem hiding this comment.
Yes but that is done in edge runtime, not workerd IIUC? I have a separate PR for that that I will open soon.
I did forget to implement the PID namespace feature for local dev, which I'll do now.
There was a problem hiding this comment.
The edge runtime makes the initial connection to the container service well before it has actually loaded the worker, so compat flags wouldn't be available yet from there. I think the best place to put the flags is going to be in StartParams.
b163a4a to
aa2d442
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6063 +/- ##
==========================================
+ Coverage 70.38% 70.51% +0.12%
==========================================
Files 408 408
Lines 108811 108791 -20
Branches 18000 17995 -5
==========================================
+ Hits 76591 76711 +120
+ Misses 21415 21286 -129
+ Partials 10805 10794 -11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
aa2d442 to
abe47c3
Compare
|
The generated output of |
Merging this PR will not alter performance
Comparing Footnotes
|
|
Sorry to suggest yet another redesign, but per my comment above, I think you are going to need to pass this in StartParams. In the edge runtime, it won't be feasible to pass the compatibility flags to the place where the container is first requested, since the worker hasn't necessarily been loaded yet at that point. |
When set, this compatibility flag instructs the containers runtime to start the user's container in a separate PID namespace. Eventually this will become the default (past some yet-to-be-determined compatibility date).
abe47c3 to
d31fd31
Compare
When set, this compatibility flag instructs the containers runtime to start the user's container in a separate PID namespace. Eventually this will become the default (past some yet-to-be-determined compatibility date).
Per @danlapid's suggestion, this follows the pattern used byneededByFlto annotate compatibility flags specifically needed for the containers service. We'll use this annotation in Edgeworker to send only the required compatibility flags to the ContainerService from the actor.Part of CC-6789