Skip to content

getwd: should we really hard fail? #3328

Closed

Description

@apostasie

Description

Investigating rootless-containers/usernetes#327

Current intuition is that the error comes from:
https://github.com/containerd/nerdctl/blob/main/pkg/rootlessutil/parent_linux.go#L87

Do we really need to hard-fail when we have no cwd?

Put otherwise: is it important that nsenter gets -w set no matter what (especially in the case where cwd does not exist), or can we just "not set" -w when getwd fails?

cc @AkihiroSuda

Steps to reproduce the issue

mkdir foo
cd foo
rmdir ../foo
nerdctl container run -d --name foo debian sleep Inf
FATA[0000] getwd: no such file or directory

Describe the results you received and expected

na

What version of nerdctl are you using?

main

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/unconfirmed-bug-claim

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions