18313 Commits

Author SHA1 Message Date
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
5b1345c772 Merge pull request #17872 from edsantiago/rhel8_rootless_journal_skip_blah_blah
quadlet tests: skip on RHEL8 rootless
2023-03-21 11:08:06 -04:00
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
74c5a013cb Merge pull request #17855 from edsantiago/logformatter_db_backend
logformatter: hide --db-backend
2023-03-21 07:49:19 -04:00
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
d8265f07d0 Merge pull request #17821 from umohnani8/detach
Add service ctr cleanup to PlayKubeDown
2023-03-21 04:57:42 -04:00
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
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
5447e88b42 logformatter: hide --db-backend, and friendlyize quadlet
* There's a new --db-backend option. Hide it, and actually
  just assume that any new --foo-backend option will
  have an arg that needs to be hidden.

* Friendly-ize "Running: quadlet ..." because those messages
  include a "with QUADLET_FOO=bar" string that looks like
  it's part of the command line but is not, and it's really
  hard for a human eye to see what's command line and what's
  extra comment.

Add tests.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-03-20 12:37:01 -06:00
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
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
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
060c125b78 Merge pull request #17838 from baude/addhv1
basic hypverv machine implementation
2023-03-20 10:40:30 -04:00
27903e0d6d Merge pull request #17846 from NotBobTheBuilder/makefile-lib-dir
Makefile: allow specifying /lib dir location
2023-03-20 10:04:21 -04:00
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
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
9ddd4f4abd Merge pull request #17600 from sstosh/search-auth-opts
Add search --cert-dir, --creds
2023-03-20 04:00:04 -04:00
26d5df77df Quadlet Doc: Suggest the kill operation for HealthOnFailure
Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-03-20 09:53:49 +02:00
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
3ef707def2 Makefile: allow specifying /lib dir location
On some platforms, /lib is not actually a directory, it is a symlink to
/usr/lib:

    $ ls -l /lib
    lrwxrwxrwx 1 root root 7 Dec  4 17:11 /lib -> usr/lib

When this is the case, "make install" will be operating under a false
assumption when it generates any relative symlinks to files under a
different root-level directory.

If linking to /libexec/... from /lib/... for example, the generated
relative symlink will be 1 parent directory pointer (../) too short.

This PR allows the builder to specify LIBDIR=/usr/lib, explicitly
installing files to the target of the symlink. This results in
symlinks being generated with the correct depth.

Signed-off-by: Jack Wearden <jack@jackwearden.co.uk>
2023-03-18 23:02:32 +00:00
149f22942a Merge pull request #17842 from rhatdan/docs
Fix option --opts -> --opt
2023-03-18 08:13:25 -04:00
a5abbdf1f6 Fix option --opts -> --opt
Fix typo in podman volume create man page.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-18 06:32:36 -04:00
0dac214f56 basic hypverv machine implementation
with libhvee, we are able to do the basics of podman machine management
on hyperv.  The basic functions like init, rm, stop, and start are all
functional.  Start and stop will periodically throw a benign error
processing the hyperv message being returned from the action.  The error
is described in the todo's below.

notable items:

* no podman commands will work (like ps, images, etc)
* the machine must be initialized with --image-path and fed a custom image.
* disk size is set to 100GB statically.
* the vm joins the default hyperv network which is TCP/IP network based.
* podman machine ssh does not work
* podman machine set does not work
* you can grab the ip address from hyperv and fake a machine connection
  with `podman system connection`.
* when booting, use the hyperv console to know the boot is complete.

TODOs:
* podman machine ssh
* podman machine set
* podman machine rm needs force bool
* disk size in NewMachine is set to 100GB
* podman start needs to wait until fully booted
* establish a boot complete signal from guest
* implement gvproxy like user networking
* fix benign failures in stop/start -> Error: error 2147749890 (FormatMessage failed with: The system cannot find message text for message number 0x%1 in the message file for %2.)

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-03-17 16:02:28 -05:00
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
f1bcd0d781 Merge pull request #17757 from rhatdan/ulimits
Use default_ulimits field in containers.conf
2023-03-17 11:43:19 -04:00
97f2107423 Merge pull request #17798 from edsantiago/treadmill_add_rootless
[SKIP CI] buildah treadmill: also run rootless tests
2023-03-17 10:45:09 -04:00
cf70c75dba Merge pull request #17822 from edsantiago/confirm_db
CI: test and confirm DESIRED_DATABASE
2023-03-17 09:01:43 -04:00
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
1ddf6fafcf Merge pull request #17818 from edsantiago/logformatter_reliable_name
logformatter: futureproof output filename
2023-03-17 05:14:05 -04:00
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
931cd1d7da Merge pull request #17815 from rhatdan/VENDOR
Vendor in latest containers/(storage, common, image)
2023-03-16 12:07:16 -04:00
806cd13002 Merge pull request #17752 from containers/dependabot/go_modules/github.com/vbauerster/mpb/v8-8.3.0
build(deps): bump github.com/vbauerster/mpb/v8 from 8.2.1 to 8.3.0
2023-03-16 11:15:21 -04:00
526dfb8936 logformatter: futureproof output filename
"Just this once", I thought, adding an obscure unmaintainable
duplication to the CI code. When will I learn?

This fixes the logformatter output filename to handle boltdb/sqlite.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-03-16 08:31:36 -06:00
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
e21cf2d8df Vendor in latest containers/(storage, common, image)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-16 09:26:19 -04:00
8f81e08f98 Merge pull request #17688 from mheon/add_sqlite_ci
Add SQLite job to CI
2023-03-16 04:04:48 -04:00
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
9119157920 Merge pull request #17755 from adrianreber/2023-03-13-pre-allocate
Use append() to add elements to a slice (restore)
2023-03-15 20:35:01 -04:00
345aa34381 Merge pull request #17766 from rhatdan/man
[CI:DOCS] Document --format for additional man pages
2023-03-15 17:25:35 -04:00
3a59af219a Add information for secret inspect
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-15 16:15:59 -04:00
87e93a7b67 Add format to podman volume ls
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-15 16:15:59 -04:00
b424f8fb09 Add format to podman volume inspect
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-15 16:15:59 -04:00
2555c80340 Add format to podman secret ls
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-15 16:15:59 -04:00
1c4bd4a736 Add format to podman system df
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-15 16:15:59 -04:00
71bcd9891d Add format to podman machine info
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-15 16:15:59 -04:00
581611844d Add format table to podman image inspect man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-15 16:15:59 -04:00
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
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
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
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