Add krun_set_root2() API to support read-only root filesystems#637
Open
d-e-s-o wants to merge 1 commit intocontainers:mainfrom
Open
Add krun_set_root2() API to support read-only root filesystems#637d-e-s-o wants to merge 1 commit intocontainers:mainfrom
krun_set_root2() API to support read-only root filesystems#637d-e-s-o wants to merge 1 commit intocontainers:mainfrom
Conversation
Pull request containers#623 added support for read-only mounts. It seems only consequent to also provide users with the ability to set read-only state for the root file system. Introduce krun_set_root2(), which extends krun_set_root() with a read_only parameter to allow exposing the root filesystem as read-only to the guest. The original krun_set_root() now delegates to the new function with read_only=false, preserving the previous behavior. Signed-off-by: Daniel Müller <deso@posteo.net>
Collaborator
|
I'm not really a fan of adding this right now, users can already do Only problem is user has to know we use "/dev/root" in the default cmdline arguments for the kernel. Only addition I think we should consider is For libkrun 2.0 I think we should make the user always pass in the virtiofs tag to boot from explicitly, that is more obvious to the user and flexible. |
Collaborator
|
Also we could also add an explicit comment to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request #623 added support for read-only mounts. It seems only consequent to also provide users with the ability to set read-only state for the root file system.
Introduce
krun_set_root2(), which extendskrun_set_root()with a read_only parameter to allow exposing the root filesystem as read-only to the guest. The originalkrun_set_root()now delegates to the new function withread_only=false, preserving the previous behavior.