diff options
author | W. Trevor King <wking@tremily.us> | 2019-05-29 20:15:32 -0700 |
---|---|---|
committer | W. Trevor King <wking@tremily.us> | 2019-05-29 20:19:41 -0700 |
commit | 317a5c72c6bff47be1c562222995745a7159d6de (patch) | |
tree | 3ac34191d47a82dd831553ed5578ec27b2441211 /libpod/container_internal.go | |
parent | c871653e195d8051ddfb899c2b73cc95de8e6443 (diff) | |
download | podman-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/container_internal.go')
-rw-r--r-- | libpod/container_internal.go | 4 |
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 } |