nerdctl oci hook can not find contaienrd.sock when node restarts

Open
#4,912 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go
Domain
cli

Research direction

Start at pkg/clientutil/client.go around line 92 and reproduce the failure by restarting a node running a nerdctl compose container. Determine whether socket-path lookup or retries addresses the startup race, then verify that the OCI hook no longer leaves the container instance in an unknown state when containerd.sock is not initially available.

Written by the indexing model from the issue text.

Description

kind/unconfirmed-bug-claim
Description

When a node restarts, the containerd service will restart and the container instance will be started. If the containerd socket is not created, the nerdctl oci hook will fail and the container instance will remain in an unknown state indefinitely.

Steps to reproduce the issue
  1. Start a container instance using nerdctl compose.
    2.Restart this node.
Describe the results you received and expected

I want the code that retrieves the actual file path of the containerd socket to be removed, just like on Windows.

https://github.com/containerd/nerdctl/blob/main/pkg/clientutil/client.go#L92

Another approach is to add retries to fix this issue.

What version of nerdctl are you using?

nertdcl: 2.1.2
containerd: 1.6.20

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

None

Host information

No response

Dominant language
Go
Stars
10.5k
Forks
853
Avg merge
6d 14h
Merged PRs (30d)
38

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from containerd/nerdctl

All issues in containerd/nerdctl

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.