diff options
author | W. Trevor King <wking@tremily.us> | 2018-05-11 13:03:28 -0700 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-05-14 21:36:48 +0000 |
commit | 45838b9561977f3e79cf2e61c7ed0dfd9badb303 (patch) | |
tree | 40dc9cd883b07f47b36589ff7b77c32c6304f669 /libpod | |
parent | 69a6cb255ca98bc7a9e6d47c7a0ccaacab895a25 (diff) | |
download | podman-45838b9561977f3e79cf2e61c7ed0dfd9badb303.tar.gz podman-45838b9561977f3e79cf2e61c7ed0dfd9badb303.tar.bz2 podman-45838b9561977f3e79cf2e61c7ed0dfd9badb303.zip |
hooks: Add package support for extension stages
We aren't consuming this yet, but these pkg/hooks changes lay the
groundwork for future libpod changes to support post-exit hooks [1,2].
[1]: https://github.com/projectatomic/libpod/issues/730
[2]: https://github.com/opencontainers/runc/issues/1797
Signed-off-by: W. Trevor King <wking@tremily.us>
Closes: #758
Approved by: rhatdan
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_internal.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index b0f39fec8..5168e987b 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -1333,7 +1333,7 @@ func (c *Container) setupOCIHooks(ctx context.Context, g *generate.Generator) er } } - manager, err := hooks.New(ctx, []string{c.runtime.config.HooksDir}, lang) + manager, err := hooks.New(ctx, []string{c.runtime.config.HooksDir}, []string{}, lang) if err != nil { if c.runtime.config.HooksDirNotExistFatal || !os.IsNotExist(err) { return err @@ -1342,5 +1342,6 @@ func (c *Container) setupOCIHooks(ctx context.Context, g *generate.Generator) er return nil } - return manager.Hooks(g.Spec(), c.Spec().Annotations, len(c.config.UserVolumes) > 0) + _, err = manager.Hooks(g.Spec(), c.Spec().Annotations, len(c.config.UserVolumes) > 0) + return err } |