507 Commits

Author SHA1 Message Date
f62a356515 Remove varlink support from Podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-26 16:50:42 -05:00
ad2439264d Merge pull request #8487 from riyad/fix-ping-typo
REST API v2 - ping - fix typo in header
2020-11-26 16:41:53 +01:00
0ae1221a46 REST API v2 - ping - fix typo in header
Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
2020-11-25 20:49:08 +01:00
af6106f3ff REST API v2 - ping - remove newline from response to improve Docker compatibility
Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
2020-11-25 20:43:36 +01:00
44da01f45c Refactor compat container create endpoint
* 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>
2020-11-23 15:20:39 -06:00
5d55285188 Merge pull request #8409 from mlegenovic/master
Docker compat API fixes
2020-11-23 21:17:05 +01:00
6f7b7060e8 [WIP] Docker compat API fixes
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>
2020-11-23 17:45:24 +01:00
dd343418ce Merge pull request #8263 from rhatdan/restart
Allow containers to --restart on-failure with --rm
2020-11-23 13:44:37 +01:00
5292d5a7b8 Merge pull request #8429 from psakar/fix-json-capabilities
APIv2 - strip CAP_ prefix from capabilities in inspect container json
2020-11-21 10:32:28 +01:00
435f61f497 APIv2 - strip CAP_ prefix from capabilities in json
strip prefix "CAP_" from capabilities in json generated by container inspect operation

Signed-off-by: Petr Sakař <petr.sakar@chare.eu>
2020-11-20 21:46:51 +01:00
dc8996ec84 Allow containers to --restart on-failure with --rm
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-20 13:55:19 -05:00
d8795a36b2 Make podman service log events
* Log endpoint calls at level Info
* Ensure API server started at level Info

Fixes #8390

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-11-19 14:42:56 -07:00
e239bfa15b Merge pull request #8391 from baude/networkconnectdisconnect
add network connect|disconnect compat endpoints
2020-11-19 16:54:29 +01:00
a3e0b7d117 add network connect|disconnect compat endpoints
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>
2020-11-19 08:16:19 -06:00
b1007caca5 Merge pull request #8379 from rhatdan/remote2
Remove build \!remote flags from test phase 2
2020-11-18 22:51:52 +01:00
e7fd9234cd Align the podman pod ps --filter behavior with podman ps
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>
2020-11-18 19:31:25 +01:00
3b6d7a3669 Remove build \!remote flags from test phase 2
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>
2020-11-18 13:02:44 -05:00
72b67715f8 podman-remote network rm --force is broken
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>
2020-11-18 12:57:39 -05:00
61a82159db Merge pull request #8376 from Luap99/podman-filters
Align the podman ps --filter behavior with docker
2020-11-18 18:55:05 +01:00
4f427a89cb Align the podman ps --filter behavior with docker
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>
2020-11-18 11:36:06 +01:00
8a0c3d878b Merge pull request #8355 from baude/compatnetworkconnectdisconnect
add network connect|disconnect compat endpoints
2020-11-17 23:18:48 +01:00
d3e794bda3 add network connect|disconnect compat endpoints
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>
2020-11-17 14:22:39 -06:00
7ab936eafa Add an option to control if play kube should start the pod
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>
2020-11-17 20:00:58 +01:00
4eb9c28433 Merge pull request #8333 from rhatdan/buildah
Podman-remote build is getting ID twice
2020-11-14 15:10:09 +01:00
b5e15f18d0 Podman-remote build is getting ID twice
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>
2020-11-14 06:25:29 -05:00
a1187ee6f3 Refactor to use DockerClient vs APIClient
* Update tests and framework
* remove tests for APIClient methods

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-11-12 15:13:09 -07:00
b917b9925c Set default network driver for APIv2 networks
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>
2020-11-10 14:00:54 -06:00
da95fb4226 Merge pull request #8270 from andylibrian/log-driver-option-for-play-kube
Add --log-driver to play kube
2020-11-10 12:29:19 +00:00
716f70b5c5 Merge pull request #8236 from jwhonce/jira/run-976
Update CI tests to run python docker library against API
2020-11-09 20:08:29 +00:00
2d50ec6996 Update CI tests to run python docker library against API
* 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>
2020-11-09 10:45:54 -07:00
f3355d9697 Add --log-driver to play kube
addresses #6604

Signed-off-by: Andy Librian <andylibrian@gmail.com>
2020-11-08 08:59:18 +07:00
71a4676404 rootless container creation settings
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>
2020-11-05 12:27:48 -06:00
0ac857fc0f Change http ConnState actions between new and active
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>
2020-10-31 20:31:33 -06:00
99d3e2e9d7 NewFromLocal can return multiple images
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>
2020-10-28 16:02:53 -04:00
61deec451f Add pod, volume, network to inspect package
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>
2020-10-27 14:42:54 -04:00
51fa8ded9f Merge pull request #8109 from matejvasek/inspect-apiv2-rootfs
fix: /image/{name or id}/json returns RootFS layers
2020-10-23 07:01:03 -04:00
a53a660313 Merge pull request #8078 from baude/networkdisconnect
APIv2 compatibility network connect|disconnect
2020-10-22 16:19:11 -04:00
a997b59e44 src: nil check
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2020-10-22 20:05:01 +02:00
5098048f82 src: add nil checks
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2020-10-22 18:33:15 +02:00
89e7b8f22b fix: /image/{name}/json returns RootFS layers
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2020-10-22 17:09:44 +02:00
513c2610f3 Merge pull request #7956 from QiWang19/save-rm-sig
Allow save image remove-signatures
2020-10-22 11:00:09 -04:00
6841936525 APIv2 compatibility network connect|disconnect
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>
2020-10-22 08:20:28 -05:00
cf227cc7f2 set compat network driver default
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>
2020-10-21 14:48:29 -05:00
61b276a05c Merge pull request #8083 from crunchtime-ali/add-eol-to-compat-log
Add EOL to compat container logs
2020-10-21 15:31:08 -04:00
b26c6519ac Add EOL to compat container logs
Signed-off-by: Alexander Zigelski <ali@crunchtime.dev>
2020-10-21 16:21:28 +02:00
b898f914a3 save image remove signatures
remove signatures to podman save since the image formats do not support signatures
Close: #7659

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-10-21 10:00:08 -04:00
d5073af6b2 Merge pull request #8022 from baude/compatapitospecgen
refactor api compatibility container creation to specgen
2020-10-21 06:35:51 -04:00
4822cc8cab Merge pull request #8042 from rhatdan/tlsverify
--tls-verify and --authfile should work for all remote commands
2020-10-20 15:34:56 -04:00
eb91d66c4a refactor api compatibility container creation to specgen
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>
2020-10-20 12:06:59 -05:00
6c0b600e7d Merge pull request #7999 from mheon/signal_handler
Add a shutdown signal handler
2020-10-20 11:16:11 -04:00