16352 Commits

Author SHA1 Message Date
716ac1c866 Refactor: About the RawInput process
Refactor the RawInput process of the `rm` and
`start` subcommands, like the other subcommands
such as `restart, stop, etc`.

[NO NEW TESTS NEEDED]

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-08-23 09:58:34 +09:00
74388fe75f Man pages: refactor common options: --pod-id-file
Much like --cidfile (#15414), --pod-id-file has two meanings.
One is used in pod-related commands, one in container ones.
Both meanings read the file, so the read/write split used
in --cidfile is not applicable here.

podman-pod-create keeps its --pod-id-file option because
that one cannot be refactored: that's the only command (now)
that writes a pod-id file.

Reviewable using hack/markdown-preprocess-review but I
did take some liberties with the #### args because they
were wrong. And, since I had to much with the description
text anyway (resulting in diffs), I also took the liberty
of cleaning up a double space.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-22 18:37:38 -06:00
d97f4dfbcc Merge pull request #15414 from edsantiago/docs_dedup_cidfile
Man pages: refactor common options: --cidfile
2022-08-22 20:31:09 -04:00
0f768cef3b [CI:DOCS] Update Troubleshooting.md
- Fix the item number
- Fix the links

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-08-23 08:47:02 +09:00
51d4b88ce9 Merge pull request #15392 from ashley-cui/quiet
Add quiet/q flag to podman secret ls
2022-08-22 15:46:47 -04:00
c6488fe4af Man pages: fix sloppiness
I've been doing the man-page cleanup distractedly, while
fighting other fires, and submitted some crap:

 * #15339: I used single angle brackets, not double

 * #15407: I only refactored --cert-dir from some man pages, not all

Easy to review with hack/markdown-preprocess-review, because all the
removed texts are identical. The only diff is that container-certs.d
is now a link.

Sorry about that. I'm going to spend more time being careful.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-22 12:38:02 -06:00
53369aaa15 pass environment variables to container clone
the env vars are held in the spec rather than the config, so they need to be mapped manually. They are also of a different format so special handling needed to be added. All env from the parent container will now be passed to the clone.

resolves #15242

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-08-22 14:27:42 -04:00
46f31361f8 Man pages: refactor common options: --cidfile
There are two meanings: one writes a cidfile, the other reads.
Split into two .md files.

This can be reviewed with hack/markdown-preprocess-review .
The main differences you'll see are all in cidfile.read:

  1) I use the <<subcommand>> feature. This works nicely for
     kill, pause/unpause, and stop. It works less nicely for
     rm, because the man page will show "...and rm the container"
     (a human might prefer to see "REMOVE the container"). Given
     the benefit of this cleanup, I think this is a fine tradeoff.

  2) I choose to include the "multiple times" text even on man pages
     where it wasn't present before. I tested to make sure it works.

  3) The #### line I choose is IMHO the best one.

Minor differences:

  * I believe the "remove the container" text in podman-kill
    and podman-stop is a copy/paste error. This PR fixes it.

  * The only differences between the cidfile.write texts is
    the #### line (my version is best) and a final period.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-22 12:17:20 -06:00
aefd0aed39 Merge pull request #15412 from edsantiago/docs_dedup_creds
Man pages: refactor common options: --creds
2022-08-22 14:16:44 -04:00
e9fe85d53a Merge pull request #15363 from rhatdan/secret
podman secret create -d alias --driver, inspect -f alias --format: Docker compatibity
2022-08-22 13:36:05 -04:00
bbbed3d822 Merge pull request #15369 from ht-vo/podman-save-validation
podman save: update --compress validation
2022-08-22 13:33:10 -04:00
bec7e8a645 Merge pull request #15381 from dfr/freebsd-enable
Enable event logging,  tunnel and ABI mode for FreeBSD
2022-08-22 13:30:09 -04:00
509407cac8 Merge pull request #15403 from sstosh/cgroups-cpuset
[CI:DOCS] Update how to enable resource limit delegation
2022-08-22 13:27:43 -04:00
898d37cebe Merge pull request #15409 from vrothberg/fix-15300
[CI:DOCS] elaborate on image lookups of foreign platforms
2022-08-22 13:24:59 -04:00
bd90818b02 Man pages: refactor common options: --creds
Refactor the --creds option. I went with the one in podman-pull

The main difference between all of them is the '####' line,
differences in the param descriptions. podman-pull had the
clearest one.

This is another one that hack/markdown-preprocess-review is
good for reviewing.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-22 09:39:37 -06:00
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
fbe2bd87b0 [CI:DOCS] elaborate on image lookups of foreign platforms
After pulling/creating an image of a foreign platform, Podman will
happily use it when looking it up in the local storage and will not
pull down the image matching the host platform.

As discussed in #12682, the reasoning for it is Docker compatibility and
the fact that user already rely on the behavior.  While Podman is now
emitting a warning when an image is in use not matching the local
platform, the documentation was lacking that information.

Fixes: #15300
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-22 16:38:20 +02: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
eee0ec97e8 Add quiet/q flag to podman secret ls
Add quiet/q flag to podman secret ls, which will print only the secret
ID.

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-08-22 09:13:00 -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
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