Commit graph

10687 commits

Author SHA1 Message Date
Matthew Heon
e05e53cd2c Bump to v3.0.1-dev
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-02-11 13:39:49 -05:00
Matthew Heon
5b2585f5e9
Bump to v3.0.0
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-02-11 13:39:05 -05:00
Matthew Heon
a4017dfdc4 Update release notes for v3.0 final
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-02-11 13:29:01 -05:00
Matthew Heon
9de1a68fff Rewrite copy-up to use buildah Copier
The old copy-up implementation was very unhappy with symlinks,
which could cause containers to fail to start for unclear reasons
when a directory we wanted to copy-up contained one. Rewrite to
use the Buildah Copier, which is more recent and should be both
safer and less likely to blow up over links.

At the same time, fix a deadlock in copy-up for volumes requiring
mounting - the Mountpoint() function tried to take the
already-acquired volume lock.

Fixes #6003

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-02-11 13:27:12 -05:00
baude
bb82839492 Display correct value for unlimited ulimit
When doing a container inspect on a container with unlimited ulimits,
the value should be -1.  But because the OCI spec requires the ulimit
value to be uint64, we were displaying the inspect values as a uint64 as
well.  Simple change to display as an int64.

Fixes: #9303

Signed-off-by: baude <bbaude@redhat.com>
2021-02-11 13:25:37 -05:00
Valentin Rothberg
a30fd8f610 make podman rmi more robust
The c/storage library is subject to TOCTOUs as the central container and
image storage may be shared by many instances of many tools.  As shown
in #6510, it's fairly easy to have multiple instances of Podman running
in parallel and yield image-lookup errors when removing them.

The underlying issue is the TOCTOU of removal being split into multiple
stages of first reading the local images and then removing them.  Some
images may already have been removed in between the two stages. To make
image removal more robust, handle errors at stage two when a given image
is not present (anymore) in the storage.

Fixes: #6510
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-11 13:21:05 -05:00
Paul Holzinger
f12e26ced9 Allow path completion for podman create/run --rootfs
If the --rootfs flag is set podman create/run expect a host
path as first argument. The shell completion should provide
path completion in that case.

[NO TESTS NEEDED]
This can manually be verified with `podman run --rootfs [TAB]`.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-11 13:20:03 -05:00
OpenShift Merge Robot
2b89fe7d5d
Merge pull request #9287 from vrothberg/3.0-vendor-image
[3.0] vendor github.com/containers/image v5.10.2
2021-02-09 15:00:14 -05:00
OpenShift Merge Robot
1112f8566d
Merge pull request #9285 from jwhonce/issues/8773-v3.0.0
Add default template functions
2021-02-09 14:34:12 -05:00
Valentin Rothberg
721d4b5ffc vendor github.com/containers/image v5.10.2
Fixes: #8559
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-09 17:57:48 +01:00
Jhon Honce
27c016633b Add default template functions
For commands that use the golang template library directly add the
compatible template functions

Fixes #8773

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-02-09 08:46:17 -07:00
OpenShift Merge Robot
a5ab59ede7
Merge pull request #9273 from mheon/backport_api_changes
[v3.0] Backport final breaking API change to v3.0
2021-02-08 17:48:06 -05:00
Matej Vasek
f645880ecd Fix per review request
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-08 14:29:46 -05:00
Matej Vasek
2df59dece5 Increase timeouts in some tests
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-08 14:29:39 -05:00
Matej Vasek
5397737edc Add test for Docker APIv2 wait
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-08 14:29:31 -05:00
Matej Vasek
9fc22932a6 Implement Docker wait conditions
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-08 14:29:24 -05:00
Matej Vasek
d6625f2948 Improve ContainerEngine.ContainerWait()
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-08 14:29:18 -05:00
Matej Vasek
74db6e7ed3 Improve container libpod.Wait*() functions
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-08 14:29:10 -05:00
Matej Vasek
d451aed9fe [NO TESTS NEEDED] style: indendation
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-08 14:28:28 -05:00
Matej Vasek
500874d2e2 [NO TESTS NEEDED] fixup: remove debug code
Signed-off-by: Matej Vasek <mvasek@redhat.com>

