18260 Commits

Author SHA1 Message Date
0f8530b1ee Remove test for pod/container name global uniqueness
We're removing this constraint from the database, so we should
not be verifying it in CI anymore.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-03-15 14:44:47 -04:00
6e0f11da5d Improve handling of existing container names in SQLite
Return more sensible errors than SQLite's embedded constraint
failure ones. Should fix a number of integration tests.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-03-15 14:44:47 -04:00
39fd9aa084 Add SQLite job to CI
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-03-15 14:44:47 -04:00
990f4328b6 Merge pull request #17797 from containers/dependabot/go_modules/test/tools/github.com/vbatts/git-validation-1.2.0
build(deps): bump github.com/vbatts/git-validation from 1.1.0 to 1.2.0 in /test/tools
2023-03-15 12:13:44 -04:00
2718f54a29 Merge pull request #17729 from rhatdan/selinux
Support running nested SELinux container separation
2023-03-15 12:07:03 -04:00
41caa57df4 Merge pull request #17771 from vrothberg/fix-17665
events: no duplicates when streaming during a log rotation
2023-03-15 09:58:34 -04:00
2147e0b95d Merge pull request #17793 from m-czernek/patch-1
[CI:DOCS] fix: Document removing anonymous volumes
2023-03-15 09:08:31 -04:00
2b4a27719c build(deps): bump github.com/vbatts/git-validation in /test/tools
Bumps [github.com/vbatts/git-validation](https://github.com/vbatts/git-validation) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/vbatts/git-validation/releases)
- [Commits](https://github.com/vbatts/git-validation/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/vbatts/git-validation
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-15 13:00:58 +00:00
ea2a0767ac fix: Document removing anonymous volumes
Signed-off-by: Marek Czernek <mczernek@redhat.com>
2023-03-15 10:35:21 +01:00
408e764b94 events: no duplicates when streaming during a log rotation
When streaming events, prevent returning duplicates after a log rotation
by marking a beginning and an end for rotated events.  Before starting to
stream, get a timestamp while holding the event lock.  The timestamp
allows for detecting whether a rotation event happened while reading the
log file and to skip all events between the begin and end rotation
event.

In an ideal scenario, we could detect rotated events by enforcing a
chronological order when reading and skip those detected to not be more
recent than the last read event.  However, events are not always
_written_ in chronological order.  While this can be changed, existing
event files could not be read correctly anymore.

Fixes: #17665
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-15 10:28:16 +01:00
68bf49799d Merge pull request #17786 from Luap99/mac-helper-error
podman-mac-helper: exit 1 on error
2023-03-14 18:21:33 -04:00
f8f5f3cec6 Merge pull request #17781 from Luap99/trace-hijack
system service --log-level=trace: support hijack
2023-03-14 17:48:49 -04:00
a4537347c3 Merge pull request #17772 from vrothberg/unhide-events-stream
podman events: unhide --stream
2023-03-14 17:45:57 -04:00
bae07b6ea2 podman-mac-helper: exit 1 on error
We should return a proper exit code to signal the failure.

[NO NEW TESTS NEEDED] We do have any tests on macOS.

Fixes #17785

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-03-14 17:56:22 +01:00
998acd760f Merge pull request #17707 from Luap99/wait-for-port
test/system: fix wait_for_port() to wait for bind
2023-03-14 12:35:58 -04:00
08cd180abc Merge pull request #17736 from giuseppe/no-private-cgroupns-systemd
cgroupns: private cgroupns on cgroupv1 breaks --systemd
2023-03-14 11:33:24 -04:00
1a8a5bc04c Merge pull request #17758 from edsantiago/bud_rootless_remote
bud tests: rootless remote: use correct socket path
2023-03-14 10:26:57 -04:00
6025103196 Merge pull request #17759 from sbrivio-rh/pasta
Revert "pasta: Use two connections instead of three in TCP range forward tests"
2023-03-14 10:00:02 -04:00
c4c0793d21 Merge pull request #17770 from vrothberg/debug-17607
auto update system tests: help debug #17607
2023-03-14 09:46:51 -04:00
7d8d3e810f system service --log-level=trace: support hijack
When the service is running with trace log level it wraps the
`http.ResponseWriter` to log extra information. The problem is that the
new type does not keep all the functions from the embedded type.
Instead we have to implement them ourselves, however only Write() was
implemented. Thus `Hijack()`could not be called on the writer. To
prevent these issues we would implement all the interfaces that the
inner type supports (Header, WriteHeader, Flush, Hijack).

Fixes #17749

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-03-14 14:33:52 +01:00
eed389508e test/system: fix wait_for_port() to wait for bind
The goal of the wait_for_port() function is to return when the port is
bound. This is to make sure we wait for application startup time.
This can be seen in some comments of the callers.

Commit 7e3d04fb caused this regression while reworking the logic to read
ports from /proc. I doesn't seem to cause problems in CI, properly
because the function returns before the port is bound.
I have not seen any flakes related to this but I only see the ones on
PRs where I rerun tests so it is best to wait for Ed to take a look.

Also fixes the broken ipv4_to_procfs() which only passes one argument to
__ipv4_to_procfs(), this results in the ipv4 not beeing inverted.
Therefore all bind checks against a direct ipv4 did not work.
This function accepts only an ipv4 but one caller passes localhost
which is invalid.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-03-14 14:24:04 +01:00
2d1f4a8bff cgroupns: private cgroupns on cgroupv1 breaks --systemd
On cgroup v1 we need to mount only the systemd named hierarchy as
writeable, so we configure the OCI runtime to mount /sys/fs/cgroup as
read-only and on top of that bind mount /sys/fs/cgroup/systemd.

But when we use a private cgroupns, we cannot do that since we don't
know the final cgroup path.

Also, do not override the mount if there is already one for
/sys/fs/cgroup/systemd.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-03-14 12:34:52 +01:00
01fd5bcc30 libpod: remove error stutter
the error is already clear.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-03-14 12:34:52 +01:00
4562e61d20 podman events: unhide --stream
The --stream flag is being used extensively in the tests and some blog
posts refer to it which has been causing some confusion on why the flag
was hidden.  I do not see a good reason to hide it anymore, so unhide it
and add some docs.

[NO NEW TESTS NEEDED] as it's already being tested.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-14 11:26:50 +01:00
7a7af735ad test/system/255-auto-update.bats: multiple services
Wait for all generated services to be ready to be sure we can iron out
race conditions.  Also disable rollbacks to make sure we can analyze
the error if restarting a service fails.  This information may be
crucial to understand the flakes on Debian as tracked in #17607.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-14 10:30:32 +01:00
40d0d233eb 255-auto-update.bats: turn off rollback where needed
To help debug #17607, turn off rollbacks for tests that do not require
rollbacks.  Error when restarting the systemd units are then not
suppressed but returned which should give us more information about what
is going on the Debian systems.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-14 10:16:59 +01:00
1c08f2edac Revert "pasta: Use two connections instead of three in TCP range forward tests"
This reverts commit e33f4e0bc7429038ba6aa82285ae8749c9037c88, going
back to three connections (not two) for each range in TCP tests. I'm
not sure yet what caused the original issue, but it might be fixed
now. If it does, this fixes #17287.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2023-03-13 20:40:15 +01:00
519cfa81f6 Merge pull request #17739 from giuseppe/reenable-test
test: reenable idmap test
2023-03-13 15:22:27 -04:00
ad8a96ab95 Support running nested SELinux container separation
Currently Podman prevents SELinux container separation,
when running within a container. This PR adds a new
--security-opt label=nested

When setting this option, Podman unmasks and mountsi
/sys/fs/selinux into the containers making /sys/fs/selinux
fully exposed. Secondly Podman sets the attribute
run.oci.mount_context_type=rootcontext

This attribute tells crun to mount volumes with rootcontext=MOUNTLABEL
as opposed to context=MOUNTLABEL.

With these two settings Podman inside the container is allowed to set
its own SELinux labels on tmpfs file systems mounted into its parents
container, while still being confined by SELinux. Thus you can have
nested SELinux labeling inside of a container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-13 14:21:12 -04:00
159936a114 bud tests: rootless remote: use correct socket path
Another followup to #17608. Nightly tests were hanging,
because /run/podman/podman.sock was hardcoded (bad idea
for rootless). Poor testing on my part.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-03-13 10:59:38 -06:00
3920799553 Merge pull request #17581 from vrothberg/fix-17571
compat: /auth: parse server address correctly
2023-03-13 11:13:40 -04:00
bad41f67e7 compat: /auth: parse server address correctly
Use `auth.Login` as `podman login` does which parses and normalizes the
input addresses correctly, especially for docker.io.

[NO NEW TESTS NEEDED] as we do not have means to test logging into
docker.io in CI.

Fixes: #17571
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-13 13:41:49 +01:00
5cb18a9f47 Merge pull request #17747 from Heniker/main
[CI:DOCS] fix cmd `set DOCKER_HOST` suggestion
2023-03-13 05:24:15 -04:00
6363fb08f2 docs: fix cmd set DOCKER_HOST suggestion
Signed-off-by: Heniker <Heniker@mail.ru>
2023-03-13 08:11:45 +03:00
fb4f6f95c5 test: reenable idmap test
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-03-11 12:15:38 +01:00
25f976e276 Merge pull request #17724 from containers/dependabot/go_modules/google.golang.org/protobuf-1.29.0
build(deps): bump google.golang.org/protobuf from 1.28.1 to 1.29.0
2023-03-09 14:29:49 -05:00
9a45503c80 Merge pull request #17249 from rhatdan/qm
Must use mountlabel when creating builtin volumes
2023-03-09 14:27:05 -05:00
615d80ef19 Merge pull request #17386 from rhatdan/network
podman inspect list network when using --net=host or none
2023-03-09 14:07:37 -05:00
b5a99e0816 Must use mountlabel when creating builtin volumes
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-09 12:36:52 -05:00
80be8c3d64 Merge pull request #17725 from lsm5/modulesload-conditional-rhel10
podman.spec.rpkg: distro conditionals for modulesloaddir
2023-03-09 12:20:30 -05:00
8d952c01df podman.spec.rpkg: distro conditionals for modulesloaddir
RHEL 8 and 9 don't have /usr/lib/modules-load.d yet.

Related dist-git commit:
c82d37a5b3

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-03-09 19:16:16 +05:30
9294b73508 build(deps): bump google.golang.org/protobuf from 1.28.1 to 1.29.0
Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.28.1 to 1.29.0.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.28.1...v1.29.0)

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-09 12:58:56 +00:00
21651706e3 podman inspect list network when using --net=host or none
This will match Docker behaviour.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-08 17:27:08 -05:00
747369c82d Merge pull request #17713 from sbrivio-rh/pasta
pasta: Re-enable "Local forwarder, IPv4" test now that packages in CI images are fixed
2023-03-08 20:22:45 +01:00
f928cf54aa pasta: Re-enable "Local forwarder, IPv4" test, accept NXDOMAIN as response
This case is fixed by passt commit bad252687271 ("conf, udp: Allow
any loopback address to be used as resolver") and the fix is now
available in packages included by the CI images.

Note that, depending on the resolver on the host, we might get
1.0.0.127.in-addr.arpa resolved to localhost, or simply NXDOMAIN for
it: accept a failure on the nslookup command, as long as we have a
response for 1.0.0.127.in-addr.arpa in the output. If we have any
response, that means we could talk to the resolver.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2023-03-08 17:09:40 +01:00
2a6a80ef74 Merge pull request #17714 from containers/dependabot/go_modules/test/tools/golang.org/x/tools-0.7.0
build(deps): bump golang.org/x/tools from 0.6.0 to 0.7.0 in /test/tools
2023-03-08 16:11:46 +01:00
c0ef542213 Merge pull request #17706 from adrianreber/2023-03-07-unwrap
Update checkpointctl v0.1.0
2023-03-08 16:05:55 +01:00
829e910cde build(deps): bump golang.org/x/tools from 0.6.0 to 0.7.0 in /test/tools
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 13:02:30 +00:00
cc7a1e6148 CI: Switch to c20230307t192532z-f37f36d12 images
They include Fedora package passt-0^20230227.gc538ee8-1.fc37 and
passt-0.0~git20230227.c538ee8-1 for Debian, so that we can re-enable
the "Local Forwarder, IPv4" test for pasta(1).

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2023-03-08 13:42:34 +01:00
f7ac9fd5d6 Merge pull request #17700 from cevich/parallel_system
Cirrus: Run system & integration tests in parallel
2023-03-07 23:35:19 +01:00