12527 Commits

Author SHA1 Message Date
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
cea2f38e21 Merge pull request #10984 from edsantiago/timeout_typo
(minor) typo fix: timeout variable
2021-07-19 16:47:45 -04:00
80e807a191 Flake Fix: Wait before connecting container port
It was observed during periodic testing, this test can fail due to the
container process being not fully running and listening on the expected
port:

```
[+1069s] not ok 220 podman networking: port with --userns=keep-id
[+1069s] # (in test file test/system/500-networking.bats, line 144)
[+1069s] #   `echo "$teststring" | nc 127.0.0.1 $myport' failed
[+1069s] # # /var/tmp/go/src/github.com/containers/podman/bin/podman rm
--all --force
[+1069s] # # /var/tmp/go/src/github.com/containers/podman/bin/podman ps
--all --external --format {{.ID}} {{.Names}}
[+1069s] # # /var/tmp/go/src/github.com/containers/podman/bin/podman
images --all --format {{.Repository}}:{{.Tag}} {{.ID}}
[+1069s] # quay.io/libpod/testimage:20210610 9f9ec7f2fdef
[+1069s] # # /var/tmp/go/src/github.com/containers/podman/bin/podman run
-d --userns=keep-id -p 127.0.0.1:54322:54322
quay.io/libpod/testimage:20210610 nc -l -n -v -p 54322
[+1069s] #
252c562c9a3c96892d867d1d72fb52b2efdfe62855ebedbccd2d281c472c2988
[+1069s] # Ncat: No route to host.
```

Fix this by using a new `wait_for_port()` function (thanks @edsantiago)
before attempting to communicate with the service.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-07-19 15:36:13 -04:00
c622c7f2a9 (minor) typo fix: timeout variable
timeout variable was inconsistently spelled in helper function

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-07-19 13:24:25 -06:00
4e9ccb30c1 Merge pull request #10956 from flouthoc/kube-liveness-probe-systemd
Kube: Add liveness probe for containers backed by native (systemd) healthchecks instead of kubelet.
2021-07-19 14:03:57 -04:00
c17633c6a4 Merge pull request #10981 from containers/dependabot/go_modules/github.com/opencontainers/runc-1.0.1
Bump github.com/opencontainers/runc from 1.0.0 to 1.0.1
2021-07-19 10:20:57 -04:00
ec5ab591dd Merge pull request #10980 from rhatdan/dockerfile
[CI:DOCS] Just restore protections of shadow-utils
2021-07-19 08:51:54 -04:00
0784a5d047 Bump github.com/opencontainers/runc from 1.0.0 to 1.0.1
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Commits](https://github.com/opencontainers/runc/compare/v1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-19 12:19:29 +00:00
b92bbfd768 Just restore protections of shadow-utils
Rather then reinstalling shadow-utils to fix permissions,
just restore the correct permissions.

[NO TESTS NEEDED] Since this does not affect Podman, just the prebuilt
images on quay.io/podman.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-19 06:40:01 -04:00
81e32b1808 Kube: Add liveness probe for containers.
Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-07-17 18:35:22 +05:30
20c9f74c77 Merge pull request #10968 from ashley-cui/3.2.3master
[CI:DOCS] Update Release Notes and README for 3.2.3
2021-07-17 06:47:52 -04:00
b8accad0e7 Update Release Notes and README for 3.2.3
Signed-off-by: Ashley Cui <acui@redhat.com>
2021-07-16 15:53:55 -04:00
d32e56658a Merge pull request #10961 from containers/dependabot/go_modules/k8s.io/api-0.21.3
Bump k8s.io/api from 0.21.2 to 0.21.3
2021-07-16 13:16:45 -04:00
cebde8afd9 Merge pull request #10965 from vrothberg/vendor-common
vendor containers/common@main
2021-07-16 13:15:45 -04:00
1961769edf Merge pull request #10950 from edsantiago/python_flake_fix
APIv2 (python) tests: fix flake
2021-07-16 11:43:44 -04:00
50fcb06e7c Bump k8s.io/api from 0.21.2 to 0.21.3
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.21.2 to 0.21.3.
- [Release notes](https://github.com/kubernetes/api/releases)
- [Commits](https://github.com/kubernetes/api/compare/v0.21.2...v0.21.3)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-16 15:35:03 +00:00
2e02942d46 vendor containers/common@main
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-16 17:32:37 +02:00
3ef124b03f Merge pull request #10962 from vrothberg/fix-10655
systemd: require network*-online*.target
2021-07-16 11:13:46 -04:00
68585b0168 Merge pull request #10848 from vrothberg/update-libimage
vendor containers/common@main
2021-07-16 11:12:44 -04:00
bc26866635 Merge pull request #10960 from containers/dependabot/go_modules/k8s.io/apimachinery-0.21.3
Bump k8s.io/apimachinery from 0.21.2 to 0.21.3
2021-07-16 11:11:44 -04:00
6f1c7a0b6b systemd: require network*-online*.target
Require the network to be online in all (generated) systemd units to
make sure that containers and Podman run only after the network has been
fully configured.

Fixes: #10655
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-16 14:58:08 +02:00
e1ac0c3033 vendor containers/common@main
The `IgnorePlatform` options has been removed from the
`LookupImageOptions` in libimage to properly support multi-arch images.

Skip one buildah-bud test which requires updated CI images.  This is
currently being done in github.com/containers/podman/pull/10829 but
we need to unblock merging common and buildah into podman.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-16 14:19:56 +02:00
e3a09c51e2 Bump k8s.io/apimachinery from 0.21.2 to 0.21.3
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.21.2 to 0.21.3.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.21.2...v0.21.3)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-16 12:18:25 +00:00
ce28dc3c4c Merge pull request #10820 from jvanz/indfra-container-name-issue-10794
--infra-name command line argument
2021-07-16 07:53:43 -04:00
3ba9f2a205 Merge pull request #10942 from vrothberg/fix-10935
podman start: remove containers configured for auto removal
2021-07-16 07:33:43 -04:00
be51173ed3 APIv2 (python) tests: fix flake
Python tests were flaking because they behave differently
when $DEBUG is set. It looks like something in CI sets
that envariable.

Solution: do not use $DEBUG as a debug trigger, use a
properly-named custom variable that is unlikely to be
set accidentally.

Also: get rid of AssertTrue(), which gives no visibility
into what happened. Write in proper form that can emit
useful diagnostics on failure.

Fixes: #10948

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-07-16 05:05:59 -06:00
9924c57d4c podman start: remove containers configured for auto removal
Make sure that containers configured for auto removal
(e.g., via `podman create --rm`) are removed in `podman start`
if starting the container failed.

Fixes: #10935
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-16 10:57:40 +02:00