From 317a5c72c6bff47be1c562222995745a7159d6de Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 29 May 2019 20:15:32 -0700 Subject: 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 --- libpod/container_internal.go | 4 ---- 1 file changed, 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 } -- cgit v1.2.3-54-g00ecf