15905 Commits

Author SHA1 Message Date
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
5f8d08d593 Merge pull request #14915 from eriksjolund/rename_c_to_cpu_shares
[CI:DOCS] man pages: replace -c with --cpu-shares
2022-07-13 14:54:57 +00:00
d2c620e1c4 Merge pull request #14895 from baude/machinewip
Fix machine test for list
2022-07-13 14:50:37 +00:00
e08a77ce64 Add "podman kube play" cmd
The "podman kube play" command is designed to be a replacement for the
"podman play kube" command.
It performs the same function as "play kube"  while also still working with the same flags and options.
The "podman play kube" command is still functional as an alias of "kube play".

Closes #12475
Signed-off-by: Niall Crowe <nicrowe@redhat.com>
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-07-13 15:27:03 +01:00
1392922d4a [CI:DOCS] man pages: replace -c with --cpu-shares
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-13 16:06:42 +02:00
4df6122aaa Merge pull request #14904 from giuseppe/move-to-subcgroup-in-a-container
abi: create new cgroup when running in a container
2022-07-13 09:10:57 +00:00
6323af78e7 Merge pull request #14916 from rhatdan/docker
Docker uses "-c" to mean "--cpu-shares" in create and run
2022-07-13 09:07:00 +00:00
e3419c0324 abi: create new cgroup when running in a container
if podman is running in the root cgroup, it will create a new
subcgroup and move itself there.

[NO NEW TESTS NEEDED] it needs nested podman

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-07-13 09:13:06 +02:00
7b4afbf621 podman: always call into SetupRootless
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-07-13 09:13:06 +02:00
16b8d77f9e utils: call MaybeMoveToSubCgroup once
memoize its result and use it for subsequent calls.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-07-13 09:13:06 +02:00
4b547a72ab podman: move MaybeMoveToSubCgroup to utils/
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-07-13 09:13:06 +02:00
255740bdf8 Merge pull request #14910 from flouthoc/fix-test
test,manifest-run: declare `TARGETPLATFORM` in test containerfile.
2022-07-12 21:41:22 +00:00
4450894217 Fix last machine test
The list --format json test case had a typo like error.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-07-12 15:29:46 -05:00
bb8ff86bf2 Use SafeChown rather then chown for volumes on NFS
NFS Servers will thrown ENOTSUPP error if you attempt to
chown a directory to the same UID and GID as the directory
already has. If volumes are stored on NFS directories this
throws an ugly error and then works on the next try.

Bottom line don't chown directories that already have the correct
UID and GID.

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

[NO NEW TESTS NEEDED] Difficult to setup an NFS Server in testing.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-12 15:41:13 -04:00
72d13c56ce Merge pull request #14905 from eriksjolund/remove_rootless_considerations
[CI:DOCS] rootless_tutorial: Remove incorrect advice regarding volume…
2022-07-12 19:35:01 +00:00
587807b8aa Merge pull request #14912 from edsantiago/ci_confirm_runtime
[CI:DOCS] CI: sanity check for desired runtime
2022-07-12 19:26:53 +00:00
c9a82d72a7 Docker uses "-c" to mean "--cpu-shares" in create and run
Add support for -c as an alias for --cpu-shares to be compatible with
Docker.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-12 14:53:17 -04:00
e83ff8e5e6 [CI:DOCS] podman-create.md: replace -c with --cpu-shares
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-12 19:41:20 +02:00
edbfbfcda1 Merge pull request #14911 from eriksjolund/remove_builtin_volume_option_from_man_pages
[CI:DOCS] man pages: remove non-existent option builtin-volume
2022-07-12 11:14:17 -04:00
09ea46d162 Merge pull request #14893 from Luap99/machine-proxy
podman machine: do not commit proxies into config file
2022-07-12 15:10:36 +00:00
da8c6a8eaf CI: sanity check for desired runtime
We're still not testing runc in CI (#14833), and it may be weeks
or months before we can, due to criu/glibc nightmare, but one day
we'll be back on track, then later on we'll update VMs again,
and screw it up, and lose runc, and not notice, and RHEL will
break, and oh noes headless chicken again, repeat repeat.

We can do better. Use .cirrus.yml to explicitly define which
VMs should use which runtimes, and enforce it early in the
CI build step. This should never fail (uh huh) in a PR,
only in one of the update-VM PRs.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-07-12 08:47:09 -06:00
b8a7e275d1 [CI:DOCS] rootless_tutorial: Remove incorrect advice regarding volumes and mount points
* Remove the instruction
  "The mount point must exist in the container"
  as it is incorrect which is shown by this example
  ```
  $ mkdir dir1
  $ podman run --rm -v ./dir1:/dir1:Z docker.io/library/fedora:36 touch /dir1/file
  $ ls dir1
  file
  $ podman run --rm docker.io/library/fedora:36 ls -l /dir1
  ls: cannot access '/dir1': No such file or directory
  $ podman --version
  podman version 4.1.1
  $
  ```

