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' requires complete volume name instead of unambiguous volume name #3891

Closed
undecaf opened this issue Aug 27, 2019 · 6 comments · Fixed by #3896
Closed

'volume rm' requires complete volume name instead of unambiguous volume name #3891

undecaf opened this issue Aug 27, 2019 · 6 comments · Fixed by #3896
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. 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 Aug 27, 2019

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

/kind bug

Description

podman volume rm requires the complete volume name whereas containers can be identified by an unambiguous abbreviation of their name.

Steps to reproduce the issue:

  1. podman volume create a
    podman volume create insanelylonghashstring

  2. # i unambiguously identifies insanelylonghashstring
    podman volume rm i

Describe the results you received:
Error: volume with name i not found: no such volume, volume still existing

Describe the results you expected:
insanelylonghashstring, volume removed

Additional information you deem important (e.g. issue happens only occasionally):
May be related to #3635.

Output of podman version:

Version:            1.5.0
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.5.0
host:
  BuildahVersion: 1.10.1
  Conmon:
    package: 'conmon: /usr/libexec/podman/conmon'
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.0, commit: unknown'
  Distribution:
    distribution: ubuntu
    version: "18.04"
  MemFree: 43922792448
  MemTotal: 50628587520
  OCIRuntime:
    package: 'containerd.io: /usr/sbin/runc'
    path: /usr/sbin/runc
    version: |-
      runc version 1.0.0-rc6+dev
      commit: 2b18fe1d885ee5083ef9f0838fee39b62d653e30
      spec: 1.0.1-dev
  SwapFree: 0
  SwapTotal: 0
  arch: amd64
  cpus: 16
  eventlogger: journald
  hostname: poseidon
  kernel: 5.0.0-25-generic
  os: linux
  rootless: true
  uptime: 6h 57m 40.34s (Approximately 0.25 days)
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: 0
  GraphDriverName: vfs
  GraphOptions: null
  GraphRoot: /home/kasper/.local/share/containers/storage
  GraphStatus: {}
  ImageStore:
    number: 20
  RunRoot: /tmp/1000
  VolumePath: /home/kasper/.local/share/containers/storage/volumes

Package info (e.g. output of rpm -q podman or apt list podman):

podman/bionic,now 1.5.0-2~ubuntu18.04~ppa5 amd64  [installiert]

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

$ uname -a
Linux poseidon 5.0.0-25-generic #26~18.04.1-Ubuntu SMP Thu Aug 1 13:51:02 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.3 LTS"
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 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 Aug 27, 2019
@mheon
Copy link
Member

mheon commented Aug 27, 2019

I think we went a bit too far when fixing #3635 then.

I'll take this one.

@mheon mheon self-assigned this Aug 27, 2019
@mheon
Copy link
Member

mheon commented Aug 27, 2019

Hm. I'm actually not sure this is intended to work.

Docker requires a full volume name to remove a volume; docker create abcd; docker rm a on an empty state (so no conflicting names) errors that there is no volume with the name a.

We could consider adding this, but I'm retagging as a feature request, not a bug, given this doesn't appear to be Docker behavior.

@mheon mheon added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/bug Categorizes issue or PR as related to a bug. labels Aug 27, 2019
@mheon
Copy link
Member

mheon commented Aug 27, 2019

I think we want to allow these lookup operations only for volume commands - rm, inspect.

Adding volumes to containers with -v and --mount will continue to require exact name matching.

@undecaf
Copy link
Author

undecaf commented Aug 27, 2019

@mheon I am sorry that I did not take a look at Docker first.
Nevertheless, being able to abbreviate volume names in certain situations would be a nice time-saver.

@rhatdan
Copy link
Member

rhatdan commented Aug 28, 2019

Well @undecaf Looks like @mheon is taking a stab at supporting shorter names, Please try it out and see if it satisfies your needs.

@undecaf
Copy link
Author

undecaf commented Aug 29, 2019

@rhatdan @mheon Thanks! And will do ...

@undecaf undecaf closed this as completed Aug 29, 2019
mheon added a commit to mheon/libpod that referenced this issue Sep 9, 2019
This isn't included in Docker, but seems handy enough.

Use the new API for 'volume rm' and 'volume inspect'.

Fixes containers#3891

Signed-off-by: Matthew Heon <[email protected]>
@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 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. 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.

4 participants