fuse-overlayfs: add C plugins system#119
Conversation
|
This pull request introduces 3 alerts when merging dd49509 into 74fb3dd - view on LGTM.com new alerts:
|
b512206 to
5b64df4
Compare
|
a test plugin: https://gist.github.com/giuseppe/a669ed7248de557a9b5fd272ffe2a4f4 It allows to use a shared storage owned by another user as a lower layer. as root: The last command convert each file to mode As rootless then we can do: The new syntax for The original files from the image are owned by root, the fuse-overlayfs plugin makes sure the original permissions are used inside of the container. A second rootless user could use the same command and re-use the lower layer from the root storage. |
|
@vrothberg @rhatdan ⬆️ this is the idea I had in mind for sharing the storage for rootless users. |
|
This would only allow us to copy one image. How would I set this up to allow the use of 100 images? |
|
@rhatdan yes, it must switch all protections to 0755, also ones that are looser. No file must be world writeable as it can affect other users of the image. root, or more in general the owner of a storage, must explicitly convert or copy+clone (if it is still needed with native overlay) each layer that is going to be shared. If the underlying file system support reflinks though, there is only the additional cost of creating inodes. |
|
We might be able to take advantage of Overlay MetaCopy=on as well. |
|
Could container storage do this for us, and just take a group of images or all images and mount them up to be used by fuse-overlay? |
yes once the low level bits are working, I think we'll need to move the logic of creating such images into containers/storage so that we could have something: |
|
Currently under water with tackling bugs. Will have a look as soon as I find time. Thanks for the ping, @giuseppe ! |
c8f8c47 to
571b72f
Compare
|
ready for review |
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
this is the first step towards supporting data from lower layers coming from other sources. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Add a simple plugin mechanism that will help to expand fuse-overlayfs functionalities, in particular it allows to load data from a layer on demand. A plugin is loaded into fuse-overlayfs using the option: -o plugins=path/to/plugin.so:path/to/another/plugin.so A layer can use a plugin with the syntax: -o lowerdir=//plugin-name/DATA-FOR-THE-PLUGIN/path Each time a file/directory is looked up, if a plugin is registered for a layer, the plugin is first notified about the request. After the callback is invoked, fuse-overlayfs still expects the data to be accessible at the specified directory. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
differently than dev/ino number, use the uppermost mode found. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
17f8ffa to
4792fd0
Compare
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
use EXIT_FAILURE and EXIT_SUCCESS instead. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
|
a plugin for CRFS: https://github.com/giuseppe/crfs-plugin |
if no -o plugins is specified, load them from $PKGLIBEXECDIR (usually has the value /usr/libexec/fuse-overlayfs). Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
978ecd2 to
161914c
Compare
Closes: containers#136 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
|
@rhatdan let's merge if there are no problems and I will cut a new release |
|
LGTM |
Alternative for #79
Add a simple plugin mechanism that will help to expand fuse-overlayfs
functionalities, in particular it allows to load data from a layer on
demand.
A plugin is loaded into fuse-overlayfs using the option:
-o plugins=path/to/plugin.so:path/to/another/plugin.so
A layer can use a plugin with the syntax:
-o lowerdir=//plugin-name/DATA-FOR-THE-PLUGIN/path
Each time a file/directory is looked up, if a plugin is registered for
a layer, the plugin is first notified about the request.
After the callback is invoked, fuse-overlayfs still expects the data
to be accessible at the specified directory.
Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com