aboutsummaryrefslogtreecommitdiff
path: root/pkg/api
Commit message (Collapse)AuthorAge
* fix: unmount container without forceMatej Vasek2020-11-19
| | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* style: wslMatej Vasek2020-11-19
| | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix lintMatej Vasek2020-11-19
| | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Implement containers/{id or name}/archiveMatej Vasek2020-11-19
| | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Merge pull request #8391 from baude/networkconnectdisconnectOpenShift Merge Robot2020-11-19
|\ | | | | add network connect|disconnect compat endpoints
| * add network connect|disconnect compat endpointsbaude2020-11-19
| | | | | | | | | | | | | | | | | | | | | | this enables the ability to connect and disconnect a container from a given network. it is only for the compatibility layer. some code had to be refactored to avoid circular imports. additionally, tests are being deferred temporarily due to some incompatibility/bug in either docker-py or our stack. Signed-off-by: baude <bbaude@redhat.com>
* | Merge pull request #8379 from rhatdan/remote2OpenShift Merge Robot2020-11-18
|\ \ | | | | | | Remove build \!remote flags from test phase 2
| * | Remove build \!remote flags from test phase 2Daniel J Walsh2020-11-18
| | | | | | | | | | | | | | | | | | | | | | | | Add some more tests, document cases where remote will not work Add FIXMEs for tests that should work on podman-remote but currently do not. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
| * | podman-remote network rm --force is brokenDaniel J Walsh2020-11-18
| | | | | | | | | | | | | | | | | | | | | The --force parameter was not being handled correctly. This is leading to some race conditions in testing failures. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Align the podman pod ps --filter behavior with podman psPaul Holzinger2020-11-18
|/ / | | | | | | | | | | | | | | | | Filters with the same key work inclusive with the only exception being `label` which is exclusive. Filters with different keys always work exclusive. Also update the documentation with the new behavior. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Merge pull request #8376 from Luap99/podman-filtersOpenShift Merge Robot2020-11-18
|\ \ | |/ |/| Align the podman ps --filter behavior with docker
| * Align the podman ps --filter behavior with dockerPaul Holzinger2020-11-18
| | | | | | | | | | | | | | | | | | | | All of our filters worked exclusive resulting in `--filter status=created --filter status=exited` to return nothing. In docker filters with the same key work inclusive with the only exception being `label` which is exclusive. Filters with different keys always work exclusive. This PR aims to match the docker behavior with podman. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Merge pull request #8355 from baude/compatnetworkconnectdisconnectOpenShift Merge Robot2020-11-17
|\ \ | | | | | | add network connect|disconnect compat endpoints
| * | add network connect|disconnect compat endpointsbaude2020-11-17
| |/ | | | | | | | | | | | | | | | | | | | | this enables the ability to connect and disconnect a container from a given network. it is only for the compatibility layer. some code had to be refactored to avoid circular imports. additionally, tests are being deferred temporarily due to some incompatibility/bug in either docker-py or our stack. Signed-off-by: baude <bbaude@redhat.com>
* / Add an option to control if play kube should start the podAlban Bedel2020-11-17
|/ | | | | | | | | | Having play kube start the pod is not always appropriate, one might for example like to have the pod running as a set of systemd services. Add a `start` option to the command line and API to control if the pod should be started or not; it defaults to true for backward compatibility. Signed-off-by: Alban Bedel <albeu@free.fr>
* Merge pull request #8333 from rhatdan/buildahOpenShift Merge Robot2020-11-14
|\ | | | | Podman-remote build is getting ID twice
| * Podman-remote build is getting ID twiceDaniel J Walsh2020-11-14
| | | | | | | | | | | | | | | | | | This PR eliminates the second sending of the image id to the podman-remote client. Fixes: https://github.com/containers/podman/issues/8332 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Refactor to use DockerClient vs APIClientJhon Honce2020-11-12
|/ | | | | | | * Update tests and framework * remove tests for APIClient methods Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Set default network driver for APIv2 networksbaude2020-11-10
| | | | | | | | | | Recent changes in networking require that the cni network driver be set. If the user provides no driver, we set the driver to the defaultnetworkdriver which currently is "bridge". Fixes: #8294 Signed-off-by: baude <bbaude@redhat.com>
* Merge pull request #8270 from andylibrian/log-driver-option-for-play-kubeOpenShift Merge Robot2020-11-10
|\ | | | | Add --log-driver to play kube
| * Add --log-driver to play kubeAndy Librian2020-11-08
| | | | | | | | | | | | addresses #6604 Signed-off-by: Andy Librian <andylibrian@gmail.com>
* | Merge pull request #8236 from jwhonce/jira/run-976OpenShift Merge Robot2020-11-09
|\ \ | | | | | | Update CI tests to run python docker library against API
| * | Update CI tests to run python docker library against APIJhon Honce2020-11-09
| |/ | | | | | | | | | | | | | | | | | | | | * Update reference to docker-py to docker to reflect change in library name * Update tests to create storage sandbox * Enable all tests that endpoints support * Refactor containers/{id}/rename to return 404 not 500 * Refactor tests to use quay.io vs. docker.io Signed-off-by: Jhon Honce <jhonce@redhat.com>
* / rootless container creation settingsbaude2020-11-05
|/ | | | | | | | when running container creation as rootless on the compatibility layer, we need to make sure settings are not being done for memory and memory swappiness. Signed-off-by: baude <bbaude@redhat.com>
* Change http ConnState actions between new and activeAlex Schultz2020-10-31
| | | | | | | | | | | | Currently it double counts connections because it's incrementing the total for both the new and active states. Based on the comments, we should only count new connections for the total count and perform the timer stop actions when the connection has transitioned to an active state. Closes #8208 Signed-off-by: Alex Schultz <aschultz@redhat.com>
* NewFromLocal can return multiple imagesDaniel J Walsh2020-10-28
| | | | | | | | | | If you use additional stores and pull the same image into writable stores, you can end up with the situation where you have the same image twice. This causes image exists to return the wrong error. It should return true in this situation rather then an error. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Add pod, volume, network to inspect packageAshley Cui2020-10-27
| | | | | | | | | | | | | | | | | | podman inspect only had the capabilities to inspect containers and images. if a user wanted to inspect a pod, volume, or network, they would have to use `podman network inspect`, `podman pod inspect` etc. Docker's cli allowed users to inspect both volumes and networks using regular inspect, so this commit gives the user the functionality If the inspect type is not specified using --type, the order of inspection is: containers images volumes networks pods meaning if container that has the same name as an image, podman inspect would return the container inspect. To avoid duplicate code, podman network inspect and podman volume inspect now use the inspect package as well. Podman pod inspect does not because podman pod inspect returns a single json object while podman inspect can return multiple) Signed-off-by: Ashley Cui <acui@redhat.com>
* Merge pull request #8109 from matejvasek/inspect-apiv2-rootfsOpenShift Merge Robot2020-10-23
|\ | | | | fix: /image/{name or id}/json returns RootFS layers
| * src: nil checkMatej Vasek2020-10-22
| | | | | | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
| * src: add nil checksMatej Vasek2020-10-22
| | | | | | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
| * fix: /image/{name}/json returns RootFS layersMatej Vasek2020-10-22
| | | | | | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* | Merge pull request #8078 from baude/networkdisconnectOpenShift Merge Robot2020-10-22
|\ \ | |/ |/| APIv2 compatibility network connect|disconnect
| * APIv2 compatibility network connect|disconnectbaude2020-10-22
| | | | | | | | | | | | Add endpoints for the compat layer for network connect and disconnect. As of now, these two endpoints do nothing to change the network state of a container. They do some basic data verification and return the proper 200 response. This at least allows for scripts to work on the compatibility layer instead of getting 404s. Signed-off-by: baude <bbaude@redhat.com>
* | Merge pull request #7956 from QiWang19/save-rm-sigOpenShift Merge Robot2020-10-22
|\ \ | | | | | | Allow save image remove-signatures
| * | save image remove signaturesQi Wang2020-10-21
| | | | | | | | | | | | | | | | | | | | | remove signatures to podman save since the image formats do not support signatures Close: #7659 Signed-off-by: Qi Wang <qiwan@redhat.com>
* | | set compat network driver defaultbaude2020-10-21
| |/ |/| | | | | | | | | when using the compatibility endpoint for creating a network, if the driver is not provided, we need to set it to the default network driver ... which is bridge. Signed-off-by: baude <bbaude@redhat.com>
* | Merge pull request #8083 from crunchtime-ali/add-eol-to-compat-logOpenShift Merge Robot2020-10-21
|\ \ | | | | | | Add EOL to compat container logs
| * | Add EOL to compat container logsAlexander Zigelski2020-10-21
| |/ | | | | | | Signed-off-by: Alexander Zigelski <ali@crunchtime.dev>
* | Merge pull request #8022 from baude/compatapitospecgenOpenShift Merge Robot2020-10-21
|\ \ | |/ |/| refactor api compatibility container creation to specgen
| * refactor api compatibility container creation to specgenbaude2020-10-20
| | | | | | | | | | | | when using the compatibility layer to create containers, it used code paths to the pkg/spec which is the old implementation of containers. it is error prone and no longer being maintained. rather that fixing things in spec, migrating to specgen usage seems to make the most sense. furthermore, any fixes to the compat create will not need to be ported later. Signed-off-by: baude <bbaude@redhat.com>
* | Merge pull request #8042 from rhatdan/tlsverifyOpenShift Merge Robot2020-10-20
|\ \ | | | | | | --tls-verify and --authfile should work for all remote commands
| * | --tls-verify and --authfile should work for all remote commandsDaniel J Walsh2020-10-19
| | | | | | | | | | | | | | | | | | | | | These options are now fully supported in the remote API and should no longer be hidden and/or documented as non supported. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #7999 from mheon/signal_handlerOpenShift Merge Robot2020-10-20
|\ \ \ | |_|/ |/| | Add a shutdown signal handler
| * | Enforce LIFO ordering for shutdown handlersMatthew Heon2020-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to run both the Libpod and Server handlers at the same time without unregistering one. Also, pass the signal that killed us into the handlers, in case they want to use it to determine what to do (e.g. what exit code to set). Signed-off-by: Matthew Heon <mheon@redhat.com>
| * | Enable masking stop signals within container creationMatthew Heon2020-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expand the use of the Shutdown package such that we now use it to handle signals any time we run Libpod. From there, add code to container creation to use the Inhibit function to prevent a shutdown from occuring during the critical parts of container creation. We also need to turn off signal handling when --sig-proxy is invoked - we don't want to catch the signals ourselves then, but instead to forward them into the container via the existing sig-proxy handler. Fixes #7941 Signed-off-by: Matthew Heon <mheon@redhat.com>
| * | Add a shutdown handler packageMatthew Heon2020-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need a unified package for handling signals that shut down Libpod and Podman. We need to be able to do different things on receiving such a signal (`system service` wants to shut down the service gracefully, while most other commands just want to exit) and we need to be able to inhibit this shutdown signal while we are waiting for some critical operations (e.g. creating a container) to finish. This takes the first step by defining the package that will handle this. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | | fix: neutral value for MemorySwappinessMatej Vasek2020-10-20
| |/ |/| | | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* | 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 container exists and diff for storage containersDaniel J Walsh2020-10-15
| | | | | | | | | | | | | | | | | | | | | | | | Current these commands only check if a container exists in libpod. With this fix, the commands will also check if they are in containers/storage. This allows users to look at differences within a buildah or CRI-O container. Currently buildah diff does not exists, so this helps out in that situation as well as in CRI-O since the cri does not implement a diff command. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #7987 from jwhonce/jira/run-898-5OpenShift Merge Robot2020-10-14
|\ \ | | | | | | Restore --format table support