Commit Graph

5142 Commits

Author SHA1 Message Date
Nalin Dahyabhai 358b46225a "podman pull by digest and list --all" test: untag instead of rmi
The "podman pull by digest and list --all" e2e test pulls an image using
a tagged reference when an image with the same ID is already present in
a read-only additional image store.
This causes a new image record to be created in read-write storage.
The test then removes this entry, pulls the image again using a digested
reference, and then expects the image to not have any tagged names in it
when it goes to look at it again.
Newer containers/storage will ensure that at the point when the
read-write image record is created, that it includes all of the data
items and naming information from the read-only copy of the image, so
that this information doesn't appear to be lost.
Change the test to use "untag" instead of "rmi", which should pass with
either the older or newer containers/storage.
The test is checking that `podman images` doesn't choke when it
encounters a digested name attached to an image, so the difference in
behavior between containers/storage versions is irrelevant.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-04-06 16:48:52 -04:00
OpenShift Merge Robot 83773074e3
Merge pull request #18066 from Juneezee/chore/yaml
chore: replace `github.com/ghodss/yaml` with `sigs.k8s.io/yaml`
2023-04-06 16:34:17 -04:00
Paul Holzinger dc9a65e348
test/e2e: use custom network config dir where needed
Since commit f250560a80 the play kube command uses its own network.
this is racy be design because we create the network followed by
creating/running pod/containers. This means in the meantime another
prune or reset process could wipe out the network config because we have
to share the network config directory by design in the test.

The problem is we only have one host netns which is shared between
tests. If the network config dir is not shared we cannot make conflict
checks for interface names and ip address. This results in different
tests trying to use the same interface and/or ip address which will
cause runtime failures in CNI and netavark.

The only solution I see is to make sure only the reset/prune tests are
using a custom network dir. This makes sure they do not wipe configs
that are otherwise required by other parallel running tests.

Fixes #17946

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-06 16:16:50 +02:00
Eng Zer Jun 35165df37b
chore: replace `github.com/ghodss/yaml` with `sigs.k8s.io/yaml`
At the time of making this commit, the package `github.com/ghodss/yaml`
is no longer actively maintained.

`sigs.k8s.io/yaml` is a permanent fork of `ghodss/yaml` and is actively
maintained by Kubernetes SIG.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-04-06 21:11:17 +08:00
OpenShift Merge Robot b39cdff8c2
Merge pull request #18043 from vrothberg/fix-18041
test updates to help debug #18041
2023-04-06 08:15:25 -04:00
OpenShift Merge Robot 3daead7d20
Merge pull request #18067 from edsantiago/silence_ginkgo_warning
e2e: GinkgoParallelNode() -> ...Process()
2023-04-06 04:40:32 -04:00
Urvashi Mohnani d0ffb87925 Fix invalid pod name and hostname during kube generate
Kube generate on pods was not checking for any underscores
in the pod name so was creating a kube yaml with an invalid
pod name when there were underscores present.
The hostname for the pod is set to the podname by default. There
is no need to set that to the container's name or the pod name
again in the generated yaml. So removed that field unless a hostname
was set for the container by the user.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-04-05 17:43:02 -04:00
Ed Santiago 761eca9e75 e2e tests: fix racy flakes
...mostly just test code that wasn't doing the required waits.

