Commit Graph

12209 Commits

Author SHA1 Message Date
OpenShift Merge Robot 4b3fc0c67a
Merge pull request #10411 from rhatdan/VENDOR
Vendor in containers/buildah v1.21.0
2021-05-20 13:08:25 -04:00
Jhon Honce 7bcfae44b9 Downgrade API service routing table logging
[NO TESTS NEEDED]

* Log the routing table output at Trace vs. Debug level. Reduce noise
  in debugging output.
* Tweak SDNotify message to report Warn when it fails. Previously
  failures were silent.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-05-20 09:10:45 -07:00
Daniel J Walsh c553181fd0
Vendor in containers/buildah v1.21.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-20 09:51:36 -04:00
OpenShift Merge Robot 7bcec8697f
Merge pull request #10219 from vrothberg/image-events
add libimage events
2021-05-20 09:49:22 -04:00
OpenShift Merge Robot 62c14dcc4d
Merge pull request #10407 from containers/dependabot/go_modules/github.com/opencontainers/runc-1.0.0-rc95
Bump github.com/opencontainers/runc from 1.0.0-rc94 to 1.0.0-rc95
2021-05-20 09:44:22 -04:00
Paul Holzinger 5a0257d463 Fix network create macvlan with subnet option
Creating a macvlan network with the subnet or ipRange option should set
the ipam plugin type to `host-local`. We also have to insert the default
route.

