summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* fix bug podman sign storage pathQi Wang2020-08-11
| | | | | | | | | | - fix the bud podman not using specified --directory as signature storage. - use manifest and image referce to set repo@digest. close #6994 close #6993 Backported-by: Valentin Rothberg <rothberg@redhat.com> Signed-off-by: Qi Wang <qiwan@redhat.com>
* podman-remote send name and tagBrent Baude2020-08-11
| | | | | | | | | when loading an image with podman-remote load, we need to send a name and a tag to the endpoint Fixes: #7124 Backported-by: Valentin Rothberg <rothberg@redhat.com> Signed-off-by: Brent Baude <bbaude@redhat.com>
* Ensure that exec errors write exit codes to the DBMatthew Heon2020-08-11
| | | | | | | | | | | | | | | | | | | In local Podman, the frontend interprets the error and exit code given by the Exec API to determine the appropriate exit code to set for Podman itself; special cases like a missing executable receive special exit codes. Exec for the remote API, however, has to do this inside Libpod itself, as Libpod will be directly queried (via the Inspect API for exec sessions) to get the exit code. This was done correctly when the exec session started properly, but we did not properly handle cases where the OCI runtime fails before the exec session can properly start. Making two error returns that would otherwise not set exit code actually do so should resolve the issue. Fixes #6893 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* fix podman logs --tail when log is bigger than pagesizePaul Holzinger2020-08-11
| | | | Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* image list: speed upValentin Rothberg2020-08-11
| | | | | | | | | | | | | | | | | | | | | | | Listing images has shown increasing performance penalties with an increasing number of images. Unless `--all` is specified, Podman will filter intermediate images. Determining intermediate images has been done by finding (and comparing!) parent images which is expensive. We had to query the storage many times which turned it into a bottleneck. Instead, create a layer tree and assign one or more images to nodes that match the images' top layer. Determining the children of an image is now exponentially faster as we already know the child images from the layer graph and the images using the same top layer, which may also be considered child images based on their history. On my system with 510 images, a rootful image list drops from 6 secs down to 0.3 secs. Also use the tree to compute parent nodes, and to filter intermediate images for pruning. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* generate systemd: fix error handlingValentin Rothberg2020-08-11
| | | | | | | | | Fix a bug in the error handling which returned nil instead of an error and ultimately lead to nil dereferences in the client. To prevent future regressions, add a test and check for the error message. Fixes: #7271 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Merge pull request #7226 from ashley-cui/v2.0OpenShift Merge Robot2020-08-05
|\ | | | | v2.0 Backports
| * Publish IP from YAML (podman play kube)Ashley Cui2020-08-04
| | | | | | | | | | | | podman play kube didn't set host ip correctly from YAML Signed-off-by: Ashley Cui <acui@redhat.com>
| * Add containers.conf default file for windows and MAC InstallsDaniel J Walsh2020-08-04
|/ | | | | | | We want to add this configuration file so that users can descover how to configure the permanent connection to a remote podman instance. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #7200 from TomSweeneyRedHat/dev/tsweeney/v2_buildah_1.15.1OpenShift Merge Robot2020-08-04
|\ | | | | Bump Buildah to v1.15.1 on v2.0 branch
| * Bump Buildah to v1.15.1 on v2.0 branchTomSweeneyRedHat2020-08-03
|/ | | | | | As the title says Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
* Merge pull request #7174 from mheon/bump_204OpenShift Merge Robot2020-07-31
|\ | | | | [CI:DOCS] Bump to v2.0.4
| * Bump to v2.0.5-devMatthew Heon2020-07-31
| | | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com>
| * Bump to v2.0.4v2.0.4Matthew Heon2020-07-31
|/ | | | Signed-off-by: Matthew Heon <mheon@redhat.com>
* Merge pull request #7173 from mheon/204_relnotes_backportsOpenShift Merge Robot2020-07-31
|\ | | | | [CI:DOCS] Update release notes for v2.0.4
| * Update release notes for v2.0.4Matthew Heon2020-07-31
|/ | | | Signed-off-by: Matthew Heon <mheon@redhat.com>
* Merge pull request #7170 from mheon/204_backportsOpenShift Merge Robot2020-07-31
|\ | | | | Extra backports for v2.0.4
| * Disable a nonfunctional build testMatthew Heon2020-07-31
| | | | | | | | | | | | | | The amount of drift in the system tests on v2.0 is starting to become difficult to deal with. 2.1.0 can't come soon enough. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * volumes: do not recurse when chowningGiuseppe Scrivano2020-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | keep the file ownership when chowning and honor the user namespace mappings. Closes: https://github.com/containers/podman/issues/7130 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> <MH: Fixed conflicts from cherry pick> Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * add {{.RunningFor}} placeholder in ps --formatAshley Cui2020-07-31
| | | | | | | | | | | | For docker compatibility Signed-off-by: Ashley Cui <acui@redhat.com>
| * fix swapped mem_usage/percent fieldsPaul Holzinger2020-07-31
| | | | | | | | | | | | Correct the wrong field assignment in `podman stats --format=json`. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
| * Ensure that 'rmi --force' evicts Podman containersMatthew Heon2020-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic for `podman rmi --force` includes a bit of code that will remove Libpod containers using Libpod's container removal logic - this ensures that they're cleanly and completely removed. For other containers (Buildah, CRI-O, etc) we fall back to manually removing the containers using the image from c/storage. Unfortunately, our logic for invoking the Podman removal function had an error, and it did not properly handle cases where we were force-removing an image with >1 name. Force-removing such images by ID guarantees their removal, not just an untag of a single name; our code for identifying whether to remove containers did not proper detect this case, so we fell through and deleted the Podman containers as storage containers, leaving traces of them in the Libpod DB. Fixes #7153 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * Don't crash when giving bogus format commandsDaniel J Walsh2020-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if you give a bogus flag to --format it will crash the formatter. With this change we will get a nice error. podman images --format '{{ bogus }}' Error: template: list:1: function "bogus" not defined versus /bin/podman.old images --format '{{ bogus }}' panic: template: list:1: function "bogus" not defined goroutine 1 [running]: Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> <MH: Fixed compile after cherry pick> Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * Binding the same container port to >1 host port is OKMatthew Heon2020-07-31
| | | | | | | | | | | | | | | | | | | | | | The initial version of the new port code mistakenly restricted this, so un-restrict it. We still need to maintain the map of container ports, unfortunately (need to verify if the port in question is a duplicate, for example). Fixes #7062 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * Specifying --ipc=host --pid=host is brokenDaniel J Walsh2020-07-31
| | | | | | | | | | | | | | | | For some reason we were overwriting memory when handling both --pid=host and --ipc=host. Simplified the code to handle this correctly, and add test to make sure it does not happen again. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
| * add newline to output in error messageAnthony Sottile2020-07-31
| | | | | | | | Signed-off-by: Anthony Sottile <asottile@umich.edu>
| * When chowning we should not follow symbolic linkDaniel J Walsh2020-07-31
| | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
| * replace the html/template package with text/templatePaul Holzinger2020-07-31
| | | | | | | | | | | | | | | | | | Currently some commands use the html/template package. This can lead to invalid output. e.g. `system df --verbose` will print `&lt;none&gt;` instead of `<none>` with an untaged image. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
| * The `podman start --attach` command should not print IDMatthew Heon2020-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Somewhere in the Podman v2 rewrite, we allowed `podman start --attach` to print the container ID of the started container after exiting from the attach session (via detach key or the container exiting naturally). We should never print the ID when `--attach` is given, which makes the fix simple - make the print statement conditional on `--attach` not being present. Wierdly, this only happened with `--interactive` was given to `podman start`. I don't know why that is, but this resolves the issue without having to dig any deeper, so I'm content. Fixes #7055 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * Fix exit code example in podman-run.1.mdErik Sjölund2020-07-31
|/ | | | Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
* Merge pull request #7166 from vrothberg/2.0-backportsOpenShift Merge Robot2020-07-31
|\ | | | | 2.0 backports
| * Switch references from libpod.conf to containers.confDaniel J Walsh2020-07-31
| | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
| * Bump github.com/rootless-containers/rootlesskit from 0.9.5 to 0.10.0Akihiro Suda2020-07-31
| | | | | | | | | | | | Fix #7016 via https://github.com/rootless-containers/rootlesskit/pull/157 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
| * compat/info.go: TrimPrefix(CGroupsVersion, "v")Akihiro Suda2020-07-31
| | | | | | | | | | | | For compatibility with Docker: https://github.com/moby/moby/blob/846b7e24ba549a972a2672ffdd88b140da688736/api/swagger.yaml#L4528-L4534 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
| * Fix building from http or '-' optionsDaniel J Walsh2020-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When copying from a URL, podman will download and create a context directory in a temporary file. The problem was that this directory was being removed as soon as the function that created it was returned. Later the build code would look for content in the temporary directory and fail to find it, blowing up the build. By pulling the extraction code back into the build function, we keep the temporary directory around until the build completes. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
| * Fix `podman image search` missing descriptionRalf Haferkamp2020-07-31
|/ | | | | | | `podman image search` returned wrong results for the image "Description" as it was mapped to the wrong field ("ID") in the search results. Signed-off-by: Ralf Haferkamp <rhafer@suse.com>
* Merge pull request #7089 from vrothberg/2.0-fix-7078OpenShift Merge Robot2020-07-27
|\ | | | | [2.0] events parsing fix #7078
| * test/apiv2: add a simple events testValentin Rothberg2020-07-27
| | | | | | | | | | | | | | Add a simple test to exercise the events API without the "filters" parameter. Prevents regressing on #7078. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * API events: fix parsing errorValentin Rothberg2020-07-27
|/ | | | | | | | Fix an error where an absent "filters" parameter led to JSON parsing errors. Fixes: #7078 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Merge pull request #7069 from mheon/bump_203OpenShift Merge Robot2020-07-23
|\ | | | | Bump to v2.0.3
| * Bump to v2.0.4-devMatthew Heon2020-07-23
| | | | | | | | Signed-off-by: Matthew Heon <mheon@redhat.com>
| * Bump to v2.0.3v2.0.3Matthew Heon2020-07-23
|/ | | | Signed-off-by: Matthew Heon <mheon@redhat.com>
* Merge pull request #7054 from mheon/backports_203OpenShift Merge Robot2020-07-23
|\ | | | | Backports and Release Notes for v2.0.3
| * Drop a nonfunctional test in test/apiv2Matthew Heon2020-07-22
| | | | | | | | | | | | | | | | | | I'm somewhat reluctant to do this, but the file has diverged majorly from master, and the amount of stuff we've backported (versus not backported) makes me very hesitant to try cherry picking more from master in the hope that it will start working. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * Update release notes for v2.0.3Matthew Heon2020-07-22
| | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * Fix handling of entrypointDaniel J Walsh2020-07-22
| | | | | | | | | | | | | | If a user specifies an entrypoint of "" then we should not use the images entrypoint. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
| * log API: add context to allow for cancellingValentin Rothberg2020-07-22
| | | | | | | | | | | | | | | | | | Add a `context.Context` to the log APIs to allow for cancelling streaming (e.g., via `podman logs -f`). This fixes issues for the remote API where some go routines of the server will continue writing and produce nothing but heat and waste CPU cycles. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * fix API: Create container with an invalid configurationzhangguanzhang2020-07-22
| | | | | | | | Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
| * Remove all instances of named return "err" from LibpodMatthew Heon2020-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was inspired by https://github.com/cri-o/cri-o/pull/3934 and much of the logic for it is contained there. However, in brief, a named return called "err" can cause lots of code confusion and encourages using the wrong err variable in defer statements, which can make them work incorrectly. Using a separate name which is not used elsewhere makes it very clear what the defer should be doing. As part of this, remove a large number of named returns that were not used anywhere. Most of them were once needed, but are no longer necessary after previous refactors (but were accidentally retained). Signed-off-by: Matthew Heon <matthew.heon@pm.me>
| * Fix: Correct connection counters for hijacked connectionsKorhonen Sami (Samlink)2020-07-22
| | | | | | | | | | | | | | | | | | | | This patch fixes connection counters for v2 endpoints Idletracker was moved to a new package to prevent package cycle. Hijacking code still remains in wrong place and should be moved later to isolated package Signed-off-by: Sami Korhonen <skorhone@gmail.com>