Commit Graph

6085 Commits

Author SHA1 Message Date
Alberto Faria 5cc83da1c6 Pass the OCI runtime an empty entrypoint when there is no entrypoint
Some OCI runtimes (cf. [1]) may tolerate container images that don't
specify an entrypoint even if no entrypoint is given on the command
line. In those cases, it's annoying for the user to have to pass a ""
argument to podman.

If no entrypoint is given, make the behavior the same as if an empty ""
entrypoint was given.

[1] https://github.com/containers/crun-vm

Signed-off-by: Alberto Faria <afaria@redhat.com>
2024-01-23 10:10:44 +00:00
renovate[bot] 70c3accf7c
Update module golang.org/x/tools to v0.17.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-18 18:58:28 +00:00
renovate[bot] e757f7631e
Update module github.com/onsi/ginkgo/v2 to v2.14.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-17 20:22:02 +00:00
openshift-merge-bot[bot] d38ee1364d
Merge pull request #21267 from danishprakash/new-pod-behavior
rm pod with run, create if ctr creation failed with --pod new:
2024-01-17 20:20:52 +00:00
danishprakash 1c88b12204
rm pod with podman run if ctr creation failed
Currently, if the container creation failed with
either run or create and you've used --pod with new:
the pod would be created nonetheless. This change ensures
the pod just created is also cleaned up in case
of container creation failure

Fixes #21228

Signed-off-by: danishprakash <danish.prakash@suse.com>
2024-01-17 18:59:32 +05:30
Ed Santiago e66413b51b CI: reenable tests that are working again
- #15074 ("subtree_control" flake). The flake is NOT FIXED, I
  saw it six months ago on my (non-aarch64) laptop. However,
  it looks like the frequent-flake-on-aarch64 bug is resolved.
  I've been testing in #17831 and have not seen it. So,
  tentatively remove the skip and see what happens.

- Closes: #19407 (broken tar, "duplicates of file paths")
  All Fedoras now have a fixed tar. Debian DOES NOT, but
  we're handling that in our build-ci-vm code. I.e., the
  Debian VM we're using has a working tar even though there's
  currently a broken tar out in the wild.

  Added distro-integration tag so we can catch future problems
  like this in OpenQA.

- Closes: #19471 (brq / blkio / loopbackfs in rawhide)
  Bug appears to be fixed in rawhide, at least in the VMs we're
  using now.

  Added distro-integration tag because this test obviously
  relies on other system stuff.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-01-16 10:07:48 -07:00
openshift-merge-bot[bot] 9fed92ba89
Merge pull request #21234 from edsantiago/sdnotify_race
systests: kube with policies test: fix race
2024-01-15 20:36:57 +00:00
openshift-merge-bot[bot] 3a46fe858f
Merge pull request #21069 from umohnani8/new-farmbuild-2
farm build: push built images to registry
2024-01-15 18:41:29 +00:00
Urvashi Mohnani d95710a89c farm build: push built images to registry
Update farm build to directly push images to a registry
after all the builds are complete on all the nodes.
A manifest list is then created locally and pushed to
the registry as well.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2024-01-15 11:31:17 -05:00
openshift-merge-bot[bot] dd4b0ae445
Merge pull request #21226 from mheon/force_remove_on_system_reset
Fix `podman system reset` with external containers
2024-01-15 08:39:19 +00:00
Matt Heon b94be90a16 Remove Libpod special-init conditions
Before this, for some special Podman commands (system reset,
system migrate, system renumber), Podman would create a first
Libpod runtime to do initialization and flag parsing, then stop
that runtime and create an entirely new runtime to perform the
actual task. This is an artifact of the pre-Podman 2.0 days, when
there was almost no indirection between Libpod and the CLI, and
we only used one runtime because we didn't need a second runtime
for flag parsing and basic init.

This system was clunky, and apparently, very buggy. When we
migrated to SQLite, some logic was introduced where we'd select a
different database location based on whether or not Libpod's
StaticDir was manually set - which differed between the first
invocation of Libpod and the second. So we'd get a different
database for some commands (like `system reset`) and they would
not be able to see existing containers, meaning they would not
function properly.

