Commit Graph

6576 Commits

Author SHA1 Message Date
Ben Krieger 6c68f4ad97 Use HTTP path prefix of TCP connections to match Docker context behavior
Signed-off-by: Ben Krieger <ben.krieger@intel.com>
2024-08-22 21:22:26 -04:00
openshift-merge-bot[bot] 6011eac97b
Merge pull request #23695 from edsantiago/safename-170
CI: parallel-safe userns test
2024-08-22 20:05:13 +00:00
openshift-merge-bot[bot] c959942494
Merge pull request #23673 from containers/renovate/setuptools-73.x
chore(deps): update dependency setuptools to v73
2024-08-22 17:25:35 +00:00
Ed Santiago 11547942b1 CI: parallel-safe userns test
- use safename
- add ci:parallel tags where possible
  - where not possible, document why

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-22 08:24:14 -06:00
renovate[bot] 7164177c68
Update module github.com/onsi/ginkgo/v2 to v2.20.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-22 13:56:19 +00:00
openshift-merge-bot[bot] 1c3ebeeabd
Merge pull request #23696 from edsantiago/safename-030
CI: parallel-safe run system test
2024-08-22 12:47:30 +00:00
openshift-merge-bot[bot] e7905122d7
Merge pull request #23679 from ruihe774/pod-userns
quadlet: support user mapping in pod unit
2024-08-22 12:33:43 +00:00
openshift-merge-bot[bot] bd90f9c200
Merge pull request #23706 from edsantiago/new-vms
Update CI VMs
2024-08-22 12:28:14 +00:00
Ed Santiago 68efa7e3a1 CI: parallel-safe run system test
- fix a few missing safenames
- eliminate 'container rm -a'
- when running ps, do substring match, not exact
- where possible, add ci:parallel tags
  - when not possible, explain

Also, fix a completely broken inspect test

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-22 05:58:52 -06:00
Ed Santiago 4dc5708f14 Revert "test/e2e: work around for pasta issue"
This reverts commit 1912dd4bf6.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-22 04:55:43 -06:00
Misaki Kasumi 4fbfa7de6e quadlet: support user mapping in pod unit
Signed-off-by: Misaki Kasumi <misakikasumi@outlook.com>
2024-08-22 09:41:06 +08:00
Ed Santiago 9c3921ca58 CI: parallel-safe namespaces system test
An easy one :-)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-21 05:36:04 -06:00
openshift-merge-bot[bot] 43fe3ebaf3
Merge pull request #23670 from mheon/fix_stop_and_rmi
Fix `podman stop` and `podman run --rmi`
2024-08-20 21:45:51 +00:00
openshift-merge-bot[bot] 8be89caf46
Merge pull request #23675 from ruihe774/fix-pod-cgroups
Add key CgroupsMode in Quadlet container unit
2024-08-20 18:47:16 +00:00
Misaki Kasumi 1ccccde183 quadlet: add key CgroupsMode
Signed-off-by: Misaki Kasumi <misakikasumi@outlook.com>
2024-08-20 22:09:36 +08:00
Matt Heon 458ba5a8af Fix `podman stop` and `podman run --rmi`
This started off as an attempt to make `podman stop` on a
container started with `--rm` actually remove the container,
instead of just cleaning it up and waiting for the cleanup
process to finish the removal.

In the process, I realized that `podman run --rmi` was rather
broken. It was only done as part of the Podman CLI, not the
cleanup process (meaning it only worked with attached containers)
and the way it was wired meant that I was fairly confident that
it wouldn't work if I did a `podman stop` on an attached
container run with `--rmi`. I rewired it to use the same
mechanism that `podman run --rm` uses, so it should be a lot more
durable now, and I also wired it into `podman inspect` so you can
tell that a container will remove its image.

Tests have been added for the changes to `podman run --rmi`. No
tests for `stop` on a `run --rm` container as that would be racy.

Fixes #22852
Fixes RHEL-39513

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-08-20 09:51:18 -04:00
Misaki Kasumi e5c91ff03a quadlet: set infra name to %s-infra
e.g.: if the pod name is systemd-awd, the name of its infra container will be systemd-awd-infra

