mirror of
https://github.com/containers/podman.git
synced 2025-05-17 15:18:43 +08:00
Deprecate & remove IsCtrSpecific in favor of IsAnon
In Podman 1.6.3, we added support for anonymous volumes - fixing our old, broken support for named volumes that were created with containers. Unfortunately, this reused the database field we used for the old implementation, and toggled volume removal on for `podman run --rm` - so now, we were removing *named* volumes created with older versions of Podman. We can't modify these old volumes in the DB, so the next-safest thing to do is swap to a new field to indicate volumes should be removed. Problem: Volumes created with 1.6.3 and up until this lands, even anonymous volumes, will not be removed. However, this is safer than removing too many volumes, as we were doing before. Fixes #5009 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -137,7 +137,7 @@ func (c *Container) Commit(ctx context.Context, destImage string, options Contai
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "volume %s used in container %s has been removed", v.Name, c.ID())
|
||||
}
|
||||
if vol.IsCtrSpecific() {
|
||||
if vol.Anonymous() {
|
||||
importBuilder.AddVolume(v.Dest)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user