<MH: Regenerate bindings>

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-02-08 14:14:37 -05:00
Matej Vasek
598d205167 [NO TESTS NEEDED] Generated files
Signed-off-by: Matej Vasek <mvasek@redhat.com>

<MH: Regenerated bindings>

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-02-08 14:06:50 -05:00
Daniel J Walsh
b51933d564 Cleanup bindings for image pull
Remove bindings that are not handled over the API.

Leaving this one to not use image pull, since this would
break progress handling.  We should revisit this in the
future.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-08 14:04:26 -05:00
Matej Vasek
793a1e0f4d [NO TESTS NEEDED] Improve generator
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-08 14:00:05 -05:00
Daniel J Walsh
d620a77c67 Fix invalid wait condition on kill
When using the compatability tests on kill, the kill
function goes into an infinite wait loop taking all of the CPU.

This change will use the correct wait function and exit properly.

Fixes: https://github.com/containers/podman/issues/9206

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-08 13:59:12 -05:00
Daniel J Walsh
7819e49353 Switch podman image push handlers to use abi
Change API Handlers to use the same functions that the
local podman uses.

At the same time:

Cleanup and pass proper bindings.  Remove cli options from
podman-remote push.  Cleanup manifest push.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-08 13:58:49 -05:00
Daniel J Walsh
0838a9414d podman-remote ps --external --pod --sort do not work.
Fixup the bindings and the handling of the --external --por and --sort
flags.

The --storage option was renamed --external, make sure we use
external up and down the stack.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-08 13:58:36 -05:00
Daniel J Walsh
5da474dec0 Fix --arch and --os flags to work correctly
Currently podman implements --override-arch and --overide-os
But Podman has made these aliases for --arch and --os.  No
reason to have to specify --override, since it is clear what
the user intends.

Currently if the user specifies an --override-arch field but the
image was previously pulled for a different Arch, podman run uses
the different arch.  This PR also fixes this issue.

Fixes: https://github.com/containers/podman/issues/8001

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-08 13:58:10 -05:00
Daniel J Walsh
7c05d5292b Switch podman stop/kill/wait handlers to use abi
Change API Handlers to use the same functions that the
local podman uses.

At the same time:

 implement remote API for --all and --ignore flags for podman stop
 implement remote API for --all flags for podman stop

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-08 13:57:57 -05:00
Daniel J Walsh
efcffde620 Fix handling of container remove
I found several problems with container remove

podman-remote rm --all
Was not handled

podman-remote rm --ignore
Was not handled

Return better errors when attempting to remove an --external container.
Currently we return the container does not exists, as opposed to container
is an external container that is being used.

This patch also consolidates the tunnel code to use the same code for
removing the container, as the local API, removing duplication of code
and potential problems.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-08 13:57:45 -05:00
OpenShift Merge Robot
bcf7d4383d
Merge pull request #9267 from mheon/bump_300_rc3
Bump to v3.0.0-RC3
2021-02-08 11:20:33 -05:00
Matthew Heon
b30100feab Bump to v3.0.0-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-02-08 09:22:56 -05:00
Matthew Heon
17338e841b
Bump to v3.0.0-RC3
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-02-08 09:18:23 -05:00
OpenShift Merge Robot
288fb68896
Merge pull request #9237 from mheon/backports_300_RC3
Backports for v3.0,0-RC3
2021-02-05 17:24:34 -05:00
OpenShift Merge Robot
9e2cdc4a84
Merge pull request #9244 from rhatdan/v3.0
Bump to containers/common v0.33.4
2021-02-05 14:34:55 -05:00
OpenShift Merge Robot
7597fa47b9
Merge pull request #9242 from lsm5/v3.0
[backport v3.0] Bump github.com/containernetworking/cni from 0.8.0 to 0.8.1
2021-02-05 14:28:19 -05:00
Matthew Heon
c5c946b18f Further release notes for v3.0
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-02-05 14:20:08 -05:00
Matthew Heon
6c5e9d2f0a Bump remote API version to 3.0.0
Fixes #9175

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-02-05 13:56:49 -05:00
Valentin Rothberg
353c3b04d1 fix logic when not creating a workdir
When resolving the workdir of a container, we may need to create unless
the user set it explicitly on the command line.  Otherwise, we just do a
presence check.  Unfortunately, there was a missing return that lead us
to fall through into attempting to create and chown the workdir.  That
caused a regression when running on a read-only root fs.

