19293 Commits

Author SHA1 Message Date
5ff6fc5596 Add --configmap to podman-remote kube play
Enable the --configmap flag for the remote case of podman
kube play. Users can pass in the paths to the configmap files
for kube play to use when creating the pods and containers from
a kube yaml file. The configmap file is read and the contents are
appended to the contents of the main yaml file before passed to the
remote client.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-05-17 14:23:55 +00:00
ad8d0e57d7 compat: accept tag in /images/create?fromSrc
Accept a tag in the compat api endpoint. For the fromImage param we
already parse it but for fromSrc we did not.

Fixes #18597

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-17 16:12:19 +02:00
bf0cea76c7 fix HTMLSpan warnings
'make docs' has been spitting out these warnings:

   WARNING: go-md2man does not handle node type HTMLSpan

Warnings suck, they cost us important time and attention.

This warning is always caused by left-angle-brackets in markdown
but they are very hard to find. I've found them and fixed them.
Warnings are now gone.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-17 07:21:14 -06:00
a576fa3f14 generate systemd: error on init containers
Init containers are currently not properly supported in
generate-systemd and there are no plans to do so since
all focus lies on Quadlet going forward.

Hence, generate systemd should through an error.

Closes: #18585
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-05-17 14:50:23 +02:00
a1201843fd Merge pull request #18583 from flouthoc/compat-pull-accept-string
compat,build: pull must accept string
2023-05-16 17:45:14 -04:00
5e16451fdc Merge pull request #18559 from rhatdan/man
[ci:docs] Remove future tense from man pages
2023-05-16 17:40:08 -04:00
6c5f33146c Merge pull request #18590 from edsantiago/systest_log_timestamps
system tests: add precision timestamps
2023-05-16 15:54:53 -04:00
32c2cea0f9 Remove future tense from man pages
Remove all will, would, could, should and use present tense.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-05-16 15:10:33 -04:00
5b148a0a68 compat,build: pull must accept string
`pull` parameter in `build` must accept string just like docker.

Ref: https://docs.docker.com/engine/api/v1.42/#tag/Image/operation/ImageBuild

Closes: https://github.com/containers/podman/issues/17778

Signed-off-by: Aditya R <arajan@redhat.com>
2023-05-16 23:04:09 +05:30
d1dcb0846b Cirrus: Add support for [CI:NEXT]
Rather than supporting a special-mode *just* for netavark/aardvark
testing [in podman CI], support testing with all the latest
`podman-next` COPR packages.

The idea here is very similar to the netavark/aardvark special mode it
replaces.  Most podman-dependencies do not have the level of
comprehensive CI as exist here.  This new CI-mode allows testing
upstream updates to podman-dependencies without needing to roll out
a whole new package/release for them.

Also update documentation for this new mode.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-05-16 12:18:00 -04:00
eb4f0bc17d Cirrus: Remove support for [CI:COPR] magic
This magic string isn't often used and may cause confusion with future
magic-string additions.  Remove it.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-05-16 12:17:59 -04:00
3c8d120caa Merge pull request #18565 from Luap99/machine-localhost
machine: fix default connection URL to use 127.0.0.1
2023-05-16 12:05:34 -04:00
3360214a0f system tests: add precision timestamps
In run_podman(), display a nanosecond-level timestamp next to
each command and its output.

Because this clutters the results, teach logformatter to grok
these new timestamps, strip them, and display a more human-readable
time delta in the left-hand timestamp column. logformatter started off
as a mess and is now, well, 🤮. I'm sorry. I just hope its results
make it worthwhile.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-16 09:34:33 -06:00
5d07b1c59b Merge pull request #18582 from Luap99/make-ginkgo-filter
Makefile: add ginkgo FOCUS/FOCUS_FILE options
2023-05-16 10:36:29 -04:00
0104fe3244 Merge pull request #18570 from edsantiago/more_wait
e2e: fix more test races (missing "wait")
2023-05-16 10:18:03 -04:00
8b49872669 Makefile: add ginkgo FOCUS/FOCUS_FILE options
When running ginkgo tests locally we often only want to test a small
subset. I think most people just add the `FIt` block but then you need
to remember to undo that before pushing the changes.