My first approach in the kube-play test was to add "--wait".
Bit mistake! The --wait flag, counterintuitively and counter to
documentation, actually destroys all pods+containers+everything
on exit. (Or tries -- see #17803). Since this violates POLA
and is undocumented, I include here a fix to the man page.

Despite my best intentions, I can't reasonably check every single
test for missing waits, especially in kube-play where failing
containers will get retried forever so we can't wait. We'll
just have to fix flakes as we see them.

Fixes: #17958
Fixes: #18071

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-05 13:51:59 -06:00
Ed Santiago ce8a3a0c1e e2e: GinkgoParallelNode() -> ...Process()
...to silence runtime warning:

   GinkgoParallelNode is deprecated and will be removed in Ginkgo V2.
   Please use GinkgoParallelProcess instead.

Ref: https://github.com/onsi/ginkgo/blob/ver2/docs/MIGRATING_TO_V2.md#renamed-ginkgoparallelnode

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-05 09:44:23 -06:00
Ed Santiago ecce01e614 e2e: healthcheck on stopped container: fix flake
Test has been flaking. Reason: container was run with -d, so
there's a small window in which podman-healthcheck ran on
a running container. Solution: remove -d

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-04 09:42:05 -06:00
Valentin Rothberg cb7b8fb31b test/apiv2/80-kube.at
Don't check for `.Pods` field in DELETE reports since they don't exist.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-04 16:07:02 +02:00
Valentin Rothberg e1be7d1417 test/apiv2/80-kube.at
Check the DELETE reports for both deletes.  #18041 indicates that the
pod hasn't been removed which made me suspicious about the 1st delete.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-04 15:52:55 +02:00
OpenShift Merge Robot e179079351
Merge pull request #18038 from vrothberg/quadlet-version
add `quadlet -version` flag
2023-04-04 09:01:00 -04:00
Valentin Rothberg 243ca7c280 add `quadlet -version` flag
I recently wanted to check which version of Quadlet I was using and
found a `-version` flag to be missing.  Since Quadlet and Podman are
bundled together, it seems reasonable to me for them to share the same
version.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-04 11:32:47 +02:00
Cedric Staniewski 443f8d89c9 quadlet: implement `Tmpfs` option
This commit adds an quadlet option `Tmpfs` which can be used to mount a
tmpfs in the container.

Closes #17907

Signed-off-by: Cedric Staniewski <cedric@gmx.ca>
2023-04-03 20:22:02 +02:00
OpenShift Merge Robot 3978347bea
Merge pull request #18021 from edsantiago/unverbosify_sleeploop
System tests: unverbosify a flake log
2023-04-03 12:22:15 -04:00
OpenShift Merge Robot 98933456bc
Merge pull request #17950 from umohnani8/deployments
Support Deployment generation with kube generate
2023-04-03 11:08:29 -04:00
Ed Santiago 99ace19084 System tests: unverbosify a flake log
One of our oldest most frustrating flakes is #16091, "Timed
out waiting for BYE".

In #17489 we added some debug output to see if the problem
was a container hang of some sort. It does not seem to be
(see #17675), and the debug output makes it hard to read
failure logs, so let's remove it.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-03 07:25:53 -06:00
Ygal Blum 68dbddd979 Add support for secret exists
Add the command along with the abi and tunnel support
Add e2e tests
Add man page
Add apiv2 test to ensure return codes

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-04-03 15:33:50 +03:00
Daniel J Walsh d7051d745e
Add support for cgroup_config from containers.conf
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-04-01 11:12:13 -04:00
Giuseppe Scrivano 4d56292e7a
libpod: mount safely subpaths
add a function to securely mount a subpath inside a volume.  We cannot
trust that the subpath is safe since it is beneath a volume that could
be controlled by a separate container.  To avoid TOCTOU races between
when we check the subpath and when the OCI runtime mounts it, we open
the subpath, validate it, bind mount to a temporary directory and use
it instead of the original path.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-03-31 19:48:03 +02:00
Urvashi Mohnani 4f90194068 Support Deployment generation with kube generate
The podman kube generate command can now generate a
Deployment kind when the --ype flag is set to deployment.
By default, a Pod spec will be generated if --type flag is
not set.
Add --replicas flag to kube generate to allow users to set
the value of replicas in the generated yaml when generating a
Deployment kind.
Add e2e and minikube tests for this feature.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-03-31 13:34:38 -04:00
Urvashi Mohnani 8b6a7c1826 Use secret.items to create volume mounts if present
If the kube yaml volumes has secret.items set, then use
the values from that to set up the paths inside the container
similar to what we do for configMap.
Add tests for this as well.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-03-31 11:49:47 -04:00
OpenShift Merge Robot 3e44a7afed
Merge pull request #17974 from vrothberg/fix-17956
fix volume-plugin-test flake
2023-03-30 06:26:03 -04:00
Valentin Rothberg 7f8d5e5654 speed up image listing
As found in #17828, image listing does not scale well with a growing
number of local images.  Make use of recent improvements in libimage
that allow for computing the dangling and parent data with _one_ layer
tree.  Prior, the layer tree had to be recomputed _twice_ for each
image.

[NO NEW TESTS NEEDED] as it's a non-functional performance change.

Fixes: #17828
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-30 09:45:44 +02:00
Valentin Rothberg 70abb4ae5b fix volume-plugin-test flake
Wait for the socket to be ready befor trying to create a volume with the
driver.

Fixes: #17956
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-30 09:15:13 +02:00
OpenShift Merge Robot 411693c769
Merge pull request #17976 from Luap99/e2e-gpg-output
test/e2e: gpg keep stdout/err attached
2023-03-29 16:28:19 -04:00
OpenShift Merge Robot 60d16d9f8e
Merge pull request #17961 from ygalblum/quadlet-remap-keepid-map
Quadlet - Support setting UID and GID for --userns=keep-id
2023-03-29 18:01:56 +02:00
Paul Holzinger c40eaa2423
test/e2e: gpg keep stdout/err attached
By default go will not keep the stdout/err attach when executing
commands via exec.Command(). It is required to explicitly pass the
current stdout/err fds down to the child so we can see the error output
in the logs to debug #17966.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-03-29 16:33:28 +02:00
OpenShift Merge Robot c8eeab21cf
Merge pull request #16315 from flouthoc/remote-ignore-symlink
remote,build: ignore if `.containerignore` or `.dockerignore` is a symlink outside of buildContext
2023-03-28 23:23:07 +02:00
OpenShift Merge Robot 9369a3c336
Merge pull request #17963 from Luap99/slirp-dns-userns
fix slirp4netns resolv.conf ip with a userns
2023-03-28 21:57:03 +02:00
Urvashi Mohnani c335ff241a Add debug to --wait test
Add a debug line to the wait to test to see which container
is being left behind after the cleaup where the race is happening.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-03-28 10:01:02 -05:00
OpenShift Merge Robot 365131e0b7
Merge pull request #17930 from ygalblum/quadlet-systemd-specifiers
Quadlet - treat paths starting with systemd specifiers as absolute
2023-03-28 16:18:54 +02:00
Paul Holzinger 81e5bffc32
fix slirp4netns resolv.conf ip with a userns
When a userns is set we setup the network after the bind mounts, at the
point where resolv.conf is generated we do not yet know the subnet.
Just like the other dns servers for bridge networks we need to add the
ip later in completeNetworkSetup()

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2182052

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-03-28 15:52:33 +02:00
Ygal Blum 11e5c2d0fd Quadlet: add support for keep-id with mapping values
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-03-28 16:07:12 +03:00
Ygal Blum b5df38c234 Quadlet E2E test - run quadlet as user generator
Some key are available only for user scope while there are no keys that
are supported only for system. So, better to run in user scope

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-03-28 15:57:55 +03:00
Ygal Blum da96ff6cc7 Quadlet - treat paths starting with systemd specifiers as absolute
If a path (Yaml, ConfigMap, EnvFile) starts with a systemd path
specifier, treat the path as absolute
Add tests - unit, e2e and bats

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-03-28 10:30:33 +03:00
Ed Santiago d85c8d7e84 system tests: use CONTAINERS_CONF_OVERRIDE
...not CONTAINERS_CONF. At least for most tests.

Nearly every system test currently using CONTAINERS_CONF=tmpfile
should be using CONTAINERS_CONF_OVERRIDE.

Simple reason: runtime (crun/runc), database_backend (bolt/sqlite),
logger, and other important settings from /etc/c.conf are not
usually written into the tmpfile. Those tests, therefore, are
not running podman as configured on the system.

Much more discussion: #15413

This PR is a prerequisite for enabling sqlite system tests. For
the sake of simplicity and sanity, I choose to submit the sqlite
switch as a separate PR once this passes and merges.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-03-27 15:18:09 -06:00
OpenShift Merge Robot 905dc6de48
Merge pull request #17895 from vrothberg/containers_conf_extra
add CONTAINERS_CONF_OVERRIDE
2023-03-27 16:48:44 -04:00
Ed Santiago 92e0efc5d0 system tests: fix racey sdnotify test
Race introduced in #16709, which changed 'top' to 'true', so
there was only a narrow window in which '.State.ConmonPod'
would be valid. Remove the race.

Fixes: #17882

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-03-27 10:47:49 -06:00
OpenShift Merge Robot 78f1ebb80b
Merge pull request #17796 from vrothberg/au-errors
auto update: return restart error
2023-03-27 09:23:40 -04:00
Matt Heon 7daab31f1f Ensure that SQLite state handles name-ID collisions
If a container with an ID starting with "db1" exists, and a
container named "db1" also exists, and they are different
containers - if I run `podman inspect db1` the container named
"db1" should be inspected, and there should not be an error that
multiple containers matched the name or id "db1". This was
already handled by BoltDB, and now is properly managed by SQLite.

Fixes #17905

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-03-24 15:09:25 -04:00
OpenShift Merge Robot 8720235164
Merge pull request #17890 from Luap99/stats-compat
stats compat API: return "id" lowercase
2023-03-24 04:27:50 -04:00
Valentin Rothberg c5fc44582f add CONTAINERS_CONF_OVERRIDE
Add yet another environment variable for loading containers.conf.
When CONTAINERS_CONF_OVERRIDE is set, the specified config file
will be loaded last - even when CONTAINERS_CONF is set.

This mechanism is needed to preserve system settings and other
environment variables.  Setting CONTAINERS_CONF will load only
the specified config file and ignore all system and user paths.
That makes testing hard as many Podman tests use CONTAINERS_CONF
for testing.

The intended use of CONTAINERS_CONF_OVERRIDE is to set it during tests
and point it to a specific configuration of Podman (e.g., netavark with
sqlite backend).

Similar needs have popped up talking to users in the automotive and
high-performance computing space.  In a way, such a setting allows for
specifying a specific "flavor" of Podman while preserving all existing
settings on the system.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-23 15:16:59 +01:00
Valentin Rothberg 5f86fae71f vendor containers/common@main
Also adjust the e2e tests to account for SYS_CHROOT having made it back
to the default caps.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-23 15:16:57 +01:00
Alex Jia 9be4a525f4 test: podman checkpoint/restore the latest container
Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
2023-03-22 22:00:37 +08:00
Paul Holzinger 5185e7e39e
stats compat API: return "id" lowercase
We use the same endpoint for libpod and docker compat API. However as
reported docker returns "id" lowercase. Because we cannot break the
libpod API right now keep the output for the libpod endpoint and only
change the docker one.

To do so simply use two types that we can cast with different JSON tags.

Fixes #17869

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-03-22 14:36:35 +01:00
Daniel J Walsh 5f274e45f2
Run make codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-21 16:00:54 -04:00
OpenShift Merge Robot d9cbfdde73
Merge pull request #17861 from edsantiago/bump_min_nfiles
New ulimit test: bump up minimum nfiles
2023-03-21 13:28:28 -04:00
Ed Santiago cf5df5b805 quadlet tests: skip on RHEL8 rootless
skip in setup() if journald unavailable.

To be pedantic, this is overkill: some quadlet tests pass
because they don't run journald. Too bad.

Also skip a play-kube test that requires journal

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-03-21 07:18:14 -06:00
OpenShift Merge Robot c5fc41ac54
Merge pull request #17857 from ygalblum/quadlet-relative-volume
Quadlet - add support for relative path in Volume key in .container file
2023-03-21 07:29:18 -04:00
OpenShift Merge Robot d8265f07d0
Merge pull request #17821 from umohnani8/detach
Add service ctr cleanup to PlayKubeDown
2023-03-21 04:57:42 -04:00
OpenShift Merge Robot 23d97fcfef
Merge pull request #17830 from vrothberg/fix-17777
fix --health-on-failure=restart in transient unit
2023-03-20 16:23:50 -04:00
Ed Santiago 6b2101bc74 New ulimit test: bump up minimum nfiles
...and add a comment explaining why. The minimum, determined via
binary search, is actually 27! Anything under that will barf:

   $ bin/podman run --ulimit nofile=26:26 --rm quay.io/libpod/testimage:20221018 true
   Error: OCI runtime error: crun: openat2 `proc/sysrq-trigger`: Too many open files

Play it safe, go with 30.

(Does this seem alarming to anyone else, or am I the only one??)

Fixes: #17860

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-03-20 13:08:04 -06:00
Ygal Blum 5382997e01 Quadlet - add support for relative path in Volume key in .container file
If the volume source starts with . resolve the path relative to the
location of the unit file

Update the test code to allow verification of regex for the value in key
value arguments
Add the usage of relative paths to the volume and mount test cases
Update the man page

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-03-20 18:54:00 +02:00
OpenShift Merge Robot 39b0de19e1
Merge pull request #17834 from rhatdan/ulimits
Add support for oom_score_adj value from containers.conf
2023-03-20 12:19:25 -04:00
Urvashi Mohnani 3e405a2fd1 Add service ctr cleanup to PlayKubeDown
Since we can't guarantee when the worker queue will come
and clean up the service container in the remote case when
podman kube play --wait is called, cleanup the service container
at the end of PlayKubeDown() to ensure that it is removed right
after all the containers, pods, volumes, etc are removed.

[NO NEW TESTS NEEDED]

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-03-20 11:55:13 -04:00
Valentin Rothberg 9563415430 fix --health-on-failure=restart in transient unit
As described in #17777, the `restart` on-failure action did not behave
correctly when the health check is being run by a transient systemd
unit.  It ran just fine when being executed outside such a unit, for
instance, manually or, as done in the system tests, in a scripted
fashion.

There were two issue causing the `restart` on-failure action to
misbehave:

1) The transient systemd units used the default `KillMode=cgroup` which
   will nuke all processes in the specific cgroup including the recently
   restarted container/conmon once the main `podman healthcheck run`
   process exits.

2) Podman attempted to remove the transient systemd unit and timer
   during restart.  That is perfectly fine when manually restarting the
   container but not when the restart itself is being executed inside
   such a transient unit.  Ultimately, Podman tried to shoot itself in
   the foot.

