16124 Commits

Author SHA1 Message Date
11cc72d580 Merge pull request #15407 from edsantiago/docs_dedup_certdir
Man pages: refactor common options: cert-dir
2022-08-22 11:05:30 -04:00
76ace93908 Merge pull request #15391 from lsm5/430-dev-bump
version bump to 4.3.0-dev
2022-08-22 11:01:17 -04:00
ad359f61fa Merge pull request #15394 from daniloglima/feature/update-contrib-file
[CI:DOCS] Update "CONTRIBUTING" file with Debian/Ubuntu dependencies"
2022-08-22 09:13:38 -04:00
d5f83135b9 version bump to 4.3.0-dev
v4.2 has been branched already.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-22 08:58:49 -04:00
be1455eadd Update "CONTRIBUTING" file with Debian/Ubuntu dependencies"
Signed-off-by: Danilo Lima <danilo.glima@outlook.com>
2022-08-22 09:20:09 -03:00
a0560eefaa Man pages: refactor common options: cert-dir
...and, tweak markdown-process-review so it can detect and
remove identical files, making review easier.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-22 05:52:20 -06:00
351028b1ac Merge pull request #15401 from vrothberg/fix-15388
fix CI: remove hardcodeded alpine version
2022-08-22 09:05:25 +00:00
f50970ab6c Merge pull request #15342 from edsantiago/docs_dedup_authfile
Man pages: refactor common options: authfile
2022-08-22 08:46:35 +00:00
1f76ad40a9 fix CI: remove hardcodeded alpine version
The apiv2 test hardcoded the tag of the alpine image.
Remove it to unblock CI.

Fixes: #15388
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-22 10:12:25 +02:00
31bb53f5ff Merge pull request #15365 from edsantiago/test_kube_generate
podman kube generate - add actual tests
2022-08-18 20:45:53 +00:00
d07b8c8227 Merge pull request #15371 from dfr/freebsd-conmon
libpod: Add FreeBSD support for ConmonOCIRuntime
2022-08-18 17:21:09 +00:00
2d245e595a Merge pull request #15305 from dilyanpalauzov/reword_exit_policy
Reword --exit-policy option
2022-08-18 13:14:01 -04:00
09ef6fc66c podman generate kube - add actual tests
This exposed a nasty bug in our system-test setup: Ubuntu (runc)
was writing a scratch containers.conf file, and setting CONTAINERS_CONF
to point to it. This was well-intentionedly introduced in #10199 as
part of our long sad history of not testing runc. What I did not
understand at that time is that CONTAINERS_CONF is **dangerous**:
it does not mean "I will read standard containers.conf and then
override", it means "I will **IGNORE** standard containers.conf
and use only the settings in this file"! So on Ubuntu we were
losing all the default settings: capabilities, sysctls, all.

Yes, this is documented in containers.conf(5) but it is such
a huge violation of POLA that I need to repeat it.

In #14972, as yet another attempt to fix our runc crisis, I
introduced a new runc-override mechanism: create a custom
/etc/containers/containers.conf when OCI_RUNTIME=runc.
Unlike the CONTAINERS_CONF envariable, the /etc file
actually means what you think it means: "read the default
file first, then override with the /etc file contents".
I.e., we get the desired defaults. But I didn't remember
this helpers.bash workaround, so our runc testing has
actually been flawed: we have not been testing with
the system containers.conf. This commit removes the
no-longer-needed and never-actually-wanted workaround,
and by virtue of testing the cap-drops in kube generate,
we add a regression test to make sure this never happens
again.

It's a little scary that we haven't been testing capabilities.

Also scary: this PR requires python, for converting yaml to json.
I think that should be safe: python3 'import yaml' and 'json'
works fine on a RHEL8.7 VM from 1minutetip.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-18 09:43:55 -06:00
cdae6d1827 Merge pull request #15340 from giuseppe/conmon-rs-version-parse
runtime: parse conmon-rs version
2022-08-18 12:58:31 +00:00
054d647107 libpod: Build oci_conmon_common.go and oci_conmon_attach_common on FreeBSD
This also adds FreeBSD equivalents to the functions moved to
oci_conmon*_linux.go. For openUnixSocket, we create a temporary symlink
to shorten the path to something that fits into sockaddr_un.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-18 08:07:30 +01:00
cb4158889e libpod: Move openUnixSocket to oci_conmon_attach_linux.go
This function depends on linux-specific functionality in /proc/fd to
allow connecting to local domain sockets with pathnames too long for
sockaddr_un.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-18 08:05:42 +01:00
d43fac20f3 libpod: Move moveConmonToCgroupAndSignal and GetLimits to oci_conmon_linux.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-18 08:05:42 +01:00
93bad90486 libpod: Move socket label handling from oci_conmon_common.go to oci_conmon_linux.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-18 08:05:42 +01:00
6791cdbdf1 libpod: Move rootless handling from oci_conmon_common.go to oci_conmon_linux.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-18 08:05:42 +01:00
68b2450d3d libpod: Move oci_conmon_exec_linux.go to oci_conmon_exec_common.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-18 08:05:42 +01:00
8d229c6cdc libpod: Move oci_conmon_attach_linux.go to oci_conmon_attach_common.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-18 08:05:42 +01:00
bebf55c0f2 libpod: Move oci_conmon_linux.go to oci_conmon_common.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-18 08:05:42 +01:00
1f0c3d5262 Merge pull request #15368 from m0duspwnens/api_sort_hc_binds
sort hc.Binds returned from compat api
2022-08-17 23:06:39 +00:00
f63da351f2 Merge pull request #15364 from rhatdan/stats
Add podman stats --no-trunc option
2022-08-17 21:46:21 +00:00
188d870307 Merge pull request #15362 from rhatdan/manifest1
Add podman manifest create -a. Alias for --amend:Docker compatibility
2022-08-17 21:43:47 +00:00
20ad122741 runtime: use FindCommon from c/common
it detects conmon-rs.

[NO NEW TESTS NEEDED] no functionalities added.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-08-17 23:10:14 +02:00
86f665a1da vendor: update containers/common
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-08-17 22:39:48 +02:00
0dd2fcf715 Add podman manifest create -a. Alias for --amend:Docker compatibility
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-08-17 15:02:53 -04:00
aa197a65ff sort hc.Binds returned from compat api
Signed-off-by: Josh Patterson <josh.patterson@securityonionsolutions.com>
2022-08-17 14:39:32 -04:00
546bb3548c Add podman stats --no-trunc option
This is for compatibility with Docker.

Partial fix for https://github.com/containers/podman/issues/14917

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-08-17 13:16:01 -04:00
5de215e144 Merge pull request #15341 from rhatdan/kube
Fix podman kube generate --help to show correct help message
2022-08-17 16:35:34 +00:00
f70c9cd78b Merge pull request #15031 from lsm5/ec2-aarch64-machine
Cirrus: add podman_machine_aarch64
2022-08-17 14:56:29 +00:00
c2f9ab1a1a Merge pull request #15357 from dfr/freebsd-build
Add non-linux build stubs for libpod
2022-08-17 14:02:00 +00:00
2a6daa1e31 Cirrus: add podman_machine_aarch64
Run machine tests on every PR as label-driven machine test
triggering is currently hard to predict and debug.

Co-authored-by: Ed Santiago <santiago@redhat.com>
Co-authored-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-17 09:11:06 -04:00
1572420c3f libpod: Move uses of unix.O_PATH to container_internal_linux.go
The O_PATH flag is a recent addition to the open syscall and is not
present in darwin or in FreeBSD releases before 13.1. The constant is
not present in the FreeBSD version of x/sys/unix since that package
supports FreeBSD 12.3 and later.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-17 12:55:41 +01:00
5d7778411a libpod: Move rootless network setup details to container_internal_linux.go
This removes a use of state.NetNS which is a linux-specific field defined
in container_linux.go from the generic container_internal.go, allowing
that to build on non-linux platforms.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-17 12:55:32 +01:00
1b88927c2c libpod: Add stubs for non-linux builds
Note: this makes info.go linux-only since it mixes linux-specific and
generic code. This should be addressed in a separate refactoring PR.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-17 11:45:07 +01:00
c90eec2700 Merge pull request #14999 from sstosh/restart-option
Add restart --cidfile, --filter
2022-08-17 09:41:54 +00:00
a9131050cf Merge pull request #15350 from nalind/manifest-amend
podman manifest create: accept --amend and --insecure flags
2022-08-17 09:39:19 +00:00
fd0142d8ee Merge pull request #15324 from dfr/freebsd-build
utils: Add missing symbols for FreeBSD
2022-08-17 09:36:43 +00:00
7e7a79b075 podman manifest create: accept --amend and --insecure flags
Accept a --amend flag in `podman manifest create`, and treat
`--insecure` as we would `--tls-verify=false` in `podman manifest`'s
"add", "create", and "push" subcommands.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2022-08-16 19:45:36 -04:00
5f09d9b60d Fix podman kube generate --help to show correct help message
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-08-16 16:03:48 -04:00
3aa92010df Merge pull request #15345 from edsantiago/runc_fix
system tests: fix broken runc test
2022-08-16 19:50:39 +00:00
06b3a4c1cf system tests: fix broken runc test
Followup to #14613, which was never actually tested until this
week in RHEL8 gating tests (see issue #15337).

 * add missing backslash in '|' expression
 * allow extra text after error (e.g., "invalid argument")

No way to test this until it makes its way into RHEL8,
so, fingers crossed.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-16 10:53:05 -06:00
f0e8640755 Man pages: refactor common options: authfile
Refactor the --authfile option.

My suggestion for review:
  1) run hack/markdown-preprocess-review and immediately Ctrl-Q to
     quit out of diffuse, which is completely unusable for this
     many files; then
  2) cd /tmp/markdown-preprocess-review.diffs/authfile
     - this is the directory created by the review script
  3) rm podman-image-sign* podman-log* podman-search.1.md.in
     - because they're essentially identical to podman-create
  4) rm podman-manifest-* podman-push.*
     - because they're 100% identical to podman-kube-play
  5) rm podman-kube-play*
     - because it's apart-from-whitespace identical to podman-build
       (use "wdiff" to confirm)
  6) rm podman-auto-update*
     - because that's the one I chose (hence == zzz-chosen.md)

(You should obviously run your own diff/cmp before rm, to confirm
my assertions about which files are identical).

After all that, you have a manageable number of files which
you can scan, read, diff against zzz-chosen.md, even run diffuse.

This option is IMHO the poster child for why we need this kind
of man page refactoring.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-16 09:13:38 -06:00
3dace12777 Merge pull request #15317 from rhatdan/debug
Add compatibility support for --debug flag from docker
2022-08-16 15:09:12 +00:00
552225c414 Merge pull request #15339 from edsantiago/docs_dedup_annotation
Man pages: refactor common options: --annotation
2022-08-16 13:54:03 +00:00
a78b67a47b Man pages: refactor common options: --annotation
Refactor the --annotation option, but only between podman create,
kube play, and run.

This does not include:

 * podman build:
   - usage is in terms of images, not containers/pods

 * manifest add, manifest annotate:
   - usage is in terms of images, not containers/pods
   - also, wording is slightly different

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-16 07:04:48 -06:00
d0567dd078 Merge pull request #15270 from nicrowe00/kubegenerate
Add "podman kube generate" command
2022-08-16 13:04:41 +00:00
311b5946f7 Merge pull request #15331 from edsantiago/docs_dedup_piecemeal
Man pages: refactor common options: arch
2022-08-16 13:01:59 +00:00