Project

General

Profile

Actions

Feature #44055

closed

cephadm: make 'ls' faster

Added by Sage Weil about 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cephadm (binary)
Target version:
-
% Done:

80%

Source:
Tags:
performance
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

For both podman and docker, 'ps' tells you the image name but not its hash.

With podman, you can do:

- podman image list -a --format=json
- podman ps -a --format=json

and cross-reference against the image history list to see if there are multiple images with the name name+tag. If so, inspect those containers.

With docker, you can do

- docker ps --format='{{.ID}},{{.Image}},{{.Names}}'

Unlike podman, the .Image field here is the name+tag (podman only shows this if it is the most recent, AFACIS; otherwise you have to look in the history list). Similarly, though, if we see multiple images with the same name+tag, then we can inspect just those containers.

The net of this would be two very fast (~100ms) commands instead of an inspect for every container (which nets out to ~3.5 seconds on my host with ~25 containers).


Related issues 1 (0 open1 closed)

Related to Orchestrator - Feature #47139: Require a minimum version for podman/dockerResolvedMichael Fritch

Actions
Actions

Also available in: Atom PDF