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

[ws-daemon] cgroup customizer on workspace add (fuse support) #4762

Merged
merged 1 commit into from
Jul 12, 2021

Conversation

fntlnz
Copy link
Contributor

@fntlnz fntlnz commented Jul 9, 2021

fixes #4652

Supersedes #4756

How to test

  1. Start a workspace in the environment
  2. try to mount the workspace itself via sshfs
sudo apt update -y
sudo apt install sshfs openssh-sftp-server -y
sudo ln -s /usr/lib/sftp-server /usr/libexec/sftp-server
ssh-keygen
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
mkdir -p /tmp/workspace
sshfs -odebug,sshfs_debug,loglevel=debug -p 23001 gitpod@127.0.0.1:/workspace /tmp/workspace

You can also verify the cgroups in the current workspace via:

cat /sys/fs/cgroup/devices/devices.list

Then you can take the cgroup path and verify its content

cat /sys/fs/cgroup/devices/devices.list 
c *:* m
b *:* m
c 1:3 rwm
c 1:8 rwm
c 1:7 rwm
c 5:0 rwm
c 1:5 rwm
c 1:9 rwm
c 5:1 rwm
c 136:* rwm
c 5:2 rwm
c 10:200 rwm
c 10:229 rwm

@fntlnz fntlnz requested review from a team and csweichel and removed request for a team July 9, 2021 12:50
@fntlnz fntlnz force-pushed the lf/ws-daemon-cgroup-customizer branch from 71c706c to 7b1c49d Compare July 9, 2021 12:52
@codecov
Copy link

codecov bot commented Jul 9, 2021

Codecov Report

Merging #4762 (fa8dd6c) into main (2a544ee) will increase coverage by 22.67%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           main    #4762       +/-   ##
=========================================
+ Coverage      0   22.67%   +22.67%     
=========================================
  Files         0       13       +13     
  Lines         0     2055     +2055     
=========================================
+ Hits          0      466      +466     
- Misses        0     1527     +1527     
- Partials      0       62       +62     
Flag Coverage Δ
components-ws-daemon-app 22.67% <ø> (?)

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

Impacted Files Coverage Δ
components/ws-daemon/pkg/quota/size.go 87.30% <0.00%> (ø)
components/ws-daemon/pkg/content/config.go 62.50% <0.00%> (ø)
components/ws-daemon/pkg/internal/session/store.go 19.38% <0.00%> (ø)
components/ws-daemon/pkg/resources/dispatch.go 0.00% <0.00%> (ø)
components/ws-daemon/pkg/content/archive.go 57.47% <0.00%> (ø)
components/ws-daemon/pkg/content/service.go 0.00% <0.00%> (ø)
components/ws-daemon/pkg/quota/mounts.go 53.19% <0.00%> (ø)
components/ws-daemon/pkg/quota/sandbox_linux.go 0.00% <0.00%> (ø)
components/ws-daemon/pkg/content/tar.go 45.63% <0.00%> (ø)
components/ws-daemon/pkg/resources/limiter.go 77.77% <0.00%> (ø)
... and 3 more

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 2a544ee...fa8dd6c. Read the comment docs.

@fntlnz fntlnz force-pushed the lf/ws-daemon-cgroup-customizer branch 3 times, most recently from 0fd89f5 to cfa244d Compare July 9, 2021 14:40
@fntlnz fntlnz force-pushed the lf/ws-daemon-cgroup-customizer branch from cfa244d to fa8dd6c Compare July 9, 2021 14:57
@fntlnz
Copy link
Contributor Author

fntlnz commented Jul 9, 2021

This is complete and ready for review! Here are some screenshots from the workspace where I'm trying it out.

image

image

@fntlnz fntlnz requested a review from a team July 9, 2021 15:31
@fntlnz fntlnz changed the title [ws-daemon] cgroup customizer on workspace add [ws-daemon] cgroup customizer on workspace add (fuse support) Jul 9, 2021
@csweichel
Copy link
Contributor

csweichel commented Jul 12, 2021

/werft run

👍 started the job as gitpod-build-lf-ws-daemon-cgroup-customizer.6

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.

Tested using telepresence - works like a charm 🚀
This is awesome! We finally have telepresence support in Gitpod 🎉

image

@fntlnz fntlnz merged commit bc6c9f7 into main Jul 12, 2021
@fntlnz fntlnz deleted the lf/ws-daemon-cgroup-customizer branch July 12, 2021 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Device cgroup for /dev/fuse
2 participants