7311 Commits

Author SHA1 Message Date
75fdb753dd Handle annotations passed in via the client
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-21 05:18:39 -04:00
64f774866a Need to set the Entrypoint
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-21 05:18:39 -04:00
fc76fbf945 Fix podman inspect to return errors on failure
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-21 05:18:16 -04:00
8884f6a4f3 Merge pull request #5875 from rhatdan/network
Cleanup network option parsing
2020-04-21 05:09:54 -04:00
90636fe8c2 Merge pull request #5863 from vrothberg/v2-fix-rmi
podman rmi: refactor logic
2020-04-21 05:07:30 -04:00
09dc701097 podman rmi: refactor logic
While this commit was initially meant to fix #5847, it has turned into a
bigger refactoring which I did not manage to break into smaller pieces:

 * Fix #5847 by refactoring the image-removal logic.

 * Make the api handler for image-removal use the ABI code. This way,
   both (i.e., ABI and Tunnel) end up using the same code.  Achieving
   this code share required to move some code around to prevent circular
   dependencies.

 * Everything in pkg/api (excluding pkg/api/types) must now only be
   accessed from code using `ABISupport`.

 * Avoid imports from entities on handlers to prevent circular
   dependencies.

 * Move `podman system service` logic into `cmd` to prevent circular
   dependencies - it depends on pkg/api.

 * Also remove the build header from infra/abi files.  It will otherwise
   confuse swagger and other tools; errors we cannot fix as go doesn't
   expose a build-tag env variable.

