17780 Commits

Author SHA1 Message Date
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
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
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
0428730bd4 Merge pull request #17178 from mhjacks/main
[CI:DOCS] Change example target to default in doc
2023-01-23 04:13:03 -05:00
e2c44c3d49 libpod: set search domain independently of nameservers
Set search domain irrespective of nameservers.

Signed-off-by: Aditya R <arajan@redhat.com>
2023-01-22 12:48:58 +05:30
06241077cc libpod,netavark: correctly populate /etc/resolv.conf with custom dns server
After https://github.com/containers/netavark/pull/452 `netavark` is
incharge of deciding `custom_dns_servers` if any so lets honor that and
libpod should not set these manually.

This also ensures docker parity
Podman populates container's `/etc/resolv.conf` with custom DNS servers ( specified via `--dns` or `dns_server` in containers.conf )
even when container is connected to a network where `dns_enabled` is `true`.

Current behavior does not matches with docker, hence following commit ensures that podman only populates custom DNS server when container is not connected to any network where DNS is enabled and for the cases where `dns_enabled` is `true`
the resolution for custom DNS server will happen via ( `aardvark-dns` or `dnsname` ).

Reference: https://docs.docker.com/config/containers/container-networking/#dns-services
Closes: containers#16172

Signed-off-by: Aditya R <arajan@redhat.com>
2023-01-22 12:48:55 +05:30
366e1686a0 podman: relay custom DNS servers to network stack
Aardvark-dns and netavark now accepts custom DNS servers for containers
via new config field `dns_servers`. New field allows containers to use
custom resolvers instead of host's default resolvers.

Following commit instruments libpod to pass these custom DNS servers set
via `--dns` or central config to the network stack.

Depends-on:
* Common: containers/common#1189
* Netavark: containers/netavark#452
* Aardvark-dns: containers/aardvark-dns#240

Signed-off-by: Aditya R <arajan@redhat.com>
2023-01-22 12:48:49 +05:30
2b650e37ce (fix) mount_program is in storage.options.overlay
mount_program is in storage.options.overlay and not storage.options
(see example in storage.conf)

Signed-off-by: Klaus Frank <agowa338@users.noreply.github.com>
2023-01-22 04:13:04 +01:00
b29313811f Change example target to default in doc
Signed-off-by: Martin Jackson <martjack@redhat.com>
2023-01-20 12:37:41 -06:00
8252dcceb3 Merge pull request #17168 from danishprakash/add-host-pid
kube-play: add support for HostPID
2023-01-20 11:57:14 -05:00
4f4dce166c Merge pull request #17175 from Luap99/default-invalid-netname
network create: do not allow `default` as name
2023-01-20 11:18:01 -05:00
9c79e3bbb0 Merge pull request #17124 from sstosh/e2e-rootless
e2e: use isRootless() instead of rootless.IsRootless()
2023-01-20 09:04:25 -05:00
f6a0ebf00d Merge pull request #17172 from containers/dependabot/go_modules/github.com/docker/docker-20.10.23incompatible
build(deps): bump github.com/docker/docker from 20.10.22+incompatible to 20.10.23+incompatible
2023-01-20 09:01:51 -05:00
86699954b1 network create: do not allow default as name
`default` is already used as network mode, i.e. podman run --network
default will choose the default mode not a network named `default`.

We already block names from other network modes, default was forgotten.

Fixes #17169

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-20 14:52:07 +01:00
3ae84fe0a3 kube-play: add support for HostPID in podSpec
* test/play_kube: add tests for hostPID

Signed-off-by: danishprakash <danish.prakash@suse.com>
2023-01-20 17:32:59 +05:30
d0794ab9ea build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.22+incompatible to 20.10.23+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v20.10.22...v20.10.23)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-20 12:02:32 +00:00
8f0a0f3ec3 Merge pull request #17086 from edsantiago/is_14653_fixed
Remove workarounds for 14653 (checkpoint test failures)
2023-01-20 04:23:34 -05:00
ca91cf416f Let's see if #14653 is fixed or not
Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-19 12:20:56 -07:00
db84b2ba0e Merge pull request #17155 from rhatdan/VENDOR
vendor in latests containers/(storage, common, build, image)
2023-01-19 13:35:12 -05:00
7689e26c79 Merge pull request #16525 from Luap99/CI-update-image
update CI images to include pasta
2023-01-19 11:30:46 -05:00
29a90c3f8a Merge pull request #17153 from edsantiago/preserve_server_logs
Cirrus: preserve podman-server logs
2023-01-19 10:57:45 -05:00
8f78865151 Add support for podman build --group-add
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-19 10:42:10 -05:00
f65d79f4c7 vendor in latests containers/(storage, common, build, image)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-19 10:42:10 -05:00
ac1530b14e Merge pull request #17162 from baude/cnideprecationnotes
[CI:DOCS] Add CNI deprecation notices to documentation
2023-01-19 10:33:35 -05:00
7be8ff5644 unskip network update test
They should work with the new VM images.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-19 15:44:17 +01:00
b5bfc26542 do not install swagger by default
It is only needed for one CI task, and that task already calls
`make .install.swagger` in setup_environment.sh.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-19 15:44:17 +01:00
2ad938ec6e pasta: skip "Local forwarder, IPv4" test
It is not working in CI and locally, I filed #17074 to track it so we
can fix it later.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-19 15:44:17 +01:00
3db8ef37d8 add testbindings Makefile target
use this target in the CI script to make sure it uses the correct gingko

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-19 15:44:17 +01:00
5ad72a2349 update CI images to include pasta
Images were build here: https://github.com/containers/automation_images/pull/249

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-19 15:43:40 +01:00
f07aa2adde [CI:DOCS] Add CNI deprecation notices to documentation
Where the terms CNI and cni are used in documentation like man pages,
readme's, and tutorials, we have begun to add deprecation notices where
applicable. In cases where netavark cannot do what CNI can, those have
been left alone.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-01-19 08:09:32 -06:00
3276c366c0 Merge pull request #17165 from vrothberg/fix-17142
StopContainer: return if cleanup process changed state
2023-01-19 08:30:29 -05:00
07d297ca3d Cirrus: preserve podman-server logs
Output from podman system service, on system tests, is
being saved... it just hasn't been collected as an artifact.
Start collecting it. And, remove obsolete-unused-misleading
code that made me think it _was_ being collected.

Also: log system-service output for bud tests, and set
log-level to info per suggestion from @Luap99

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-19 06:27:43 -07:00
4faa139b78 waitPidStop: reduce sleep time to 10ms
Kill is a fast syscall, so we can reduce the sleep time from 100ms to
10ms in hope to speed things up a bit.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-19 12:31:37 +01:00