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

'volume rm' removes an arbitrary volume if the volume name is ambiguous #3635

Closed
undecaf opened this issue Jul 23, 2019 · 3 comments · Fixed by #3641
Closed

'volume rm' removes an arbitrary volume if the volume name is ambiguous #3635

undecaf opened this issue Jul 23, 2019 · 3 comments · Fixed by #3641
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

@undecaf
Copy link

undecaf commented Jul 23, 2019

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

If there are multiple volumes whose names start with the same character(s) (such as a1, a2) then podman volume rm a removes one of these volumes although a is ambiguous. This concerns named volumes as well as volumes identified by their hashes.

Steps to reproduce the issue:

  1. podman volume create a1
    podman volume create a2

  2. podman volume rm a

Describe the results you received:
Either volume a1 or a2 is removed.

Describe the results you expected:
Podman should not remove any volume. Instead it should complain about the ambiguous volume name.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Version:            1.4.3
RemoteAPI Version:  1
Go Version:         go1.10.4
OS/Arch:            linux/amd64

Output of podman info --debug:

debug:
  compiler: gc
  git commit: ""
  go version: go1.10.4
  podman version: 1.4.3
host:
  BuildahVersion: 1.9.0
  Conmon:
    package: 'conmon: /usr/libexec/podman/conmon'
    path: /usr/libexec/podman/conmon
    version: 'conmon version 1.0.0-rc2, commit: unknown'
  Distribution:
    distribution: ubuntu
    version: "18.04"
  MemFree: 5768183808
  MemTotal: 8050257920
  OCIRuntime:
    package: 'cri-o-runc: /usr/bin/runc'
    path: /usr/bin/runc
    version: 'runc version spec: 1.0.1-dev'
  SwapFree: 0
  SwapTotal: 0
  arch: amd64
  cpus: 4
  hostname: hestia
  kernel: 4.18.0-25-generic
  os: linux
  rootless: true
  uptime: 30m 34.8s
registries:
  blocked: null
  insecure: null
  search:
  - docker.io
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
store:
  ConfigFile: /home/kasper/.config/containers/storage.conf
  ContainerStore:
    number: 6
  GraphDriverName: vfs
  GraphOptions: null
  GraphRoot: /home/kasper/.local/share/containers/storage
  GraphStatus: {}
  ImageStore:
    number: 19
  RunRoot: /tmp/1000
  VolumePath: /home/kasper/.local/share/containers/storage/volumes

Additional environment details (AWS, VirtualBox, physical, etc.):

$ uname -a
Linux hestia 4.18.0-25-generic #26~18.04.1-Ubuntu SMP Thu Jun 27 07:28:31 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 23, 2019
@mheon
Copy link
Member

mheon commented Jul 23, 2019

I'll take this one - pretty sure I know where the problem is.

@mheon mheon self-assigned this Jul 23, 2019
mheon added a commit to mheon/libpod that referenced this issue Jul 24, 2019
We should not be fuzzy matching on image names. Docker doesn't do
it, and it doesn't make much sense.

Fixes containers#3635

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
@mheon
Copy link
Member

mheon commented Jul 24, 2019

#3641 to fix

mheon added a commit to mheon/libpod that referenced this issue Jul 24, 2019
We should not be fuzzy matching on image names. Docker doesn't do
it, and it doesn't make much sense.

Fixes containers#3635

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
@undecaf
Copy link
Author

undecaf commented Jul 24, 2019

Thank you!

@undecaf undecaf closed this as completed Jul 24, 2019
mheon added a commit to mheon/libpod that referenced this issue Jul 25, 2019
We should not be fuzzy matching on volume names. Docker doesn't
do  it, and it doesn't make much sense. Everything requires exact
matches for names - only IDs allow partial matches.

Fixes containers#3635

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
@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