Fixes: #5847
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-04-21 08:12:25 +02:00
89276a5f92 Merge pull request #5883 from abitrolly/patch-3
Return labes in API (fixes #5882)
2020-04-20 20:18:48 -04:00
b771467224 Merge pull request #5862 from rhatdan/v2
Fix up handling of image data as well as setting Linux Capabilties correctly
2020-04-20 17:19:32 -04:00
1e9b3e7500 Merge pull request #5899 from jwhonce/wip/tree
V2 podman image tree
2020-04-20 16:37:38 -04:00
37365b166d Merge pull request #5901 from jwhonce/wip/service
V2 Remove existing unix domain socket on startup
2020-04-20 16:17:42 -04:00
354088a94b Merge pull request #5889 from giuseppe/rootless-fd-join
rootless: move join namespace inside child process
2020-04-20 16:08:39 -04:00
b35a0d0cd2 Fix podman inspect to accept -l and -s fields
Podman inspect has a breaking change in that it dropped
--latest and --size options.

This PR adds these back.  Lots of tests rely on
podman inspect -l.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-20 15:52:46 -04:00
eb101936e6 Handle Linux Capabilities correctly
If user sets capabilities list we need handle minimal capabilities.

Also handle seccomp-policy being passed in.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-20 15:50:46 -04:00
a2ad5bb9e1 Add functions to return image informations
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-20 15:50:46 -04:00
5928e8fe80 Merge pull request #5896 from giuseppe/fix-cgroup-set
common: setting cgroup resources correctly
2020-04-20 15:50:02 -04:00
80355b168c Merge pull request #5897 from jwhonce/wip/diff
V2 Fix --latest for podman diff commands
2020-04-20 15:23:21 -04:00
405e39b0d6 V2 Rmove existing unix domain socket on startup
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-04-20 11:52:47 -07:00
06152434e6 Merge pull request #5879 from rhatdan/pull
Pull images when doing podman create
2020-04-20 13:18:59 -04:00
9cd6bba5d5 V2 podman image tree
* Basic port of V1 podman image tree ID

TODO: Refactor to return tree from service and format in presentation
layer
TODO: Support tunneling mode

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-04-20 10:10:24 -07:00
3eac39aaa0 V2 Fix --latest for podman diff commands
* --latest now forces container diff
* diff options now passed into domain layer
* updated help/usage messages

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-04-20 09:27:54 -07:00
788fdc685b rootless: move join namespace inside child process
open the namespace file descriptors inside of the child process.

Closes: https://github.com/containers/libpod/issues/5873

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-20 17:40:25 +02:00
8360fcf82c rootless: skip looking up parent user ns
since we join directly the conmon user namespace, there is no need to
look up its parent user namespace, as we can safely assume it is the
init namespace.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-20 17:40:24 +02:00
4e09c5ebb4 common: setting cgroup resources correctly
fix some cgroups related integration tests.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-20 17:26:53 +02:00
e5e625b2a6 Merge pull request #5872 from jwhonce/wip/options
V2 Fix support for tcp://[::]<port> connections
2020-04-20 10:42:00 -04:00
bd71135852 Merge pull request #5890 from sujil02/v2-pod-inspect-fix
Update pod inspect report to hold current pod status.
2020-04-20 10:16:19 -04:00
838df56bcf Update pod inspect report to hold current pod status.
Added status field in pod inspect report.
Fixed pod tests to use it.

Signed-off-by: Sujil02 <sushah@redhat.com>
2020-04-20 07:05:25 -04:00
02c2fbc4cd Merge pull request #5880 from abitrolly/patch-2
Make `find` ignore dot files
2020-04-20 06:34:08 -04:00
28c336e996 Pull images when doing podman create
Currently podman create does not pull images if they don't
exist.  It should follow the pull policy specified by the
user.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-20 06:13:43 -04:00
48e7bae4e0 Return labes in API (fixes #5882)
Signed-off-by: Anatoli Babenia <anatoli@rainforce.org>
2020-04-20 09:56:37 +03:00
a58c59f401 Make find ignore dot files
There is no need to search for sources in hidden dirs. In my case
there are files from development environment that stand in the way.

Signed-off-by: Anatoli Babenia <anatoli@rainforce.org>
2020-04-20 07:26:55 +03:00
426eccee63 Cleanup network option parsing
We were not handling the parsing of --ip.  This pr adds validation
checks and now will support the flag.

Move validation to the actual parsing of the network flags.

We should only parse the dns flags if the user changed them. We don't
want to pass default options if set in containers.conf to the server.
Potential for duplicating defaults.

Add support for --dns-opt flag passing

Begin handling of --network flag, although we don't have a way right now
to translate a string into a specgen.Namespace.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-19 05:19:30 -04:00
e4e42b28df Merge pull request #5733 from sujil02/v2-pod-prune
Add pod prune for api v2
2020-04-18 06:02:51 -04:00
3b461ed6eb Merge pull request #5871 from baude/v2t3
enable integration testing
2020-04-18 05:58:21 -04:00
c2a1138aec enable integration testing
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-17 18:57:40 -05:00
4e0326241b V2 Fix support for tcp://[::]<port> connections
* Fix support for socket activation, on remote and service

$ systemd-socket-activate -l 8083 --fdname=podman bin/podman system service --log-level=debug --time=30
$ bin/podman-remote --remote=tcp://[::]:8083 image ls

Or, use the podman.{socket,service} unit files

$ bin/podman-remote --remote=unix:///run/podman/podman.sock image ls

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-04-17 16:39:59 -07:00
37f3b191d5 Add pod prune for api v2.
Add the ability to prune pods for api v2,
Includes the addition of force flag, for client side prompt.
Update test suite to support this use case.

Signed-off-by: Sujil02 <sushah@redhat.com>
2020-04-17 17:30:58 -04:00
aa97cb5f42 Merge pull request #5869 from rhatdan/user
We were not handling the user option on create
2020-04-17 17:01:07 -04:00
bd8a0b08cd Merge pull request #5548 from kunalkushwaha/image-prune
image prune skips images with child images.
2020-04-17 15:19:45 -04:00
6c421b076f We were not handling the user option on create
With this patch we can get run_passwd_test.go to pass

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-17 14:52:51 -04:00
ba289dcd79 Merge pull request #5868 from baude/v2t2
Fixes for system tests
2020-04-17 14:43:21 -04:00
a5884c07df Merge pull request #5819 from vrothberg/v2-build
podmanV2: implement build
2020-04-17 14:30:49 -04:00
44a8cf8676 Fixes for system tests
Various fixes to protect against regressions in system tests

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-17 13:22:06 -05:00
d68b028c94 Merge pull request #5866 from edsantiago/logformat_bats_summary
Log formatter: add BATS summary line
2020-04-17 11:45:01 -04:00
f8f5d9cef7 Merge pull request #5855 from baude/v2t1
Enable some testing
2020-04-17 11:39:02 -04:00
454fc9fecd Merge pull request #5657 from AlbanBedel/network-name-fix
Fix the pod name passed to cni
2020-04-17 11:25:19 -04:00
b6a264464f Enable some testing
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-17 10:09:32 -05:00
1be8a34f5e Log formatter: add BATS summary line
BATS emits a summary line (number of tests passed/failed)...
but only on a tty or when run with --pretty! In our CI
context, with TAP output, it gives no end summary.

Fix that. Keep track of 'ok', 'not ok', and 'skipped',
and display the counts at the end.

Also: add a regression test. You don't need to review
or even read it: it's stark, and I'm not even enabling
it for CI because it almost certainly won't run due to
missing Perl library modules. It's just something I
need on my end.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-04-17 08:12:09 -06:00
d31dcb9bbd Merge pull request #5856 from jwhonce/wip/options
Fix bug where two configurations had been created
2020-04-17 02:35:50 -07:00
60624f948b podmanV2: implement build
Implement `podman build` for the local client.  The remote client will
require some rather large work in the backend and a new build endpoint
for the libpod rest API.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-04-17 10:26:50 +02:00
554c663b5a Fix bug where two configurations had been created
* registry.PodmanConfig() new returns a pointer to the source of truth

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-04-16 16:49:59 -07:00