Skip to content
This repository was archived by the owner on Apr 3, 2018. It is now read-only.

Commit c3663b2

Browse files
author
James O. D. Hunt
committed
pod: Run post-start hooks outside netns
Synchronise RunPod() with StartPod() by making the post-start hooks run outside of the network namespace. This looks like an oversight from ab994f0. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
1 parent e62b2ae commit c3663b2

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

api.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,8 @@ func RunPod(podConfig PodConfig) (VCPod, error) {
276276
return nil, err
277277
}
278278

279-
// Execute poststart hooks inside netns
280-
err = p.network.run(networkNS.NetNsPath, func() error {
281-
return p.config.Hooks.postStartHooks()
282-
})
283-
if err != nil {
279+
// Execute poststart hooks
280+
if err := p.config.Hooks.postStartHooks(); err != nil {
284281
return nil, err
285282
}
286283

0 commit comments

Comments
 (0)