summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAge
* Use signByFlagName instead of copy&pasting the stringMiloslav Trmač2022-07-30
| | | | Signed-off-by: Miloslav Trmač <mitr@redhat.com>
* Merge pull request #15066 from sstosh/checkpoint-samenameOpenShift Merge Robot2022-07-27
|\ | | | | Fix: Restore a container which name is equal to a image name
| * Fix: Restore a container which name is equal to a image nameToshiki Sonoda2022-07-27
| | | | | | | | | | | | | | | | If there is a match for both container and image, we restore the container. Fixes: https://github.com/containers/podman/issues/15055 Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
* | When removing objects specifying --force,podman should exit with 0Daniel J Walsh2022-07-26
| | | | | | | | | | | | | | | | | | | | | | | | This Patch will cause podman COMMAND rm --force bogus not fail This is how Docker works, so Podman should follow this to allow existing scripts to convert from Docker to Podman. Fixes: #14612 Oprignal version of this patch came from wufan 1991849113@qq.com Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | pod create --share none should not create infraCharlie Doern2022-07-25
|/ | | | | | | | | | | for podman pod create, when we are not sharing any namespaces there is no point for the infra container. This is especially true since resources have also been decoupled from the container recently. handle this on the cmd level so that we can still create infra if set explicitly resolves #15048 Signed-off-by: Charlie Doern <cdoern@redhat.com>
* Merge pull request #15039 from Luap99/cni-docOpenShift Merge Robot2022-07-22
|\ | | | | [CI:DOCS] docs: remove CNI word where it is not applicable
| * docs: remove CNI word where it is not applicablePaul Holzinger2022-07-22
| | | | | | | | | | | | | | | | | | | | Most network commands/features work with both netavark and CNI. When we added added netavark most docs were not vetted and thus still use CNI network, it should just say network. Fixes #14990 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #14967 from sstosh/pause-optionOpenShift Merge Robot2022-07-22
|\ \ | |/ |/| Add pause/unpause --latest, --cidfile, --filter
| * Add pause/unpause --latest, --cidfile, --filterToshiki Sonoda2022-07-20
| | | | | | | | | | | | | | | | --latest : pause/unpause the latest container. --filter : pause/unpause the filtered container. --cidfile : Read container ID from the specified file and pause/unpause the container. Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
* | Merge pull request #15010 from Luap99/machine-e2eOpenShift Merge Robot2022-07-22
|\ \ | | | | | | enable linter for pkg/machine/e2e
| * | pkg/machine/e2e: do not import from cmd/podmanPaul Holzinger2022-07-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same problem again as 4374038cc67405e3f5555b1870d5bb7f6570fa5d. Also fix the incorrect --format autocompletion struct. It should be avoided to import cmd/podman/... packages from outside of cmd/podman. This can lead in weird hard to debug import paths but also can have negative consequences when imported in unit tests. In this case it will set XDG_CONFIG_HOME and thus the machine tests this dir over the tmp HOME env variable which is set at a later point. This caused machine files to be leaked into the actual users home dir. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | fix some pkg/machine/e2e test to read stderrPaul Holzinger2022-07-21
| |/ | | | | | | | | | | Also fix the machine ssh code order to provide a better error message. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* / resource limits for podsCharlie Doern2022-07-21
|/ | | | | | | | | | | | | | | | | | added the following flags and handling for podman pod create --memory-swap --cpuset-mems --device-read-bps --device-write-bps --blkio-weight --blkio-weight-device --cpu-shares given the new backend for systemd in c/common, all of these can now be exposed to pod create. most of the heavy lifting (nearly all) is done within c/common. However, some rewiring needed to be done here as well! Signed-off-by: Charlie Doern <cdoern@redhat.com>
* Remove return error from "containers.pause"Toshiki Sonoda2022-07-19
| | | | | | | | | When we pause `rootless cgroups v1 container`, podman returns error from `libpod.(*Container).pause`. Podman does not need to return error from `containers.pause` because of duplicate. [NO NEW TESTS NEEDED] Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
* Add --host and -H as equivalent options to --urlDaniel J Walsh2022-07-18
| | | | | | | | | | Docker supports -H and --host for specify the listening socket. Podman should support them also in order to match the CLI. These will not be documented since Podman defaults to using the --url option. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #14932 from jakecorrenti/pull-all-tags-shorthandopenshift-ci[bot]2022-07-15
|\ | | | | Podman pull --all-tags shorthand option
| * Podman pull --all-tags shorthand optionJake Correnti2022-07-14
| | | | | | | | | | | | | | I added the shorthand option for `podman pull --all-tags`. Like Docker, Podman can now do `podman pull -a`. Signed-off-by: Jake Correnti <jcorrenti13@gmail.com>
* | Podman stop --filter flagKarthik Elango2022-07-14
| | | | | | | | | | | | | | Filter flag is added for podman stop and podman --remote stop. Filtering logic is implemented in getContainersAndInputByContext(). Start filtering can be manipulated to use this logic as well to limit redundancy. Signed-off-by: Karthik Elango <kelango@redhat.com>
* | Merge pull request #14923 from rhatdan/eventsopenshift-ci[bot]2022-07-14
|\ \ | |/ |/| Add podman events -f to be alias for --filter
| * Add podman events -f to be alias for --filterDaniel J Walsh2022-07-13
| | | | | | | | | | | | Needed for Docker compatibility. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Add "podman kube play" cmdNiall Crowe2022-07-13
|/ | | | | | | | | | | The "podman kube play" command is designed to be a replacement for the "podman play kube" command. It performs the same function as "play kube" while also still working with the same flags and options. The "podman play kube" command is still functional as an alias of "kube play". Closes #12475 Signed-off-by: Niall Crowe <nicrowe@redhat.com> Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Merge pull request #14904 from giuseppe/move-to-subcgroup-in-a-containeropenshift-ci[bot]2022-07-13
|\ | | | | abi: create new cgroup when running in a container
| * podman: always call into SetupRootlessGiuseppe Scrivano2022-07-13
| | | | | | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
| * podman: move MaybeMoveToSubCgroup to utils/Giuseppe Scrivano2022-07-13
| | | | | | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Docker uses "-c" to mean "--cpu-shares" in create and runDaniel J Walsh2022-07-12
|/ | | | | | | Add support for -c as an alias for --cpu-shares to be compatible with Docker. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #14826 from sstosh/net-pruneopenshift-ci[bot]2022-07-11
|\ | | | | Refactored networkPrune function
| * Refactored networkPrune functionToshiki Sonoda2022-07-08
| | | | | | | | | | | | | | | | | | | | | | Refactored the networkPrune function to improve readability. This commit changes the `networkPrune` function to use the `PrintNetworkPruneResults` function. [NO NEW TESTS NEEDED] Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
* | Merge pull request #14818 from rhatdan/waitopenshift-ci[bot]2022-07-11
|\ \ | | | | | | podman wait can take multiple conditions
| * | podman wait can take multiple conditionsDaniel J Walsh2022-07-08
| | | | | | | | | | | | | | | | | | | | | | | | Podman wait should not be defaulting to just stopped. By default wait API waits for stopped and exited. We should not override this on the client side. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | improve pull-policy documentationValentin Rothberg2022-07-08
|/ / | | | | | | | | | | | | | | | | | | | | | | Make sure that the docs for pull policies is consistent with Buildah and reflects the implementation. Further improve the help messages and auto completions. [NO NEW TESTS NEEDED] Fixes: #14846 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* / pkg/machine/e2e: do not import from cmd/podmanPaul Holzinger2022-07-07
|/ | | | | | | | | | | It should be avoided to import cmd/podman/... packages from outside of cmd/podman. This can lead in weird hard to debug import paths but also can have negative consequences when imported in unit tests. In this case it will set XDG_CONFIG_HOME and thus the machine tests this dir over the tmp HOME env variable which is set at a later point. This caused machine files to be leaked into the actual users home dir. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Merge pull request #14762 from ashley-cui/machinfoopenshift-ci[bot]2022-07-07
|\ | | | | Podman machine info
| * Podman machine infoAshley Cui2022-07-05
| | | | | | | | | | | | | | Add podman machine info command, which displays infor about the machine host as well as version info. Signed-off-by: Ashley Cui <acui@redhat.com>
* | Merge pull request #14501 from cdoern/podUTSopenshift-ci[bot]2022-07-06
|\ \ | | | | | | podman pod create --uts support
| * | podman pod create --uts supportcdoern2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add support for the --uts flag in pod create, allowing users to avoid issues with default values in containers.conf. uts follows the same format as other namespace flags: --uts=private (default), --uts=host, --uts=ns:PATH resolves #13714 Signed-off-by: Charlie Doern <cdoern@redhat.com>
* | | Fix podman pod unpaue TODOUrvashi Mohnani2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the podman pod unpause to only show the paused containers with autocomplete. Fix a typo in the help command. Update the unpause function to only attempt an unpause on pasued pods instead of all the pods. Update the tests accordingly. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* | | Merge pull request #14805 from jakecorrenti/df-format-outputopenshift-ci[bot]2022-07-05
|\ \ \ | |/ / |/| | Podman system df JSON format outputs `Size` and `Reclaimable`
| * | Podman system df JSON format outputs `Size` and `Reclaimable`Jake Correnti2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, `podman system df --format "{{json .}}"` would not output `Size` and `Reclaimable` like `podman system df` would. ``` {"Type":"Images","Total":5,"Active":0,"Size":39972240,"Reclaimable":39972240} {"Type":"Containers","Total":0,"Active":0,"Size":0,"Reclaimable":0} {"Type":"Local Volumes","Total":0,"Active":0,"Size":0,"Reclaimable":0} ``` Closes: #14769 Signed-off-by: Jake Correnti <jcorrenti13@gmail.com>
* | | specgen,run: support running container from valid manifest listAditya R2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following PR adds support for running containers from a manifest list present on localstorage. Before this PR podman only supports running containers from valid images but not from manifest list. So `podman run -it --platform <some> <manifest-list> command` should become functional now and users should be able to resolve images on the bases of provided `--platform` string. Example ``` podman manifest create test podman build --platform linux/amd64,linux/arm64 --manifest test . podman run --rm --platform linux/arm64/v8 test uname -a ``` Closes: https://github.com/containers/podman/issues/14773 Signed-off-by: Aditya R <arajan@redhat.com>
* | | Merge pull request #14807 from eriksjolund/fix_read_only_spellingopenshift-ci[bot]2022-07-04
|\ \ \ | | | | | | | | [CI:DOCS] Fix spelling "read only" -> "read-only"
| * | | Fix spelling "read only" -> "read-only"Erik Sjölund2022-07-02
| | |/ | |/| | | | | | | Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
* / | podman pod create --memoryCharlie Doern2022-07-01
|/ / | | | | | | | | | | | | | | using the new resource backend, implement podman pod create --memory which enables users to modify memory.max inside of the parent cgroup (the pod), implicitly impacting all children unless overriden Signed-off-by: Charlie Doern <cdoern@redhat.com>
* | Merge pull request #14794 from n1hility/fix-winopenshift-ci[bot]2022-07-01
|\ \ | | | | | | Fix podman machine on Windows
| * | Fix podman machine on WindowsJason T. Greene2022-06-30
| | | | | | | | | | | | Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* | | Merge pull request #14449 from cdoern/podVolumesopenshift-ci[bot]2022-07-01
|\ \ \ | |/ / |/| | podman volume create --opt=o=timeout...
| * | podman volume create --opt=o=timeout...cdoern2022-06-09
| | | | | | | | | | | | | | | | | | | | | add an option to configure the driver timeout when creating a volume. The default is 5 seconds but this value is too small for some custom drivers. Signed-off-by: cdoern <cdoern@redhat.com>
* | | Merge pull request #14787 from giuseppe/move-systemd-service-to-subcgroupopenshift-ci[bot]2022-06-30
|\ \ \ | | | | | | | | service: do not run under the root cgroup
| * | | service: do not run under the root cgroupGiuseppe Scrivano2022-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at startup, when running on a cgroup v2 system, check if the current process is running in the root cgroup and move it to a sub-cgroup, otherwise Podman is not able to create cgroups and move processes there. Closes: https://github.com/containers/podman/issues/14573 [NO NEW TESTS NEEDED] it needs nested podman Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | | cmd/podman: switch to golang native error wrappingSascha Grunert2022-06-30
|/ / / | | | | | | | | | | | | | | | | | | We now use the golang error wrapping format specifier `%w` instead of the deprecated github.com/pkg/errors package. Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
* | | Merge pull request #14706 from ashley-cui/rootmachopenshift-ci[bot]2022-06-29
|\ \ \ | | | | | | | | Only allow Rootless runs of Podman Machine