14995 Commits

Author SHA1 Message Date
519535daa0 healthcheck: set default healthcheck Interval if not specified in image
Set appropriate defaults for `--interval` when
processing a Containerfile with build format as docker.

Signed-off-by: Aditya R <arajan@redhat.com>
2022-04-20 16:12:45 +05:30
0162f678c0 benchmarking Podman: proof of concept
Add a proof of concept for benchmarking Podman.  The benchmarks are
implemented by means of the end-to-end test suite but hidden behind
a `benchmarks` build tag.  Running `make localbenchmarks` will run
`test/e2e` with the specific build tag and set ginkgo's "focus" to
the specific "Podman Benchmark Suite" to only run this spec and skip
all others.

ginkgo will print a report before terminating listing the CPU and memory
stats for each benchmark.  New benchmarks can easily be added via the
`newBenchmark` function that also supports adding an `init()` function
to each benchmark which allows for performing certain setups for the
specific benchmark.  For instance, benchmarking `podman start` requires
creating a container beforehand.

Podman may be called more than once in the main function of a benchmark
but note that the displayed memory consumption is then a sum of all
Podman invocations.  The memory consumption is collected via
`/usr/bin/time`.

A benchmark's report is split into CPU and memory as displayed below:

```
[CPU] podman images:
  Fastest Time: 0.146s
  Slowest Time: 0.187s
  Average Time: 0.180s ± 0.015s
[MEM] podman images:
  Smallest: 41892.0KB
   Largest: 42792.0KB
   Average: 42380.7KB ± 286.4KB
```

Note that the benchmarks are not wired into the CI yet.  They are meant
as a proof of concept.  More benchmarks and the plumbing into CI will
happen in a later change.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-04-20 11:31:28 +02:00
bc8d8737b7 Merge pull request #13921 from rhatdan/rename
Add missing events to podman-events man page
2022-04-19 19:46:18 -04:00
9d2ad5b839 Merge pull request #13890 from fulminemizzega/main
[CI:DOCS] Fix selinux docs for kubernetes yaml
2022-04-19 16:37:00 -04:00
a2077e5eae Add missing events to podman-events man page
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-19 16:30:26 -04:00
712c3bb226 Merge pull request #13839 from cdoern/swap
Translate Memory Limit to Swap in API
2022-04-19 07:54:39 -04:00
be0da4a222 Translate Memory Limit to Swap in API
in specgen, CLI path uses the given memory limit to define the swap value (if not already specified)
add a route to this piece of code from within the api handlers

resolves #13145

Signed-off-by: cdoern <cdoern@redhat.com>
2022-04-18 15:38:24 -04:00
d6f47e692b Merge pull request #13910 from edsantiago/ultra_minor_message_fix
[CI:DOCS] manpage vs --help checker: better error messages
2022-04-18 13:39:54 -04:00
1b3dc899d6 manpage vs --help checker: better error messages
Use quotes to indicate the command, and remove some duplication

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-04-18 10:09:38 -06:00
cc4bc25bd0 Merge pull request #13898 from baude/machinelistquiet
Add --quiet to machine ls
2022-04-18 10:27:16 -04:00
667dae3b8d Merge pull request #13865 from rhatdan/VENDOR
Update vendor of storage,common
2022-04-16 14:24:02 -04:00
08fa6c7701 Merge pull request #13838 from bwduncan/patch-1
[CI:DOCS] Update troubleshooting.md
2022-04-16 14:22:13 -04:00
8d3075e332 Merge pull request #13583 from rhatdan/ipc
Add support for ipc namespace modes "none, private, sharable"
2022-04-16 12:30:01 -04:00
99bcd65959 Add --quiet to machine ls
The podman machine ls command would benefit from a --quiet flag which
would only print the machine names without the extra information.  It
also implies --noheader as well.  This can be helpful for scripting with
the podman cli.

Signed-off-by: Brent Baude <bbaude@redhat.com>

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-04-16 08:54:56 -05:00
e716790af9 Fix typo in generate kube docs for selinux labeling
Signed-off-by: Federico Rizzo <fulminemizzega@users.noreply.github.com>
2022-04-15 21:51:30 +00:00
08d08f995e Correct play kube docs for selinux labeling
Signed-off-by: Federico Rizzo <fulminemizzega@users.noreply.github.com>
2022-04-15 21:51:30 +00:00
b03466cb79 Update troubleshooting.md
- Consistent code block highlighting
- Minor spelling, formatting.

Signed-off-by: Bruce Duncan <bwduncan@gmail.com>
2022-04-15 12:02:39 +01:00
25eeaec219 Merge pull request #13849 from baude/defaultvolumess
Mount $HOME:$HOME by default in podman machine init
2022-04-15 06:10:17 -04:00
92625eadc6 Merge pull request #13641 from nicrowe00/logfile
Add log rotation based on log size
2022-04-15 06:02:02 -04:00
f2ab79cc02 Merge pull request #13868 from cdoern/cloneSwap
Fix Memory Swappiness passing in Container Clone
2022-04-15 05:54:05 -04:00
a4798ab4ef Respect "Rootful" when starting WSL API Forwarding
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-04-15 00:14:49 -05:00
6076e1a9a5 Merge pull request #13616 from giuseppe/passwd-entry
run, create: add --passwd-entry
2022-04-14 15:35:20 -04:00
d68e9faee2 Update vendor of storage,common
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-14 14:35:46 -04:00
900739d134 Add container.conf default volume to init
containers.conf now has a default volumes field for podman machine.
this pr inserts those values as the default volumes in init.

