Commit graph

20941 commits

Author SHA1 Message Date
openshift-merge-bot[bot]
3f3e19f9f4
Merge pull request #20825 from openshift-cherrypick-robot/cherry-pick-20798-to-v4.8
[v4.8] Fix wsl.conf generation when user-mode-networking is disabled
2023-12-04 14:23:46 +00:00
openshift-merge-bot[bot]
85c2543a8b
Merge pull request #20873 from openshift-cherrypick-robot/cherry-pick-20869-to-v4.8
[v4.8] libpod: Detect whether we have a private UTS namespace on FreeBSD
2023-12-04 13:00:10 +00:00
openshift-merge-bot[bot]
435258c45d
Merge pull request #20888 from openshift-cherrypick-robot/cherry-pick-20874-to-v4.8
[v4.8] Handle symlinks when checking DB vs runtime configs
2023-12-04 08:46:52 +00:00
Matt Heon
2d20d2e5c6 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-03 11:50:47 +00:00
Doug Rabson
6bbbfaa051 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 17:24:06 +00:00
openshift-merge-bot[bot]
4635f40c65
Merge pull request #20865 from openshift-cherrypick-robot/cherry-pick-20831-to-v4.8
[v4.8] fix podman-remote exec regression with v4.8
2023-12-01 17:21:09 +00:00
Paul Holzinger
a8b8dc5706 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-12-01 10:00:07 +00:00
Paul Holzinger
86bb91001a 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-12-01 10:00:07 +00:00
openshift-merge-bot[bot]
1c434e333d
Merge pull request #20850 from Luap99/v4.8-backports
[v4.8] backport sqlite fixes
2023-12-01 09:59:20 +00:00
openshift-merge-bot[bot]
0c606ef0d5
Merge pull request #20849 from openshift-cherrypick-robot/cherry-pick-20841-to-v4.8
[v4.8] Fix locking error in WSL machine rm -f
2023-12-01 09:56:51 +00:00
Paul Holzinger
9c9d2fcaf5
sqlite: fix issue in ValidateDBConfig()
If a transaction is started it must either be committed or rolled back.
The function uses defer to call `tx.Rollback()` if there is an error
returned. However it also called `tx.Commit()` and afterwards further
errors can be returned which means it tries to roll back a already
committed transaction which cannot work.

This fix is to make sure tx.Commit() is the last call in that function.
see https://github.com/containers/podman/issues/20731

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-11-30 15:05:02 +01:00
Paul Holzinger
1e5a1336f8
sqlite: fix missing Commit() in RemovePodContainers()
We have to Commit() the transaction. Note this is only in a rare pod
remove code path and very unlikely to ever be used.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-11-30 15:04:29 +01:00
Paul Holzinger
429080f02c
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-30 15:04:08 +01:00
Ashley Cui
a72c39a534 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-30 14:01:28 +00:00
openshift-merge-bot[bot]
78fdb40cb7
Merge pull request #20846 from edsantiago/gating_fixes
[v4.8] Gating test fixes
2023-11-30 14:00:35 +00:00
Ed Santiago
a7c522dfe7 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 19:12:23 -07:00
openshift-merge-bot[bot]
0f81579165
Merge pull request #20832 from openshift-cherrypick-robot/cherry-pick-20744-to-v4.8
[v4.8] If API calls for kube play --replace, then replace pod
2023-11-30 00:44:23 +00:00
Daniel J Walsh
a62b81d905 If API calls for kube play --replace, then replace pod
Currently if user specifies podman kube play --replace, the
pod is removed on the client side, not the server side.  If
the API is called with replace=true, the pod was not being removed
and this called the API to fail. This PR removes the pod if it
exists and the caller specifies replace=true.

Fixes: https://github.com/containers/podman/discussions/20705

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-11-29 12:25:54 +00:00
Jason T. Greene
70ba64f4c4 Fix wsl.conf generation when user-mode-networking is disabled
[NO NEW TESTS NEEDED]

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-11-29 01:21:08 +00:00
openshift-merge-bot[bot]
e3bd1e0c34
Merge pull request #20793 from ashley-cui/480final
[v4.8] Bump to v4.8.0
2023-11-27 18:28:47 +00:00
Ashley Cui
e627de1b49 Bump to v4.8.1-dev
Signed-off-by: Ashley Cui <acui@redhat.com>
2023-11-27 11:09:16 -05:00
Ashley Cui
c4dfcf1487
Bump to v4.8.0
Signed-off-by: Ashley Cui <acui@redhat.com>
2023-11-27 11:08:38 -05:00
Ashley Cui
0efc6ea30b Update release notes for 4.8.0
Signed-off-by: Ashley Cui <acui@redhat.com>
2023-11-27 11:05:50 -05:00
openshift-merge-bot[bot]
01ecd17eff
Merge pull request #20791 from mheon/deprecations_upcoming
[CI:DOCS] Add notes on upcoming deprecations to release notes
2023-11-27 16:05:24 +00:00
Matt Heon
4b95c6c308 Add notes on upcoming deprecations to release notes
The 5.0 release, which is coming up fast, will make a number of
deprecations and removals. We can start giving folks a heads up
on them now, so there is no confusion when 5.0 drops. We will
also write some blogs about the transition over the coming weeks
(after we have a better idea of what the final release will look
like).

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-11-27 10:19:42 -05:00
openshift-merge-bot[bot]
19ab233307
Merge pull request #20782 from TomSweeneyRedHat/dev/tsweeney/1.33.2
[v4.8] Bump to Buildah v1.33.2
2023-11-27 06:56:29 +00:00
TomSweeneyRedHat
1c1477ddf1 [v4.8] Bump to Buildah v1.33.2
As the title says.  Of most importance, this contains a bump of
BuildKit to v0.12.3 which should reduce the bloat over the
prior version of BuildKit.

