summaryrefslogtreecommitdiff
path: root/pkg/machine
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-20 14:03:13 +0000
committerGitHub <noreply@github.com>2021-10-20 14:03:13 +0000
commit09aade7816e096550e805869f1300d7198aa8f91 (patch)
tree77ad099aae7e8189eb22bdf2afa40b4651f2384b /pkg/machine
parentc15c1540837b25305729bc72d61372098e204151 (diff)
parent46f7d2af189530a1f81d5e0aab5244667846e181 (diff)
downloadpodman-09aade7816e096550e805869f1300d7198aa8f91.tar.gz
podman-09aade7816e096550e805869f1300d7198aa8f91.tar.bz2
podman-09aade7816e096550e805869f1300d7198aa8f91.zip
Merge pull request #12040 from mheon/341_release
Bump to v3.4.1
Diffstat (limited to 'pkg/machine')
-rw-r--r--pkg/machine/pull.go2
-rw-r--r--pkg/machine/qemu/machine.go16
2 files changed, 17 insertions, 1 deletions
diff --git a/pkg/machine/pull.go b/pkg/machine/pull.go
index f79ac6ec4..3c8422a30 100644
--- a/pkg/machine/pull.go
+++ b/pkg/machine/pull.go
@@ -15,7 +15,7 @@ import (
"time"
"github.com/containers/image/v5/pkg/compression"
- "github.com/docker/docker/pkg/archive"
+ "github.com/containers/storage/pkg/archive"
"github.com/sirupsen/logrus"
"github.com/vbauerster/mpb/v6"
"github.com/vbauerster/mpb/v6/decor"
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index d0f48da5f..03197fef1 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -460,6 +460,22 @@ func (v *MachineVM) Remove(name string, opts machine.RemoveOptions) (string, fun
for _, msg := range files {
confirmationMessage += msg + "\n"
}
+
+ // Get path to socket and pidFile before we do any cleanups
+ qemuSocketFile, pidFile, errSocketFile := v.getSocketandPid()
+ //silently try to delete socket and pid file
+ //remove socket and pid file if any: warn at low priority if things fail
+ if errSocketFile == nil {
+ // Remove the pidfile
+ if err := os.Remove(pidFile); err != nil && !errors.Is(err, os.ErrNotExist) {
+ logrus.Debugf("Error while removing pidfile: %v", err)
+ }
+ // Remove socket
+ if err := os.Remove(qemuSocketFile); err != nil && !errors.Is(err, os.ErrNotExist) {
+ logrus.Debugf("Error while removing podman-machine-socket: %v", err)
+ }
+ }
+
confirmationMessage += "\n"
return confirmationMessage, func() error {
for _, f := range files {