* Rewrite the advice "You should always give the full path to the volume you'd like to mount"
  so that it also mentions relative paths starting with a dot.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-12 16:32:14 +02:00
f6ed7a8c94 [CI:DOCS] man pages: remove non-existent option builtin-volume
Closes #14906

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-12 16:28:31 +02:00
27e12aa074 test,manifest-run: declare TARGETPLATFORM before using it
As part of fix for https://github.com/openshift/imagebuilder/issues/231
`FROM` does not expands `ARGS` which are not declared so
`TARGETPLATFORM`

Note: I think a patch should be added at imagebuilder to allow using
inbuilt ARGS  in FROM without declaring it as well but it is something
to be discussed so lets declare it manually in our tests

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
2022-07-12 19:52:11 +05:30
a51a63023c Merge pull request #14896 from edsantiago/logformatter_by_task
logformatter: link by *task ID*, not build ID
2022-07-12 13:54:11 +00:00
4d111fa9af Merge pull request #14901 from tyler92/fix-trace-log
fix wrong log message on Trace level
2022-07-12 11:24:13 +00:00
ffbc2adf70 fix wrong log message on Trace level
[NO NEW TESTS NEEDED]

Empty path to runtime binary was printed instead of a real path.

Before fix:
TRAC[0000] found runtime ""
TRAC[0000] found runtime ""

After:
TRAC[0000] found runtime "/usr/bin/crun"
TRAC[0000] found runtime "/usr/bin/runc"

Signed-off-by: Mikhail Khachayants <khachayants@arrival.com>
2022-07-12 10:37:56 +03:00
151d7584c1 Merge pull request #14898 from eriksjolund/improve_language_and_fix_spelling_and_typos
[CI:DOCS] Improve language. Fix spelling and typos.
2022-07-11 21:29:41 +00:00
377057b400 [CI:DOCS] Improve language. Fix spelling and typos.
* Correct spelling and typos.

* Improve language.

Co-authored-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-11 21:59:32 +02:00
3ed323e1bb logformatter: link by *task ID*, not build ID
Reason: task IDs are unique and permanent; linking by
build ID and task name is non-unique, because Re-run.

Fixes: #14863

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-07-11 12:54:16 -06:00
3ce0709f37 podman machine: do not commit proxies into config file
qemu fails when the same `fw_cfg` options is used more than once.
Since the current logic always adds a new option on each machine load
this will fail on the second start.

We can fix this by checking if the option is already set and replace but
I think it is easier to just not commit the option in the config and add
it dynamically on start. User that hit this bug have to recreate the
machine.

[NO NEW TESTS NEEDED]

Fixes #14636
Fixes #14837

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-07-11 17:40:37 +02:00
810cbf1fb9 Merge pull request #14181 from umohnani8/kube-hostname
Add ports and hostname correctly in kube yaml
2022-07-11 15:13:49 +00:00
ea2c31c988 Merge pull request #14874 from vrothberg/fix-14859
exit code improvements
2022-07-11 13:31:39 +00:00
0af75a74d2 Merge pull request #14889 from eriksjolund/rewrite_gidmap_option_docs
[CI:DOCS] Rewrite the --gidmap option docs
2022-07-11 12:56:29 +00:00
0df8c6e157 Merge pull request #14826 from sstosh/net-prune
Refactored networkPrune function
2022-07-11 12:53:59 +00:00
87793b6339 [CI:DOCS] Rewrite the --gidmap option docs
* Reference --uidmap in --gidmap docs for additional information

* Remove --gidmap example "groupname -> 100000 / 30000 -> 0"

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-11 13:19:51 +02:00
3bb4cf8ee2 libpod: read exit code when cleaning up the runtime
While for some call paths we may be doing this redundantly we need to
make sure the exit code is always read at this point.

[NO NEW TESTS NEEDED] as I do not manage to reproduce the issue which
is very likely caused by a code path not writing the exit code when
running concurrently.

Fixes: #14859
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-07-11 13:06:42 +02:00
62cdc387de podman wait: return 0 if container never ran
Make sure to return/exit with 0 when waiting for a container that never
ran.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-07-11 13:06:40 +02:00
3691c9b1ba Merge pull request #14887 from eriksjolund/podman_info_command_completion_doc
[CI:DOCS] podman-info.1.md: update examples (now also shell completion and jq)
2022-07-11 10:10:02 +00:00
25d74db455 [CI:DOCS] podman-info.1.md: Update examples
* Add example "Extracting the list of container registries with a Go template".
  (The example was already present but in a much shorter form)

* Add example "Extracting the list of container registries from JSON with jq".

* Add shell completion instructions

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-11 10:42:48 +02:00