Commit Graph

19798 Commits

Author SHA1 Message Date
OpenShift Merge Robot 7496cbf0be
Merge pull request #19411 from vrothberg/qemu-locking
machine: QEMU: lock VM on stop/rm/set
2023-07-28 16:41:37 +02:00
OpenShift Merge Robot 4153e97568
Merge pull request #19302 from edsantiago/openqa
System tests: add test tags
2023-07-28 14:33:44 +02:00
Valentin Rothberg 416a471eed machine: QEMU: lock VM on stop/rm/set
Lock the machine when stopping, removing or changing its attributes to
make sure write accesses are serialized which should prevent a number of
issues and inconsistencies reported.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-07-28 13:57:59 +02:00
OpenShift Merge Robot 0afc1c6d82
Merge pull request #19412 from dfr/freebsd-pod-top
libpod: add 'pod top' support on FreeBSD
2023-07-28 13:47:24 +02:00
Doug Rabson bb57c1631c libpod: add 'pod top' support on FreeBSD
This shares code with 'container top' which runs ps on the host,
filtering for the containers that are part of the pod.
(*Container).jailName is modified to take into account the possiblity
that the container is in a pod - this also fixes stats reporting for
pods on FreeBSD.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-07-28 10:52:20 +01:00
OpenShift Merge Robot aef42c87c4
Merge pull request #19400 from eriksjolund/add_github_issue_type_questions
[SKIP CI] github: add issue type as link to podman github discussions
2023-07-28 09:16:47 +02:00
OpenShift Merge Robot e99289934e
Merge pull request #19367 from dfr/freebsd-kube
libpod: fix 'podman kube generate' on FreeBSD
2023-07-28 09:14:09 +02:00
OpenShift Merge Robot bd0fe69cad
Merge pull request #19385 from jakecorrenti/breakup-qemu-config-funcs
Breakup qemu config funcs
2023-07-28 08:37:42 +02:00
Daniel J Walsh 538ac5dc8f
Merge pull request #19309 from rhatdan/volumes
Add glob support to podman run/create --mount
2023-07-27 15:22:12 -04:00
Ashley Cui f592c33fb8 [CI:DOCS] Build and Sign Mac Pkginstaller
Create a new GitHub Action that builds and signs the Mac pkginstaller. The action also uploads the installers to the release, and updates the shasums file.

This action is triggered on release creation, but it can also be triggered manually via a workflow dispatch.

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-07-27 15:17:37 -04:00
OpenShift Merge Robot 39ca4ac928
Merge pull request #19391 from rhatdan/authfile
Make sure users changes --authfile before checking
2023-07-27 21:12:12 +02:00
OpenShift Merge Robot ef1fde310b
Merge pull request #19392 from n1hility/fix-artifacts
Fix regression in CI artifacts script introduced by legacy msi removal
2023-07-27 21:04:20 +02:00
Daniel J Walsh c10c2b67f3
Merge pull request #19396 from vrothberg/fix-18662
machine: QEMU: lock VM on start
2023-07-27 12:22:09 -04:00
Daniel J Walsh f540bbffa8
Make sure users changes --authfile before checking
In certain cases REGISTRY_AUTH_FILE is set but the auth file
does not exists yet, do not throw error unless user specified
a file directly using --authfile.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-27 12:06:25 -04:00
Erik Sjölund 8757fe88ad github: add issue type as link to podman github discussions
Some issues reported in the podman github project contains a
question instead of a bug report or feature request. Make it
easier for users to find a place to ask questions.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-07-27 17:17:45 +02:00
Jake Correnti 3523b9b052 Break QEMU `config.go` code into its own functions
Breaks some of the code in QEMU's `VirtProvider` implementation located
at `pkg/machine/qemu/config.go` into its own functions. Aids in
improving the readability of the code.

[NO NEW TESTS NEEDED]

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-07-27 09:53:21 -04:00
Valentin Rothberg c341a0ffe0 machine: QEMU: lock VM on start
Lock the VM on start.  If the machine is in the "starting" state we know
that a previous start has failed and guide the user into resolving the
issue.

Concurrent starts will busy wait and return the expected "already
running" error.

