14787 Commits

Author SHA1 Message Date
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
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
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
3987c529f4 Add support for ipc namespace modes "none, private, sharable"
Fixes: #13265

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-12 13:35:51 -04:00
a82ec1be45 Merge pull request #13787 from Luap99/nohost-api
API: use no_hosts from containers.conf
2022-04-12 13:35:00 -04:00
2c800a717c System tests: fix oops in start --filter tests
Bad code got committed by accident: test description on run_podman
line, not test line.

Did not seem to affect tests, but fix it anyway.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-04-12 11:24:33 -06:00
87d129e805 Merge pull request #13788 from flouthoc/support-volume-opts
run, mount: allow setting driver specific option using `volume-opt=`
2022-04-12 13:17:02 -04:00
db7cd88c67 Merge pull request #13837 from rhatdan/VENDOR
Update vendor of storage,common,image
2022-04-12 11:38:19 -04:00
5e680d54e9 Bump golang.org/x/crypto to 7b82a4e
Resolves: GHSA-8c26-wmh5-6g9v - CVE-2022-27191

Podman doesn't seem to be directly affected as the logic in question
is not called.

golang.org/x/crypto@1baeb1ce contains the actual CVE fix. Using the
latest upstream commit to also include support for SHA-2.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-04-12 10:24:32 -04:00
9822c46981 Merge pull request #13836 from flouthoc/machine-rm-ignore-enoent
machine,rm: Ignore `ENOENT` while cleaning machine paths
2022-04-12 09:13:41 -04:00
b8693f97d3 Merge pull request #13828 from cevich/fix_cron_check
[CI:BUILD] Cirrus: Fix unsupported cirrus-cron build status
2022-04-12 08:05:55 -04:00