aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2019-05-29 20:15:32 -0700
committerW. Trevor King <wking@tremily.us>2019-05-29 20:19:41 -0700
commit317a5c72c6bff47be1c562222995745a7159d6de (patch)
tree3ac34191d47a82dd831553ed5578ec27b2441211 /libpod
parentc871653e195d8051ddfb899c2b73cc95de8e6443 (diff)
downloadpodman-317a5c72c6bff47be1c562222995745a7159d6de.tar.gz
podman-317a5c72c6bff47be1c562222995745a7159d6de.tar.bz2
podman-317a5c72c6bff47be1c562222995745a7159d6de.zip
libpod/container_internal: Make all errors loading explicitly configured hook dirs fatal
Remove this IsNotExist out which was added along with the rest of this block in f6a2b6bf2b (hooks: Add pre-create hooks for runtime-config manipulation, 2018-11-19, #1830). Besides the obvious "hook directory does not exist", it was swallowing the less-obvious "hook command does not exist". And either way, folks are likely going to want non-zero podman exits when we fail to load a hook directory they explicitly pointed us towards. Signed-off-by: W. Trevor King <wking@tremily.us>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_internal.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 5f8dd1c72..b363c193a 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -1407,10 +1407,6 @@ func (c *Container) setupOCIHooks(ctx context.Context, config *spec.Spec) (exten
} else {
manager, err := hooks.New(ctx, c.runtime.config.HooksDir, []string{"precreate", "poststop"})
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
}