21092 Commits

Author SHA1 Message Date
0a72e3dadf fix(deps): update github.com/docker/go-connections digest to fa09c95
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-04 02:04:47 +00:00
8d0be64093 Merge pull request #20829 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.13.2
2023-12-04 01:59:49 +00:00
2a28f3bc73 Merge pull request #20879 from containers/renovate/common-image-and-storage-deps
fix(deps): update github.com/containers/image/v5 digest to 671ab94
2023-12-04 01:57:04 +00:00
8b4235a553 Merge pull request #20883 from sigulete1/main
[CI:DOCS] Update podman-systemd.unit.5 - Typos
2023-12-03 15:02:35 +00:00
4033515816 Merge pull request #20864 from containers/renovate/github.com-openshift-imagebuilder-digest
fix(deps): update github.com/openshift/imagebuilder digest to ef2a5fe
2023-12-03 11:55:37 +00:00
1672318439 Merge pull request #20852 from cevich/win_fail_ok_todo
Enable win podman-machine test failure
2023-12-03 11:52:49 +00:00
5af152ec29 Merge pull request #20874 from mheon/eval_symlinks_on_db_paths
Handle symlinks when checking DB vs runtime configs
2023-12-03 11:50:03 +00:00
7e2a8d58ab Quadlet .pod - add support for the Volume Key
Add e2e tests
Update documentation

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-12-03 10:23:13 +02:00
212b4c9e93 Quadlet .pod - add support for the Network Key
Add e2e tests
Update documentation

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-12-03 10:22:33 +02:00
0d260bdc1f Quadlet - fix pod service file name
Using replaceExtension breaks when the service name has a dot
Just add .service

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-12-03 09:53:52 +02:00
04519234e8 Add support for the userns annotation in kube play
[NO NEW TESTS NEEDED]

Signed-off-by: Anchit Bajaj <ab@abifog.com>
2023-12-02 23:14:29 +01:00
f384bdf66b Handle symlinks when checking DB vs runtime configs
When Podman starts, it checks a number of critical runtime paths
against stored values in the database to make sure that existing
containers are not broken by a configuration change. We recently
made some changes to this logic to make our handling of the some
options more sane (StaticDir in particular was set based on other
passed options in a way that was not particularly sane) which has
made the logic more sensitive to paths with symlinks. As a simple
fix, handle symlinks properly in our DB vs runtime comparisons.

The BoltDB bits are uglier because very, very old Podman versions
sometimes did not stuff a proper value in the database and
instead used the empty string. SQLite is new enough that we don't
have to worry about such things.

Fixes #20872

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-12-02 15:48:47 -05:00
e14aa09bb9 Update podman-systemd.unit.5.md
Correction of typos and copy pastes

