containerd / nerdctl

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to filter containers using "nerdctl ps -a" on Windows

TinaMor opened this issue · comments

Description

Unable to list the IDs of all containers that have exited on Windows

Steps to reproduce the issue

Run the command:

nerdctl ps -a --filter "status=exited" --format "{{.ID}}"

Describe the results you received and expected

Actual result:

time="2024-06-13T14:04:32+03:00" level=warning msg="no running task found: task 42c3fc550318cfb3ac5bc5fd4d09f8d29f8e3fd7b5b97c00fa400eee277b6199 not found: not found"

Expected result:

Running the above command should successfully filter the IDs of containers that are exited

What version of nerdctl are you using?

Description Version
Nerdctl v1.7.6
Containerd v1.7.18
Windows Build 10.0.22631

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

None

Host information

> nerdctl info

Client:
Namespace: default
Debug Mode: false

Server:
Server Version: v1.7.18
Storage Driver: windows
Logging Driver: json-file
Cgroup Driver:
Cgroup Version:
Plugins:
Log: fluentd journald json-file syslog
Storage: windows-lcow windows
Security Options:
Kernel Version:
Operating System:
OSType: windows
Architecture:
CPUs: 0
Total Memory: 0B
Name: xxxx
ID: xxxxxxx

This is reminiscent of a race condition between listing all active tasks and inspecting them.

@TinaMor is this always reproducible from a clean environment?

@apostasie It does not repro in a clean environment.

Thanks @TinaMor
i will look into it - though it might take some tlme.

let me know if this is something you hit often.