17345 Commits

Author SHA1 Message Date
883ff665b2 Merge pull request #16748 from ygalblum/quadlet_kube_userns
Quadlet Kube: Add support for userns flag
2022-12-06 18:03:41 -05:00
2e9eb170c6 Merge pull request #16668 from karta0807913/main
fix an override logic in Inherit function
2022-12-06 17:58:31 -05:00
73e6539f97 Merge pull request #16757 from cevich/fix_job_sequence
[skip-ci] GHA/Cirrus-cron: Fix execution order
2022-12-06 12:26:40 -05:00
f218a4617b Merge pull request #16740 from ygalblum/network-create-options
Update containers common package
2022-12-06 10:56:47 -05:00
7cdf37624e Merge pull request #16747 from Luap99/ipvlan-parent
network create: support "-o parent=XXX" for ipvlan
2022-12-06 10:54:11 -05:00
45f8b1ca9e [skip-ci] GHA/Cirrus-cron: Fix execution order
Fairly universally, the last Cirrus-Cron job is set to fire off at
22:22 UTC.  However, the re-run of failed jobs GHA workflow was
scheduled for 22:05, meaning it will never re-run the last cirrus-cron
job should it fail.

Re-arrange the execution order so as to give plenty of time between the
last cirrus-cron job starting, the auto-re-run attempt, and the final
failure-check e-mail.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-12-06 10:38:10 -05:00
4a8d953425 Merge pull request #16371 from alexlarsson/transient-store
Support transient store mode
2022-12-06 09:39:19 -05:00
293f1cd14d Merge pull request #16713 from alexlarsson/quadlet-drop-cid-remove
quadlet: Drop ExecStartPre=rm %t/%N.cid
2022-12-06 09:00:57 -05:00
53357b0f95 Merge pull request #16749 from Luap99/healthcheck
disable healthchecks automatically on non systemd systems
2022-12-06 08:58:24 -05:00
7d16c2b69e Update containers common package
The new version adds NetworkCreateOptions. For now pass nil

[NO NEW TESTS NEEDED]

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2022-12-06 13:52:28 +02:00
75f4215717 podman manpage: Use man-page links instead of file names
This changes references to `/etc/containers/storage.conf` (and similar) to
links to `containers-storage.conf(5)`, as there are alternative locations
for this file.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-06 09:54:50 +01:00
4134a37233 Fix test
Signed-off-by: karta0807913 <karta0807913@gmail.com>
2022-12-06 01:25:54 +00:00
28774f18c5 disable healthchecks automatically on non systemd systems
The podman healthchecks are implemented using systemd timers, this works
great but it will never work on non systemd distros. Currently the logic
always assumes systemd is available and will fail with an error, so users
are forced to always run with `--no-healthcheck` to disable healthchecks
that are defined in an image for example. This is annoying and IMO
unnecessary, we should just default to no healthcheck on these systems.

First, use the systemd build tag to disable it at build time if this tag
is not used.
Second, use make sure systemd is used as init before trying
to use healthchecks. This could be the case when we are run in a container.

[NO NEW TESTS NEEDED] We do not have any non systemd VMs in CI AFAIK.

Fixes #16644

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-12-05 20:58:30 +01:00
1ea00ebda1 Quadlet Kube: Add support for userns flag
Move the handling of userns keys from ConvertContainer to a separate method
Adjust the method according to the different supported values
Use the new method in both ConvertContainer and ConvertKube
Pass isUser to ConvertKube as well
Add tests

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2022-12-05 21:26:23 +02:00
68e51834a9 Merge pull request #16738 from ygalblum/quadlet_kube_relative_path
Quadlet Kube: Add support for relative path for YAML file
2022-12-05 14:21:10 -05:00
2f2df58fc9 Merge pull request #16745 from Luap99/docker-compose-mac
compat API: allow MacAddress on container config
2022-12-05 13:57:53 -05:00
c942f77887 Merge pull request #16581 from mtrmac/modified-test
Update c/storage after https://github.com/containers/storage/pull/1436
2022-12-05 13:16:57 -05:00
93d2ec148c Add podman system prune --external
This just calls GC on the local storage, which will remove any leftover
directories from previous containers that are not in the podman db anymore.
This is useful primarily for transient store mode, but can also help in
the case of an unclean shutdown.

Also adds some e2e test to ensure prune --external works.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-05 18:09:21 +01:00
f1dbfda807 Add some tests for transient store
Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-05 18:09:21 +01:00
e74b3f24e1 runtime: In transient_store mode, move bolt_state.db to rundir
This brings a performance improvement to `podman run` on top of the
other transient_store improvements in containers/storage:

Transient mode without transient bolt_db:

Benchmark 1: bin/podman run --transient-store=true --rm --pull=never --network=host --security-opt seccomp=unconfined fedora true
  Time (mean ± σ):     130.6 ms ±   5.8 ms    [User: 44.4 ms, System: 25.9 ms]
  Range (min … max):   122.6 ms … 143.7 ms    21 runs

Transient mode with transient bolt_db:

Benchmark 1: bin/podman run --transient-store=true --rm --pull=never --network=host --security-opt seccomp=unconfined fedora true
  Time (mean ± σ):     100.3 ms ±   5.3 ms    [User: 40.5 ms, System: 24.9 ms]
  Range (min … max):    93.0 ms … 111.6 ms    29 runs

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-05 18:09:21 +01:00
25d9af8f42 runtime: Handle the transient store options
This handles the transient store options from the container/storage
configuration in the runtime/engine.

