diff options
author | Brent Baude <bbaude@redhat.com> | 2020-04-13 10:53:24 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2020-04-13 13:08:04 -0500 |
commit | 90ead05903e9c42758c1052c2ee623dca8de5e98 (patch) | |
tree | 60fc9e4b574c4b2d927c62907e27e7902440a51f /cmd/podmanV2/pods | |
parent | 465b4bc563b274ec166868aae079a65ee0284b1d (diff) | |
download | podman-90ead05903e9c42758c1052c2ee623dca8de5e98.tar.gz podman-90ead05903e9c42758c1052c2ee623dca8de5e98.tar.bz2 podman-90ead05903e9c42758c1052c2ee623dca8de5e98.zip |
Fixes for load and other system tests
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podmanV2/pods')
-rw-r--r-- | cmd/podmanV2/pods/create.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cmd/podmanV2/pods/create.go b/cmd/podmanV2/pods/create.go index ab8957ee3..2aaf0cd2c 100644 --- a/cmd/podmanV2/pods/create.go +++ b/cmd/podmanV2/pods/create.go @@ -123,6 +123,21 @@ func create(cmd *cobra.Command, args []string) error { } } + if !createOptions.Infra { + if cmd.Flag("infra-command").Changed { + return errors.New("cannot set infra-command without an infra container") + } + createOptions.InfraCommand = "" + if cmd.Flag("infra-image").Changed { + return errors.New("cannot set infra-image without an infra container") + } + createOptions.InfraImage = "" + if cmd.Flag("share").Changed { + return errors.New("cannot set share namespaces without an infra container") + } + createOptions.Share = nil + } + response, err := registry.ContainerEngine().PodCreate(context.Background(), createOptions) if err != nil { return err |