530 Commits

Author SHA1 Message Date
Pavel Tumik
f89c8ba45c [pvc] set FSGroupChangePolicy 2022-11-10 00:39:39 +02:00
Anton Kosyakov
6533581a0e [ssh-proxy] only mark first active when user establish ssh connection
VS Code Remote SSH will reestablish a ssh connection even if window is not uesd.
It will retrigger heartbeat over and over in SSH Gateway.
SSH Gateway should only triggert heartbeat if pty sessions is present.

Co-authored-by: Pudong <tianshi8650@gmail.com>
2022-11-09 21:46:39 +02:00
Pavel Tumik
0fbb0e1f60 pass workspace type in DeleteVolumeSnapshot 2022-11-09 14:58:39 +01:00
Pavel Tumik
fb524780e4 revert delete of DeleteVolumeSnapshot fn 2022-11-09 14:58:39 +01:00
JenTing Hsiao
35ca51bd5c ws-manager: remove no used function
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-11-09 14:58:39 +01:00
JenTing Hsiao
a4dacef491 ws-manager: add prebuild PVC configuration
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-11-09 14:58:39 +01:00
JenTing Hsiao
d686ea9685 Add counter metrics to record error count
Add two metrics to record the `mount device failed` and `cannt mount volume`
error. So, we could know the frequency the error happened.

Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-11-03 10:57:07 +01:00
JenTing Hsiao
0a130f1cda Skip the cannot mount workspace event because it might be an intermediate state
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-11-03 10:57:07 +01:00
Pavel Tumik
9a8151df25 refactor dispose workspace when using pvc 2022-11-03 01:16:07 +01:00
Pavel Tumik
8c36a94586 [pvc] add init container to workspace to chown pvc mount folder 2022-11-02 06:20:06 +01:00
JenTing Hsiao
6fd748c4c6 ws-manager: remove PVC once the workspace pod is unschedulable
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-11-01 08:50:05 +01:00
Manuel Alejandro de Brito Fontes
4700623673 [ws-manager] Configure http client timeouts 2022-10-27 01:04:41 +02:00
Manuel Alejandro de Brito Fontes
edfd76d70d Log JSON as strings not an array of bytes 2022-10-26 23:36:41 +02:00
utam0k
8200bfb7c1 ws-manager: Add the workspace statys for PodInitialzing phase. 2022-10-25 17:04:40 +02:00
Thomas Schubart
9fd3e3b61d [ws-manager] Ensure values are not overwritten
If a variable is already sourced from a reference do not overwrite it.
2022-10-24 13:56:38 +02:00
Thomas Schubart
da10c122b5 [ws-manager] Update test files 2022-10-24 13:56:38 +02:00
Thomas Schubart
09f463458d [ws-manager] Make protected secrets the default 2022-10-24 13:56:38 +02:00
Manuel Alejandro de Brito Fontes
2e04bac23d [ws-manager] Refactor workspace probes 2022-10-23 08:26:37 +02:00
JenTing Hsiao
9828b22aa1 ws-manager: use kubernetes operation timeout for mark workspace annotation operation
The ws-manager relies on the workspace pod annotation (as the workspace pod state)
to decide the code logic. Therefore, we must ensure the annotation is added to the workspace pod.

Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-10-21 11:00:36 +02:00
Thomas Schubart
1cf84ad290 [ws-manager] Handle psi feature flag 2022-10-21 10:42:36 +02:00
utam0k
24f61c7028 ws-manager: Redact logs of a workspace status. 2022-10-21 03:47:36 +02:00
Manuel Alejandro de Brito Fontes
791362baa8 Fix potential leak of request body 2022-10-18 20:52:34 +02:00
utam0k
381f347ee6 ws-manager: NODE_EXTRA_CA_CERTS is the value of the gitpod internals 2022-10-13 23:51:28 +02:00
Pudong Zheng
537a6801f0 [ws-manager] update test case 2022-10-13 20:08:30 +02:00
Pudong Zheng
a83040893e [ws-manager] refactory image layers 2022-10-13 20:08:30 +02:00
Pudong Zheng
32e270c913 [ws-manager] check ide-ready response 2022-10-13 18:13:28 +02:00
Pudong Zheng
18cde1a069 [ws-manager] Do not follow redirect when ready probe 2022-10-13 18:13:28 +02:00
JenTing Hsiao
801de49c1f Skip "MountVolume.MountDevice failed for volume"
Ignore the FailedMount event with the message contains MountVolume.MountDevice failed for volume.

