12353 Commits

Author SHA1 Message Date
684f15edee Merge pull request #11025 from rhatdan/dockerfile
[CI:DOCS] Fix handling of shadow-utils
2021-07-27 13:58:22 +02:00
d7b2f03f8a Merge pull request #10983 from vrothberg/fix-dangling
refine dangling checks
2021-07-27 10:57:21 +02:00
4f5b19c508 Merge pull request #11047 from Luap99/fix-11032
dual-stack network: fix duplicated subnet assignment
2021-07-26 16:09:21 +02:00
89853a30eb Merge pull request #11036 from caarlos0/fix-podman-manifest-push
fix: podman manifest push respect --tls-verify flag
2021-07-26 16:01:21 +02:00
8d5d5face5 dual-stack network: fix duplicated subnet assignment
Make sure podman network create reads all subnets from existing cni configs
and not only the first one.

Fixes #11032

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-07-26 14:05:33 +02:00
5473490c6e fix: podman manifest push respect --tls-verify flag
[NO TESTS NEEDED]

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-07-26 08:56:30 -03:00
5ef78c0bfa Merge pull request #11019 from boaz0/test_cors
Add tests to verify CORs is enabled
2021-07-26 13:56:19 +02:00
21e1c3175d Merge pull request #11044 from vrothberg/play
play kube: support capitalized pull policy
2021-07-26 12:48:20 +02:00
c197d19fe8 play kube: support capitalized pull policy
Pull policies in K8s yaml may be capitalized, so lower them before
parsing.

Fixes: bugzilla.redhat.com/show_bug.cgi?id=1985905
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-26 10:28:45 +02:00
1b6423e9f1 refine dangling checks
By proxy by vendoring containers/common. Previously, a "dangling" image
was an untagged image; just a described in the Docker docs. The
definition of dangling has now been refined to an untagged image without
children to be compatible with Docker.

Further update a redundant image-prune test.

Fixes: #10998
Fixes: #10832
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-26 09:28:17 +02:00
1a188f6223 Add tests to verify CORS is enabled
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2021-07-25 05:48:16 +03:00
ec5c7c1f6a Merge pull request #10895 from rhatdan/devices
Support DeviceCgroupRules to actually get added.
2021-07-24 06:09:17 -04:00
d956500743 Merge pull request #10996 from cdoern/untilLog
Implemented --until flag for Libpod's Container Logs
2021-07-24 05:56:18 -04:00
c44c298ae7 Merge pull request #11018 from vrothberg/fix-10994
import: write stdin to tmp file
2021-07-24 05:53:16 -04:00
2c9f18100f Fix handling of shadow-utils
There seems to be a bug in rpm, where it fails silently if you specify
rpm --restore --quiet shadow-utils.

rpm --restore shadow-utils 2> /dev/null

Does the right thing.

[NO TESTS NEEDED] Might add tests from buildah, once we have them
working correctly.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-24 05:45:10 -04:00
dcb5c92c0d import: write stdin to tmp file
If importing an archive via stdin write it to a temporary file such that
the temporary file can be opened multiple times later on.  Otherwise, we
may end up with an empty image.

Also fix a bug in the URL parsing code; we need to check whether there's
actually a scheme.

Add system tests for `podman import` exercising the basics.

Fixes: #10994
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-23 10:21:37 +02:00
2f79497aba Merge pull request #11027 from edsantiago/bats
Networking test: fix silent breakage
2021-07-23 04:15:14 -04:00
8f9d33b7f7 Networking test: fix silent breakage
Wow did I screw up. #10982 introduced (at my suggestion) a
new wait_for_port() helper, with the goal of eliminating a
race condition. It didn't work.

First: wait_for_port() tests by connecting to the port, which
is a Bad Idea when you have a one-shot server that exits upon
the first connection closing. We should've caught that, but:

Second: I wrote wait_for_port() for a non-BATS test framework,
and used the conventional file descriptor 3. BATS uses fd3
for internal control. Overriding that made the test silently
just disappear, no "not ok" message, no warnings, nothing
except vanishing into the ether.

Third: this was caught by my log-colorizer script, which
loudly yelled "WARNING: expected 234" (tests) at the
bottom of the log. Unfortunately, since this wasn't
my PR, I didn't actually look at the test logs.

Solution: we can't use wait_for_port() in the network port
test. Use wait_for_output() instead, triggering on the
'listening' message emitted by netcat in the container.

Also: fix wait_for_port() to use fd5 instead of 3. Although
no code currently uses wait_for_port() as of this PR, it's
a useful helper that we may want to keep.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-07-22 18:27:13 -06:00
e6fb92f478 Merge pull request #11013 from hshiina/cgroupsv2
[CI:DOCS] Add notes to flags not supported on cgroups V2
2021-07-22 14:36:26 -04:00
c522dc2f09 Merge pull request #11022 from xordspar0/patch-1
[CI:DOCS] Fix broken remote client link
2021-07-22 14:12:25 -04:00
365775489f Merge pull request #11015 from jmguzik/until-list-volume
Add until filter to volume ls filters list
2021-07-22 14:11:24 -04:00
0f708efd8b Implemented --until flag for libpod's container logs
compat containers/logs was missing actual usage of until query param.
This led me to implement the until param for libpod's container logs as well. Added e2e tests.

Signed-off-by: cdoern <cdoern@redhat.com>
2021-07-22 10:56:56 -04:00
9c659b3bc9 docs: fix broken remote client link
Signed-off-by: Jordan Christiansen <jordan.christiansen@target.com>
2021-07-22 08:48:11 -05:00
2d8e837a9b Add until filter to volume ls filters list
As a conclusion of a discussion in #10861, until filter is added
by this commit to volume ls filters.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-07-22 00:01:07 +02:00
12f4b14a16 Add notes to flags not supported on cgroups V2
Clarify what flags are not supported on cgroups V2 in documentation.

Signed-off-by: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
2021-07-21 17:50:37 -04:00
3e79296a81 Support DeviceCgroupRules to actually get added.
Fixes: https://github.com/containers/podman/issues/10302

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-21 16:10:09 -04:00
6370622444 Merge pull request #11007 from mheon/journald_test_skip
Ensure journald events tests only run where supported
2021-07-21 15:06:31 -04:00
c0cb664581 Merge pull request #11008 from dpward/main
[CI:DOCS] Fix GitHub URL to Podman logo
2021-07-21 14:37:31 -04:00
6678385abc Merge pull request #10991 from vrothberg/fix-10799
[CI:DOCS] refine the runlabel man page
2021-07-21 13:18:33 -04:00
e3816ddb11 Merge pull request #10992 from rhatdan/play
Fix handling of selinux labels in podman play kube
2021-07-21 12:42:32 -04:00
4376f14c30 Ensure journald events tests only run where supported
We don't support the journald events backend on RHEL8, for
example. So we can't unconditionally run these tests.

Partial fix for RHBZ1955166

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-07-21 11:23:01 -04:00
ac588c751b [CI:DOCS] Fix GitHub URL to Podman logo
The Podman logo is not rendered on docs.podman.io with the current URL.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
2021-07-21 11:22:01 -04:00
782634334e Merge pull request #10997 from edsantiago/helpfuler_expects
e2e tests: prevent 'Expect(ExitCode())' pattern
2021-07-21 10:03:12 -04:00
1cb61f9d6d Merge pull request #10993 from cevich/generic_steps
[CI:DOCS] Multi-arch image workflow: Make steps generic
2021-07-21 08:38:08 -04:00
0ef01c881f Merge pull request #10999 from rhatdan/quota1
Drop support for the --storage-opt container flag
2021-07-21 06:11:10 -04:00
a7dcae5abc Merge pull request #10970 from vikas-goel/prepare-volume
Copy the content from the underlying image into the newly created volume
2021-07-21 05:52:09 -04:00
db2f474284 Drop podman create --storage-opt container flag
The global flag will work in either location, and this flag just breaks
users expectations, and is basically a noop.

Also fix global storage-opt so that podman-remote can use it.

[NO TESTS NEEDED] Since it would be difficult to test in ci/cd.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-20 16:36:10 -04:00
5952270950 e2e tests: prevent 'Expect(ExitCode())' pattern
Followup to #10932: add a validation check to prevent introduction
of new 'Expect(foo.ExitCode()).To(...)' patterns. If such use is
absolutely necessary -- there is one such instance in the code
already -- require that the assertion include a description.

Also: clean up instances that were introduced since the merging
of #10932.

