15741 Commits

Author SHA1 Message Date
1cf19843d0 Merge pull request #14672 from sbmthakur/patch-1
[CI:DOCS] Fix typos
2022-06-21 15:54:20 +00:00
4a981c490b allow filter networks by dangling status
add the ability to filter networks by their dangling status via:

`network ls --filter dangling=true/false`

Fixes: #14595
Signed-off-by: Carlo Lobrano <c.lobrano@gmail.com>
2022-06-21 17:50:55 +02:00
050693b2e7 bump github.com/spf13/cobra from 1.4.0 to 1.5.0
Update cobra to latest version. Remove workaround for podman -h.
Also regenerate the completion scripts.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-21 17:17:06 +02:00
c8032b9911 Merge pull request #14680 from containers/dependabot/go_modules/github.com/stretchr/testify-1.7.4
Bump github.com/stretchr/testify from 1.7.2 to 1.7.4
2022-06-21 14:19:58 +00:00
ecf225019a rootless: attempt to join all specified paths
when there are multiple paths specified, attempt to join them all
before returning an error.  Previously we were failing on the first
pid found.

[NO NEW TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-06-21 15:50:52 +02:00
9afd5e31c8 rootless: improve error messages
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-06-21 15:50:52 +02:00
99258703a7 rootless: do not ignore reexec_in_user_namespace_wait errors
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-06-21 15:49:05 +02:00
cfba09f682 Bump github.com/stretchr/testify from 1.7.2 to 1.7.4
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.2 to 1.7.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.2...v1.7.4)

---
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-06-21 12:10:35 +00:00
1f539a2641 api: show the memory limit specified for the container
use the memory limit specified for the container instead of reading it
from the cgroup.  It is not reliable to read it from the cgroup since
the container could have been moved to a different cgroup and in
general the OCI runtime might create a sub-cgroup (like crun does).

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-06-21 12:06:33 +02:00
7f82c43231 Fix typos
Signed-off-by: Shubham Thakur <sbmthakur@gmail.com>
2022-06-20 20:40:10 -05:00
f451b68dfa podman pod create --shm-size
expose the --shm-size flag to podman pod create and add proper handling and inheritance
for the option.

resolves #14609

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-06-20 10:25:00 -04:00
fe8e536328 Merge pull request #14556 from sstosh/system-prune-network
podman system prune support prune unused networks
2022-06-20 13:57:42 +00:00
46da7bc78f podman machine init --now: respect proxy envs
podman machine start contains more logic than just the simple vm.Start()
call. Instead of duplicating this into inti we just call start().

[NO NEW TESTS NEEDED] I have no way to test this right now.

Fixes #14640

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-20 15:36:00 +02:00
bb5bd09ead API: containers/json always set application/json content type
When we return no containers we just return `[]` but we still have to keep
the content type header `application/json` so external tools can correctly
parse the output.

Fixes #14647

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-20 14:07:56 +02:00
55052c6b98 Merge pull request #14657 from eriksjolund/rewrite_env_docs
[CI:DOCS] Rewrite --env docs
2022-06-19 17:16:32 +00:00
2827140907 [CI:DOCS] "setup" -> "set up" in source code comments
* Replace "setup", "lookup" with "set up", "look up"
  when used as verbs.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-06-19 12:18:08 +02:00
dda68201a4 [CI:DOCS] Rewrite --env docs
* Add docs about trailing * functionality in podman-exec.1.md

* Rewrite --env description in podman-create.1.md and podman-run.1.md

* Rewrite the --env examples in podman-create.1.md and podman-run.1.md

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-06-19 09:56:46 +02:00
ff06c791ad Merge pull request #14637 from edigaryev/fix-matrix-expansion
.cirrus.yml: fix matrix expansion by properly merging YAML mappings
2022-06-17 15:58:57 +00:00
3b03bd3f78 Merge pull request #14592 from cevich/more_fix_404
Cirrus: Fix build. dep. missed in #14521
2022-06-17 15:23:44 +00:00
948866e8a0 Update to use gopkg.in/yaml.v3
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-06-17 11:03:08 -04:00
04de0dabce Merge pull request #14599 from rhatdan/VENDOR
Vendor in latest containers/image
2022-06-17 14:59:17 +00:00
075c9ac455 .cirrus.yml: fix matrix expansion by properly merging YAML mappings
Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
2022-06-17 15:02:01 +03:00
8090445762 vendor in latests containers/image
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-06-17 06:10:24 -04:00
c936d1e611 Merge pull request #14622 from rhatdan/storage
Vendor in latest containers/storage
2022-06-17 07:54:59 +00:00
ce3d0954a5 Open Windows tutorial after MSI installation
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-06-16 23:46:24 -05:00
05fc5959ec Merge pull request #14627 from cdoern/lint-fix
linter fix from #14299
2022-06-16 23:14:52 +00:00
a3b3f1723b linter fix from #14299
[NO NEW TESTS NEEDED] podman pod clone somehow snuck by the new linter code that went in while it was in flight
fix that here

Signed-off-by: cdoern <cdoern@redhat.com>
2022-06-16 16:32:01 -04:00
2af8851787 Merge pull request #14299 from cdoern/podClone
implement podman pod clone
2022-06-16 20:05:27 +00:00
065302bd58 Cirrus: Fix build. dep. missed in #14521
This is causing the remote system tests to fail when run on on `main`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-06-16 14:28:56 -04:00
5cba4dc2e4 Merge pull request #14619 from Luap99/help
fix "podman -h" help output
2022-06-16 18:06:29 +00:00
3af047b63d Vendor in latest containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-06-16 14:05:43 -04:00
8765adb756 Merge pull request #14621 from mheon/api_sec_notice
[CI:DOCS] Make it clear the REST API could be a security issue
2022-06-16 16:37:40 +00:00
e6fe06f591 Merge pull request #14600 from edsantiago/argh
system tests: avoid rmi -a ... plus cleanup
2022-06-16 16:01:45 +00:00
09c462d735 fix "podman -h" help output
`podman -h` currently returns an error:
`Error: pflag: help requested`

This bug was introduced in 44d037898ebc, the problem is that we wrap the
error and cobra lib checks with `==` for this one and not errors.Is().
I have a PR upstream to fix this but for now this also works.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-16 16:59:47 +02:00
e3a0deadce Merge pull request #14613 from kolyshkin/fix-410-selinux
test/system/410-selinux: fix for newer runc
2022-06-16 14:33:23 +00:00
6c5e1420e2 Make it clear the REST API could be a security issue
The manpage for `podman system service` should mention that this
is not safe for external consumption unless you are comfortable
giving anyone who accesses it full root on the system.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-06-16 09:56:44 -04:00
e2255d9a68 Merge pull request #14614 from clobrano/typos/contributing
[CI:DOCS] fix typos in prerequisites for Fedora and make binaries sections
2022-06-16 13:23:29 +00:00
82936d8988 Merge pull request #14610 from shanesmith/fix-machine-start-interrupt
Fix interrupting machine start leaves the machine unstartable
2022-06-16 12:12:09 +00:00
28a38617ee [CI:DOCS] fix typos in prerequisites for Fedora and make binaries sections
- prerequisites in Fedora section has libseccomp-devel.x86_64 named twice
- bin/podman flag "-h" does not work, "--help" is required

Signed-off-by: Carlo Lobrano <c.lobrano@gmail.com>
2022-06-16 10:46:14 +02:00
a90dac9454 Merge pull request #14605 from Luap99/update-golangci-lint
golangci-lint: update to v1.46.2
2022-06-16 07:32:58 +00:00
78c149ff91 Merge pull request #14529 from edsantiago/testimage_with_consistent_timestamps
system test image: bump to 20220615
2022-06-16 07:24:49 +00:00
a6226540e2 Merge pull request #14570 from Clivar/fix-windows-ssh-key-creation
Fix: Use absolute path to WSL binary to create ssh keys for `machine init` on Windows (Issue #14416)
2022-06-16 07:21:04 +00:00
b3f094a61c test/system/410-selinux: fix for newer runc
With runc 1.1, we have the following failure:

 # #|     FAIL: podman emits useful diagnostic on failure
 # #| expected: 'Error.*: OCI runtime error: .*: failed to set /proc/self/attr/keycreate on procfs' (using expr)
 # #|   actual: 'Error: OCI runtime error: runc: runc create failed: unable to start container process: error during container init: write /proc/self/attr/keycreate: invalid argument'

which is caused by the fact that runc 1.1 uses newer opencontainers/selinux
package, which changes custom errors to standard os.PathError instances (so
that they can be unwrapped if needed).

Fix the test case accordingly.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-06-15 20:26:31 -07:00
e69691c277 Fix interrupting machine start leaves the machine unstartable
Interrupting a `podman machine start` (ex: with CTRL-C) would leave
`Starting: true` in the machine's config file. Due to #14469 any
subsequent starts would fail since Podman would think the machine is
still in the process of starting.

Fixed here by listening for the interrupt signal and setting `Starting:
false` in the event.

[NO NEW TESTS NEEDED]

Signed-off-by: Shane Smith <shane.smith@shopify.com>
2022-06-15 16:19:10 -04:00
0a202a9f03 system test image: bump to 20220615
Changes:
 - use --timestamp option to produce 'created' stamps
   that can be reliably tested in the image-history test

 - podman now supports manifest & multiarch run, so we
   no longer need buildah

 - bump up base alpine & busybox images

This turned out to be WAY more complicated than it should've been,
because:

 - alpine 3.14 fixed 'date -Iseconds' to include a colon in
   the TZ offset ("-07:00", was "-0700"). This is now consistent
   with GNU date's --iso-8601 format, yay, so we can eliminate
   a minor workaround.

 - with --timestamp, all ADDed files are set to that timestamp,
   including the custom-reference-timestamp file that many tests
   rely on. So we need to split the build into two steps. But:

 - ...with a two-step build I need to use --squash-all, not --squash, but:

 - ... (deep sigh) --squash-all doesn't work with --timestamp (#14536)
   so we need to alter existing tests to deal with new image layers.

 - And, long and sordid story relating to --rootfs. TL;DR that option
   only worked by a miracle relating to something special in one
   specific test image; it doesn't work with any other images. Fix
   seems to be complicated, so we're bypassing with a FIXME (#14505).

And, unrelated:

 - remove obsolete skip and workaround in run-basic test (dating
   back to varlink days)
 - add a pause-image cleanup to avoid icky red warnings in logs

Fixes: #14456

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-06-15 13:29:08 -06:00
21819254dd golangci-lint: update to v1.46.2
Update to the latest golangci-lint version. v1.46 added new linters.
I disabled nonamedreturns and exhaustruct since they enforce a certain
code style and using them would require big changes to the code base.

The nosprintfhostport is new and I fixed one problem in the tests. While
the test itself is fine because it uses ipv4 only the linter still looks
good because the sprintf use will fail for ipv6 addresses.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-15 19:58:30 +02:00
c6b9baa6c1 system tests: avoid rmi -a ... plus cleanup
I noticed 'rmi -a' in a test. I tried to fix it. Hilarity ensued.

'rmi -a' is evil: it forces a fresh pull of our test image,
which in turn almost guarantees a flake some day. We avoid
it, but once in a while it slips in.

While fixing it, I noticed a bevy of other problems that
needed cleanup.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-06-15 10:47:42 -06:00
31095349e3 Merge pull request #14601 from mheon/bump_main_411
[CI:DOCS] Update release notes and README on Main for v4.1.1
2022-06-15 16:21:26 +00:00
ed755cb14e Merge pull request #14596 from giuseppe/move-conmon-different-cgroup-system-service
libpod: improve check to create conmon cgroup
2022-06-15 16:18:18 +00:00
08f35dab5a Merge pull request #14598 from Luap99/service-systemd-fd
systemd socket activation: check listener to prevent panic
2022-06-15 09:52:38 -06:00