Commit Graph

23615 Commits

Author SHA1 Message Date
openshift-merge-bot[bot] c3111c24c1
Merge pull request #23593 from cevich/fix_validate_renovate
[CI:ALL] Fix and validate renovate config
2024-08-12 19:08:03 +00:00
openshift-merge-bot[bot] bd53a11630
Merge pull request #23225 from edsantiago/no-more-ci-docs
pr-should-include-tests: no more CI:DOCS override
2024-08-12 18:46:02 +00:00
Ed Santiago 0d7e14fb83 healthcheck system check: reduce raciness
When will I learn not to dismiss something as "easy"?

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

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

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-12 12:23:54 -06:00
Chris Evich 8f191618e4
Validate renovate config in every PR
Signed-off-by: Chris Evich <cevich@redhat.com>
2024-08-12 14:10:28 -04:00
Ashley Cui 0177f74dc6 pkg/machine: Read stderr from ssh-keygen correctly
Read stderr from ssh-keygen before calling wait(), since cmd.Wait() closes cmd.StderrPipe() after it exits, causing a read-on-closed-pipe error.

Signed-off-by: Ashley Cui <acui@redhat.com>
2024-08-12 14:09:16 -04:00
Chris Evich e30b0978b8
Fix renovate config syntax error
Signed-off-by: Chris Evich <cevich@redhat.com>
2024-08-12 14:05:28 -04:00
Ed Santiago 36f9a04499 CI: 080-pause.bats: make parallel-safe
Only one test can be parallelized. Do so, and add a comment
to the other one explaining why it can't be.

Also, add some missing error-message checks.

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

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

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-08-12 12:00:09 -06:00
openshift-merge-bot[bot] 6738405d59
Merge pull request #23581 from Luap99/remote-ignore
remote: fix invalid --cidfile + --ignore
2024-08-12 16:13:30 +00:00
openshift-merge-bot[bot] 8f85a4da43
Merge pull request #23584 from rhatdan/error
Fix race condition when listing /dev
2024-08-12 15:48:25 +00:00
Daniel J Walsh 25d66d97d2
Additional potential race condition on os.Readdir
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-08-12 11:38:02 -04:00
openshift-merge-bot[bot] 4f2d98f228
Merge pull request #23564 from cevich/renovate_manage_requirements
[skip-ci] Maintain renovate configuration
2024-08-12 15:34:40 +00:00
Paul Holzinger 5ec413fac7
pkg/bindings/containers: handle ignore for stop
When the client gets a 404 back we know the container does not exists,
if ignore is set as well we should just ignore the error client side.

seen in #23554

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

Fixes #23554

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-12 17:12:12 +02:00
Chris Evich e111b6c0be
Update/simplify renovate config header comment
The previous comment included way too many details.  It also referenced
a docker-hub container image which is not accessible under all
circumstances.  Switch to the GitHub container registry and include
mention of the pre-commit hook that's available.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-08-12 11:08:12 -04:00
Chris Evich 6c0b8b64d4
Migrate renovate config to latest schema
The main change is a global "packageRules" config that encompasses all
rules instead of configuring them as options to a manager.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-08-12 11:08:11 -04:00
Daniel J Walsh d33abcdf10
Fix race condition when listing /dev
Also replace os.IsNotExist(err) with errors.Is(err, fs.ErrNotExist)

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-08-12 10:28:01 -04:00
openshift-merge-bot[bot] 708d6c5e2b
Merge pull request #23449 from ygalblum/quadlet-override-service-name
Quadlet override service name
2024-08-12 13:56:48 +00:00
openshift-merge-bot[bot] 7acaf714ca
Merge pull request #23496 from rhatdan/manifest
Should not force conversion of manifest type to DockerV2ListMediaType
2024-08-12 13:36:30 +00:00
openshift-merge-bot[bot] 594f01315b
Merge pull request #23485 from cgwalters/doc-quadlet-exec-more
[ci:docs] docs/podman-systemd: Try to clarify `Exec=` more
2024-08-12 13:28:34 +00:00
openshift-merge-bot[bot] 6ef3a2347a
Merge pull request #23577 from Luap99/save-error
libpod: fix broken saveContainerError()
2024-08-12 13:22:42 +00:00
Colin Walters d26341332c docs/podman-systemd: Try to clarify `Exec=` more
In podman-systemd we are intersecting the worlds of containers
and systemd, and I had to stop and think to understand what
`Exec=` does.