Signed-off-by: Misaki Kasumi <misakikasumi@outlook.com>
2024-08-20 18:20:02 +08:00
renovate[bot] 990fc335fa
chore(deps): update dependency setuptools to v73
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-19 21:46:48 +00:00
openshift-merge-bot[bot] 7899358ec9
Merge pull request #23662 from edsantiago/disable-ginkgo-flake-retry
CI: disable ginkgo flake retries
2024-08-19 13:54:29 +00:00
openshift-merge-bot[bot] 8068bb2fc8
Merge pull request #23650 from Luap99/e2e-systemd-rm
test/e2e: rm systemd start test
2024-08-19 13:21:26 +00:00
Ed Santiago 145c7511aa CI: disable ginkgo flake retries
As discussed in Aug 13 Cabal, we are almost at a point where
e2e tests are reliably passing on the first try. Let's try to
keep things that way, and not hide future flakes.

Closes: #17967

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-19 06:48:15 -06:00
Paul Holzinger 666d839157
golangci-lint: make windows linting happy
It qemu cannot be compiled anyway so make sure we do not try to compile
parts where the typechecker complains about on windows.
Also all the e2e test files are only used on linux as well.
pkg/machine/wsl also reports some error but to many for me to fix them
now. One minor problem was fixed in pkg/machine/machine_windows.go.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-19 11:41:29 +02:00
Paul Holzinger cd2a4c7cac
test/e2e: remove kernel version check
We need something newer than 4.14 anyway now for most Podman functions.
This is breaking liniting on windows as the function doesn't work there.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-19 11:41:29 +02:00
Paul Holzinger 6c0d94328f
golangci-lint: remove most skip dirs
Now that we have propert !remote tags set everywhere we can just rely on
that and do not need to skip any dirs.
Also on linux do not lint three times, one remote run is enough.
We still have to skip the test dir for windows/macos though or we need
to add linux build tags there everywhere as well. This seems simpler.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-19 11:41:28 +02:00
Paul Holzinger 57016f5cc3
test/e2e: rm systemd start test
We have a lot of systemd and quadlet based tests in the system tests.
This test doesn't seem very useful and it seems to flake so just remove
it.

Fixes #23480

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-16 17:33:30 +02:00
Paul Holzinger 80639df27a
podman wait: allow waiting for removal of containers
By default wait only waits for the exit of a container, there is really
no way to make it wait for the removal too when the container was
created with --rm. I though I found a clever way in 8a943311db but this
is not working race free. While it works most of the time any other
parallel process might call syncContainer() before the cleanup process
holds the lock until it removes it. As such the wait hack to only update
the state and not sync the exit file did not work so we can drop that.

However the test wants to wait for the removal to happen by the cleanup
process and we can already say --condition=removing to do this but this
will throw an error if the ctr was removed instead of counting this as
success so fix that as well.

Fixes #23640

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-16 15:44:02 +02:00
openshift-merge-bot[bot] 8c132cc388
Merge pull request #23595 from edsantiago/parallel-safe-random-free-port
CI: system tests: make random_free_port() parallel-safe
2024-08-16 11:15:09 +00:00
openshift-merge-bot[bot] f69ede1138
Merge pull request #23636 from edsantiago/safename-252
CI: quadlet tests: make parallel-safe
2024-08-16 08:30:06 +00:00
Ed Santiago 480d43748a CI: quadlet tests: make parallel-safe
The usual, safename instead of hardcoded names or random_string.
And remove some rmi statements: we no longer clean up pause_image.

Been working great in #23275 all week.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-15 10:56:51 -06:00
Ed Santiago 420bd16a21 CI: system tests: make random_free_port() parallel-safe
...by using a crude port lock-and-reserve mechanism. This is
a small cherrypick from code that has been working in #23275
over dozens of CI runs. Am separating out into a small PR
because it's stable, harmless to serial runs, and will
simplify the eventual review of #23275.

Closes: #23488

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-15 10:04:51 -06:00
Ed Santiago 1a1d2646df CI: format test: make parallel-safe
Use safename instead of hardcoded object names. Requires moving
a test table down, into the function itself instead of global,
because the table needs to know object names.

Also: sneak in a workaround for dealing with quay flakes (in
image search). The local registry is allowing almost all tests
to pass even when quay is down, but this one test still needs
to hit quay.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-15 08:34:26 -06:00
openshift-merge-bot[bot] 734c4b98d4
Merge pull request #23519 from Luap99/netns-cleanup
update c/common to add some netns cleanup fixes
2024-08-15 12:39:22 +00:00
Paul Holzinger b6beed9f76
test/system: fix network cleanup restart test
Now that on-failure exits right away the test is racy as the
RestartCount is not at the value we expect as the container is still
restarting in the background. As such add a timer based approach.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-15 11:07:27 +02:00
Paul Holzinger 8a943311db
libpod: simplify WaitForExit()
The current code did several complicated state checks that simply do not
work properly on a fast restarting container. It uses a special case for
--restart=always but forgot to take care of --restart=on-failure which
always hang for 20s until it run into the timeout.

