16850 Commits

Author SHA1 Message Date
40fcbdc40a Merge pull request #16174 from vrothberg/tree-status
hack/tree_status.sh: print diff at the end
2022-10-14 05:48:32 -04:00
5113343a5d hack/tree_status.sh: print diff at the end
Print the diff at the end of the report to help better understand what's
going on.

```
tree is dirty, please run "make vendor" and commit all changes.

 M go.mod
 M go.sum
 M hack/tree_status.sh
 M vendor/github.com/containers/storage/store.go
 M vendor/modules.txt

---------------------- Diff below ----------------------

diff --git a/go.mod b/go.mod
index e36d3fb95c57..167d769c378f 100644
--- a/go.mod
+++ b/go.mod
@@ -17,7 +17,7 @@ require (
        github.com/containers/image/v5 v5.23.0
        github.com/containers/ocicrypt v1.1.6
        github.com/containers/psgo v1.7.3
-       github.com/containers/storage v1.43.1-0.20221013143630-714f4fc6e80e
+       github.com/containers/storage v1.43.1-0.20221014072257-a144fee6f51c
        github.com/coreos/go-systemd/v22 v22.4.0
        github.com/coreos/stream-metadata-go v0.0.0-20210225230131-70edb9eb47b3
        github.com/cyphar/filepath-securejoin v0.2.3
```

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-14 09:39:37 +02:00
0321165474 Merge pull request #16159 from vrothberg/ebusy-mcflakeface
vendor containers/storage@main
2022-10-14 02:59:08 -04:00
0571001d3f Merge pull request #16164 from edsantiago/docs_dedup_accumulated_cleanup
[CI:DOCS] Man pages: refactor common options (misc)
2022-10-13 18:01:23 -04:00
8c76738571 Man pages: refactor common options (misc)
Accumulated cleanup from the man-page deduplication effort.
Various minor things that slipped.

 --publish-all : remove duplicate "default is false" (toth @dilyanpalauzov)

 --shm-size    : rephrase 'you' and 'y'all'

 --tls-verify  : make narrower, add asterisks to true/false,
                 and linkify containers-registries.conf

  --volume     : incorporate feedback from @mheon

  rename pid.md to pid.container.md, because there's a pid.pod.md
  for the --pid option used in pod-related man pages.

  ...and some whitespace, comma, other minor edits

Fixes: #15356

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-13 12:14:28 -06:00
24b586e7d6 Merge pull request #16160 from edsantiago/docs_dedup_detach-keys
[CI:DOCS] Man pages: Refactor common options: --detach-keys
2022-10-13 14:09:47 -04:00
617a2de3a4 Man pages: Refactor common options: --detach-keys
Refactored among all files that mentioned it.

DANGER WILL ROBINSON! REVIEW CAREFULLY! Here are two major
decisions I made:

  1) Look at the text for podman-run, in particular the "" text.
     It currently says "will use the default". As best I can
     tell this is not true, so I changed it to "will disable"
     which matches all the other commands.

  2) The "containers.conf" text, I decided, applies to all
     commands, not just podman-run (it was only present in
     podman-run). If this is not the case, please yell.

Other changes are cosmetic formatting stuff, asterisks end newlines.
Hard to review with hack/markdown-preprocess-review, because all
the text is one horrible long line instead of 80-char breaks.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-13 10:42:50 -06:00
2cbb1d3daf Merge pull request #16158 from edsantiago/docs_dedup_attach
[CI:DOCS] Man pages: refactor common options: --attach
2022-10-13 12:33:45 -04:00
629fb165ad Merge pull request #16155 from containers/dependabot/go_modules/github.com/fsnotify/fsnotify-1.6.0
build(deps): bump github.com/fsnotify/fsnotify from 1.5.4 to 1.6.0
2022-10-13 11:30:04 -04:00
69815a7f1c vendor containers/storage@main
Mainly to pull in fixes for #1382 which is impossible to reproduce
locally so let's optimistically mark it as fixed and reopen if needed
in the future.

Fixes: #1382
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-13 16:54:14 +02:00
a584bb4e74 Man pages: refactor common options: --attach
Only between podman-create and -run; podman-start was too
different. (But please look into it, maybe there's a way
to reconcile the diffs).

Very minor formatting changes made to reconcile the two.
Easy to review using hack/markdown-preprocess-review

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-13 08:35:48 -06:00
687b5a2298 Merge pull request #16134 from edsantiago/docs_dedup_annotation
[CI:DOCS] Man pages: refactor common options: --annotation (manifest)
2022-10-13 10:34:45 -04:00
0689089398 Merge pull request #16151 from vrothberg/debug-16142
KillContainer: improve error message
2022-10-13 10:24:06 -04:00
0510dd2f1e build(deps): bump github.com/fsnotify/fsnotify from 1.5.4 to 1.6.0
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.5.4 to 1.6.0.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.5.4...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-13 12:09:26 +00:00
1d18dc2671 KillContainer: improve error message
To improve the error message reported in #16142 where the container is
reported to be in the wrong state but we do not know which.  This is not
a fix for #16142 but will hopefully aid in better understanding what's
going on if it flakes again.

