Commit Graph

6576 Commits

Author SHA1 Message Date
Ed Santiago 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
openshift-merge-bot[bot] 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
openshift-merge-bot[bot] 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
openshift-merge-bot[bot] 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
Paul Holzinger 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
Paul Holzinger 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
Paul Holzinger 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
Paul Holzinger 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
Paul Holzinger 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
Paul Holzinger 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
jkwiatko 7ce3c6bf1e undo auto-formatting
Signed-off-by: jkwiatko <jkwiatkoski@protonmail.com>
2024-05-27 11:33:04 -04:00
Paul Holzinger 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
Johannes Maibaum 9f823ecb25 Quadlet: Add support for .build files
.build files allow to build an image via Quadlet. The keys from a .build
file are translated to arguments of a `podman build` command by Quadlet.

Minimal keys for .build files are `ImageTag=` and a context directory,
see `SetWorkingDirectory=`, or a `File=` pointing to a Containerfile.

After sorting .build files into the Quadlet dependency order, there
remains a possible dependency cycle issue between .volume and .build
files: A .volume can have `Image=some.build`, and a .build can have
`Volume=some.volume:/some/volume`.

We solve this dependency cycle by prefilling resourceNames with all
image names from .build files before converting all the unit files.

This results in an issue for the test suite though: For .volume's
depending on *.image or *.build, we need to copy these additional
dependencies to the test's quadletDir, otherwise the test will fail.
This is necessary, because `handleImageSource()` actually needs to know
the image name defined in the referenced *.{build,image} file. It cannot
fall back on the default names, as it is done for networks or volumes,
for example.

Signed-off-by: Johannes Maibaum <jmaibaum@gmail.com>
2024-05-27 16:59:39 +02:00
Paul Holzinger 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
Paul Holzinger 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
Giuseppe Scrivano 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
jkwiatko b45364254f working name of pod on start and stop
Signed-off-by: jkwiatko <jkwiatkoski@protonmail.com>
2024-05-25 19:40:21 -04:00
renovate[bot] 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
openshift-merge-bot[bot] e53b96cb25
Merge pull request #22683 from grisu48/podmansh_sh
Add configuration for podmansh
2024-05-23 12:45:05 +00:00
openshift-merge-bot[bot] 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
Paul Holzinger 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
openshift-merge-bot[bot] 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
Matthew Heon 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
Giuseppe Scrivano 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
openshift-merge-bot[bot] 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
openshift-merge-bot[bot] 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
jbtrystram 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
David Gibson 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
renovate[bot] 08507f3ffe
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.18.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-22 02:14:25 +00:00
renovate[bot] 1766a1a24b
chore(deps): update dependency setuptools to v70
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-21 11:48:22 +00:00
openshift-merge-bot[bot] 8bb86586f8
Merge pull request #22740 from Luap99/rootlessnetns-hosts
fix incorrect host.containers.internal entry for rootless bridge mode
2024-05-20 12:35:22 +00:00
Paul Holzinger fb2ab832a7
fix incorrect host.containers.internal entry for rootless bridge mode
We have to exclude the ips in the rootless netns as they are not the
host. Now that fix only works if there are more than one ip one the
host available, if there is only one we do not set the entry at all
which I consider better as failing to resolve this name is a much better
error for users than connecting to a wrong ip. It also matches what
--network pasta already does.

The test is bit more compilcated as I would like, however it must deal
with both cases one ip, more than one so there is no way around it I
think.

Fixes #22653

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-17 12:28:44 +02:00
openshift-merge-bot[bot] cb658b061e
Merge pull request #22525 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.17.3
2024-05-17 09:31:47 +00:00
openshift-merge-bot[bot] f7a30461e0
Merge pull request #22658 from giuseppe/libpod-wait-for-healthy-on-main-thread
libpod: wait for healthy on main thread
2024-05-16 15:59:54 +00:00
openshift-merge-bot[bot] 31bfabf6af
Merge pull request #22715 from rhatdan/volumes1
Return StatusNotFound when multiple volumes matching occurs
2024-05-16 12:52:56 +00:00
Paul Holzinger 061bcc06ea
test: remove test_podman* scripts
They are not run in CI and to my knowledge are not used by anyone, we
have much more/better tests in test/e2e and test/system that should
cover everything done in these scripts so just delete them to not
confuse contributors.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-15 13:08:39 +02:00
Paul Holzinger cb905f59ea
test/system: fix documentation
First, point users to hack/bats for running them locally. Second, remove
TODO.md as it doesn't contain any helpful information. Basically all the
missing tests there have been added so this does not serve any purpose
and is missleading.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-15 13:08:39 +02:00
Daniel J Walsh 6408a05927
Return StatusNotFound when multiple volumes matching occurs
Fixes #22616

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-15 06:21:14 -04:00
Giuseppe Scrivano b06c58b4a5
libpod: wait for healthy on main thread
wait for the healthy status on the thread where the container lock is
held.  Otherwise, if it is performed from a go routine, a different
thread is used (since the runtime.LockOSThread() call doesn't have any
effect), causing pthread_mutex_unlock() to fail with EPERM.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-05-14 22:55:02 +02:00
Nalin Dahyabhai c46884aa93 `podman events`: check for an error after we finish reading events
The function that's handing us events will return an error after closing
the channel over which it's sending events, and its caller (in its own
goroutine) will then send that error over another channel.

The logic that started the goroutine is likely to notice that the events
channel is closed before noticing that the error channel has a result
for it to read, so any error that would have been communicated would be
lost.

When we finish reading events, check if the reader returned an error
before telling our caller that there was no error.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-05-14 13:18:51 -04:00
Paul Holzinger bcb7edfded
remote API: restore v4 payload in container inspect
The v5 API made a breaking change for podman inspect, this means that
an old client could not longer parse the result from the new 5.X server.
The other way around new client and old server already worked.

As it turned out there were several users that run into this, one case
to hit this is using an old 4.X podman machine wich now pulls a newer
coreos with podman 5.0. But there are also other users running into it.
In order to keep the API working we now have a version check and return
the old v4 compatible payload so the old remote client can still work
against a newer server thus removing any major breaking change for an
old client.

Fixes #22657

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-14 17:56:20 +02:00
openshift-merge-bot[bot] a6aa5c8fcf
Merge pull request #22673 from tnk4on/fix-farm-remote
Fix podman-remote support for `podman farm build`
2024-05-14 13:14:36 +00:00
openshift-merge-bot[bot] f568afec05
Merge pull request #22695 from Luap99/rootless-reexec
rootless: fix reexec to use /proc/self/exe
2024-05-14 12:16:53 +00:00
Paul Holzinger 2a609b0f74
rootless: fix reexec to use /proc/self/exe
Under some circumstances podman might be executed with a different argv0
than the actual path to the podman binary. This breaks the reexec logic
as it tried to exec argv0 which failed.

This is visible when using podmansh as login shell which get's the
special -podmansh on argv0 to signal the shell it is a login shell.

To fix this we can simply use /proc/self/exe as command path which is
much more robust and the argv array is still passed correctly.

Fixes #22672

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-14 12:02:19 +02:00
Ed Santiago d4e40fedaf ExitWithError() - enforce required exit status & stderr
Final followup to #22270. That PR added a temporary convention
allowing a new form of ExitWithError(), one with an exit code
and stderr substring. In order to allow bite-size progress,
the old no-args form was still allowed. This PR removes
support for no-args ExitWithError().

This PR also adds one piece of new functionality: passing ""
(empty string) as the stderr arg means "expect exit code
but fail if there's anything at all in stderr".

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-05-13 13:59:17 -06:00
Ed Santiago 82f9811a8d ExitWithError() - a few that I missed
Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-05-13 13:59:17 -06:00
openshift-merge-bot[bot] c9808e7edf
Merge pull request #22533 from Luap99/e2e-tmp-ci
run e2e test on tmpfs
2024-05-13 18:21:28 +00:00
openshift-merge-bot[bot] abfd0228d9
Merge pull request #22398 from andremarianiello/graceful-kube-down
Graceful shutdown during podman kube down
2024-05-13 16:45:14 +00:00
openshift-merge-bot[bot] dfab103bd3
Merge pull request #22660 from edsantiago/exitwitherror-rmi
ExitWithError() - rmi_test
2024-05-13 15:52:59 +00:00
openshift-merge-bot[bot] 3049bc4533
Merge pull request #22661 from edsantiago/exitwitherror-r
ExitWithError() - more r files
2024-05-13 15:35:43 +00:00
openshift-merge-bot[bot] 7fa103f277
Merge pull request #22582 from edsantiago/exitwitherror-part6
ExitWithError() - s files
2024-05-13 15:32:49 +00:00
Paul Holzinger e771618531
run e2e test on tmpfs
Follow up to commit eaf60c7fe7, with the toolbox image removal it is
possible to run all tests from tmpfs.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-13 17:26:16 +02:00
Ed Santiago 755fc021f9 ExitWithError() - rmi_test
Followup to #22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

This commit handles only one file, test/e2e/rmi_test.go , because
my changes are significant enough to merit individual review.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-05-13 07:24:36 -06:00
Ed Santiago 5e240ab1f5 ExitWithError() - more r files
Followup to #22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

This commit handles all remaining test/e2e/r*_test.go

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-05-13 07:24:28 -06:00
Ed Santiago 0c22de7811 ExitWithError() - s files
Followup to #22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

This commit handles test/e2e/s*_test.go

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-05-13 07:24:06 -06:00
Ed Santiago 03f036b515 ExitWithError() - more run_xxx tests
Followup to #22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