Signed-off-by: Brent Baude <bbaude@redhat.com>

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-04-14 13:06:05 -05:00
f38b03d375 Fix Memory Swappiness passing in Container Clone
`DefineCreateFlags` was excluding clone from using the memory-swappiness flag leading the value to be zero
when our deafult is -1. Rearrange the if/else to give clone these memory related options

resolves #13856

Signed-off-by: cdoern <cdoern@redhat.com>
2022-04-14 10:40:29 -04:00
53b984f20f Merge pull request #13874 from vrothberg/test-for-CVE-2022-1227
add a regression test for CVE-2022-1227
2022-04-14 10:21:12 -04:00
2a75164e23 add a regression test for CVE-2022-1227
Will also be included in the upcoming backports.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-04-14 14:42:12 +02:00
90293da292 Merge pull request #13866 from edsantiago/bats
System tests: Usage checks: better error messages
2022-04-14 07:28:51 -04:00
5771f82260 Merge pull request #13857 from rhatdan/logs
Fix --tail log on restart problem
2022-04-14 07:22:52 -04:00
001f619eab Merge pull request #13872 from vrothberg/revert-size
Revert "images --size"
2022-04-14 07:18:52 -04:00
3f2939c2ef run, create: add --passwd-entry
It allows to customize the entry that is written to the `/etc/passwd`
file when --passwd is used.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-04-14 11:22:13 +02:00
97f93dc78e Revert "images --size"
This reverts commit e133a06d2f4a3e94bfbd60b647046f2f515c9c24.

@nalind found a proper fix in c/storage [1] to address the performance
issue.  So we really don't need the flag anymore.  Note the flag has
never made it into any release.

[1] d76b3606fc

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-04-14 10:58:36 +02:00
3da3afa576 Add log rotation based on log size
Add new functions to logfile.go for rotating and truncating
the events log file once the log file and its contents
exceed the maximum size limit while keeping 50% of the
log file's content

Also add tests to verify log rotation and truncation

Signed-off-by: Niall Crowe <nicrowe@redhat.com>
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-04-14 09:35:29 +01:00
15712c76fb Merge pull request #13867 from rhatdan/common
Update containers/common to main branch
2022-04-14 03:58:50 -04:00
6254719b10 Merge pull request #13863 from mheon/stopped_can_attach
Allow HTTP attach to stopped containers
2022-04-14 03:12:52 -04:00
2f4874eb07 Update containers/common to main branch
Want to add support for Machine.Volumes

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-13 17:05:34 -04:00
9ef745d541 System tests: Usage checks: better error messages
Current error messages are really awful, and cause great
suffering every time someone adds a new subcommand. Let's
see if these are better.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-04-13 14:09:24 -06:00
480bc83b80 Merge pull request #13844 from Luap99/compat-netmode
compat api: use network mode bridge as default
2022-04-13 15:40:51 -04:00
63c38b99f4 Fix --tail log on restart problem
--tail=1 is not working f you restart a container with journald logging.

We see the exit status and then call into the logging a second time
causing all of the logs to print.

Removing the tail log on exited seems to fix the problem.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-13 14:07:15 -04:00
02b7eeff62 Allow HTTP attach to stopped containers
There's a potential race condition where we attempt to attach to
a container immediately after it's been stopped, but before the
cleanup process has run on it. The existing code doesn't allow an
attach to containers in the Stopped state (cleanup process has
not run) but does allow an attach to containers in the Exited
state (cleanup process has run). This doesn't make very much
sense and there's no technical reason to restrict attach to only
Exited containers, so allow attaching to Stopped containers.

[NO NEW TESTS NEEDED] Testing this is very racy - we need to get
in before the cleanup process runs, which isn't really
deterministic when we're invoked from a script - like the CI
tests.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-04-13 14:04:05 -04:00
b962fb9f29 Merge pull request #13853 from chuanchang/fix_typo_in_podman_container_clone_docs
[CI:DOCS] fix typo in podman-container-clone.1.md
2022-04-13 12:22:52 -04:00
78b6dcd31c Merge pull request #13829 from baude/machineinspect
Introduce machine inspect
2022-04-13 11:05:22 -04:00
970c8d4724 compat api: use network mode bridge as default
For better docker compatibility we should use the bridge network mode as
default for rootless. This was already done previously but commit
535818414c2a introduced this regression in v4.0.

Since the apiv2 test are only run rootful we cannot catch this problem
in CI.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-13 15:43:47 +02:00
f6ce14b066 Merge pull request #13852 from elezar/bump-cdi-0.3.2
build(deps) bump github.com/container-orchestrated-devices/container-device-interface from 0.3.0 to 0.3.2
2022-04-13 09:24:55 -04:00
6c878b7a53 docs: fix typo in podman-container-clone.1.md
Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
2022-04-13 19:16:09 +08:00
20384b0379 build(deps) bump CDI dependency from 0.3.0 to 0.3.2
bump github.com/container-orchestrated-devices/container-device-interface from 0.3.0 to 0.3.2

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-04-13 13:06:33 +02:00
8710197e85 Introduce machine inspect
Allow users to inspect their podman virtual machines. This will be
helpful for debug and development alike, because more details about the
machine can be collected.

Signed-off-by: Brent Baude <bbaude@redhat.com>

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-04-12 15:51:39 -05:00
8586b4856f Merge pull request #13841 from lsm5/main-cve-2022-27191
Bump golang.org/x/crypto to 7b82a4e
2022-04-12 15:39:43 -04:00
d16e3144e9 Merge pull request #13846 from edsantiago/bats
System tests: fix oops in start --filter tests
2022-04-12 15:37:42 -04:00
ab27836b56 Merge pull request #13814 from rhatdan/systemd
Pretty print systemd services file
2022-04-12 13:40:54 -04:00