Fixes: #9230
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-05 13:55:15 -05:00
Steven Taylor
9cf6b7f8dc play kube selinux test case
added skip to test case where selinux not enabled

Signed-off-by: Steven Taylor <steven@taylormuff.co.uk>
2021-02-05 13:53:04 -05:00
Steven Taylor
c9a6e6eaf3 play kube selinux test case
fixed typo in the label comparison

Signed-off-by: Steven Taylor <steven@taylormuff.co.uk>
2021-02-05 13:52:58 -05:00
Steven Taylor
204239169a play kube selinux label test case
test case added to e2e test suite to validate process label being correctly set
on play kube

Signed-off-by: Steven Taylor <steven@taylormuff.co.uk>
2021-02-05 13:52:49 -05:00
Steven Taylor
572b0803c7 play kube selinux label issue
play kube function not respecting selinux options in kube yaml, all options were
being mapped to role.

fixes issue 8710

Signed-off-by: Steven Taylor <steven@taylormuff.co.uk>
2021-02-05 13:52:41 -05:00
Paul Holzinger
951879c690 Fix podman network disconnect wrong NetworkStatus number
The allocated `tmpNetworkStatus` must be allocated with the length 0.
Otherwise append would add new elements to the end of the slice and
not at the beginning of the allocated memory.

This caused inspect to fail since the number of networks did not
matched the number of network statuses.

Fixes #9234

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-05 13:50:48 -05:00
Daniel J Walsh
e3348e9052
Bump to v0.33.4
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-05 12:03:35 -05:00
dependabot-preview[bot]
ce4265af83 Bump github.com/containernetworking/cni from 0.8.0 to 0.8.1
Bumps [github.com/containernetworking/cni](https://github.com/containernetworking/cni) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/containernetworking/cni/releases)
- [Commits](https://github.com/containernetworking/cni/compare/v0.8.0...v0.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Backport to v3.0
(cherry picked from commit 9dc7951915)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2021-02-05 11:37:23 -05:00
Matthew Heon
4793bf8ac2 Update release notes for v3.0.0-RC3
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-02-04 16:08:38 -05:00
Valentin Rothberg
d6ba4ab098 generate kube: handle entrypoint
The spec of a Kube Container has a `Command` and `Args`.  While both are
slices, the `Command` is the counterpart of the entrypoint of a libpod
container.  Kube is also happily accepting the arguments to as following
items in the slice but it's cleaner to move those to `Args`.

Fixes: #9211
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-04 16:06:54 -05:00
Matthew Heon
6bd3a6bcab Allow pods to use --net=none
We need an extra field in the pod infra container config. We may
want to reevaluate that struct at some point, as storing network
modes as bools will rapidly become unsustainable, but that's a
discussion for another time. Otherwise, straightforward plumbing.

Fixes #9165

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-02-04 14:26:57 -05:00
Jhon Honce
b576ddd9a2 Report StatusConflict on Pod opt partial failures
- When one or more containers in the Pod reports an error on an operation
report StatusConflict and report the error(s)

- jsoniter type encoding used to marshal error as string using error.Error()

- Update test framework to allow setting any flag when creating pods

- Fix test_resize() result check

Fixes #8865

Signed-off-by: Jhon Honce <jhonce@redhat.com>

<MH: Fix cherry-pick conflicts>

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-02-04 14:24:26 -05:00
Valentin Rothberg
6213225c91 bindings: attach: warn correct error
The resize warning logged the wrong error.  While this does not fix
 #9172, it may very well be helpful finding its root cause.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-04 14:21:56 -05:00