15794 Commits

Author SHA1 Message Date
438fef1caa kube secret handling for podman play kube
add support for both creating a secret using yaml and mounting a secret as a volume given a yaml file.
Kubernetes secrets have a different structure than podman and therefore have to be handeled differently.
In this PR, I have introduced the basic usecases of kube secrets with more implementations like env secrets
to come!

resolves #12396

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-07-20 12:55:33 -04:00
8c9eff5b12 Merge pull request #14945 from sstosh/pod-pause-cgroupv1
"podman pod pause" return error if cgroups v1 rootless container
2022-07-20 12:01:10 +02:00
6d9f34c630 Merge pull request #14961 from edsantiago/systemd_test_cleanup
system tests: new system-service bats file
2022-07-19 15:13:09 +00:00
21cf30f2f8 Merge pull request #14963 from lsm5/main-remove-f35-cirrus
Cirrus: comment out f35 for podman4
2022-07-19 14:19:48 +00:00
6947746bbb Merge pull request #14962 from n1hility/improve-fetch-message
Improve download message on Windows
2022-07-19 10:22:50 +00:00
870edf08e8 Merge pull request #14970 from sstosh/manifest-man-typo
[CI:DOCS] Fix typo in manifest manpage
2022-07-19 08:42:57 +00:00
0a2ddc9bd6 [CI:DOCS] Fix typo in manifest manpage
rme -> rm

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-07-19 17:22:52 +09:00
26ae055a24 Remove return error from "containers.pause"
When we pause `rootless cgroups v1 container`, podman returns error from `libpod.(*Container).pause`.
Podman does not need to return error from `containers.pause` because of duplicate.

[NO NEW TESTS NEEDED]

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-07-19 10:00:53 +09:00
eef39b69ee "pod pause/unpause/stop" append "report.Errs" to "reports"
There is a possibility that podman does not output expected error message.
(e.g. When pause rootless cgroups v1 container on host)
This problem is solved by appending `report.Errs` to `reports` before `continue`.

[NO NEW TESTS NEEDED]

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-07-19 10:00:33 +09:00
252fc7cb9a Merge pull request #14960 from rhatdan/VENDOR
Vendor in latests containers/common and opencontainers/runtime-tools
2022-07-18 19:36:38 +00:00
aa1711e3d6 Cirrus: comment out f35 for podman4
We are not shipping podman4 on f35, so it's not worth CI time at
this point.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-07-18 15:12:27 -04:00
1f0116817d system tests: new system-service bats file
Followup to #14957, which added a new test that doesn't
actually belong in the 250-systemd.bats file. It was
copy-pasted from another test that doesn't belong there.

Move both tests to a new .bats file, because (1) they
need a custom cleanup, and (2) one of the tests should
very definitely run under podman-remote, and the 250
bats file has a global skip_if_remote().

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-07-18 13:06:09 -06:00
fdba0d7909 Vendor in latests containers/storage and opencontainers/runtime-tools
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-18 13:25:01 -04:00
5e4d729434 Merge pull request #14890 from rhatdan/VENDOR
Vendor in containers/(storage,image, common, buildah)
2022-07-18 17:17:26 +00:00
d890c4d98e Merge pull request #14947 from rhatdan/root
Add --host and -H as equivalent options to --url
2022-07-18 17:12:30 +00:00
82b1d85ebe Print rootfs download as a specific version on Win
- Also save the file using this convention.
- Change the general pull mechanism to print the local file
  as opposed to the remote to enable this - no change in
  observed behavior on mac

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-07-18 10:47:21 -05:00
1aafb01a99 buildah vendor treadmill
As you run --sync, please update this commit message with your
actual changes.

Changes since 2022-06-14:
 - apply-podman-deltas: (minor) buildah 4057 changed the name
   of a test; make corresponding change here

 - apply-podman-deltas: buildah 4071 adds a new OCI-hook
   test that's failing in remote. Skip it.

 - apply-podman-deltas: buildah 4096 changed an error message

 - apply-podman-deltas: buildah 4097 added a test that doesn't
   work with podman-remote

 - run-buildah-bud-tests: only run 'sudo --validate' if we
   need to sudo later (for running tests). Otherwise, same
   thing: I run the treadmill script, step away, and come
   back to an unnecessary sudo prompt.

 - system tests: the new containers-storage changes some
   error messages; fix tests to reflect that. (And, unrelated,
   fix a red cleanup warning)

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-18 10:49:33 -04:00
f67ab1eb20 Vendor in containers/(storage,image, common, buildah)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-18 10:42:04 -04:00
5f848d89ed Run codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-18 10:42:04 -04:00
18c0c19aa9 Add --host and -H as equivalent options to --url
Docker supports -H and --host for specify the listening socket. Podman
should support them also in order to match the CLI.

These will not be documented since Podman defaults to using the
--url option.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-18 10:41:00 -04:00
5201ea8e41 Merge pull request #14777 from rhatdan/nfs
Use SafeChown rather then chown for volumes on NFS
2022-07-18 07:32:14 +00:00
b680e117ba Merge pull request #14951 from eriksjolund/add_socket_activation_entry_to_tutorial_list
[CI:DOCS] Tutorials.rst: add socket activation
2022-07-17 10:18:24 +00:00
20a3c9969f Merge pull request #14900 from ashley-cui/machcache
Clean up cached machine images
2022-07-16 12:02:55 +00:00
c9722c0b16 [CI:DOCS] socket_activation.md: fix typo and layout
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-16 06:41:57 +02:00
bbb7d4a9fb Merge pull request #14952 from ashley-cui/ssh
Machine init: create .ssh dir if not exist
2022-07-15 21:14:40 +00:00
5f04f9961a Machine init: create .ssh dir if not exist
When initing a machine, we generate ssh keys in `$HOME/.ssh`. If there
is not .ssh dir, we should create it, so the init does not fail.

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-07-15 15:36:17 -04:00
56cfdffe47 [CI:DOCS] Tutorials.rst: add socket activation
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-15 17:36:33 +02:00
98b22e29c9 Merge pull request #14932 from jakecorrenti/pull-all-tags-shorthand
Podman pull --all-tags shorthand option
2022-07-15 15:12:58 +00:00
b513dc4c1e Clean up cached machine images
When initing machines, we download a machine image, and uncompress and
copy the image for the actual vm image. When a user constantly pulls new
machines, there may be a buildup of old, unused machine images. This
commit cleans ups the unused cached images.

Changes:
- If the machine is pulled from a URL or from the FCOS releases, we pull
  them into XDG_DATA_HOME/containers/podman/machine/vmType/cache
- Cache cleanups only happen if there is a cache miss, and we need to
  pull a new image
- For Fedora and FCOS, we actually use the cache, so we go through the
  cache dir and remove any images older than 2 weeks (FCOS's release cycle), on a cache miss.
- For generic files pulled from a URL, we don't actually cache, so we
  delete the pulled file immediately after creating a machine image
- For generic files from a local path, the original file will never be
  cleaned up

Note that because we cache in a different dir, this will not clean up
old images pulled before this commit.

[NO NEW TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-07-15 09:10:43 -04:00
b4c09bef66 Merge pull request #14909 from eriksjolund/add_socket_activation_tutorial
[CI:DOCS] Add socket_activation.md
2022-07-15 09:36:28 +00:00
aa7aedc958 Merge pull request #14944 from cevich/machine-label-task
Cirrus: Trigger podman-machine task by label
2022-07-15 04:18:03 +00:00
10bf85c07f Merge pull request #14927 from cevich/fix_error_grep
[CI:DOCS] GHA: Fix dumb error check
2022-07-14 20:56:06 +00:00
f6e41e77c7 Merge pull request #14832 from karthikelango137/filterFlagStop
Podman stop --filter flag
2022-07-14 19:16:05 +00:00
313ec3e251 Merge pull request #14938 from nicrowe00/12475remix
fix tests for "podman kube play"
2022-07-14 18:48:41 +00:00
d95e79ebe3 GHA: Fix dumb error check
Previously the reply JSON was examined for the literal presence of the
string 'error'.  This was intended to catch server or query errors and
the like.  However it's not a sound design as valid/legitimate contents
could potentially contain the string.  Fix this by using the `-e` option
to `jq`, with a filter that should always result in a non-empty/null
match.  If this fails or returns null for some reason, then it's safe to
throw a real error code & message.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-07-14 14:42:59 -04:00
d385914cd9 Cirrus: Trigger podman-machine task by label
Instead of requiring developers to search for a magic button, make the
task trigger at the time a special PR label is added.  Update comments
accordingly.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-07-14 14:29:07 -04:00
a2f6cc74e7 Podman stop --filter flag
Filter flag is added for podman stop and podman --remote stop. Filtering logic is implemented in
getContainersAndInputByContext(). Start filtering can be manipulated to use this logic as well to limit redundancy.

Signed-off-by: Karthik Elango <kelango@redhat.com>
2022-07-14 13:18:53 -04:00
3637d55191 Merge pull request #14935 from saschagrunert/semver-v4
Switch to `github.com/blang/semver/v4`
2022-07-14 15:50:39 +00:00
90607a6d04 Podman pull --all-tags shorthand option
I added the shorthand option for `podman pull --all-tags`. Like Docker,
Podman can now do `podman pull -a`.

Signed-off-by: Jake Correnti <jcorrenti13@gmail.com>
2022-07-14 10:54:24 -04:00
3b5034e91a fix tests for "podman kube play"
This is a follow up to fix some of the apiv2
tests related to "podman kube play" while also
removing reduntant system tests.

Signed-off-by: Niall Crowe <nicrowe@redhat.com>
2022-07-14 15:47:27 +01:00
8e2add7709 [CI:DOCS] Update docs/tutorials/socket_activation.md
Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-14 15:20:59 +02:00
2270bc5f96 [CI:DOCS] Add socket activation tutorial
Closes #14908

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-14 15:20:52 +02:00
35e637daf8 Merge pull request #14914 from edsantiago/xref_manpages_stricter
[CI:DOCS] man page checker: enforce stricter options format
2022-07-14 13:14:41 +00:00
23a266b2e7 Merge pull request #14919 from gbraad/fedorawsl
Use prepared image for WSL machine init
2022-07-14 12:35:56 +00:00
ad7c54e13a man page checker: enforce stricter options format
Followup to #14906, in which a nonexistent option was found
in a man page. The xref script was designed to catch that,
but I was too lax in my parsing: the option was documented
using wrong syntax, and the script didn't catch it.

Solution: do not allow *any* unrecognized cruft in the
option description lines. And fix all improperly-written
entries to conform to the rule:

    **--option**=*value(s)*

Two asterisks around option, which must have two dashes. One
asterisk around value(s).

This is going to cause headaches for some people adding new
options, but I don't think I can fix that: there are many
factors that make an unparseable line. Adding 'hint' code
would make the script even more complex than it is. I have
to assume that our contributors are smart enough to look
at surrounding context and figure out the right way to
specify options.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-07-14 06:35:51 -06:00
d4dc067117 Merge pull request #14923 from rhatdan/events
Add podman events -f to be alias for --filter
2022-07-14 12:01:40 +00:00
66cb856f9d Switch to github.com/blang/semver/v4
Switch to the latest version of the now go module compatible release.

[NO NEW TESTS NEEDED]

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-07-14 13:53:13 +02:00
0f53abd093 Fixes #14698 Use prepared image for WSL2 machine init
This commit introduces a prepared image for setting up the WSL2
environment. This means that the deployment will take considerable
less time to finish (as it does not need to run an update and package
install), but also allows to rely on a cached image to re-init the
environment without the need for an internet connection.

[NO NEW TESTS NEEDED]

Signed-off-by: Gerard Braad <me@gbraad.nl>
2022-07-13 17:19:38 -05:00
5c3eec5589 Merge pull request #14772 from nicrowe00/12475
Add "podman kube play" cmd
2022-07-13 19:29:16 +00:00
cc2cfe0602 Add podman events -f to be alias for --filter
Needed for Docker compatibility.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-13 10:55:27 -04:00