← 返回首页
Containerd sandbox by LeonSun-CS · Pull Request #460 · open-lambda/open-lambda · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Containerd sandbox#460

Open
LeonSun-CS wants to merge 2 commits into
open-lambda:mainfrom
LeonSun-CS:containerd
Open

Containerd sandbox#460
LeonSun-CS wants to merge 2 commits into
open-lambda:mainfrom
LeonSun-CS:containerd

Conversation

Copy link
Copy Markdown

No description provided.

tylerharter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Haven't read everything yet, still working through it.

Comment thread go/common/lambdaConfig.go
file, err := os.Open(path)

if errors.Is(err, os.ErrNotExist) {
// TODO: use slog

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Probably simpler to just do it rather than add a comment (or just leave it out of this PR since it is not related).

} else {
slog.Info(fmt.Sprintf("run pip install %s from a new Sandbox to %s on host", p.Name, scratchDir))
if err := os.Mkdir(scratchDir, 0700); err != nil {
filesDir := filepath.Join(scratchDir, "files")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Why do we need this change?

Comment thread go/go.mod
github.com/containerd/containerd v1.6.26
github.com/fsouza/go-dockerclient v1.10.1
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

I think containerd is obvious, but could you let me know what each of the other two dependencies provide?

Comment thread go/worker/helpers.go
if errors.Is(err, syscall.EINVAL) {
fmt.Printf("Sandbox mount root is not mounted. No need to clean up.\n")
} else {
} else if errors.Is(err, syscall.ENOENT) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

is this related to the other changes? As, does in surface more regularly now? Might be simpler as a separate PR is this is an unrelated issue you stumbled upon.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Yes, this is related. The context is when stopped dirty, stoppedDirtyToStoppedClean func runs and tries to unmount "root-sandboxes", and containerd would ran into no such file error because it doesn't use "root-sandboxes" dir.


if err := waitForServerPipeReady(c.HostDir()); err != nil {
c.Destroy("waitForServerPipeReady failed")
if err := WaitForServerPipeReady(c.HostDir()); err != nil {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Is using the pipe the most elegant way to do this? We don't necessarily need to follow what the docker implementation is doing.

}()

// Resource limit calculations
cpuPeriod := uint64(100000) // using Standard CFS period: 100ms (100,000 microseconds)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Can you just put the comments before? In a 2-column GitHub diff, it is hard to read this long.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Footer

© 2026 GitHub, Inc.