summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-21 05:25:19 -0400
committerGitHub <noreply@github.com>2021-04-21 05:25:19 -0400
commit41677b192aac6ae2849aa792e4ded856773712fd (patch)
tree6825fc6742e92a24ebc7785aeabc0956d8f2ce8e /libpod/container_internal.go
parent0d3aa18f04aa72d23ddec1dac779c18ffb71cfb3 (diff)
parent6af4c08a50e02eb38ffa2be96359c14e10b5e5ba (diff)
downloadpodman-41677b192aac6ae2849aa792e4ded856773712fd.tar.gz
podman-41677b192aac6ae2849aa792e4ded856773712fd.tar.bz2
podman-41677b192aac6ae2849aa792e4ded856773712fd.zip
Merge pull request #8979 from haircommander/full-attach-path
Use full attach path, rather than a symlink
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index a53027ab2..041fa13e7 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -685,7 +685,11 @@ func (c *Container) removeIPv4Allocations() error {
// This is necessary for restarting containers
func (c *Container) removeConmonFiles() error {
// Files are allowed to not exist, so ignore ENOENT
- attachFile := filepath.Join(c.bundlePath(), "attach")
+ attachFile, err := c.AttachSocketPath()
+ if err != nil {
+ return errors.Wrapf(err, "failed to get attach socket path for container %s", c.ID())
+ }
+
if err := os.Remove(attachFile); err != nil && !os.IsNotExist(err) {
return errors.Wrapf(err, "error removing container %s attach file", c.ID())
}