17345 Commits

Author SHA1 Message Date
998f834b04 quadlet: Change ReadOnly to default to enabled
This makees much more sense for typical service loads, and can
easily be reverted by `ReadOnly=no`.

Also updates and adds various tests for this.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-25 13:08:21 +02:00
0de98b1b6c quadlet tests: Run the tests even for (exected) failed tests
Otherwise the noimage test doesn't look at the stderr assertion.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-25 13:01:36 +02:00
8d41c7d2eb quadlet tests: Fix handling of stderr checks
We were looking at stdout, not stderr, and one of the testcases were
wrong.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-25 13:01:36 +02:00
9a44cfcfa6 Merge pull request #16278 from yzxiu/fix-build
Remove unused script file
2022-10-25 06:33:45 -04:00
5c3a22e8c0 Remove unused script file
[NO NEW TESTS NEEDED]

Signed-off-by: yaozhenxiu <946666800@qq.com>
2022-10-25 16:58:16 +08:00
c4ebe9e2ad notifyproxy: fix container watcher
The notify proxy has a watcher to check whether the container has left
the running state.  In that case, Podman should stop waiting for the
ready message to prevent a dead lock.  Fix this watcher but adding a
loop.

Fixes the dead lock in #16076 surfacing in a timeout.  The underlying
issue persists though.  Also use a timer in the select statement to
prevent the goroutine from running unnecessarily long

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-25 10:12:29 +02:00
221cfc6872 container/pod id file: truncate instead of throwing an error
Truncate the container and pod ID files instead of throwing an error.
The main motivation is to prevent redundant work when starting systemd
units.  Throwing an error when the file already exists is not preventing
races or file corruptions, so let's leave that to the user which in
almost all cases are generated (and tested) systemd units.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-25 09:37:35 +02:00
fdc8dac699 Merge pull request #16240 from edsantiago/preprocessor_xref
[CI:DOCS] markdown-preprocess: cross-reference where opts are used
2022-10-24 18:58:35 -04:00
51a9bc8205 Merge pull request #16191 from odra/fix-16180_ancestor-filter-regex
adding regex support to the ancestor ps filter function
2022-10-24 18:55:56 -04:00
c426fd9de2 Merge pull request #16274 from containers/dependabot/go_modules/github.com/BurntSushi/toml-1.2.1
build(deps): bump github.com/BurntSushi/toml from 1.2.0 to 1.2.1
2022-10-24 18:53:07 -04:00
2d558ef661 Merge pull request #16276 from edsantiago/logcollector_include_aardvark
[skip ci] logcollector: include aardvark-dns
2022-10-24 18:50:16 -04:00
63a8f9aeaa Merge pull request #16234 from jakecorrenti/system-df-verbose-format-usability
Fix `system df` issues with `-f` and `-v`
2022-10-24 11:44:09 -04:00
b7f05cef0b quadlet: Use the new podman create volume --ignore
This way we don't have to use the `ExecCondition=podman volume exist`,
which saves one process start.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-24 17:30:36 +02:00
734c435e01 Add podman volume create --ignore
This ignores the create request if the named volume already exists.
It is very useful when scripting stuff.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-24 17:30:31 +02:00
1b9447086f Merge pull request #16238 from vrothberg/fix-common-1200
use cached containers.conf
2022-10-24 08:32:04 -04:00
283ecd4132 Merge pull request #16270 from vrothberg/fix-16252
[CI:DOCS] kube refinements
2022-10-24 08:26:36 -04:00
4966f509bd logcollector: include aardvark-dns
(minor correction to package name)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-24 06:16:33 -06:00
6a9c7a580e build(deps): bump github.com/stretchr/testify from 1.8.0 to 1.8.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 12:09:23 +00:00
e081d22b0a build(deps): bump github.com/BurntSushi/toml from 1.2.0 to 1.2.1
Bumps [github.com/BurntSushi/toml](https://github.com/BurntSushi/toml) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/BurntSushi/toml/releases)
- [Commits](https://github.com/BurntSushi/toml/compare/v1.2.0...v1.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 12:09:16 +00:00
99dfb70950 Merge pull request #16268 from mikewwwperry/main
Closes: 15858 (podman system reset --force destroy machine)
2022-10-24 07:18:30 -04:00
622638b72b docs: generate systemd: point to kube template
Point to the kube template in the notes of `--new`.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-24 10:14:34 +02:00
c1de4d3ce2 docs: kube play: mention restart policy
Mention the default restart policy in the `kube play` docs.

Fixes: #16252
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-24 10:08:55 +02:00
0572e59725 Fixes: 15858 (podman system reset --force destroy machine)
Safe guards calls to os.RemoveAll in order to prevent calls from accidently
deleting the root file system in very strange edge cases. Did this by creating
GuardedRemoveAll and migrated machine os.RemoveAll calls to it.

Signed-off-by: Mike Perry <mike@bitbistro.org>
2022-10-23 13:01:53 -04:00
7a9c14d626 fix search flake
There's no guarantee that the searched image will be returned, so only
make sure that "alpine" is mentioned somewhere.

Fixes: #16248
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-21 14:52:43 +02:00
4e29ce2baf use cached containers.conf
Use `Default()` instead of re-loading containers.conf.

Also rework how the containers.conf objects are handled for parsing the
CLI.  Previously, we were conflating "loading the defaults" with
"storing values from the CLI" with "libpod may further change fields"
which ultimately led to various bugs and test failues.

To address the issue, separate the defaults from the values from the CLI
and properly name the fields to make the semantics less ambiguous.

[NO NEW TESTS NEEDED] as it's not a functional change.

Fixes: containers/common/issues/1200
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-21 14:03:14 +02:00
6c7ae378c3 adding regex support to the ancestor ps filter function
Signed-off-by: Leonardo Rossetti <lrossett@redhat.com>
2022-10-21 08:33:51 -03:00
e5032a8dea Fix system df issues with -f and -v
Fixed the issue of `--format` and `--verbose` flags being allowed in
combination with one another.

Implemented functionality for `--format json` or `--format '{{ json }}' `.

Implemented command-completion help for `--format`.

Fixes: #16204

Signed-off-by: Jake Correnti <jcorrenti13@gmail.com>
2022-10-20 23:12:09 -04:00
c9c2f644da markdown-preprocess: cross-reference where opts are used
In each options/foo.md, keep a list of where the option is used.
This will be valuable to anyone making future edits, and to
those reviewing those edits.

This may be a controversial commit, because those crossref lists
are autogenerated as a side effect of the script that reads them.
It definitely violates POLA. And one day, some kind person will
reconcile (e.g.) --label, using it in more man pages, and maybe
forget to git-commit the rewritten file, and CI will fail.

I think this is a tough tradeoff, but worth doing. Without this,
it's much too easy for someone to change an option file in a way
that renders it inapplicable/misleading for some podman commands.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-20 10:57:51 -06:00
77f8eaa73a Default qemu flags for Windows amd64
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2022-10-20 12:33:20 +03:00
a77ac5be83 Merge pull request #16219 from dfr/freebsd-install
Makefile: don't install systemd generator binaries on FreeBSD
2022-10-19 19:50:07 -04:00
834c6f3488 Merge pull request #16213 from containers/dependabot/go_modules/golang.org/x/text-0.4.0
build(deps): bump golang.org/x/text from 0.3.8 to 0.4.0
2022-10-19 19:47:19 -04:00
c02b0a1986 Merge pull request #16224 from containers/dependabot/go_modules/github.com/docker/docker-20.10.20incompatible
build(deps): bump github.com/docker/docker from 20.10.19+incompatible to 20.10.20+incompatible
2022-10-19 16:22:44 -04:00
e16800e8bf build(deps): bump golang.org/x/text from 0.3.8 to 0.4.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.8 to 0.4.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.8...v0.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-19 19:40:40 +00:00
5af1c42119 Merge pull request #16211 from vrothberg/fix-16135
system df: fix image-size calculations
2022-10-19 10:46:01 -04:00
7893207675 Merge pull request #16226 from mheon/bump_main_430
[CI:DOCS] Update main to reflect v4.3.0 release
2022-10-19 10:22:09 -04:00
a301ec164c Merge pull request #16223 from vrothberg/quadlet
move quadlet packages into pkg/systemd
2022-10-19 09:58:43 -04:00
d70ffdaeb0 Update main to reflect v4.3.0 release
Add release notes, change latest release link.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2022-10-19 09:15:22 -04:00
2936e60210 Merge pull request #16220 from edsantiago/testimage_iproute_socat
testimage: add iproute2 & socat, for pasta networking
2022-10-19 08:45:55 -04:00
b8c24bbb4b build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.19+incompatible to 20.10.20+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.19...v20.10.20)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-19 12:12:28 +00:00
f6053cea8d Merge pull request #15826 from umohnani8/minikube
Set up minikube for k8s testing
2022-10-19 07:43:38 -04:00
b4374f2bd9 move quadlet packages into pkg/systemd
Reduce the number of top-level packages in ./pkg by moving quadlet
packages under ./pkg/systemd.

[NO NEW TESTS NEEDED] - no functional change.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-19 13:38:27 +02:00
012260a771 Merge pull request #16210 from alexlarsson/quadlet-docs
Add man page for quadlet
2022-10-19 07:25:47 -04:00
34235b2726 system df: fix image-size calculations
Fix two bugs in `system df`:

1.  The total size was calculated incorrectly as it was creating the sum
    of all image sizes but did not consider that a) the same image may
    be listed more than once (i.e., for each repo-tag pair), and that
    b) images share layers.

    The total size is now calculated directly in `libimage` by taking
    multi-layer use into account.

