summaryrefslogtreecommitdiff
path: root/cmd/podman
Commit message (Collapse)AuthorAge
* podman volume export/import: give better errorPaul Holzinger2022-05-30
| | | | | | | | | When the volume does not exist we should output an error stating so and not some generic one. Fixes #14411 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Merge pull request #14320 from flouthoc/build-honor-squash-and-layersOpenShift Merge Robot2022-05-27
|\ | | | | build: allow using `cache` explicitly with `--squash-all` using `--layers`
| * vendor: bump buildah to v1.26.1-0.20220524184833-5500333c2e06Aditya R2022-05-26
| | | | | | | | | | | | Bump buildah to v1.26.1-0.20220524184833-5500333c2e06 Signed-off-by: Aditya R <arajan@redhat.com>
| * build: allow using cache explicitly with --squash-all using --layersAditya R2022-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Buildah already supports using `--layers` with `--squash` after https://github.com/containers/buildah/pull/3674 if user wants to do so hence podman must honor similar configuration in `--squash-all` behaviour if user wants to using cache. PS: We cannot alter behaviour of `podman build --squash` for docker-compat reasons hence this feature can be easily supported by `--squash-all`. Closes: https://github.com/containers/buildah/issues/4011 Signed-off-by: Aditya R <arajan@redhat.com>
| * cmd, build: remove redundant squash processing logicAditya R2022-05-26
| | | | | | | | | | | | | | | | | | | | Same block contains similar lines above this is not needed as this looks redundant. [NO NEW TESTS NEEDED] [NO TESTS NEEDED] Signed-off-by: Aditya R <arajan@redhat.com>
* | Merge pull request #14382 from jwhonce/wip/init_todoOpenShift Merge Robot2022-05-26
|\ \ | | | | | | Remove TODO comment
| * | Remove TODO commentJhon Honce2022-05-26
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Allowing custom flags to provider has the potential to break all the hand-crafted commands currently in use. This could become a support nightmare. ```release-note NONE ``` [NO NEW TESTS NEEDED] Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #14374 from umohnani8/todo-3OpenShift Merge Robot2022-05-26
|\ \ | | | | | | Combine the CheckAllLatest CID and PodID functions
| * | Combine the CheckAllLatest CID and PodID functionsUrvashi Mohnani2022-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These two functions were doing the exact same thing just with cidfile and pod-id-file separately. Combine the functionality to one function to remove repetative code. Fix the TODO in cmd/podman/validate/args.go [NO NEW TESTS NEEDED] Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* | | Merge pull request #14373 from umohnani8/todo-2OpenShift Merge Robot2022-05-26
|\ \ \ | |_|/ |/| | Fix TODO in pod/ps.go and parse/net.go
| * | Fix TODO in parse/net.goUrvashi Mohnani2022-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix up the parseEnv function to differentiate between a label and env when parsing. Don't do a system lookup when parsing labels. [NO NEW TESTS NEEDED] Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
| * | Remove TODO from pods/ps.goUrvashi Mohnani2022-05-26
| |/ | | | | | | | | | | | | | | The TODO has already been fixed. Filters is now a []string [NO NEW TESTS NEEDED] Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* | Merge pull request #14366 from jwhonce/wip/rm_todoOpenShift Merge Robot2022-05-25
|\ \ | |/ |/| Support remote deadlock errors in rm
| * Support remote deadlock errors in rmJhon Honce2022-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor test for deadlock by comparing error text vs. actual ErrWillDeadlock constant. When running with --remote the error constant will always be not equal to the error returned by the API. ```release-note NONE ``` [NO NEW TESTS NEEDED] Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Remove unused archive flag from diff commandsJhon Honce2022-05-25
|/ | | | | | | | | | | | | * Option left in images/diff.go CLI as comment implies it is needed for backwards compatibility. ```release-note NONE ``` [NO NEW TESTS NEEDED] Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Merge pull request #14357 from rhatdan/codespellOpenShift Merge Robot2022-05-25
|\ | | | | Fix codespell errors
| * Fix codespell errorsDaniel J Walsh2022-05-25
| | | | | | | | | | | | [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #14333 from rhatdan/podOpenShift Merge Robot2022-05-25
|\ \ | |/ |/| Allow podman pod create --share +pid
| * Allow podman pod create --share +pidDaniel J Walsh2022-05-24
| | | | | | | | | | | | Fixes: https://github.com/containers/podman/issues/13422 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #14334 from rhatdan/pod1OpenShift Merge Robot2022-05-24
|\ \ | | | | | | Allow podman pod create to accept name argument
| * | Allow podman pod create to accept name argumentDaniel J Walsh2022-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I am constantly attempting to add the podname to the last argument to podman pod create. Allowing this makes it match podman volume create and podman network create. It does not match podman container create, since podman container create arguments specify the arguments to run with the container. Still need to support the --name option for backwards compatibility. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #14346 from edsantiago/helpmsg_testsOpenShift Merge Robot2022-05-24
|\ \ \ | |_|/ |/| | help-message system test: catch more cases
| * | help-message system test: catch more casesEd Santiago2022-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Look for and prevent lower-case arg descriptions: podman cmd [arg] - Look for and prevent optional-mandatory misordering: podman cmd [ARG] ARG - Tighter whitespace checks (and fix podman pod ps) - simplify a no-longer-necessary mess! #8635 fixed the horrible "CONTAINER | IMAGE" strings (with spaces), so there's no longer a need to special-case those. The one-extra-arg check is now much cleaner. Minor refactoring. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Merge pull request #14330 from Luap99/completion3OpenShift Merge Robot2022-05-24
|\ \ \ | | | | | | | | cmd/podman/common/completion.go: fix FIXMEs
| * | | cmd/podman/common/completion.go: fix FIXMEsPaul Holzinger2022-05-24
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no good way to recommend labels for podman container runlabel. Add the missing max-size log option. These are the only documented options so the completion should not suggest something different. Add proper --stop-signal completion. It will now complete all supported signal names both upper and lowercase depending on the user input. Also it work with and without the SIG prefix. Fixing the TODOs in this file are more complicated since they describe bigger features. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #14327 from rhatdan/commonOpenShift Merge Robot2022-05-24
|\ \ \ | | | | | | | | Use containers/common/pkg/util.StringToSlice
| * | | Use containers/common/pkg/util.StringToSliceDaniel J Walsh2022-05-23
| | | | | | | | | | | | | | | | | | | | | | | | [NO NEW TESTS NEEDED] Just code cleanup for better reuse Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | Merge pull request #14348 from jwhonce/wip/root_fixmeOpenShift Merge Robot2022-05-24
|\ \ \ \ | |_|_|/ |/| | | [CI:DOCS] Remove TODO re: storage-driver
| * | | Remove TODO re: storage-driverJhon Honce2022-05-24
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently this list is not exported from c/storage and the group decided this will not be changed. ```release-note NONE ``` Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | | podman image mount: print pretty tableValentin Rothberg2022-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that `podman image mount` prints a pretty table unless there is only argument passed and without a custom format. Fixing a TODO item brought me to the specific code location and revealed the fart in the logic. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | | autocomplete `podman search --filter`Valentin Rothberg2022-05-24
|/ / | | | | | | Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | Merge pull request #14263 from Luap99/completionOpenShift Merge Robot2022-05-23
|\ \ | |/ |/| shell completion --format: various improvements
| * shell completion --format: add help to function with argsPaul Holzinger2022-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From a template users POV it is not importent when they use a struct field or method. They only notice the difference when the function requires arguments. So lets be nice and let the user know that this method requires arguments via the help text. This is how it now looks like when the completion descriptions are enabled on bash: ``` $ bin/podman ps --format {{.Created.A {{.Created.AddDate (This is a function and requires 3 arguments) {{.Created.After (This is a function and requires 1 argument) {{.Created.Add (This is a function and requires 1 argument) {{.Created.AppendFormat (This is a function and requires 2 arguments) ``` Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * shell completion --format: support maps and functionsPaul Holzinger2022-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we only support structs in a template string like this: `{{.var1.test.` -> this meams that test must be a struct field on var1. Now with this var1 and test could also be either a map or function which returns a struct. A actual example: `podman container inspect --format {{.NetworkSettings.Networks.netname.` Now we can complete the struct fileds after netname. Note that this cannot complete map keys since they are empty by default, so it is impossible to get them in the completion logic. Also this fixes a panic with embeeded nil structs Fixes #14223 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * shell completion --format: fix embedded struct handlingPaul Holzinger2022-05-18
| | | | | | | | | | | | | | | | | | | | | | | | When a struct is embeeded it is possible that we end up with same names but different types, this results in incorrect completions. The go template logic always preferes the actual field/method name before the one from the embedded one. Thefore the completion logic should do the same. First get all method/fields names from the struct and then only add the field names from the embedded struct when they are not already present in the list. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * shell completion --format: only show usable methodsPaul Holzinger2022-05-18
| | | | | | | | | | | | | | | | In a template you cann call function that are defined on a type, however this is only useful if they return one value. If it returns more than one the template cannot know what value it has to display. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * shell completion --format: only show exported fieldsPaul Holzinger2022-05-18
| | | | | | | | | | | | | | go templates only support exported fields, so the completion logic must filter the private fields out. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #14272 from Luap99/completion2OpenShift Merge Robot2022-05-19
|\ \ | | | | | | shell completion: use more constants in the code
| * | shell completion: use more constants instead of duplicating stringsPaul Holzinger2022-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is better to just reuse the existing constants instead of duplicating the strings. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | shell completion: podman save --format use all valid valuesPaul Holzinger2022-05-19
| | | | | | | | | | | | | | | | | | | | | docker-archive was missing from the completions. To prevent duplication use the same format list as podman save. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | shell completion: update podman inspect --type optionsPaul Holzinger2022-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add all option that are supported by the podman inspect --type flag to the completions. Also use the same constants instead of duplicating the strings. In order to do this I had to move the definitions into the common package to prevent an import cycle. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | shell completion: fix podman event --filter valuesPaul Holzinger2022-05-19
| |/ | | | | | | | | | | | | | | The completion suggested incorrect values for `podman events --filter type=` . It should only list types not the event status. Also make sure to use the constants instead of duplicating the strings. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* / linter: enable unconvert linterValentin Rothberg2022-05-19
|/ | | | | | | Detects unneccessary type conversions and helps in keeping the code base cleaner. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Fix strange buildtag editJason T. Greene2022-05-13
| | | | Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* Add support for machine events on WindowsJason T. Greene2022-05-12
| | | | Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* Merge pull request #14159 from vrothberg/service-containerDaniel J Walsh2022-05-12
|\ | | | | play kube: service container
| * play kube: service containerValentin Rothberg2022-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the notion of a "service container" to play kube. A service container is started before the pods in play kube and is (reverse) linked to them. The service container is stopped/removed *after* all pods it is associated with are stopped/removed. In other words, a service container tracks the entire life cycle of a service started via `podman play kube`. This is required to enable `play kube` in a systemd unit file. The service container is only used when the `--service-container` flag is set on the CLI. This flag has been marked as hidden as it is not meant to be used outside the context of `play kube`. It is further not supported on the remote client. The wiring with systemd will be done in a later commit. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | Merge pull request #14216 from Luap99/format-completionOpenShift Merge Robot2022-05-12
|\ \ | |/ |/| shell completion --format: work with pointer functions
| * shell completion --format: work with pointer functionsPaul Holzinger2022-05-12
| | | | | | | | | | | | | | | | | | | | | | The completion logic currently suggest also the functions that are defined for this type. However this did not work correctly when it was defined as pointer to that type on not the actual type. This commit fixes that problem. To test you can compare the difference between `podman stats --format {{.[TAB]` with and without this commit. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #14170 from ashley-cui/machtestsOpenShift Merge Robot2022-05-11
|\ \ | | | | | | Add more machine tests