17446 Commits

Author SHA1 Message Date
3e811ac69d Merge pull request #14903 from eriksjolund/add_performance_doc
[CI:DOCS] Add performance tutorial
2022-11-09 21:44:37 +00:00
d9aceadeaa Allow podman manigest push --purge|-p as alias for --rm
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-11-09 16:17:38 -05:00
7f91b92647 Merge pull request #16452 from hshiina/remote-test
Skip test if `--events-backend` is necessary with podman-remote
2022-11-09 14:15:27 -05:00
b5ee4de8cf [CI:DOCS] Add performance tutorial
Reuse part of the description of --network=host from /docs/source/markdown/podman-run.1.md.in

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-11-09 18:39:26 +01:00
cfa651f801 [CI:DOCS] Fix build targets in build_osx.md.
[NO NEW TESTS NEEDED]

Signed-off-by: Björn Mosler <dev@bjoern.mosler.ch>
2022-11-09 18:10:52 +01:00
3e08f85353 fix --format {{json .}} output to match docker
`--format json` should not be the same as `--format {{json .}}`, the
later should actually run through the go template and thus create one
json object per entry instead of an json array.

Includes a vendor of c/common@main since it requires a fix from there as
well.

This matches docker compat.
Fixes #16436

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-11-09 17:59:05 +01:00
f807b6784f remote: fix manifest add --annotation
* `manifest add --annotation option` adds annotations
  field on remote environment.
* `manifest inspect` prints annotations field
  on remote environment.

Fixes: #15952

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-11-09 13:24:09 +09:00
757fdca77b Merge pull request #16440 from n1hility/fix-registry-search
Use single unqualified search registry on Windows
2022-11-08 16:15:03 -05:00
314cba2590 Skip test if --events-backend is necessary with podman-remote
`podman-remote` does not support `--events-backend`, which overrides a
log driver. When `--events-backend` is necessary in a test for
`podman-remote`, the test should be skipped.

We don't need to fix the other cases with
`_additional_events_backend()` because `_log_test_follow()` already has
the same skipping logic and `_log_test_multi()` always skips a test when
testing `podman-remote`.

Signed-off-by: Hironori Shiina <shiina.hironori@fujitsu.com>
2022-11-08 16:10:30 -05:00
d720440d78 Merge pull request #16420 from ygalblum/kube_volume_down
kube play: update the handling of PersistentVolumeClaim
2022-11-08 09:37:01 -05:00
1c8196a9ac kube play: update the handling of PersistentVolumeClaim
Up - do not fail if volume already exists, use the existing one
Down - allow the user to remove the volume by passing --force
Add tests
Update the documentation

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2022-11-08 11:08:50 +02:00
f2127ab81e Merge pull request #16437 from edsantiago/more_log_flakes
More log-flake work
2022-11-08 03:17:36 -05:00
616fca9ffd system tests: fix a system test in proxy environment
When we are using a proxy, 'podman build - basic test'
will be failed on remote.
This test needs to add the '--http-proxy' option.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-11-08 15:13:43 +09:00
85ae935afa Use single unqualified search registry on Windows
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-11-07 23:51:34 -06:00
cb8c9af5d3 test/system: Add, use tcp_port_probe() to check for listeners rather than binds
_test_skopeo_credential_sharing() used port_is_free() to check if a
port has no active listeners. With the new implementation, this is
not equivalent anymore: a port might be in TIME_WAIT, so it's not
free, but the listener might be long gone.

Add tcp_port_probe() to check if there's an active listener on a
given port, and use it in _test_skopeo_credential_sharing().

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2022-11-08 00:16:36 +01:00
348c3f2833 test/system: Add tests for pasta(1) connectivity
These tests should cover all the basic networking functionality with
pasta(1). Namely, they check:

- IPv4 and IPv6 addressing and routing settings

- TCP and UDP port forwarding over IPv4 and IPv6

- data transfers and ICMP/ICMPv6 echo requests

- the (exceedingly simple) lifecycle handling

These tests need some new helpers, to obtain IPv4 and IPv4 addresses
and routes, as well as MTU and interface names. Those use jq(1) for
parsing.

Some availability checks are implemented as well, to skip tests if
pasta(1) is not available, or if IPv4 and IPv6 are not usable.

To get consistent outcomes across distributions, and to enable
uncomplicated termination for UDP tests based on zero-sized packets,
use socat(1), which, unlike netcat, doesn't suffer from option
inconsistencies depending on flavours (traditional, BSD, NMAP) and
versions.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2022-11-08 00:16:36 +01:00
b3cf836841 test/system: Move network-related helpers to helpers.network.bash
The main helpers.bash file is rather bloated and it's difficult to
find stuff there. Move networking functions to their own helper
file.

