summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAge
* Merge pull request #7908 from rhatdan/diffOpenShift Merge Robot2020-10-19
|\ | | | | fix podman container exists and diff for storage containers
| * Add support for external containerDaniel J Walsh2020-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | External containers are containers created outside of Podman. For example Buildah and CRI-O Containers. $ buildah from alpine alpine-working-container $ buildah run alpine-working-container touch /test $ podman container exists --external alpine-working-container $ podman container diff alpine-working-container C /etc A /test Added --external flag to refer to external containers, rather then --storage. Added --external for podman container exists and modified podman ps to use --external rather then --storage. It was felt that --storage would confuse the user into thinking about changing the storage driver or options. --storage is still supported through the use of aliases. Finally podman contianer diff, does not require the --external flag, since it there is little change of users making the mistake, and would just be a pain for the user to remember the flag. podman container exists --external is required because it could fool scripts that rely on the existance of a Podman container, and there is a potential for a partial deletion of a container, which could mess up existing users. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Fix podman image trust show --raw outputPaul Holzinger2020-10-15
|/ | | | Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Merge pull request #8021 from mheon/fix_pod_inspect_indentOpenShift Merge Robot2020-10-14
|\ | | | | Fix indentation for `podman pod inspect`
| * Fix indentation for `podman pod inspect`Matthew Heon2020-10-14
| | | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com>
* | Merge pull request #7987 from jwhonce/jira/run-898-5OpenShift Merge Robot2020-10-14
|\ \ | |/ |/| Restore --format table support
| * Restore --format table supportJhon Honce2020-10-13
| | | | | | | | | | | | | | | | | | | | | | | | * system df * events * fix error handling from go routine * update tests to use gomega matchers for better error messages * system info * version * volume inspect Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Restore indent on JSON from `podman inspect`Matthew Heon2020-10-13
| | | | | | | | | | | | | | I don't know when this was disabled, but it's very hard to read without it. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | Restore --format: stats & pod psAshley Cui2020-10-13
|/ | | | | | | Restore formatting for stats Fix formatting for pod ps Signed-off-by: Ashley Cui <acui@redhat.com>
* Merge pull request #7836 from QiWang19/search-tagsOpenShift Merge Robot2020-10-12
|\ | | | | Search repository tags using --list-tags
| * Search repository tags using --list-tagsQi Wang2020-10-09
| | | | | | | | | | | | | | For fix of BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1684263 Add --list-tags to podman search to return a table the repository tags. Signed-off-by: Qi Wang <qiwan@redhat.com>
* | Merge pull request #7968 from xordspar0/oci-runtime-errorOpenShift Merge Robot2020-10-09
|\ \ | | | | | | Print the correct underlying cause for OCI errors
| * | Fix the "err: cause" order of OCI runtime errorsJordan Christiansen2020-10-09
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the order of OCI error messages was reversed, so that the type of error was listed as the cause. For example: Error: writing file `cpu.cfs_quota_us`: Invalid argument: OCI runtime error This error message makes it seem like "OCI runtime error" is the argument that was invalid. In fact, "OCI runtime error" is the error and "writing file ..." is the cause. With this change, the above message reads: Error: OCI runtime error: writing file `cpu.cfs_quota_us`: Invalid argument Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
* | Merge pull request #7975 from jwhonce/jira/run-898-4OpenShift Merge Robot2020-10-09
|\ \ | |/ |/| Restore --format table...
| * Restore --format table...Jhon Honce2020-10-08
| | | | | | | | | | | | | | | | | | | | | | | | Following commands: * systemd generate * networks inspect * pod stats * Fixed test where format was quoted and then quoted again * Fixed bug where output never printed '--' on missed reads * pod ps Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #7973 from jwhonce/jira/run-898-3OpenShift Merge Robot2020-10-09
|\ \ | | | | | | Port V1 --format table to V2 podman
| * | Port V1 --format table to V2 podmanJhon Honce2020-10-08
| | | | | | | | | | | | | | | | | | | | | | | | * volume ls * container ps * updated broken tests when skip removed Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | | Merge pull request #7891 from rhatdan/rmOpenShift Merge Robot2020-10-09
|\ \ \ | | | | | | | | This PR allows users to remove external containers directly
| * | | This PR allows users to remove external containers directlyDaniel J Walsh2020-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currenly if a user specifies the name or ID of an external storage container, we report an error to them. buildah from scratch working-container-2 podman rm working-container-2 Error: no container with name or ID working-container-2 found: no such container Since the user specified the correct name and the container is in storage we force them to specify --storage to remove it. This is a bad experience for the user. This change will just remove the container from storage. If the container is known by libpod, it will remove the container from libpod as well. The podman rm --storage option has been deprecated, and removed from docs. Also cleaned documented options that are not available to podman-remote. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | Merge pull request #7910 from EduardoVega/7567-podman-configmapsOpenShift Merge Robot2020-10-09
|\ \ \ \ | |_|_|/ |/| | | Enable k8s configmaps as flags for play kube
| * | | Enable k8s configmaps as flags for play kubeEduardo Vega2020-10-07
| | | | | | | | | | | | | | | | Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
* | | | Merge pull request #7969 from ParkerVR/format-images/diffOpenShift Merge Robot2020-10-08
|\ \ \ \ | | | | | | | | | | --format updates for images/diff.go
| * | | | --format updates for images/diff.goParker Van Roy2020-10-08
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Parker Van Roy <pvanroy@redhat.com>
* | | | | Merge pull request #7960 from jwhonce/jira/run-898-2OpenShift Merge Robot2020-10-08
|\ \ \ \ \ | |_|_|_|/ |/| | | | Restore --format 'table...' to commands
| * | | | Restore --format 'table...' to commandsJhon Honce2020-10-08
| |/ / / | | | | | | | | | | | | | | | | | | | | * podman xyz inspect Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | | | Merge pull request #7951 from mheon/fix_7947OpenShift Merge Robot2020-10-08
|\ \ \ \ | |/ / / |/| | | Ports given only by number should have random host port
| * | | Ports given only by number should have random host portMatthew Heon2020-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Podman 1.9.3, `podman run -p 80` would assign port 80 in the container to a random port on the host. In Podman 2.0 and up, it assigned Port 80 in the container to Port 80 on the host. This is an easy fix, fortunately - just need to remove the bit that assumed host port, if not given, should be set to container port. We also had a test for the bad behavior, so fix it to test for the correct way of doing things. Fixes #7947 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | | Merge pull request #7932 from jwhonce/jira/run-898OpenShift Merge Robot2020-10-07
|\ \ \ \ | |_|_|/ |/| | | Restore V1 --format "table..." support
| * | | Port commands to V2 --format 'table...'Jhon Honce2020-10-07
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'containers mount' * 'image history' * 'images mount' * 'images search' * Correct spelling errors Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | | Merge pull request #7943 from baude/issue7807OpenShift Merge Robot2020-10-07
|\ \ \ | |/ / |/| | prevent unpredictable results with network create|remove
| * | prevent unpredictable results with network create|removebaude2020-10-07
| |/ | | | | | | | | | | | | | | | | | | due to a lack of "locking" on cni operations, we could get ourselves in trouble when doing rapid creation or removal of networks. added a simple file lock to deal with the collision and because it is not considered a performent path, use of the file lock should be ok. if proven otherwise in the future, some generic shared memory lock should be implemented for libpod and also used here. moved pkog/network to libpod/network because libpod is now being pulled into the package and it has therefore lost its generic nature. this will make it easier to absorb into libpod as we try to make the network closer to core operations. Fixes: #7807 Signed-off-by: baude <bbaude@redhat.com>
* / Attempt to turn on some more remote testsDaniel J Walsh2020-10-07
|/ | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #7929 from kolyshkin/nits-errOpenShift Merge Robot2020-10-06
|\ | | | | Nits
| * Lowercase some errorsKir Kolyshkin2020-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is courtesy of ``` for f in $(git ls-files *.go | grep -v ^vendor/); do \ sed -i 's/\(errors\..*\)"Error /\1"error /' $f; done for f in $(git ls-files *.go | grep -v ^vendor/); do \ sed -i 's/\(errors\..*\)"Failed to /\1"failed to /' $f; done ``` etc. Self-reviewed using `git diff --word-diff`, found no issues. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
| * Remove excessive error wrappingKir Kolyshkin2020-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case os.Open[File], os.Mkdir[All], ioutil.ReadFile and the like fails, the error message already contains the file name and the operation that fails, so there is no need to wrap the error with something like "open %s failed". While at it - replace a few places with os.Open, ioutil.ReadAll with ioutil.ReadFile. - replace errors.Wrapf with errors.Wrap for cases where there are no %-style arguments. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
* | Support max_size logoptionsDaniel J Walsh2020-10-05
|/ | | | | | | | Docker supports log-opt max_size and so does conmon (ALthough poorly). Adding support for this allows users to at least make sure their containers logs do not become a DOS vector. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Fix podman-remote ps --ns brokenzhangguanzhang2020-10-04
| | | | Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
* Merge pull request #7856 from rhatdan/rootOpenShift Merge Robot2020-10-02
|\ | | | | podman-remote does not support most of the global flags
| * podman-remote does not support most of the global flagsDaniel J Walsh2020-10-02
| | | | | | | | | | | | | | podman-remote --help is showing a bunch of global flags that it does not support Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #7199 from jwhonce/jira/run-898OpenShift Merge Robot2020-10-02
|\ \ | | | | | | Restore "table" --format from V1
| * | Restore "table" --format from V1Jhon Honce2020-10-02
| |/ | | | | | | | | | | | | | | | | | | | | | | | | * --format "table {{.field..." will print fields out in a table with headings. Table keyword is removed, spaces between fields are converted to tabs * Update parse.MatchesJSONFormat()'s regex to be more inclusive * Add report.Headers(), obtain all the field names to be used as column headers, a map of field name to column headers may be provided to override the field names * Update several commands to use new functions Signed-off-by: Jhon Honce <jhonce@redhat.com>
* / --rm option shold conflicts with --restartzhangguanzhang2020-10-02
|/ | | | Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
* Podman containers/pods prune should throw an error if user adds argsDaniel J Walsh2020-10-01
| | | | | | | We are not currently checking if a user accidently adds an argument to all podman * prune commands. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Volume prune should not pass down the force flagDaniel J Walsh2020-10-01
| | | | | | | | | podman volume prune -f Should just tell the prune command to not prompt for confirmation. It should not be passing the prune flag into the API. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Fix handling of remove of bogus volumes, networks and PodsDaniel J Walsh2020-09-29
| | | | | | | | | | | | In podman containers rm and podman images rm, the commands exit with error code 1 if the object does not exists. This PR implements similar functionality to volumes, networks, and Pods. Similarly if volumes or Networks are in use by other containers, and return exit code 2. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #7788 from IceCodeNew/patch-1OpenShift Merge Robot2020-09-29
|\ | | | | Updating on supported restart policy
| * Updating on supported restart policyIceCodeNew2020-09-27
| | | | | | | | Signed-off-by: IceCodeNew <32576256+IceCodeNew@users.noreply.github.com>
* | Merge pull request #7783 from ashley-cui/slirpOpenShift Merge Robot2020-09-29
|\ \ | | | | | | Add support for slirp network for pods
| * | Add support for slirp network for podsAshley Cui2020-09-25
| | | | | | | | | | | | | | | | | | flag --network=slirp4netns[options] for root and rootless pods Signed-off-by: Ashley Cui <acui@redhat.com>
* | | Ignore containers.conf sysctl when namespaces set to hostDaniel J Walsh2020-09-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If user sets namespace to host, then default sysctls need to be ignored that are specific to that namespace. --net=host ignore sysctls that begin with net. --ipc=host ignore fs.mqueue --uts=host ignore kernel.domainname and kernel.hostname Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>