This commit handles a subset of test/e2e/run_xxx_test.go

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-05-13 07:23:58 -06:00
openshift-merge-bot[bot] 0c09421f85
Merge pull request #22641 from mheon/handle_stopping_loop
Ensure that containers do not get stuck in stopping
2024-05-13 12:32:40 +00:00
openshift-merge-bot[bot] 2e51803d41
Merge pull request #22638 from Luap99/vendor
update c/{buildah,common,image,storage} to latest main
2024-05-13 08:14:52 +00:00
Shion Tanaka 3b1c735b67 Fix podman-remote support for `podman farm build`
Signed-off-by: Shion Tanaka <shtanaka@redhat.com>
2024-05-12 03:01:22 +09:00
Matt Heon 3fa8e98a31 Ensure that containers do not get stuck in stopping
The scenario for inducing this is as follows:
1. Start a container with a long stop timeout and a PID1 that
   ignores SIGTERM
2. Use `podman stop` to stop that container
3. Simultaneously, in another terminal, kill -9 `pidof podman`
   (the container is now in ContainerStateStopping)
4. Now kill that container's Conmon with SIGKILL.
5. No commands are able to move the container from Stopping to
   Stopped now.

The cause is a logic bug in our exit-file handling logic. Conmon
being dead without an exit file causes no change to the state.
Add handling for this case that tries to clean up, including
stopping the container if it still seems to be running.

Fixes #19629

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-05-09 11:17:24 -04:00
openshift-merge-bot[bot] 4a11f1eeb4
Merge pull request #22648 from edsantiago/exitwitherror-p
ExitWithError() - rest of the p files
2024-05-09 12:04:37 +00:00
openshift-merge-bot[bot] 63ab9275b7
Merge pull request #22601 from xkr47/feat/quadlet-group-add
Quadlet/Container: Add GroupAdd option
2024-05-09 08:49:19 +00:00
Ed Santiago 9e43e586c9 ExitWithError() - rest of the p files
Followup to #22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

This commit handles all remaining test/e2e/p*_test.go

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-05-08 15:57:47 -06:00
Andre Marianiello a2cf948f90
Graceful shutdown during podman kube down
Signed-off-by: Andre Marianiello <andremarianiello@users.noreply.github.com>
2024-05-08 14:24:12 -04:00
openshift-merge-bot[bot] 092d0402ad
Merge pull request #22346 from edsantiago/exitwitherror-part2
ExitWithError() - continue tightening
2024-05-08 17:43:39 +00:00
Paul Holzinger 521bbab864
test/system: fix broken "podman volume globs" test
This never tested what it said it did, the command line was wrong so
`,ro=false` was taken as image causing a error. What this actually
should care about is that a glob is taken as is and not evaluated.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-08 15:01:20 +02:00
Jonas Berlin 6d1098f823 Quadlet/Container: Add GroupAdd option
Co-authored-by: Ygal Blum <ygal.blum@gmail.com>
Signed-off-by: Jonas Berlin <xkr47@outerspace.dyndns.org>
2024-05-08 16:00:28 +03:00
openshift-merge-bot[bot] db44d57b86
Merge pull request #22591 from Luap99/remove-toolbox-image
test/e2e: remove toolbox image
2024-05-08 11:41:52 +00:00
Ed Santiago 641cd7c5a2 ExitWithError() - continue tightening
Followup to #22270 : wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

A small number of tests were broken, as in, not actually testing
what they claimed to be testing. I've done my best to fix those.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-05-07 18:57:43 -06:00
openshift-merge-bot[bot] b63a85c81d
Merge pull request #22627 from edsantiago/exitwitherror-part8
ExitWithError() - play_kube_test.go
2024-05-07 18:02:38 +00:00
openshift-merge-bot[bot] 1150020cb2
Merge pull request #22635 from giuseppe/fix-test-for-powercap
test: improve test for powercap presence
2024-05-07 17:59:52 +00:00
Giuseppe Scrivano 303d0b398e
test: improve test for powercap presence
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-05-07 17:24:50 +02:00
renovate[bot] 164aef814e
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.17.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-07 14:28:18 +00:00
renovate[bot] be5cbc443e
fix(deps): update module golang.org/x/tools to v0.21.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-07 12:53:01 +00:00
openshift-merge-bot[bot] 2e624d2acf
Merge pull request #22613 from edsantiago/exitwitherror-part7
ExitWithError() - v files
2024-05-07 09:33:49 +00:00
openshift-merge-bot[bot] f078258c83
Merge pull request #22560 from edsantiago/exitwitherror-part4
ExitWithError() -- run_test.go
2024-05-07 01:40:47 +00:00
Ed Santiago 7d12ae0973 ExitWithError() - play_kube_test.go
Followup to #22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

This commit handles test/e2e/play_kube_test.go

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-05-06 15:59:53 -06:00
Ed Santiago 83ee16b9ba ExitWithError() - v files
Followup to #22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

This commit handles test/e2e/v*_test.go

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-05-06 08:42:48 -06:00
Paul Holzinger 7a43c2ed1b
test/e2e: remove toolbox image
The image is way to big (over 800MB) that slows tests down as we always
have to pull this, the tests itself are also super slow due the
entrypoint logic that we don't care about. We should be testing for
features needed and not specific tools.

I think the current changes should have a similar coverage in terms of
podman features, it no longer tests toolbox but IMO this never was a
task for podman CI tests.

The main driver for this is to make the tests run entirely based on
tmpfs and this image is just to much[1].

[1] https://github.com/containers/podman/pull/22533

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-05-03 16:45:51 +02:00
Dan Čermák 46f247d880
Also substitute $HOME in runlabel with user's homedir
Some programs have their configuration files relative to the user's
home. It would be convenient being able to mount these into the container, but
that requires expansion of `~` or `$HOME` in a label. This commit adds support
for that for the `runlabel` command.

Signed-off-by: Dan Čermák <dcermak@suse.com>
2024-05-03 14:00:20 +02:00
Ed Santiago 275c068df7 ExitWithError() - pod_xxx tests
Followup to #22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

This commit handles a subset of test/e2e/pod_xxxx_test.go
(I stopped before this grew too huge for review)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-05-02 08:48:24 -06:00
Ed Santiago c378f2d03a ExitWithError() -- run_test.go
Followup to #22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-05-01 07:41:10 -06:00
openshift-merge-bot[bot] 9b6a3a34ba
Merge pull request #22548 from edsantiago/tools-ginkgo-update
vendor ginkgo 2.17.2 into test/tools
2024-04-30 19:50:16 +00:00
openshift-merge-bot[bot] ce365db3a6
Merge pull request #22522 from containers/renovate/pytest-8.x
Update dependency pytest to v8.1.2
2024-04-30 18:40:53 +00:00
Ed Santiago 1bc6f16bd0 vendor ginkgo 2.17.2 into test/tools
..to match the version in root dir, to get rid of the mismatch
warning on every ginkgo run.

I still don't understand why renovatebot isn't doing this.

(Also, touch a file under e2e, to force tests to run)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-30 09:26:35 -06:00
Paul Holzinger 88b80c1df6
test/e2e: podman unshare image mount fix tmpdir leak
Because the test left the image mounted the cleanup failed to remove the
tmpdir as it contained an active mount point. Thus ensure we unmount the
image again to prevent this leak.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-29 14:16:37 +02:00
Paul Holzinger 0faded53b8
test/e2e: do not leak /tmp/private_file
This should use the proper per test tempdir which works just as well for
the purpose.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-29 14:16:37 +02:00
Paul Holzinger 88a625d319
test/e2e: "persistentVolumeClaim with source" do not leak file
Using /tmp means this file will be leaked and no deleted, switch to
using the per test tempdir which is removed after the test.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-29 14:16:36 +02:00
Ed Santiago eaf60c7fe7 e2e tests: use /var/tmp, not $TMPDIR, as workdirs
TMPDIR is typically /tmp which is typically(*) a tmpfs.

This PR ignores $TMPDIR when $CI is defined, forcing all
e2e tests to set up one central working directory in /var/tmp
instead.

Also, lots of cleanup.

 (*) For many years, up to and still including the time of
     this PR, /tmp on Fedora CI VMs is actually NOT tmpfs,
     it is just / (root). This is nonstandard and undesirable.
     Efforts are underway to remove this special case.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-26 14:29:56 -06:00
renovate[bot] 60b5488308
Update dependency pytest to v8.1.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-26 18:14:28 +00:00
Paul Holzinger 9a0ed6929a
test/e2e: force systemd cgroup manager
It is not clear why rootless was forced to the cgroupfs manager when
systemd is the default. In any case it causes local test failures as
described in the issue[1]. Using systemd manager makes them pass as
expected, I don't know enough aout cgroups to know the difference and
why certain tests have bad asumptions but this fixes it.

[1] https://github.com/containers/podman/issues/22474

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-26 14:37:31 +02:00
Paul Holzinger 537c21a49a
test/e2e: fix volumes and suid/dev/exec options
When the source dir is already mounted noexec, nodev or nosuid then a
rootless user cannot mount the dir into the container without these
options for obvious reasons.

So in order to run the test we must ensure the dir is mounted with these
options first, if they are simply skip as the test will fail otherwise.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-26 14:36:20 +02:00
Paul Holzinger 31034a1b6f
test/e2e: volumes and suid/dev/exec options works remote
--volume works fine with podman-remote you just need to know that the
path is server side.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-26 14:36:20 +02:00
Paul Holzinger cc6e999f2a
test/e2e: fix limits test
When you run locally with a higher oom_score_adj then the one used in
the test podman will print a warning and not set the oom lower then the
current value. Thus use 999 as value which should only cause problems
for users with oom_score_adj value of 1000 (max value) which seems
unlikely.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-26 14:36:19 +02:00
Matt Heon 30e2c923d6 Add the ability to automount images as volumes via play
Effectively, this is an ability to take an image already pulled
to the system, and automatically mount it into one or more
containers defined in Kubernetes YAML accepted by `podman play`.

Requirements:
- The image must already exist in storage.
- The image must have at least 1 volume directive.
- The path given by the volume directive will be mounted from the
  image into the container. For example, an image with a volume
  at `/test/test_dir` will have `/test/test_dir` in the image
  mounted to `/test/test_dir` in the container.
- Multiple images can be specified. If multiple images have a
  volume at a specific path, the last image specified trumps.
- The images are always mounted read-only.
- Images to mount are defined in the annotation
  "io.podman.annotations.kube.image.automount/$ctrname" as a
  semicolon-separated list. They are mounted into a single
  container in the pod, not the whole pod.

As we're using a nonstandard annotation, this is Podman only, any
Kubernetes install will just ignore this.

Underneath, this compiles down to an image volume
(`podman run --mount type=image,...`) with subpaths to specify
what bits we want to mount into the container.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-25 14:12:27 -04:00
Matt Heon 693ae0ebc6 Add support for image volume subpaths
Image volumes (the `--mount type=image,...` kind, not the
`podman volume create --driver image ...` kind - it's strange
that we have two) are needed for our automount scheme, but the
request is that we mount only specific subpaths from the image
into the container. To do that, we need image volume subpath
support. Not that difficult code-wise, mostly just plumbing.

Also, add support to the CLI; not strictly necessary, but it
doesn't hurt anything and will make testing easier.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-25 14:12:27 -04:00
openshift-merge-bot[bot] 273020160c
Merge pull request #22504 from mheon/bump_buildah_fix_ci
Bump buildah to fix CI
2024-04-25 18:06:20 +00:00
Matt Heon 5f57571d65 Bump Buildah to latest main
Includes fixes from Ed's treadmill script.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-25 12:17:43 -04:00
Ed Santiago e4c9910aec ExitWithError() - yet more low-hanging fruit
Followup to [1]#22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

Just trying to shrink down #22346 to a manageable, reviewable size.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-24 09:04:50 -06:00
openshift-merge-bot[bot] 1a23451067
Merge pull request #22486 from edsantiago/exitwitherror-morelowhangingfruit
ExitWithError() - more low-hanging fruit
2024-04-24 14:58:22 +00:00
openshift-merge-bot[bot] a7c61c31a3
Merge pull request #22465 from Luap99/go1.21
Update to go 1.21
2024-04-24 14:30:59 +00:00
Ed Santiago 80c3a22440 ExitWithError() - more low-hanging fruit
Followup to #22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

More low-hanging fruit: small reviewable chunks

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-24 07:11:40 -06:00
Ed Santiago 4da5c5d3aa ExitWithError() - low-hanging fruit
Followup to #22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

Because #22346 is stalled, these are some trivial easy-to-review
changes that get us closer to the goal.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-24 05:44:40 -06:00
Paul Holzinger 83dbbc3a51
Replace golang.org/x/exp/slices with slices from std
Use "slices" from the standard library, this package was added in go
1.21 so we can use it now.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-23 11:16:40 +02:00
openshift-merge-bot[bot] 318437f7b5
Merge pull request #22455 from edsantiago/e2e-stop-littering
e2e tests: stop littering
2024-04-22 14:31:09 +00:00
openshift-merge-bot[bot] 6d347927a6
Merge pull request #22443 from Luap99/podman-healthcheck-events
add containers.conf healthcheck_events support
2024-04-22 13:49:52 +00:00
Ed Santiago ac04cb4ac5 e2e tests: stop littering
"tmpdir + string" does not do what you think it does.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-22 06:43:19 -06:00
openshift-merge-bot[bot] c2cadfb5c5
Merge pull request #22322 from mheon/update_the_config
Make `podman update` changes persistent
2024-04-22 07:50:48 +00:00
Paul Holzinger 2ae6d0d4dd
add containers.conf healthcheck_events support
When the field is set to false we should never log healthcheck events.

Fixes https://issues.redhat.com/browse/RHEL-18987

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-19 17:29:48 +02:00
Giuseppe Scrivano 1991990d5a
pkg/specgen: use fileutils.(Le|E)xists
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-04-19 09:52:14 +02:00
Giuseppe Scrivano 598fc516a6
vendor: update containers/{buildah,common,image,storage}
The change in healthcheck_run_test.go, depends on the
containers/image change:

commit b6afa8ca7b324aca8fd5a7b5b206fc05c0c04874
Author: Mikhail Sokolov <msokolov@evolution.com>
Date:   Fri Mar 15 13:37:44 2024 +0200

    Add support for Docker HealthConfig.StartInterval (v25.0.0+)

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-04-19 09:52:13 +02:00
Paul Holzinger b1736c472a
test/compose: remove compose v1 code
Now that we only test compose v2 remove the special cases from the test
code to simply the tests.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-18 14:48:37 +02:00
Evgeni Golov 7b3456b5d9 add `list` as an alias to list networks
this makes it consistent with other commands,
but also makes the example actually work

Signed-off-by: Evgeni Golov <evgeni@golov.de>
2024-04-17 17:10:22 +02:00
Matt Heon 482ef7bfcf Add support for updating restart policy
This is something Docker does, and we did not do until now. Most
difficult/annoying part was the REST API, where I did not really
want to modify the struct being sent, so I made the new restart
policy parameters query parameters instead.

Testing was also a bit annoying, because testing restart policy
always is.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-17 08:23:51 -04:00
Matt Heon ddea30e40e Add Compat API for Update
The Docker endpoint here is kind of a nightmare - accepts a full
Resources block, including a large number of scary things like
devices. But it only documents (and seems to use) a small subset
of those. This implements support for that subset. We can always
extend things to implement more later if we have a need.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-17 08:23:51 -04:00
Matt Heon be3f075402 Make `podman update` changes persistent
The logic here is more complex than I would like, largely due to
the behavior of `podman inspect` for running containers. When a
container is running, `podman inspect` will source as much as
possible from the OCI spec used to run that container, to grab
up-to-date information on things like devices. We don't want to
change this, it's definitely the right behavior, but it does make
updating a running container inconvenient: we have to rewrite the
OCI spec as part of the update to make sure that `podman inspect`
will read the correct resource limits.

Also, make update emit events. Docker does it, we should as well.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-17 08:23:50 -04:00
Ed Santiago 7ef0290a1d Emergency fix (well, skip) for failing bud tests
nixery registry has been down all day. Disable test.

Someone will need to fix this on the buildah end.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-16 17:21:04 -06:00
renovate[bot] 3dc69a01e3
chore(deps): update module golang.org/x/crypto to v0.17.0 [security]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 17:41:53 +00:00
openshift-merge-bot[bot] 2364b90736
Merge pull request #22357 from Luap99/swagger
fix api swagger docs
2024-04-15 17:40:39 +00:00
renovate[bot] 0e291ce760
chore(deps): update dependency setuptools to ~=69.5.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-13 17:31:33 +00:00
Paul Holzinger 5e9725983d
install swagger from source
First of all this removes the need for a network connection, second
renovate can update the version as it is tracked in go.mod.

However the real important part is that the binary downloads are
broken[1]. For some reason the swagger created with them does not
include all the type information for the examples. However when building
from source the same thing works fine.

[1] https://github.com/go-swagger/go-swagger/issues/2842

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-12 15:26:34 +02:00
openshift-merge-bot[bot] b8a684b64d
Merge pull request #22347 from rhatdan/exec
podman exec CID without command should exit 125
2024-04-12 12:51:35 +00:00
Daniel J Walsh 5e68fbd132
podman exec CID without command should exit 125
Fixes: https://github.com/containers/podman/issues/22329

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-12 07:44:22 -04:00
openshift-merge-bot[bot] e1ec17a569
Merge pull request #22352 from edsantiago/systest-prefetch
(minor) prefetch systemd image before use
2024-04-12 10:52:54 +00:00
openshift-merge-bot[bot] 4b2c7f272e
Merge pull request #22319 from Luap99/exposed-ports-ps
podman ps: show exposed ports under PORTS as well
2024-04-12 10:11:43 +00:00
Ed Santiago df69b36ee5 (minor) prefetch systemd image before use
Two system tests were relying on $SYSTEMD_IMAGE but were not
running _prefetch. This led to baffling flakes that wasted
my time. (Quay flakes, of course. New manifestation.)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-11 13:48:27 -06:00
openshift-merge-bot[bot] d65f3996dd
Merge pull request #21889 from containers/renovate/pytest-8.x
chore(deps): update dependency pytest to v8
2024-04-11 15:09:50 +00:00
openshift-merge-bot[bot] 8a7c3ea2f5
Merge pull request #22266 from baude/run2077
Add os, arch, and ismanifest to libpod image list
2024-04-11 15:01:32 +00:00
Brent Baude 08a49389c8 Add os, arch, and ismanifest to libpod image list
when listing images through the restful service, consumers want to know
if the image they are listing is a manifest or not because the libpod
endpoint returns both images and manifest lists.

in addition, we now add `arch` and `os` as fields in the libpod endpoint
for image listing as well.

Fixes: #22184
Fixes: #22185

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-04-11 08:46:37 -05:00
Ed Santiago 67c6d7ec80 vendor ginkgo 2.17.1 into test/tools
...to match the version in root dir, to get rid of the mismatch
warning on every ginkgo run.

The last bump was done by renovatebot; I don't know why bot didn't
do it this time.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-10 15:18:42 -06:00
Paul Holzinger 999d6c0750
fix "concurrent map writes" in network ls compat endpoint
Not sure why this only triggers now but this code was broken for a
while. It is racy as reported on the issue but because it changes the
actual map part of the network backend it means it can also alter the
behavior of the network which is very bad.

Fixes #22330

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-10 18:41:20 +02:00
renovate[bot] 26f866b5df
chore(deps): update dependency pytest to v8
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-10 12:39:09 +00:00
Ed Santiago 2d9159821a e2e: redefine ExitWithError() to require exit code
...and an optional error-message string, to be checked
against stderr.

This is a starting point and baby-steps progress toward #18188.
There are 249 ExitWithError() checks in test/e2e. It will take
weeks to fix them all. This commit enables new functionality:

    Expect(ExitWithError(125, "expected substring"))

...while also allowing the current empty-args form. Once
all 249 empty-args uses are modernized, the matcher code
will be cleaned up.