The old logic also used to call CheckConmonRunning() but synced the
state before which means it may check a new conmon every time and thus
misses exits.

To fix the new the code is much simpler. Check the conmon pid, if it is
no longer running then get then check exit file and get exit code.

This is related to #23473 but I am not sure if this fixes it because we
cannot reproduce.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-15 11:07:27 +02:00
openshift-merge-bot[bot] f4c85cab32
Merge pull request #23608 from containers/renovate/docker.io-library-golang-1.x
Update docker.io/library/golang Docker tag to v1.23
2024-08-14 09:01:29 +00:00
renovate[bot] c4cdb6defa
Update docker.io/library/golang Docker tag to v1.23
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-13 22:03:53 +00:00
renovate[bot] 0d1c19248a
Update dependency setuptools to ~=72.2.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-13 18:05:58 +00:00
openshift-merge-bot[bot] 17baab0bf5
Merge pull request #23561 from Luap99/test-pasta-port
test/system: pasta_test_do add explicit port check
2024-08-13 18:04:58 +00:00
openshift-merge-bot[bot] a4c6bef65f
Merge pull request #23592 from edsantiago/safename-080
CI: 080-pause.bats: make parallel-safe
2024-08-13 10:54:26 +00:00
openshift-merge-bot[bot] 1bf711e526
Merge pull request #23591 from edsantiago/safename-050
CI: 050-stop.bats: make parallel-safe
2024-08-13 10:51:42 +00:00
Ed Santiago 0d7e14fb83 healthcheck system check: reduce raciness
When will I learn not to dismiss something as "easy"?

Anyhow, this doesn't actually change anything parallel-wise
but it does reduce a race condition seen on heavily-loaded
slow systems, wherein a container goes into unhealthy before
we want it to. This version isn't perfect; I don't think
there's an ideal fix for this.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-12 12:24:37 -06:00
Ed Santiago 30ee9c0114 CI: healthcheck system test: make parallel-safe
Easy one, just replace "healthcheck_c"

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-12 12:23:54 -06:00
Ed Santiago 36f9a04499 CI: 080-pause.bats: make parallel-safe
Only one test can be parallelized. Do so, and add a comment
to the other one explaining why it can't be.

Also, add some missing error-message checks.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-12 12:05:27 -06:00
Ed Santiago 6656a18c3f CI: 050-stop.bats: make parallel-safe
Very few changes needed, all of them simple.

It is impossible to parallelize this entire file, because "stop -a".
Add tags to tests that can be parallelized, and comments to those
that can't.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-12 12:00:09 -06:00
Paul Holzinger 6fce734f42
remote: fix invalid --cidfile + --ignore
When the cidfile does not exists and ignore is set the cli parser skips
the file without error and we call into the backend code without any
names at all. This should logically be a NOP but on remote it caused all
containers to be returned which caused podman stop to stop everything in
this case.

Fixes #23554

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-12 17:12:12 +02:00
openshift-merge-bot[bot] 708d6c5e2b
Merge pull request #23449 from ygalblum/quadlet-override-service-name
Quadlet override service name
2024-08-12 13:56:48 +00:00
openshift-merge-bot[bot] 7acaf714ca
Merge pull request #23496 from rhatdan/manifest
Should not force conversion of manifest type to DockerV2ListMediaType
2024-08-12 13:36:30 +00:00
openshift-merge-bot[bot] 6ef3a2347a
Merge pull request #23577 from Luap99/save-error
libpod: fix broken saveContainerError()
2024-08-12 13:22:42 +00:00
openshift-merge-bot[bot] 52fe111b51
Merge pull request #23562 from cevich/rm_docker_py_dupe
De-duplicate docker-py testing
2024-08-12 12:05:41 +00:00
Paul Holzinger 20f3e8909e
test/system: pasta_test_do add explicit port check
Do not rely on an arbitrary delay in order to ensure the port was bound
in the container. Instead this approach checks if the port is bound in
the netns and only then starts the client. This speeds up the entire
test file by 50% but more importantly in parallel testing it solves
hangs as the timeout there was unreliable.

Fixes #23471

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-12 13:46:56 +02:00