10346 Commits

Author SHA1 Message Date
3cd143fc58 Merge pull request #8611 from vrothberg/short-names
enable short-name aliasing
2020-12-09 10:15:55 -05:00
49d11b53e1 Merge pull request #8661 from rhatdan/codespell
Fix spelling mistakes
2020-12-09 09:52:20 -05:00
b875c5c27c Merge pull request #8599 from rhatdan/prune
Repeat system pruning until there is nothing removed
2020-12-09 08:46:44 -05:00
ae7f601649 Merge pull request #8654 from cruwe/cjr/bugfix-8608-take-envs-from-img
make podman play use ENVs from image
2020-12-09 08:44:47 -05:00
228df27b54 Bump github.com/onsi/gomega from 1.10.3 to 1.10.4
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.10.3 to 1.10.4.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.10.3...v1.10.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 08:37:22 -05:00
0154f9e9b3 Honor the --layers flag
Currently the --layers flag set by the user is ignored, and only the BUILDAH_LAYERS
environment variable being set is observed.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 08:31:36 -05:00
247260081a Merge pull request #8656 from containers/dependabot/go_modules/k8s.io/apimachinery-0.20.0
Bump k8s.io/apimachinery from 0.19.4 to 0.20.0
2020-12-09 08:12:16 -05:00
a12323884f pkg/copy: introduce a Copier
Introduce a `Copier` object to separate the copy-rule enforcement from
copying.  That allows for a better error reporting of the REST API.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-09 14:05:17 +01:00
3aad9024b6 Merge pull request #8655 from vrothberg/fix-8605
auto updates: document systemd unit and timer
2020-12-09 07:43:31 -05:00
a59e2a1a11 Repeat system pruning until there is nothing removed
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 06:17:28 -05:00
37fbf28d74 Bump k8s.io/apimachinery from 0.19.4 to 0.20.0
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.19.4 to 0.20.0.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.19.4...v0.20.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 06:05:03 -05:00
0cb10eedb3 Bump github.com/opencontainers/selinux from 1.6.0 to 1.7.0
Bumps [github.com/opencontainers/selinux](https://github.com/opencontainers/selinux) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/opencontainers/selinux/releases)
- [Commits](https://github.com/opencontainers/selinux/compare/v1.6.0...v1.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 06:04:16 -05:00
c21bc8f034 auto updates: document systemd unit and timer
Fixes: #8605
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-09 12:03:42 +01:00
c2a5011c0d archive: move stat-header handling into copy package
Move handling the stat header into `pkg/copy`.  All copy-related should
ideally be located in this package to increase locality and reduce
scattering where possible.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-09 12:03:00 +01:00
bf5d184325 Fix spelling mistakes
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 06:00:04 -05:00
8472efdbd1 pkg/copy: add parsing API
Add an API for parsing user input into a possibly specified container
and path.  This allows for sharing the parsing code between the local
and the remote client (and bindings) in the future.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-09 11:24:32 +01:00
b13ae2b6dc make podman play use ENVs from image
fixes #8608.

Signed-off-by: Christopher J. Ruwe <cjr@cruwe.de>
2020-12-09 10:04:21 +01:00
dd295f297b Merge pull request #8652 from mheon/fix_8650
Correct port range logic for port generation
2020-12-08 19:05:25 -05:00
6b7612062e Correct port range logic for port generation
The existing logic (Range > 0) always triggered, because range is
guaranteed to be at least 1 (a single port has a range of 1, a
two port range (e.g. 80-81) has a range of 2, and so on). As such
this could cause ports that had a host port assigned to them by
the user to randomly assign one instead.

Fixes #8650
Fixes #8651

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-12-08 16:23:14 -05:00
7caef9c497 Merge pull request #8642 from jwhonce/issues/8444
Restore json format for fields as well as whole structs
2020-12-08 15:30:31 -05:00
7b2e81ec26 Merge pull request #8638 from kwiesmueller/fix-container-network-mode
Pass full NetworkMode to ParseNetworkNamespace
2020-12-08 15:28:30 -05:00
47d2a4be2a Merge pull request #8648 from mheon/fix_7883
Make `podman stats` slirp check more robust
2020-12-08 13:08:05 -05:00
3bf02fb00a Merge pull request #8630 from umohnani8/sec-opt
Add systempaths=unconfined option
2020-12-08 12:19:26 -05:00
46337b4708 Make podman stats slirp check more robust
Just checking for `rootless.IsRootless()` does not catch all the
cases where slirp4netns is in use - we actually allow it to be
used as root as well. Fortify the conditional here so we don't
fail in the root + slirp case.

Fixes #7883

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-12-08 09:59:00 -05:00
239bd57662 Add systempaths=unconfined option
Add the systempaths=unconfined option to --security-opt
to match the docker options for unmasking all the paths
that are masked by default.
Add the mask and unmask options to the podman create doc.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2020-12-08 09:42:33 -05:00
0cccba834f Merge pull request #8637 from containers/dependabot/go_modules/github.com/containers/image/v5-5.9.0
Bump github.com/containers/image/v5 from 5.8.1 to 5.9.0
2020-12-08 09:31:47 -05:00
35ee3eb9c3 Bump github.com/containers/image/v5 from 5.8.1 to 5.9.0
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.8.1 to 5.9.0.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.8.1...v5.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-12-08 06:56:55 -05:00
9b3a81a002 Merge pull request #8571 from Luap99/podman-network-reload
Implement pod-network-reload
2020-12-08 06:15:40 -05:00
ce474788fd Restore json format for fields as well as whole structs
* Add template func to inspect template processing
* Added test using repro from #8444

Fixes #8444

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-07 15:39:43 -07:00
b0707af68b Do not pull if image domain is localhost
With podman play kube, podman would always attempt to
pull if the image has the :latest tag. But this would
fail if the image was built locally and given latest
as the tag. Images build with podman and buildah have
localhost as the domain, so check if the domain is localhost.
If that is the case, then don't attempt a pull.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2020-12-07 17:04:53 -05:00
e2f91207fc Merge pull request #8639 from Luap99/fix-network-ls-filter-flake
Fix network ls --filter invalid value flake
2020-12-07 17:01:51 -05:00
af74d01d33 pass full NetworkMode to ParseNetworkNamespace
This should create the correct namespace for NetworkModes like container:containerid

Signed-off-by: Kevin Wiesmueller <kwiesmul@redhat.com>
2020-12-07 22:22:42 +01:00
bfbeece27b Merge pull request #8581 from baude/kubegen
generate kube on multiple containers
2020-12-07 16:16:15 -05:00
4d6f958202 Fix network ls --filter invalid value flake
The filter is only validated when at least one network exists.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-07 21:14:13 +01:00
a5ca03915e Merge pull request #8632 from mheon/fix_8613
Change name of imageVolumes in container config JSON
2020-12-07 14:04:09 -05:00
51166d0898 Merge pull request #7357 from QiWang19/rootless-sign
image sign using per user registries.d
2020-12-07 14:02:22 -05:00
b0286d6b43 Implement pod-network-reload
This adds a new command, 'podman network reload', to reload the
networks of existing containers, forcing recreation of firewall
rules after e.g. `firewall-cmd --reload` wipes them out.

Under the hood, this works by calling CNI to tear down the
existing network, then recreate it using identical settings. We
request that CNI preserve the old IP and MAC address in most
cases (where the container only had 1 IP/MAC), but there will be
some downtime inherent to the teardown/bring-up approach. The
architecture of CNI doesn't really make doing this without
downtime easy (or maybe even possible...).

At present, this only works for root Podman, and only locally.
I don't think there is much of a point to adding remote support
(this is very much a local debugging command), but I think adding
rootless support (to kill/recreate slirp4netns) could be
valuable.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-07 19:26:23 +01:00
749ee2a10e generate kube on multiple containers
add the ability to add multiple containers into a single k8s pod
instead of just one.

also fixed some bugs in the resulting yaml where an empty service
description was being added on error causing the k8s validation to fail.

Signed-off-by: baude <bbaude@redhat.com>
2020-12-07 11:34:39 -06:00
3569e24df8 Merge pull request #8375 from vrothberg/cgroup-path
container cgroup path
2020-12-07 12:30:06 -05:00
c050fad958 Change name of imageVolumes in container config JSON
Podman pre-1.8 also included a field with this name, which was a
String. Podman 2.2.0 added a new field reusing the name but as a
Struct. This completely broke JSON decode for pre-1.8 containers
in Podman 2.2, resulting in completely broken behavior.

Re-name the JSON field and add a note that the old name should
not be re-used to prevent this problem from re-occurring. This
will still result in containers from 2.2.0 being broken
(specifically, containers with image volumes will have them
disappear) but this is the lesser of two evils.

Fixes #8613

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-12-07 11:50:47 -05:00
ef6748dc87 Merge pull request #8629 from mheon/no_error_on_dupe_handler
Do not error on installing duplicate shutdown handler
2020-12-07 11:46:48 -05:00
aac03d4a32 Merge pull request #8561 from mheon/fix_gating
Do not mount sysfs as rootless in more cases
2020-12-07 11:38:18 -05:00
225907536f Merge pull request #8625 from Edward5hen/container-prune-test
Add APIv2 test for containers-prune
2020-12-07 11:21:06 -05:00
e6f80fa61a Merge pull request #8624 from mlegenovic/master
Docker compat API - containers create ignores the name
2020-12-07 10:40:40 -05:00
bd2cfe0a93 Do not error on installing duplicate shutdown handler
Installing a duplicate shutdown handler fails, but if a handler
with the same name is already present, we should be set to go.
There's no reason to print a user-facing error about it.

This comes up almost nowhere because Podman never makes more than
one Libpod runtime, but there is one exception (`system reset`)
and the error messages, while harmless, were making people very
confused (we got several bug reports that `system reset` was
nonfunctional).

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-12-07 10:00:36 -05:00
cf8f2342a1 image sign using per user registries.d
Support per user ~/.config/containers/registries.d to allow rootless image sign configurations.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-12-07 09:58:38 -05:00
dc5da90523 Merge pull request #8622 from containers/dependabot/go_modules/github.com/containers/common-0.31.0
Bump github.com/containers/common from 0.30.0 to 0.31.0
2020-12-07 09:21:40 -05:00
eaaab02e52 Merge pull request #8606 from rhatdan/owners
[CI:DOCS] Add saschagrunert and zhangguanzhang to OWNERS
2020-12-07 09:16:58 -05:00
055248ce98 container cgroup path
Before querying for a container's cgroup path, make sure that the
container is synced.  Also make sure to error out if the container
isn't running.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-07 15:16:20 +01:00
68718f9cda Merge pull request #8627 from vrothberg/fix-8558-comments
[CI:DOCS] add comment to #8558 regression test
2020-12-07 09:11:48 -05:00