2.  The reclaimable size was calculated incorrectly.  This number
    indicates which data we can actually remove which means the total
    size minus what containers use (i.e., the "unique" size of the image
    in use by containers).

NOTE: The c/storage version is pinned back to the previous commit as it
      is buggy.  c/common already requires the buggy version, so use a
      `replace` to force/pin.

Fixes: #16135
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-19 11:20:41 +02:00
34ee37b91e Add man page for quadlet
This adds the "podman-systemd.unit(5)" manpage that describes
the podman generators from a high level, and all the supported
options.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-19 10:30:31 +02:00
84ed9bd5e3 Fix small typo
Signed-off-by: Johan Van de Wauw <johan@gisky.be>
2022-10-19 07:00:18 +02:00
120a77e394 testimage: add iproute2 & socat, for pasta networking
PR #16141 introduces a new network type, "pasta". Its tests
rely on running 'ip -j' and socat in the container. Add them.

Also: bump to alpine 3.16.2 (from 3.16.0)
Also: clean up apk cache, this saves us 2MB+ in the image

Also (unrelated): clean up two broken uses of '$(< ...)' that
are causing tests to blow up under bats 1.8 on my laptop

New testimage is 20221018 and, sigh, is 12.7MB (up 4MB).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-18 11:50:48 -06:00
a30c9ef752 Merge pull request #16203 from dfr/freebsd-top
Add support for 'podman top' on FreeBSD
2022-10-18 10:52:43 -04:00
30e66d6003 Set up minikube for k8s testing
Install and set up minikube so that we can
create a k8s cluster for testing.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2022-10-18 10:51:27 -04:00
0a6d8b94c3 Makefile: don't install systemd generator binaries on FreeBSD
This isn't useful on FreeBSD since it does not use systemd.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-10-18 15:44:41 +01:00
25502d53bc Merge pull request #16198 from lsm5/containers-common-extra
[CI:BUILD] copr: podman rpm should depend on containers-common-extra
2022-10-18 09:27:11 -04:00