summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/config.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-08-04 10:12:27 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-05 10:43:32 +0000
commita1e3e542fff562d885354c55f04e0b7f5097a39b (patch)
tree7209d164b97252913bd8533a4326d53629e7566d /pkg/varlinkapi/config.go
parentdebf23c72ae1638a7efb294b6df9497224978d01 (diff)
downloadpodman-a1e3e542fff562d885354c55f04e0b7f5097a39b.tar.gz
podman-a1e3e542fff562d885354c55f04e0b7f5097a39b.tar.bz2
podman-a1e3e542fff562d885354c55f04e0b7f5097a39b.zip
Make one runtime for the varlink service
Rather than making a runtime each time a client hits a varlink endpoint, we now make a single runtime when the varlink service starts up. This fixes a problem where we hit a max inotify limit from CNI. Resolves: #1211 Signed-off-by: baude <bbaude@redhat.com> Closes: #1215 Approved by: rhatdan
Diffstat (limited to 'pkg/varlinkapi/config.go')
-rw-r--r--pkg/varlinkapi/config.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/varlinkapi/config.go b/pkg/varlinkapi/config.go
index 3c6a3311c..2da3787be 100644
--- a/pkg/varlinkapi/config.go
+++ b/pkg/varlinkapi/config.go
@@ -2,6 +2,7 @@ package varlinkapi
import (
ioprojectatomicpodman "github.com/projectatomic/libpod/cmd/podman/varlink"
+ "github.com/projectatomic/libpod/libpod"
"github.com/urfave/cli"
)
@@ -9,10 +10,11 @@ import (
type LibpodAPI struct {
Cli *cli.Context
ioprojectatomicpodman.VarlinkInterface
+ Runtime *libpod.Runtime
}
// New creates a new varlink client
-func New(cli *cli.Context) *ioprojectatomicpodman.VarlinkInterface {
- lp := LibpodAPI{Cli: cli}
+func New(cli *cli.Context, runtime *libpod.Runtime) *ioprojectatomicpodman.VarlinkInterface {
+ lp := LibpodAPI{Cli: cli, Runtime: runtime}
return ioprojectatomicpodman.VarlinkNew(&lp)
}