summaryrefslogtreecommitdiff
path: root/pkg/api
Commit message (Collapse)AuthorAge
* Merge pull request #11924 from jwhonce/issues/11894OpenShift Merge Robot2021-10-12
|\ | | | | Refactor podman search to be more code friendly
| * Refactor podman search to be more code friendlyJhon Honce2021-10-12
| | | | | | | | | | | | | | | | | | | | | | * JSON and API description fields are no longer truncated. Formatting moved to client, better support of MVP. * --no-trunc now defaults to true * Updated tests for changes Closes #11894 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Fix CI flake on time of shutdown for API serviceJhon Honce2021-10-12
|/ | | | | | | | | | | | | | | | | | | * Increase timeout for tests to 10s * To aid in debugging add PID to shutdown package logging * Added new message for forced service shutdown * Always wait for HTTP server to shutdown, duration of 0 not friendly to clients Note: The log event "IdleTracker: StateClosed transition by connection marked un-managed" denotes a TCP connection has been initiated but no HTTP request was sent. And is expected during these tests. Fixes #11921 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Merge pull request #11869 from jwhonce/wip/pprofOpenShift Merge Robot2021-10-10
|\ | | | | Enable /debug/pprof API service endpoints
| * Enable /debug/pprof API service endpointsJhon Honce2021-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor sidecar HTTP service for /debug/pprof endpoints to use a TCP address given via new podman system service --pprof-address flag * Allow same URL parsing in "system service" as bindings/connection.go * Refactor NewServerWithSettings() to use entities.ServiceOptions in place of deleted server.Options * Updated godoc for impacted functions and types * Fixed API service Shutdown() to do an orderly shutdown when terminated and running with --time=0 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | faster image inspectionValentin Rothberg2021-10-08
|/ | | | | | | | | | | | | | Vendor the latest HEAD in c/common to pull in changes for a faster inspection of images. Previously, only the size computation was optional, now the one for the parent image is as well. In many cases, the parent image is not needed but it takes around 10ms on my local machine. With this change, we cut off 10ms from many code paths, most importantly, container creation. [NO NEW TESTS NEEDED] Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Add --time out for podman * rm -f commandsDaniel J Walsh2021-10-04
| | | | | | | | | Add --time flag to podman container rm Add --time flag to podman pod rm Add --time flag to podman volume rm Add --time flag to podman network rm Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #11833 from umohnani8/swaggerOpenShift Merge Robot2021-10-01
|\ | | | | Add note about empty fields and null values for API responses
| * Add note about empty fields and null values for API responsesUrvashi Mohnani2021-10-01
| | | | | | | | | | | | | | | | | | | | | | Add a note the global swagger docs about some fields not showing up in responses as they are set to omitempty. Also add a note about null values for complicated field types that swagger-go has a hard time with. [NO TESTS NEEDED] Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* | Add podman play kube --no-hosts optionsDaniel J Walsh2021-10-01
|/ | | | | | | | | This option will setup the containers to not modify their /etc/hosts file and just use the one from the image. Fixes: https://github.com/containers/podman/issues/9500 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* image prune: support removing external containersValentin Rothberg2021-09-28
| | | | | | | | Support removing external containers (e.g., build containers) during image prune. Fixes: #11472 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Document missing /images/search query parametersJelle van der Waa2021-09-24
| | | | | | | | Include the tlsVerify, listTags query parameters for the compat and libpod endpoint and document the default value for the amount of results which are returned. Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
* Merge pull request #11654 from Luap99/health-dockerOpenShift Merge Robot2021-09-23
|\ | | | | podman inspect add State.Health field for docker compat
| * podman inspect add State.Health field for docker compatPaul Holzinger2021-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | podman inspect shows the healthcheck status in `.State.Healthcheck`, docker uses `.State.Health`. To make sure docker scripts work we should add the `Health` key. Because we do not want to display both keys by default we only use the new `Health` key. This is a breaking change for podman users but matches what docker does. To provide some form of compatibility users can still use `--format {{.State.Healthcheck}}`. IT is just not shown by default. Fixes #11645 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | podman save: enforce signature removalValentin Rothberg2021-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Enforce the removal of signatures in `podman save` to restore behavior prior to the migration to libimage. We may consider improving on that in the future. For details, please refer to the excellent summary by @mtrmac [1]. [NO TESTS NEEDED] - manually verified but exisiting tests need some further investigation (see [1]). [1] https://github.com/containers/podman/pull/11669#issuecomment-925250264 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | standardize logrus messages to upper caseDaniel J Walsh2021-09-22
|/ | | | | | | | Remove ERROR: Error stutter from logrus messages also. [ NO TESTS NEEDED] This is just code cleanup. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* podman save: add `--uncompressed`Valentin Rothberg2021-09-22
| | | | | | | | | | Add an option to `podman save` to allow uncompressed layers when copying OCI images. Do the neccessary plumbing for the remote client, add tests and vendor in the latest commit from c/common to fetch the neccessary changes in libimage. Closes: #11613 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Pod Device Supportcdoern2021-09-20
| | | | | | | | | | added support for pod devices. The device gets added to the infra container and recreated in all containers that join the pod. This required a new container config item to keep track of the original device passed in by the user before the path was parsed into the container device. Signed-off-by: cdoern <cdoern@redhat.com>
* compat API: /images/json prefix image id with sha256Paul Holzinger2021-09-20
| | | | | | | | | Docker adds the `sha256:` prefix to the image ID, so our compat endpoint has to do this as well. Fixes #11623 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Do not allow network modes to be used as network namesPaul Holzinger2021-09-16
| | | | | | | | | `podman network create` should not allow users to create networks with a name which is already used for a network mode in `podman run --network`. Fixes #11448 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* fix inverted conditionMatej Vasek2021-09-16
| | | | | | [NO TESTS NEEDED] Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Merge pull request #11322 from Luap99/network-libpodOpenShift Merge Robot2021-09-15
|\ | | | | Wire network interface into libpod
| * Wire network interface into libpodPaul Holzinger2021-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make use of the new network interface in libpod. This commit contains several breaking changes: - podman network create only outputs the new network name and not file path. - podman network ls shows the network driver instead of the cni version and plugins. - podman network inspect outputs the new network struct and not the cni conflist. - The bindings and libpod api endpoints have been changed to use the new network structure. The container network status is stored in a new field in the state. The status should be received with the new `c.getNetworkStatus`. This will migrate the old status to the new format. Therefore old containers should contine to work correctly in all cases even when network connect/ disconnect is used. New features: - podman network reload keeps the ip and mac for more than one network. - podman container restore keeps the ip and mac for more than one network. - The network create compat endpoint can now use more than one ipam config. The man pages and the swagger doc are updated to reflect the latest changes. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Fix /auth compat endpointMatej Vasek2021-09-15
|/ | | | Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Merge pull request #11409 from cdoern/podVolumesOpenShift Merge Robot2021-09-15
|\ | | | | Pod Volumes Support
| * Pod Volumes Supportcdoern2021-09-14
| | | | | | | | | | | | | | | | | | added support for the --volume flag in pods using the new infra container design. users can specify all volume options they can with regular containers resolves #10379 Signed-off-by: cdoern <cdoern@redhat.com>
* | Merge pull request #11578 from jelly/handle_nil_pointer_derefOpenShift Merge Robot2021-09-15
|\ \ | | | | | | api: handle nil pointer dereference in api endpoints
| * | api: handle nil pointer dereference in rest endpointsJelle van der Waa2021-09-15
| | | | | | | | | | | | | | | | | | | | | | | | When `?all=garbage` is passed to an API endpoint schema validation fails and err is nil. Wrapf uses err to create an error message causing a nil pointer dereference. Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
* | | Merge pull request #11574 from nalind/buildah-platformsOpenShift Merge Robot2021-09-15
|\ \ \ | |/ / |/| | build: take advantage of --platform lists
| * | build: take advantage of --platform listsNalin Dahyabhai2021-09-14
| |/ | | | | | | | | | | | | | | | | | | | | The builder can take a list of platforms in the Platforms field of its BuildOptions argument, and we should definitely take advantage of that. The `bud-multiple-platform-values` test from buildah exercises support for this, so [NO TESTS NEEDED] Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
* / Document `all` query parameter for /libpod/images/pruneJelle van der Waa2021-09-14
|/ | | | Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
* Refacter API server emphasis on loggingJhon Honce2021-09-10
| | | | | | | | | | | | | | | * To aid in debugging log API request and response bodies at trace level. Events can be correlated using the X-Reference-Id. * Server now echos X-Reference-Id from client if set, otherwise generates an unique id. * Move logic for X-Reference-Id into middleware * Change uses of Header.Add() to Set() when setting Content-Type * Log API operations in Apache format using gorilla middleware * Port server code to use BaseContext and ConnContext Fixes #10053 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Merge pull request #11506 from giuseppe/fix-stats-restart-containerOpenShift Merge Robot2021-09-10
|\ | | | | stats: detect container restart and allow paused containers
| * api: correctly set the container statsGiuseppe Scrivano2021-09-10
| | | | | | | | | | | | | | override the outer scope variable instead of creating a local one. Otherwise the wrong variable would be used for the next iterations. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Add /containers/stats response to API docsJelle van der Waa2021-09-10
|/ | | | | | | | | | | Include the response schema for a succesful request in the /containers/stats API documentation Additionally remove http 409 from /libpod/containers/stats docs, the documentation was copied from the deprecated stats endpoint, when a container is unavailabe the endpoint returns an empty list and no 409. Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
* Merge pull request #11431 from jmguzik/secrets-ls-filtersOpenShift Merge Robot2021-09-07
|\ | | | | Add filtering functionality to http api secrets list
| * Add filtering functionality to http api secrets listJakub Guzik2021-09-03
| | | | | | | | | | | | | | | | Filtering is missing in both compat API and libpod API, while docker has filtering functinality. This commit enables filtering option using name and id in both libpod and http API. Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* | Merge pull request #11466 from jelly/doc_api_restartOpenShift Merge Robot2021-09-07
|\ \ | | | | | | [CI:DOCS] Document default timeout for libpod API Container Restart
| * | Document default timeout for libpod API Container RestartJelle van der Waa2021-09-07
| |/ | | | | | | Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
* / generate systemd: handle --restartValentin Rothberg2021-09-07
|/ | | | | | | | | Handle custom restart policies of containers when generating the unit files; those should be set on the unit level and removed from ExecStart flags. Fixes: #11438 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* InfraContainer Reworkcdoern2021-08-26
| | | | | | | | | | InfraContainer should go through the same creation process as regular containers. This change was from the cmd level down, involving new container CLI opts and specgen creating functions. What now happens is that both container and pod cli options are populated in cmd and used to create a podSpecgen and a containerSpecgen. The process then goes as follows FillOutSpecGen (infra) -> MapSpec (podOpts -> infraOpts) -> PodCreate -> MakePod -> createPodOptions -> NewPod -> CompleteSpec (infra) -> MakeContainer -> NewContainer -> newContainer -> AddInfra (to pod state) Signed-off-by: cdoern <cdoern@redhat.com>
* Merge pull request #11298 from baude/kubeupdownOpenShift Merge Robot2021-08-26
|\ | | | | teardown play kube
| * teardown play kubeBrent Baude2021-08-24
| | | | | | | | | | | | | | | | | | add the ability for play kube to tear down based on the yaml used to play it. it is indicated by --down in the play kube command. volumes are NOT deleted during the teardown. pods and their containers are stopped and removed. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #11218 from cdoern/untilBugOpenShift Merge Robot2021-08-26
|\ \ | | | | | | logFile until flag issue, negative duration replaced with positive
| * | logFile until flag issuecdoern2021-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | we were adding a negative duration in podman events, causing inputs like -5s to be correct and 5s to be incorrect. fixes #11158 Signed-off-by: cdoern <cdoern@redhat.com>
* | | logs: adjust handling around partial log messagesNalin Dahyabhai2021-08-23
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In libpod/logs.LogLine.Write(), don't write a newline to stdout/stderr when the log message is only part of a line. In libpod.ConmonOCIRuntime.HTTPAttach(), don't send a newline over the HTTP connection when the log message is only part of a line. In pkg/api/handlers/compat.LogsFromContainer(), don't send a newline over the HTTP connection when the log message is only part of a line, and don't make doing so conditional on whether or not the client used the docker or podman endpoint. In pkg/domain/infra/tunnel.ContainerEngine.ContainerLogs(), don't add our own newline to log messages, since they already come through from the server when they need to. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
* | Merge pull request #11286 from jwhonce/issues/11227OpenShift Merge Robot2021-08-20
|\ \ | | | | | | Update /version endpoint to add components
| * | Update /version endpoint to add componentsJhon Honce2021-08-19
| | | | | | | | | | | | | | | | | | | | | | | | * Include OCI and conmon information as components Fixes #11227 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | | Merge pull request #11280 from Luap99/info-pluginsOpenShift Merge Robot2021-08-19
|\ \ \ | |/ / |/| | Podman info output plugin information
| * | Podman info output plugin informationPaul Holzinger2021-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | For docker compat include information about available volume, log and network drivers which should be listed under the plugins key. Fixes #11265 Signed-off-by: Paul Holzinger <pholzing@redhat.com>