summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-15 00:18:53 +0200
committerGitHub <noreply@github.com>2019-06-15 00:18:53 +0200
commit90e3c9002b2293569e0cec168a30ecb962b00034 (patch)
tree709da03b7768049b8a8f1228e29905a8ce40c635
parentcba622b6097959d7659d4cfa05637cce672b87d6 (diff)
parentc866e441d026350a3216f46e36e77278784b6afc (diff)
downloadpodman-90e3c9002b2293569e0cec168a30ecb962b00034.tar.gz
podman-90e3c9002b2293569e0cec168a30ecb962b00034.tar.bz2
podman-90e3c9002b2293569e0cec168a30ecb962b00034.zip
Merge pull request #3328 from mheon/storage_opts_for_cleanup
When creating exit command, pass storage options on
-rw-r--r--cmd/podman/main.go3
-rw-r--r--cmd/podman/main_local.go2
-rw-r--r--pkg/spec/createconfig.go4
-rw-r--r--test/e2e/runlabel_test.go1
4 files changed, 9 insertions, 1 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index a149a47f9..cbca32cc8 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -104,6 +104,9 @@ func before(cmd *cobra.Command, args []string) error {
logrus.Errorf(err.Error())
os.Exit(1)
}
+ if err := setSyslog(); err != nil {
+ return err
+ }
if err := setupRootless(cmd, args); err != nil {
return err
}
diff --git a/cmd/podman/main_local.go b/cmd/podman/main_local.go
index b4f21bd0c..132f35ab5 100644
--- a/cmd/podman/main_local.go
+++ b/cmd/podman/main_local.go
@@ -48,7 +48,7 @@ func init() {
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.Runtime, "runtime", "", "Path to the OCI-compatible binary used to run containers, default is /usr/bin/runc")
// -s is depracated due to conflict with -s on subcommands
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.StorageDriver, "storage-driver", "", "Select which storage driver is used to manage storage of images and containers (default is overlay)")
- rootCmd.PersistentFlags().StringSliceVar(&MainGlobalOpts.StorageOpts, "storage-opt", []string{}, "Used to pass an option to the storage driver")
+ rootCmd.PersistentFlags().StringArrayVar(&MainGlobalOpts.StorageOpts, "storage-opt", []string{}, "Used to pass an option to the storage driver")
rootCmd.PersistentFlags().BoolVar(&MainGlobalOpts.Syslog, "syslog", false, "Output logging information to syslog as well as the console")
rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.TmpDir, "tmpdir", "", "Path to the tmp directory")
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go
index ed8036a54..a8413d6c7 100644
--- a/pkg/spec/createconfig.go
+++ b/pkg/spec/createconfig.go
@@ -162,6 +162,10 @@ func (c *CreateConfig) createExitCommand(runtime *libpod.Runtime) ([]string, err
if config.StorageConfig.GraphDriverName != "" {
command = append(command, []string{"--storage-driver", config.StorageConfig.GraphDriverName}...)
}
+ for _, opt := range config.StorageConfig.GraphDriverOptions {
+ command = append(command, []string{"--storage-opt", opt}...)
+ }
+
if c.Syslog {
command = append(command, "--syslog", "true")
}
diff --git a/test/e2e/runlabel_test.go b/test/e2e/runlabel_test.go
index 5ef68603e..4e2cb501e 100644
--- a/test/e2e/runlabel_test.go
+++ b/test/e2e/runlabel_test.go
@@ -85,6 +85,7 @@ var _ = Describe("podman container runlabel", func() {
})
It("podman container runlabel global options", func() {
+ Skip("Test nonfunctional for podman-in-podman testing")
image := "podman-global-test:ls"
podmanTest.BuildImage(GlobalDockerfile, image, "false")
result := podmanTest.Podman([]string{"--syslog", "--log-level", "debug", "container", "runlabel", "RUN", image})