375 Commits

Author SHA1 Message Date
Wouter Verlaek
c5ba13cdf2
[ws-daemon] Take backup once container has stopped (#19411) 2024-02-09 17:02:51 +02:00
Kyle Brennan
67c2800c1c
[content-service] remove s5cmd integration (#18863)
* [ws-daemon] log download and extract times

* Revert "[content-service] log duration for s3 download and tar extract (#18829)"

This reverts commit ac8d3e25f10e4caf4bbe3475501e33dc49bbb068.

* Revert "[content-service] download s3 content using s5cmd (#18783)"

This reverts commit 4fb2677c4a6849b6f140214fcb84dce2cc6c7899.
2023-10-03 23:42:11 +03:00
Anton Kosyakov
40c39f5312
Revert "Relax assumptions in supervisor (#18782)" (#18857)
This reverts commit 9a38b607055780fa7b2cd61c1379143d6c7b3715.
2023-10-02 23:00:11 +03:00
Christian Weichel
9a38b60705
Relax assumptions in supervisor (#18782)
* [supervisor] Make UID/GID configurable

* Support content initializer as env var

* Make workspace runtime explicit

* Make linux user configurable for Git operations

* Don't assume /home/gitpod

* Fix unittest

* Fix wsdaemon
2023-09-27 17:32:06 +03:00
Manuel Alejandro de Brito Fontes
cd7dc44f2c
Simplify ws-daemon (#18690) 2023-09-11 15:31:08 +02:00
Christian Weichel
cc2b6def7f
Fix nsinsider log (#18647) 2023-09-01 16:37:58 +02:00
Manuel Alejandro de Brito Fontes
64994160d9
Remove FUSE support (#18536)
* Remove FUSE support

* Update docs

* Remove fuse-overlayfs

* Fix installer validation
2023-08-18 16:13:44 +02:00
Manuel Alejandro de Brito Fontes
513ca768f6
Update buildkit to v0.12.1 (#18505)
* Update buildkit to v0.12.1

* Update DisplaySolveStatus signature

* Switch to github.com/containerd/typeurl/v2
2023-08-15 09:17:40 +02:00
Kyle Brennan
36651922ef
[ws-daemon] error log clean-up (#18473)
* [ws-daemon] improve logging for `could not get connection drop stats`

* Don't log the workspace name, which could contain org/repo
* Log as a warning, this happens too often to be considered an error

* [common-go] improve `stopping file watch` logging
2023-08-14 13:34:40 +02:00
Kyle Brennan
79df02b0ed
[ws-daemon] additional logging for markunmount (#18486)
Relates to ENG-473
2023-08-11 14:14:37 +02:00
Wouter Verlaek
1d68d002d5
[ws-daemon] Fix workspace location for log backup (#18401)
* [ws-daemon] Fix workspace location for log backup

* Update integration test to check for uploaded logs
2023-08-02 17:36:27 +08:00
Wouter Verlaek
516b67cfbc
[test] Fix slack footer and improve ws-daemon log (#18168)
* [test] Fix slack footer

* Add OWI and err size log
2023-07-05 19:01:22 +08:00
Thomas Schubart
4d9831e1d3
Log network link state (#18172)
* [nsinsider] Dump network info

* [ws-daemon] Dump network info in case of error
2023-07-05 16:56:22 +08:00
Wouter Verlaek
cbc8b38a91
[ws-daemon] Add OWI to logs (#18017) 2023-06-22 21:44:12 +08:00
Thomas Schubart
20164cbb4a
[wsman-mk2] Simplify condition checking (#17961) 2023-06-17 22:59:07 +08:00
Thomas Schubart
c4f9a428aa
[ws-manager-mk2] Simplify workspace session management (#17924)
* [ws-daemon] Simplify session management

* [ws-daemon] Remove duplicated code

* [ws-daemon] Fix names for tracing
2023-06-15 19:12:06 +08:00
Thomas Schubart
2cab1406dd
[ws-manager-mk2] Remove persistent volume claim feature (#17860)
* [ws-daemon] Remove PVC

* [installer] Remove PVC

* [workspacekit] Remove PVC

* [content] Remove PVC

* [preview] Remove PVC

* [wsman-api] Remove PVC

* [ws-daemon-api] Remove PVC

* [workspacekit] Mount workspace directory

* [supervisor] Remove PVC

* [test] Remove PVC

* Fix build
2023-06-13 18:35:04 +08:00
Thomas Schubart
460875058f
[ws-manager-mk2] Remove ws-manager-mk2 from experimental section (#17848)
* [wsman-mk2] Remove ws-manager-mk2 from experimental

* [ws-daemon] Remove readiness check for service

* [ws-daemon] Use mk2 working area only

* [preview] Remove mk2 customization

* [installer] Remove constant
2023-06-06 22:56:57 +08:00
Thomas Schubart
fe08421325
[ws-daemon] Remove full workspace backup (#17803) 2023-06-01 17:36:06 +08:00
Thomas Schubart
588d2919de
[ws-manager-mk2] Remove workspace service (#17801)
* [ws-daemon] Remove workspace service

* [ws-daemon] Move metrics
2023-05-31 23:08:06 +08:00
Thomas Schubart
4dadd7be61
[ws-manager-mk2] Ensure restarting ws-daemon does not break running workspaces (#17711)
* [ws-daemon] Ensure backup can be taken

* [wskit] Retry mount call

* [ws-daemon] Ensure hard storage quota is applied

* [ws-daemon] Replace map with sync.Map
2023-05-25 20:46:59 +08:00
Kyle Brennan
1a7c50a8b5
[ws-manager-mk2] support storage quotas (#17606)
* [ws-manager-mk2] add support for storage quotas

This way, on workspace create, `ws-daemon` can set XFS limits for `/workspace`

* [preview] set smaller /workspace limits

This way we don't have to spend more on preview environments.

* [ws-daemon] warn when xfs is missing

* Partial revert of "Revert "[ws-daemon] Restart IWS if ws-daemon is restarted (#17552)" (#17645)"

This reverts commit e082b7f48885199013df927d3c71c62935f74047.

It avoids reverts on notify.go and workspace_provider.go.

* [ws-daemon] log when handling running workspaces

* [test] add test for xfs quotas
2023-05-19 20:49:53 +08:00
Wouter Verlaek
09981c4661
[ws-daemon] Log backup failure error (#17655) 2023-05-17 22:39:51 +08:00
Wouter Verlaek
e082b7f488
Revert "[ws-daemon] Restart IWS if ws-daemon is restarted (#17552)" (#17645)
This reverts commit b84404abd559b4f14556b2ce94c76ab7b0c2bac3.
2023-05-17 18:10:51 +08:00
Thomas Schubart
b84404abd5
[ws-daemon] Restart IWS if ws-daemon is restarted (#17552)
* [ws-daemon] Restart IWS if ws-daemon is restarted

* [workspacekit] Back-off IWS interaction

* Post rebase fix

---------

Co-authored-by: csweichel <chris@gitpod.io>
2023-05-17 05:00:02 +08:00
Manuel Alejandro de Brito Fontes
4eff2355c1
Without RequeueAfter the concurrent reconciles will process immediately (#17567)
* Without RequeueAfter the concurrent reconciles will process immediately

* Fix metric test listening address collision
2023-05-11 22:11:56 +08:00
Thomas Schubart
b262fa428d
[ws-manager-mk2] Test automation for ws-daemon (#17502)
* [ws-daemon] Generate mocks

* [ws-daemon] Add tests

* [ws-daemon] Remove unused constant

* [ws-daemon] Find CRDs during leeway build

* Delete symlink

* Add dummy file

* [installer] Update go.mod
2023-05-10 17:59:55 +08:00
Thomas Schubart
9618c53d8b
[ws-daemon] Ensure correct cgroup path is returned when not QoS (#17535) 2023-05-08 20:44:46 +08:00
Thomas Schubart
81a6623ac3
[wsman-mk2] Ensure stop reason is logged (#17517) 2023-05-05 23:21:43 +08:00
Thomas Schubart
f78093f858
[wsman-mk2] Log reconcilliations (#17434) 2023-05-01 16:00:39 +08:00
Wouter Verlaek
c1e627a66f
[ws-manager-mk2] Improve reconcile err logging (#17419)
* [ws-manager-mk2] Improve reconcile err logging

* Update StopWorkspace err log

* Fix errors
2023-04-28 14:56:36 +08:00
Manuel Alejandro de Brito Fontes
9cf0243e54
Add new feature for custom workspace network CIDR (#17145)
* Add new feature for custom workspace network CIDR

* Cleanup
2023-04-07 13:17:47 +02:00
Wouter Verlaek
2d4f94634c
[ws-manager-mk2] Fix git status (#17097)
* [ws-manager-mk2] Fix git status

* Remove unused var
2023-04-03 11:03:43 +02:00
Wouter Verlaek
c828d4176c
[ws-manager-mk2] Remember existing workspaces after a restart (#17066) 2023-03-29 20:43:39 +02:00
Thomas Schubart
d6cb9d1885
[ws-daemon] Refactor workspace operations (#17069) 2023-03-29 11:07:39 +02:00
Wouter Verlaek
c14a25cfdf
[ws-manager-mk2] Report content init/dispose failures (#17015) 2023-03-27 17:22:25 +02:00
Thomas Schubart
8871aed078
[wsman-mk2] Garbage collection for mk2 workspaces (#17021) 2023-03-24 18:18:16 +01:00
Thomas Schubart
b84a256400
[wsman-mk2] Ensure content init can be restarted (#17002) 2023-03-24 14:41:16 +01:00
Thomas Schubart
2cfe264c12
(wsman-mk2] Prevent partial backups (#16997) 2023-03-24 11:50:16 +01:00
Thomas Schubart
c64c4f3530
[ws-manager-mk2] Rely on controller concurrency mechanism for content init and backup (#16823)
* [wsman-mk2] Replace in memory state handling

* [ws-daemon] Operate on latest workspace CR

* [ws-daemon] Review comments
2023-03-23 16:31:17 +01:00
Kyle Brennan
a2176718ec
[dev image] update to Jammy (#16718)
* [dev image] update to Jammy

Ref: https://github.com/gitpod-io/workspace-images/pull/1017

no more `python-dev`

ref:
https://github.com/lewagon/data-setup/issues/219#issuecomment-1207519811
https://wiki.termux.com/wiki/No_more_-dev_packages

* [dev image] update images latest dev image

* [ws-manager] avoid false positive linter errors

* [ws-daemon] fix ineffectual assignment for err

golangci-lint is catching more errors since upgrading to go 1.19.5

* Update to more recent gcloud

* Moar timeout
2023-03-22 19:37:14 +01:00
Thomas Schubart
42a3602fce
[ws-manager-mk2] Emit events for workspaces and snapshots (#16907)
* [wsman-mk2] Emit workspace events

* [installer] Permissions for events

* [ws-man-mk2] Emit snapshot events

* [installer] Update render tests

* [wsman-mk2] Include review comments
2023-03-20 13:59:12 +01:00
Wouter Verlaek
95158eba38
[ws-manager-mk2] Don't dispose image builds (#16902) 2023-03-20 11:34:12 +01:00
Thomas Schubart
ace513ad7e
[ws-manager-mk2] Refactor workspace status conditions (#16896)
* [wsman-mk2] Refactor conditions

* [wsman-mk2] Specify reason
2023-03-20 11:10:12 +01:00
Manuel Alejandro de Brito Fontes
95feb1a6bf
Remove cgroups v1 from commons-go (#16859)
* Remove cgroups v1 from commons-go

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>

* Remove cgroups v1 references

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>

---------

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>
2023-03-17 15:25:10 +01:00
Thomas Schubart
c800175c72
[ws-manager-mk2] Protect tokens (#16806)
* [wsman-mk2] Create token secret

* [installer] Fix casing for namespace type metadata

* [installer] Create secrets namespace

* [installer] Configure roles and bindings

* [installer] Move namespace constant to common pkg

* [installer] Create permissions for ws-daemon

* [wsman-mk2] Watch on multiple ns

* [ws-daemon] Use token secret

* [wsman-mk2] Remove secret from initializer

* [wsman-mk2] Test token secret

* [werft] Fix document index

* [installer] Update render tests

* [wsman-mk2] Fix imports

* [wsman-mk2] Ensure maintenance controller required permissions

* [wsman-mk2] Retry deleting secret

* [installer] Ensure objects in secrets namespace are only created with mk2 option
2023-03-15 12:57:07 +01:00
Thomas Schubart
040ab4de13
[ws-manager-mk2] Fix prebuild update events (#16688)
* [wsman-mk2] Change snapshot name for prebuilds

* [ws-manager-mk2] Return false instead of empty bool

* [ws-daemon] Update snapshot url while in stopping phase
2023-03-07 14:34:04 +01:00
Wouter Verlaek
1631a4a038
[ws-manager-mk2] Loadgen fixes, concurrent reconciliation (#16613)
* [ws-manager-mk2] Loadgen fixes, concurrent reconciliation

* [ws-manager-mk2] Update tests with content readiness

* Simplify content ready check

* Fix json tags

* Revert poll interval
2023-03-06 15:18:04 +01:00
Manuel Alejandro de Brito Fontes
41ddf50849
[ws-daemon] Check connection to containerd socket (#16654)
* Check connection to containerd socket

* Mount containerd socket directory to avoid reconnect issues if containerd restarts

* Update golden files

* Break loop
2023-03-03 12:59:01 +01:00
Manuel Alejandro de Brito Fontes
dc69bb20ca
Remove host controller from ws-daemon (#16615)
* Remove host controller from ws-daemon

* Configure /etc/hosts file in registry-facade

* Update golden files
2023-03-01 00:55:58 +01:00