-
Notifications
You must be signed in to change notification settings - Fork 65
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
Detect support for fuse-overlayfs #198
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: cgruver <[email protected]>
Signed-off-by: cgruver <[email protected]>
Signed-off-by: cgruver <[email protected]>
@@ -5,6 +5,16 @@ if [ ! -d "${HOME}" ]; then | |||
mkdir -p "${HOME}" | |||
fi | |||
|
|||
# Configure container builds to use vfs or fuse-overlayfs | |||
if [ ! -d "${HOME}/.config/containers" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkwon17 with this change we should probably update the docs as well, right?
e.g. https://docs.redhat.com/en/documentation/red_hat_openshift_dev_spaces/3.17/html-single/user_guide/index?extIdCarryOver=true&sc_cid=701f2000001Css5AAC#enabling-overlay-with-a-configmap
Now UDI will be smart enough to detect fuse automatically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ibuziuk , yes, a configmap will not be needed anymore if the tooling container image is based on ubi/udi
verified on Developer Sandbox:
|
@@ -5,6 +5,16 @@ if [ ! -d "${HOME}" ]; then | |||
mkdir -p "${HOME}" | |||
fi | |||
|
|||
# Configure container builds to use vfs or fuse-overlayfs | |||
if [ ! -d "${HOME}/.config/containers" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if persistent home is enabled and fuse-overlayfs gets disabled? Would ${HOME}/.config/containers/storage.conf
need to be rewritten? Would the outer if
block stop that from happening?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only way to disable fuse-overlayfs would be to apply a machine-config to the cluster, so I would say it's not likely. And if it did happen, that would be a disruptive change.
The reason that I put the first if
block there is to not overwrite any existing podman config. The user might have added additional config to storage.conf which we would not want to clobber on a workspace restart.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The if
block could be a bit more targeted to look specifically for storage.conf I suppose.
if [ ! -f "${HOME}/.config/containers/storage.conf" ]; then
But, there are valid configs where there is no storage.conf
file, but other content under ${HOME}/.config/containers
. Which is why I just check for the existence of the directory, not the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cgruver that makes sense, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: As of OCP 4.15 /dev/fuse
is available for leaking into a container OOTB. No cluster change required.
With OCP 4.17 /dev/net/tun
is also available.
Pod annotation: io.kubernetes.cri-o.Devices: "/dev/fuse,/dev/net/tun"
So, to disable fuse-overlayfs
support would require disruptive intervention on the part of cluster admins.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cgruver, dkwon17, ibuziuk The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Add logic to
entrypoint.sh
to detect support forfuse-overlayfs