summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_internal.go6
-rw-r--r--libpod/events/events_freebsd.go2
-rw-r--r--libpod/healthcheck_linux.go2
3 files changed, 8 insertions, 2 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index a7ea3c5c5..994243805 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -1286,6 +1286,12 @@ func (c *Container) stop(timeout uint) error {
c.lock.Unlock()
}
+ if c.config.HealthCheckConfig != nil {
+ if err := c.removeTransientFiles(context.Background()); err != nil {
+ logrus.Error(err.Error())
+ }
+ }
+
stopErr := c.ociRuntime.StopContainer(c, timeout, all)
if !c.batched {
diff --git a/libpod/events/events_freebsd.go b/libpod/events/events_freebsd.go
index 17d410089..90933fa2c 100644
--- a/libpod/events/events_freebsd.go
+++ b/libpod/events/events_freebsd.go
@@ -14,7 +14,7 @@ func NewEventer(options EventerOptions) (Eventer, error) {
case strings.ToUpper(LogFile.String()):
return EventLogFile{options}, nil
case strings.ToUpper(Null.String()):
- return NewNullEventer(), nil
+ return newNullEventer(), nil
case strings.ToUpper(Memory.String()):
return NewMemoryEventer(), nil
default:
diff --git a/libpod/healthcheck_linux.go b/libpod/healthcheck_linux.go
index 3fb6dfb91..6948f976a 100644
--- a/libpod/healthcheck_linux.go
+++ b/libpod/healthcheck_linux.go
@@ -70,7 +70,7 @@ func (c *Container) startTimer() error {
startFile := fmt.Sprintf("%s.service", c.ID())
startChan := make(chan string)
- if _, err := conn.StartUnitContext(context.Background(), startFile, "fail", startChan); err != nil {
+ if _, err := conn.RestartUnitContext(context.Background(), startFile, "fail", startChan); err != nil {
return err
}
if err := systemdOpSuccessful(startChan); err != nil {