Commit Graph

14353 Commits

Author SHA1 Message Date
OpenShift Merge Robot
0d2bd53f37 Merge pull request #13157 from ydayagi/main
play kube: set defaults to container resources
2022-02-23 13:34:59 -05:00
OpenShift Merge Robot
991c90de1f Merge pull request #13314 from flouthoc/container-commit-squash
container-commit: support `--squash` to squash layers into one if users want.
2022-02-23 13:07:00 -05:00
OpenShift Merge Robot
113f855802 Merge pull request #13323 from Luap99/iptables-module
Load ip_tables modules at boot
2022-02-23 11:58:58 -05:00
OpenShift Merge Robot
d3699bbce6 Merge pull request #13231 from eriksjolund/troubleshooting_mention_systemd-run_and_machinectl
[CI:DOCS] troubleshooting: mention machinectl and systemd-run
2022-02-23 10:29:12 -05:00
Paul Holzinger
eab5a4cfb7 Load ip_tables modules at boot
Rootless users cannot load the ip_tables module, in fedora 36 this
module is no longer loaded by default so we have to add it manually.
This is needed because rootless network setup tries to use iptables
and if iptables-legacy is used instead of iptables-nft it will fail.

To provide a better user experience we will load the module at boot.

Note that this is not needed for RHEL because iptables-legacy is not
supported on RHEL 8 and newer.

[NO NEW TESTS NEEDED]

Fixes #12661

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-23 16:11:19 +01:00
OpenShift Merge Robot
a234e4e196 Merge pull request #13317 from elezar/update-cdi-module
Update CDI go dependency to v0.3.0
2022-02-23 10:01:04 -05:00
OpenShift Merge Robot
cbca58e8d7 Merge pull request #13320 from giuseppe/play-kube-honor-propagation-mode
kube: honor mount propagation mode
2022-02-23 09:25:07 -05:00
Aditya R
fbbcb957c7 container-commit: support --squash to squash layers into one
Allow users to commit containers into a single layer.

Usage
```bash
podman container commit --squash <name>
```

Signed-off-by: Aditya R <arajan@redhat.com>
2022-02-23 17:38:28 +05:30
Giuseppe Scrivano
ed73040b35 kube: honor mount propagation mode
convert the propagation mode specified for the mount to the expected
Linux mount option.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-02-23 13:01:40 +01:00
Yaron Dayagi
5cba5cbfdb play kube: set defaults to container resources
this fixes https://github.com/containers/podman/issues/13115

the change tries to immitate k8s behavior.
when limits are not set the container's limits are all CPU and all RAM
when requests are missing then they are equal to limits

Signed-off-by: Yaron Dayagi <ydayagi@redhat.com>
2022-02-23 11:00:09 +02:00
OpenShift Merge Robot
8b2432422f Merge pull request #13232 from rhatdan/volumes
Don't log errors on removing volumes inuse, if container --volumes-from
2022-02-23 03:26:59 -05:00
Evan Lezar
46b7c5bc63 Bump CDI go dependency to v0.3.0
This updates the CDI dependency to the v0.3.0 tagged version instead of
relying on a pseudo version. This also addresses the fact that cgroups
are not set correctly for devices using the previous dependency.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-02-23 08:02:47 +02:00
OpenShift Merge Robot
ccb96a2791 Merge pull request #13247 from rhatdan/trust
Cleanup display of trust with transports
2022-02-23 00:46:51 -05:00
OpenShift Merge Robot
bc0e084f2d Merge pull request #13276 from rhatdan/containers-common
Add containers-common spec and command to podman
2022-02-22 16:30:52 -05:00
Daniel J Walsh
6f7a803d06 Cleanup display of trust with transports
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-02-22 15:08:58 -05:00
Daniel J Walsh
80c5962dba Add containers-common spec and command to podman
Since containers-common package is tied to specific versions
of Podman, add tools to build the package into the contrib directory
This should help other distributions to figure out which commont
package to ship.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-02-22 14:38:57 -05:00
OpenShift Merge Robot
d3903a8591 Merge pull request #13311 from mheon/remove_runtime_lock
Remove the runtime lock
2022-02-22 13:46:52 -05:00
Matthew Heon
4a60319ecb Remove the runtime lock
This primarily served to protect us against shutting down the
Libpod runtime while operations (like creating a container) were
happening. However, it was very inconsistently implemented (a lot
of our longer-lived functions, like pulling images, just didn't
implement it at all...) and I'm not sure how much we really care
about this very-specific error case?

Removing it also removes a lot of potential deadlocks, which is
nice.

[NO NEW TESTS NEEDED]

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-02-22 11:05:26 -05:00
OpenShift Merge Robot
fab82a7c9c Merge pull request #13059 from cdoern/clone
Implement Podman Container Clone
2022-02-22 10:10:49 -05:00
OpenShift Merge Robot
948dfc6f02 Merge pull request #13280 from baude/updatetutorials
[CI:DOCS]Update networking tutorial for netavark
2022-02-22 09:44:54 -05:00
OpenShift Merge Robot
0cfb5d7e75 Merge pull request #13308 from Luap99/remove-nets
system tests: cleanup networks on teardown
2022-02-21 17:55:37 -05:00
Daniel J Walsh
c4dfbd58f5 Don't log errors on removing volumes inuse, if container --volumes-from
When removing a container created with a --volumes-from a container
created with a built in volume, we complain if the original container
still exists.  Since this is an expected state, we should not complain
about it.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-02-21 16:47:12 -05:00
Paul Holzinger
b19251242e system tests: cleanup networks on teardown
When a test which creates a network fail it will not remove the network.
The teardown logic should remove the networks. Since there is no --all
option for network rm we use network prune --force.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-21 21:57:08 +01:00
OpenShift Merge Robot
a746a61a17 Merge pull request #13286 from flouthoc/kube-build-false-default
kube: honor `--build=false` if specified.
2022-02-21 15:33:39 -05:00
OpenShift Merge Robot
c3a9505232 Merge pull request #13304 from Luap99/runtimedir
use GetRuntimeDir() from c/common
2022-02-21 15:23:38 -05:00
OpenShift Merge Robot
b3963e7081 Merge pull request #13296 from Romain-Geissler-1A/url-and-connection-implies-remote
Option --url and --connection should imply --remote.
2022-02-21 15:21:37 -05:00
OpenShift Merge Robot
62ff0409fa Merge pull request #13055 from cevich/new_python_images
[main] Cirrus: Update VM Images for 4.0 release
2022-02-21 15:19:37 -05:00
OpenShift Merge Robot
c9359e1494 Merge pull request #13306 from Luap99/flag-error
provide better error on invalid flag
2022-02-21 15:11:37 -05:00
Brent Baude
ea01f89639 [CI:DOCS]Update networking tutorial for netavark
With netavark being the default networking implementation for Podman v4,
the tutorial needed some updating.

[NO NEW TESTS]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-02-21 13:35:40 -06:00
Aditya R
9ce61e3a49 kube: honor --build=false and make --build=true by default
`podman play kube` tries to build images even if `--build` is set to
false so lets honor that and make `--build` , `true` by default so it
matches the original behviour.

Signed-off-by: Aditya R <arajan@redhat.com>
2022-02-21 23:52:48 +05:30
Paul Holzinger
44d037898e provide better error on invalid flag
Add a extra `See 'podman command --help'` to the error output.
With this patch you now get:
```
$ podman run -h
Error: flag needs an argument: 'h' in -h
See 'podman run --help'
```

Fixes #13082
Fixes #13002

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-21 19:12:12 +01:00
OpenShift Merge Robot
4ad98b9fd3 Merge pull request #13307 from edsantiago/bats_info
System tests: show one-line config overview
2022-02-21 12:59:38 -05:00
OpenShift Merge Robot
ad47fa2d67 Merge pull request #13305 from nalind/troubleshooting
[CI:DOCS] troubleshooting.md: tweak subuid paragraph, encryption
2022-02-21 12:19:42 -05:00
OpenShift Merge Robot
cd00a99c66 Merge pull request #13284 from eriksjolund/troubleshooting_mention_rootfs_overlay_option
[CI:DOCS] troubleshooting: mention overlay option for --rootfs
2022-02-21 11:15:41 -05:00
Ed Santiago
f018c07edf System tests: show one-line config overview
We're running into problems that are impossible to diagnose
because we have no idea if the SUT is using netavark or CNI.
We've previously run into similar problems with runc/crun,
or cgroups 1/2.

This adds a one-line 'echo' with important system info. Now,
when viewing a full test log, it will be possible to view
system settings in one glance.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-02-21 08:49:11 -07:00
Nalin Dahyabhai
f150f29211 troubleshooting.md: tweak subuid paragraph, encryption
Expand the bit about needing to allocate UIDs so that we don't appear to
imply that adding a range of 10000 IDs to /etc/subuid will allow people
to use UID 1000000, which isn't in the range that we'd map a range of
that size to.

TLS is an acronym, so capitalize when we're talking about the protocol.

TLS verification is about encryption, not authentication.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2022-02-21 10:23:50 -05:00
Paul Holzinger
fc5cf812c8 use GetRuntimeDir() from c/common
To prevent duplication and potential bugs we should use the same
GetRuntimeDir function that is used in c/common.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-21 16:03:25 +01:00
OpenShift Merge Robot
d224a0f8ac Merge pull request #12918 from dgibson/propagate-conf-env
Propagate CONTAINERS_CONF to conmon
2022-02-21 08:05:38 -05:00
cdoern
94df701512 Implement Podman Container Clone
podman container clone takes the id of an existing continer and creates a specgen from the given container's config
recreating all proper namespaces and overriding spec options like resource limits and the container name if given in the cli options

this command utilizes the common function DefineCreateFlags meaning that we can funnel as many create options as we want
into clone over time allowing the user to clone with as much or as little of the original config as they want.

container clone takes a second argument which is a new name and a third argument which is an image name to use instead of the original container's

the current supported flags are:

--destroy (remove the original container)
--name (new ctr name)
--cpus (sets cpu period and quota)
--cpuset-cpus
--cpu-period
--cpu-rt-period
--cpu-rt-runtime
--cpu-shares
--cpuset-mems
--memory
--run

resolves #10875

Signed-off-by: cdoern <cdoern@redhat.com>
Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
Signed-off-by: cdoern <cdoern@redhat.com>
2022-02-20 21:11:14 -05:00
Romain Geissler
23a7f4e0de Option --url and --connection should imply --remote.
Closes #13242

Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
2022-02-19 14:53:37 +00:00
Erik Sjölund
d12489858d [CI:DOCS] troubleshooting: mention overlay option for --rootfs
* Mention overlay option for --rootfs. Overlay description text
  is from commit 020d81f113
  by Qi Wang

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-02-18 08:04:30 +01:00
Erik Sjölund
8c9d37fafc [CI:DOCS] troubleshooting: mention machinectl and systemd-run
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-02-18 07:01:32 +01:00
David Gibson
db4d15e852 Propagate $CONTAINERS_CONF to conmon
The CONTAINERS_CONF environment variable can be used to override the
configuration file, which is useful for testing.  However, at the moment
this variable is not propagated to conmon.  That means in particular, that
conmon can't propagate it back to podman when invoking its --exit-command.
The mismatch in configuration between the starting and cleaning up podman
instances can cause a variety of errors.

This patch also adds two related test cases.  One checks explicitly that
the correct CONTAINERS_CONF value appears in conmon's environment.  The
other checks for a possible specific impact of this bug: if we use a
nonstandard name for the runtime (even if its path is just a regular crun),
then the podman container cleanup invoked at container exit will fail.
That has the effect of meaning that a container started with -d --rm won't
be correctly removed once complete.

Fixes #12917

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-02-18 12:35:25 +11:00
David Gibson
d615ab81f9 tests: Remove inaccurate comment
This comment refers to overiding $PODMAN although the code below does
nothing of the sort.  Presumbly the comment has been outdated by altering
the containers.conf / $CONTAINERS_CONF instead.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-02-18 12:35:25 +11:00
OpenShift Merge Robot
a88ea2c68b Merge pull request #13278 from mheon/bump_main_40
[CI:DOCS] Update release notes with v4.0.0 additions
2022-02-17 16:58:34 -05:00
Chris Evich
7b55ab4426 Cirrus: Disable F34 aka prior-fedora testing
Podman 4.0 will never be supported in F34, and the use of F35 in CI is
temporary until F36 is brought up to speed.  Rather than fight with
testing issues that will never be fixed/supported, simply disable it.
This commit may be reverted at a future date when F36 VM support is
added.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-17 16:38:42 -05:00
Chris Evich
632c089cc6 Cirrus: Use updated VM images
Mainly this is to confirm some changes needed for the podman-py CI setup
don't disrupt operations here. Ref:

https://github.com/containers/automation_images/pull/111

Also includes a minor steup fix WRT setting up for test-rpm build.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-17 16:38:42 -05:00
Matthew Heon
aa17030379 Update release notes with v4.0.0 additions
Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-02-17 15:22:21 -05:00
OpenShift Merge Robot
a429dcd2ab Merge pull request #13241 from edsantiago/logformatter_do_python
[CI:DOCS] logformatter: handle python logs
2022-02-17 11:56:37 -05:00
OpenShift Merge Robot
27022180b8 Merge pull request #13264 from mheon/fix_plugin_flake
Fix a potential flake in volume plugins tests
2022-02-17 11:54:35 -05:00