22693 Commits

Author SHA1 Message Date
edf6f1814e test/system: speed up podman logs - multi ...
The test used sleep to synchronize log output between both containers
which is slow. There is actually no way to guarantee the ordering on
the reading side so just remove the sleep's and check the the lines
within the same container are in the right order.

Trying to preserve the orignal ordering is just not possible if we speed
up the test as it would flake to often.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-29 11:00:30 +02:00
fe05e25edf test/system: speed up podman run --name
There is no reason for this check to wait 4 seconds for the container to
run, instead make sure to have a running process and then stop it
directly with -t0 not have any delay.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-29 10:39:51 +02:00
1ae05473c1 Debian: switch to crun
As agreed in Planning meeting of 2024-03-20, Podman 5.x will
drop support for cgroups v1 and for runc. Make it so.

CI images built in https://github.com/containers/automation_images/pull/338

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-05-28 16:34:39 -06:00
afb9901336 Merge pull request #22793 from EFord36/patch-1
[CI:DOCS] fix typo in Tutorials.rst
2024-05-28 19:17:11 +00:00
3fb70d3c8f Merge pull request #22773 from cevich/use_preinstalled_rosetta
Mac PM test: Require pre-installed rosetta
2024-05-28 19:06:12 +00:00
aca5a7b036 Merge pull request #22821 from Luap99/fast-system-test
test/system: make some tests faster part 1
2024-05-28 14:44:40 +00:00
6f0737a5c9 Merge pull request #22806 from JayKayy/22590-pod-console-name
Have pod.Name display instead of pod.ID on start and stop reports
2024-05-28 14:19:46 +00:00
af8fe2b75e Merge pull request #22764 from giuseppe/give-more-time-to-healthcheck-status-change
libpod: wait another interval for healthcheck
2024-05-28 13:21:43 +00:00
1093ebb72b test/system: speed up podman generate systemd - envar
This container did not react to sigterm thus we always waited 10s for it
to stop. Also do not wait 2s for the logs instead use a retry loop.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-28 13:53:55 +02:00
15606148e5 test/system: speed up podman-kube@.service template
The test does a normal stop on a command that does not react to sigterm.
As I cannot fix the system stop logic use a command which does. This
safes us 10s as it no longer waits for the timeout.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-27 18:37:18 +02:00
42f43fb3a3 test/system: speed up kube play healthcheck initialDelaySeconds
Both tests take 10s longer than they need to because they run the sleep
command int he container which does not react to sigterm, as such podman
waits 10s before killing it with sigkill.

To fix it just stop them with podman rm -fa -t0 to avoid the wait and do
not use podman kube down as we cannot set a timeout there. podman kube
down is still covered in many other tests so this is not an issue.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-27 18:23:25 +02:00
9e321aafda test/system: speed up exit-code propagation test
IMO it is not important to cover each case with each sdnotify policy, to
speed them up we run all the exit code cases only once just twice for
each policy while switching the sdnotify policy between each case. This
way we safe 50% of runs and should still have sufficient coverage.

Before it took around 24 seconds, with this it is around 12 seconds now.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-27 18:10:07 +02:00
94ba2cf1a1 test/system: speed up "podman run --timeout"
There is really no point in waiting 10s for the kill, let's use 2 this
should be good enough to observe the timing.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-27 17:51:59 +02:00
82bffb9c50 test/system: fix slow kube play --wait with siginterrupt
This test waits 15 seconds to send sigterm for no good reason, we can
just make the timeout shorter. Also make sure the podman command quit on
sigterm by looking for the output message.

While at it fix the tests to use $PODMAN_TMPDIR not /tmp and define the
yaml in the test instead of using the podman create && podman kube
generate && podman rm way to create the yaml as it is a bit slower as we
have to call three podman commands for it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-27 17:37:20 +02:00
7ce3c6bf1e undo auto-formatting
Signed-off-by: jkwiatko <jkwiatkoski@protonmail.com>
2024-05-27 11:33:04 -04:00
9a7ffaa077 test/system: speed up podman events tests
Merge two podman event tests into one to speed them up as they did
mostly the same anyway. This way we only have to do the setup/teardown
once and only run one container.