While at it, apply a consistent style, and rearrange logically
related functions into sections.

Suggested-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2022-11-08 00:16:36 +01:00
ea4f168b3a test/system: Use procfs to find bound ports, with optional address and protocol
Using bash /dev/tcp/ pseudo-device files to probe for bound ports has
indeed the advantage of simplicity, but comes with a few drawbacks:

- it will actually send data to unsuspecting services that might be
  running in the same network namespace as the tests, possibly
  causing unwanted interactions

- it doesn't allow for UDP probing

- it makes it impossible to clearly distinguish between different
  address bindings

Replace that approach with a new helper, port_is_bound(), that uses
procfs entries at /proc/net to detect bound ports, without the need
for active probing.

We can now implement optional parameters in callers, to check if a
port if free for binding to a given address, including any IPv4
(0.0.0.0) or any IPv6 (::0) address, and for a given protocol, TCP
or UDP.

Extend random_free_port() and random_free_port_range() to support
that.

The implementation of one function in the file
test/system/helpers.bash, namely ipv6_to_procfs(), and the
implementation of the corresponding own test, delimited by the
markers "# BEGIN ipv6_to_procfs" and "# END   ipv6_to_procfs" in the
file test/system/helpers.c was provided, on the public forum at:

  https://github.com/containers/podman/pull/16141

by Ed Santiago <santiago@redhat.com>, who expressly invited me to
include them in this code submission.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2022-11-08 00:16:35 +01:00
7e3d04fbc6 test/system: Use port_is_free() from wait_for_port()
Currently, wait_for_port() duplicates the check logic implemented by
port_is_free().

Add an optional argument to port_is_free(), representing the bound
address to check, and call it, dropping the direct check in
wait_for_port().

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2022-11-08 00:16:35 +01:00
aa47e05ae4 libpod: Add pasta networking mode
Conceptually equivalent to networking by means of slirp4netns(1),
with a few practical differences:

- pasta(1) forks to background once networking is configured in the
  namespace and quits on its own once the namespace is deleted:
  file descriptor synchronisation and PID tracking are not needed

- port forwarding is configured via command line options at start-up,
  instead of an API socket: this is taken care of right away as we're
  about to start pasta

- there's no need for further selection of port forwarding modes:
  pasta behaves similarly to containers-rootlessport for local binds
  (splice() instead of read()/write() pairs, without L2-L4
  translation), and keeps the original source address for non-local
  connections like slirp4netns does

- IPv6 is not an experimental feature, and enabled by default. IPv6
  port forwarding is supported

- by default, addresses and routes are copied from the host, that is,
  container users will see the same IP address and routes as if they
  were in the init namespace context. The interface name is also
  sourced from the host upstream interface with the first default
  route in the routing table. This is also configurable as documented

- sandboxing and seccomp(2) policies cannot be disabled

- only rootless mode is supported.

See https://passt.top for more details about pasta.

Also add a link to the maintained build of pasta(1) manual as valid
in the man page cross-reference checks: that's where the man page
for the latest build actually is -- it's not on Github and it doesn't
match any existing pattern, so add it explicitly.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2022-11-08 00:16:35 +01:00
6dd508b8e0 More log-flake work
It looks like #16132 was my fault: a missing 'wait' for a container
to exit. Let's see if this fixes the flake.

And, while poking through flake logs, I found another missing wait.

And... in wait_for_output(), address a potential race.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-11-07 14:35:24 -07:00
ec03579aa2 Merge pull request #16435 from edsantiago/fix_static_race
Fix test flakes caused by improper podman-logs
2022-11-07 14:39:50 -05:00
781ecec469 Merge pull request #16386 from bjorndown/feature/pod-create-with-netns
Allow namespace path network option for pods.
2022-11-07 14:29:24 -05:00
d60b25fc29 Merge pull request #16433 from Luap99/systemd-check
fix incorrect systemd booted check
2022-11-07 14:27:00 -05:00
3ebcfdbbc6 Fix test flakes caused by improper podman-logs
This one has been a thorn in my side: it's a podman-log issue,
but not remote, so I _almost_ retitled #16132 (removing "remote").

Nope, it's a bug in the tests themselves. One solution would be to
podman-wait, but I see no reason for logs to be involved, so I
went with podman start -a instead. This removes the k8s-log stuff
which is no longer necessary. Cleanup all around.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-11-07 11:29:06 -07:00
919678d2f8 fix incorrect systemd booted check
Check for the directory /run/systemd/system, this is described in
sd_booted(3). Reading /proc/1/comm will fail when /proc is mounted
with the `hidepid=2` option.