I tried to clarify things more here.

I found it especially confusing because the example at the
very top of the file does:

```
Image=quay.io/fedora/fedora
Exec=sleep 10
```

But that only makes sense because the fedora base image
(being generic) doesn't define an `ENTRYPOINT`, just a `CMD`.

But IMO by far the most common usage for podman-systemd
is "app images" which conventionally should use `ENTRYPOINT`
in general. Maybe we should change the default example,
but I'm leaving that for a later followup.

(It perhaps would have been less confusing if this field
 had been called `Args=` to make clear it's quite different
 in practice from systemd `ExecStart=`)

Signed-off-by: Colin Walters <walters@verbum.org>
2024-08-12 09:03:57 -04:00
openshift-merge-bot[bot] 40df14012b
Merge pull request #23569 from emersion/patch-1
[CI:DOCS] readme: replace GPG with PGP
2024-08-12 12:55:14 +00:00
Paul Holzinger ecf88f17b6
libpod: reset state error on init
If we manage to init/start a container successfully we should unset any
previously stored state errors. Otherwise a user might be confused why
there is an error in the state about some old error even though the
container works/runs.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-12 14:30:48 +02:00
openshift-merge-bot[bot] 52fe111b51
Merge pull request #23562 from cevich/rm_docker_py_dupe
De-duplicate docker-py testing
2024-08-12 12:05:41 +00:00
Paul Holzinger 20f3e8909e
test/system: pasta_test_do add explicit port check
Do not rely on an arbitrary delay in order to ensure the port was bound
in the container. Instead this approach checks if the port is bound in
the netns and only then starts the client. This speeds up the entire
test file by 50% but more importantly in parallel testing it solves
hangs as the timeout there was unreliable.

Fixes #23471

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-12 13:46:56 +02:00
Paul Holzinger 20a32d33cd
test/e2e: work around new push warning
c/image now throws a warning when using encryption and zstd:chunked as
they do not work together[1]. As CI uses default configs from fedora it
means rawhide now defaults to zstd:chunked which trigger the warning
there. To work around that force zstd compression.

[1] https://github.com/containers/image/issues/2485

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-12 12:15:52 +02:00
Paul Holzinger be41ee4131
vendor: update c/common to latest
Includes some netns cleanup fixes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-12 12:11:26 +02:00
Paul Holzinger 4aaa5cb6f0
stopIfOnlyInfraRemains: log all errors
Log all stopping errors for each container so we actually see the real
cause.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-12 12:11:26 +02:00
Paul Holzinger 78cb1e28cb
libpod: do not save expected stop errors in ctr state
If we try to stop a contianer that is not running or paused we get an
ErrCtrStateInvalid or ErrCtrStopped error. As podman stop is idempotent
this is not a user visable error at all so we should also never log it
in the container state.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-12 12:09:01 +02:00
Paul Holzinger f276d53532
libpod: fix broken saveContainerError()
We cannot unlock then lock again without syncing the state as this will
then save a potentially old state causing very bad things, such as
double netns cleanup issues.

The fix here is simple move the saveContainerError() under the same
lock. The comment about the re-lock is just wrong. Not doing this under
the same lock would cause us to update the error after something else
changed the container alreayd.

Most likely this was caused by a misunderstanding on how go defer's work.
Given they run Last In - First Out (LIFO) it is safe as long as out
defer function is after the defer unlock() call.

I think this issue is very bad and might have caused a variety of other
weird flakes. As fact I am confident that this fixes the double cleanup
errors.

Fixes #21569
Also fixes the netns removal ENOENT issues seen in #19721.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-12 11:19:47 +02:00
openshift-merge-bot[bot] 277e061878
Merge pull request #23498 from lelemka0/fix/quadlets/userLevelFilter
Quadlet: Fix `userLevelFilter` when `UnitDirAdmin` is a symlink
2024-08-11 13:43:34 +00:00
Uzinn Kagurazaka b0948a5cd0
Quadlet: fix filters failure when the search paths are symlinks
Rootless units placed in `users` would be loaded for root when
`/etc/containers/systemd` is a symlink. In this case, since
`UnitDirAdmin` is hardcoded, `userLevelFilter` always returns `true`.
If `/etc/containers/systemd/users` is a symlink, any user would load
other users' units.
Fix the above two problems.

