Commit Graph

22835 Commits

Author SHA1 Message Date
openshift-merge-bot[bot] c0ec20b98d
Merge pull request #22736 from ypu/quadlet_journald
test/system: Add test for journald log check in quadlet
2024-06-25 09:20:04 +00:00
openshift-merge-bot[bot] d4c4801dcd
Merge pull request #23082 from Luap99/pod-id-file
podman run use pod userns even with --pod-id-file
2024-06-25 07:57:29 +00:00
openshift-merge-bot[bot] 0563fb4217
Merge pull request #22920 from cgwalters/virtiofsd-machine
machine/linux: Switch to virtiofs by default
2024-06-24 17:58:08 +00:00
Yiqiao Pu 31888f23aa test/system: Add test steps for journald log check in quadlet
Add some test steps into quadlet - ContainerName. These steps are
used to ensure the default configuration for quadlets generated
service files is sending stdout/stderr/syslog to the journald.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2024-06-25 01:25:04 +08:00
Paul Holzinger a158eae7ff
podman run use pod userns even with --pod-id-file
The pod was set after we checked the namespace and the namespace code
only checked the --pod flag but didn't consider --pod-id-file option.
As such fix the check to first set the pod option on the spec then use
that for the namespace. Also make sure we always use an empty default
otherwise it would be impossible in the backend to know if a user
requested a specific userns or not, i.e. even in case of a set
PODMAN_USERNS env a container should still get the userns from the pod
and not use the var in this case. Therefore unset it from the default
cli value.

There are more issues here around --pod-id-file and cli validation that
does not consider the option as conflicting with --userns like --pod
does but I decided to fix the bug at hand and don't try to fix the
entire mess which most likely would take days.

Fixes #22931

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-24 17:18:08 +02:00
openshift-merge-bot[bot] 32d4b1644d
Merge pull request #23079 from slp/add-krunkit-packaging
macos-installer: bundle krunkit
2024-06-24 14:45:32 +00:00
openshift-merge-bot[bot] 80cf0e23ec
Merge pull request #23080 from Luap99/remote-err
libpod API: fix two pod remote error messages
2024-06-24 13:50:32 +00:00
openshift-merge-bot[bot] fe18a872f7
Merge pull request #23068 from ashley-cui/speedymacci
pkg/machine/e2e: Remove unnecessary copy of machine image.
2024-06-24 12:58:16 +00:00
Sergio Lopez 5815195528 macos-installer: bundle krunkit
Extend Makefile and package.sh to download, sign and bundle krunkit and
its dependencies into the package.