The immediate cause is obviously the SQLite behavior, but I'm
certain there's a lot more baggage hiding behind this multiple
Libpod runtime logic, so let's just refactor it out. It doesn't
make sense, and complicates the code. Instead, make Reset,
Renumber, and Migrate methods of the libpod Runtime. For Reset
and Renumber, we can shut the runtime down afterwards to achieve
the desired effect (no valid runtime after). Then pipe all of
them through the ContainerEngine so cmd/podman can access them.

As part of this, remove the SystemEngine part of pkg/domain. This
was supposed to encompass these "special" commands, but every
command in SystemEngine is actually a ContainerEngine command.
Reset, Renumber, Migrate - they all need a full Libpod and access
to all containers. There's no point to a separate engine if it
just wraps Libpod in the exact same way as ContainerEngine. This
consolidation saves us a bit more code and complexity.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-01-12 09:19:34 -05:00
Daniel J Walsh 46cfc9858f
Make --gpus work with nvidia gpus
Somewhat documented here:
https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/cdi-support.html
https://stackoverflow.com/questions/25185405/using-gpu-from-a-docker-container

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

Don't have access to nvidia GPUS, relying on contributor testing.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-01-11 21:13:25 -05:00
Ed Santiago 0e09527bd2 systests: kube with policies test: fix race
Add a wait_for_ready() to one kube-play test, to make sure
container output has made it to the journal.

Probably does not fix #18501, but I think it might fix its
most common presentation.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-01-11 13:04:41 -07:00
openshift-merge-bot[bot] 83f89db6c8
Merge pull request #20961 from karuboniru/patch-1
fix checking of relative idmapped mount
2024-01-11 17:20:56 +00:00
Philip Dubé 522934d5cf Replace strings.SplitN with strings.Cut
Cut is a cleaner & more performant api relative to SplitN(_, _, 2) added in go 1.18

Previously applied this refactoring to buildah:
https://github.com/containers/buildah/pull/5239

Signed-off-by: Philip Dubé <philip@peerdb.io>
2024-01-11 13:50:15 +00:00
openshift-merge-bot[bot] 28b5a6e5f0
Merge pull request #21201 from edsantiago/rhel8_gating
System tests: fixes for RHEL8 gating failures
2024-01-10 11:18:32 +00:00
Ming Liu 4e4c3e3dbf cmd: support --config option to locate authentication file
Let's support --config option by setting environment variable
DOCKER_CONFIG instead of ignoring it for docker compatibility, so
it could be used to locate config.json as authentication file.

Also add a test case for this change, remove the deprecated one.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2024-01-10 09:31:43 +01:00
Ed Santiago 780733415b System tests: fixes for RHEL8 gating failures
- tmpfs + noswap test: requires noswap feature in kernel.
  Check for it, and skip if unimplemented. (Root only.
  Rootless test works regardless of kernel).

- podman generate systemd tests: always use --files option,
  because otherwise the "DEPRECATED" warning gets written
  to the systemd unit file.

- kube play tests: yikes. Fix longstanding bugs when checking
  for containers running. This revealed a longstanding bug
  in one test: multi-pod YAML never actually worked. Fixed now.

- run_podman(): that new check-for-warnings code we added
  in #19878, duh, I skipped it on Debian but should've skipped
  when *runc*. Do so now and update the comment. Requires
  minor surgery to podman_runtime() helper to avoid
  infinite recursion.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-01-09 09:30:15 -07:00
Ed Santiago c90e9dad7a e2e: reenable warning checks on Debian
Back when we introduced ExitCleanly(), we couldn't use it
on Debian because of too many runc bugs. Now, early 2024:

 - #11784 has been closed-wontfix, so add a runc special-case
   in the specific test that triggers it.

 - #11785 seems to have gone away? Treat it as fixed.

 - #19552 is languishing, so let's just close-wontfix it too and
   add another runc special case.

 - and, one new rootless-cgroupsV1 exception for a warning msg
   that snuck in recently.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-01-07 18:00:54 -07:00
Oleksandr Redko 8bdf77aa20 Refactor: replace StringInSlice with slices.Contains
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2024-01-05 16:25:56 +02:00
openshift-merge-bot[bot] a275f65bb2
Merge pull request #21153 from chuanchang/test_coverage_for_RHEL-14469
test/system: add test for mounting issue in the init container
2024-01-05 11:52:23 +00:00
Alex Jia 260f814bd3 test/system: add test for mounting issue in the init container
Test coverage: https://issues.redhat.com/browse/RHEL-14469

Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
2024-01-05 09:57:12 +08:00
Daniel J Walsh f0319d5b7a
Error messages not being reported unless more then one error present
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-01-04 14:23:04 -05:00
openshift-merge-bot[bot] de797e5724
Merge pull request #21142 from ygalblum/quadlet-stop-params
Quadlet - add StopTimeout key for .container file
2024-01-04 11:53:31 +00:00
Oleksandr Redko 2a2d0b0e18 chore: delete obsolete // +build lines
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2024-01-04 11:53:38 +02:00
Ygal Blum 689d97a1d1 Quadlet - add StopTimeout key for .container file
Allow setting the timeout for stopping the container
Add test
Update man

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-01-03 18:38:38 +02:00
openshift-merge-bot[bot] 185fa5ba3f
Merge pull request #21103 from fj-tsubasa/remote-kube-play-publish-all
remote: fix podman-remote kube play --publish-all
2024-01-03 12:41:41 +00:00
Ed Santiago 8c546cf7ee CI: bump VMs
All VMs have pasta 2023-12-04, so, remove a skip.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-01-02 16:10:35 -07:00
openshift-merge-bot[bot] a8c8704664
Merge pull request #21112 from ygalblum/quadlet-multiline-trailing-whitespaces
Quadlet - fix trailing whitespaces handling
2024-01-02 12:54:13 +00:00
Ygal Blum 70a53cb76a Quadlet - fix trailing whitespaces handling
Remove all trailing white spaces from all lines before the line by line
processing
Add test
Exclude the unit file used for the test from whitespace check

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-01-02 12:26:44 +02:00
Tsubasa Watanabe ec5422af5b e2e: Skip journalctl if journald is unavailable
Test "podman start container by systemd" is failed on the system in
which rootless users don't have accessibility to journald. Therefore,
skip the part that reads journal with journalctl.

Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>
2023-12-31 15:27:53 +09:00
Tsubasa Watanabe 4f94c96b9b remote: fix podman-remote kube play --publish-all
Fix `podman kube play --publish-all` to work in remote environment.

Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>
2023-12-29 12:41:54 +09:00
openshift-merge-bot[bot] 6a65597358
Merge pull request #21053 from rhatdan/VERSION
Move golang requirement from 1.18 to 1.20
2023-12-19 12:10:46 +00:00
openshift-merge-bot[bot] d161cf32fb
Merge pull request #21046 from gavinkflam/improve-test-compose
Improve compose tests to report test errors as failures
2023-12-18 20:35:44 +00:00
openshift-merge-bot[bot] de3c02ab46
Merge pull request #21039 from rhatdan/pods
Allow PublishPorts to be used with [Pod] entry
2023-12-18 20:30:15 +00:00
Daniel J Walsh 9d0da9d0fd
Strip key/values of external quotes
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-12-18 08:03:26 -05:00
Daniel J Walsh 4dd58f226d
Move golang requirement from 1.18 to 1.20
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-12-18 07:29:31 -05:00
Daniel J Walsh f169fc76af
Allow PublishPorts to be used with [Pod] entry
Fixed: https://github.com/containers/podman/issues/21035

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-12-17 06:25:36 -05:00
Paul Nettleton 6a96c8b5fc quadlet container support multiple Ulimit options
Add support for using multiple `Ulimit=` options in `.container` files.
Before, only the last `Ulimit=` option was used in the podman command.