Fixes: #23483

Signed-off-by: Uzinn Kagurazaka <uzinn.kagurazaka@11555511.xyz>
2024-08-11 18:01:13 +08:00
Simon Ser 2043d1647c
readme: replace GPG with PGP
GPG is the GNU tooling, PGP is the standard format.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-08-10 11:39:36 +02:00
openshift-merge-bot[bot] 48e727f1b4
Merge pull request #23552 from cevich/cleanup_python_cni
Drop APIv2 CNI configuration
2024-08-09 17:44:08 +00:00
Chris Evich a48cd241ad
Drop APIv2 CNI configuration
**Depends on PR 23538**

CNI is no longer needed/supported.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-08-09 10:20:38 -04:00
Chris Evich dcdb5408de
De-duplicate docker-py testing
Previously there were two CI tasks that ended up both testing docker-py
compatibility.  Remove the duplicate from the `localapiv2-python` make
target, and symlink the identical requirements file.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-08-09 10:13:02 -04:00
openshift-merge-bot[bot] dd1d2c136f
Merge pull request #23557 from deepskyblue86/crun-comm-3
chore(podmansnoop): explain why crun comm is 3
2024-08-09 13:09:09 +00:00
openshift-merge-bot[bot] d305a34b11
Merge pull request #23553 from Luap99/net-cleanup-err
libpod: cleanupNetwork() return error
2024-08-09 10:29:37 +00:00
Angelo Puglisi ec59508d4c chore(podmansnoop): explain why crun comm is 3
Signed-off-by: Angelo Puglisi <angelopuglisi86@gmail.com>
2024-08-09 10:57:59 +02:00
Paul Holzinger f2a03e5753
libpod: cleanupNetwork() return error
Return the error not just log as the caller can then decide to log this
and exit > 0. I also removed the c.valid check as I do not see what the
purpose of this would be. c.valid is only false when the ctr was removed
but then we should never get there as Cleanup() will not work on a
container in removing state.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-09 10:57:24 +02:00
openshift-merge-bot[bot] 8c79fa99f0
Merge pull request #23555 from containers/renovate/golang.org-x-sys-0.x
fix(deps): update module golang.org/x/sys to v0.24.0
2024-08-08 21:27:48 +00:00
openshift-merge-bot[bot] 07d367622a
Merge pull request #23551 from Luap99/e2e-timeout
test/e2e: improve command timeout handling
2024-08-08 21:25:04 +00:00
openshift-merge-bot[bot] d13f2a5b5c
Merge pull request #23538 from cevich/apiv2_python_use_local_reg
Reduce python APIv2 test net dependency
2024-08-08 21:22:20 +00:00
renovate[bot] 61a889de4c
fix(deps): update module golang.org/x/sys to v0.24.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-08 20:28:51 +00:00
openshift-merge-bot[bot] 8ecacdc087
Merge pull request #23541 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
Update module github.com/onsi/ginkgo/v2 to v2.20.0
2024-08-08 17:20:58 +00:00
Chris Evich 7936809f75
Reduce python APIv2 test net dependency
Previously these tests pulled some test images from quay, opening them up
to networking-flake induced failures.  As has already been done for
other tests, update to utilize the locally running registry server.

Also: Add `test/python/**` into the apiv2 task conditions as referenced
by the `Makefile` `localapiv2-python` target.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-08-08 10:40:22 -04:00
Chris Evich bf091abdc5
Fix not testing registry.conf updates
Previously, if anyone touched these files no extra testing would
trigger.  However, basically all testing depends on them.  Update the
condition and test that verifies it.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-08-08 10:40:22 -04:00
Paul Holzinger be2212804b
test/e2e: improve command timeout handling
Basically commit ada4e1a8c1 for e2e tests. The timeout does not kill the
process so if it is stucked it hangs forever. So make sure we kill it
via SIGABRT.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-08 16:27:23 +02:00