13142 Commits

Author SHA1 Message Date
9f1452cbb5 Merge pull request #11944 from cdoern/kubeEmit
Kube Gen run as user/group issues
2021-10-13 19:42:14 +02:00
a235f43ac0 Merge pull request #11949 from Luap99/net-range
CNI: fix network create --ip-range
2021-10-13 18:42:15 +02:00
1c156f2267 Merge pull request #11948 from rhatdan/codespell
codespell code
2021-10-13 14:46:00 +02:00
e3cf9b685a Merge pull request #11892 from vrothberg/search
podman search: display only name and description by default
2021-10-13 14:29:59 +02:00
f12dc28bbc Merge pull request #11565 from Luap99/rootlessport-bin
rootlessport: reduce memory usage of the process
2021-10-13 10:41:59 +02:00
14bfee31f7 podman search: display only name and description by default
Change the default format of `podman search` to only display the name
and the description of each image.  The index is redundant to the name
and consumes a lot of space, and other descriptors (i.e., stars,
official, automated) are specific to Docker Hub and also consume a lot
space.  Users can still use `--format` for displaying the descriptors
they want to.

Add a `--compatible` flag to offer an easy way to get them back.

Also update the man page to account for the behavior and get some fresh
data in the examples.

Motivated by a recent conversation in libimage:
https://github.com/containers/common/pull/802#issuecomment-937108734

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-10-13 10:13:24 +02:00
0b8673d0e7 Merge pull request #11943 from baude/issue11929
No space in kube annotations for bind mounts
2021-10-13 10:01:58 +02:00
8600bce53a codespell code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-12 16:44:25 -04:00
cead185373 CNI: fix network create --ip-range
The --ip-range option did not work correctly. The endIP was accidentally
assigned to the start IP. New tests are added to make sure it works.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-10-12 22:36:24 +02:00
4631f5b283 Kube Gen run as user/group issues
Removed the inclusion of RunAsUser or RunAsGroup unless a container is run with the --user flag. When building from an image
the user will be pulled from there anyway

resolves #11914

Signed-off-by: cdoern <cdoern@redhat.com>
2021-10-12 16:22:01 -04:00
72e87c0ca8 Merge pull request #11924 from jwhonce/issues/11894
Refactor podman search to be more code friendly
2021-10-12 22:17:09 +02:00
97c74f35a1 Merge pull request #11935 from giuseppe/use-cgroup-controllers
cgroups: use cgroup.controllers to read controllers
2021-10-12 21:58:09 +02:00
3ba69dccf7 rootlessport: reduce memory usage of the process
Don't use reexec for the rootlessport process, instead make it a
separate binary to reduce the memory usage. The problem with reexec is
that it will import all packages that podman uses and therefore loads a
lot of stuff into the heap. The rootlessport process however only needs
the rootlesskit library.
The memory usage is a concern since the rootlessport process will spawn
two process per container which has ports forwarded. The processes stay
until the container dies. On my laptop the current reexec version uses
47800 KB RSS. The new separate binary only uses 4540 KB RSS. This is
more than a 90% improvement.

The Makefile has been updated to compile the new binary and install it
to the libexec directory.

Fixes #10790

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-10-12 21:43:11 +02:00
c90beedbe1 Merge pull request #11925 from rhatdan/volume
Remove a volume with --force if container is running
2021-10-12 21:27:09 +02:00
03095bd090 Merge pull request #11927 from jwhonce/issues/11921
Fix CI flake on time of shutdown for API service
2021-10-12 21:08:10 +02:00
65e156467b Merge pull request #11886 from edsantiago/unitfile_path
Unit files: Use actual installed path for podman
2021-10-12 19:39:10 +02:00
ab0e6630f5 No space in kube annotations for bind mounts
Kubernetes fails to deal with an annotation that has a space in it.
Trim these strings to remove spaces.

Fixes: #11929

Signed-off-by: Brent Baude <bbaude@redhat.com>

[NO TESTS NEEDED]
2021-10-12 12:38:15 -05:00
214c13da0a Merge pull request #11932 from flouthoc/build-prune
builder: Add support for builder prune
2021-10-12 19:32:10 +02:00
0459484bdf Fix CI flake on time of shutdown for API service
* Increase timeout for tests to 10s
* To aid in debugging add PID to shutdown package logging
* Added new message for forced service shutdown
* Always wait for HTTP server to shutdown, duration of 0 not friendly
  to clients

Note: The log event

"IdleTracker: StateClosed transition by connection marked un-managed"

denotes a TCP connection has been initiated but no HTTP request was sent.
And is expected during these tests.

Fixes #11921

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-10-12 09:53:19 -07:00
b28a8bc198 Refactor podman search to be more code friendly
* JSON and API description fields are no longer truncated. Formatting
  moved to client, better support of MVP.
* --no-trunc now defaults to true
* Updated tests for changes

Closes #11894

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-10-12 09:30:40 -07:00
2905bc351b Merge pull request #11939 from containers/dependabot/go_modules/github.com/onsi/ginkgo-1.16.5
Bump github.com/onsi/ginkgo from 1.16.4 to 1.16.5
2021-10-12 18:06:10 +02:00
69b6659960 Unit files: Use actual installed path for podman
Don't hardcode /usr/bin/podman in unit files: instead, use
template files with a path replaced at install time.

Because 'make' can be invoked repeatedly, with different
PREFIX, do not leave the generated files behind in our
work directory: wipe them immediately after install.

To get this to work, fix a longstanding bug in podman.spec.in,
a PREFIX that should've been DESTDIR.

Side note: #7023 made contrib/systemd/user a symlink
to .../system but did not update paths in Makefile.
The unrelated-looking path change you see here is
a belated correction for that.

Fixes: #10787

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-10-12 07:57:26 -06:00
1e81787e3f Bump github.com/onsi/ginkgo from 1.16.4 to 1.16.5
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.16.4 to 1.16.5.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v1.16.4...v1.16.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-12 12:22:34 +00:00
9042520cfd cgroups: use cgroup.controllers to read controllers
use the cgroup.controllers file instead of cgroup.subtree_control to
read the list of controllers available in the current cgroup.

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

[NO TESTS NEEDED] we have disabled this test in the CI because it is
difficult to know what controllers are going to be enabled for
rootless under all conditions we test.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-10-12 12:24:20 +02:00
ab8fb3876d builder: Add support for builder prune
Docker has support for docker builder prune and
docker builder build

This patch will add a hidden command to support scripts using this
syntax. We don't want to encourage this deviation.

Add podman build prune to implement docker builder prune
functionality.

Co-authored-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-10-12 15:31:54 +05:30
7580c22734 Remove a volume with --force if container is running
Currently we are not passing the force flag down to the removal of
the running container. If the container is running, and we set
--force when removing the volume, the container should be stopped.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-11 15:02:04 -04:00
2fcec59445 Merge pull request #11920 from jwhonce/issues/11891
Use SplitN(2) when copying env variables
2021-10-11 20:29:05 +02:00
00ebf3cf18 Merge pull request #11912 from chenk008/fix_roofs_path_contains_colon
support rootfs contains colon
2021-10-11 19:52:13 +02:00
dd9c9172af Merge pull request #11889 from cevich/multiarch_docs
[CI:DOCS] Include manifest example usage
2021-10-11 19:49:10 +02:00
6f3cf534b7 Merge pull request #11919 from Luap99/stats-cgroup
podman stats: move cgroup validation to server
2021-10-11 19:44:12 +02:00
b1a2657b4b Merge pull request #11819 from trynaeat/dial-stdio
Adding dial-stdio CLI cmd
2021-10-11 18:43:10 +02:00
6b2939884c Use SplitN(2) when copying env variables
Environment variables whose value contained an equal sign where
truncated

Fixes #11891

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-10-11 09:14:27 -07:00
e57b32c595 podman stats: move cgroup validation to server
Podman stats is not supported for rootless cgroupv1 setups. The check
for this must be on the server side and not the client.

[NO NEW TESTS NEEDED] we cannot test this because remote and server are
always on the same machine in CI

Fixes #11909

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-10-11 16:13:08 +02:00
54471acba8 fix test
Signed-off-by: chenkang <kongchen28@gmail.com>
2021-10-11 17:41:58 +08:00
dd5975f3d5 Support readonly rootfs contains colon
Fix: https://github.com/containers/podman/issues/11913

Signed-off-by: chenkang <kongchen28@gmail.com>
2021-10-11 17:26:30 +08:00
ea868933e8 Merge pull request #11904 from siretart/patch-2
[CI:DOCS] oci-hooks.5.md: fixup section in header
2021-10-10 15:04:29 +02:00
90b5318b81 [CI:DOCS] oci-hooks.5.md: fixup section in header
This fixes the autodetection of where to install the manpages

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2021-10-10 08:16:42 -04:00
60c711f789 Merge pull request #11869 from jwhonce/wip/pprof
Enable /debug/pprof API service endpoints
2021-10-10 12:54:29 +02:00
c47f714fe8 Merge pull request #11880 from rhatdan/stoptimeout
Warn if podman stop timeout expires that sigkill was sent
2021-10-10 12:52:30 +02:00
0a653153ef Merge pull request #11893 from vrothberg/vendor-common
faster image inspection
2021-10-10 12:31:28 +02:00
c1cb016249 Merge pull request #11900 from afbjorklund/machine-table
Not all fields in machine list were set properly
2021-10-09 13:54:24 +02:00
8d3aec9d08 Enable /debug/pprof API service endpoints
* Refactor sidecar HTTP service for /debug/pprof endpoints to use a TCP
  address given via new podman system service --pprof-address flag

* Allow same URL parsing in "system service" as bindings/connection.go

* Refactor NewServerWithSettings() to use entities.ServiceOptions
  in place of deleted server.Options

* Updated godoc for impacted functions and types

* Fixed API service Shutdown() to do an orderly shutdown when
  terminated and running with --time=0

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-10-08 13:57:20 -07:00
5caf6b94e7 Not all fields in machine list were set properly
When using custom output formats like table, some of the booleans
introduced for json format were not initialized correctly (wrong).

[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-10-08 21:31:49 +02:00
bd4d9a0952 Merge pull request #11671 from chenzhiwei/kube-replace
introduce --replace flag for play kube
2021-10-08 15:05:42 +02:00
fad14dafe1 faster image inspection
Vendor the latest HEAD in c/common to pull in changes for a faster
inspection of images.  Previously, only the size computation was
optional, now the one for the parent image is as well.

In many cases, the parent image is not needed but it takes around 10ms
on my local machine.  With this change, we cut off 10ms from many code
paths, most importantly, container creation.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-10-08 14:47:33 +02:00
48d26a893e Warn if podman stop timeout expires that sigkill was sent
Note: the Warning message will not come to podman-remote.
It would be difficult to plumb, and not really worth the effort.

Fixes: https://github.com/containers/podman/issues/11854

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-08 07:06:37 -04:00
6fc73ea4ea [CI:DOCS] introduce --replace flag for play kube
With this flag, users can easily sync up the yaml content with the existing pods.

Fixes #11481

Signed-off-by: Chen Zhiwei <zhiweik@gmail.com>
2021-10-08 10:14:35 +08:00
0479fd8d6a [CI:DOCS] Include manifest example usage
Fixes #8872

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-10-07 13:04:03 -04:00
14c0fcc6b7 Merge pull request #11884 from containers/dependabot/go_modules/github.com/opencontainers/selinux-1.9.1
Bump github.com/opencontainers/selinux from 1.8.5 to 1.9.1
2021-10-07 16:14:30 +02:00
703db8e9a8 Merge pull request #11885 from rhatdan/docs
[ci:docs] Change podman.1 man page to show corret log-level default
2021-10-07 15:29:29 +02:00