-
Notifications
You must be signed in to change notification settings - Fork 297
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
error: Not a regular file or symlink: node when adding node container image to the tree #2310
Comments
Docker/OCI image spec implies that folder/file removal is marked with a whiteout file in an image layer https://github.com/opencontainers/image-spec/blob/master/layer.md#representing-changes. The docker daemon implementation creates a whiteout file as a character device in order to fulfill an overlayfs kernel module requirement https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html#whiteouts-and-opaque-directories. Thus, committing container image layers into an ostree repo becomes not so straightforward as it was noticed, We tried to overcome this inconvenience by removing all non-regular files and recording them into a regular text file (file path, attributes) before invoking a commit command. Then, on a target/destination side we do an opposite operation, after issuing a checkout command, create non-regular files listed in the record file. |
So if I understand it correctly, to avoid a custom deploy/checkout mechanism on the client I see following alternatives:
Either way we'd have to come up with work-arounds. I wonder if this is something desired by ostree to support and in scope and what would be necessary to support this. |
There's nothing in the ostree model that would prevent storing device nodes. I guess it's just not implemented. The file header includes a space for rdev even: ostree/src/libostree/ostree-core-private.h Lines 43 to 59 in 6d64477
I'd previously attempted to add the ability to check in overlayfs layers and do the composition in ostree, but I hit some issues with xattr permissions: #1651 (comment) |
You'd have to put some thought in how to implement device nodes with bare-user ostree repos. Probably an empty file with the appropriate xattrs set would be a good bet. |
Hi, I was about to file a new bug/rfe for this but I see this already exists, I had also a smaller reproducer: rm -rf rootfs test
ostree --repo=./test init --mode=bare-user
mkdir rootfs
mknod -m 0 rootfs/whiteout c 0 0
ostree commit --repo=./test ./rootfs --branch test/stable/x86_64 results:
I'm going to open a formal enhancement request for this and link it, as well as other related issues |
Also xref ostreedev/ostree-rs-ext#246 |
Hey there! I thought opening a bug report on this might be the best way to investigate this further.
I'm currently working on committing uncompressed container images into the OSTree in an alternative image store under /usr/containers. I've successfully added the alpine container so far.
When trying this with a more complex container like node-red, the ostree commit command fails with
error: Not a regular file or symlink: node
. Is this intended behavior and I just don't get it because of ostree details I don't know of? Should this work in theory?See this issue on the rpm-ostree issue tracker for more details on the context: coreos/rpm-ostree#2675
In order to reprodue you can try this:
The text was updated successfully, but these errors were encountered: