11 Commits

Author SHA1 Message Date
0d22d7b74e Quadlet - Use = sign when setting the pull arg for build
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
(cherry picked from commit 13affe96d62ef8ee2c2d440e30ef06e7f861e9e8)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-11-25 11:56:49 +01:00
70c131ed68 System tests: set a default XDG_RUNTIME_DIR
Yield to reality: if $XDG_RUNTIME_DIR is unset, assume a
reasonable default (rootless only). This clears up a
common failure in Fedora gating tests, and will probably
prevent future time wasters.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-09-25 12:45:17 -06:00
1f42aff933 systests: debug systemd failures
When a systemd-related system test fails, we usually get:

    systemctl start foo
    FAILED exit status 1, try 'systemctl --status' or 'journalctl -xe'

That makes it impossible to debug flakes.

Solution: new systemctl_start() [note underscore], to be used
instead of systemctl <SPACE> start. On failure, will run log
commands.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-12-04 09:28:49 -07:00
6b2f48129e Quadlet - Add support for .pod units
Add support for .pod unit files with only PodmanArgs, GlobalArgs, ContainersConfModule and PodName
Add support for linking .container units with .pod ones
Add e2e and system tests
Add to man page

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-11-28 14:31:53 +02:00
55ca571e55 Quadlet - add support for .image units
main
----
Use order number to order the units processing
Process .image file
Usage of .image file should not log Ambiguous Name warning
Use AmbiguousName for .volume and .image units

Quadlet
-------
Convert .image files
Add driver and Image keys to .volume files
Handle usage of .image as Image

Man Page
--------
Add comments for new keys in .volume file
Add comment about using .image files as images
Add section about .image units

Tests
-----
Add integration tests
Add system test

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
2023-09-18 16:26:18 +03:00
d24bec0d03 system tests: timeoutize quadlet, systemd
Run $QUADLET and all systemctl/journalctl commands using 'timeout'.
Nothing should ever, ever take more than the default 2 minutes.

Followup to #18514, in which quadlet tests are found to be
taking 9-10 minutes.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-09 07:46:12 -06:00
9f0a37cd47 System tests: quadlet network test
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-01-03 17:25:58 +02:00
80878f20bc Add initial system tests for quadlets
This adds basic container and volume system tests for quadlet. These
install and run actual systemd units and ensure they work.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-16 15:35:51 +01:00
274d34a25a kube play: support auto updates and rollbacks
Add auto-update support to `podman kube play`.  Auto-update policies can
be configured for:
 * the entire pod via the `io.containers.autoupdate` annotation
 * a specific container via the `io.containers.autoupdate/$name` annotation

To make use of rollbacks, the `io.containers.sdnotify` policy should be
set to `container` such that the workload running _inside_ the container
can send the READY message via the NOTIFY_SOCKET once ready.  For
further details on auto updates and rollbacks, please refer to the
specific article [1].

Since auto updates and rollbacks bases on Podman's systemd integration,
the k8s YAML must be executed in the `podman-kube@` systemd template.
For further details on how to run k8s YAML in systemd via Podman, please
refer to the specific article [2].

An examplary k8s YAML may look as follows:
```YAML
apiVersion: v1
kind: Pod
metadata:
  annotations:
      io.containers.autoupdate: "local"
      io.containers.autoupdate/b: "registry"
  labels:
    app: test
  name: test_pod
spec:
  containers:
  - command:
    - top
    image: alpine
    name: a
  - command:
    - top
    image: alpine
    name: b
```

[1] https://www.redhat.com/sysadmin/podman-auto-updates-rollbacks
[2] https://www.redhat.com/sysadmin/kubernetes-workloads-podman-systemd

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-09-06 08:56:55 +02:00
751ba07a76 libpod: improve check to create conmon cgroup
commit 1951ff168a63157fa2f4711fde283edfc4981ed3 introduced a check so
that conmon is not moved to a new cgroup when podman is running inside
of a systemd service.  This is helpful to integrate podman in systemd
so that the spawned conmon lives in the same cgroup as the service
that created it.

Unfortunately this breaks when podman daemon is running in a systemd
service since the same check is in place thus all the conmon processes
end up in the same cgroup as the podman daemon.  When the podman
daemon systemd service stops the conmon processes are also terminated
as well as the containers they monitor.

Improve the check to exclude podman running as a daemon.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2052697

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-06-15 15:43:12 +02:00
313c7118ea system tests: cleaner, safer use of systemd
First and foremost: use ephemeral (/run, $XDG) directories
for systemd unit files, so as not to vandalize a working system.

Second, refactor common systemd-related functionality into
a new helper file, loaded by the systemd-related tests.
Shared functionality includes:

  * setting $XDG_RUNTIME_DIR if unset and rootless
  * setting $UNIT_DIR for use by tests
  * new systemctl() and journalctl() functions, which
    include "--user" when rootless (why can't systemd
    figure this out on its own?)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-07-20 08:57:26 -06:00