aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-12-07 10:32:58 -0800
committerGitHub <noreply@github.com>2018-12-07 10:32:58 -0800
commitd6ce797edb415c1a0c23e8d72ed2771586b8c219 (patch)
tree4f3b2ce4847be5152aac7b5c01e3b5ec162ab9a6
parent5073638d83b4f466fda434e6a06ad8bab9eef321 (diff)
parent176f76d7940f6b5c2599d0bb107db59ee14caf5a (diff)
downloadpodman-d6ce797edb415c1a0c23e8d72ed2771586b8c219.tar.gz
podman-d6ce797edb415c1a0c23e8d72ed2771586b8c219.tar.bz2
podman-d6ce797edb415c1a0c23e8d72ed2771586b8c219.zip
Merge pull request #1955 from mheon/fix_hooks_not_exist
Fix errors where OCI hooks directory does not exist
-rw-r--r--libpod/container_internal.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 0148e3e7c..f69acb33b 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -1228,6 +1228,10 @@ func (c *Container) setupOCIHooks(ctx context.Context, config *spec.Spec) (exten
manager, err := hooks.New(ctx, c.runtime.config.HooksDir, []string{"poststop"}, lang)
if err != nil {
+ if os.IsNotExist(err) {
+ logrus.Warnf("Requested OCI hooks directory %q does not exist", c.runtime.config.HooksDir)
+ return nil, nil
+ }
return nil, err
}