-
Notifications
You must be signed in to change notification settings - Fork 66
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The if [ ! -f "${HOME}/.config/containers/storage.conf" ]; then But, there are valid configs where there is no There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Note: As of OCP 4.15 With OCP 4.17 Pod annotation: So, to disable |
||
mkdir -p ${HOME}/.config/containers | ||
if [ -c "/dev/fuse" ] && [ -f "/usr/bin/fuse-overlayfs" ]; then | ||
(echo '[storage]';echo 'driver = "overlay"';echo '[storage.options.overlay]';echo 'mount_program = "/usr/bin/fuse-overlayfs"') > ${HOME}/.config/containers/storage.conf | ||
else | ||
(echo '[storage]';echo 'driver = "vfs"') > "${HOME}"/.config/containers/storage.conf | ||
fi | ||
fi | ||
|
||
# Setup $PS1 for a consistent and reasonable prompt | ||
if [ -w "${HOME}" ] && [ ! -f "${HOME}"/.bashrc ]; then | ||
echo "PS1='[\u@\h \W]\$ '" > "${HOME}"/.bashrc | ||
|
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