Fix both issues by moving the restart logic in the cleanup process.
Instead of restarting the container, the `healthcheck run` will just
stop the container and the cleanup process will restart the container
once it has turned unhealthy.

Fixes: #17777
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-20 13:56:00 +01:00
OpenShift Merge Robot 150977f9c1
Merge pull request #17853 from ygalblum/quadlet-health
Quadlet - Add support for health checks configuration in .container files
2023-03-20 08:19:08 -04:00
OpenShift Merge Robot 9ddd4f4abd
Merge pull request #17600 from sstosh/search-auth-opts
Add search --cert-dir, --creds
2023-03-20 04:00:04 -04:00
Ygal Blum 5d1342fc58 Quadlet - Add support for health checks configuration in .container files
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-03-20 09:53:49 +02:00
Daniel J Walsh 46d1650403
Add support for oom_score_adj value from containers.conf
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-17 12:04:37 -04:00
OpenShift Merge Robot f1bcd0d781
Merge pull request #17757 from rhatdan/ulimits
Use default_ulimits field in containers.conf
2023-03-17 11:43:19 -04:00
Daniel J Walsh 6046832f3e
Use default_ulimits field in containers.conf
The default_ulimits field is currently ignored in podman run commands.
This PR fixes this.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-17 08:04:05 -04:00
Ed Santiago e2d49fb650 CI: test and confirm DESIRED_DATABASE
Just like we do with RUNTIME and NETWORK. Skipped for now in
system tests because there's no way yet to actually set the
database backend.

Also, in system test oneliner (first test), include DB

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-03-16 15:32:56 -06:00
OpenShift Merge Robot 498194c51f
Merge pull request #17808 from sbrivio-rh/pasta
Revert "Revert "pasta: Use two connections instead of three in TCP ra…
2023-03-16 10:27:15 -04:00
Valentin Rothberg ba141adce4 test/system/255-auto-update.bats: add debug logs
Add debug logs from systemctl and journalctl in hope to get more data on
the Debian flakes tracked in #17796.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-16 11:41:47 +01:00
Stefano Brivio c2a24abc0d Revert "Revert "pasta: Use two connections instead of three in TCP range forward tests""
This reverts commit 1c08f2edac3f9ecf128cf8da91276e963e6ad14c: the
original failure reported in #17287 persists:

  [+1306s] not ok 453 podman networking with pasta(1) - TCP translated port range forwarding, IPv4, loopback

...

  [+1306s] # 2023/03/15 14:33:33 socat[119870] E connect(8, AF=2 127.0.0.1:5127, 16): Interrupted system call
  [+1306s] # xx
  [+1306s] # #/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
  [+1306s] # #|     FAIL: Mismatch between data sent and received
  [+1306s] # #| expected: = xxx
  [+1306s] # #|   actual:   xx
  [+1306s] # #\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

so keep two connections instead of three as long as I'm too dumb to
figure this out.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2023-03-16 05:11:30 +01:00
Matt Heon b3035b9d66 Update Cirrus display names, and fix get-ci-vm script
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-03-15 14:45:28 -04:00
Matt Heon 6142c16a9c Ensure SQLite places uses the runroot in transient mode
Transient mode means the DB should not persist, so instead of
using the GraphRoot we should use the RunRoot instead.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-03-15 14:45:28 -04:00
Matt Heon 2ec11b16ab Fix various integration test issues with SQLite state
Two main changes:
- The transient state tests relied on BoltDB paths, change to
  make them agnostic
- The volume code in SQLite wasn't retrieving and setting the
  volume plugin for volumes that used one.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-03-15 14:45:18 -04:00
