summaryrefslogtreecommitdiff
path: root/pkg/api/handlers
Commit message (Collapse)AuthorAge
* Return macvlan object in /network REST API responseVikas Goel2021-07-14
| | | | | | Fixes: #10266 Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
* Merge pull request #10868 from cdoern/untilLogOpenShift Merge Robot2021-07-10
|\ | | | | Implemented Until Query Parameter for Containers/logs
| * Implemented Until Query Parameter for Containers/logscdoern2021-07-09
| | | | | | | | | | | | | | | | compat containers/logs was missing actual usage of until query param. fixes #10859 Signed-off-by: cdoern <cdoern@redhat.com>
* | Add container config to compat image inspectBrent Baude2021-07-09
|/ | | | | | | | | | | With docker-compose, there is a use case where you can `docker-compose up -d`, then change a file like docker-compose.yml and run up again. This requires a ContainerConfig with at least Volumes be populated in the inspect data. This PR adds just that. Fixes: #10795 Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #10836 from Luap99/diffOpenShift Merge Robot2021-07-03
|\ | | | | podman diff accept two images or containers
| * podman diff accept two images or containersPaul Holzinger2021-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, make podman diff accept optionally a second argument. This allows the user to specify a second image/container to compare the first with. If it is not set the parent layer will be used as before. Second, podman container diff should only use containers and podman image diff should only use images. Previously, podman container diff would use the image when both an image and container with this name exists. To make this work two new parameters have been added to the api. If they are not used the previous behaviour is used. The same applies to the bindings. Fixes #10649 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Implement --archive flag for podman cpMatej Vasek2021-07-01
|/ | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Bump github.com/containers/storage from 1.32.3 to 1.32.5Daniel J Walsh2021-06-29
| | | | | | | | | | | | | | | | | Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.32.3 to 1.32.5. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/main/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.32.3...v1.32.5) --- updated-dependencies: - dependency-name: github.com/containers/storage dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #10736 from trusch/feature-use-secret-configOpenShift Merge Robot2021-06-25
|\ | | | | read secret config from config file if no user data.
| * make DriverOpts name consistent.Tino Rusch2021-06-25
| | | | | | | | Signed-off-by: Tino Rusch <tino.rusch@gmail.com>
| * read secret config from config file if no user data.Tino Rusch2021-06-24
| | | | | | | | | | | | | | | | | | | | | | | | feat: read secret config from config file if the user hasn't entered explicit config values feat: allow to specify `--driver-opts opt1=val1,opt2=val2` in the secret create command to allow overriding the default values fix: show driver options in `podman secret inspect` Signed-off-by: Tino Rusch <tino.rusch@gmail.com>
* | remove `pkg/registries`Valentin Rothberg2021-06-25
|/ | | | | | | | | | | | | | Pull the trigger on the `pkg/registries` package which acted as a proxy for `c/image/pkg/sysregistriesv2`. Callers should be using the packages from c/image directly, if needed at all. Also make use of libimage's SystemContext() method which returns a copy of a system context, further reducing the risk of unintentionally altering global data. [NO TESTS NEEDED] Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Merge pull request #10610 from cdoern/healthCheckOpenShift Merge Robot2021-06-23
|\ | | | | Edited compat handling code for containers/json status and added python tests
| * Health Check is not handled in the compat LibpodToContainerJSONcdoern2021-06-23
| | | | | | | | | | | | | | | | Added parsing and handling for the healthCheck status within containers.go. Also modified tests fixes #10457 Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | create: support images with invalid platformValentin Rothberg2021-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Much to my regret, there is a number of images in the wild with invalid platforms breaking the platform checks in libimage that want to make sure that a local image is matching the expected platform. Imagine a `podman run --arch=arm64 fedora` with a local amd64 fedora image. We really shouldn't use the local one in this case and pull down the arm64 one. The strict platform checks in libimage in combination with invalid platforms in images surfaced in Podman being able to pull an image but failing to look it up in subsequent presence checks. A `podman run` would hence pull such an image but fail to create the container. Support images with invalid platforms by vendoring the latest HEAD from containers/common. Also remove the partially implemented pull-policy logic from Podman and let libimage handle that entirely. However, whenever --arch, --os or --platform are specified, the pull policy will be forced to "newer". This way, we pessimistically assume that the local image has an invalid platform and we reach out to the registry. If there's a newer image (i.e., one with a different digest), we'll pull it down. Please note that most of the logic has either already been implemented in libimage or been moved down which allows for removing some clutter from Podman. [NO TESTS NEEDED] since c/common has new tests. Podman can rely on the existing tests. Fixes: #10648 Fixes: #10682 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #10683 from Luap99/exec-resizeOpenShift Merge Robot2021-06-16
|\ \ | | | | | | Fix resize race with podman exec -it
| * | Fix resize race with podman exec -itPaul Holzinger2021-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When starting a process with `podman exec -it` the terminal is resized after the process is started. To fix this allow exec start to accept the terminal height and width as parameter and let it resize right before the process is started. Fixes #10560 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #10622 from cdoern/imgImportFeatureOpenShift Merge Robot2021-06-15
|\ \ \ | |/ / |/| | compat import imageFromSrc support for platform query parameter
| * | Image import fromSrc now supports OS/Archcdoern2021-06-14
| | | | | | | | | | | | | | | | | | | | | | | | added handling in entities and compat to support passing a specified OS/Arch while importing from SRC. fixes #10566 Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | | Fix handling of podman-remote build --deviceDaniel J Walsh2021-06-13
| | | | | | | | | | | | | | | | | | Fixes: https://github.com/containers/podman/issues/10614 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Fall back to string for dockerfile parameterAlex Schultz2021-06-11
|/ / | | | | | | | | | | | | | | | | | | | | a9cb824981db3fee6b8445b29e513c89e9b9b00b changed the expectations of the dockerfile parameter to be json data however it's a string. In order to support both, let's attempt json and fall back to a string if the json parsing fails. Closes #10660 Signed-off-by: Alex Schultz <aschultz@redhat.com>
* | Merge pull request #10550 from rhatdan/DockerfileOpenShift Merge Robot2021-06-09
|\ \ | |/ |/| podman-remote build should handle -f option properly
| * podman-remote build should handle -f option properlyDaniel J Walsh2021-06-08
| | | | | | | | | | | | | | | | | | | | podman-remote build has to handle multiple different locations for the Containerfile. Currently this works in local mode but not when using podman-remote. Fixes: https://github.com/containers/podman/issues/9871 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | [CI:DOCS] Update swagger for inspect networkJhon Honce2021-06-08
| | | | | | | | | | | | | | | | struct for swagger was pointing to wrong internal type Fixes #10559 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #10603 from cdoern/networksQueryCharlie Doern2021-06-08
|\ \ | |/ |/| implemented verbose and scope as possible
| * fixed docs and schemascdoern2021-06-08
| | | | | | | | Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | Merge pull request #10597 from Luap99/pruneOpenShift Merge Robot2021-06-08
|\ \ | | | | | | Fix network prune api docs
| * | Fix network prune api docsPaul Holzinger2021-06-08
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The api doc used wrong response examples for both the compat and libpod network prune endpoints. Change the doc so that it matches the actual return values. Also fix the endpoints to return an empty array instead of null when no networks are removed. [NO TESTS NEEDED] Fixes: #10564 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #10548 from cdoern/imgFeatureOpenShift Merge Robot2021-06-08
|\ \ | | | | | | API images/create added missing parameters platform, message, repo
| * | made requested changes, fixed api testscdoern2021-06-04
| | | | | | | | | | | | Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | | remote pull: cancel pull when connection is closedPaul Holzinger2021-06-08
| |/ |/| | | | | | | | | | | | | | | | | | | If a client closes the http connection during image pull, the service should cancel the pull operation. [NO TESTS NEEDED] I have no idea how we could test this reliable. Fixes: #7558 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #10549 from Luap99/fix-9859OpenShift Merge Robot2021-06-05
|\ \ | | | | | | remote: always send resize before the container starts
| * | remote: always send resize before the container startsPaul Holzinger2021-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is race condition in the remote client attach logic. Because the resize api call was handled in an extra goroutine the container was started before the resize call happend. To fix this we have to call resize in the same goroutine as attach. When the first resize is done start a goroutine to listen on SIGWINCH in the background and resize again if the signal is received. Fixes #9859 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #10563 from Luap99/fix-10494OpenShift Merge Robot2021-06-04
|\ \ \ | | | | | | | | [CI:DOCS] fix incorrect network remove api doc
| * | | [CI:DOCS] fix incorrect network remove api docPaul Holzinger2021-06-04
| |/ / | | | | | | | | | | | | | | | | | | | | | The endpoint returns an array and not a single entry. Fixes #10494 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* / / remote events: fix --stream=falseValentin Rothberg2021-06-04
|/ / | | | | | | | | | | | | | | | | | | | | Fix a bug in remote events where only one event would be sent if when streaming is turned off. The source of the bug was that the handler attempted to implement the streaming logic and did it wrong. The fix is rather simple by removing this logic from the handler and let the events backend handle streaming. Fixes: #10529 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #10517 from cdoern/masterOpenShift Merge Robot2021-06-01
|\| | | | | API one-shot query implementation/handling
| * added tests in python rest apicdoern2021-06-01
| | | | | | | | Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | Merge pull request #10486 from vrothberg/tag-digest-supportOpenShift Merge Robot2021-06-01
|\ \ | | | | | | support tag@digest notation
| * | support tag@digest notationValentin Rothberg2021-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Vendor in the latest HEAd of containers/common to implicitly support the tag@digest notation for images. To remain compatible with Docker, the tag will be stripped off the image reference and is entirely ignored. Fixes: #6721 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #10519 from matejvasek/use-req-ctxOpenShift Merge Robot2021-06-01
|\ \ \ | | | | | | | | Use request context instead of background
| * | | Use request context instead of backgroundMatej Vasek2021-06-01
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents goroutine leak: If background context were used then push operation would continue even if client aborted request by closing connection. [NO TESTS NEEDED] Signed-off-by: Matej Vasek <mvasek@redhat.com>
* | | Merge pull request #10508 from matejvasek/fix-from-imgOpenShift Merge Robot2021-06-01
|\ \ \ | | | | | | | | Better error handing for images/create compat api
| * | | Better error handing for images/create compat apiMatej Vasek2021-05-31
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | If server cannot resolve short name due to enforcing policy send non-2xx status code. [NO TESTS NEEDED] Signed-off-by: Matej Vasek <mvasek@redhat.com>
* / / Use request context instead of background contextMatej Vasek2021-06-01
|/ / | | | | | | | | | | | | | | | | This fixes a goroutine leak. Previously if request was cancelled the image pulling goroutine kept running regardless. [NO TESTS NEEDED] Signed-off-by: Matej Vasek <mvasek@redhat.com>
* / Add the option of Rootless CNI networking by defaultMatthew Heon2021-05-26
|/ | | | | | | | | | | | | | | | | | | When the containers.conf field "NetNS" is set to "Bridge" and the "RootlessNetworking" field is set to "cni", Podman will now handle rootless in the same way it does root - all containers will be joined to a default CNI network, instead of exclusively using slirp4netns. If no CNI default network config is present for the user, one will be auto-generated (this also works for root, but it won't be nearly as common there since the package should already ship a config). I eventually hope to remove the "NetNS=Bridge" bit from containers.conf, but let's get something in for Brent to work with. Signed-off-by: Matthew Heon <mheon@redhat.com>
* Match swagger to "as built" outputJhon Honce2021-05-21
| | | | | | | | | | | * Remove all Types no longer referenced, they were never used A future API breaking version of Podman API, may restore these Types and push formatting into presentation layer vs. server. Fixes #9578 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* fix: response body of containers wait endpointMatej Vasek2021-05-18
| | | | | | | The `Error` part of response must be nil (or omitted) if no error occurred. Before this commit a zero value for the struct was returned. Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Merge pull request #10271 from matejvasek/fix-wait-next-exitOpenShift Merge Robot2021-05-10
|\ | | | | fix: improved "containers/{name}/wait" endpoint
| * fix: improved "containers/{name}/wait" endpointMatej Vasek2021-05-10
| | | | | | | | | | | | | | | | Using event API to detect changes to container instead of polling. Polling was unreliable, sometime change of a state might have been missed. Signed-off-by: Matej Vasek <mvasek@redhat.com>