Skip to content
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

Ensure docker in workspace works with fuse #8181

Merged
merged 1 commit into from
Feb 14, 2022
Merged

Ensure docker in workspace works with fuse #8181

merged 1 commit into from
Feb 14, 2022

Conversation

Furisto
Copy link
Member

@Furisto Furisto commented Feb 13, 2022

Description

This fixes an issue where trying to run a docker container within a workspace would fail when fuse-overlayfs was used as shift method for the rootfs. Chroot only affects the calling process while pivot_root affects the whole mount namespace. @csweichel Do you know why chroot was used for fuse and pivot_root for shiftfs? Trying to understand if this would have other side effects.

Related Issue(s)

#8020

How to test

  • Ensure that fuse is selected as shift method (already done for the preview environment)
  • Open workspace
  • Try to run docker container in workspace

Side note: I am currently not able to get logs from ws-daemon or exec into it in my preview environment. I do not believe this has anything to do with my changes and should not affect anything but a second set of eyes on this would be good.

Release Notes

Fixed a bug where docker in workspaces could not be used when overlay-fusefs was used as shift method

cc: @utam0k

@Furisto Furisto requested a review from a team February 13, 2022 21:09
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Feb 13, 2022
@codecov
Copy link

codecov bot commented Feb 13, 2022

Codecov Report

Merging #8181 (02f020e) into main (ebf351e) will decrease coverage by 1.13%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8181      +/-   ##
==========================================
- Coverage   12.31%   11.17%   -1.14%     
==========================================
  Files          20       18       -2     
  Lines        1161      993     -168     
==========================================
- Hits          143      111      -32     
+ Misses       1014      880     -134     
+ Partials        4        2       -2     
Flag Coverage Δ
components-gitpod-cli-app 11.17% <ø> (ø)
components-local-app-app-darwin-amd64 ?
components-local-app-app-darwin-arm64 ?
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?
components-local-app-app-windows-amd64 ?
components-local-app-app-windows-arm64 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/local-app/pkg/auth/auth.go
components/local-app/pkg/auth/pkce.go

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ebf351e...02f020e. Read the comment docs.

@utam0k
Copy link
Contributor

utam0k commented Feb 13, 2022

Awesome👍 was there any man or documentation on the chroot phenomenon? Or is it a conclusion you understand from the phenomenon?

Copy link
Contributor

@csweichel csweichel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow - what a catch 🚀 Excellent work.

I also do not know why we chroot'ed instead of using pivot_root for fuse. Past us were silly enough not to add comments. I reckon it must have come from a misconception that pivot_root did not/would not work for some reason. At this point, I cannot see adverse side-effects. Quite the contrary, I would expect pivot_root to work "better".

@Furisto
Copy link
Member Author

Furisto commented Feb 14, 2022

Awesome was there any man or documentation on the chroot phenomenon? Or is it a conclusion you understand from the phenomenon?

I already knew about the different behavior. The man pages for chroot and pivot_root explain the different behavior, but do not specifically contrast it with each other, so you need to have read both to notice the difference.

@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Feb 14, 2022
@utam0k
Copy link
Contributor

utam0k commented Feb 15, 2022

Awesome was there any man or documentation on the chroot phenomenon? Or is it a conclusion you understand from the phenomenon?

I already knew about the different behavior. The man pages for chroot and pivot_root explain the different behavior, but do not specifically contrast it with each other, so you need to have read both to notice the difference.

I remember now! Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note size/S team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants