diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-03-06 14:26:57 -0500 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-03-06 14:26:57 -0500 |
commit | 6c1630c682c955eef300938bd6eabf48ce5b2c4a (patch) | |
tree | 5f3b0aa734e7eaebe612842ec3a78421c0b576ca /libpod/container_internal.go | |
parent | cfe4c0c540ea3633ebbd30ccef4a9ff14d49a1ce (diff) | |
download | podman-6c1630c682c955eef300938bd6eabf48ce5b2c4a.tar.gz podman-6c1630c682c955eef300938bd6eabf48ce5b2c4a.tar.bz2 podman-6c1630c682c955eef300938bd6eabf48ce5b2c4a.zip |
Change LookupContainer logic to match Docker
When looking up a container or pod by from user input, we handle
collisions between names and IDs differently than Docker at
present.
In Docker, when there is a container with an ID starting with
"c1" and a container named "c1", commands on "c1" will always act
on the container named "c1". For the same scenario in podman, we
throw an error about name collision.
Change Podman to follow Docker, by returning the named container
or pod instead of erroring.
This should also have a positive effect on performance in the
lookup-by-full-name case, which no longer needs to fully traverse
the list of all pods or containers.
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/container_internal.go')
0 files changed, 0 insertions, 0 deletions