-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
set tracing socket path to runtime dir #4078
Conversation
cmd/buildkitd/main_unix.go
Outdated
@@ -47,8 +48,14 @@ func listenFD(addr string, tlsConfig *tls.Config) (net.Listener, error) { | |||
return nil, errors.New("not supported yet") | |||
} | |||
|
|||
func traceSocketPath(root string) string { | |||
return filepath.Join(root, "otel-grpc.sock") | |||
func traceSocketPath(inUserNS bool) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved to https://github.com/moby/buildkit/blob/master/util/appdefaults/appdefaults_unix.go
In rootless mode in our integration tests that sounds legit:
Added |
Signed-off-by: CrazyMax <[email protected]>
Hum it still tries to write to xdg runtime dir in rootless mode for frontend integration tests, I might miss smth: https://github.com/moby/buildkit/actions/runs/5716370920/job/15487868441?pr=4078#step:7:1143
Edit: I think we are losing env context with sudo, I will take a look. |
Signed-off-by: CrazyMax <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is completely safe to pick to v0.12 . Maybe there are some weird perm errors for /run/buildkit
in some systems.
How about we merge this for master and pick https://github.com/moby/buildkit/pull/3483/files for v0.12?
Fine to me |
@@ -65,7 +65,7 @@ func (s *OCI) New(ctx context.Context, cfg *BackendConfig) (Backend, func() erro | |||
return nil, nil, errors.Errorf("unsupported id pair: uid=%d, gid=%d", s.UID, s.GID) | |||
} | |||
// TODO: make sure the user exists and subuid/subgid are configured. | |||
buildkitdArgs = append([]string{"sudo", "-u", fmt.Sprintf("#%d", s.UID), "-i", "--", "exec", "rootlesskit"}, buildkitdArgs...) | |||
buildkitdArgs = append([]string{"sudo", "-E", "-u", fmt.Sprintf("#%d", s.UID), "-i", "--", "exec", "rootlesskit"}, buildkitdArgs...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crazy-max looks like this actually disables all the rootless tests 👀
See https://github.com/moby/buildkit/actions/runs/5749062460/job/15583230313:
time="2023-08-03T09:40:23Z" level=warning msg="rootless mode is not supported on this host: exit status 1 (sudo: you may not specify both the -i and -E options\nusage: sudo -h | -K | -k | -V\nusage: sudo -v [-ABkNnS] [-g group] [-h host] [-p prompt] [-u user]\nusage: sudo -l [-ABkNnS] [-g group] [-h host] [-p prompt] [-U user] [-u user]\n [command [arg ...]]\nusage: sudo [-ABbEHkNnPS] [-C num] [-D directory] [-g group] [-h host] [-p\n prompt] [-R directory] [-T timeout] [-u user] [VAR=value] [-i | -s]\n [command [arg ...]]\nusage: sudo -e [-ABkNnS] [-C num] [-D directory] [-g group] [-h host] [-p\n prompt] [-R directory] [-T timeout] [-u user] file ...\n)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yikes test step didn't failed 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing from the v0.12.1 milestone, see #4078 (comment). |
fixes #4036