From f8ede7c5ed01324f47ebc01f69c11ab1046e1ebb Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Wed, 20 Oct 2021 09:11:57 -0600 Subject: System tests: confirm that -a and -l clash ...and fix one instance where there was no check Signed-off-by: Ed Santiago --- cmd/podman/containers/start.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmd/podman') diff --git a/cmd/podman/containers/start.go b/cmd/podman/containers/start.go index 1163b9093..8813fc273 100644 --- a/cmd/podman/containers/start.go +++ b/cmd/podman/containers/start.go @@ -87,6 +87,9 @@ func validateStart(cmd *cobra.Command, args []string) error { if len(args) == 0 && !startOptions.Latest && !startOptions.All { return errors.New("start requires at least one argument") } + if startOptions.All && startOptions.Latest { + return errors.Errorf("--all and --latest cannot be used together") + } if len(args) > 0 && startOptions.Latest { return errors.Errorf("--latest and containers cannot be used together") } -- cgit v1.2.3-54-g00ecf From 2ff511798c44baeb7b3f6ccc413ec8eff24cfb4e Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sun, 24 Oct 2021 22:35:47 +0200 Subject: Fix some typos in documentation and comments (found by codespell) Signed-off-by: Stefan Weil --- RELEASE_NOTES.md | 6 +++--- cmd/podman/images/scp.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'cmd/podman') diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index cca300f07..e3d944595 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -133,7 +133,7 @@ ### Features - Containers inside VMs created by `podman machine` will now automatically handle port forwarding - containers in `podman machine` VMs that publish ports via `--publish` or `--publish-all` will have these ports not just forwarded on the VM, but also on the host system. - The `podman play kube` command's `--network` option now accepts advanced network options (e.g. `--network slirp4netns:port_handler=slirp4netns`) ([#10807](https://github.com/containers/podman/issues/10807)). -- The `podman play kube` commmand now supports Kubernetes liveness probes, which will be created as Podman healthchecks. +- The `podman play kube` command now supports Kubernetes liveness probes, which will be created as Podman healthchecks. - Podman now provides a systemd unit, `podman-restart.service`, which, when enabled, will restart all containers that were started with `--restart=always` after the system reboots. - Rootless Podman can now be configured to use CNI networking by default by using the `rootless_networking` option in `containers.conf`. - Images can now be pulled using `image:tag@digest` syntax (e.g. `podman pull fedora:34@sha256:1b0d4ddd99b1a8c8a80e885aafe6034c95f266da44ead992aab388e6aa91611a`) ([#6721](https://github.com/containers/podman/issues/6721)). @@ -389,7 +389,7 @@ - Fixed a bug where images with empty layers were stored incorrectly, causing them to be unable to be pushed or saved. - Fixed a bug where the `podman rmi` command could fail to remove corrupt images from storage. - Fixed a bug where the remote Podman client's `podman save` command did not support the `oci-dir` and `docker-dir` formats ([#9742](https://github.com/containers/podman/issues/9742)). -- Fixed a bug where volume mounts from `podman play kube` created with a trailing `/` in the container path were were not properly superceding named volumes from the image ([#9618](https://github.com/containers/podman/issues/9618)). +- Fixed a bug where volume mounts from `podman play kube` created with a trailing `/` in the container path were were not properly superseding named volumes from the image ([#9618](https://github.com/containers/podman/issues/9618)). - Fixed a bug where Podman could fail to build on 32-bit architectures. ### Misc @@ -1034,7 +1034,7 @@ ## 2.0.5 ### Features - Rootless Podman will now add an entry to `/etc/passwd` for the user who ran Podman if run with `--userns=keep-id`. -- The `podman system connection` command has been reworked to support multiple connections, and reenabled for use! +- The `podman system connection` command has been reworked to support multiple connections, and re-enabled for use! - Podman now has a new global flag, `--connection`, to specify a connection to a remote Podman API instance. ### Changes diff --git a/cmd/podman/images/scp.go b/cmd/podman/images/scp.go index 176563440..c89a090bf 100644 --- a/cmd/podman/images/scp.go +++ b/cmd/podman/images/scp.go @@ -185,7 +185,7 @@ func saveToRemote(image, localFile string, tag string, uri *urlP.URL, iden strin return errors.Wrapf(define.ErrInvalidArg, "Renaming of an image is currently not supported") } podman := os.Args[0] - run := podman + " image save " + image + " --format=oci-archive --output=" + remoteFile // run ssh image load of the file copied via scp. Files are reverse in thie case... + run := podman + " image save " + image + " --format=oci-archive --output=" + remoteFile // run ssh image load of the file copied via scp. Files are reverse in this case... _, err = connection.ExecRemoteCommand(dial, run) if err != nil { return nil -- cgit v1.2.3-54-g00ecf From 0ded340e6bbc7952678d93029726ec83992e5010 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Fri, 29 Oct 2021 11:10:26 -0700 Subject: Fix help message case for `podman version` This is a cosmetic change. The help message for `podman version` is in title case whereas all other command help messages are not in title case. This stands out as inconsistent when looking at the output of `podman help`. Signed-off-by: Praveen Kumar --- cmd/podman/system/version.go | 2 +- test/e2e/version_test.go | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'cmd/podman') diff --git a/cmd/podman/system/version.go b/cmd/podman/system/version.go index 4502b156c..f71af8e72 100644 --- a/cmd/podman/system/version.go +++ b/cmd/podman/system/version.go @@ -20,7 +20,7 @@ var ( versionCommand = &cobra.Command{ Use: "version [options]", Args: validate.NoArgs, - Short: "Display the Podman Version Information", + Short: "Display the Podman version information", RunE: version, ValidArgsFunction: completion.AutocompleteNone, } diff --git a/test/e2e/version_test.go b/test/e2e/version_test.go index 75986e671..9398248b8 100644 --- a/test/e2e/version_test.go +++ b/test/e2e/version_test.go @@ -31,7 +31,6 @@ var _ = Describe("Podman version", func() { f := CurrentGinkgoTestDescription() processTestResult(f) podmanTest.SeedImages() - }) It("podman version", func() { @@ -96,4 +95,13 @@ var _ = Describe("Podman version", func() { session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) }) + + It("podman help", func() { + session := podmanTest.Podman([]string{"help"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + Expect(session.Out.Contents()).Should( + ContainSubstring("Display the Podman version information"), + ) + }) }) -- cgit v1.2.3-54-g00ecf From b1ac02dcbbfd2a3f47955bf739fe03f83375a6c1 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Thu, 4 Nov 2021 16:06:24 -0400 Subject: tweak a couple of flag descriptions in help output Descriptions of flags don't need to start with whitespace of their own. Signed-off-by: Nalin Dahyabhai --- cmd/podman/common/create.go | 2 +- cmd/podman/images/pull.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd/podman') diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index b3dfc4967..643f6728a 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -426,7 +426,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, createFlags.StringVar( &cf.Variant, variantFlagName, "", - "Use _VARIANT_ instead of the running architecture variant for choosing images", + "Use `VARIANT` instead of the running architecture variant for choosing images", ) _ = cmd.RegisterFlagCompletionFunc(variantFlagName, completion.AutocompleteNone) diff --git a/cmd/podman/images/pull.go b/cmd/podman/images/pull.go index a4e3515db..a990d1626 100644 --- a/cmd/podman/images/pull.go +++ b/cmd/podman/images/pull.go @@ -92,7 +92,7 @@ func pullFlags(cmd *cobra.Command) { _ = cmd.RegisterFlagCompletionFunc(osFlagName, completion.AutocompleteOS) variantFlagName := "variant" - flags.StringVar(&pullOptions.Variant, variantFlagName, "", " use VARIANT instead of the running architecture variant for choosing images") + flags.StringVar(&pullOptions.Variant, variantFlagName, "", "Use VARIANT instead of the running architecture variant for choosing images") _ = cmd.RegisterFlagCompletionFunc(variantFlagName, completion.AutocompleteNone) platformFlagName := "platform" -- cgit v1.2.3-54-g00ecf