I expect it will take several months of light effort to get
all e2e tests transitioned to the new form. I am choosing to
do so in pieces, for (relative) ease of review. This PR:

  1) makes the initial changes described above; and
  2) updates a small subset of e2e _test.go files such that:
     a) ExitWithError() is given an exit code and error string; and
     b) Exit(Nonzero) is changed to ExitWithError(Nonzero, "string")
        (when possible)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-10 06:35:52 -06:00
Paul Holzinger 0bedf7f1d2
podman ps: show exposed ports under PORTS as well
Docker shows exposed ports as just PORT/PROTO so match that behavior. It
is not clear to me why someone needs that information in ps as "expose"
doesn't effect anything networking related.

Fixes https://issues.redhat.com/browse/RHEL-32154

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-10 14:24:23 +02:00
openshift-merge-bot[bot] 9fc46dfb67
Merge pull request #22314 from edsantiago/blow-a-fuse
e2e tests: remove requirement for fuse-overlayfs
2024-04-09 19:33:40 +00:00
renovate[bot] 266801bf2d
fix(deps): update module golang.org/x/tools to v0.20.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-09 11:42:31 +00:00
Ed Santiago 847ca1f9ea e2e tests: remove requirement for fuse-overlayfs
As of April 2024, it's no longer included in rawhide by default.
We could force-install it, but it's 2024 and it seems likely
that all systems on which Podman 5 will run will have kernels
that support native overlay.

I also added two debugging printfs to the 'podman info' test
that initially failed on an (unpublished) rawhide VM. Without
these printfs it was impossible to diagnose the failure.

Updating docs is left as a future exercise.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-09 05:25:20 -06:00
openshift-merge-bot[bot] 447d3e2a44
Merge pull request #22277 from Luap99/runroot
podman --runroot: remove 50 char length restriction
2024-04-06 11:12:07 +00:00
openshift-merge-bot[bot] 19600fa5e3
Merge pull request #22265 from containers/renovate/requests-mock-1.x
Update dependency requests-mock to ~=1.12.1
2024-04-05 16:27:27 +00:00
Paul Holzinger fcf9327773
podman --runroot: remove 50 char length restriction
This was added ages ago in commit c65b3599cc, however in the meantime
both podman and conmon can support longer socket paths as they use a
workaround to open the path via /proc/self/fd, see openUnixSocket() in
libpod/oci_conmon_attach_linux.go

Thus this restriction is not needed anymore and we can drop a workaround
in the tests.

Fixes #22272

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-05 14:41:50 +02:00
renovate[bot] beb4fd1b4a
Update dependency requests-mock to ~=1.12.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-04 18:37:25 +00:00
Paul Holzinger f2c365c6f6
rm --force work for more than one arg
When we remove with --force we do not return a error if the input does
not exists, however if we get more than on input we must try to remove
all and not just NOP out and not remove anything just because one arg
did not exists.

Also make the code simpler for commands that do have the --ignore option
and just make --force imply --ignore which reduces the ugly error
handling.

Fixes #21529

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-04 17:47:28 +02:00
openshift-merge-bot[bot] 8ab4bc9250
Merge pull request #22243 from Luap99/rootless-netns
vendor latest c/common to fix rootless-netns issues
2024-04-04 11:40:35 +00:00
openshift-merge-bot[bot] 0106e5929d
Merge pull request #22245 from giuseppe/do-not-chown-again-with-U
container: do not chown to dest target with U
2024-04-03 15:33:34 +00:00
openshift-merge-bot[bot] 6b9b85e011
Merge pull request #22175 from edsantiago/skip_if_no_slirp
systests: conditionalize slirp4netns tests
2024-04-03 13:32:19 +00:00
Paul Holzinger a61ae8c0a9
test/system: add rootless-netns test for setup errors
This is a test for #22168.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-03 15:01:51 +02:00
Giuseppe Scrivano 519a66c6a9
container: do not chown to dest target with U
if the 'U' option is provided, do not chown the destination target to
the existing target in the image.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-04-03 14:41:33 +02:00
Ed Santiago d27313ad10 systests: conditionalize slirp4netns tests
As of podman 5.0, slirp4netns is a soft dependency. It might
not be installed on a host (and, in gating tests, is not).
Deal with it.

Use podman itself, not 'which', to tell us if slirp4netns
is available. We don't want to duplicate podman's path-check
logic. Since this check is expensive, cache the result.

(Change the has_pasta check similarly)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-03 05:49:21 -06:00
Ed Santiago e697631af9 CI: systests: instrument flaky tests
Three infrequent flakes. Add debug code to help track
down if/when they happen again.

And, one of them, fix a logic bug that will save us 8-10s
on system tests runs.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-03 05:26:51 -06:00
Giuseppe Scrivano 7d68362cf5
test: do not skip tests under rootless
there are no overlay mounts in the "podman run with --volume and U
flag" tests so no need to skip them.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-04-03 11:02:16 +02:00
openshift-merge-bot[bot] e1f49529fa
Merge pull request #22229 from giuseppe/fix-idmap-existing-volume
libpod: use original IDs if idmap is provided
2024-04-01 19:08:29 +00:00
Giuseppe Scrivano d81319eb71
libpod: use original IDs if idmap is provided
if the volume is mounted with "idmap", there should not be any mapping
using the user namespace mappings since this is done at runtime using
the "idmap" kernel feature.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-03-31 23:46:17 +02:00
Ed Santiago aab4674feb CI: Bump VMs to 2024-03-28
Emergency update to get pasta 03-26. Also gives us crun 1.14.4.

One unexplained difference: fc39 and rawhide now create:

    /run/log/journal/SOMETHING/system.journal

...and the SOMETHING is o-rwx. This triggers journalctl to spit out a warning:

    Hint: You are currently not seeing messages from the system.
          Users in groups 'adm', 'systemd-journal', 'wheel' can see all messages.
          Pass -q to turn off this notice.

...which in turn causes ExitCleanly() to fail.

It is not clear who/what is creating this journal directory, or
why it allofasudden started just now. Workaround is to add -q
to journalctl in one test.

One more difference, another test now requires SYSLOG capability.

VM package info:
    https://github.com/containers/automation_images/pull/342

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-03-28 08:35:29 -06:00
openshift-merge-bot[bot] a1a5bd3bd5
Merge pull request #21493 from mporrato/fix-21211
kube play: always pull when both imagePullPolicy and tag are missing
2024-03-27 21:58:45 +00:00
openshift-merge-bot[bot] 25ebf10967
Merge pull request #22177 from mheon/fix_22172
Add rootless network command to `podman info`
2024-03-26 17:15:53 +00:00
Matt Heon b56331cd2f Add rootless network command to `podman info`
Useful to tell whether containers are being made with pasta or
slirp4netns by default. Info is bloated enough already that I
don't really have concerns about shoving more into it.

Fixes #22172

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-03-26 09:56:48 -04:00
diplane 83fe867c14 Add support for annotations
Fix following issues:
- create container API handler ignores Annotations from HostConfig
- inspect container API handler does not provide Annotations as
  part of HostConfig

Signed-off-by: diplane <diplane3d@gmail.com>
2024-03-22 19:38:22 +00:00
openshift-merge-bot[bot] 3a327fa16e
Merge pull request #22096 from containers/renovate/github.com-cpuguy83-go-md2man-v2-2.x
Update module github.com/cpuguy83/go-md2man/v2 to v2.0.4
2024-03-20 15:54:11 +00:00
openshift-merge-bot[bot] 5bcafe7ae0
Merge pull request #22019 from saschagrunert/cri-o-annotations
Remove CRI-O related annotations
2024-03-20 15:51:29 +00:00
openshift-merge-bot[bot] d5a2c4166e
Merge pull request #22089 from edsantiago/minikube-debug
minikube: instrument tests, to allow debugging failures
2024-03-20 15:40:26 +00:00
renovate[bot] a872003a2a
Update module github.com/cpuguy83/go-md2man/v2 to v2.0.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-20 11:43:15 +00:00
Ed Santiago aa5c4879b4 minikube: instrument tests, to allow debugging failures
New run_minikube() helper, modeled after run_podman(). Echoes
each command being run and its output. On failure, runs minikube logs.

Addresses (does not close) #21931 which is hitting us hard in CI.
Probably quay flakes, but it's impossible to tell without logs.

Also: bug fix: one "run podman" fixed to run_podman

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-03-19 11:11:44 -06:00
Paul Holzinger dc1795b4b2
use new c/common pasta2 setup logic to fix dns
By default we just ignored any localhost reolvers, this is problematic
for anyone with more complicated dns setups, i.e. split dns with
systemd-reolved. To address this we now make use of the build in dns
proxy in pasta. As such we need to set the default nameserver ip now.

A second change is the option to exclude certain ips when generating the
host.containers.internal ip. With that we no longer set it to the same
ip as is used in the netns. The fix is not perfect as it could mean on a
system with a single ip we no longer add the entry, however given the
previous entry was incorrect anyway this seems like the better behavior.

Fixes #22044

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-19 12:09:31 +01:00
Stefano Brivio 23433ec7bd test/system: Add support for multipath routes in pasta networking tests
In some environments, such as the one described in
https://github.com/containers/podman/issues/20927, the default route
is given as nexthop gateways. That is, it's a multipath routes with
multiple gateways.