Matt Heon 0f8530b1ee Remove test for pod/container name global uniqueness
We're removing this constraint from the database, so we should
not be verifying it in CI anymore.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-03-15 14:44:47 -04:00
Matt Heon 39fd9aa084 Add SQLite job to CI
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-03-15 14:44:47 -04:00
OpenShift Merge Robot 990f4328b6
Merge pull request #17797 from containers/dependabot/go_modules/test/tools/github.com/vbatts/git-validation-1.2.0
build(deps): bump github.com/vbatts/git-validation from 1.1.0 to 1.2.0 in /test/tools
2023-03-15 12:13:44 -04:00
OpenShift Merge Robot 2718f54a29
Merge pull request #17729 from rhatdan/selinux
Support running nested SELinux container separation
2023-03-15 12:07:03 -04:00
dependabot[bot] 2b4a27719c
build(deps): bump github.com/vbatts/git-validation in /test/tools
Bumps [github.com/vbatts/git-validation](https://github.com/vbatts/git-validation) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/vbatts/git-validation/releases)
- [Commits](https://github.com/vbatts/git-validation/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/vbatts/git-validation
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-15 13:00:58 +00:00
Valentin Rothberg 408e764b94 events: no duplicates when streaming during a log rotation
When streaming events, prevent returning duplicates after a log rotation
by marking a beginning and an end for rotated events.  Before starting to
stream, get a timestamp while holding the event lock.  The timestamp
allows for detecting whether a rotation event happened while reading the
log file and to skip all events between the begin and end rotation
event.

In an ideal scenario, we could detect rotated events by enforcing a
chronological order when reading and skip those detected to not be more
recent than the last read event.  However, events are not always
_written_ in chronological order.  While this can be changed, existing
event files could not be read correctly anymore.

Fixes: #17665
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-15 10:28:16 +01:00
Toshiki Sonoda 82f2f8258c Add search --cert-dir, --creds
When we searching any image at a container registry,
--cert-dir and --creds could be required
as well as push, pull, etc.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-03-15 15:01:26 +09:00
OpenShift Merge Robot f8f5f3cec6
Merge pull request #17781 from Luap99/trace-hijack
system service --log-level=trace: support hijack
2023-03-14 17:48:49 -04:00
OpenShift Merge Robot 998acd760f
Merge pull request #17707 from Luap99/wait-for-port
test/system: fix wait_for_port() to wait for bind
2023-03-14 12:35:58 -04:00
OpenShift Merge Robot 08cd180abc
Merge pull request #17736 from giuseppe/no-private-cgroupns-systemd
cgroupns: private cgroupns on cgroupv1 breaks --systemd
2023-03-14 11:33:24 -04:00
OpenShift Merge Robot 1a8a5bc04c
Merge pull request #17758 from edsantiago/bud_rootless_remote
bud tests: rootless remote: use correct socket path
2023-03-14 10:26:57 -04:00
OpenShift Merge Robot 6025103196
Merge pull request #17759 from sbrivio-rh/pasta
Revert "pasta: Use two connections instead of three in TCP range forward tests"
2023-03-14 10:00:02 -04:00
Paul Holzinger 7d8d3e810f
system service --log-level=trace: support hijack
When the service is running with trace log level it wraps the
`http.ResponseWriter` to log extra information. The problem is that the
new type does not keep all the functions from the embedded type.
Instead we have to implement them ourselves, however only Write() was
implemented. Thus `Hijack()`could not be called on the writer. To
prevent these issues we would implement all the interfaces that the
inner type supports (Header, WriteHeader, Flush, Hijack).

Fixes #17749

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-03-14 14:33:52 +01:00
Paul Holzinger eed389508e
test/system: fix wait_for_port() to wait for bind
The goal of the wait_for_port() function is to return when the port is
bound. This is to make sure we wait for application startup time.
This can be seen in some comments of the callers.

Commit 7e3d04fb caused this regression while reworking the logic to read
ports from /proc. I doesn't seem to cause problems in CI, properly
because the function returns before the port is bound.
I have not seen any flakes related to this but I only see the ones on
PRs where I rerun tests so it is best to wait for Ed to take a look.

Also fixes the broken ipv4_to_procfs() which only passes one argument to
__ipv4_to_procfs(), this results in the ipv4 not beeing inverted.
Therefore all bind checks against a direct ipv4 did not work.
This function accepts only an ipv4 but one caller passes localhost
which is invalid.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-03-14 14:24:04 +01:00
Giuseppe Scrivano 2d1f4a8bff
cgroupns: private cgroupns on cgroupv1 breaks --systemd
On cgroup v1 we need to mount only the systemd named hierarchy as
writeable, so we configure the OCI runtime to mount /sys/fs/cgroup as
read-only and on top of that bind mount /sys/fs/cgroup/systemd.

But when we use a private cgroupns, we cannot do that since we don't
know the final cgroup path.

Also, do not override the mount if there is already one for
/sys/fs/cgroup/systemd.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-03-14 12:34:52 +01:00
Valentin Rothberg 7a7af735ad test/system/255-auto-update.bats: multiple services
Wait for all generated services to be ready to be sure we can iron out
race conditions.  Also disable rollbacks to make sure we can analyze
the error if restarting a service fails.  This information may be
crucial to understand the flakes on Debian as tracked in #17607.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-14 10:30:32 +01:00
Valentin Rothberg 40d0d233eb 255-auto-update.bats: turn off rollback where needed
To help debug #17607, turn off rollbacks for tests that do not require
rollbacks.  Error when restarting the systemd units are then not
suppressed but returned which should give us more information about what
is going on the Debian systems.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-14 10:16:59 +01:00
Stefano Brivio 1c08f2edac Revert "pasta: Use two connections instead of three in TCP range forward tests"
This reverts commit e33f4e0bc7, going
back to three connections (not two) for each range in TCP tests. I'm
not sure yet what caused the original issue, but it might be fixed
now. If it does, this fixes #17287.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2023-03-13 20:40:15 +01:00
Daniel J Walsh ad8a96ab95
Support running nested SELinux container separation
Currently Podman prevents SELinux container separation,
when running within a container. This PR adds a new
--security-opt label=nested

When setting this option, Podman unmasks and mountsi
/sys/fs/selinux into the containers making /sys/fs/selinux
fully exposed. Secondly Podman sets the attribute
run.oci.mount_context_type=rootcontext

This attribute tells crun to mount volumes with rootcontext=MOUNTLABEL
as opposed to context=MOUNTLABEL.

With these two settings Podman inside the container is allowed to set
its own SELinux labels on tmpfs file systems mounted into its parents
container, while still being confined by SELinux. Thus you can have
nested SELinux labeling inside of a container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-13 14:21:12 -04:00
Ed Santiago 159936a114 bud tests: rootless remote: use correct socket path
Another followup to #17608. Nightly tests were hanging,
because /run/podman/podman.sock was hardcoded (bad idea
for rootless). Poor testing on my part.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-03-13 10:59:38 -06:00
Giuseppe Scrivano fb4f6f95c5
test: reenable idmap test
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-03-11 12:15:38 +01:00
OpenShift Merge Robot 9a45503c80
Merge pull request #17249 from rhatdan/qm
Must use mountlabel when creating builtin volumes
2023-03-09 14:27:05 -05:00
Daniel J Walsh b5a99e0816
Must use mountlabel when creating builtin volumes
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-09 12:36:52 -05:00
Daniel J Walsh 21651706e3
podman inspect list network when using --net=host or none
This will match Docker behaviour.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-08 17:27:08 -05:00
OpenShift Merge Robot 747369c82d
Merge pull request #17713 from sbrivio-rh/pasta
pasta: Re-enable "Local forwarder, IPv4" test now that packages in CI images are fixed
2023-03-08 20:22:45 +01:00
Stefano Brivio f928cf54aa pasta: Re-enable "Local forwarder, IPv4" test, accept NXDOMAIN as response
This case is fixed by passt commit bad252687271 ("conf, udp: Allow
any loopback address to be used as resolver") and the fix is now
available in packages included by the CI images.

Note that, depending on the resolver on the host, we might get
1.0.0.127.in-addr.arpa resolved to localhost, or simply NXDOMAIN for
it: accept a failure on the nslookup command, as long as we have a
response for 1.0.0.127.in-addr.arpa in the output. If we have any
response, that means we could talk to the resolver.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2023-03-08 17:09:40 +01:00
dependabot[bot] 829e910cde
build(deps): bump golang.org/x/tools from 0.6.0 to 0.7.0 in /test/tools
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 13:02:30 +00:00
restitux cb3cda55f2 Quadlet: add support for setting --ip and --ip6
Signed-off-by: restitux <restitux@ohea.xyz>
2023-03-06 18:36:41 -07:00
Valentin Rothberg e77f370f86 sqlite: add a hidden --db-backend flag
Add a hidden flag to set the database backend and plumb it into
podman-info.  Further add a system test to make sure the flag and the
info output are working properly.

Note that the test may need to be changed once we settled on how
to test the sqlite backend in CI.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-02 13:43:11 +01:00
OpenShift Merge Robot 8457bb5542
Merge pull request #16717 from umohnani8/detach
play kube: Add --wait option
2023-03-01 16:46:54 +01:00
OpenShift Merge Robot 4f4665cbda
Merge pull request #17673 from vrothberg/fix-17607
auto-update test: wait for service to be ready
2023-03-01 16:09:14 +01:00
OpenShift Merge Robot 86a0e44ccd
Merge pull request #17659 from cevich/fix_bud_git_config
Cirrus: Fix git config permission denied
2023-03-01 15:15:35 +01:00
OpenShift Merge Robot 69ba3548f0
Merge pull request #17653 from Luap99/fix-17616
fix "podman logs --since --follow" flake
2023-03-01 15:12:32 +01:00
Valentin Rothberg 51cf2dd363 test/system/255-auto-update.bats: wait 10 for update to finish
10 seconds is used by most other tests as a timeout. Given the test
flakes on Debian use it.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-01 14:45:59 +01:00
Valentin Rothberg b727f30ac6 auto-update test: wait for service to be ready
The symptoms in #17607 point to some race since it does not always flake
on Debian (and Debian only).  Hence, wait for the service to be ready
before building the image to make sure that the service is started with
the old image and that everything's in order.

Fixes: #17607
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-01 13:43:29 +01:00
OpenShift Merge Robot 3cab05aa3e
Merge pull request #17656 from ygalblum/quadlet-container-mount
Quadlet: Add support for the Mount key in .container files
2023-03-01 09:21:09 +01:00
OpenShift Merge Robot 02a77d27a2
Merge pull request #17450 from danishprakash/add-group-entry
create: add entry to /etc/group via `--group-entry`
2023-02-28 21:59:59 +01:00
Urvashi Mohnani 20a42d0e4f play kube: Add --wait option
Add a way to keep play kube running in the foreground and terminating all pods
after receiving a a SIGINT or SIGTERM signal. The pods will also be
cleaned up after the containers in it have exited.
If an error occurrs during kube play, any resources created till the
error point will be cleane up also.

Add tests for the various scenarios.

Fixes #14522

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-02-28 13:45:36 -05:00
Chris Evich 6babef5983
Cirrus: Fix git config permission denied
The buildah bud tests run rootless, so attempting to bypass the
ident-check with a `git config --system` fails with a permission denied
error (as it should).  Update the command to use `--global` instead,
which writes to `~/.gitconfig` and so works for regular users.

Also setup a fake identity for the CI-user and enable shell-debugging
for the commands to inform humans of what is happening in the script.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-28 10:52:20 -05:00
Ygal Blum ccc5aa59a0 Quadlet: Add support for the Mount key in .container files
Handle the Mount key
Reuse code from the handling of the Volume key
Add E2E Test
E2E Test - Add checker for KeyValue string
Update man page

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-02-28 16:14:19 +02:00
OpenShift Merge Robot a5895e3ed7
Merge pull request #17650 from sbrivio-rh/pasta
Revert "Skip all pasta tests"
2023-02-28 13:47:27 +01:00
Paul Holzinger 77861d6af3
fix "podman logs --since --follow" flake
The test should make sure the logs --follow call will log entries that
are created in the future when --since is used and doe not include the
container start event. However it seems the timing is to tight. I think
it was possible that CI logged the line before the logs call was made,
thus it is missing because --since excluded it.

I cannot reproduce so I am not 100% on this but we can reopen the issue
if it still happens.

Fixes #17616

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-02-28 13:31:28 +01:00
Stefano Brivio 42540a6679 Revert "Skip all pasta tests"
This reverts commit 81f116c59c291793742e10ea84b77511902a0338: the
passt package for Fedora 37 images is now fixed in the
c20230223t153813z-f37f36d12 image.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2023-02-28 11:37:59 +01:00
Chris Evich 0f92e19e8e
Cirrus: Fix bud tests failing to apply patches
For some weeks or longer, the buildah bud tests have been failing under
cirrus-cron with the message:

```
+ git am --reject
Committer identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for
<some30462dude@cirrus-task-5479994827210752.c.libpod-218412.internal>)
not allowed
```

Fix this by marking the clone directory "safe" when the script is
running under CI.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-27 12:08:41 -05:00
Ed Santiago d838c08b30 buildah-bud tests: don't sudo when rootless is desired
Followup to #17608, rootless buildah-bud in cron. I forgot
one crucial step, skipping the sudo.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-02-24 05:49:45 -07:00
OpenShift Merge Robot afa0167d47
Merge pull request #17601 from ygalblum/quadlet-do-not-set-runtime
Quadlet - use the default runtime
2023-02-23 10:54:48 +01:00
OpenShift Merge Robot 3796e22761
Merge pull request #17586 from mheon/add_sql_state
Add initial SQLite-backed state implementation
2023-02-23 09:11:05 +01:00
Ygal Blum 0d75854c52 Quadlet - use the default runtime
Do not set the runtime when processing a .container file
Let Podman choose the runtime based on its configuration

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-02-23 09:29:39 +02:00
OpenShift Merge Robot 7fba1db31a
Merge pull request #17526 from danishprakash/fix-kube-secret
kube: rm secret on down, print secret on play
2023-02-22 19:34:18 +01:00
OpenShift Merge Robot efbc35601f
Merge pull request #17305 from cevich/swap_ubuntu_debian
Replace Ubuntu -> Debian SID
2023-02-22 19:31:45 +01:00
Matt Heon 89d0ccd195 Get E2E tests to pass
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
Chris Evich 81f116c59c
Skip all pasta tests
A horrible timeout-flake exists in the version presently in CI VM images
`c20230221t162829z-f37f36d12`.  Since the PR for adding the 2023-02-21
images is more urgently needed (#17305) than a pasta fix, skip all pasta
tests while waiting for a fix.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:55:12 -05:00
Chris Evich 642e9ddb8d
Skip buildah-bud test
Test is completely broken, see buildah issue 4396.

Thanks to @edsantiago for the patch.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:44:03 -05:00
Chris Evich 10382d0bca
Skip buildx test with VFS podman storage driver
Ref: https://github.com/containers/podman/issues/17520

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:44:03 -05:00
Chris Evich dd51b62b7a
Skip 'podman kube --network' test for rootless CGv1
Test emits nasty warning message:
`Resource limits are not supported and ignored on cgroups V1 rootless
systems`

Ref: issue #17582

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:43:19 -05:00
Chris Evich 197529f084
Skip tests which fail with CGv1 & runc
* Skip play-kube test when runc is in use #17436
* Skip uid/gidmapping idmapped-volume test #17433

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:35:03 -05:00
OpenShift Merge Robot d71c341b94
Merge pull request #17603 from edsantiago/bats_cleanup
Logs follow-until tests: loosen checks
2023-02-22 16:32:01 +01:00
Chris Evich 5b4f248a84
Skip rootless CGv1 quadlet tests due to issue
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:31:18 -05:00
OpenShift Merge Robot d5a82485a1
Merge pull request #17577 from giuseppe/idmapping-mounts-always-direct-mapping
libpod: always use direct mapping for idmapped mounts
2023-02-22 14:53:33 +01:00
Ed Santiago 12153da837 Logs follow-until tests: loosen checks
...in hopes of fixing a flake with podman-remote. It's still
possible that there's a real problem with logs under remote,
and this will just sweep that under the rug.

Also, fix a nasty-red test warning (add cleanup), refactor
uses of $(pause_image), and improve a few test assertions.

Closes: #17286

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-02-22 06:24:51 -07:00
OpenShift Merge Robot 38c91945a6
Merge pull request #17578 from Luap99/netavark-dns
netavark: only use aardvark ip as nameserver
2023-02-22 14:04:12 +01:00
OpenShift Merge Robot 44bd6dd1fc
Merge pull request #17594 from Luap99/compat-network-create
compat API: network create return 409 for duplicate
2023-02-21 22:47:30 +01:00
Paul Holzinger 4b4b423b6c
compat API: network create return 409 for duplicate
If the name already exists and CheckDuplicate is set we need to return
409, if CheckDuplicate is not set we return the network without error.

Fixes #17585

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-02-21 16:55:27 +01:00
OpenShift Merge Robot 36db47df98
Merge pull request #17588 from ygalblum/quadlet-logdriver
Quadlet: Add support for LogDriver key in container and kube units
2023-02-21 16:24:03 +01:00
Valentin Rothberg adacd3b127 vendor c/common@852ca05a1f
Also force an update of c/image to prevent a downgrade.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-21 14:06:42 +01:00
Ygal Blum 6a3757b73a Quadlet: Add support for LogDriver key in container and kube units
Allow the user to set the log driver while keeping the default of passthrough

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-02-21 11:56:35 +02:00
Giuseppe Scrivano af8d649da7
libpod: always use direct mapping
always use the direct mapping when writing the mappings for an
idmapped mount.  crun was previously using the reverse mapping, which
is not correct and it is being addressed here:

https://github.com/containers/crun/pull/1147

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-02-20 18:34:11 +01:00
OpenShift Merge Robot d10af21e14
Merge pull request #17502 from Luap99/passthrough-logs
podman logs: read journald with passthrough
2023-02-20 16:37:04 +01:00
Paul Holzinger 9dc730d9f3
netavark: only use aardvark ip as nameserver
Since commit 06241077cc we use the aardvark per container dns
functionality. This means we should only have the aardvark ip in
resolv.conf otherwise the client resolver could skip aardvark, thus
ignoring the special dns option for this container.

Fixes #17499

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-02-20 15:56:17 +01:00
dependabot[bot] e9942c61dd build(deps): bump github.com/container-orchestrated-devices/container-device-interface
Bumps [github.com/container-orchestrated-devices/container-device-interface](https://github.com/container-orchestrated-devices/container-device-interface) from 0.5.3 to 0.5.4.
- [Release notes](https://github.com/container-orchestrated-devices/container-device-interface/releases)
- [Commits](https://github.com/container-orchestrated-devices/container-device-interface/compare/v0.5.3...v0.5.4)

---
updated-dependencies:
- dependency-name: github.com/container-orchestrated-devices/container-device-interface
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

[NO NEW TESTS NEEDED]

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-20 14:51:04 +01:00
Paul Holzinger 79a05ca2b4
podman logs passthrough driver support --cgroups=split
When run with --cgroups=split mode (e.g. quadlet) we do not use the a
separate cgroup for the container and just run in the unit cgroup.
When we filter logs we thus must match the unit name.
Added a small test to the quadlet test to make sure it will work.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-02-20 13:58:16 +01:00
Paul Holzinger d7e96536ee
journald logs: simplify entry parsing
It makes little sense to create a log line string from the entry just to
parse it again into a LogLine. We have the typed fields so we can
assemble the logLine direclty, this makes things simpler and more
efficient.

Also entries from the passthrough driver do not use the CONTAINER_ID_FULL
field, instead we can just access c.ID() directly.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-02-20 13:58:15 +01:00
Paul Holzinger 1590c7bf42
podman logs: read journald with passthrough
The passthrough driver is designed for use in systemd units. By default
we can expect systemd to log the output on journald unless the unit sets
differen StandardOutput/StandardError settings.

At the moment podman logs just errors out when the passthrough driver is
used. With this change we will read the journald for the unit messages.
The logic is actually very similar to the existing one, we just need to
change the filter. We now filter by SYSTEMD_UNIT wich equals to the
contianer cgroup, this allows us the actually filter on a per contianer
basis even when multiple contianers are started in the same unit, i.e.
via podman-kube@.service.

The only difference a user will see is that journald will merge
stdout/err into one stream so we loose the separation there.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-02-20 13:58:12 +01:00
OpenShift Merge Robot 8d9517c38f
Merge pull request #17508 from vrothberg/fix-17181
auto-update: support pods
2023-02-20 12:51:43 +01:00
danishprakash 2659a3228a
kube: rm secret on down, print secret on play
Signed-off-by: danishprakash <danish.prakash@suse.com>
2023-02-20 16:24:40 +05:30
OpenShift Merge Robot f9b066ff38
Merge pull request #17548 from vrothberg/fix-17482
kube play: only enforce passthrough in Quadlet
2023-02-17 16:00:55 +01:00
OpenShift Merge Robot b55df7f151
Merge pull request #17538 from edsantiago/system_test_assert
System tests: assert(): friendlier failure messages
2023-02-17 12:04:56 +01:00
Valentin Rothberg c95978f600 kube play: only enforce passthrough in Quadlet
Only enforce the passthrough log driver for Quadlet. Commit 68fbebf
introduced a regression on the `podman-kube@` template as `podman logs`
stopped working and settings from containers.conf were ignored.

Fixes: #17482
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-17 11:57:10 +01:00
OpenShift Merge Robot f9af49622d
Merge pull request #17464 from hasan4791/issue-16711
[FEAT] Support sysctl configurations from Pod Spec
2023-02-17 11:41:49 +01:00