summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat
Commit message (Collapse)AuthorAge
* REST API v2 - ping - fix typo in headerRiyad Preukschas2020-11-25
| | | | Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
* Refactor compat container create endpointJhon Honce2020-11-23
| | | | | | | | | | | | * Make endpoint compatibile with docker-py network expectations * Update specgen helper when called from compat endpoint * Update godoc on types * Add test for network/container create using docker-py method * Add syslog logging when DEBUG=1 for tests Fixes #8361 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* [WIP] Docker compat API fixesMilivoje Legenovic2020-11-23
| | | | | | | | These are the first fixes that are needed for development environments like Eclipse or IntelliJ that have Docker plug-ins and use the Docker API to speak with container engine (#7857) Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
* APIv2 - strip CAP_ prefix from capabilities in jsonPetr Sakař2020-11-20
| | | | | | strip prefix "CAP_" from capabilities in json generated by container inspect operation Signed-off-by: Petr Sakař <petr.sakar@chare.eu>
* 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>
* 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>
* | 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>
* 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>
* 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>
* 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>
* | fix: neutral value for MemorySwappinessMatej Vasek2020-10-20
|/ | | | Signed-off-by: Matej Vasek <mvasek@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>
* | alter compat no such image messagebaude2020-10-13
|/ | | | | | we need to alter the return error message when a GET (inspect) is performed on an image using the compatibility layer. docker-py bindings look for a initial capped error message. Signed-off-by: baude <bbaude@redhat.com>
* Merge pull request #7980 from 3sky/compatibility-api-timestampOpenShift Merge Robot2020-10-12
|\ | | | | Resolve #7860 - add time.RFC3339 format
| * Resolve #7860 - add time.RFC3339Nano into ContainerJSONBase3sky2020-10-12
| | | | | | | | Signed-off-by: 3sky <3sky@protonmail.com>
* | Monitor for client closing streamJhon Honce2020-10-09
|/ | | | | | Fixes #7946 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Merge pull request #7966 from baude/issue7950OpenShift Merge Robot2020-10-08
|\ | | | | add compatibility endpoint for exporting multiple images
| * add compatibility endpoint for exporting multiple imagesbaude2020-10-08
| | | | | | | | | | | | | | | | with the recent inclusion of dealing with multiple images in a tar archive, we can now add a compatibility endpoint that was missing images/get?names=one,two. Fixes: #7950 Signed-off-by: baude <bbaude@redhat.com>
* | Merge pull request #7952 from baude/issue7934OpenShift Merge Robot2020-10-08
|\ \ | |/ |/| APIv2 compatibility rootless network fix
| * APIv2 compatibility rootless network fixbaude2020-10-07
| | | | | | | | | | | | | | | | when using the compatibility mode as rootless, containers that were created were not setting their host names correctly due to the netmode not being set. Fixes: #7934 Signed-off-by: baude <bbaude@redhat.com>
* | 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>
* Merge pull request #7918 from zhangguanzhang/apiv2-wrong-StopSignalOpenShift Merge Robot2020-10-06
|\ | | | | [apiv2] /containers/$name/json return wrong value in `.Config.StopSignal`
| * fix apiv2 /containers/$name/json return wrong value in `.Config.StopSignal`zhangguanzhang2020-10-06
| | | | | | | | Signed-off-by: zhangguanzhang <zhangguanzhang@qq.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>
* | Fixes remote attach and exec to signal IdleTrackerJhon Honce2020-10-05
|/ | | | | | | | | | - Fixes issue where remote attach and exec only signaled the IdleTracker on errors. Needs to done anytime after connection has been hijacked - Fixes trying to send multiple http status codes to client - Changes pprof and API server shutdowns to run in parallel - Changes shutdown to run in sync.Once block Signed-off-by: Jhon Honce <jhonce@redhat.com>
* compat: images/create: fix tag parsingValentin Rothberg2020-10-02
| | | | | | | | The `tag` parameter of the compat `images/create` endpoint can be both, a tag and a digest. Fix parsing of the parameter to detect digests and use the appropriate `@` separator. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Merge pull request #7815 from jwhonce/wip/creds_remoteOpenShift Merge Robot2020-10-02
|\ | | | | Add X-Registry-Config support
| * Add X-Registry-Config supportJhon Honce2020-09-29
| | | | | | | | | | | | | | | | | | | | | | | | * Refactor auth pkg to support X-Registry-Config * Refactor build endpoint to support X-Registry-Config. Supports: * --creds * --authfile * Added X-Reference-Id Header to http.Request to support log event correlation * Log headers from http.Request Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #7851 from zhangguanzhang/fix-apiv2-ctr-workdir-and-envOpenShift Merge Robot2020-10-01
|\ \ | | | | | | [apiv2] don't ignore the ENV and WorkDir from the image
| * | fix: The container created by APIV2 has an incorrect Env and WorkDirzhangguanzhang2020-10-01
| |/ | | | | | | Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
* | Support --http-proxy for remote buildsJhon Honce2020-09-30
| | | | | | | | | | | | | | | | | | | | * Fix misspelled parameter * add http-proxy support for builds http_proxy must be set in the podman.service unit file, for example Environment=http_proxy=<value> Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Refactor IdleTracker to handle StateIdle transitionsJhon Honce2020-09-29
|/ | | | | | | | | | | * Remove stutter naming for package and types * Stop treating StateIdle the same as StateClosed, rather transitions to StateIdle will keep API timeout window open * Remove redundate code Fixes #7826 Signed-off-by: Jhon Honce <jhonce@redhat.com>