With this change you can just run:
```
make localintegration FOCUS="test name here"
make localintegration FOCUS_FILE="some_test.go"
```
I updated the test Readme to use this new syntax.
The options just map to the ginkgo options, see the upstream docs
linked in the readme for more information about syntax.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-16 14:44:05 +02:00
f418539642 Merge pull request #18584 from edsantiago/gpg_serialize_refactor
e2e: refactor and document serialization
2023-05-16 08:33:51 -04:00
4bed2c285c e2e: refactor and document serialization
Followup to #18578: move Serial to Describe(), in case new
tests get added to this module. And, explain the reasoning.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-16 04:48:55 -06:00
ce07860a1c machine: fix default connection URL to use 127.0.0.1
gvproxy listens on 127.0.0.1, using localhost as hostname can result in
the client trying to connect to the ipv6 localhost (`::1`). This will
fail as shown in the issue. This switches the hostname in the system
connection to 127.0.0.1 to fix this problem.
I switched the qemu, hyperV and WSL backend. I haven't touched the
applehv code because it uses two different ips and I am not sure what is
the correct thing there. I leave this to Brent to figure out.

[NO NEW TESTS NEEDED]

[1] https://github.com/containers/gvisor-tap-vsock/blob/main/cmd/gvproxy/main.go#L197-L199

Fixes #16470

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-16 10:55:31 +02:00
e2d1ad1fb2 Merge pull request #18571 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.9.5
2023-05-16 04:05:36 -04:00
33a9b21047 Merge pull request #18574 from containers/renovate/github.com-openshift-imagebuilder-1.x
fix(deps): update module github.com/openshift/imagebuilder to v1.2.5
2023-05-16 03:26:28 -04:00
9eaa390cea Merge pull request #18578 from edsantiago/gpg_serialize
e2e: serialize gpg tests
2023-05-16 03:13:08 -04:00
07d2fbcd52 Merge pull request #18567 from ashley-cui/doc
[CI:DOCS] Document podman-machine-default behavior
2023-05-16 03:05:21 -04:00
3657d1f548 Merge pull request #18566 from cevich/v9.9.9-rhel_release_task_skip
Skip rhel-release branch unnecessary CI tasks
2023-05-15 19:48:28 -04:00
a485ba505a e2e: serialize gpg tests
Reason: gpg tests all run with a different GNUPGHOME, and gpg-agent
does not like that, and there's no longer any way to run gpg
without the agent. So, do not run these tests in parallel, and
clean up agent after each test.

Fixes: #17966 (I hope)

May also fix #18358 but it will take some time to be sure.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-15 14:47:13 -06:00
b9aaafbe17 Document podman-machine-default behavior
When no name arg is given to Podman machine commands, Podman assumes the machine name is podman-machine-default. Document this behavior.

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-05-15 14:23:17 -04:00
7580b8ae49 e2e: fix more test races (missing "wait")
...in three kube tests. And, missing error-message checks.
And, reverse the sense of a confusing Expect(), plus add
a description to the test failure. And, set never-restart,
otherwise our "podman wait" will spin for an indeterminate
time.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-15 11:53:04 -06:00
4c399fc6fb Merge pull request #18554 from n1hility/sync-docker-sock
Sync machine docker.sock according to rootful flag
2023-05-15 13:25:58 -04:00
6d58f5bb0c fix(deps): update module github.com/openshift/imagebuilder to v1.2.5
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-15 17:25:21 +00:00
376a7f34ba Merge pull request #18546 from containers/dependabot/go_modules/github.com/docker/distribution-2.8.2incompatible
build(deps): bump github.com/docker/distribution from 2.8.1+incompatible to 2.8.2+incompatible
2023-05-15 13:23:21 -04:00
e0890cae14 Merge pull request #18563 from vrothberg/fix-15897
remote-save: fix permissions and dir formats
2023-05-15 13:20:18 -04:00
2f6cb5e216 Merge pull request #18569 from PhrozenByte/deprecate_network_cmd_path
[CI:DOCS] Fix documentation of `--network-cmd-path` CLI option
2023-05-15 13:17:38 -04:00
7d305d5227 Merge pull request #18544 from Luap99/e2e-dedup
test/e2e: dedup Before/AfterEach nodes
2023-05-15 12:55:53 -04:00
520979ba2e fix(deps): update module github.com/onsi/ginkgo/v2 to v2.9.5
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-15 16:26:32 +00:00
ae5cbf37cf Fix documentation of --network-cmd-path CLI option
The `--network-cmd-path` CLI option only affects rootless networks using `slirp4netns(1)`, not `pasta(1)`.  Following #18568 Podman should rather use the more generic `r.config.FindHelperBinary()` method (and therefore honour the `helper_binaries_dir` config) to find the path to the `slirp4netns` binary and deprecate the misleading `--network-cmd-path` CLI option.  However, since this wasn't implemented yet we can't deprecate `--network-cmd-path` as of now.  Adding a note anyway.