[NO NEW TESTS NEEDED]

Fixes #16022

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-11-07 18:23:55 +01:00
0334d8d611 Cirrus: Add tests for GHA scripts
Also, fix the rerun_cirrus_cron workflow.  Thanks @ygalblum for spotting
the error.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-07 11:47:30 -05:00
66d857cdd7 GHA: Update scripts to pass shellcheck
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-07 11:47:29 -05:00
d17b7d852a Cirrus: Shellcheck github-action scripts
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-07 11:46:34 -05:00
2ee40287e0 Cirrus: shellcheck support for github-action scripts
This should help catch some obvious gaffs and/or style/lint type
problems.  Maybe.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-07 11:46:34 -05:00
462ce32e66 GHA: Fix cirrus-cron scripts
Lack of proper testing possibility for github actions and lack of
script-testing by me, allowed several flaws through into 'main'.  Fix
the problems and manually test the scripts to make sure they're working.

Note: Also revert the stupid SHA-based action-pinning back to normal,
human-readable version numbers.  The value of using SHAs in the name of
improved "security" is real, but the value of human-readability and
ease of maintenance is greater.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-07 11:46:34 -05:00
9e04bab722 Merge pull request #16418 from jakegt1/main
Fix compat build API returning two JSON objects at once
2022-11-07 09:49:57 -05:00
e300c269fa Merge pull request #16410 from rhatdan/codespell
Run codespell on code
2022-11-07 06:44:25 -05:00
9efa9d8e96 Merge pull request #16422 from dfr/freebsd-build
Makefile: don't install to tmpfiles.d on FreeBSD
2022-11-06 19:21:29 -05:00
d5031946ab Makefile: don't install to tmpfiles.d on FreeBSD
There is no equivalent equivalent on FreeBSD and this causes lint
failures when packaging.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-11-06 11:08:02 +00:00
85f4d37173 Make sure we can build and read each line of docker py's api client
Signed-off-by: Jake Torrance <jaket1234@hotmail.com>
2022-11-06 10:30:18 +00:00
cdb00332da Docker compat build api - make sure only one line appears per flush
Closes #16360

Signed-off-by: Jake Torrance <jake.torrance@oracle.com>
Signed-off-by: Jake Torrance <jaket1234@hotmail.com>
2022-11-06 09:43:34 +00:00
afc84151fc Merge pull request #15591 from snprajwal/go-criu/v6
Upgrade go-criu to v6
2022-11-04 15:48:52 -04:00
e83bb91536 Merge pull request #16346 from eriksjolund/add_docs_userns_keep-id_uid_gid
[CI:DOCS] troubleshooting: document keep-id options
2022-11-04 11:53:17 -04:00
6d44d332a2 Merge pull request #16409 from rhatdan/VENDOR
Update vendor of containers/(image, storage, common)
2022-11-04 11:08:11 -04:00
efbad590d7 Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-11-04 10:57:41 -04:00
571833d562 Update vendor of containers/(image, storage, common)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-11-04 08:58:12 -04:00
5aa32e45ad Merge pull request #16377 from giuseppe/add-check-for-valid-pod-systemd-cgroup
runtime: add check for valid pod systemd cgroup
2022-11-04 07:59:22 -04:00
e3d174ae1d Merge pull request #16396 from cevich/sync_windows
Cirrus: Synchronize windows image
2022-11-04 06:53:12 -04:00
017521c283 Merge pull request #16399 from Luap99/no-apk
test/e2e: do not use apk in builds
2022-11-04 06:50:19 -04:00
049a5d82f1 Allow namespace path network option for pods.
Closes #16208.

Signed-off-by: Björn Mosler <dev@bjoern.mosler.ch>
2022-11-04 11:26:06 +01:00
013bd81417 Merge pull request #16394 from vrothberg/fix-16387
remove container/pod id file along with container/pod
2022-11-04 05:22:57 -04:00
0702b4cf4c Merge pull request #15359 from rhatdan/manifest
Add --insecure flag to podman manifest inspect for Docker compatibility
2022-11-04 05:14:46 -04:00
58cd3ff2b8 Merge pull request #16401 from cevich/fix_windows_cross
[CI:BUILD] Cirrus: Never skip running Windows Cross task
2022-11-03 17:13:55 -04:00
eb7da14015 Merge pull request #16357 from cevich/cron_auto_rerun
[CI:DOCS] [WIP] GHA: Auto. re-run failed cirrus-cron builds once
2022-11-03 16:37:42 -04:00