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] Re-establish IWS on restart #5130

Merged
merged 2 commits into from
Aug 10, 2021

Conversation

csweichel
Copy link
Contributor

fixes #5079

ws-daemon provides an in-workspace service (IWS) to workspacekit. We use this IWS to establish the UID/GID mapping, mount proc and sysfs, prepare the rootfs and unmount it all on shutdown. If the IWS is not available, the workspace does not function well. Prior to this change, ws-daemon would not re-establish the IWS for already running workspaces due to a missing call in the lifecycle hooks.

How to test

  1. Start a workspace
  2. Restart the ws-daemon on the node where the workspace is running
  3. Run docker run --rm -it alpine:latest in the workspace. The container should just run and not complain about procfs.

@roboquat roboquat requested review from akosyakov and aledbf August 10, 2021 07:08
@codecov
Copy link

codecov bot commented Aug 10, 2021

Codecov Report

Merging #5130 (b785b0b) into main (631322b) will decrease coverage by 14.67%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #5130       +/-   ##
===========================================
- Coverage   37.65%   22.98%   -14.68%     
===========================================
  Files          16       11        -5     
  Lines        4084     1919     -2165     
===========================================
- Hits         1538      441     -1097     
+ Misses       2422     1419     -1003     
+ Partials      124       59       -65     
Flag Coverage Δ
components-supervisor-app ?
components-ws-daemon-app 22.98% <0.00%> (?)

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

Impacted Files Coverage Δ
components/ws-daemon/pkg/content/service.go 0.00% <0.00%> (ø)
components/supervisor/pkg/ports/ports.go
components/supervisor/pkg/terminal/terminal.go
components/supervisor/pkg/terminal/service.go
...mponents/supervisor/pkg/supervisor/notification.go
components/supervisor/pkg/supervisor/tasks.go
components/supervisor/pkg/ports/tunnel.go
components/supervisor/pkg/supervisor/config.go
components/supervisor/pkg/supervisor/user.go
components/supervisor/pkg/supervisor/git.go
... and 18 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 631322b...b785b0b. Read the comment docs.

@aledbf
Copy link
Member

aledbf commented Aug 10, 2021

Works as described. The reconnection takes a bit more than 20 seconds.

/lgtm

@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: 88f8842ea55dcbdda6def4a3b945cc3cf01d35a8

@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf

Associated issue: #5079

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@roboquat roboquat merged commit f74fbca into main Aug 10, 2021
@roboquat roboquat deleted the csweichel/suspicion-broken-iws-5079 branch August 10, 2021 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suspicion: broken IWS after ws-daemon restart
3 participants