[NO NEW TESTS NEEDED]
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2023-11-26 17:47:00 -05:00
openshift-merge-bot[bot]
efc88e56af
Merge pull request #20751 from ashley-cui/48relno
[4.8] [CI:DOCS] Update release notes
2023-11-23 10:58:17 +00:00
Ashley Cui
f021551429 [CI:DOCS] Update release notes
Update release notes based off of comments from RC1

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-11-22 15:17:31 -05:00
openshift-merge-bot[bot]
99039f8ec4
Merge pull request #20741 from openshift-cherrypick-robot/cherry-pick-20739-to-v4.8
[v4.8] machine applehv: create better error on start failure
2023-11-22 01:44:00 +00:00
Paul Holzinger
697e66c784 machine applehv: create better error on start failure
If gvproxy or vfkit exit we can error right away, so while we wait for
the socket to get ready we also keep checking the process status with
wait4() and WNOHANG so it does not block forever.

This is completely untested as I do not have acces to apple machine.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

<MH: Added no new tests needed to pass CI>
[NO NEW TESTS NEEDED]

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-11-21 22:58:47 +00:00
openshift-merge-bot[bot]
698458d9ad
Merge pull request #20724 from ashley-cui/48rc1
[v4.8] Bump to 4.8.0-rc1
2023-11-20 18:13:06 +00:00
Ashley Cui
53f176732c Bump to v4.8.0-dev
Signed-off-by: Ashley Cui <acui@redhat.com>
2023-11-20 10:35:13 -05:00
Ashley Cui
ac1d54e687
Bump to v4.8.0-rc1
Signed-off-by: Ashley Cui <acui@redhat.com>
2023-11-20 10:34:47 -05:00
Ashley Cui
66cba27944 Create release notes for v4.8.0
Signed-off-by: Ashley Cui <acui@redhat.com>
2023-11-20 10:30:19 -05:00
Ashley Cui
ac290f4464 Update release notes from v4.7 branch
Signed-off-by: Ashley Cui <acui@redhat.com>
2023-11-20 09:42:22 -05:00
Ashley Cui
883ce7704c Cirrus: Update operating branch
Signed-off-by: Ashley Cui <acui@redhat.com>
2023-11-20 09:23:30 -05:00
openshift-merge-bot[bot]
2d4c578579
Merge pull request #20722 from edsantiago/rootless_tutorial
[CI:DOCS] rootless_tutorial: modernize
2023-11-20 13:55:41 +00:00
Ed Santiago
9ea390191b rootless_tutorial: modernize
- We can assume that cgroups v2 and rootless overlayfs are the
  default everywhere.

- Remove RHEL7-only instructions

- add clear '$' and '#' prompts to rootless and root commands

- other minor consistency cleanups

Ref: #20669

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-11-20 06:04:21 -07:00
openshift-merge-bot[bot]
7dfbc72769
Merge pull request #20715 from TomSweeneyRedHat/dev/tsweeney/buildah1.33.1
Bump Buildah to v1.33.1
2023-11-19 05:58:14 +00:00
TomSweeneyRedHat
ee16546227 Bump Buildah to v1.33.1
Bump Buildah to v1.33.1 to get a CVE fix for Buildkit.
I thought it was also going to drag in the test fix as
mentioned in #20709, but I'm not seeing that here.

[NO NEW TESTS NEEDED]
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2023-11-19 00:49:13 -05:00
openshift-merge-bot[bot]
149d4f079a
Merge pull request #20161 from edsantiago/ci_desired_storage
CI: test overlay and vfs
2023-11-18 20:59:17 +00:00
openshift-merge-bot[bot]
b747850230
Merge pull request #20708 from baude/vendorlibhvee0.5.0
Update to libhvee 0.5.0
2023-11-18 20:09:46 +00:00
openshift-merge-bot[bot]
f17d8df555
Merge pull request #20707 from baude/vmtypesarereserved
vmtypes names cannot be used as machine names
2023-11-18 20:07:00 +00:00
openshift-merge-bot[bot]
85f57b6ea4
Merge pull request #20709 from TomSweeneyRedHat/dev/tsweeney/buildah1.33.0
Bump Buildah to v1.33.0
2023-11-18 14:59:00 +00:00
TomSweeneyRedHat
3d86a9658e Bump Buildah to v1.33.0
As the title says.  This is the last dance step in preparation
for Podman v4.8.

[NO NEW TESTS NEEDED]

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2023-11-17 18:02:59 -05:00
Brent Baude
60d9f9b807 Update to libhvee 0.5.0
Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-11-17 13:34:14 -06:00
openshift-merge-bot[bot]
a6bb601400
Merge pull request #20621 from mtrmac/docker-compat-login
Add --compat-auth-file to login and logout
2023-11-17 19:11:02 +00:00
Brent Baude
d32f61d91b vmtypes names cannot be used as machine names
florent found a bug where he used "applehv" as a machine name.  it turns out when we use a vmtype name, esp. the active type, it really messes up directory structures for configuration and images alike.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-11-17 12:24:21 -06:00
Miloslav Trmač
d0b32255e4 Add support for --compat-auth-file in login/logout
This mostly just inherits the c/common/pkg/auth implementation,
except that AuthFilePath and DockerCompatAuthFilePath can not be set
simultaneously, so don't unnecessarily explicitly set AuthFilePath.
c/common already handles that.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-11-17 16:44:06 +01:00