16332 Commits

Author SHA1 Message Date
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
f8e73eadd2 [CI:DOCS] Update how to enable resource limit delegation
Add a information about `cpu-shares` option and `CPUSET` limits.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-08-22 21:07:42 +09: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
8ffeb626c9 events: Add freebsd support for libpod/event
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-22 10:14:12 +01:00
8aa29fd54f cmd/podman: Enable ABI and Tunnel mode for freebsd
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-22 10:14:12 +01: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
3bf52aa338 Add ProgressWriter to PullOptions
Signed-off-by: Vladimir Kochnev <hashtable@yandex.ru>
2022-08-19 00:41:22 +03:00
ec9508ea17 Pass io.Writer when pushing images/manifests from command line
[NO NEW TESTS NEEDED]

Signed-off-by: Vladimir Kochnev <hashtable@yandex.ru>
2022-08-18 23:48:43 +03:00
e48681e600 Use request Context() in API handlers
Request object has its own context which must be used during a request
lifetime instead of just context.Background()

[NO NEW TESTS NEEDED]

Signed-off-by: Vladimir Kochnev <hashtable@yandex.ru>
2022-08-18 23:48:43 +03:00
b9fb60c68a Simplify ImagesPull for when Quiet flag is on
Refactor ImagesPull the same way the ImagesPush and ManifestPush are
done.

[NO NEW TESTS NEEDED]

Signed-off-by: Vladimir Kochnev <hashtable@yandex.ru>
2022-08-18 23:48:41 +03: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
976ce76eba podman save: update --compress validation
[NO NEW TESTS NEEDED]

Signed-off-by: Hoang Thanh VO <111461555+ht-vo@users.noreply.github.com>
2022-08-18 09:36:44 +02: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
f6e7b0b59d Add podman secret inspect -f alias for --format: Docker compatibility
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-08-17 12:49:30 -04:00
d50ff4f512 Add podman secret create -d as alias for --driver for Docker compatibility
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-08-17 12:44:42 -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
6411f57e78 api: return imageID instead of imageName, for "Image" when Podman API is queried
Signed-off-by: Josh Patterson <josh.patterson@securityonionsolutions.com>
2022-08-17 11:26:17 -04: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