Commit graph

13036 commits

Author SHA1 Message Date
OpenShift Merge Robot ba72b17d28
Merge pull request #11818 from mheon/bump_main_340
[CI:DOCS] Update README and release notes for v3.4.0
2021-09-30 15:32:27 -04:00
OpenShift Merge Robot 5c2204b5ce
Merge pull request #11794 from umohnani8/pid
Allow a value of -1 to set unlimited pids limit
2021-09-30 15:14:28 -04:00
Matthew Heon 7e81d78ed0 Update README and release notes for v3.4.0
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-09-30 15:09:53 -04:00
Daniel J Walsh 1f3e2ed74f
Merge pull request #11807 from emsoucy/main
Fix typo in storage.conf file exists message
2021-09-30 14:25:59 -04:00
OpenShift Merge Robot 16b9b51ae1
Merge pull request #11806 from giuseppe/play-kube-fix-cpu-limits
kube: fix conversion from milliCPU to period/quota
2021-09-30 13:34:52 -04:00
OpenShift Merge Robot 3d08c4088f
Merge pull request #11793 from baude/playgenkubeselinux
Support selinux options with bind mounts play/gen
2021-09-30 13:31:53 -04:00
OpenShift Merge Robot 2a3c70fd9c
Merge pull request #11804 from containers/dependabot/go_modules/github.com/mattn/go-isatty-0.0.14
Bump github.com/mattn/go-isatty from 0.0.12 to 0.0.14
2021-09-30 12:34:53 -04:00
OpenShift Merge Robot f313ff46d6
Merge pull request #11801 from flouthoc/podman-machine-stop-info
machine: Info on successfully stopping qemu machine
2021-09-30 12:33:53 -04:00
Ethan Soucy 0a156211d7 [NO TESTS NEEDED] Fix typo in storage.conf file exists message
Signed-off-by: Ethan Soucy <ethan.soucy@gmail.com>
2021-09-30 12:30:07 -04:00
Brent Baude 1ff6a5082a Support selinux options with bind mounts play/gen
When using play kube and generate kube, we need to support if bind
mounts have selinux options.  As kubernetes does not support selinux in
this way, we tuck the selinux values into a pod annotation for
generation of the kube yaml.  Then on play, we check annotations to see
if a value for the mount exists and apply it.

Fixes BZ #1984081

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-09-30 10:49:14 -05:00
OpenShift Merge Robot 966b6030fa
Merge pull request #11798 from giuseppe/skip-pid-shared-ns-on-rootless-cgroups-v1
test: skip test on rootless cgroupsv1
2021-09-30 10:12:07 -04:00
Giuseppe Scrivano 9c6c981928
kube: fix conversion from milliCPU to period/quota
Closes: https://github.com/containers/podman/issues/11803

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-09-30 16:08:43 +02:00
OpenShift Merge Robot 831842e520
Merge pull request #11790 from rhatdan/VENDOR
Vendor in latest containers/storage
2021-09-30 09:52:08 -04:00
OpenShift Merge Robot 39d27cc6cc
Merge pull request #11787 from rhatdan/deleteContainer
Storage can remove ErrNotAContainer as well
2021-09-30 08:32:04 -04:00
dependabot[bot] 5090920cc0
Bump github.com/mattn/go-isatty from 0.0.12 to 0.0.14
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.12 to 0.0.14.
- [Release notes](https://github.com/mattn/go-isatty/releases)
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.12...v0.0.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-30 12:27:25 +00:00
Giuseppe Scrivano 5c1b3e8d72
test: use new helper
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-09-30 13:59:46 +02:00
Giuseppe Scrivano 788106dad1
test: skip test on rootless cgroupsv1
skip the test "podman selinux: shared context in (some) namespaces" on
cgroupsv1 when running as rootless since the tests requires
--pid=container:.

If the container runtime cannot use cgroupsv1 and the container has no
pid namespace. then it is not possible to correctly terminate the
container.  Without a cgroup or a pid namespace, the runtime has no
control on what processes are in the container.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-09-30 13:58:47 +02:00
Aditya Rajan 5a33b7aef8
machine: Info on successfully stopping qemu machine
Spit info log whenever we successfully stop qemu machine for ack.
Closes: https://github.com/containers/podman/issues/11542

[NO TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-09-30 16:16:07 +05:30
Urvashi Mohnani c25cc7230f Allow a value of -1 to set unlimited pids limit
Users can set --pids-limit to -1 now to set unlimited
pids limit for a container - this matches the convention.

[NO TESTS NEEDED]

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-09-29 16:22:55 -04:00
OpenShift Merge Robot b187dfef20
Merge pull request #11390 from giuseppe/logging-passthrough
logging: new mode -l passthrough
2021-09-29 15:33:06 -04:00
Daniel J Walsh 1805ed360d
Vendor in latest containers/storage
Fix handling of additional shares with no images

Fixes: https://github.com/containers/storage/issues/1029

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-29 15:25:54 -04:00
OpenShift Merge Robot d987f26f1e
Merge pull request #11703 from n1hility/disable-fcos-moby
[NO TESTS NEEDED] Disable docker and alias to podman in FCOS ignition
2021-09-29 13:29:04 -04:00
OpenShift Merge Robot 4b9cd9201b
Merge pull request #11781 from vrothberg/spec
podman run - avoid calls to JSONDeepCopy
2021-09-29 13:26:03 -04:00
OpenShift Merge Robot a22a9a5218
Merge pull request #11761 from umohnani8/init
Add port configuration to first regular container
2021-09-29 10:32:10 -04:00
OpenShift Merge Robot 512a994e8b
Merge pull request #11637 from ashley-cui/warn
[NO TESTS NEEDED] Remind user to check connection or use podman machine
2021-09-29 10:31:06 -04:00
Daniel J Walsh c9ea2cae1e
Storage can remove ErrNotAContainer as well
Fixes: https://github.com/containers/podman/issues/11775

[NO TESTS NEEDED] No easy way to cause this problem in CI.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-29 10:12:49 -04:00
Valentin Rothberg ccff77025c libpod: container create: init variable: do not deep copy spec
Do not create an expensive deep copy for the provided spec.Spec
when creating a container.  No API should be expected to create
deep copies of arguments unless explicitly documented.

This removes the last call to JSONDeepCopy in a simple
`podman run --rm -d busybox true`.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-29 14:24:11 +02:00
Valentin Rothberg 5ea369adef libpod: add GetConfigNoCopy()
Add a new function to libpod to directly access the runtime
configuration without creating an expensive deep copy.  Further migrate
a number of callers to this new function.

This drops the number of calls to JSONDeepCopy from 4 to 1 in a simple
`podman run --rm -d busybox top`.

Future work: Please note that there are more callers of GetConfig() that
can me migrated to GetConfigNoCopy().

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-29 14:24:09 +02:00
Valentin Rothberg 30bf31010e libpod: add execSessionNoCopy
To avoid creating an expensive deep copy, create an internal function to
access the exec session.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-29 13:44:55 +02:00
Valentin Rothberg 98176f0018 libpod: do not call (*container).Spec()
Access the container's spec field directly inside of libpod instead of
calling Spec() which in turn creates expensive JSON deep copies.

Accessing the field directly drops memory consumption of a simple
podman run --rm busybox true from ~700kB to ~600kB.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-29 13:44:39 +02:00
OpenShift Merge Robot 453c49c488
Merge pull request #11774 from mheon/fix_11750
Ensure pod ID bucket is properly updated on rename
2021-09-29 04:36:08 -04:00
Ashley Cui 97f755f87b Remind user to check connection or use podman machine
Remind user to check their remote linux connection or use podman
machine. Move the warning from bindings to cmd/podman.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-09-28 17:01:57 -04:00
OpenShift Merge Robot cd10304dca
Merge pull request #11769 from afbjorklund/make-dash
Fix contributor make targets on Ubuntu and Debian
2021-09-28 16:16:15 -04:00
Matthew Heon 678b554b1f Ensure pod ID bucket is properly updated on rename
As we were not updating the pod ID bucket, removing a pod with
containers still in it (including the infra container, which will
always suffer from this) will not properly update the name
registry to remove the name of any renamed containers. This
patch ensures that does not happen - all containers will be fully
removed, even if renamed.

Fixes #11750

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-09-28 14:12:18 -04:00
Anders F Björklund 60824c6130 Fix contributor make targets on Ubuntu and Debian
It was trying to run a bash script with sh

[NO TESTS NEEDED] This changes "make lint"

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-09-28 18:50:33 +02:00
OpenShift Merge Robot 14acec94b7
Merge pull request #11768 from vrothberg/deep-copy
libpod: do not call (*container).Config()
2021-09-28 12:40:14 -04:00
OpenShift Merge Robot 05f62e31f9
Merge pull request #11615 from cevich/pr_template
[CI:DOCS] Implement PR template to assist review & release
2021-09-28 12:37:13 -04:00
Chris Evich 0d4fa7bc97
Implement PR template to assist review & release
This duplicates the template used for buildah.  The intention
is to make it immediately clear to reviewers:

* The intended/basic purpose of the PR (also machine readable)
* Why are changes being proposed
* If there are any specific items need additional checking or scrutiny
* What should go into the release-notes (if anything).

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-09-28 12:20:03 -04:00
Valentin Rothberg 5d6ea90e75 libpod: do not call (*container).Config()
Access the container's config field directly inside of libpod instead of
calling `Config()` which in turn creates expensive JSON deep copies.

Accessing the field directly drops memory consumption of a simple
`podman run --rm busybox true` from 1245kB to 410kB.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-28 17:18:02 +02:00
Urvashi Mohnani a3cdee9796 [NO TESTS NEEDED] Add port configuration to first regular container
When generating a kube yaml and there is a port configuration
add the configuration to the first regular container in the pod
and not to the init container.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-09-28 11:13:24 -04:00
OpenShift Merge Robot 381ab48c25
Merge pull request #11760 from rhatdan/dockerfile
Add dockerfile.5 as man link to containerfile man page
2021-09-28 10:04:14 -04:00
OpenShift Merge Robot 2d22d17066
Merge pull request #11751 from Luap99/net-alias
always add short container id as net alias
2021-09-28 10:03:17 -04:00
OpenShift Merge Robot cc23e059d9
Merge pull request #11765 from vrothberg/no-dot
[CI:DOCS] cmd/podman: no dot for short descriptions
2021-09-28 09:04:14 -04:00
OpenShift Merge Robot 7a748f028c
Merge pull request #11762 from edsantiago/bats
System tests: speed up. They've gotten too slow.
2021-09-28 09:02:14 -04:00
Valentin Rothberg d14f66972a [CI:DOCS] cmd/podman: no dot for short descriptions
Remove trailing dots in the short descriptions for the sake of
consistency.  Noticed while parsing `podman help`.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-28 14:53:03 +02:00
Paul Holzinger 1c8926285d
move network alias validation to container create
Podman 4.0 currently errors when you use network aliases for a network which
has dns disabled. Because the error happens on network setup this can
cause regression for old working containers. The network backend should not
validate this. Instead podman should check this at container create time
and also for network connect.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-28 13:40:27 +02:00
Paul Holzinger d0950f3efe
set --cni-config-dir for exit command
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-28 13:40:27 +02:00
Paul Holzinger 05614ee139
always add short container id as net alias
This matches what docker does. Also make sure the net aliases are also
shown when the container is stopped.

docker-compose uses this special alias entry to check if it is already
correctly connected to the network. [1]
Because we do not support static ips on network connect at the moment
calling disconnect && connect will loose the static ip.

Fixes #11748

[1] 0bea52b18d/compose/service.py (L663-L667)

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-28 13:40:22 +02:00
OpenShift Merge Robot f2ffb96eb3
Merge pull request #11737 from vrothberg/fix-11472
image prune: support removing external containers
2021-09-28 07:34:12 -04:00
Valentin Rothberg a9a54eefab image prune: support removing external containers
Support removing external containers (e.g., build containers) during
image prune.

Fixes: #11472
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-28 10:24:16 +02:00