Second, add the --since option because reading the journal can be slow
if you have thousands of event entries. This is not so critical in CI as
we run on fresh systems but on local dev machines I have almost 100k
events in the journal so parsing all of them makes this test slow (like
30s), with this change I can get it under 1s.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-27 17:14:28 +02:00
9de1d4f653 test/system: speed up "podman auto-update using systemd"
Defining a timer with a fixed interval is not a good idea as we first
have to wait until the timer triggers, while the interval was every two
seconds it means that we have to wait at least 2s for it to start.
However much worse it means it triggers the unit over and over, this
seems to cause some soft of race with the output check. I have seen
this test run 10-60s which does not make much sense.

Switching the timer to trgger once on start seem to make the test run
consistently in 7s locally for me so this is much better.

There still is the question if we really have to test this at all on
each upstream PR but I left it for now.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-27 16:20:05 +02:00
a09152ab28 test/system: remove podman wait test
It takes over 10 seconds for this test as it uses --wait 5 twice which
runs into the timeout. IMO this tests is just redundant as it is already
covered in the e2e tests much better. Thus remove it here.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-27 15:54:56 +02:00
7ec22abb1c Merge pull request #22792 from containers/renovate/github.com-burntsushi-toml-1.x
fix(deps): update module github.com/burntsushi/toml to v1.4.0
2024-05-27 13:30:26 +00:00
d02a876dbe Merge pull request #22815 from Luap99/golangci-lint
update golangci-lint to v1.59.0
2024-05-27 11:58:04 +00:00
f48cf3cb8d Merge pull request #22811 from pcguy85/patch-1
[CI:DOCS] kubernetes_support.md: Mark volumeMounts.subPath as supported
2024-05-27 11:19:31 +00:00
a74e8e8ba2 Merge pull request #22808 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.19.0
2024-05-27 11:16:48 +00:00
7f567a4e51 tests: disable tests affected by a race condition
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-05-27 13:02:26 +02:00
2b43f62233 update golangci-lint to v1.59.0
Remove deactivated linters from the config as they will be removed in
the future and thorw warnings, all of them were disabled already anyway
so this is no functional change.
Second, fix one new lint warning for fmt.Scanln() error checking.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-27 11:19:03 +02:00
6dcde80999 kubernetes_support.md: Mark volumeMounts.subPath as supported
It seems like podman kube play already supports the field since version 4.4.0 but the documentation was not yet updated.

Signed-off-by: thartd <49099022+pcguy85@users.noreply.github.com>
2024-05-26 16:54:44 +02:00
b45364254f working name of pod on start and stop
Signed-off-by: jkwiatko <jkwiatkoski@protonmail.com>
2024-05-25 19:40:21 -04:00
c5597cb12c fix(deps): update module github.com/onsi/ginkgo/v2 to v2.19.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-25 16:46:22 +00:00
c24e0cbfe7 Merge pull request #22797 from TomSweeneyRedHat/dev/tsweeney/buildah-1.36.0
Bump Buildah to v1.36.0
2024-05-25 16:45:06 +00:00
f8cc1b4807 Bump Buildah to v1.36.0
Bump Buildah to v1.36.0.  This is the final dance step before
Podman v5.1

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-05-23 20:27:54 -04:00
661e9ee804 fix(deps): update module github.com/burntsushi/toml to v1.4.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-23 15:20:30 +00:00
9c92bc64a7 fix typo in Tutorials.rst
Signed-off-by: Elliot Ford <elliot.ford@hotmail.co.uk>
2024-05-23 16:15:40 +01:00
74e8f98772 Mac PM test: Require pre-installed rosetta
Previously, the mac podman-machine tests installed rosetta before
executing any tests.  As a best-practice (and because the Macs in CI are
shared) tests should never permanently modify the system.  As of this
commit, the system setup script used for the CI Macs does the rosetta
installation.  Remove the test setup code that installed rosetta and
add a CI-level confirmation that it's been pre-installed.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-05-23 10:23:06 -04:00
e53b96cb25 Merge pull request #22683 from grisu48/podmansh_sh
Add configuration for podmansh
2024-05-23 12:45:05 +00:00
eee0dc256a Merge pull request #22727 from mheon/chown_all_the_time
Always chown volumes when mounting into a container
2024-05-23 12:34:07 +00:00
db3abd0d28 test/e2e: fix new error message
The new c/image version is returning a slightly new error message[1] so
make tests use the new one.

[1] https://github.com/containers/image/pull/2408

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-23 13:29:39 +02:00
23c830704d Add configuration for podmansh
Use the configuration parameters from the newly introduced
PodmanshConfig struct. This allows podmansh to be configured via
configuration files.