Changes are:
 * Print transient store status in `podman info`
 * Print transient store status in runtime debug output
 * Add --transient-store argument to override config option
 * Propagate config state to conmon cleanup args so the callback podman
   gets the same config.

Note: This doesn't really change any behaviour yet (other than the changes
in containers/storage).

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-05 18:09:21 +01:00
56115d5e5b libpod: Move the creation of TmpDir to an earlier time
Later changes will need to access it earlier, so move its creation to
just after the creation of StaticDir.

Note: For whatever reason this we created twice before, but we now
only do it once.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-05 18:09:21 +01:00
c9961e18c0 network create: support "-o parent=XXX" for ipvlan
Just like macvlan the ipvlan driver accepts a specific parent interface.

Fixes #16621

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-12-05 18:02:46 +01:00
2f5025a2d7 compat API: allow MacAddress on container config
docker-compose sets the mac address in the container config and not the
network endpoint config. This is ugly when you have more than one
network, in this case docker just chooses the first network.

Fixes #16411

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-12-05 16:52:36 +01:00
41af424cd8 Merge pull request #16739 from giuseppe/no-chown-idmap
runtime: do not chown idmapped volumes
2022-12-05 10:21:30 -05:00
b825ea7824 Merge pull request #16723 from dfr/freebsd-cross
Add a FreeBSD cross build to the cirrus alt build task
2022-12-05 10:18:40 -05:00
a55413c802 Quadlet Kube: Add support for relative path for YAML file
If the provided path is relative, turn path to absolute
Add regex verification option in tests

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2022-12-05 16:08:50 +02:00
f223bbab62 Merge pull request #16722 from rhatdan/completions
Add completion for --init-ctr
2022-12-05 08:26:24 -05:00
a651cdfbc3 runtime: do not chown idmapped volumes
do not chown a volume when idmap is used.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-12-05 14:10:43 +01:00
b26d4fc36a Merge pull request #16586 from cevich/fix_contributing
[CI:DOCS] Remove broken gate-container docs
2022-12-05 06:29:10 -05:00
a9c1fe2f4c Merge pull request #16731 from ygalblum/quadlet_syslogidentifier
Quadlet Kube: Set SyslogIdentifier if was not set
2022-12-05 04:46:40 -05:00
f3c5b0f9d1 quadlet: Drop ExecStartPre=rm %t/%N.cid
Since https://github.com/containers/podman/pull/16394 was merged
we now always delete the cid file if --replace=true was specified,
so we can avoid this extra command being launched.

[NO NEW TESTS NEEDED] Already tested in above PR.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-05 08:26:03 +01:00
3ed448244a Merge pull request #16682 from rhatdan/ro
Fix handling of readonly containers when defined in kube.yaml
2022-12-04 17:23:42 -05:00
d61618ad44 Quadlet Kube: Set SyslogIdentifier if was not set
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2022-12-04 15:53:44 +02:00
eaab4b99a4 Add a FreeBSD cross build to the cirrus alt build task
This just verifies that a non-cgo podman binary can build for FreeBSD.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-12-03 13:58:19 +00:00
39b6ccb384 Add completion for --init-ctr
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-12-03 08:20:49 -05:00
ca6ae5ca98 Merge pull request #16678 from edsantiago/simplify_passthrough_env
CI setup: simplify environment passthrough code
2022-12-03 07:26:34 -05:00
9b6467a9d2 Merge pull request #16648 from ashley-cui/machos
Introduce podman machine os commands
2022-12-03 07:23:10 -05:00
3f80a68fd3 Merge pull request #16667 from cfergeau/artifacts
Make released binary names more consistent
2022-12-03 07:20:08 -05:00
af86b4f62a Fix handling of readonly containers when defined in kube.yaml
The containers should be able to write to tmpfs mounted directories.

Also cleanup output of podman kube generate to not show default values.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-12-03 07:05:58 -05:00
480c7fbf53 Merge pull request #16708 from arixmkii/cross-build-fixes
Build cross-compilation fixes
2022-12-02 15:04:15 -05:00
b0bd257114 Merge pull request #16714 from alexlarsson/quadlet-use-regular-defaults
Quadlet use regular defaults
2022-12-02 14:59:04 -05:00
92ced4282f Merge pull request #16715 from dfr/freebsd-build
libpod: Track healthcheck API changes in healthcheck_unsupported.go
2022-12-02 14:37:55 -05:00
98a1b551fe Build cross-compilation fixes
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2022-12-02 19:22:53 +02:00
6ed8dc17ce libpod: Track healthcheck API changes in healthcheck_unsupported.go
Extra function arguments were added in #13909.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-12-02 16:41:21 +00:00
16cf34dc3a quadlet: Use same default capability set as podman run
Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-02 16:37:22 +01:00
b34ab8b5fa quadlet: Drop --pull=never
This is to match podman run default behaviour.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-02 16:33:09 +01:00
098ad52ecb quadlet: Change default of ReadOnly to no
This matches the default podman run behaviour.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-02 16:30:15 +01:00
1c3fddfaf7 quadlet: Change RunInit default to no
This matches the default of podman run.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-02 16:25:47 +01:00
d19ea6a60d quadlet: Change NoNewPrivileges default to false
This matches the default of podman run.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-02 16:24:47 +01:00