-
Notifications
You must be signed in to change notification settings - Fork 925
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
lxd: hotplug mounts #11336
lxd: hotplug mounts #11336
Conversation
499dbfa
to
a7fa585
Compare
Testsuite passed |
The static analysis checks are failing on:
I'm not sure how this was avoided for the other parts of cgo in LXD, but it doesn't normally occur. |
So far we failed to correctly handle non-bind mounts. Add the basic ability. Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
I asked @stgraber and he suspected that it's something to do with the go static checker not built with cgo support. I didn't even touch that file so it's weird in the first place. |
I would have expected the static checker to fail previously if that were the case. As this isn't the only cgo in LXD. |
Please see golangci/golangci-lint#3289 |
Testsuite passed |
The static analysis is working locally for me with the same version of golangci-lint, so I wonder if this is related to golangci/golangci-lint#1176 and we are missing a C dependency in the action? |
Yes sounds like this change has introduced an additional build dependency not present in the github runner. |
addef80
to
87b5472
Compare
I think I fixed this but I'm now getting download errors for some packages:
|
For centuries we've worked ourselves to the bone with mount propagation to hotplug mounts. No more! The new mount api does have proper support for moving a mount into a container. I've had that on my ToDo for a while but due to recent events this has been bumped up on my priority list. So here it is. A way to simply have LXD prepare a mount with exactly the option we want and then to hand that fd to the container and the container can just attach it to the correct place. No more pointless mount propagation shenaningans. I would also like to call out that this has some elegant properties. For example, every filesystem that supports idmapped mounts can be exposed to a container completely idmapped. The filesystem can be directly created with the idmap applied. Neitehr does the filesystem have to appear anywhere before applying the idmapping nor are any additional mounts required before applying the idmapping. Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Hmkay, that isn't the failure. The failure is apparently earlier. |
For centuries we've worked ourselves to the bone with mount propagation
to hotplug mounts. No more! The new mount api does have proper support
for moving a mount into a container. I've had that on my ToDo for a
while but due to recent events this has been bumped up on my priority
list.
So here it is. A way to simply have LXD prepare a mount with exactly the
options we want and then to hand that fd to the container and the
container can just attach it to the correct place. No more pointless
mount propagation shenaningans.
I would also like to call out that this has some elegant properties. For
example, every filesystem that supports idmapped mounts can be exposed
to a container completely idmapped. The filesystem can be directly
created with the idmap applied. Neither does the filesystem have to
appear anywhere before applying the idmapping nor are any additional
mounts required before applying the idmapping.
Signed-off-by: Christian Brauner (Microsoft) brauner@kernel.org