Signed-off-by: phoenix <felix.niederwanger@suse.com>
2024-05-23 11:29:37 +02:00
4fd425429b Update containers/common to latest main
Update the containers/common dependency to the latest main with the
needed changes in Podmansh.

Signed-off-by: phoenix <felix.niederwanger@suse.com>
2024-05-23 11:29:27 +02:00
36152eeabf Merge pull request #22057 from jbtrystram/quadlet-image-network
quadlet: Add a network requirement on .image and .containers units
2024-05-23 06:19:07 +00:00
046c0e5fc2 Only stop chowning volumes once they're not empty
When an empty volume is mounted into a container, Docker will
chown that volume appropriately for use in the container. Podman
does this as well, but there are differences in the details. In
Podman, a chown is presently a one-and-done deal; in Docker, it
will continue so long as the volume remains empty. Mount into a
dozen containers, but never add content, the chown occurs every
time. The chown is also linked to copy-up; it will always occur
when a copy-up occurred, despite the volume now not being empty.
This PR changes our logic to (mostly) match Docker's.

For some reason, the chowning also stops if the volume is chowned
to root at any point. This feels like a Docker bug, but as they
say, bug for bug compatible.

In retrospect, using bools for NeedsChown and NeedsCopyUp was a
mistake. Docker isn't actually tracking this stuff; they're just
doing a copy-up and permissions change unconditionally as long as
the volume is empty. They also have the two linked as one
operation, seemingly, despite happening at very different times
during container init. Replicating that in our stateful system is
nontrivial, hence the need for the new CopiedUp field. Basically,
we never want to chown a volume with contents in it, except if
that data is a result of a copy-up that resulted from mounting
into the current container. Tracking who did the copy-up is the
easiest way to do this.

Fixes #22571

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2024-05-22 17:47:01 -04:00
d094a9f18e podman: fix --sdnotify=healthy with --rm
Now WaitForExit returns the exit code as stored in the db instead of
returning an error when the container was removed.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-05-22 21:34:38 +02:00
e166f6bfe0 libpod: wait another interval for healthcheck
wait for another interval when the container transitioned to "stopped"
to give more time to the healthcheck status to change.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-05-22 21:34:34 +02:00
fa05adba67 Merge pull request #22750 from containers/renovate/golangci-golangci-lint-1.x
[CI:DOCS] Update dependency golangci/golangci-lint to v1.58.2
2024-05-22 12:57:13 +00:00
4290f8115d Merge pull request #22775 from edsantiago/disable-minikube
CI: disable minikube task
2024-05-22 12:37:59 +00:00
60493c0780 Merge pull request #22761 from eriksjolund/update-network-performance-docs
[CI:DOCS] performance: update network docs
2024-05-22 12:35:14 +00:00
cc79d5e82e Merge pull request #22700 from Luap99/libpod-inspect-API-v4
remote API: restore v4 payload in container inspect
2024-05-22 12:32:29 +00:00
1a72a166c8 Merge pull request #22774 from ashley-cui/perms
[CI:DOCS] Fix windows action trigger
2024-05-22 12:29:44 +00:00
54cb3673ed Merge pull request #22776 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.18.0
2024-05-22 12:24:15 +00:00
ad1d3f8fc7 quadlet: Add a network requirement on .image units
If a container unit starts on boot with a dependency on `default.target`
the image unit may start too soon, before network is ready. This cause
the unit to fail to pull the image.
- Add a dependency on `network-online.target` to make sure image pulls
don't fail.
See https://github.com/containers/podman/issues/21873

- Document the hardcoded dependency on `network-online.target` for images unit
and explain how it can be overriden if necessary.

- tests/e2e/quadlet: Add `assert-last-key-regex`

Required to test the `After=` override in [Unit] section
See https://github.com/containers/podman/pull/22057#issuecomment-2008959993

- quadlet/unitfile: add a prepenUnitLine method

Requirements on networks should be inserted at the top of the
section so the user can override them.

Signed-off-by: jbtrystram <jbtrystram@redhat.com>
2024-05-22 13:46:42 +02:00
c9241c990f Merge pull request #22777 from dgibson/deprecated-addr
test, pasta: Ignore deprecated addresses in tests
2024-05-22 10:58:59 +00:00
d418391ce6 test, pasta: Ignore deprecated addresses in tests
The default_addr shell function in test/system/helpers.network is used to
get the host's default address, which is used in a number of pasta
networking tests.  However, in certain circumstances it can incorrectly
pick a deprecated address as the primary address.  Correct it to exclude
those.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2024-05-22 17:36:33 +10:00