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

[inner-loop] run Isolated docker in debug workspace #16363

Merged
merged 1 commit into from
Feb 25, 2023
Merged

[inner-loop] run Isolated docker in debug workspace #16363

merged 1 commit into from
Feb 25, 2023

Conversation

iQQBot
Copy link
Contributor

@iQQBot iQQBot commented Feb 13, 2023

Description

[inner-loop] run Isolated docker in debug workspace

Related Issue(s)

Fixes #

How to test

  1. start a workspace preview env
  2. try gp rebuild
  3. in debug workspace, try use docker, it should Isolated with regular workspace

image

Release Notes

[inner-loop] run Isolated docker in debug workspace

Documentation

Build Options:

  • /werft with-github-actions
    Experimental feature to run the build with GitHub Actions (and not in Werft).
  • leeway-no-cache
    leeway-target=components:all
  • /werft no-test
    Run Leeway with --dont-test
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • with-ee-license
  • with-slow-database
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@iQQBot iQQBot requested review from a team February 13, 2023 07:53
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-pd-dind.1 because the annotations in the pull request description changed
(with .werft/ from main)

@github-actions github-actions bot added team: workspace Issue belongs to the Workspace team team: IDE labels Feb 13, 2023
@iQQBot iQQBot marked this pull request as draft February 13, 2023 07:53
@iQQBot iQQBot force-pushed the pd/dind branch 3 times, most recently from 4baee6f to 4d4b239 Compare February 13, 2023 08:45
@iQQBot iQQBot marked this pull request as ready for review February 13, 2023 08:57
@akosyakov
Copy link
Member

@iQQBot it is awesome I've noticed following output on shutdown:

[2023-02-13 09:15:43]  INFO Gracefully stopping the debug workspace...
[2023-02-13 09:15:44] ERROR cannot provide Docker activation socket error=wait: no child processes

it could be addressed separately, but we should try no clean up unnecessary or misleading errors. It will make our life better as well.

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, it turned out to be not so complicated :)

@akosyakov
Copy link
Member

@iQQBot if we merge it without docker-up deployed first it is going to break docker in debug workspace all together?

@akosyakov
Copy link
Member

/hold

we probably should extract a PR for the workspace team first cc @kylos101 would it be possible to patch this thing somehow?

@iQQBot
Copy link
Contributor Author

iQQBot commented Feb 13, 2023

@iQQBot if we merge it without docker-up deployed first it is going to break docker in debug workspace all together?

Yes....let's extract a PR for workspace team

@@ -241,6 +241,11 @@ func runRebuild(ctx context.Context, supervisorClient *supervisor.SupervisorClie
return err
}

err = os.MkdirAll("/workspace/.docker-root-debug", 0710)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iQQBot I think we should think about long term approach, we will need to move there VS Code user data and JB config/cache folders.

I thought that in regular workspace we should do something like:

/workspace/.gitpod/root/.docker
/workspace/.gitpod/root/.vscode-remote
/workspace/.gitpod/root/.cache
/workspace/.gitpod/root/.config

And then for the debug workspace use something like /workspace/.gitpod/debug-root?

We don't need to change for the regular workspace for now. But for the debug workspace we could do it clean? i.e. start now /workspace/.gitpod/debug-root/.docker.

I wonder whether it also applies to /workspace/.gitpod folder generally? i.e why would we shate gitpod tasks between them?

Maybe instead it should move folders under /workspace/.gitpod and in the debug mount /workspace/.gitpod-debug:/workspace/.gitpod

WDYT? Should we talk sync?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iQQBot we maybe should consider to keep debug workspace data somewhere under /var/tmp? Because of recent perf concerns

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iQQBot we maybe should consider to keep debug workspace data somewhere under /var/tmp? Because of recent perf concerns

Pudong said it is impossible, because linux allows only 2 layers, and we already have it for root fs

For the structure we agreed on:

/workspace/.gitpod-debug/.docker-root -> /workspace/.docker-root
/workspace/.gitpod-debug/.gitpod -> /workspace/.gitpod
/workspace/.gitpod-debug/.vscode-remote -> /workspace/.vscode-remote
/workspace/.gitpod-debug/.cache -> /workspace/.cache
/workspace/.gitpod-debug/.config -> /workspace/.config

@@ -398,9 +398,9 @@ func Run(options ...RunOption) {
tasksSuccessChan := make(chan taskSuccess, 1)
go taskManager.Run(ctx, &wg, tasksSuccessChan)

if !opts.RunGP && !cfg.isDebugWorkspace() {
if !opts.RunGP {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this file we only need to remove a guard

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will change after #16368 merged

@kylos101
Copy link
Contributor

kylos101 commented Feb 14, 2023

@akosyakov we can patch docker-up, we cannot patch ws-daemon.

edit: Assuming this change is dependent on the nsinsider change, you'll need to wait for a new cluster till next week.

@kylos101
Copy link
Contributor

kylos101 commented Feb 17, 2023

@akosyakov I rerequested your approval because this comment. Also, /var/tmp uses ephemeral storage, which has a smaller limit than /workspace class. For reference /workspace sizes are here.

I'm not sure how much content you're thinking about putting there, but, depending on size, it could violate ephemeral storage limits and cause workspace to stop. Standard ephemeral storage limit is 10GB, Large is 20GB.

edit: also there's a conflict with supervisor.go

@iQQBot
Copy link
Contributor Author

iQQBot commented Feb 21, 2023

/werft run

👍 started the job as gitpod-build-pd-dind.12
(with .werft/ from main)

@iQQBot iQQBot marked this pull request as ready for review February 21, 2023 15:53
@iQQBot
Copy link
Contributor Author

iQQBot commented Feb 21, 2023

/hold

this PR need hold until new workspace cluster deployed

@iQQBot
Copy link
Contributor Author

iQQBot commented Feb 21, 2023

already tested

image

image

@iQQBot iQQBot removed the request for review from a team February 21, 2023 15:56
Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

/hold

let's wait for workspace deployment

@kylos101
Copy link
Contributor

Workspace deployment is done (both regions are at 100%) @akosyakov @iQQBot

@iQQBot
Copy link
Contributor Author

iQQBot commented Feb 25, 2023

/unhold

@roboquat roboquat merged commit 884a177 into main Feb 25, 2023
@roboquat roboquat deleted the pd/dind branch February 25, 2023 03:32
@roboquat roboquat added deployed: IDE IDE change is running in production deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note size/M team: IDE team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants