18011 Commits

Author SHA1 Message Date
21b82bb687 e2e: Remove the cache with "podman unshare rm" when a rootless user
If rootless, os.RemoveAll() is failed due to permission denied.
Therefore, we use "podman unshare rm" instead of os.RemoveAll().

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-01-27 23:44:04 +09:00
9db657f40c Clean up more language for inclusiveness
We had a number of references, mostly in docs, to the word master that
can now be changed to main.  This PR does that and makes the project a
bit more inclusive.

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-01-27 09:40:27 -05:00
8be5cea126 Merge pull request #17238 from TomSweeneyRedHat/dev/tsweeney/buildahv1.29
Bump Bulidah to v1.29.0
2023-01-27 09:33:04 -05:00
b4d169ada2 Merge pull request #17228 from shblue21/shblue21/wsl-check
fix: running check error when podman is default in wsl
2023-01-27 09:27:53 -05:00
a096e32ecc Merge pull request #17251 from quite/status-up-not-ago
fix: don't output "ago" when container is currently up and running
2023-01-27 09:22:24 -05:00
a825813870 Merge pull request #17246 from sstosh/e2e-remove-dir
e2e: Remove some directories at SynchronizedAfterSuite
2023-01-27 09:19:22 -05:00
814f7c5695 e2e: Remove some directories at SynchronizedAfterSuite
"tempdir" in SynchronizedAftersuite and "LockTmpDir" can be removed.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-01-27 21:25:44 +09:00
497be102ad fix: don't output "ago" when container is currently up and running
Closes #17250

Signed-off-by: Daniel Lublin <daniel@lublin.se>
2023-01-27 12:32:15 +01:00
b28519fd96 fix: running check error when podman is default in wsl
If podman is the default wsl distribution, the (default) string is appended and result is assigned false.

[NO NEW TESTS NEEDED]

Fixes #17227

Signed-off-by: shblue21 <jihunkimkw@gmail.com>
2023-01-27 19:43:51 +09:00
8fce9dcde6 Merge pull request #17247 from vrothberg/fix-ci
fix CI: test fail due to merge
2023-01-27 05:34:43 -05:00
a745d99a88 fix CI: test fail due to merge
containers/podman/pull/17186 and containers/podman/pull/17201 have been
merged at roughly the same time.  Both work fine in isolation but the
new kube test breaks in combination.

Fix the IPC kube test to make CI healthy.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-27 10:00:56 +01:00
49b809a0cc Merge pull request #17186 from danishprakash/add-host-ipc
kube-play: add support for HostIPC in pod.Spec
2023-01-26 14:41:48 -05:00
45bb8dbdf7 Merge pull request #17114 from rhatdan/devices
Allow --device-cgroup-rule to be passed in by docker API
2023-01-26 14:32:19 -05:00
f3d8f6c49d Bump Bulidah to v1.29.0
As the title says.

[NO NEW TESTS NEEDED]
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-01-26 11:49:55 -05:00
574c92b8ea Merge pull request #17210 from vrothberg/ps-sync
ps: do not sync container
2023-01-26 10:47:18 -05:00
532957eeff Merge pull request #17217 from ygalblum/ygal-quadlet-blockdev-support
quadlet: Add device support for .volume files
2023-01-26 10:20:52 -05:00
4692b29145 Merge pull request #17208 from sstosh/e2e-tempfile
e2e: reduce dependency on /tmp for e2e tests
2023-01-26 10:00:08 -05:00
18a25e7cbc Merge pull request #17192 from baude/wslfcosreorg
WSL refactoring
2023-01-26 08:30:56 -05:00
38d5319f16 e2e: reduce dependency on /tmp for e2e tests
- Use filepath.Join(podmanTest.TempDir, "any") instead of "/tmp/any"

- Add generatePolicyFile() to avoid the hardcording of "keyPath": "tmp/key.gpg"

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-01-26 22:20:15 +09:00
0ffce81810 Bump cirrus image with easier dependency management
- for cni tests remove netavark and aardvark only if installed
- install ginkgo in envs wherever needed

Related:
https://github.com/containers/automation_images/pull/177
https://github.com/containers/automation_images/issues/159
https://github.com/containers/automation_images/issues/161

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

Update .cirrus.yml

Co-authored-by: Chris Evich <1183438+cevich@users.noreply.github.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-01-26 18:40:14 +05:30
e62e42bfa9 quadlet: Add device support for .volume files
The Device, Type, Copy and Options keys are now supported in
quadlet  .volume files. This allows users to create filesystem
based volumes with quadlets .volume files.

Signed-off-by: Ingo Becker <ingo@orgizm.net>
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-01-26 14:46:57 +02:00
0184ba5d09 Merge pull request #17213 from umohnani8/nonroot
Set runAsNonRoot=true in gen kube
2023-01-26 05:03:07 -05:00
c74bdae351 DB: make loading container states optional
Loading container states speed things up when listing all containers but
it comes with a price tag for many other call paths.  Hence, make
loading the state conditional to allow for keeping `podman ps` fast
without other commands regressing in performance.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-26 10:20:38 +01:00
6132c4d548 ps: do not sync container
Do not sync containers with the runtime and the database when listing
containers.  It turns out to be extremely expensive and unnecessary.

The sync was needed since listing all containers from the database did
not populate their state.  Doing that, however, is much faster since we
already have a connection to the database.

This change makes listing 200 containers 2 times faster than before.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-26 10:04:16 +01:00
4cd7f6354b Merge pull request #17211 from vrothberg/ps-health
ps: query health check in batch mode
2023-01-25 09:16:21 -05:00
64ea21364e Merge pull request #17215 from Luap99/attach-flake
fix APIv2 python attach test flake
2023-01-25 09:12:53 -05:00
9904fbed33 fix APIv2 python attach test flake
The test was added in commit 1424f0958f6f, it can flake because the
attach test needs the message in the log. On slow CI systems this can
take longer. Add a retry logic which checks the container log every
second for up to 5 seconds. That should be plenty of time.

Fixes #17204

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-25 14:15:20 +01:00
958c94094e Set runAsNonRoot=true in gen kube
If the image being used has a user set that is a positive
integer greater than 0, then set the securityContext.runAsNonRoot
to true for the container in the generated kube yaml.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-01-25 17:14:22 +05:30
9d1c153cfc ps: query health check in batch mode
Also do not return (and immediately suppress) an error if no health
check is defined for a given container.

Makes listing 100 containers around 10 percent faster.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-25 11:24:18 +01:00
c35e74f4cc Merge pull request #17206 from TrevorBenson/bug/ISSUE-17205-volume-import-example
[CI:DOCS] Example in volume import usage is backwards
2023-01-24 19:13:35 -05:00
c4378f97fa Merge pull request #17195 from containers/dependabot/go_modules/github.com/onsi/gomega-1.26.0
build(deps): bump github.com/onsi/gomega from 1.25.0 to 1.26.0
2023-01-24 17:47:38 -05:00
fda62b2d82 make example volume import, not import volume
Signed-off-by: Trevor Benson <trevor.benson@scality.com>
2023-01-24 14:29:45 -08:00
3cee9d9d98 Merge pull request #17201 from rhatdan/ipc
Correct output when inspecting containers created with --ipc
2023-01-24 17:29:29 -05:00
8073e90ed5 Merge pull request #17174 from rhatdan/pod
Get correct username in pod when using --userns=keep-id
2023-01-24 16:23:45 -05:00
eef60ef288 Merge pull request #17199 from ashley-cui/vendor
Vendor containers/(storage, image, common, buildah)
2023-01-24 14:01:26 -05:00
eefc8b65b1 Merge pull request #17197 from vrothberg/ps-network
ps: get network data in batch mode
2023-01-24 13:01:19 -05:00
623ad2a636 Correct output when inspecting containers created with --ipc
Fixes: https://github.com/containers/podman/issues/17189

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-24 12:18:39 -05:00
2db4682041 Vendor containers/(storage, image, common, buildah)
c/storage v1.45.3
c/image v5.24.0
c/common v0.51.0
c/buildah main

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-01-24 11:07:09 -05:00
c4aae9b47e Get correct username in pod when using --userns=keep-id
Fixes: https://github.com/containers/podman/issues/17148

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-24 11:06:06 -05:00
6f519c9bde ps: get network data in batch mode
The network functions popped up in the CPU profiles when listing 2042
containers.  Not a very realistic or common use case but a nice way to
get something on the CPU profiles.

Listing 2042 containers now runs 1.54 times faster.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-24 16:42:26 +01:00
795708f8b5 build(deps): bump github.com/onsi/gomega from 1.25.0 to 1.26.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.25.0 to 1.26.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.25.0...v1.26.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-24 12:02:42 +00:00
ce504bbfe3 Merge pull request #17183 from agowa338/patch-1
(fix) mount_program is in storage.options.overlay
2023-01-23 13:02:10 -05:00
1a90189ad9 Merge pull request #16297 from flouthoc/netavark-custom-dns
libpod,netavark: correctly set `/etc/resolv.conf` for custom dns server and make `--dns` functional
2023-01-23 12:29:38 -05:00
7aef3301da WSL refactoring
Small amount of refactoring to make WSL specific stuff into the WSL
package where possible.  This is in preparation for the possibility of
adding more virtualization backends.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-01-23 10:48:32 -06:00
ebc754ff1f Merge pull request #17190 from vrothberg/ps-optimizations
ps: do not create copy of container config
2023-01-23 11:46:33 -05:00
9e8194f64b Merge pull request #17188 from vrothberg/hack-perf
[CI:DOCS] add hack/perf for comparing two container engines
2023-01-23 11:35:44 -05:00
4ed46c9847 add hack/perf for comparing two container engines
Add a set of scripts using hyperfine for comparing two container
engines.  I am currently using the scripts for comparing Podman
and Docker, and with older versions of Podman.

These scripts are not meant for production usage but to aid in tracking
down performance regressions and bottlenecks.

Run the scripts via `sudo sh $script.sh`.

Use the following environment variables to change the default behavior:
* `ENGINE_A` to set container engine A (default `/usr/bin/podman`)
* `ENGINE_B` to set container engine B (default `/usr/bin/docker`)
* `RUNS` to change the runs/repetitions of each benchmarks (default `100`)
* `NUM_CONTAINERS` to change the number of created containers for some benchmarks (e.g., `ps`) (default `100`)
* `IMAGE` to change the default container image (default `docker.io/library/alpine:latest`)

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-23 16:38:12 +01:00
b7ab889a7e systems: retrofit dns options test to honor other search domains
Signed-off-by: Aditya R <arajan@redhat.com>
2023-01-23 19:15:35 +05:30
5925fe1a58 ps: do not create copy of container config
The user is only reading the config, so creating a copy turns out to be
extremely expensive.  With this change, listing containers is 1.39 times
faster than before.

[NO NEW TESTS NEEDED] as it is not a functional change.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-23 14:42:45 +01:00
08186d7dd7 kube-play: add support for HostIPC in pod.Spec
* play_kube_test: add tests

Signed-off-by: danishprakash <danish.prakash@suse.com>
2023-01-23 17:27:57 +05:30