[NO NEW TESTS NEEDED] as hitting the condition is inherently racy.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-13 12:22:34 +02:00
dfb4364dc3 Merge pull request #16105 from containers/dependabot/go_modules/github.com/containers/ocicrypt-1.1.6
build(deps): bump github.com/containers/ocicrypt from 1.1.5 to 1.1.6
2022-10-13 05:26:03 -04:00
8356621249 Merge pull request #16125 from containers/dependabot/go_modules/github.com/spf13/cobra-1.6.0
build(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.0
2022-10-12 16:13:56 -04:00
c1d832d88b Merge pull request #16118 from vrothberg/proxy-mcproxface
play kube: notifyproxy: listen before starting the pod
2022-10-12 16:13:35 -04:00
5da54e1834 docs: add missing options
The new cobra update fixed a bug which caused some options to not be
included in --help when there was already a option with the same name
on a parent command.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-10-12 17:00:27 +02:00
a344928c01 Merge pull request #16127 from containers/dependabot/go_modules/golang.org/x/text-0.3.8
build(deps): bump golang.org/x/text from 0.3.7 to 0.3.8
2022-10-12 10:57:38 -04:00
57ddeffd0f Man pages: refactor common options: --annotation (manifest)
[Note: I already refactored --annotation for container-related
 commands; this one is for manifest-related commands]

This one needed reconciling: one man page said "newly added image",
the other said "specified image", I just reduced that to "image".
If that's not cool, any suggestions on how to make it better? Or,
just reject this PR, we can live with this duplication.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-12 08:54:04 -06:00
b13939bb6f Merge pull request #16123 from alexlarsson/less-json-dup
Avoid unnecessary calls to Container.Config() and Container.Spec()
2022-10-12 10:45:47 -04:00
6e6280d233 Merge pull request #16071 from edsantiago/docs_dedup_os_version
[CI:DOCS] Man pages: refactor common options: --os-version
2022-10-12 10:39:52 -04:00
065cc94799 Merge pull request #16109 from SoMuchForSubtlety/play-kube-binary-data
play kube: add support for configmap binaryData
2022-10-12 10:31:47 -04:00
14d459cf9f Merge pull request #16126 from containers/dependabot/go_modules/github.com/onsi/gomega-1.22.1
build(deps): bump github.com/onsi/gomega from 1.20.2 to 1.22.1
2022-10-12 10:25:43 -04:00
695a848968 Merge pull request #16078 from rhatdan/main
Revert "cmd/podman: add support for checkpoint images"
2022-10-12 10:12:41 -04:00
2a9df07f52 Merge pull request #16129 from edsantiago/fix-16075
system tests: health-on-failure: fix broken logic
2022-10-12 10:01:01 -04:00
b256f5f587 build(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.5.0...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

PH: manually update the completion scripts and fix deprecated function
call.

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-10-12 14:54:19 +02:00
f16e9acc64 system tests: health-on-failure: fix broken logic
Basically, in the timeout loop where we checked for new CID
on the restarted container, we were running 'podman inspect'
(not 'inspect --format ID'), and comparing full hundred-line
output against single-line CID string.

While I'm in here, add 'c_' prefix to container to make it
easier for my old eyes to recognize "oh, that's a container name"
vs "is that a name? a SHA? a woozle?"

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-12 06:29:59 -06:00
7ff8c8f796 build(deps): bump golang.org/x/text from 0.3.7 to 0.3.8
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.7...v0.3.8)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-12 12:10:32 +00:00
00adeda804 build(deps): bump github.com/onsi/gomega from 1.20.2 to 1.22.1
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.20.2 to 1.22.1.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.20.2...v1.22.1)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-12 12:10:17 +00:00
d08b4c1339 ContainerEngine.SetupRootless(): Avoid calling container.Config()
This is a very expensive call as it deep duplicates the Config, and
we just need to read a single member, so use ConfigNoCopy() instead.

[NO NEW TESTS NEEDED] Just minor performance effects

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-12 13:45:49 +02:00
03c5f9d02f Container filters: Avoid use of ctr.Config()
This is a very expensive function as it does a deep copy. Instead
use pre-existing accessors like ctr.CreatedTime() where they exist
and ctr.ConfigNoCopy() where not.

[NO NEW TESTS NEEDED] Just minor performance effects

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-12 13:45:49 +02:00
af38c79e36 Avoid unnecessary calls to Container.Spec()
This call does a deep copy, which is only needed if you want
to modify the return value. Instead we use ctr.ConfigNoCopy().Spec
which is just a pointer dereference.

[NO NEW TESTS NEEDED] Just minor performance effects

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-12 13:45:49 +02:00
55191ecc20 Add and use Container.LinuxResource() helper
This gets c.config.Spec.Linux.Resources, with some nil checks.
Using this means less open coding of the nil-checks, but also the
existing user of this field in moveConmonToCgroupAndSignal() was
using ctr.Spec().Linux.Resources instead, and the Spec() call
is very expensive.

[NO NEW TESTS NEEDED] Just minor performance effects

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-12 13:45:49 +02:00
1db0735068 Merge pull request #16099 from na0x2c6/update-docs-for-podman-machine
[CI:DOCS] Man pages: Add mention of behavior due to XDG_CONFIG_HOME
2022-10-12 07:35:46 -04:00
7b84a3a434 play kube: notifyproxy: listen before starting the pod
Starting listening for the READY messages on the sdnotify proxies before
starting the Pod.  Otherwise, we may be missing messages.

[NO NEW TESTS NEEDED] as it's hard to test this very narrow race.

Related to but may not be fixing #16076.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-12 11:36:04 +02:00
e5ace19aa2 Merge pull request #16117 from alexlarsson/container-terminal-helper
Add and use libpod/Container.Terminal() helper
2022-10-11 16:18:02 -04:00
2bee2216ce play kube: add support for configmap binaryData
Signed-off-by: Jakob Ahrer <jakob@ahrer.dev>
2022-10-11 18:05:12 +02:00
1038f063e0 Add and use libpod/Container.Terminal() helper
This just gets ctr.config.Spec.Process.Terminal with some null checks,
allowing several places that open-coded this to use the helper.

In particular, this helps the code in
pkg/domain/infra/abi/terminal.StartAttachCtr(), that used to do:
`ctr.Spec().Process.Terminal`, which looks fine, but actually causes
a deep json copy in the `ctr.Spec()` call that takes over 3 msec.

[NO NEW TESTS NEEDED] Just minor performance effects

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-11 17:17:11 +02:00
619366de93 Merge pull request #16088 from alexlarsson/wait-on-conmon-without-sleep
Avoid unnecessary timeout of 250msec when waiting on container shutdown
2022-10-11 10:17:11 -04:00
406616ddc1 Merge pull request #16111 from vrothberg/healthcheck-fixes
healthcheck: fix --on-failure=stop
2022-10-11 10:06:05 -04:00
b47b48fd03 Revert "Add checkpoint image tests"
This reverts commit bbe1063a5ae681ad04a049518c6087421b919f2e.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-10-11 10:04:55 -04:00
f437078d2b Revert "cmd/podman: add support for checkpoint images"
This reverts commit 9c3d8bb494f358ecff785ba81a58f2e05f1a98a1.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-10-11 07:55:16 -04:00
4dd67272ed healthcheck: fix --on-failure=stop
Fix the "stop" on-failure action by not removing the transient systemd
timer and service during container stop.  Removing the service will
in turn cause systemd to terminate the Podman process attempting to
stop the container and hence leave it in the "stopping" state.

Instead move the removal into the restart sequence.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-11 13:01:07 +02:00
bb0b1849d7 Merge pull request #16083 from dfr/freebsd-pod
Add support for 'podman pod' on FreeBSD
2022-10-10 15:30:01 +02:00
d4052c1aa9 Man pages: Add mention of behavior due to XDG_CONFIG_HOME
When the `XDG_CONFIG_HOME` environment variable is changed, for example,
to switch development contexts, the behavior of the podman-machine can
be confusing. The documentation had not mentioned this, and this commit
adds these mentions.

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

Reviewed-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Naoaki Ueda <nao@uedder.com>
2022-10-10 22:24:09 +09:00
b5950a9189 build(deps): bump github.com/containers/ocicrypt from 1.1.5 to 1.1.6
Bumps [github.com/containers/ocicrypt](https://github.com/containers/ocicrypt) from 1.1.5 to 1.1.6.
- [Release notes](https://github.com/containers/ocicrypt/releases)
- [Commits](https://github.com/containers/ocicrypt/compare/v1.1.5...v1.1.6)

---
updated-dependencies:
- dependency-name: github.com/containers/ocicrypt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 12:16:08 +00:00
c34b5be990 Avoid unnecessary timeout of 250msec when waiting on container shutdown
When you run "podman run foo" we attach to the container, which essentially
blocks until the container process exits. When that happens podman immediately
calls Container.WaitForExit(), but at this point the exit value has not
yet been written to the db by conmon. This means that we almost always
hit the "check for exit state; sleep 250msec" loop in WaitForExit(),
delaying the exit of podman run by 250 msec.

More recent kernels (>= 5.3) supports the pidfd_open() syscall, that
lets you open a fd representing a pid and then poll on it to wait
until the process exits. We can use this to have the first sleep
be exactly as long as is needed for conmon to exit (if we know its pid).
If for whatever reason there is still issues we use the old sleep loop
on later iterations.

This makes "time podman run fedora true" about 200msec faster.

[NO NEW TESTS NEEDED]

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-10 11:43:02 +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