124 Commits

Author SHA1 Message Date
Christian Weichel
a4956795dc [supervisor] Provide workdir when opening and listing terminals 2021-01-15 14:11:21 +01:00
Christian Weichel
9336b090be [supervisor] Make reaper terminating during shutdown
Fixes gitpod-io/gitpod#2654
2021-01-15 14:11:21 +01:00
Christian Weichel
e086599357 [supervisor] Add annotations to terminals 2021-01-15 14:11:21 +01:00
Christian Weichel
2e2f00127a [supervisor] Provide the PID of terminal processes 2021-01-15 14:11:21 +01:00
Christian Weichel
72a120e0c8 Update Kubernetes client-go to v1.20.1
Fixes gitpod-io/gitpod#2689
2021-01-11 15:25:05 +01:00
Christian Weichel
ef66ca19a1 [supervisor] execve into ring3 2021-01-08 15:58:39 +01:00
Christian Weichel
7935b7f015 [gitpod-protocol] Move Go server API client to gitpod-protocol
This way it's accessible from packages other than supervisor,
e.g. future integration tests.
2021-01-08 13:40:43 +01:00
Gero Posmyk-Leinemann
fe3a018ea4
[self-hosted] Fix various issues around blobserve+ path based workspace access (#2666)
* [theia] Load main.js relative to support path based ws access

* [ws-proxy] Fix pathBasedTheiaRouter: workspaceID parsing

* [ide] Fix workspaceID reading/parsing issues

* [docs] self-hosted: Minor fixes

* [chart] values.yaml: remove forceHTTPS

* [review] Feedback
2021-01-05 15:49:57 +01:00
ArthurSens
be14b4897a Add golangci-linter and fixes most linting issues
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-01-05 08:38:03 -03:00
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
Anton Kosyakov
bdbaca3740 fix flaky port tests 2020-12-16 14:32:59 +01:00
Anton Kosyakov
53591f7d9f [supervisor] ensure that each served port appears only once 2020-12-16 10:06:33 +01:00
Christian Weichel
b63a9af53f [supervisor] Make IDE ready for headless workspaces 2020-12-14 16:47:07 +01:00
Anton Kosyakov
60a85a462c don't run ports and IDE in headless workspaces 2020-12-11 16:10:57 +01:00
Sven Efftinge
d0fc7eb84a go mod updates 2020-12-10 11:53:43 +01:00
Christian Weichel
cad0421768 [supervisor] Add supervisor ghost command 2020-12-08 16:35:44 +01:00
Anton Kosyakov
34a1cde10a [supervisor] avoid auto exposing the same port multiple times 2020-12-08 08:50:10 +01:00
Anton Kosyakov
ba7bd3cb94 [supervisor] expose Gitpod host URL as a workspace info 2020-12-02 09:40:35 +01:00
Anton Kosyakov
8c993133cb [supervisor] git token provider support 2020-12-02 09:40:35 +01:00
Anton Kosyakov
4ab9a6e899 [supervisor] token provider kind 2020-12-02 09:40:35 +01:00
Christian Weichel
c3ccf1cab4 [supervisor] Gracefully close terminals on shutdown 2020-11-27 17:41:04 +01:00
Anton Kosyakov
d103bd857c [supervisor] don't drop last ports/tasks updates 2020-11-27 15:36:30 +01:00
Christian Weichel
bb1225bf76 [supervisor] Disable flakey auto expose configured ports test 2020-11-27 14:59:44 +01:00
Christian Weichel
debf19ce82 [supervisor] Make tests less verbose 2020-11-27 14:59:44 +01:00
Anton Kosyakov
a0f4afb928 fix #2290: ensure that clients don't miss ports/tasks status updates 2020-11-27 09:38:20 +01:00
Christian Weichel
45ed903a54 [supervisor] Tone down process reaper logs 2020-11-26 14:42:18 +01:00
Anton Kosyakov
01a9ccde32 fix #2253: use more specific type for headless task messages 2020-11-25 16:24:46 +01:00
Anton Kosyakov
7c0aa2c450 fix #2265: ensure that headless tasks done is reported 2020-11-25 16:24:46 +01:00
Anton Kosyakov
9aa46e4cc9 [supervisor] resolve a terminal reading/writing deadlock 2020-11-25 16:24:46 +01:00
Anton Kosyakov
71643a0ee2 [supervisor] ensure task status order 2020-11-25 16:24:46 +01:00
Anton Kosyakov
2b74b1e742 [dashboard] redirect from prebuild only when it is stopped 2020-11-25 16:24:46 +01:00
Anton Kosyakov
085b896eaf [supervisor] always run task terminals for regular workspaces 2020-11-25 16:24:46 +01:00
Anton Kosyakov
5a58817915 [supervisor] align default terminal shell with IDE expectations 2020-11-25 16:24:46 +01:00
Anton Kosyakov
934aa6278c [supervisor] drop unnecessary line delimiters in tasks' commands 2020-11-25 16:24:46 +01:00
Christian Weichel
b576c0dbc5 [supervisor] Adapt to port API changes 2020-11-25 15:59:36 +01:00
Christian Weichel
4ca16ea888 [supervisor] Publish full task updates instead of incremental ones 2020-11-25 11:13:52 +01:00
Christian Weichel
4cbf87b0de [supervisor] Improve ports concurrency behaviour 2020-11-25 09:52:17 +01:00
Christian Weichel
dcbc44e130 [supervisor] Adapt to updated grpc-gateway 2020-11-24 09:59:57 +01:00
Christian Weichel
ac7e70e361 [supervisor] Fix write on closed channel for instance updates 2020-11-20 08:52:06 +01:00
Christian Weichel
2670431afb [supervisor] Add zombie reaper for reparented processes 2020-11-19 13:41:14 +01:00
Christian Weichel
5f59ba05b2 [supervisor] Don't panic when instance updates stop 2020-11-19 10:02:01 +01:00
Christian Weichel
48fe5e606b [supervisor] Don't use JSON logging for CLI 2020-11-19 08:38:35 +01:00
Anton Kosyakov
97aaaf1ce2 [supervisor/theia] consolidate workspace info tracking 2020-11-19 08:37:47 +01:00
Anton Kosyakov
ef1bd9c3a5 [supervisor/frontend] get rid of bundling inversifyjs/reflect-metadata 2020-11-19 08:37:47 +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
Anton Kosyakov
1204ed797d [supervisor] fix #2158: reconnect if the server ws is closed
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
2020-11-12 09:00:05 +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
ae6adcf65a [supervisor] Introduce time budgets for different shutdown tasks
e.g. for the time the IDE can take to shutdown before receiving SIGKILL.
2020-11-11 11:59:32 +01:00
Anton Kosyakov
1155de0754 [supervisor] fix #2092: handle gracefully ide restart 2020-11-11 11:38:20 +01:00