Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inappropriate error triggered when container and pod ID have a partial match #3487

Closed
marcov opened this issue Jul 3, 2019 · 3 comments · Fixed by #3488
Closed

Inappropriate error triggered when container and pod ID have a partial match #3487

marcov opened this issue Jul 3, 2019 · 3 comments · Fixed by #3488
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@marcov
Copy link
Collaborator

marcov commented Jul 3, 2019

/kind bug

Description

When a container ID and a pod ID share a a common prefix, trying to address to the container or to the pod with that prefix results in:

Error: more than one result for container ID <prefix>: container already exists

I understand that IDs are unique for {containers ∪ pods}, but the error message is not making it obvious.
Even better if it is possible to distinguish between pods and containers and avoid triggering this error.

Steps to reproduce the issue:

  1. Run a container inside a pod, and make the container and pod ID have a common prefix.
  2. podman rm <prefix>

Describe the results you received:

Error: more than one result for container ID <prefix>: container already exists

Describe the results you expected:

The container should be removed without any errors.

Output of podman version:
git 3b9ce8a

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 3, 2019
@vrothberg
Copy link
Member

Hi @marcov, thanks for the report! Are you interested in fixing that?

I agree that the removal should check the object type, if possible.

@marcov
Copy link
Collaborator Author

marcov commented Jul 3, 2019

Thanks @vrothberg, sure, that's something I am interested in.

@vrothberg
Copy link
Member

Awesome, thanks @marcov !

marcov added a commit to marcov/libpod that referenced this issue Jul 3, 2019
When specifying a podman command with a partial ID, container and pod
commands matches respectively only containers or pods IDs in the BoltDB.

Fixes: containers#3487
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants