From da70c9db6fb92c69d722d51873840c4e54dbe86d Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Thu, 21 Feb 2019 09:24:34 -0500 Subject: When location of c/storage root changes, set VolumePath We want named volumes to be created in a subdirectory of the c/storage graph root, the same as the libpod root directory is now. As such, we need to adjust its location when the graph root changes location. Also, make a change to how we set the default. There's no need to explicitly set it every time we initialize via an option - that might conflict with WithStorageConfig setting it based on graph root changes. Instead, just initialize it in the default config like our other settings. Signed-off-by: Matthew Heon --- cmd/podman/libpodruntime/runtime.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cmd/podman') diff --git a/cmd/podman/libpodruntime/runtime.go b/cmd/podman/libpodruntime/runtime.go index 880b281bd..f4ddf3521 100644 --- a/cmd/podman/libpodruntime/runtime.go +++ b/cmd/podman/libpodruntime/runtime.go @@ -21,7 +21,7 @@ func GetRuntime(c *cliconfig.PodmanCommand) (*libpod.Runtime, error) { func getRuntime(c *cliconfig.PodmanCommand, renumber bool) (*libpod.Runtime, error) { options := []libpod.RuntimeOption{} - storageOpts, volumePath, err := util.GetDefaultStoreOptions() + storageOpts, _, err := util.GetDefaultStoreOptions() if err != nil { return nil, err } @@ -120,7 +120,6 @@ func getRuntime(c *cliconfig.PodmanCommand, renumber bool) (*libpod.Runtime, err infraCommand, _ := c.Flags().GetString("infra-command") options = append(options, libpod.WithDefaultInfraCommand(infraCommand)) } - options = append(options, libpod.WithVolumePath(volumePath)) if c.Flags().Changed("config") { return libpod.NewRuntimeFromConfig(c.GlobalFlags.Config, options...) } -- cgit v1.2.3-54-g00ecf