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

Error while removing volumes deletes entry from podman, which is a deviation from Docker behavior #11214

Closed
robbmanes opened this issue Aug 12, 2021 · 1 comment · Fixed by #11267
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

@robbmanes
Copy link
Contributor

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

/kind bug

Description
When using third-party volume drivers, if the volume driver returns an error when removing a volume (such as with podman volume rm) podman will remove the volume entry despite the error. This is different behavior than Docker or Moby, which instead returns the error and makes no changes to the volume.

The error message looks something like this:

# podman volume rm docvol1
Error: volume docvol1 could not be removed from plugin MYPLUGIN, but it has been removed from Podman: MYPLUGIN had some sort of error

Podman's behavior: https://github.com/containers/podman/blob/main/libpod/runtime_volume_linux.go#L286-L292

Moby's behavior: https://github.com/moby/moby/blob/master/volume/drivers/proxy.go#L71-L73

While it's probably good to clean this up, this is a difference in what some volume plugins expect to happen, so we've had volume driver providers reach out and ask for this behavior to be uniform across podman and Docker.

Output of podman version:

$ podman version
Version:      3.2.3
API Version:  3.2.3
Go Version:   go1.15.7
Built:        Tue Jul 27 03:29:39 2021
OS/Arch:      linux/amd64

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 12, 2021
@mheon mheon self-assigned this Aug 17, 2021
@mheon
Copy link
Member

mheon commented Aug 17, 2021

Going to try and get this one in for 3.3 final

mheon added a commit to mheon/libpod that referenced this issue Aug 18, 2021
Originally, Podman would unconditionally remove volumes from the
DB, even if they failed to be removed from the volume plugin;
this was a safety measure to ensure that `volume rm` can always
remove a volume from the database, even if the plugin is
misbehaving.

However, this is a significant deivation from Docker, which
refuses to remove if the plugin errors. These errors can be
legitimate configuration issues which the user should address
before the volume is removed, so Podman should also use this
behaviour.

Fixes containers#11214

Signed-off-by: Matthew Heon <[email protected]>
mheon added a commit to mheon/libpod that referenced this issue Aug 20, 2021
Originally, Podman would unconditionally remove volumes from the
DB, even if they failed to be removed from the volume plugin;
this was a safety measure to ensure that `volume rm` can always
remove a volume from the database, even if the plugin is
misbehaving.

However, this is a significant deivation from Docker, which
refuses to remove if the plugin errors. These errors can be
legitimate configuration issues which the user should address
before the volume is removed, so Podman should also use this
behaviour.

Fixes containers#11214

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 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 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.

2 participants