Fixes #10283

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-05-20 13:12:01 +02:00
OpenShift Merge Robot f81c4d9fb2
Merge pull request #10402 from EmmanuelKasper/patch-1
[CI:DOCS] [NO TESTS NEEDED] Use conflist suffix when downloading the basic network configuration
2021-05-20 07:07:17 -04:00
Valentin Rothberg 8352e5bc3b add libimage events
libimage now supports events which `libpod.Runtime` now uses for image
events.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-20 12:33:09 +02:00
dependabot[bot] 26652111b8
Bump github.com/opencontainers/runc from 1.0.0-rc94 to 1.0.0-rc95
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.0.0-rc94 to 1.0.0-rc95.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Commits](https://github.com/opencontainers/runc/compare/v1.0.0-rc94...v1.0.0-rc95)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-20 10:10:22 +00:00
Emmanuel Kasper 12aa71ab83 Use correct extension for example network config
This solves the error:
 # podman network ls
 ERRO[0000] Error loading CNI config file /etc/cni/net.d/87-podman-bridge.conf: error parsing configuration: missing 'type

when creating an initial CNI config.

Signed-off-by: Emmanuel Kasper <emmanuel@libera.cc>
2021-05-20 12:02:04 +02:00
OpenShift Merge Robot 49a99be5b6
Merge pull request #10377 from vrothberg/test-common
update c/common
2021-05-20 06:01:20 -04:00
OpenShift Merge Robot cb937f4aa8
Merge pull request #10235 from rhatdan/manifest
Add support for podman manifest rm command
2021-05-20 04:37:19 -04:00
Valentin Rothberg 898a8ad285 update c/common
Update containers common to the latest HEAD.  Some bug fixes in libimage
forced us to have a clearer separation between ordinary images and
manifest lists.  Hence, when looking up manifest lists without recursing
into any of their instances, we need to use `LookupManifestList()`.

Also account for some other changes in c/common (e.g., the changed order
in the security labels).

Further vendor the latest HEAD from Buildah which is required to get the
bud tests to pass.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-20 10:21:27 +02:00
OpenShift Merge Robot 8bc39f4a90
Merge pull request #10395 from containers/dependabot/go_modules/k8s.io/api-0.21.1
Bump k8s.io/api from 0.21.0 to 0.21.1
2021-05-19 20:36:24 -04:00
Daniel J Walsh 2b89b24146
Add support for podman manifest rm command
This is mainly to match command line of Docker.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-19 17:32:02 -04:00
Daniel J Walsh 55f00bac02
Clear the storage-options from the graphdriver if users specifies --root
Fixes: https://github.com/containers/podman/issues/10393

Currently if a user specifies a --root flag to override the location of
the container storage, we still enforce the storage-opts from
storage.conf. This causes issues with people trying to intereact with
the additional stores feature, and then forces them to use the obscure
--storage-opt="" option. I belive this should be the default and we
already do this when the user specifies the --storage-driver option.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-19 15:35:59 -04:00
OpenShift Merge Robot 4c756268e6
Merge pull request #10399 from vrothberg/systemd-docs
[CI:DOCS] docs: generate systemd: XDG_RUNTIME_DIR
2021-05-19 11:48:38 -04:00
OpenShift Merge Robot 46832259a8
Merge pull request #10327 from rhatdan/copy
Fix problem copying files when container is in host pid namespace
2021-05-19 11:45:55 -04:00
dependabot[bot] 44c4937177
Bump k8s.io/api from 0.21.0 to 0.21.1
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.21.0 to 0.21.1.
- [Release notes](https://github.com/kubernetes/api/releases)
- [Commits](https://github.com/kubernetes/api/compare/v0.21.0...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-19 11:59:01 +00:00
Daniel J Walsh bc0e12a047
Fix problem copying files when container is in host pid namespace
When attempting to copy files into and out of running containers
within the host pidnamespace, the code was attempting to join the
host pidns again, and getting an error. This was causing the podman
cp command to fail. Since we are already in the host pid namespace,
we should not be attempting to join.  This PR adds a check to see if
the container is in NOT host pid namespace, and only then attempts to
join.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-19 07:55:48 -04:00
OpenShift Merge Robot 18efc5a3a7
Merge pull request #10371 from matejvasek/fix-wait-compat
fix: response of containers wait endpoint
2021-05-19 07:52:58 -04:00
OpenShift Merge Robot 4002589546
Merge pull request #10396 from containers/dependabot/go_modules/github.com/vbauerster/mpb/v6-6.0.4
Bump github.com/vbauerster/mpb/v6 from 6.0.3 to 6.0.4
2021-05-19 07:41:58 -04:00
OpenShift Merge Robot c84fdedda8
Merge pull request #10398 from containers/dependabot/go_modules/k8s.io/apimachinery-0.21.1
Bump k8s.io/apimachinery from 0.21.0 to 0.21.1
2021-05-19 05:43:40 -04:00
Valentin Rothberg 379df7f2c4 docs: generate systemd: XDG_RUNTIME_DIR
A conversation on the customer portal suggests that to add an extra note
about the requirement of XDG_RUNTIME_DIR to be set.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-19 09:15:48 +02:00
dependabot[bot] af748b94ed
Bump k8s.io/apimachinery from 0.21.0 to 0.21.1
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.21.0 to 0.21.1.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.21.0...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-19 06:51:21 +00:00
dependabot[bot] 6b187e4458
Bump github.com/vbauerster/mpb/v6 from 6.0.3 to 6.0.4
Bumps [github.com/vbauerster/mpb/v6](https://github.com/vbauerster/mpb) from 6.0.3 to 6.0.4.
- [Release notes](https://github.com/vbauerster/mpb/releases)
- [Commits](https://github.com/vbauerster/mpb/compare/v6.0.3...v6.0.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-19 06:50:18 +00:00
OpenShift Merge Robot 959d6a0c40
Merge pull request #10369 from jmguzik/network-http-docs-fixes
Fix formatting and indentation in network http api docs
2021-05-18 16:56:57 -04:00
Matej Vasek 92e858914d fix: response body of containers wait endpoint
The `Error` part of response must be nil (or omitted) if no error occurred.
Before this commit a zero value for the struct was returned.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-05-18 20:52:09 +02:00
OpenShift Merge Robot 353f04b53c
Merge pull request #10372 from jwhonce/issues/9238
Break up python APIv2 tests
2021-05-18 13:22:57 -04:00
Jhon Honce 98955bedbc Break up python APIv2 tests
* Tests broken up into areas of concern
* Introduced fixtures to reduce duplicated code
* Introduced new assert methods with APITestCase
* General cleanup of code while visiting
* Tests now targeting quay.io

Known issues:
* is-official against quay.io not working

Fixes: #9238
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-05-18 08:39:35 -07:00
OpenShift Merge Robot d1d21f069a
Merge pull request #10370 from mheon/add_commits_script
Add script for identifying commits in release branches
2021-05-18 05:06:57 -04:00
Matthew Heon 8f3605e7d6 Add script for identifying commits in release branches
One of the worst parts of a Podman release is writing the release
notes. It requires manually going through all merged commits
since the last release, figuring out what was actually done, and
writing a small blurb about what was fixed. The worst part of
this is the difficulty in finding the commits that were actually
included in previous releases - our extensive backports to prior
releases mean that there are usually dozens of commits that were
included in a prior release, but do not have a matching SHA (as
the original author did not do the backport, and often the commit
required massaging to cherry-pick in).

This script automates the job of finding commits in one release
branch that are not in another, with filtering to remove most
cherry-picked commits. It makes my life a lot easier during
releases, so I figured I'd include it in hack/ so anyone else
stuck with the enjoyable task of writing release notes can have a
slightly easier life.

The script is written in absolutely terrible Ruby and its
performance is absolutely terrible, but you only need to run it
once per major release and a 30-second wait to generate the list
of commits to include isn't bad.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-05-17 16:40:35 -04:00
Jakub Guzik bab7caafeb Fix formatting and indentation in network http api docs
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-05-17 22:38:20 +02:00
OpenShift Merge Robot a7fa0da4a5
Merge pull request #10334 from mheon/add_relabel_vol_plugin
Ensure that :Z/:z/:U can be used with named volumes
2021-05-17 16:28:21 -04:00
OpenShift Merge Robot 3aa4746fb6
Merge pull request #10339 from rhatdan/selinux
Support automatic labeling of kube volumes
2021-05-17 16:27:20 -04:00
OpenShift Merge Robot 9a9118b831
Merge pull request #10366 from ashley-cui/secretoptions
Support uid,gid,mode options for secrets
2021-05-17 16:24:20 -04:00
OpenShift Merge Robot f65d9309cb
Merge pull request #10270 from rhatdan/mtab
Create the /etc/mtab file if does not exists
2021-05-17 15:35:20 -04:00
Ashley Cui cf30f160ad Support uid,gid,mode options for secrets
Support UID, GID, Mode options for mount type secrets. Also, change
default secret permissions to 444 so all users can read secret.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-05-17 14:35:55 -04:00
OpenShift Merge Robot 0a3444613e
Merge pull request #10328 from Luap99/completions
Several shell completion fixes
2021-05-17 14:11:20 -04:00
OpenShift Merge Robot 93c3e03227
Merge pull request #10363 from vrothberg/fix-10350
image prune: remove unused images only with `--all`
2021-05-17 11:17:21 -04:00
OpenShift Merge Robot 62a7d4b61e
Merge pull request #9972 from bblenard/issue-5651-hostname-for-container-gateway
Add host.containers.internal entry into container's etc/hosts
2021-05-17 10:45:23 -04:00
OpenShift Merge Robot 9d2bc4cae8
Merge pull request #10356 from Luap99/network-reload-rootless
podman network reload add rootless support
2021-05-17 10:21:20 -04:00
Paul Holzinger 0d811b2339 Several shell completion fixes
- fix network filters
- add prune filters
- pod create --share support comma separated namespaces

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-05-17 15:56:11 +02:00
Baron Lenardson c8dfcce6db Add host.containers.internal entry into container's etc/hosts
This change adds the entry `host.containers.internal` to the `/etc/hosts`
file within a new containers filesystem. The ip address is determined by
the containers networking configuration and points to the gateway address
for the containers networking namespace.

Closes #5651

Signed-off-by: Baron Lenardson <lenardson.baron@gmail.com>
2021-05-17 08:21:22 -05:00
Matthew Heon 6efca0bbac Ensure that :Z/:z/:U can be used with named volumes
Docker allows relabeling of any volume passed in via -v, even
including named volumes. This normally isn't an issue at all,
given named volumes get the right label for container access
automatically, but this becomes an issue when volume plugins are
involved - these aren't managed by Podman, and may well be
unaware of SELinux labelling. We could automatically relabel
these volumes on creation, but I'm still reluctant to do that
(feels like it could break things). Instead, let's allow :z and
:Z to be used with named volumes, so users can explicitly request
relabel of a volume plugin-backed volume.

We also get :U at the same time. I don't see any real need for it
but it also doesn't seem to hurt, so I didn't bother disabling
it.

Fixes #10273

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-05-17 09:10:59 -04:00
Valentin Rothberg 2a43fcf786 image prune: remove unused images only with `--all`
Fix a regression in `podman image prune` where unused images were
accidentally removed even when `--all=false`.  Extend and partially
rewrite the e2e tests to make sure we're not regressing again in the
future.

Fixing the aforementioned issue revealed another issue in the default
prune filter.  While prune should remove all "dangling" images (i.e.,
those without tag), it removed only "intermediate" ones; dangling images
without children.  Remove the mistaken comment from the libimage
migration.

Also clarify the help message and man page.

Fixes: #10350
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-17 13:52:03 +02:00
Paul Holzinger 4462113c5e podman network reload add rootless support
Allow podman network reload to be run as rootless user. While it is
unlikely that the iptable rules are flushed inside the rootless cni
namespace, it could still happen. Also fix podman network reload --all
to ignore errors when a container does not have the bridge network mode,
e.g. slirp4netns.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-05-17 10:55:02 +02:00
OpenShift Merge Robot 3bdbe3ce96
Merge pull request #10357 from srcshelton/patch-1
Update to actions/stale@v3
2021-05-17 03:30:18 -04:00
Stuart Shelton 60eb4e74d1 Use more recent `stale` release...
… as currently with `v1`, `remove-stale-when-updated` is set but isn't causing labels to be updated when comments are added.

Signed-off-by: Stuart Shelton <stuart@shelton.me>
2021-05-16 19:02:18 +01:00
Daniel J Walsh 4cc19f9e0f
Support automatic labeling of kube volumes
Allow users to specify options on the volume mount path.
This will trigger relabels of user specifies :z,:Z
Also will handle User Relabels if the user specifies :U

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-16 07:09:22 -04:00