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

For 'podman run --rm', do not remove named volumes (align with Docker behaviour) #3071

Closed
undecaf opened this issue May 6, 2019 · 2 comments · Fixed by #3072
Closed

For 'podman run --rm', do not remove named volumes (align with Docker behaviour) #3071

undecaf opened this issue May 6, 2019 · 2 comments · Fixed by #3072
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 May 6, 2019

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

/kind feature

Description

podman run --rm -v some-vol:/some/where image removes some-vol after stopping the container whereas the same command with docker retains the volume (as per the Docker documentation).

It would be desirable to align Podman's behaviour with Docker's behaviour in this respect.

Steps to reproduce the issue:

  1. Create this Dockerfile:
FROM alpine
VOLUME /var
ENTRYPOINT ["/bin/sh"]
  1. podman build --tag vol-test .

  2. podman run --rm -v var-vol:/var vol-test

Describe the results you received:
podman volume ls shows that var-vol no longer exists

Describe the results you expected:
podman volume ls shows local var-vol

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

Output of podman version:

Version:            1.3.0-dev
RemoteAPI Version:  1
Go Version:         go1.10.4
OS/Arch:            linux/amd64

apt-cache policy podman => 1.3.0-1~dev~ubuntu18.04~ppa20

Output of podman info --debug:

debug:
  compiler: gc
  git commit: ""
  go version: go1.10.4
  podman version: 1.3.0-dev
host:
  BuildahVersion: 1.8-dev
  Conmon:
    package: 'conmon: /usr/libexec/crio/conmon'
    path: /usr/libexec/crio/conmon
    version: 'conmon version , commit: '
  Distribution:
    distribution: ubuntu
    version: "18.04"
  MemFree: 2992435200
  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-18-generic
  os: linux
  rootless: true
  uptime: 2h 11m 59.5s (Approximately 0.08 days)
insecure registries:
  registries: []
registries:
  registries:
  - 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: 4
  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-18-generic #19~18.04.1-Ubuntu SMP Fri Apr 5 10:22:13 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/feature Categorizes issue or PR as related to a new feature. label May 6, 2019
@mheon
Copy link
Member

mheon commented May 6, 2019

Hm. I think we might have regressed on this when we swapped podman cleanup over to the new localruntime - the removeVolume bool was flipped from false to true

mheon added a commit to mheon/libpod that referenced this issue May 6, 2019
This duplicates Docker behavior for the `--rm` flag.

Fixes containers#3071

Signed-off-by: Matthew Heon <[email protected]>
@mheon
Copy link
Member

mheon commented May 6, 2019

#3072 to fix

@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/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.

3 participants