Also: fix one remaining instance in run_exit_test.go: it had
a FIXME comment mentioning a race condition, but unfortunately
there was no issue or bug ID, hence no way to know if the race
is fixed or not. We will assume it is.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-07-20 10:49:50 -06:00
389c9b8dca Merge pull request #10995 from edsantiago/systemd_ephemeral
system tests: cleaner, safer use of systemd
2021-07-20 12:42:24 -04:00
064bd9d19f Copy the content from the underlying image into the newly created volume.
Fixes: #10262

Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
2021-07-20 11:39:32 -04:00
313c7118ea system tests: cleaner, safer use of systemd
First and foremost: use ephemeral (/run, $XDG) directories
for systemd unit files, so as not to vandalize a working system.

Second, refactor common systemd-related functionality into
a new helper file, loaded by the systemd-related tests.
Shared functionality includes:

  * setting $XDG_RUNTIME_DIR if unset and rootless
  * setting $UNIT_DIR for use by tests
  * new systemctl() and journalctl() functions, which
    include "--user" when rootless (why can't systemd
    figure this out on its own?)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-07-20 08:57:26 -06:00
4fb4614cf1 Merge pull request #10985 from edsantiago/bats
system test: auto-update: multiarch fixes, and cleanup
2021-07-20 10:33:25 -04:00
e64545004e [CI:DOCS] Multi-arch image workflow: Make steps generic
This duplicates the change from
https://github.com/containers/skopeo/pull/1379

Since this workflow is duplicated across three repositories, maintaining
changes becomes onerous if the item contents vary between
implementations in any way. Improve this situation by encoding the
repository-specific details into env. vars. then referencing those vars
throughout. This way, a meaningful diff can be worked with to compare
the contents across repositories.

Also included are abstractions for the specific command used to obtain
the project version, and needed details for filtering the output. Both
of these vary across the Buildah, Skopeo, and Podman repos.

NOTE: This change requires the names of two github action secrets
to be updated: PODMAN_QUAY_USERNAME -> REPONAME_QUAY_USERNAME
(and *PASSWORD).

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-07-20 09:43:58 -04:00
2b98a226b9 system test: auto-update: multiarch fixes
auto-update test is failing on non-x86_64 arch:

   https://gitlab.com/cki-project/kernel-tests/-/issues/614#note_630010734

Reason: test was relying on alpine_nginx image; this is
a custom libpod image that only has a x86_64 version.

Solution: use busybox instead. Busybox was copied from
docker.io using skopeo copy --all, so it has all arches.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-07-20 07:10:14 -06:00
caf03fd7a4 system test: auto-update: allow running as rootless
They were being skipped for no clear reason.

Also: use --files and --name option in generate-systemd. Before,
output went to stdout, resulting in completely unreadable logs
on test failure.

Also: use volatile systemd directories (/run, $XDG_RUNTIME_DIR)
instead of permanent ones. Thanks to @Luap99 for the reference.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-07-20 07:10:14 -06:00
117850e6eb Fix handling of selinux labels in podman play kube
Fixes: https://github.com/containers/podman/issues/10969

[NO TESTS NEEDED] We added tests for this, but they don't seem to be
running.  If I run the local system tests, they fail with the current
Podman and work with this version.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-20 08:42:07 -04:00
6430c13160 [CI:DOCS] refine the runlabel man page
* Write a description to outline the scope and mechanism of runlabel.
* Describe the variables/attributes that we want to be used.
* Do not describe the --optN or OPTN flags/variables since they are
  already hidden flags and date back to the Atomic days.
* Update references to other man pages.
* Remove unsupported variables (e.g., SUDO_*) which caused confusion.

Fixes: #10799
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-20 14:26:11 +02:00
f4e81d0b88 Merge pull request #10979 from vrothberg/fix-10977
compat: image create: handle platform correctly
2021-07-20 05:26:35 -04:00
36e47768e6 Merge pull request #10982 from cevich/fix_listen_flake
Flake Fix: Wait before connecting to container port
2021-07-20 05:04:35 -04:00
eaaca49992 compat: image create: handle platform correctly
Handle the platform parameter correctly.  The parameter was only parsed
in presence of credentials and the code was a bit complex.  Also add a
regression test.

Fixes: #10977
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-20 09:00:44 +02:00