27 Commits

Author SHA1 Message Date
Christian Weichel
b7dda84ad0 [license] Update license header from TypeFox GmbH to Gitpod GmbH 2021-01-04 15:12:02 +01:00
Christian Weichel
028552b19f [supervisor] Don't nil-deref on broken Gitpod connection 2020-12-17 09:42:52 +01:00
Christian Weichel
cad0421768 [supervisor] Add supervisor ghost command 2020-12-08 16:35:44 +01:00
Christian Weichel
c3ccf1cab4 [supervisor] Gracefully close terminals on shutdown 2020-11-27 17:41:04 +01:00
Christian Weichel
48fe5e606b [supervisor] Don't use JSON logging for CLI 2020-11-19 08:38:35 +01:00
Christian Weichel
09e33777b5 [supervisor] Introduce ring1 shutdown timeout to ensure proper cleanup
ring1ShutdownTimeout is the time ring1 gets between SIGTERM and SIGKILL.
We do this to ensure we have enough time left for ring0 to clean up prior
to receiving SIGKILL from the kubelet.

This time must give ring1 enough time to shut down (see time budgets in supervisor.go),
and to talk to ws-daemon within the terminationGracePeriod of the workspace pod.
2020-11-16 12:34:08 +01:00
Christian Weichel
cac490b36b [supervisor] Restore Pdeathsig after uid/gid maps are written in ring1
the reexec in combination with writing the uid_map/gid_map resets
the processes prctl.
2020-11-11 11:59:32 +01:00
Christian Weichel
34cd879ded [supervisor] Use runc's pivotRoot which properly unmounts the old root 2020-11-05 08:08:32 +01:00
Christian Weichel
ffabc9f0d4 [supervisor] Synchronise rings using pipe rather than signals 2020-11-05 08:08:32 +01:00
Christian Weichel
c8d46111a6 [ws-daemon] Improve userns container preparation 2020-11-05 08:08:32 +01:00
Christian Weichel
2d692fef08 [ws-daemon] Support proc mount API 2020-11-05 08:08:32 +01:00
Anton Kosyakov
94981bd214 [theia] move port handling to the supervisor 2020-11-04 05:50:23 +01:00
Christian Weichel
43e26558bb [merge] Provide instance updates 2020-11-04 05:50:23 +01:00
Christian Weichel
11406fc397 [user namespace] Disable seccomp to make clone work
The default containerd seccomp profile seems to prevent the clone
syscall with `CLONE_NEWUSER` and/or `CLONE_NEWNS`.
2020-10-23 16:20:08 +02:00
Christian Weichel
438c234bb2 [ws-daemon] Rename InWorkspaceHelper to more apt InWorkspaceService
and introduce rate limiting on that service to mimic the behaviour of
the former canaries.
2020-10-23 16:20:08 +02:00
Christian Weichel
4444675ce0 [user namespaces] Start IDE and terminals as gitpod user again 2020-10-23 16:20:08 +02:00
Christian Weichel
4a9c8f910e [ws-daemon] Provide IWH through unix socket rather than canaries 2020-10-23 16:20:08 +02:00
Christian Weichel
5a7903b089 [supervisor] Introduce user-namespace rings 2020-10-23 16:20:08 +02:00
Christian Weichel
a6a84d0c93 [supervisor] Use SIGTERM instead of PreStop hook 2020-10-23 16:20:08 +02:00
Christian Weichel
3a6587470a [supervisor] Directly support newuid/newgidmap CLI 2020-10-13 11:10:53 +02:00
Christian Weichel
a494eb7cff [ws-manager-node] Add uidmapper canary support 2020-10-13 11:10:53 +02:00
Christian Weichel
1a509f2f23 [supervisor] Add ws-manager-node IWH to support triggering uid mappings 2020-10-13 11:10:53 +02:00
Christian Weichel
f108fa72bf [gitpod-protocol] Produce Go version of the JSON RPC API 2020-09-25 13:11:42 +02:00
Christian Weichel
0e0bd79918 [supervisor] Add missing license header 2020-09-18 12:32:09 +02:00
Christian Weichel
d44eea1029 [supervisor squash] Time out terminal listener 2020-09-14 11:33:06 +02:00
Christian Weichel
8478e61d24 [supervisor] Add terminal multiplexing 2020-09-14 11:33:06 +02:00
Christian Weichel
46b091d7ab [supervisor] Future proof and harmonize the supervisor API 2020-09-07 09:50:32 +02:00