Update podman-systemd.unit.5 docs to reflect this change.

Add `test/e2e/quadlet/ulimit.container` to e2e tests.

Signed-off-by: Paul Nettleton <k9@k9withabone.dev>
2023-12-17 04:31:59 -06:00
Gavin Lam ccc3eb774d
Improve compose tests
* Add traps to report setup, tests, and teardown errors as failures
* Pass through return code of podman commands
* Fix unset variables
* Fix simple_port_map image build when installing flask (PEP 668 - externally managed environment error)
* Ignore kill errors in slirp4netns_opts teardown steps

Signed-off-by: Gavin Lam <gavin.oss@tutamail.com>
2023-12-16 12:04:25 -05:00
openshift-merge-bot[bot] 07834ab39e
Merge pull request #21013 from gavinkflam/17167-compat-base-hosts-file
Fix Docker API compatibility with network alias
2023-12-15 20:44:08 +00:00
openshift-merge-bot[bot] d1d38b2aa4
Merge pull request #21011 from edsantiago/wait_wait_wait
CI: safer podman-stop tests
2023-12-15 20:31:38 +00:00
Gavin Lam db68764d8b
Fix Docker API compatibility with network alias (#17167)
* Add BaseHostsFile to container configuration
* Do not copy /etc/hosts file from host when creating a container using Docker API

Signed-off-by: Gavin Lam <gavin.oss@tutamail.com>
2023-12-14 23:31:44 -05:00
Ygal Blum d026ccf9a7 Kube Play - pass arguments to build
Create a buildah SystemContext from the existing cli arguments
Pass the SystemContext to the build
Add system test

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-12-14 16:31:09 +02:00
Ed Santiago 1c59a9ced1 CI: safer podman-stop tests
A number of tests start a container then immediately run podman stop.
This frequently flakes with:

   StopSignal SIGTERM failed to stop [...] in 10 seconds, resorting to SIGKILL

Likely reason: container is still initializing, and its process
has not yet set up its signal handlers.

Solution: if possible (containers running "top"), wait for "Mem:"
to indicate that top is running. If not possible (pods / catatonit),
sleep half a second.

Intended to fix some of the flakes cataloged in #20196 but I'm
leaving that open in case we see more. These are hard to identify
just by looking in the code.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-12-14 04:49:46 -07:00
openshift-merge-bot[bot] b82e336751
Merge pull request #21004 from umohnani8/push-endpoint
Fix push endpoint stream
2023-12-13 22:41:33 +00:00
Urvashi Mohnani 126670d5dd Fix push endpoint stream
The push binding endpoint wasn't actually writing the
output data to the stream when quiet=false and there
was no push error.
Do not hard code quiet=true anymore, take into account the
user input.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-12-13 13:01:21 -05:00
Ed Santiago 232c32bd35 CI: systests: safer isolation in registry & tests
Our test registry (used for login & local registry tests)
was being run using the standard podman tmpdir, hence the
standard podman database, This was then getting clobbered
in the 330-corrupt-images test, which runs "system reset".
We just didn't know this was happening. Until we added
a registry test after the system reset. Oops.

Solution: new helper function podman_isolation_opts()
sets --root, --runroot, *and --tmpdir*. Refactor all
existing --root/--runroot usages. Document.

Next problem: the "network reload" test in 500-networking.bats
did not (could not) know about our registry port, so the
"iptables -F" command reverted that to DROP, so the subsequent
podman-auth in 700-play timed out.

Solution: add a podman-isolated "network reload" to start_registry().

Final problem, because, really, those weren't enough: a BATS
bug where running with --filter-tags would set IFS=',' in setup_suite
which in turn has catastrophic consequences:

    https://github.com/bats-core/bats-core/issues/812

See #20966 for details of the failure and further conversation.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-12-13 09:46:09 -07:00
openshift-merge-bot[bot] 4582b61d7c
Merge pull request #20958 from rhatdan/ps
Support podman ps --format '{{ .Label label }}'
2023-12-13 14:26:17 +00:00
openshift-merge-bot[bot] 5db4224427
Merge pull request #20976 from Luap99/string-array
cli: use StringArray over StringSlice Part 2
2023-12-13 12:22:31 +00:00
Daniel J Walsh f51ff77644
Support podman ps --format '{{ .Label label }}'
Also Support for podman pod ps  --format '{{ .Label label }}'

Finally fix support for --format '{{ .Podname }}'
   When user specifies .Podname this implies --pod was passed.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-12-13 07:09:54 -05:00
openshift-merge-bot[bot] a5c8bb25cc
Merge pull request #20997 from containers/renovate/golang.org-x-tools-0.x
fix(deps): update module golang.org/x/tools to v0.16.1
2023-12-13 11:02:43 +00:00
openshift-merge-bot[bot] a52f75e20b
Merge pull request #20938 from edsantiago/new_vms
CI: unskip tests on new VMs
2023-12-13 10:32:30 +00:00
renovate[bot] 36e04599af
fix(deps): update module golang.org/x/tools to v0.16.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-12 22:06:35 +00:00
Paul Holzinger 0f02e43cee
cli: podman manifest annotate --annotation use StringArray()
This option accepts arbitrary input so we should allow commas in it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-11 15:43:21 +01:00
Paul Holzinger d8c3e5b3c1
cli: podman manifest add --annotation use StringArray()
This option accepts arbitrary input so we should allow commas in it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-11 15:43:21 +01:00
Paul Holzinger 3e10a68328
cli: podman kube play --configmap use StringArray()
This option accepts a file path so we should allow commas in it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-11 15:43:21 +01:00
Paul Holzinger 2be4b007b0
cli: podman kube play --log-opt use StringArray()
This option accepts arbitrary input so we should allow commas in it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-11 15:43:21 +01:00
Paul Holzinger 48ab4aec31
podman kube play: fix broken annotation parsing
If a user did not set an equal sign in the annotation that old code
would panic when accessing the second element in the slice.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-11 15:43:21 +01:00
Paul Holzinger e916f49f0b
cli: podman kube play --annotation use StringArray()
This option accepts arbitrary input so we should allow commas in it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-11 15:43:20 +01:00
Paul Holzinger cdb178e954
cli: podman push --encryption-key use StringArray()
This option accepts a file path so we should allow commas in it.
Also add tests for --decryption-key

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-11 15:43:20 +01:00
Ed Santiago 6415471dcd EMERGENCY: fix broken CI
Broken by #20827.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-12-11 06:28:21 -07:00
openshift-merge-bot[bot] 611ba2ff31
Merge pull request #20827 from kaivol/userns-auto-intermediate-id-lookup
Support lookup of intermediate ID for uidmapping and gidmapping in `--userns=auto`
2023-12-11 10:19:14 +00:00
kaivol 952c708906 added system test
Signed-off-by: kaivol <github@kavol.de>
2023-12-10 14:16:08 +01:00
Karuboniru 23f6c48515 Add test for relative idmap mount
Signed-off-by: Karuboniru <yanqiyu01@gmail.com>
2023-12-10 13:13:30 +00:00
Ed Santiago c823d49fdc CI: unskip tests
New VMs have netavark 1.9, which fixes the "cannot talk to syslog"
warning when running containerized, so we can reenable clean-output
checks in containerized e2e tests

pasta: some new VMs have passt >= 2023-11-10, but f38 does not,
and f39 is unclear (my version extractor could not tell). So
I'm leaving the 20170 skip.

Debian runc now supports umask in *run*, but not *exec*. Even
with runc 1.1.10. And we don't even know what the situation is
on RHEL... so, run the podman-run umask tests but not exec.

Fixes: #19809

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-12-08 15:51:36 -07:00
Paul Holzinger 4590b663a7
add test for podman exec --env-file
There was no test for this option, resuse existing podman run
--env-file test for exec as well.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-08 15:06:24 +01:00
Paul Holzinger 833163ff3e
add podman create --label-file test
There was no test for this option so I added one.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-08 15:06:23 +01:00
Paul Holzinger 201920f6a4
cli: podman run/create --chrootdirs use StringArray()
This options accepts a file path so we should allow commas in it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-08 12:17:02 +01:00
Paul Holzinger dbbec99361
cli: podman run/create --log-opt use StringArray()
This option accepts arbitrary input so we should allow commas in it.

Fixes #20064

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-08 12:17:01 +01:00
Paul Holzinger b011aa4430
cli: podman run/create --env-file use StringArray()
This option accepts a file path so we should allow commas in it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-08 12:17:01 +01:00
Paul Holzinger ef10073b51
cli: podman run/create --annotation use StringArray()
This option accepts arbitrary input so we should allow commas in it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-08 12:17:01 +01:00
Paul Holzinger c5258d4630
cli: podman --hooks-dir use StringArray()
This option accepts a file path so we should allow commas in it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-08 12:17:01 +01:00
Paul Holzinger 12c39ffda2
cli: podman --module use StringArray()
This option accepts a file path so we should allow commas in it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-12-08 12:17:01 +01:00
Ed Santiago 0d1b90d367 CI: systests: fix flaking --since test
Very rare flake, probably caused by my nemesis, podman run -d

Solution: keep the sleep-1 (vs using nanosecond resolution),
but make sure we first wait for the output from the container.

Also, bump down the iteration delay in wait_for_output, from 5s to 1.
Thanks to Paul for noticing that.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-12-07 09:41:07 -07:00
openshift-merge-bot[bot] a64cc98179
Merge pull request #20912 from edsantiago/fix_some_cp_flakes
systests: cp: add wait_for_ready
2023-12-06 15:38:37 +00:00
openshift-merge-bot[bot] 72ceb6ee82
Merge pull request #20905 from Odilhao/issue-20585-entrypoint
Add support for Entrypoint in quadlet
2023-12-06 14:13:03 +00:00
openshift-merge-bot[bot] 67aae8e62e
Merge pull request #20866 from giuseppe/add-preserve-fds-list
podman: new option --preserve-fd
2023-12-06 13:34:34 +00:00
openshift-merge-bot[bot] 6efebb35cb
Merge pull request #20889 from ygalblum/quadlet-build-crash
Kube Play - set ReportWriter when building an image
2023-12-05 19:55:35 +00:00
Ed Santiago 4d2125bafb systests: cp: add wait_for_ready
Some of the tests were doing "podman run -d" without wait_for_ready.
This may be the cause of some of the CI flakes. Maybe even all?
It's not clear why the tests have been working reliably for years
under overlay, and only started failing under vfs, but shrug.

Thanks to Chris for making that astute observation.

Fixes: #20282  (I hope)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-12-05 11:58:42 -07:00
Odilon Sousa 7cc6501cf0 Add e2e tests for quadlet Entrypoint option
Drop bats tests for quadlet Entrypoint

Signed-off-by: Odilon Sousa <osousa@redhat.com>
2023-12-05 10:14:11 -03:00
Giuseppe Scrivano 01d397a658
podman: new option --preserve-fd
add a new option --preserve-fd that allows to specify a list of FDs to
pass down to the container.

It is similar to --preserve-fds but it allows to specify a list of FDs
instead of the maximum FD number to preserve.

--preserve-fd and --preserve-fds are mutually exclusive.

It requires crun since runc would complain if any fd below
--preserve-fds is not preserved.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-12-05 10:16:41 +01:00
Ygal Blum a943be7e8e Kube Play - set ReportWriter when building an image
Add test for a specific crash
Update play build test to expect message in stderr

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-12-05 09:45:21 +02:00
Odilon Sousa 972ffaca4d Add support for Entrypoint in quadlet
This PR closes #20585

Add Inital support for Entrypoint on quadlets
Add Bats Tests for Entrypoint
Updates the documentation with one example to use the Entrypoint option

Signed-off-by: Odilon Sousa <osousa@redhat.com>
2023-12-04 23:38:53 -03:00
openshift-merge-bot[bot] fc816e18cd
Merge pull request #20898 from edsantiago/systemctl_debug
systests: debug systemd failures
2023-12-04 18:03:16 +00:00
Ed Santiago 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
Ed Santiago 7f4b0f2087 apiv2 tests: fix race
Test flaking because (I think) one-second resolution isn't
good enough for --since. Use NS resolution.

Also, more test-name cleanup: strip off timestamps in 'since='.
This yields consistent test names in logs, which makes it easier
for me to categorize flakes.

Fixes: #20896

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-12-04 09:18:25 -07:00
openshift-merge-bot[bot] 093868b37f
Merge pull request #20887 from ygalblum/quadlet-pod-quadlet-based-keys
Quadlet - add support for keys that may refer to other Quadlet units in `.pod` files
2023-12-04 13:23:10 +00:00
openshift-merge-bot[bot] 8d0be64093
Merge pull request #20829 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.13.2
2023-12-04 01:59:49 +00:00
openshift-merge-bot[bot] 5af152ec29
Merge pull request #20874 from mheon/eval_symlinks_on_db_paths
Handle symlinks when checking DB vs runtime configs
2023-12-03 11:50:03 +00:00
Ygal Blum 7e2a8d58ab Quadlet .pod - add support for the Volume Key
Add e2e tests
Update documentation

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-12-03 10:23:13 +02:00
Ygal Blum 212b4c9e93 Quadlet .pod - add support for the Network Key
Add e2e tests
Update documentation

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-12-03 10:22:33 +02:00
Matt Heon f384bdf66b 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-02 15:48:47 -05:00
openshift-merge-bot[bot] bc124dd13f
Merge pull request #20819 from cgiradkar/20752_farm_flag_move
Move the --farm flag to farm build command
2023-12-01 21:12:38 +00:00
openshift-merge-bot[bot] c47962802a
Merge pull request #20657 from nalind/commit-config
RHEL-14922: accept a config blob alongside the "changes" slice when committing
2023-12-01 21:09:23 +00:00
openshift-merge-bot[bot] 3b03e85471
Merge pull request #20789 from umohnani8/healthcheck
Don't update health check status during initialDelaySeconds
2023-12-01 13:12:50 +00:00
renovate[bot] 269f8ff066
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.13.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-30 14:53:34 +00:00
Chetan Giradkar 31df9c237e Move the --farm flag to farm build command
The option `farm` which is used to specify the farm to be used, is moved to farm build command from farm command.

closes #20752

Signed-off-by: Chetan Giradkar <cgiradka@redhat.com>
2023-11-30 14:27:06 +00:00
Nalin Dahyabhai 426db6fcc1 Accept a config blob alongside the "changes" slice when committing
When committing containers to create new images, accept a container
config blob being passed in the body of the API request by adding a
Config field to our API structures.  Populate it from the body of
requests that we receive, and use its contents as the body of requests
that we make.

Make the libpod commit endpoint split changes values at newlines, just
like the compat endpoint does.

Pass both the config blob and the "changes" slice to buildah's Commit()
API, so that it can handle cases where they overlap or conflict.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-11-30 09:00:52 -05:00
Ed Santiago f95dd21d5d deferred test failures: handle a corner case
Followup to #20797 (defer assertion failures). The bail-now()
helper was being defined only in setup() ... and some tests,
particularly 001-basic.bats, define their own minimalist setup().

Symptom was "bail-now: command not found", which still caused
test to fail (so no failures were hidden) but led to concern
and wasted time when analyzing failures.

Solution: add one more definition of bail-now(), in outer scope.

There is still one pathological case I'm not addressing: a
bats file that defines its own teardown() which does not invoke
basic_teardown(), then has a test that runs defer-assertion-failures
without a followup immediate-assertion-failures. This would lead
to failures that are never seen. Since teardown() without basic_teardown()
is invalid, I choose not to worry about this case.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-11-30 06:33:46 -07:00