Signed-off-by: Daniel Mendizabal <daniel@darhon.com>
2023-12-02 23:53:07 +11:00
6efba48e22 fix(deps): update github.com/containers/image/v5 digest to 671ab94
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-02 00:37:33 +00:00
bc124dd13f Merge pull request #20819 from cgiradkar/20752_farm_flag_move
Move the --farm flag to farm build command
2023-12-01 21:12:38 +00:00
c47962802a Merge pull request #20657 from nalind/commit-config
RHEL-14922: accept a config blob alongside the "changes" slice when committing
2023-12-01 21:09:23 +00:00
5364fbd7e4 Merge pull request #20869 from dfr/freebsd-hostname
libpod: Detect whether we have a private UTS namespace on FreeBSD
2023-12-01 17:21:09 +00:00
4e21ce5ba0 fix(deps): update module github.com/shirou/gopsutil/v3 to v3.23.11
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-01 13:13:11 +00:00
3b03e85471 Merge pull request #20789 from umohnani8/healthcheck
Don't update health check status during initialDelaySeconds
2023-12-01 13:12:50 +00:00
45e53ed7b0 libpod: Detect whether we have a private UTS namespace on FreeBSD
Right now, we always use a private UTS namespace on FreeBSD. This should
be made optional but implementing that cleanly needs a FreeBSD extension
to the OCI runtime config. The process for that is starting
(https://github.com/opencontainers/tob/pull/133) but in the meantime,
assume that the UTS namespace is private on FreeBSD.

This moves the Linux-specific namespace logic to
container_internal_linux.go and adds a FreeBSD stub.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-12-01 12:37:39 +00:00
d3d9293b2a Merge pull request #20831 from Luap99/remote-exec-rm
fix podman-remote exec regression with v4.8
2023-12-01 09:59:21 +00:00
500da5ecc9 Merge pull request #20848 from edsantiago/safer_defer
deferred test failures: handle a corner case
2023-12-01 09:56:52 +00:00
00d96c2b99 fix(deps): update github.com/openshift/imagebuilder digest to ef2a5fe
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-01 09:35:36 +00:00
b05755b0a8 Merge pull request #20742 from containers/renovate/common-image-and-storage-deps
fix(deps): update common, image, and storage deps
2023-12-01 00:03:50 +00:00
9b2529e0d7 Merge pull request #20833 from sanmai-NL/patch-1
Set `BUILDAH_ISOLATION=chroot` within Podman Containerfile
2023-11-30 22:26:41 +00:00
b1acb43d71 CI: fix system_test_aarch64 dependencies
It should depend on aarch64 *validate*, not just build.

(Noticed by accident while reviewing Macintosh CI graph)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-11-30 14:45:47 -07:00
f9e8585c53 Enable win podman-machine test failure
Intended to serve as motivation to fix them.  Removed from status
aggregator so the failures don't block PR merging.  Updated comment text
to reference related open issue, #20548.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-11-30 10:38:48 -05:00
269f8ff066 fix(deps): update module github.com/onsi/ginkgo/v2 to v2.13.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-30 14:53:34 +00:00
c1eea91a01 fix(deps): update common, image, and storage deps
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-30 14:48:27 +00:00
31df9c237e Move the --farm flag to farm build command
The option `farm` which is used to specify the farm to be used, is moved to farm build command from farm command.

closes #20752

Signed-off-by: Chetan Giradkar <cgiradka@redhat.com>
2023-11-30 14:27:06 +00:00
fa0aa91132 @@option volume.image: be specific that -v only affects RUN
Be specific that the `-v` flag only affects RUN instructions.  The
previous wording left it ambiguous, and people might have concluded that
it applied to ADD and COPY as well.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-11-30 09:05:33 -05:00
426db6fcc1 Accept a config blob alongside the "changes" slice when committing
When committing containers to create new images, accept a container
config blob being passed in the body of the API request by adding a
Config field to our API structures.  Populate it from the body of
requests that we receive, and use its contents as the body of requests
that we make.

Make the libpod commit endpoint split changes values at newlines, just
like the compat endpoint does.

Pass both the config blob and the "changes" slice to buildah's Commit()
API, so that it can handle cases where they overlap or conflict.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-11-30 09:00:52 -05:00
e197cf57da container create: use ParseUserNamespace to parse a user namespace setting
Use ParseUserNamespace instead of ParseNamespace to parse a passed-in
user namespace setting.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-11-30 09:00:52 -05:00
f2f7d60741 Merge pull request #20841 from ashley-cui/wsldeadlock
Fix locking error in WSL machine rm -f
2023-11-30 14:00:35 +00:00
f95dd21d5d deferred test failures: handle a corner case
Followup to #20797 (defer assertion failures). The bail-now()
helper was being defined only in setup() ... and some tests,
particularly 001-basic.bats, define their own minimalist setup().

Symptom was "bail-now: command not found", which still caused
test to fail (so no failures were hidden) but led to concern
and wasted time when analyzing failures.

Solution: add one more definition of bail-now(), in outer scope.

There is still one pathological case I'm not addressing: a
bats file that defines its own teardown() which does not invoke
basic_teardown(), then has a test that runs defer-assertion-failures
without a followup immediate-assertion-failures. This would lead
to failures that are never seen. Since teardown() without basic_teardown()
is invalid, I choose not to worry about this case.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-11-30 06:33:46 -07:00
6b9221d852 Merge pull request #20837 from dfr/freebsd-vnet
libpod: Allow using just one jail per container on FreeBSD
2023-11-30 08:38:20 +00:00
572a7692e3 Merge pull request #20828 from alexlarsson/quadlet-snippets
quadlet: Support systemd style dropin files
2023-11-29 23:24:33 +00:00
385f8526b3 Merge pull request #20834 from edsantiago/gating_fixes
Gating test fixes
2023-11-29 23:10:50 +00:00
ea549c9163 Merge pull request #20836 from ashley-cui/vendor
Vendor c/common
2023-11-29 23:02:34 +00:00
42ea211211 Fix locking error in WSL machine rm -f
Fixed a bug where `podman machine rm -f` would cause a deadlock when
running with WSL.

The deadlock is caused by the Remove() function calling the Stop()
function after Remove() locks the VM. Stop() also has a lock call, which
fails and deadlocks because Remove() already claimed lock. Fix this by
moving the stop call before the lock

[NO NEW TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-11-29 16:28:59 -05:00
5da1790a28 Merge pull request #20838 from Luap99/sqlite-timeout
sqlite: set busy timeout to 100s
2023-11-29 19:21:12 +00:00
5b3d82f9bc sqlite: set busy timeout to 100s
Only one process can write to the sqlite db at the same time, if another
process tries to use it at that time it fails and a database is locked
error is returned. If this happens sqlite should keep retrying until it
can write. To do that we can just set the _busy_timeout option. A 100s
timeout should be enough even on slower systems but not to much in case
there is a deadlock so it still returns in a reasonable time.

[NO NEW TESTS NEEDED] I think we strongly need to consider some form of
parallel stress testing to catch bugs like this.

Fixes #20809

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-11-29 18:07:29 +01:00
d4ac2f3dd5 libpod: Allow using just one jail per container on FreeBSD
In FreeBSD-14.0, it is possible to configure a jail's network settings
from outside the jail using ifconfig and route's new '-j' option. This
removes the need for a separate jail to own the container's vnet.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-11-29 16:18:34 +00:00
55373dcce0 Vendor c/common
Vendor c/common@main

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-11-29 10:17:54 -05:00
3e70415089 Gating test fixes
Two newly-added tests, fail in gating:
 - system connection: difference in how sockets are set up
   between CI and gating
 - ulimit: gating seems to run with ulimit -c -H 0. Check, and
   skip if ulimit is less than what we need

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-11-29 07:51:43 -07:00
86296ff8da pkg/bindings: add new APIVersionError error type
When a new API call is added to the bindings we should guard it based on
the version and throw a useful error. Right now an old server that does
not implement a given endpoint would throw a "NOT FOUND" error which is
not good for callers.

Instead implement a custom error type to give a usefule error instead.
This allows bindings users to call errors.As() to know if they call and
to old version.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-11-29 15:31:42 +01:00
a5d11f4041 Set BUILDAH_ISOLATION=chroot within Podman containers
See: https://developers.redhat.com/blog/2019/08/14/best-practices-for-running-buildah-in-a-container

See: 06c41b614d/docs/source/markdown/options/isolation.md

Signed-off-by: Sander Maijers <3374183+sanmai-NL@users.noreply.github.com>
2023-11-29 14:45:21 +01:00
f35d1c1c25 Don't update health check status during initialDelaySeconds
When InitialDelaySeconds in the kube yaml is set for a helthcheck,
don't update the healthcheck status till those initial delay seconds are over.
We were waiting to update for a failing healtcheck, but when the healthcheck
was successful during the initial delay time, the status was being updated as healthy
immediately.
This is misleading to the users wondering why their healthcheck takes
much longer to fail for a failing case while it is quick to succeed for
a healthy case. It also doesn't match what the k8s InitialDelaySeconds
does. This change is only for kube play, podman healthcheck run is
unaffected.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-11-29 08:37:39 -05:00
8ee2622028 quadlet: Support systemd style dropin files
For a source file like `foo.container`, look for drop in named
`foo.container.d/*.conf` and merged them into the main file.  The
dropins are applied in alphabetical order, and files in earlier
diretories override later files with same name.

This is similar to how systemd dropins work, see:
https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html

Also adds some tests for these

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2023-11-29 13:46:52 +01:00
93bcd2a25d fix podman-remote exec regression with v4.8
Commit f48a706abc added a new API endpoint to remove exec session
correctly. And the bindings try to call that endpoint for exec every
time. Now since client and server must not be the same version this
causes a problem if a new 4.8 client calls an older 4.7 server as it has
no idea about such endpoint and throws an ugly error. This is a common
scenario for podman machine setups.

The client does know the server version so it should make sure to not
call such endpoint if the server is older than 4.8.

I added a exec test to the machine tests as this can be reproduced with
podman machine as at the moment at least the VM image does not contain
podman 4.8. And it should at least make sure podman exec keeps working
for podman machine without regressions.

Fixes #20821

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-11-29 13:22:46 +01:00