16801 Commits

Author SHA1 Message Date
bb0b1849d7 Merge pull request #16083 from dfr/freebsd-pod
Add support for 'podman pod' on FreeBSD
2022-10-10 15:30:01 +02:00
5908996738 Merge pull request #16084 from vrothberg/health-check-fix
health checks: make on-failure action retry aware
2022-10-07 19:27:42 +02:00
02040089a6 health checks: make on-failure action retry aware
Make sure that the on-failure actions only kick in once the health check
has passed its retries.  Also fix race conditions on reading/writing the
log.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-07 15:43:48 +02:00
2062ab9db4 Merge pull request #16072 from alexlarsson/events-shutdown-nosleep
libpod: Remove 100msec delay during shutdown
2022-10-07 13:16:56 +02:00
5b71070e42 libpod: Remove 100msec delay during shutdown
When shutting down the image engine we always wait for the image
even goroutine to finish writing any outstanding events. However,
the loop for that always waits 100msec every iteration. This means
that (depending on the phase) shutdown is always delayed up to 100msec.

This is delaying "podman run" extra much because podman is run twice
(once for the run and once as cleanup via a conmon callback).

Changing the image loop to exit immediately when a libimageEventsShutdown
(but first checking for any outstanding events to write) improves podman
run times by about 100msec on average.

Note: We can't just block on the event loop reading the shutdown event
anymore, we need to wait until it read and processed any outstanding
events, so we now send the shutdown event and then block waiting for the
channel to be closed by the event loop.

[NO NEW TESTS NEEDED]

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-07 10:13:26 +02:00
b4b7011392 libpod: Add support for 'podman pod' on FreeBSD
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-10-07 08:27:27 +01:00
7f8964a78f libpod: Factor out cgroup validation from (*Runtime).NewPod
This moves the code to runtime_pod_linux.go since cgroups are
platform-specific.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-10-07 08:27:27 +01:00
d71160539d libpod: Move runtime_pod_linux.go to runtime_pod_common.go
Most of the code can be shared with other unix-like platforms.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-10-07 08:27:08 +01:00
c35a70d211 specgen/generate: Avoid a nil dereference in MakePod
The value of p.PodSpecGen.InfraContainerSpec.ResourceLimits can be nil
on FreeBSD.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-10-07 08:26:10 +01:00
e187b9711d libpod: Factor out cgroups handling from (*Pod).refresh
This moves the cgroup code to pod_internal_linux.go and adds a no-op
stub for FreeBSD.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-10-07 08:26:10 +01:00
d33a31524a Merge pull request #16057 from mheon/fix_16046
Clean up when stopping pods
2022-10-07 00:48:11 +02:00
36558828ae Merge pull request #16073 from iamkirkbater/osx-contrib-linkback
[CI:DOCS] MacOS contributing docs link
2022-10-06 21:34:36 +02:00
ab3d3f818d Merge pull request #16067 from tyler92/fix-directory-or-create
Create a full path to a directory when DirectoryOrCreate is used
2022-10-06 19:43:47 +02:00
713428df0b Adds a link to OSX docs in CONTRIBUTING.md
This adds a small bit of text so that new OSX devs can more easily find
the MacOS specific contributing guidelines.

Signed-off-by: Kirk Bater <kirk.bater@gmail.com>
2022-10-06 13:28:32 -04:00
eb85012064 Merge pull request #16070 from boaz0/fix_system_service_uri
Return error in podman system service if URI scheme is not unix/tcp
2022-10-06 18:34:47 +02:00
8b189c0a06 Create full path to a directory when DirectoryOrCreate is used with play kube
Signed-off-by: Mikhail Khachayants <tyler92@inbox.ru>
2022-10-06 15:37:36 +03:00
d4f622da7d Return error in podman system service if URI scheme is not unix/tcp
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2022-10-06 14:47:03 +03:00
13a1c55d3f Merge pull request #16034 from rhatdan/VENDOR
Update vendor of containers/buildah v1.28.0
2022-10-06 04:31:13 +02:00
94cfe7b7da Merge pull request #15910 from edsantiago/cron_treadmill
Proof of concept: nightly dependency treadmill
2022-10-06 04:28:12 +02:00
fce7a4f358 Merge pull request #16061 from edsantiago/docs_dedup_time
[CI:DOCS] Man pages: refactor common options: --time
2022-10-06 04:25:23 +02:00
51c3578415 Man pages: refactor common options: --time
Only in container/pod stop/rm/restart man pages; the others
(volume-rm, network-rm, system-service) are too different to refactor.

Mostly an easy one, no manual reconciliation needed apart from
the pod-vs-container difference.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-05 09:59:01 -06:00
cc609e52bd Merge pull request #16055 from edsantiago/docs_dedup_pod
[CI:DOCS] Man pages: refactor common options: --pod
2022-10-05 16:13:48 +02:00
ab2f3cf54d Merge pull request #16029 from andrei-n-cosma/kube-default-network
Add pods created by play kube to a default network
2022-10-05 16:08:37 +02:00
e136376d1f Clean up when stopping pods
We have a test to verify that init containers in pods are
deleted when the `--init-ctr=once` option is specified. The test
creates two containers, one of them an init container, starts the
pod, stops the pod, and restarts the pod, checking for the
presence of a file created by the init container during the
second start. We're seeing a race where the file still exists,
which I'm fairly certain comes down to the SHM mount not being
cleaned up after the pod is stopped.

Fortunately, we already have code to do this - just flip the bool
that controls cleanup from false to true.

[NO NEW TESTS NEEDED] Fixes a difficult to reproduce race
condition.

Fixes #16046

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-10-05 09:21:16 -04:00
3451aac35e Man pages: refactor common options: --pod
Only between podman-create and -run; the other meanings
of --pod are too different. This almost didn't feel worth
refactoring, except the podman-run version fixed a word
and added a possibly important note about infra containers.
I went with the podman-run version.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-05 04:27:47 -06:00
84c85f4d94 Merge pull request #16049 from edsantiago/docs_dedup_features
[CI:DOCS] Man pages: refactor common options: --features
2022-10-05 12:24:24 +02:00
6cf34000b9 Merge pull request #16050 from baude/bz2131836
Prevent nil pointer deref in GetImage
2022-10-05 02:51:48 +02:00
aaa9f4ea90 Prevent nil pointer deref in GetImage
Trying to print the image id on a failed inspect will result in a nil
pointer panic because the image will be nil.  Replace image.id with the
image name which is defined as a string without the use of inspect.