NOTE: this change is only looking at the start issue (#18662).  Other
commands such as stop and update should also lock and will be updated
in a future change.  I expect the underlying issue to apply to all
machine providers, not only QEMU.  It's desirable to aim for extending
the machine interface to also allow to `Lock()` and `Unlock()`.  After
acquiring the lock, the VM should automatically be reloaded/updated.

[NO NEW TESTS NEEDED]

Fixes: #18662
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-07-27 14:16:02 +02:00
Doug Rabson afe8d5d840 libpod: fix 'podman kube generate' on FreeBSD
On FreeBSD, config.Spec.Linux and config.Spec.Process.Capabilities are
nil pointers so this just avoids dereferencing these pointers in that
case.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-07-27 11:38:23 +01:00
Daniel J Walsh 0fefcf8a4f
Add glob support to podman run/create --mount
HPC Community asked for this support specifically for using GPUs
within containers. Nvidia requires the correct shared library to
to be present in the directory that matches the device mounted
into the container. These libraries have random suffixes based
on versions of the installed libraries on the host.

podman run --mount type=glob:src=/usr/lib64/nvidia\*:ro=true. This helps
quadlets be more portable for this use case.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-27 06:32:54 -04:00
Daniel J Walsh cf1321f670
Merge pull request #19375 from rhatdan/mount
Add support for mounts listed in containers.conf
2023-07-27 06:29:24 -04:00
OpenShift Merge Robot f82f9baf99
Merge pull request #19378 from eriksjolund/socket_activation_increase_socat_timeout
[CI:DOCS] socket_activation.md: increase socat timeout
2023-07-27 09:50:48 +02:00
OpenShift Merge Robot 60a30d31e4
Merge pull request #19388 from edsantiago/quadlet_specifier_race
System tests: quadlet: fix race in %T test
2023-07-27 09:48:07 +02:00
OpenShift Merge Robot 66a829af52
Merge pull request #19387 from rhatdan/quadlet
If quadlets have same name, only use first
2023-07-27 09:17:12 +02:00
OpenShift Merge Robot 8aeb951c76
Merge pull request #19372 from vrothberg/un-defer-start-event
start(): don't defer event
2023-07-27 08:30:10 +02:00
danishprakash d6815da8c8
kube: add DaemonSet support
Signed-off-by: danishprakash <danish.prakash@suse.com>
2023-07-27 11:31:32 +05:30
Jason T. Greene 239a5b64a5 Fix artifacts script after removal of msitools msi build
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-07-26 20:29:26 -05:00
Ed Santiago e335a66a9d System tests: quadlet: fix race in %T test
Use "--wait" flag in "systemd start" for a one-shot container.
Should fix a CI failure I've been seeing sporadically, in which
the --==VALUE==-- string is not seen in journal.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-07-26 15:28:09 -06:00
Daniel J Walsh d6a32a3da3
If quadlets have same name, only use first
If a user puts a quadlet file in his homedirectory with
the same name as one in /etc/containers/systemd/user or
/etc/containers/systemd/user/$UID, then only use the one in
homedir and ignore the others.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-26 17:17:09 -04:00
Daniel J Walsh db0ba9b250
Add support for mounts listed in containers.conf
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-26 17:13:41 -04:00
Daniel J Walsh 6dda21984a
Update vendor of containers/common
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-26 17:09:46 -04:00
Daniel J Walsh b2a857a023
Merge pull request #19351 from edsantiago/gomd2man-local
[CI:DOCS] go-md2man: use vendored-in version, not system
2023-07-26 17:07:44 -04:00
Ed Santiago 33891e8e96 System tests: add test tags
BATS 1.8.0 introduces tags: metadata that can be applied to
a single test or one entire file, then used for filtering
in a test run.

Issue #19299 introduces the possibility of using OpenQA
for podman reverse dependency testing: continuous CI on
all packages that can affect podman, so we don't go two
months with no bodhi builds then get caught by surprise
when systemd or kernel or crun change in ways that break us.

This PR introduces one bats tag, "distro-integration".
The intention is for OpenQA (or other) tests to install
the podman-tests package and run:

    bats --filter-tags distro-integration /usr/share/podman/test/system

Goal is to keep the test list short and sweet: we do not
need to test command-line option parsing. We *DO* need to
test interactions with systemd, kernel, nethack, and other
critical components.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-07-26 13:50:33 -06:00
Erik Sjölund 5ba0559377 [CI:DOCS] socket_activation.md: increase socat timeout
The default socat timeout is 0.5 seconds.
Make the socket-activate-echo example in socket_activation.md
more robust by increasing the socat timeout.

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

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-07-26 17:52:33 +02:00
Ed Santiago dfec510b41 go-md2man: use vendored-in version, not system
go-md2man is fragile, especially around tables (#18678, #19278).
Podman man pages are finely tuned to look OK using v2.02, which
is what we vendor in test/tools, so we should really use it
instead of whatever is installed on the system.

This fixes 'make docs' on RHEL8, broken as of #19278.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-07-26 09:07:21 -06:00
OpenShift Merge Robot aa372ce22d
Merge pull request #19281 from edsantiago/alternate_tmpdir
CI: use different TMPDIR on prior-fedora
2023-07-26 17:06:01 +02:00
OpenShift Merge Robot eac1e947ea
Merge pull request #19374 from edsantiago/bogus_authfile_cleanup
system tests: authfile-exists: minor cleanup
2023-07-26 16:29:47 +02:00
OpenShift Merge Robot 63a0d013ae
Merge pull request #19254 from boaz0/closes_19252
Fix: use --all in podman stats to get all containers stats
2023-07-26 16:27:14 +02:00
Ed Santiago a92bb32196 CI: use different TMPDIR on prior-fedora
A small number of tests are assuming that TMPDIR == /tmp. These
tests fail when that assumption does not hold.

Set TMPDIR=/var/tmp on prior-fedora, as a way to catch those.
/dev/shm would be a slightly better choice, because the
string "tmp" does not appear it in, but it's way too
small to be of any use: it fills up in the e2e prefetch.

This PR exposed a nasty bug in our Makefile: using "TMPDIR"
as temporary variable completely unrelated to (and inconsistent
with) the actual established use of TMPDIR. Solution: rename
that variable and make it lower case. Do the same with two
other ALL-CAP variables.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-07-26 07:08:07 -06:00
Ed Santiago 6894e2031b system tests: authfile-exists: minor cleanup
Quick followup to #19348:
 - refactor into table form, for legibility
 - add tests for 'podman kube play' and 'podman run'
 - slightly cleaner message on failure

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-07-26 07:05:28 -06:00
OpenShift Merge Robot 85ab62042a
Merge pull request #19348 from rhatdan/authfile
Verify authfile exists if user specifies it
2023-07-26 14:47:53 +02:00
Valentin Rothberg d70f15cc0a start(): don't defer event
We'd otherwise emit the start event much after the actual start of the
container when --sdnotify=healthy.  I missed adding the change to commit
0cfd12786f.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-07-26 13:57:37 +02:00
OpenShift Merge Robot 9706147089
Merge pull request #19353 from vrothberg/fix-6160
add "healthy" sdnotify policy
2023-07-26 09:18:57 +02:00
Boaz Shuster de122bb44e Fix: use --all in podman stats to get all containers stats
* Set query all when options.All is true
* Update API to support the "all" option in stats

Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2023-07-26 09:41:14 +03:00
Daniel J Walsh 1f455cf619
Merge pull request #19320 from eriksjolund/remove_unnecessary_please
Remove unnecessary use of the word "please"
2023-07-25 15:20:38 -04:00
Daniel J Walsh 349d775de3
Verify authfile exists if user specifies it
Fixes: https://github.com/containers/podman/issues/18938

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-25 12:39:12 -04:00
Daniel J Walsh 2a29fcb704
Merge pull request #19355 from dfr/freebsd-hc
libpod: don't generate errors for createTimer etc.
2023-07-25 12:33:44 -04:00
Doug Rabson e0ef239559 libpod: don't generate errors for createTimer etc.
Caller will just log the error which is confusing for the user. This
matches the linux non-systemd behaviour.

It would be nice to have timer support for healthcheck on FreeBSD but
the only pre-installed timer option is at which probably isn't a good
fit here.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-07-25 15:30:28 +01:00
OpenShift Merge Robot 42e44795b4
Merge pull request #19339 from dfr/validate-device
pkg/specgen: Don't crash for device spec with empty destination path
2023-07-25 11:45:13 +02:00
Valentin Rothberg 0cfd12786f add "healthy" sdnotify policy
Add a new "healthy" sdnotify policy that instructs Podman to send the
READY message once the container has turned healthy.

Fixes: #6160
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-07-25 11:17:44 +02:00
OpenShift Merge Robot 890aa4bbc2
Merge pull request #19343 from afbjorklund/distro-name
Remove any quotes around distribution id
2023-07-25 10:50:51 +02:00