17126 Commits

Author SHA1 Message Date
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
cbff46c121 Merge pull request #16209 from jnohlgard/rootless-network
[CI:DOCS] Podman image: Set default_sysctls to empty for rootless containers
2022-10-18 09:22:15 -04:00
cadb64d32d [CI:BUILD] copr: podman rpm should depend on containers-common-extra
containers-common now has a new `-extra` subpackage which handles
dependencies common to podman and buildah and also depends on
the main package `containers-common` itself.

The podman-next copr rebuilds containers-common from the rawhide branch
of dist-git so it will always have the latest version and will also
supersede the official containers-common packages (except on rawhide
where it will be equal).

Fixes: #16137

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-10-18 14:02:15 +05:30
02bb7c2cf3 Podman image: Set default_sysctls to empty for rootless containers
Avoids the error "Error: error preparing container xyz... for attach:
crun: open /proc/sys/net/ipv4/ping_group_range: Read-only file system:
OCI runtime error" when using `podman run --net bridge` inside rootful
Podman running without --security-opt unmask=ALL (or 'unmask=/proc/*')

Signed-off-by: Joakim Nohlgård <joakim@nohlgard.se>
2022-10-18 09:27:20 +02:00
2fb7218e63 Merge pull request #16207 from rhatdan/reference
Reference
2022-10-17 17:16:14 -04:00
1a60b30e51 Merge pull request #16035 from alexlarsson/quadlet
Initial quadlet version integrated in golang
2022-10-17 15:13:39 -04:00
234b2230ef Don't use github.com/docker/distribution
containers/image/v5/docker/reference has same content, but
less overhead.

Partial fix for: https://github.com/containers/podman/issues/16205

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-10-17 14:42:36 -04:00
9e6b37ec1d libpod: Add support for 'podman top' on FreeBSD
This simply runs ps(1) on the host and filters for processes inside the
container.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-10-17 16:43:53 +01:00
21081355a7 libpod: Factor out jail name construction from stats_freebsd.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-10-17 15:33:18 +01:00
b82b27cc48 pkg/util: Add pid information descriptors for FreeBSD
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-10-17 15:33:04 +01:00
e7d6b681aa Merge pull request #16165 from rhatdan/dups
Allow volume mount dups, iff source and dest dirs
2022-10-17 10:11:09 -04:00
62bb59d3b0 Initial quadlet version integrated in golang
Based on the initial port in https://github.com/containers/quadlet/pull/41

This contains the unit tests and the testcases from the C code as well
as modification to the podman spec file based on what the quadlet
spec file looks like, producing a podman-quadlet subpackage.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-17 15:56:03 +02:00
80a6017e2e Merge pull request #16182 from dfr/freebsd-pidfd
libpod: Factor out the call to PidFdOpen from (*Container).WaitForExit
2022-10-17 09:55:43 -04:00
8fef5eb12c Merge pull request #16170 from edsantiago/manpage_generic_include
[CI:DOCS] markdown-preprocess: add generic include mechanism
2022-10-17 09:53:06 -04:00
cd0c9494dd Merge pull request #16011 from vrothberg/lint
bump golangci-lint to v1.49.0
2022-10-17 06:17:34 -04:00
29d0cbe08f Merge pull request #16188 from eriksjolund/fix_issue_15927
rootless: fix return value handling
2022-10-17 04:07:33 -04:00
44bac51fca bump golangci-lint to v1.49.0
Motivated to have a working `make lint` on Fedora 37 (beta).
Most changes come from the new `gofmt` standards.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-17 09:19:41 +02:00
45fea91a61 Merge pull request #16189 from rhatdan/VENDOR
Update vendor containers/(common,image,storage)
2022-10-16 12:53:32 -04:00
94d3b6572c Merge pull request #16176 from vrothberg/fix-16149
generate systemd: set --stop-timeout for stopping containers
2022-10-16 09:39:04 -04:00
01a3245d7d Update vendor containers/(common,image,storage)
Fixes: https://github.com/containers/podman/issues/16150

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-10-15 09:42:51 -04:00