The ws-manager catches the FailedMount event and writes the error message into the workspace Conditions.Failed.
Then, the workspace pod is stopped, and the workspace failed message will be shown to the user.

Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-10-12 02:44:27 +02:00
JenTing Hsiao
b58ececf53 Revert "ws-manager: remove PVC object if the workspace pod fails to up"
This reverts commit 28fae90078c351207f3f0f48ab7fc6154cc4e5ce.

Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-10-06 19:17:22 +02:00
Pavel Tumik
389f7767fb [ws-daemon] fix WaitForInit not found error in tracing 2022-10-05 10:35:21 +02:00
Pavel Tumik @ GitPod
efde42770b [pvc] potential workaround for mount volume failure 2022-10-04 23:02:20 +02:00
Manuel Alejandro de Brito Fontes
d5eb5815b5 Update to 1.19 2022-10-04 15:17:22 +02:00
Manuel Alejandro de Brito Fontes
3f6cbd07f1 Update go dependencies 2022-10-04 15:17:22 +02:00
Pavel Tumik
2c0f051b63 [ws-manager] fix tests 2022-10-04 06:25:20 +02:00
JenTing Hsiao
28fae90078 ws-manager: remove PVC object if the workspace pod fails to up
Remove the PVC object if the stop workspace request.
The PVC object removal is postponed until the PVC is no longer actively
used by the workspace pod.

Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-10-04 00:35:19 +02:00
Milan Pavlik
8b94c543e9 [ws-manager] Remove Probe workspace type 2022-09-29 10:25:30 +02:00
Christian Weichel
d6023c989a Revert "Switch to Go workspaces"
This reverts commit 6bc34cf17512cb0a10a3a6cce44141b1f06b624e.
2022-09-29 05:28:29 +02:00
Christian Weichel
174a09222f Revert "Run go work sync"
This reverts commit 6b23167e09f74062b31150d4044a8fe7cacbc34b.
2022-09-29 05:28:29 +02:00
Pavel Tumik @ GitPod
89f5072b5e [ws-manager] improve warning message in StartWorkspace fn 2022-09-28 20:15:29 +02:00
Christian Weichel
2e66269b2d [ws-manager] Remove req logs 2022-09-28 19:43:28 +02:00
JenTing Hsiao
169f8e7e76 ws-manager: return error if restore volume snapshot to smaller PVC size
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-09-28 09:42:28 +02:00
Christian Weichel
6b23167e09 Run go work sync 2022-09-28 08:45:28 +02:00
Christian Weichel
6bc34cf175 Switch to Go workspaces 2022-09-28 08:45:28 +02:00
JenTing Hsiao
01fda6568c ws-mananger: refactor volume snapshot watcher
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-09-27 00:31:27 +02:00
Pavel Tumik @ GitPod
b9d9cc7656 [ws-manager] make sure wsman does not spam in log on restart 2022-09-23 00:55:23 +02:00
Manuel Alejandro de Brito Fontes
05828a2ee0 Enable configuration of core dumps in .gitpod.yml files 2022-09-21 16:43:22 +02:00
Milan Pavlik
6f461f5714 [baseserver] Track metrics for HTTP requests automatically 2022-09-20 09:05:21 +02:00
JenTing Hsiao
df91671058 Add workspapce ID annotation to VolumeSnapshot object for filter event
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-09-16 00:58:16 +02:00
JenTing Hsiao
7c45c85cf4 ws-manager: fix event workers hang
Fix workers hang if there are over 100 VolumeSnapshot is ready, and the ws-manager be restarted.
The m.notifyPod channel is no receiver, and it causes the 100 event workers to hang.

Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-09-16 00:58:16 +02:00
Pavel Tumik @ GitPod
d4fe26f45f [ws-manager] add policy key to tracing in StopWorkspace call 2022-09-13 01:18:14 +02:00