Description
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When running 'podman start/stop/kill/restart' and multiple containers match a given partial Container ID, the incorrect error message is displayed.
> podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ecab208ac3d4 docker.io/library/httpd:latest httpd-foreground 4 minutes ago Up 4 minutes ago serene_villani
e1f97e2c9bf1 docker.io/library/httpd:latest httpd-foreground 4 minutes ago Up 4 minutes ago objective_dhawan
> podman stop e
Error: invalid character '{' after top-level value
Steps to reproduce the issue:
-
Create multiple containers until there are at least 2 with the same starting character(s)
-
Run a podman start/stop/kill/restart command such as 'podman stop abc'
-
Observe incorrect error message
Describe the results you received:
'Error: invalid character '{' after top-level value'
Describe the results you expected:
An error more in line with the error from running the 'podman rm' command such as:
'Error: more than one result for container ID '
Additional information you deem important (e.g. issue happens only occasionally):
Just an incorrect error message. Does not appear to have any other negative impact.
Output of podman version
:
Client:
Version: 3.4.4
API Version: 3.4.4
Go Version: go1.17.3
Built: Wed Dec 8 18:41:11 2021
OS/Arch: darwin/amd64
Server:
Version: 3.4.4
API Version: 3.4.4
Go Version: go1.16.8
Built: Wed Dec 8 21:45:07 2021
OS/Arch: linux/amd64
Output of podman info --debug
:
host:
arch: amd64
buildahVersion: 1.23.1
cgroupControllers:
- memory
- pids
cgroupManager: systemd
cgroupVersion: v2
conmon:
package: conmon-2.0.30-2.fc35.x86_64
path: /usr/bin/conmon
version: 'conmon version 2.0.30, commit: '
cpus: 1
distribution:
distribution: fedora
variant: coreos
version: "35"
eventLogger: journald
hostname: localhost.localdomain
idMappings:
gidmap:
- container_id: 0
host_id: 1000
size: 1
- container_id: 1
host_id: 100000
size: 65536
uidmap:
- container_id: 0
host_id: 1000
size: 1
- container_id: 1
host_id: 100000
size: 65536
kernel: 5.15.10-200.fc35.x86_64
linkmode: dynamic
logDriver: journald
memFree: 1552265216
memTotal: 2061385728
ociRuntime:
name: crun
package: crun-1.4-1.fc35.x86_64
path: /usr/bin/crun
version: |-
crun version 1.4
commit: 3daded072ef008ef0840e8eccb0b52a7efbd165d
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
os: linux
remoteSocket:
exists: true
path: /run/user/1000/podman/podman.sock
security:
apparmorEnabled: false
capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
rootless: true
seccompEnabled: true
seccompProfilePath: /usr/share/containers/seccomp.json
selinuxEnabled: true
serviceIsRemote: true
slirp4netns:
executable: /usr/bin/slirp4netns
package: slirp4netns-1.1.12-2.fc35.x86_64
version: |-
slirp4netns version 1.1.12
commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
libslirp: 4.6.1
SLIRP_CONFIG_VERSION_MAX: 3
libseccomp: 2.5.3
swapFree: 0
swapTotal: 0
uptime: 46h 18m 20.23s (Approximately 1.92 days)
plugins:
log:
- k8s-file
- none
- journald
network:
- bridge
- macvlan
volume:
- local
registries:
search:
- docker.io
store:
configFile: /var/home/core/.config/containers/storage.conf
containerStore:
number: 0
paused: 0
running: 0
stopped: 0
graphDriverName: overlay
graphOptions: {}
graphRoot: /var/home/core/.local/share/containers/storage
graphStatus:
Backing Filesystem: xfs
Native Overlay Diff: "true"
Supports d_type: "true"
Using metacopy: "false"
imageStore:
number: 4
runRoot: /run/user/1000/containers
volumePath: /var/home/core/.local/share/containers/storage/volumes
version:
APIVersion: 3.4.4
Built: 1638999907
BuiltTime: Wed Dec 8 21:45:07 2021
GitCommit: ""
GoVersion: go1.16.8
OsArch: linux/amd64
Version: 3.4.4
Package info (e.g. output of rpm -q podman
or apt list podman
):
brew info podman
podman: stable 3.4.4 (bottled), HEAD
Tool for managing OCI containers and pods
https://podman.io/
/usr/local/Cellar/podman/3.4.4 (170 files, 40MB) *
Poured from bottle on 2021-12-15 at 14:36:38
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/podman.rb
License: Apache-2.0
==> Dependencies
Build: go ✘, go-md2man ✘
Required: qemu ✔
==> Options
--HEAD
Install HEAD version
==> Caveats
zsh completions have been installed to:
/usr/local/share/zsh/site-functions
==> Analytics
install: 9,725 (30 days), 35,068 (90 days), 84,575 (365 days)
install-on-request: 9,721 (30 days), 35,075 (90 days), 84,567 (365 days)
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
MacOS