Fixes: bz#2131836

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-10-04 15:31:00 -05:00
f250560a80 Add pods created by kube play to a default network
In order to allow pods to reach other pods (as in Kubernetes) they all
need to be added to the same network. A network is created (if it
doesn't exist) and pods created by play-kube are added to that network.
When network options are passed to kube command the pods are not
attached to the default kube network.

Signed-off-by: Andrei Natanael Cosma <andrei@intersect.ro>
2022-10-04 21:59:57 +02:00
26468c2274 Man pages: refactor common options: --features
Easy one: text was already identical between both files.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-04 11:14:53 -06:00
0330d1abed Merge pull request #16032 from edsantiago/docs_dedup_variant
[CI:DOCS] Man pages: refactor common options: --variant
2022-10-04 19:08:25 +02:00
ad2ae8e574 Merge pull request #16045 from containers/dependabot/go_modules/github.com/opencontainers/image-spec-1.1.0-rc2
build(deps): bump github.com/opencontainers/image-spec from 1.1.0-rc1 to 1.1.0-rc2
2022-10-04 16:09:06 +02:00
2f6c911d62 build(deps): bump github.com/opencontainers/image-spec
Bumps [github.com/opencontainers/image-spec](https://github.com/opencontainers/image-spec) from 1.1.0-rc1 to 1.1.0-rc2.
- [Release notes](https://github.com/opencontainers/image-spec/releases)
- [Changelog](https://github.com/opencontainers/image-spec/blob/main/RELEASES.md)
- [Commits](https://github.com/opencontainers/image-spec/compare/v1.1.0-rc1...v1.1.0-rc2)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/image-spec
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-04 12:17:51 +00:00
43a8f1ae55 Merge pull request #16037 from cevich/fix_branch_go_check
[CI:BUILD] Cirrus: Fix tag & branch go checks failing
2022-10-03 20:27:24 +02:00
62bc8e3a18 Cirrus: Fix tag & branch go checks failing
When running on a branch or tag, `req_env_vars()` will call `exit(1)`
because `$CIRRUS_PR` is empty (as expected).  The original intention was
to simply skip language checks on non-PRs.  Fix the condition to match.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-10-03 12:23:46 -04:00
11e83a0952 Update vendor of containers/buildah v1.28.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-10-03 10:17:14 -04:00
eaa3892623 Man pages: refactor common options: --variant
Two different texts, split into two .md files. Nontrivial, but
still easy to review because the text is unchanged.

I was unable to reconcile either version with podman-build,
so that file remains with a separate version.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-03 05:07:45 -06:00
ddf36e0649 Merge pull request #16028 from edsantiago/docs_dedup_compression-format
[CI:DOCS] Man pages: refactor common options: --compression-format
2022-10-03 12:47:20 +02:00
5da3e1187e Merge pull request #15846 from jakecorrenti/pod-logs-latest
`podman pod logs -l` no longer panics
2022-10-03 12:44:39 +02:00
9bafd9c462 Man pages: refactor common options: --compression-format
Easy one: text was already identical across both files.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-02 11:18:54 -06:00
84aff621f5 Merge pull request #16016 from Luap99/netns-cleanup
cleanup: always delete netns mount
2022-10-01 03:57:02 +02:00
63c69f3b15 Merge pull request #15978 from iamkirkbater/add-brew-to-issue-template
[CI:DOCS] Adds brew info podman to issue template.
2022-10-01 03:54:16 +02:00
f4dd082549 Merge pull request #16015 from mtrmac/pgzip-update
Update for https://github.com/klauspost/pgzip/pull/50
2022-10-01 03:51:43 +02:00
eb7f54ef6f cleanup: always delete netns mount
We should not keep the netns if there was a cleanup problem. Deleting
the netns will also delete the virtual links inside and thus make the IPs
available again for the next use.

context: https://github.com/containers/netavark/issues/302

[NO NEW TESTS NEEDED] This is very hard to trigger reliable and it would
need to work with cni and netavark. This mostly happens because of
specic bugs but those will be fixed and then this test would fail.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-09-30 20:38:20 +02:00
a2581abbf9 Adds brew info podman to issue template.
Just a quick little addition to provide the command to get the package
info from brew for those who might not know.

Signed-off-by: Kirk Bater <kirk.bater@gmail.com>
2022-09-30 14:30:56 -04:00
73c8416c35 Update for https://github.com/klauspost/pgzip/pull/50
... to fix reads of compressed data by docker-archive:

> go get github.com/klauspost/pgzip@master
> make vendor

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-09-30 20:00:00 +02:00
0a394876be Merge pull request #16010 from vrothberg/container-inspect
container inspect: include image digest
2022-09-30 17:18:57 +02:00
3feb56e159 Merge pull request #16008 from rhatdan/VENDOR
Update vendor containers/(common,image)
2022-09-30 17:16:19 +02:00
304dfe80fe Merge pull request #15999 from edsantiago/docs_dedup_sign-passphrase-file
[CI:DOCS] Man pages: Refactor common options: --sign-passphrase-file
2022-09-30 17:13:51 +02:00
226977fafb Merge pull request #16001 from cevich/image_readme
[CI:DOCS] Add quay-description update reminder
2022-09-30 15:28:15 +02:00