Fixes #18560

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2023-05-15 17:47:40 +02:00
71853319fd Skip rhel-release branch unnecessary CI tasks
RHEL release-branches potentially need to be maintained for a very long
time.  Improve reliability and CI-speed by skipping tasks which are not
needed for RHEL.  For example, there will (likely) never be RHEL
releases of the MacOS or Windows versions of podman-remote.  Also,
relocate the `win_installer_task` in the config. to better reflect it's
sequence among CI tasks.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-05-15 11:35:27 -04:00
ab29ff2f66 test/e2e: dedup Before/AfterEach nodes
There is no reason to define the same code every time in each file, just
use global nodes. This diff should speak for itself.

CleanupSecrets()/Volume() no longer call Cleanup() directly, as the
global AfterEach node will always call Cleanup() this is no longer
necessary. If one AfterEach() node fails it will still run the others.

Also always unset the CONTAINERS_CONF env vars. This prevents people
from forgetting to unset it. And fix the special CONTAINERS_CONF logic
in the system connection tests, we do not want to preserve
CONTAINERS_CONF anyway so just remove this logic.

Ginkgo orders the BeforeEach and AfterEach nodes. They will be executed
from the outer-most defined to inner-most. This means our global
BeforeEach is always first. Only then the inner one (in the Describe()
function in each file). For AfterEach it is inverted, from the inner to
the outer.
Also see https://onsi.github.io/ginkgo/#organizing-specs-with-container-nodes

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-15 16:56:18 +02:00
d01ae436ee remote-save: fix permissions and dir formats
Make sure that the directory formats are not just substituted with their
archive counterparts but actually tar'ed up directories.  Also make sure
that the clients don't get chown errors by setting rootless user and
group ID instead of O when running in the user namespace.

Fixes: #15897
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-05-15 15:30:57 +02:00
5a176f09c2 Set machine docker.sock according to rootful flag
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-05-14 23:56:15 -05:00
493aac69e0 Merge pull request #18535 from rhatdan/mount
Fix handling of .containenv on tmpfs
2023-05-14 07:03:32 -04:00
d989c63751 Merge pull request #18542 from mheon/remove_image_annotations
Do not include image annotations when building spec
2023-05-13 06:04:35 -04:00
13f787842d Fix handling of .containenv on tmpfs
Fixes: https://github.com/containers/podman/issues/18531

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-05-13 06:03:21 -04:00
2783651005 Merge pull request #18481 from tony84727/fix/initctr-restart-policy-overridden
fix: initContainer restart policy overridden by pod
2023-05-12 09:09:21 -04:00
2c0f404826 Do not include image annotations when building spec
These annotations can have security implications - crun, for
example, allows rootless containers to preserve the user's groups
through an annotation. We absolutely should not include
annotations from an untrusted image off the internet by default.

We may consider whitelisting some annotations (e.g. the legacy
WASM annotations), but given that there is now a more explicit
way of specifying an image uses the WASM runtime in the OCI image
spec, I'm just tearing this out entirely for now.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-05-11 23:48:23 -04:00
189b09d82e Merge pull request #18331 from TomSweeneyRedHat/dev/tsweeney/hooked
Add file switch for pre-exec hooks
2023-05-11 19:34:30 -04:00
dd5d22cb32 build(deps): bump github.com/docker/distribution
Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.1+incompatible to 2.8.2+incompatible.
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](https://github.com/docker/distribution/compare/v2.8.1...v2.8.2)

---
updated-dependencies:
- dependency-name: github.com/docker/distribution
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-11 20:46:08 +00:00
20b15f07ed Merge pull request #18538 from ygalblum/play-multiple-configmaps
Kube Play - Support multi-doc YAML files for configmap argument
2023-05-11 08:25:37 -04:00
26f1e95ab4 Kube Play - Support multi-doc YAML files for configmap argument
Read the entire YAML file in case of a multi-doc file
Adjust the unit test
Add a system test
Add comment in the man page

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-05-11 13:13:08 +03:00
50db10623c Merge pull request #18536 from edsantiago/instrument_systests_for_unlinkat
system tests: instrument, to try to catch unlinkat-ebusy
2023-05-11 04:42:27 -04:00
c33ba70f95 system tests: instrument, to try to catch unlinkat-ebusy
Several tweaks to see if we can track down #17216, the unlinkat-ebusy
flake:

 - teardown(): if a cleanup command fails, display it and its
   output to the debug channel. This should never happen, but
   it can and does (see #18180, dependent containers). We
   need to know about it.

 - selinux tests: use unique pod names. This should help when
   scanning journal logs.

 - many tests: add "-f -t0" to "pod rm"

And, several unrelated changes caught by accident:
 - images-commit-with-comment test: was leaving a stray image
   behind. Clean it up, and make a few more readability tweaks

 - podman-remote-group-add test: add an explicit skip()
   when not remote. (Otherwise, test passes cleanly on
   podman local, which is misleading)

 - lots of container cleanup and/or adding "--rm" to run commands,
   to avoid leaving stray containers

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-10 14:53:11 -06:00