That means that pasta(1), after commit 6c7623d07bbd ("netlink: Add
support to fetch default gateway from multipath routes"), can start
and use a default gateway from that route.

Just like in pasta(1), in these tests, the default route indicates
which upstream interface we should pick. If we ignore multipath
routes, IPv6 addresses and gateway addresses themselves won't be
available, so, while pasta is now able to configure the container,
IPv6 tests will expect to find no address and no gateway, hence fail
due to the mismatch.

Try to get routes, including gateway addresses and interface names,
from nexthop objects, in case the selection of a regular default
route yields no results.

Link: https://github.com/containers/podman/issues/20927
Closes: #20927
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2024-03-18 14:29:38 +01:00
openshift-merge-bot[bot] f5abca415d
Merge pull request #21979 from chilikk/fix-exec-headers
fix invalid HTTP header values when hijacking a connection
2024-03-14 19:38:46 +00:00
renovate[bot] d5e0ecc619
Update dependency setuptools to ~=69.2.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-14 02:36:50 +00:00
Denys Knertser 2ff5716b7e fix invalid HTTP header values when hijacking a connection
Signed-off-by: Denys Knertser <denys@avassa.io>
2024-03-12 23:05:25 +01:00
Sascha Grunert 1901403eda
Removing CRI-O related annotations
The annotations should be maintained by CRI-O itself to decouple the
projects from a dependency perspective.

[NO NEW TESTS NEEDED]

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-03-12 14:56:06 +01:00
openshift-merge-bot[bot] 35a8b03267
Merge pull request #21949 from edsantiago/more-flake-fixes
CI: try to fix more flakes
2024-03-06 14:04:06 +00:00
openshift-merge-bot[bot] 9c73326e12
Merge pull request #21948 from edsantiago/fix-checkpoint-race
e2e: fix potential race in file-locks test
2024-03-05 21:10:56 +00:00
Ed Santiago 39851a0b98 CI: try to fix more flakes
Most of them look like our usual "assume too much about run -d".

One of them is just an unexpected warning, a push retry. Remove
the ExitCleanly() from that test, just rely on Exit(0).

The other two have to do with podman logs, which we know can lag.
Add a short 1-second retry loop.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-03-05 12:15:22 -07:00
Ed Santiago 945995be10 e2e: fix potential race in file-locks test
Two test flakes in the past week. Looks like the usual race
between "run -d" and "assume the container is ready". I don't
know if this will resolve them, but it's still a good idea.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-03-05 07:55:06 -07:00
Paul Holzinger 9ee96a9569
properly implement pull-error event status
Commit 03f6589f3 added basic support for pull-error event from libimage
but it contains several problems:
1. storing the error as error type prevents it from being unmarshalled,
   thus change it to a string
2. the error was never propagated from the libimage event to the podman
   event struct
3. the error message was not wired into the cli and API

This commit fixes these problems.

Fixes #21458

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-05 10:50:42 +01:00
renovate[bot] 155cd463da
fix(deps): update module golang.org/x/tools to v0.19.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-05 06:58:51 +00:00
Paul Holzinger ebce0e71da
test/e2e: check for stderr errors in cleanup()
There are many code paths which only do logrus but still exit 0 so this
should catch more bugs. Unfortunately runc logs way to much random stuff
so we ignore this check for runc right now.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-04 11:25:22 +01:00
openshift-merge-bot[bot] 0ace66f1ae
Merge pull request #21904 from containers/renovate/python-dateutil-2.x
chore(deps): update dependency python-dateutil to ~=2.9.0
2024-03-01 18:15:34 +00:00
Brent Baude 0898b338b0 Use stop timeout of zero for system reset
when performing a system reset with containers that run somewhere where
a soft kill wont work (like sleep), containers will wait 10 seconds
before terminating with a sigkill.  But for a forceful action like
system reset, we should outright set no timeout so containers stop
quickly and are not waiting on a timeout

Fixes #21874

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-03-01 10:51:58 -06:00
renovate[bot] 542883b9ba
chore(deps): update dependency python-dateutil to ~=2.9.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-01 14:45:10 +00:00
Daniel J Walsh 3abc488c84
Vendor in containers/(buildah, common)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 20:06:28 -05:00
openshift-merge-bot[bot] 38546de7b6
Merge pull request #21892 from rhatdan/codespell
[SKIP-ci] Run codespell on code
2024-03-01 00:34:01 +00:00
openshift-merge-bot[bot] b736c461bb
Merge pull request #21563 from mheon/test_pasta_default
Vendor c/common pasta branch for testing
2024-02-29 22:13:47 +00:00
Daniel J Walsh 4a03da22ad
Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 16:55:31 -05:00
openshift-merge-bot[bot] 1519c04212
Merge pull request #21886 from containers/renovate/pytest-7.x
Update dependency pytest to v7.4.4
2024-02-29 20:45:48 +00:00
openshift-merge-bot[bot] b681209efe
Merge pull request #21653 from nalind/fun-with-artifacts
podman manifest add: support creating artifact manifest on the fly
2024-02-29 19:04:03 +00:00
renovate[bot] 52fd284fd4
Update dependency pytest to v7.4.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-29 18:42:48 +00:00
openshift-merge-bot[bot] 98a9aee2d2
Merge pull request #21601 from flobz/feature/docker_v1.44_compat
Make inspect compatible with docker v1.44 API
2024-02-29 18:42:01 +00:00
openshift-merge-bot[bot] 41fa1c2c5c
Merge pull request #21878 from giuseppe/fix-manifest-test-assumption
test: fix manifest e2e test assumption
2024-02-29 18:22:45 +00:00
Matt Heon 4c1c4c082a Vendor latest c/common and fix tests
This vendors the latest c/common version, including making Pasta
the default rootless network provider. That broke a number of
tests, which have been fixed as part of this PR.

Also includes a change to network stats logic, which simplifies
the code a bit and makes it actually work with Pasta.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-29 12:16:51 -05:00
Giuseppe Scrivano c50826cea9
test: fix manifest e2e test assumption
fix an assumption in the test, that the --compression-format is
unchanged from the original image.

Instead validate that all the required architectures are part of the
manifest.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-02-29 18:13:37 +01:00
Nalin Dahyabhai f168b3c115 podman manifest add: support creating artifact manifest on the fly
Add a --artifact flag to `podman manifest add` which can be used to
create an artifact manifest for one or more files and attach it to a
manifest list.  Corresponding --artifact-type, --artifact-config-type,
--artifact-config, --artifact-layer-type, --artifact-subject, and
--artifact-exclude-titles options can be used to fine-tune the fields in
the artifact manifest that don't refer to the files themselves.

Add a --index option to `podman manifest annotate` that will cause
values passed to the --annotation flag to be applied to the manifest
list as a whole instead of to an entry in the list.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-02-29 11:47:44 -05:00
Daniel J Walsh 66d60384f4
add --retry --retry-delay to podman run/create
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 10:20:21 -05:00
Daniel J Walsh c3c0c4ab96
Add support for podman push --retry --retry-delay
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 10:20:21 -05:00
openshift-merge-bot[bot] 98d1ad5a22
Merge pull request #21875 from Luap99/mount-test
test/system: fix mount external container test
2024-02-29 14:58:09 +00:00
Paul Holzinger 99b2f369db
test/system: fix mount external container test
Checking for the mountdir is not relevent, a recent c/storage change[1] no
longer deletes the mount point directory so the check will cause a false
positive. findmnt exits 1 when the given path is not a mountpoint so
let's use that to check.

[1] 3f2e81abb3

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-29 13:48:26 +01:00
openshift-merge-bot[bot] 690b671ecd
Merge pull request #20774 from giuseppe/passthrough-tty
logging: new mode -l passthrough-tty
2024-02-29 12:43:36 +00:00
openshift-merge-bot[bot] c1ac602d39
Merge pull request #21868 from edsantiago/reenable-boltdb-upgrade-test
Reenable boltdb upgrade tests
2024-02-29 09:47:35 +00:00
Ed Santiago 064258b496 Reenable boltdb upgrade tests
Upgrade-from-v4.1 was temporarily disabled in #21618: we brought
in new CI VMs, and v4.1 setup no longer works. Nobody quite
understands why, and we've hit diminishing returns in the
investigation (#21863). The current thinking is that it
is related to netavark, and versions < 1.3 do not work
in the current f39 VMs. (No clue why, because f39 kernel
did not change in #21618).

Anyhow, reenable the pre-4.8 upgrade test, using v4.3.1
which has netavark-1.4.0 which seems to work fine. For now.

Also, some upgrade test cleanup:
 - Skip, not fail, if initial setup fails. Makes for less noisy logs.
 - Remove duplicate --pid=host
 - Ports: 808x -> 909x, because 8081 is used by restraint on 1mt

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-28 11:49:54 -07:00
Florian Bezannier 1de94dceb5 ci: fix module not found
Signed-off-by: Florian Bezannier <florian.bezannier@hotmail.fr>
2024-02-28 19:45:03 +01:00
Florian Bezannier facad62afe tests: fix after make podman inspect cmd return compatible with Docker API v1.44
Signed-off-by: Florian Bezannier <florian.bezannier@hotmail.fr>
2024-02-28 19:45:03 +01:00
Florian Bezannier 2cd72c272f tests: add docker api compatibility test
Signed-off-by: Florian Bezannier <florian.bezannier@hotmail.fr>
2024-02-28 19:45:03 +01:00
Giuseppe Scrivano 950f612b56
logging: new mode -l passthrough-tty
it works in a similar way to passthrough but it allows to be used also
on a TTY.

conmon support: https://github.com/containers/conmon/pull/465

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-02-28 17:23:59 +01:00
Paul Holzinger 5952486df8
podman network inspect: include running containers
Like docker podman network inspect should output the information of
running container with their ip/mac address on this network.
However the output format is not docker compatible as this cannot
include all the info we have and the previous output was already not
compatible so this is not new.

New example output:
```
[
     {
          ...
          "containers": {
               "7c0d295779cee4a6db7adc07a99e635909413a390eeab9f951edbc4aac406bf1": {
                    "name": "c2",
                    "interfaces": {
                         "eth0": {
                              "subnets": [
                                   {
                                        "ipnet": "10.89.0.4/24",
                                        "gateway": "10.89.0.1"
                                   },
                                   {
                                        "ipnet": "fda3:b4da:da1e:7e9d::4/64",
                                        "gateway": "fda3:b4da:da1e:7e9d::1"
                                   }
                              ],
                              "mac_address": "1a:bd:ca:ea:4b:3a"
                         }
                    }
               },
               "b17c6651ae6d9cc7d5825968e01d6b1e67f44460bb0c140bcc32bd9d436ac11d": {
                    "name": "c1",
                    "interfaces": {
                         "eth0": {
                              "subnets": [
                                   {
                                        "ipnet": "10.89.0.3/24",
                                        "gateway": "10.89.0.1"
                                   },
                                   {
                                        "ipnet": "fda3:b4da:da1e:7e9d::3/64",
                                        "gateway": "fda3:b4da:da1e:7e9d::1"
                                   }
                              ],
                              "mac_address": "f6:50:e6:22:d9:55"
                         }
                    }
               }
          }
     }
]
```

Fixes #14126
Fixes https://issues.redhat.com/browse/RHEL-3153

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-28 16:33:26 +01:00
Ed Santiago ee52f9cd7a systests: kube play URL: workaround for ECONNREFUSED
I'm tired of this flake, it's hitting us ~once/day. Root cause
still unknown.

Workaround: add a READY file to the http server, and run 'curl'
until we get it. Tested in #17831 for the last two weeks, flake
has not been seen even once since then.

Closes: #21649

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-27 11:55:20 -07:00
openshift-merge-bot[bot] 3352111dd6
Merge pull request #21825 from Luap99/compose
some podman compose fixes
2024-02-27 15:11:30 +00:00
Paul Holzinger a210a4d7c2
test/compose: add test for default connection
Make sure that we use the --connection correctly with podman compose.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 13:44:34 +01:00
Paul Holzinger d9aff9b41e
podman compose: only trim path suffix when ssh protocol
For a unix socket we should not trim this at all. The problem exists for
ssh only so make sure we only do this when a ssh URL is given.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 13:44:26 +01:00
Ed Santiago 7d5a68c9cd CI: e2e: use distinct ports, not just 5000
Too many tests use port 5000. Although there's a putative GetPortLock()
it seems to be unreliable, and we often get what appear to be collisions
between tests.

A proper solution would be to pseudorandomly allocate ports, verify
that they're not being reused, Sprintf() these everywhere that
needs them, and sprinkle some powdered cinnamon on top.

This is not that proper solution.

Fixes: #20655

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-27 04:30:26 -07:00
Daniel J Walsh 5b28a2b4a0
Fix podman stop -t -1 CID
Currently if a user specifies a negative time to stop a container the
code ends up specifying the negative time to time.Duration which treats
it as 0. By settine the default to max.Unint32 we end up with a positive
number which indicates > 68 years which is probably close enough to
infinity for our use case.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-26 16:15:10 -05:00
Ed Santiago 83671ac347 systests: enable ipv6 tests
...commented out long long ago with a now-obsolete TODO

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-26 05:49:31 -07:00
openshift-merge-bot[bot] b8e0427a43
Merge pull request #21789 from Romain-Geissler-1A/ignore-docker-endpoint-config-in-non-bridge-mode
Ignore docker's end point config when the final network mode isn't bridge
2024-02-26 09:51:27 +00:00
renovate[bot] 53b5fc781f
Update module golang.org/x/tools to v0.18.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-25 14:34:17 +00:00
Romain Geissler 127a8060ab
Ignore docker's end point config when the final network mode isn't bridge.
Closes #21754

Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
2024-02-23 21:11:25 +00:00
openshift-merge-bot[bot] a19f4ef988
Merge pull request #21793 from mtrmac/allow-zstd-config
Adjust some tests to work with Zstd in containers.conf
2024-02-22 22:02:55 +00:00
Miloslav Trmač 3e76e594b8 Fix assumptions in 'push with --add-compression and --force-compression'
When we want the original image to be gzip, explicitly ask for that
instead of assuming the containers.conf defaults do that.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-02-22 17:13:57 +01:00
Miloslav Trmač 8e99c697fc Fix assumptions in 'push test --force-compression"'
When we want the original image to be gzip, explicitly ask for that
instead of assuming the containers.conf defaults do that.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-02-22 17:13:53 +01:00
Paul Holzinger 8f1cebf96f
cmd/podman: remove duplicated event ToHumanReadable()
ToHumanReadable() exists twice now, there is no reason for this just
call the function on the backend event type is fine as this still has to
be used there.

It also fixes a bug where the wrong event type was passed to the
template which did not match the docs and json output.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-22 12:10:57 +01:00
AhmedGrati a3a1b44c31
libpod/events: Update event time format and add timeNano
Add new event type in cmd/podman to better match the docker format.

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-22 11:32:48 +01:00
openshift-merge-bot[bot] 70091d57e7
Merge pull request #21699 from vikas-goel/i21663
Comply to Kubernetes specifications for annotation size.
2024-02-21 15:00:25 +00:00
Vikas Goel 89b415ba37 Comply to Kubernetes specifications for annotation size.
An annotation is a pair of key-value. The key has two parts, viz. a name and an optional prefix in DNS format.

The limitations on name is 63, prefix 253 chars. The limitation on total size of all key+value pairs combined is 256KB.

https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set

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

Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
2024-02-20 14:58:35 -08:00
openshift-merge-bot[bot] 2fbc1c1503
Merge pull request #21766 from edsantiago/fix-search-flake-again
CI: fix search-test flakes
2024-02-20 20:22:19 +00:00
Ed Santiago 1c61f766d4 CI: fix search-test flakes
Seeing constant e2e test failures today, in search tests.

Reason: tests are searching for "alpine", which is common,
and we're hitting pollution.

Solution: search for "testdigest_v2s<x>", an image in quay
under the libpod namespace. And, in other tests that rely
on docker.io, switch to quay.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-20 09:41:56 -07:00
Ed Santiago 7746e2a3fe systests: auto-update: minor cleanup
- use PODMAN_TMPDIR, not BATS_TMPDIR, for temp file
- in teardown, do not assume that SNAME_FILE will exist
  (test could fail before that file gets created)
- remove "?" ("ignore exit status") from rmi & prune.
  Probably holdovers from the days before -f. If
  these commands fail even with -f, we need to know.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-20 07:37:35 -07:00
Daniel J Walsh 4f13b836bf
Codespell code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-19 15:23:56 -05:00
Ed Santiago 3fd09dd18a System tests: enable debugging for parallel-rm test
There's currently no way to inspect failures of the
parallel-remove test (#21742). Add debugging ability.

Also, clean up nasty red warnings

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-19 09:12:33 -07:00
Daniel J Walsh 7ba23cd6fc
Allow podman pull to specify --retry and --retry-delay
Fixes: https://github.com/containers/podman/issues/19770

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-17 07:37:26 -05:00
openshift-merge-bot[bot] 9bc94dd99c
Merge pull request #21651 from containers/renovate/docker.io-library-golang-1.x
chore(deps): update docker.io/library/golang docker tag to v1.22
2024-02-16 13:55:17 +00:00
Matt Heon 3ca2213607 Add a helper for stopping pods and containers in E2E
This removes a lot of boilerplate, but also ensures that every
stop test that is not directly testing podman stop or podman pod
stop uses `-t0` for quick, error-free stopping.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-15 09:35:55 -05:00
Ed Santiago e5f86f8628 More test tweaks to avoid "StopSignal ... 10 seconds" warning
Continuing to see CI failures of the form "StopSignal SIGTERM
failed to stop container in 10 seconds". Work around those,
either by adding "-t0" to podman stop, or by using Expect(Exit(0))
instead of ExitCleanly().

Addresses, but does not close, #20196

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-14 18:27:26 -07:00
Vikas Goel 42a78c714c Add volumes-from support using annotation in kube yaml
The reserved annotation io.podman.annotations.volumes-from is made public to let user define volumes-from to have one container mount volumes of other containers.

The annotation format is: io.podman.annotations.volumes-from/tgtCtr: "srcCtr1:mntOpts1;srcCtr2:mntOpts;..."

Fixes: containers#16819

Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
2024-02-14 07:31:43 -08:00
renovate[bot] 41c3f9d4b1
chore(deps): update docker.io/library/golang docker tag to v1.22
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-14 14:03:04 +00:00
renovate[bot] 45b701b125
chore(deps): update dependency setuptools to ~=69.1.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-13 19:38:50 +00:00
openshift-merge-bot[bot] 9bf3cf6584
Merge pull request #21611 from giuseppe/correctly-chown-to-existing-dir-in-userns
libpod: correctly map UID/GID for existing dirs
2024-02-13 02:48:26 +00:00
openshift-merge-bot[bot] 007ccee9e2
Merge pull request #21618 from edsantiago/vms-with-netavark-10-3
Bump CI VMs to ones with netavark 1.10.3
2024-02-13 02:42:56 +00:00
Giuseppe Scrivano c29fde2656
libpod: correctly map UID/GID for existing dirs
if the target mount path already exists and the container uses a user
namespace, correctly map the target UID/GID to the host values before
attempting a chown.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-02-12 23:04:24 +01:00
openshift-merge-bot[bot] 01bd79b371
Merge pull request #21523 from umohnani8/memory-final
Use persist dir for oom file
2024-02-12 21:38:43 +00:00
Ed Santiago 5eb801a562 Bump CI VMs to ones with netavark 1.10.3
And, runc-1.12 broke our seccomp e2e tests (runc now calls getcwd(),
which is the dummy syscall blocked for testing seccomp). Switch
to blocking link() instead.

Also, disable v4.1.0 upgrade tests. They're hanging, and I have
no idea why, and have wasted most of a day debugging.

Fixes: #21546

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-12 13:55:03 -07:00
Urvashi Mohnani 667311c7d5 Use persist dir for oom file
Conmon writes the exit file and oom file (if container
was oom killed) to the persist directory. This directory
is retained across reboots as well.
Update podman to create a persist-dir/ctr-id for the exit
and oom files for each container to be written to. The oom
state of container is set after reading the files
from the persist-dir/ctr-id directory.
The exit code still continues to read the exit file from
the exits directory.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2024-02-12 09:13:39 -05:00
Maurizio Porrato cb81da9bee
kube play: always pull when both imagePullPolicy and tag are missing
Align the behaviour of `podman kube play file.yaml` to Kubernetes' by forcing
an image pull when `imagePullPolicy` is omitted and the container image does
not specify a tag.

Signed-off-by: Maurizio Porrato <mporrato@redhat.com>
2024-02-10 17:49:26 +00:00
openshift-merge-bot[bot] abb94397f9
Merge pull request #21585 from Luap99/port-range-flake
fix "podman run port forward range" flake
2024-02-09 17:04:32 +00:00
Paul Holzinger 1ca608ea99
fix "podman run port forward range" flake
For some reason this starting to flake f38. I don't think the issue in
podman rather the test start nc -l in the background so it may not yet
have bound the port in the container when we try to connect.
To fix this simply add some retry logic to nc.

While at it also add pasta to this test and make it use
defer-assertion-failures to run all loop iterations before reporting the
errors.

Fixes #21561 (hopefully)

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-09 14:34:34 +01:00
Ed Santiago dbfa201c9a new testimage and systemd-image
Simply because it's been a while since the last testimage
build, and I want to confirm that our image build process
still works.

Added /home/podman/healthcheck. This saves us having to
podman-build on each healthcheck test. Removed now-
unneeded _build_health_check_image helper.

testimage: bump alpine 3.16.2 to 3.19.0

systemd-image: f38 to f39
  - tzdata now requires dnf **install**, not reinstall
    (this is exactly the sort of thing I was looking for)

PROBLEMS DISCOVERED:
  - in e2e, fedoraMinimal is now == SYSTEMD_IMAGE. This
    screws up some of the image-count tests (CACHE_IMAGES).

  - "alter tarball" system test now barfs with tar < 1.35.

TODO: completely replace fedoraMinimal with SYSTEMD_IMAGE
in all tests.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-09 05:26:07 -07:00
openshift-merge-bot[bot] 5311233f86
Merge pull request #21556 from ygalblum/quadlet-comment-line
Quadlet - do not look for line continuation in comment lines
2024-02-08 19:54:38 +00:00
openshift-merge-bot[bot] 4570ccb95d
Merge pull request #21535 from edsantiago/upgrade_tests
Upgrade tests: reenable, but revamped
2024-02-08 17:26:11 +00:00
openshift-merge-bot[bot] 88b994902d
Merge pull request #21512 from Luap99/pasta-netname-removal
drop support for "pasta" as a network name
2024-02-08 17:17:55 +00:00
Matt Heon 72f1617fac Bump Go module to v5
Moving from Go module v4 to v5 prepares us for public releases.

Move done using gomove [1] as with the v3 and v4 moves.

[1] https://github.com/KSubedi/gomove

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-08 09:35:39 -05:00
openshift-merge-bot[bot] 4fc52ed068
Merge pull request #21534 from mheon/stats_per_interface
Send container stats over API on a per-interface basis
2024-02-08 14:19:08 +00:00
openshift-merge-bot[bot] 246831b50f
Merge pull request #21409 from rhatdan/events
Show network name network events with podman -remote events
2024-02-08 14:16:24 +00:00
openshift-merge-bot[bot] 9ad07d10b9
Merge pull request #21446 from vikas-goel/network
Set interface name to the network_interface name for macvlan and ipvlan networks
2024-02-08 13:32:41 +00:00
Ed Santiago e20b70c2e6 Upgrade tests: reenable, but revamped
No longer bother testing any 2.x or 3.x. Only 4.1 and above.

Remove all CNI-related code. CNI is gone.

Add DatabaseBackend tests, confirming that we can handle
both boltdb and sqlite.

Require BATS >= 1.8.0, and use "run -0" to do exit-status checks.

Update docs.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-08 06:22:56 -07:00
openshift-merge-bot[bot] 4c9bd246c3
Merge pull request #21514 from Luap99/pod-inspect-output
make podman pod inspect output a json array
2024-02-08 11:31:40 +00:00
Ygal Blum d47979761f Quadlet - do not look for line continuation in comment lines
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-02-08 13:03:33 +02:00
openshift-merge-bot[bot] 8a6165e592
Merge pull request #21522 from Luap99/restart-userns
fix userns + restart policy with slirp4netns
2024-02-08 10:41:54 +00:00
Vikas Goel a8b2256cc1 Set interface name to the network_interface name for macvlan and ipvlan networks
When interface_name attribute in containers.conf file is set to "device", then set interface names inside containers same as the network_interface names of the respective network.

The change applies to macvlan and ipvlan networks only. The interface_name attribute value has no impact on any other types of networks.

If the interface name is set in the user request, then that takes precedence.

Fixes: #21313

Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
2024-02-06 19:05:16 -08:00
Matt Heon 6e0decbe03 Send container stats over API on a per-interface basis
This mirrors how the Docker API handles things, allowing us to be
more compatible with Docker and more verbose on the Libpod API.
Stats are given as per network interface in the container, but
still aggregated for `podman stats` and `podman pod stats`
display (so the CLI does not change, only the Libpod and Compat
APIs).

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-06 17:05:07 -05:00
Daniel J Walsh c7910e75e3
Show network name network events with podman -remote events
Fixes: https://github.com/containers/podman/issues/21311

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-06 15:43:05 -05:00
openshift-merge-bot[bot] 22b1650619
Merge pull request #21530 from Luap99/netavark-skip
test/e2e: unskip netavark macvlan/ipvlan tests
2024-02-06 19:21:05 +00:00
Paul Holzinger a997d7d819
test/e2e: unskip netavark macvlan/ipvlan tests
These should all work with the latest netavark. The ipvlan case needs a
subnet because it does not support DHCP.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-06 15:49:34 +01:00
openshift-merge-bot[bot] 75e6564138
Merge pull request #21497 from vikas-goel/volsfrom
Use semi-colon as the field separator for internal volumes-from inspect annotation
2024-02-06 14:35:34 +00:00
Paul Holzinger 7d15bc2efb
fix userns + restart policy with slirp4netns
Currently we deadlock in the slirp4netns setup code as we try to
configure an non exissting netns. The problem happens because we tear
down the netns in the userns case correctly since commit bbd6281ecc but
that introduces this slirp4netns problem. The code does a proper new
network setup later so we should only use the short cut when not in a
userns.

Fixes #21477

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-06 13:50:07 +01:00
Lokesh Mandvekar 01a8539ef0
Warn if cgroups-v1
Podman v5 will not support cgroups-v1. This commit will print a warning
if it detects a cgroups-v1 system. The warning can be hidden by setting
envvar `PODMAN_CGROUPSV1_WARNING`.

This warning is patched out for RHEL 9 builds as cgroups-v1 will still
be supported on RHEL 9 systems.

Resolves: https://issues.redhat.com/browse/RUN-1957

[NO NEW TESTS NEEDED]

Co-authored-by: Ed Santiago <santiago@redhat.com>
Co-authored-by: Sascha Grunert <sgrunert@redhat.com>
Co-authored-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-02-06 16:18:05 +05:30
Paul Holzinger 35d1f12213
make podman pod inspect output a json array
Just like all the other inspect commands that accept multiple args we
should just make podman pod inspect output a json array.
This makes the code more consistent and removes the extra workaround
which was needed before to support this.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-05 17:26:55 +01:00
Ashley Cui 26cd01ee51 Do not test CNI in CI
CNI is deprecated and is build tagged out for 5.0. Don't test it in our CI.
This commit also disables upgrade tests for now - those need more work since the old version of Podman only uses CNI. Upgrade tests will be re-vamped in a later commit.
Signed-off-by: Ashley Cui <acui@redhat.com>
2024-02-05 11:01:21 -05:00
Paul Holzinger 249474a84e
drop support for "pasta" as a network name
The pasta network mode has been added in podman v4.4 and this causes a
conflict with named networks that could also be called "pasta". To not
break anything we had special logic to prefer the named network over the
network mode. Now with 5.0 we can break this and remove this awkward
special handling from the code.

Containers created with 4.X that use a named network pasta will also
continue to work fine, this chnage will only effect the creation of new
containers with a named network pasta and instead always used the
network mode pasta. We now also block the creation of networks with the
name "pasta".

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-05 13:57:24 +01:00
Vikas Goel a098899104 Use semi-colon as the field separator for internal volumes-from inspect annotation
The current field separator comma of the inspect annotation conflicts with the mount options of --volumes-from as the mount options itself can be comma separated.

Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
2024-02-05 00:16:53 -08:00
openshift-merge-bot[bot] 11c37d5c95
Merge pull request #21272 from rhatdan/VENDOR
Add tests to make sure mounts.conf does not warn on missing content
2024-02-02 16:03:39 +00:00
openshift-merge-bot[bot] 5e64d4f021
Merge pull request #21068 from alexlarsson/quadlet-templates
Support templates in quadlet
2024-02-02 10:36:18 +00:00
Daniel J Walsh 0da4054534
Verify the empty mounts.conf does not generate warnings.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-01 20:12:08 -05:00
openshift-merge-bot[bot] 7cb0c2ef09
Merge pull request #21000 from rhatdan/machine
Strip key/values of external quotes
2024-02-02 00:59:03 +00:00
openshift-merge-bot[bot] d8c58936a4
Merge pull request #21414 from umohnani8/farm-reg
Farm build should read server registries.conf
2024-02-01 19:37:17 +00:00
Ed Santiago 1ab55defbb Test new CI VMs
From https://github.com/containers/automation_images/pull/325

Major change: netavark and aardvark are now included in prior-fedora,
so CNI can be fully eliminated from CI (#21410)

FIXME FIXME FIXME: skip two e2e tests, waiting for new netavark

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-01 09:50:41 -07:00
openshift-merge-bot[bot] f7afaf9652
Merge pull request #21455 from vrothberg/resolve-endpoint
add new libpod/images/$name/resolve endpoint
2024-01-31 21:06:57 +00:00
Urvashi Mohnani a06685a548 Farm build should read server registries.conf
Fix the way we set skipTLSVerify on the client side
to ensure that the push stage in farm build takes into
account the configuration in the farm node's registries.conf
when the user hasn't set it on the client side.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2024-01-31 15:41:27 -05:00
Valentin Rothberg b028f6aa75 add new libpod/images/$name/resolve endpoint
Podman Desktop [1] is looking into improving the user experience which
requires to know the source of an image.  Consider the user triggers an
image pull and Podman Desktop wants to figure out whether the image name
refers to a Red Hat registry, for instance, to prompt installing the RH
auth extension.

Since the input values of images may be a short name [2], Podman Desktop
has no means to figure out the (potential) source of the image.  Hence,
add a new `/resolve` endpoint to allow external callers to figure out
the (potential) fully-qualified image name of a given value.

With the new endpoint, Podman Desktop can ask Podman directly to resolve
the image name and then make an informed decision whether to prompt the
user to perform certain tasks or not.  This for sure can also be used
for any other registry (e.g., Quay, Docker Hub).

[1] https://github.com/containers/podman-desktop/issues/5771
[2] https://www.redhat.com/sysadmin/container-image-short-names

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2024-01-31 16:20:16 +01:00
Paul Holzinger 74454bf59c
rework system connection and farm storage
We now no longer write containers.conf, instead system connections and
farms are written to a new file called podman-connections.conf.

This is a major rework and I had to change a lot of things to get this
to compile again with my c/common changes.

It is a breaking change for users as connections/farms added before this
commit can now no longer be removed or modified directly. However because
the logic keeps reading from containers.conf the old connections can
still be used to connect to a remote host.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-01-31 15:08:41 +01:00
openshift-merge-bot[bot] 1698fa0ad8
Merge pull request #21388 from ashley-cui/healthcheck
Return nil health when inspecting containers without healthchecks
2024-01-31 13:48:36 +00:00
Ashley Cui a1c47f0299 Return nil health when inspecting containers without healthchecks
When inspecting a container that does not define any health check, the health field should return nil. This matches docker behavior.

Signed-off-by: Ashley Cui <acui@redhat.com>
2024-01-30 23:09:13 -05:00
openshift-merge-bot[bot] dabbcb8386
Merge pull request #21339 from mheon/specgen_to_pointer_v2
Convert SpecGen values to be nullable where possible
2024-01-30 19:06:14 +00:00
Matt Heon 174631f726 Convert SpecGen values to be nullable where possible
SpecGen is our primary container creation abstraction, and is
used to connect our CLI to the Libpod container creation backend.
Because container creation has a million options (I exaggerate
only slightly), the struct is composed of several other structs,
many of which are quite large.

The core problem is that SpecGen is also an API type - it's used
in remote Podman. There, we have a client and a server, and we
want to respect the server's containers.conf. But how do we tell
what parts of SpecGen were set by the client explicitly, and what
parts were not? If we're not using nullable values, an explicit
empty string and a value never being set are identical - and we
can't tell if it's safe to grab a default from the server's
containers.conf.

Fortunately, we only really need to do this for booleans. An
empty string is sufficient to tell us that a string was unset
(even if the user explicitly gave us an empty string for an
option, filling in a default from the config file is acceptable).
This makes things a lot simpler. My initial attempt at this
changed everything, including strings, and it was far larger and
more painful.

Also, begin the first steps of removing all uses of
containers.conf defaults from client-side. Two are gone entirely,
the rest are marked as remove-when-possible.

[NO NEW TESTS NEEDED] This is just a refactor.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-01-30 10:42:24 -05:00
openshift-merge-bot[bot] c41c30bedd
Merge pull request #21180 from rhatdan/nvidia
Make --gpus work with nvidia gpus
2024-01-30 14:59:02 +00:00
openshift-merge-bot[bot] 37bff82246
Merge pull request #21397 from rhatdan/codespell
Run codespell on code
2024-01-29 09:17:33 +00:00
openshift-merge-bot[bot] d7bf1385d8
Merge pull request #21260 from umohnani8/img-filters
Fix image filters parsing
2024-01-28 12:39:55 +00:00
Daniel J Walsh 8d14d41555
Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-01-28 07:30:52 -05:00
Alexander Larsson cd5982e988 quadlet: Add tests for templates
Signed-off-by: Alexander Larsson <alexl@redhat.com>
2024-01-26 13:57:47 +01:00
Urvashi Mohnani 202cab6124 Fix inspect test that rely on digest
Given that we can have multiple image digests,
fix the inspect test to check whether the digest
given matches one of the digests of the image.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2024-01-25 15:05:48 -05:00
openshift-merge-bot[bot] a0ad2cfaa2
Merge pull request #21342 from ygalblum/kube-play-pvc-image-based
Kube Play - allow creating image based volumes
2024-01-25 17:35:20 +00:00
Urvashi Mohnani 90867d987e Fix image filters parsing
Fix the image filter parsing in the common libraries
to follow an AND logic for all filters passed in ensuring
compatibility with Docker behavior.
Also fix the filter parsing on the tunnel side so that we grab
all the filters given by the user and not only the last filter
in the list.
Add tests for the fixes.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2024-01-25 11:10:41 -05:00
openshift-merge-bot[bot] 01b2243e73
Merge pull request #21322 from containers/renovate/github.com-docker-docker-25.x
Update module github.com/docker/docker to v25
2024-01-24 16:07:20 +00:00
renovate[bot] 3e6bfb6e99 Update module github.com/docker/docker to v25
[NO NEW TESTS NEEDED]

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2024-01-24 13:21:28 +01:00
Ygal Blum 269149a9fd Kube Play - allow creating image based volumes
Add volume.podman.io/image annotation to allow setting the source image

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-01-24 11:55:29 +02:00
openshift-merge-bot[bot] 97cd376e7f
Merge pull request #21300 from mheon/deprecate_boltdb
Deprecate BoltDB, preventing creation of new databases.
2024-01-23 22:11:24 +00:00
Matt Heon cf0b436b96 Deprecate BoltDB, preventing creation of new databases.
This is one of the breaking changes in Podman 5.0: removing the
ability to create new instances of the old Bolt database. This
does not remove support for the database entirely, as existing
Bolt databases will still be usable, but all new installs will
use SQLite after this point - if Bolt is forced by config, we'll
just error.

We don't have plans to outright remove the Bolt code. If that
were to happen, it'd be Podman 6.0 at least, and a significant
enough change it'd warrant a lot of discussion and planning. We
do intend to start winding down support of BoltDB, though, and
new features may be added only to SQLite from here on.

I have added an escape hatch via an undocumented environment
variable that allows us to continue testing BoltDB in CI (and, if
necessary, locally) but I don't want this to be used for any
purpose except continued testing of the old DB to ensure we don't
break it.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-01-23 12:56:49 -05:00
Alberto Faria 5cc83da1c6 Pass the OCI runtime an empty entrypoint when there is no entrypoint
Some OCI runtimes (cf. [1]) may tolerate container images that don't
specify an entrypoint even if no entrypoint is given on the command
line. In those cases, it's annoying for the user to have to pass a ""
argument to podman.

If no entrypoint is given, make the behavior the same as if an empty ""
entrypoint was given.

[1] https://github.com/containers/crun-vm

Signed-off-by: Alberto Faria <afaria@redhat.com>
2024-01-23 10:10:44 +00:00
renovate[bot] 70c3accf7c
Update module golang.org/x/tools to v0.17.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-18 18:58:28 +00:00
renovate[bot] e757f7631e
Update module github.com/onsi/ginkgo/v2 to v2.14.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-17 20:22:02 +00:00
openshift-merge-bot[bot] d38ee1364d
Merge pull request #21267 from danishprakash/new-pod-behavior
rm pod with run, create if ctr creation failed with --pod new:
2024-01-17 20:20:52 +00:00
danishprakash 1c88b12204
rm pod with podman run if ctr creation failed
Currently, if the container creation failed with
either run or create and you've used --pod with new:
the pod would be created nonetheless. This change ensures
the pod just created is also cleaned up in case
of container creation failure

Fixes #21228

Signed-off-by: danishprakash <danish.prakash@suse.com>
2024-01-17 18:59:32 +05:30
Ed Santiago e66413b51b CI: reenable tests that are working again
- #15074 ("subtree_control" flake). The flake is NOT FIXED, I
  saw it six months ago on my (non-aarch64) laptop. However,
  it looks like the frequent-flake-on-aarch64 bug is resolved.
  I've been testing in #17831 and have not seen it. So,
  tentatively remove the skip and see what happens.

- Closes: #19407 (broken tar, "duplicates of file paths")
  All Fedoras now have a fixed tar. Debian DOES NOT, but
  we're handling that in our build-ci-vm code. I.e., the
  Debian VM we're using has a working tar even though there's
  currently a broken tar out in the wild.

  Added distro-integration tag so we can catch future problems
  like this in OpenQA.

- Closes: #19471 (brq / blkio / loopbackfs in rawhide)
  Bug appears to be fixed in rawhide, at least in the VMs we're
  using now.

  Added distro-integration tag because this test obviously
  relies on other system stuff.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-01-16 10:07:48 -07:00
openshift-merge-bot[bot] 9fed92ba89
Merge pull request #21234 from edsantiago/sdnotify_race
systests: kube with policies test: fix race
2024-01-15 20:36:57 +00:00
openshift-merge-bot[bot] 3a46fe858f
Merge pull request #21069 from umohnani8/new-farmbuild-2
farm build: push built images to registry
2024-01-15 18:41:29 +00:00
Urvashi Mohnani d95710a89c farm build: push built images to registry
Update farm build to directly push images to a registry
after all the builds are complete on all the nodes.
A manifest list is then created locally and pushed to
the registry as well.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2024-01-15 11:31:17 -05:00