Merge pull request #23271 from giuseppe/drop-unmount-for-overlay-storage

test: podman system service doesn't leak mount on termination
This commit is contained in:
openshift-merge-bot[bot]
2024-07-15 12:20:11 +00:00
committed by GitHub
6 changed files with 18 additions and 18 deletions

View File

@@ -33,7 +33,6 @@ import (
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
)
var (
@@ -1057,16 +1056,6 @@ func rmAll(podmanBin string, path string) {
GinkgoWriter.Printf("%v\n", err)
}
} else {
// When using overlay as root, podman leaves a stray mount behind.
// This leak causes remote tests to take a loooooong time, which
// then causes Cirrus to time out. Unmount that stray.
overlayPath := path + "/root/overlay"
if _, err := os.Stat(overlayPath); err == nil {
if err = unix.Unmount(overlayPath, unix.MNT_DETACH); err != nil {
GinkgoWriter.Printf("Error unmounting %s: %v\n", overlayPath, err)
}
}
if err = os.RemoveAll(path); err != nil {
GinkgoWriter.Printf("%q\n", err)
}

View File

@@ -103,7 +103,7 @@ func (p *PodmanTestIntegration) StartRemoteService() {
}
func (p *PodmanTestIntegration) StopRemoteService() {
if err := p.RemoteSession.Kill(); err != nil {
if err := p.RemoteSession.Signal(syscall.SIGTERM); err != nil {
GinkgoWriter.Printf("unable to clean up service %d, %v\n", p.RemoteSession.Pid, err)
}
if _, err := p.RemoteSession.Wait(); err != nil {