Signed-off-by: Sergio Lopez <slp@redhat.com>
2024-06-24 14:42:04 +02:00
openshift-merge-bot[bot] 1128e5b410
Merge pull request #23072 from marinmo/update-systemd-unit.md
[CI:DOCS] Add information about Type=oneshot units in podman-systemd.unit.5.md (fixes #22233)
2024-06-24 12:27:59 +00:00
Paul Holzinger e404976d1b
remote API: fix pod top error reporting
Do not return 200 status code before we know if there will be an error.
Delay writing the status code until we send the first response. That way
we can set an error code inside the loop when we get a error on the
first try, i.e. because an invalid descriptor was used.

Fixes #22986

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-24 13:47:01 +02:00
Paul Holzinger 29ecf5984c
libpod API: return proper error status code for pod start
When we failed to do anything we should return 500, the 409 code has a
special meaing to the client as it uses a different error format. As
such the remote client was not able to unmarshal the error correctly and
just returned an empty string.

Fixes #22989

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-24 13:46:55 +02:00
openshift-merge-bot[bot] 7b4f6ec576
Merge pull request #22987 from edsantiago/exitwitherror-yetmore
ExitWithError() - more upgrades from Exit()
2024-06-24 11:06:57 +00:00
openshift-merge-bot[bot] 673dde9ec5
Merge pull request #23043 from miyamo2/feat/issues#23038
fix(diff): do not suggest `--latest` when runs on remote with no args
2024-06-24 07:24:55 +00:00
marinmo 945226a844 fix #22233
Add information about Type=oneshot units as suggested in https://github.com/containers/podman/issues/22233

Signed-off-by: marinmo <bugzilla@marinmo.org>
2024-06-23 19:11:51 +02:00
miyamo2 5d009715f6 added check for `registry.IsRemote()`. and correct error message.
Signed-off-by: miyamo2 <miyamo2@outlook.com>
2024-06-23 15:45:41 +00:00
openshift-merge-bot[bot] 57fe4c43b3
Merge pull request #23073 from marinmo/update-systemd-unit.md2
[CI:DOCS] Use true/false for booleans in podman-systemd.unit.5.md (fixes #20686)
2024-06-23 15:03:08 +00:00
openshift-merge-bot[bot] bf2de4177b
Merge pull request #23064 from giuseppe/podman-pass-timeout-stop-to-systemd
container: pass StopTimeout to the systemd slice
2024-06-23 14:57:55 +00:00
marinmo e4f64f91fe
fix #20686
Change the document to only use true/false for booleans. Fixes https://github.com/containers/podman/issues/20686.

Signed-off-by: marinmo <bugzilla@marinmo.org>
2024-06-22 22:17:24 +02:00
openshift-merge-bot[bot] 25bc426fb0
Merge pull request #23032 from giuseppe/drop-make-accessible
libpod: do not chmod bind mounts
2024-06-22 13:45:10 +00:00
openshift-merge-bot[bot] 42a01c0f0c
Merge pull request #22967 from rhatdan/build
Remove references to --pull=true and --pull=false
2024-06-21 19:27:36 +00:00
openshift-merge-bot[bot] 794c139d5e
Merge pull request #23020 from cevich/rm_cgv1
CI Cleanup: Remove cgroups v1 & runc support
2024-06-21 19:11:10 +00:00
Ashley Cui 4dc98e3a5a pkg/machine/e2e: Remove unnecessary copy of machine image.
Stop copying the pre-pulled uncompressed machine disk into the individual test dir. The machine pull code already makes a copy of the disk into the test's HOMEDIR/.local/share/containers/podman/machine, and works off that copy.

Before the change: TESTDIR/<image> is copied to TESTDIR/podman_test/<image> by the test, and then podman machine copies the image to TESTDIR/podman_test/.local/share/containers/podman/machine/provider/<image>

After the change: TESTDIR/<image> is copied to TESTDIR/podman_test/.local/share/containers/podman/machine/provider/<image> by podman machine

The image that is actually run is at TESTDIR/podman_test/.local/share/containers/podman/machine/provider/<image> in both instances.

Signed-off-by: Ashley Cui <acui@redhat.com>
2024-06-21 12:54:24 -04:00
Giuseppe Scrivano 49eb5af301
libpod: intermediate mount if UID not mapped into the userns
if the current user is not mapped into the new user namespace, use an
intermediate mount to allow the mount point to be accessible instead
of opening up all the parent directories for the mountpoint.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-06-21 18:01:26 +02:00
Giuseppe Scrivano 08a8429459
libpod: avoid chowning the rundir to root in the userns
so it is possible to remove the code to make the entire directory
world accessible.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-06-21 18:01:26 +02:00
Giuseppe Scrivano c81f075f43
libpod: do not chmod bind mounts
with the new mount API is available, the OCI runtime doesn't require
that each parent directory for a bind mount must be accessible.
Instead it is opened in the initial user namespace and passed down to
the container init process.

This requires that the kernel supports the new mount API and that the
OCI runtime uses it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-06-21 18:01:26 +02:00
Giuseppe Scrivano 094bc673ef
libpod: unlock the thread if possible
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-06-21 18:01:26 +02:00
Chris Evich d53fee511f
CI Cleanup: Remove cgroups v1 support
With (esp. Debian) CI VM images built by
https://github.com/containers/automation_images/ pull/338 CI no-longer
tests with runc nor cgroups v1.  Add logic to fail under these
conditions.  Prune back high-level YAML/script envars and logic formerly
required to support these things.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-06-21 10:08:39 -04:00
openshift-merge-bot[bot] 9ffac33178
Merge pull request #23066 from Luap99/connection-setup
remote: fix incorrect CONTAINER_CONNECTION parsing
2024-06-21 13:29:10 +00:00
Ed Santiago d810f4187e ExitWithError() - more upgrades from Exit()
Add error-message checks to pod_xxxx_test.go

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-06-21 06:26:42 -06:00
Paul Holzinger 4b3890ccac
remote: fix incorrect CONTAINER_CONNECTION parsing
When a user specifies a invalid connection in CONTAINER_CONNECTION then
podman should return a proper error saying so. Currently it ignored the
error and in rootFlags() just exited early with defining any flags. This
caused a panic then when trying to use the flags later.

In order to address this first store the connection error in the
PodmanConfig struct and not abort right away during flag setup. This is
important as the user might have specified a flag with a valid remote
connection. As such we check all flags and only when none were given we
return the connection error.

Also while at it I noticed that the default connection reported via
podman --help was wrong as it only used the old containers.conf field
for it and did not consider the podman-connections.json default.

New regression tests have been added to make sure it behaves correctly.

This fixes the problem reported in the PR #22997.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-21 14:01:22 +02:00
Giuseppe Scrivano 7d22f04f56
container: pass KillSignal and StopTimeout to the systemd scope
so that they are honored when systemd terminates the scope.

Closes: https://issues.redhat.com/browse/RHEL-16375

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-06-21 13:46:08 +02:00
openshift-merge-bot[bot] 79f0f7707a
Merge pull request #23060 from AlexanderNull/docs/pushimage-openapi
[CI:DOCS] Adds all PushImage supported paramters to openapi docs
2024-06-21 09:27:01 +00:00
openshift-merge-bot[bot] 64a9c73330
Merge pull request #23056 from rst0git/fix-restore-into-pod
restore: fix container restore into pod
2024-06-21 08:59:29 +00:00
openshift-merge-bot[bot] 95677f6eb0
Merge pull request #23059 from edsantiago/systest-timeout-bump
systests: kube: bump up a timeout
2024-06-21 08:51:14 +00:00
Giuseppe Scrivano e48f3137c0
libpod: fix comment
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-06-21 10:07:55 +02:00
Radostin Stoyanov 8be9ec7216 e2e: test container restore in pod by name
Add a test to verify that restoring a container in a Pod works when
the `container restore --pod` option is used with Pod *name* (this
functionality was previously limited to support only full Pod ID).

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-06-21 05:52:40 +01:00
Alexander Clifford c22ae53d31 docs: Adds all PushImage supported paramters to openapi docs.
Signed-off-by: Alexander Clifford <alexandersinbox@gmail.com>
2024-06-20 15:52:29 -07:00
Ed Santiago 3f785e8735 systests: kube: bump up a timeout
PR #22821 (CI speedup) was overly aggressive in one kube test.
It's flaking. Bump up timeout from 3s to 4.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-06-20 14:37:25 -06:00
openshift-merge-bot[bot] 298f31ba6f
Merge pull request #23058 from edsantiago/bump-vms
CI VMs: bump
2024-06-20 20:26:01 +00:00
openshift-merge-bot[bot] fdaef4609f
Merge pull request #23029 from ygalblum/quadlet-template-unescaped
Quadlet - use specifier for unescaped values for templated container name
2024-06-20 18:47:01 +00:00
openshift-merge-bot[bot] 48e1efbe82
Merge pull request #23030 from Luap99/CI-cond
cirrus.yml: implement skips based on source changes
2024-06-20 18:16:46 +00:00
openshift-merge-bot[bot] f6be78d2c6
Merge pull request #23053 from mariushoch/main
sqlite_state: Fix RewriteVolumeConfig
2024-06-20 17:32:45 +00:00
Paul Holzinger f134ab77bc
cirrus.yml: add CI:ALL mode to force all tests
Now that we have source based skips there might be a case where we have
to run all tests. One option is to simply change a line in one of the
danger files but having something that can be set as title might be
easier for users.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-20 19:10:02 +02:00
Paul Holzinger d9183f0587
cirrus.yml: implement skips based on source changes
We do not have to test everything for each PR, we can know based on the
source if we changed (i.e. machine code) and only run the tests then.

This implements it as skip conditions, due to the nature of yaml files
we unfortunately cannot deduplicate everything, i.e. the is PR check and
danger files apply to everything but as skip is only a single yaml
string we cannot deduplicate parts of that string. If anyone knows a way
to achieve this I like to hear it.

For now I implemented this for int, system, bud and machine tests. Once
we are more comfortable with this I plan on adding it to other tests as
well.

This will replace the current _bail_if_test_can_be_skipped logic as it
covers more, marks tasks actually skipped in the github UI and works
even for the windows/macos machine tests.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-20 19:10:02 +02:00
Ed Santiago 2f680eb4b5 CI VMs: bump
Built in: https://github.com/containers/automation_images/pull/361

Main changes:
 - lots of package bumps, see link above. Most important
   is debian systemd, which should fix the XDG bug in 256-rc3
 - workaround for rawhide IMA (signed rpms) issue
 - rawhide now includes composefs

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-06-20 10:50:06 -06:00
Radostin Stoyanov 7dc288dbed restore: fix container restore into pod
Currently, when Podman restores a container into a Pod, it always fails
with the following error:

    Error: cannot add container f96670b26e53e70f7f451191ea39a093c940c6c48b47218aeeef1396cb860042 to pod h2-pod: no such pod

This error occurs because r.state.Pod() is called in setupContainer()
with the Pod name instead of ID. This patch fixes this problem by
setting ctrConfig.Pod to pod.ID().

Reported-by: Stanislav Kosorin <stanokosorin4@gmail.com>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-06-20 13:24:53 +01:00
openshift-merge-bot[bot] a2bf49abb8
Merge pull request #23047 from containers/renovate/setuptools-70.x
chore(deps): update dependency setuptools to ~=70.1.0
2024-06-20 12:21:59 +00:00
Marius Hoch 6dd9abf9ec sqlite_state: Fix RewriteVolumeConfig
The VolumeConfig table does not have an ID column, thus
use the Name column to update it.

Fixes #23052

Signed-off-by: Marius Hoch <mail@mariushoch.de>
2024-06-20 11:39:44 +02:00
renovate[bot] 83549ba11f
chore(deps): update dependency setuptools to ~=70.1.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-19 13:37:57 +00:00