19967 Commits

Author SHA1 Message Date
f727428b52 Merge pull request #19663 from rhatdan/ramfs
Add support for ramfs as well as tmpfs in volume mounts
2023-08-21 16:51:06 -02:30
5a6515c6eb Merge pull request #19684 from containers/renovate/golangci-golangci-lint-1.x
chore(deps): update dependency golangci/golangci-lint to v1.54.2
2023-08-21 16:48:34 -02:30
85d0df330f chore(deps): update dependency containers/automation_images to v20230816
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-21 17:52:10 +00:00
bc35e28c03 fix(deps): update module github.com/google/uuid to v1.3.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-21 17:27:05 +00:00
3d00744d29 libpod: sum per-interface network stats for FreeBSD
This sums the metric values from all interfaces similar to the Linux
version.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-08-21 16:00:41 +01:00
5eee8825e8 Set default Umask for podman kube play
Fixes a bug where `podman kube play` fails to set a container's Umask
to the default 0022, and sets it to 0000 instead.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-08-21 10:56:53 -04:00
375eb045ca Merge pull request #19661 from dfr/freebsd-var-run
libpod: use /var/run instead of /run on FreeBSD
2023-08-21 12:24:50 -02:30
30ec94fea4 Merge pull request #19670 from lsm5/rpm-dep-man
[CI:BUILD] rpm: depend on man-db
2023-08-21 11:46:54 -02:30
ef8f4db81c [CI:BUILD] rpm: spdx compatible license field
The lowercase `and` in the License field isn't compatible with spdx
license format.

This commit replaces all `and` with `AND` in the License field in spec.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-08-21 09:52:27 -04:00
e9539768ca chore(deps): update dependency golangci/golangci-lint to v1.54.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-21 13:49:46 +00:00
63a8926e96 Implement automatic port reassignment on Windows
While only leveraged by the WSL backend, this commit also adds core
infrastructure for all other backends for future enhancement.

- Adds a common port cross backend allocation registry to prevent duplicate
  assignment across multiple machine instances
- Introduces logic in Start() that detects OS port conflicts and scans for a
  viable replacement port
- Updates connection definitions and server configuration accordingly
- Utilizes a coordinated file lock strategy to prevent racing overwrites of port
  and connection registries
- WSL backend coordinates locking for containers.conf until a future common
  enhancement exists to replace it

[NO NEW TESTS NEEDED]

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-08-21 07:23:31 -05:00
45ce4834af Add support for ramfs as well as tmpfs in volume mounts
Users want to mount a tmpfs file system with secrets, and make
sure the secret is never saved into swap. They can do this either
by using a ramfs tmpfs mount or by passing `noswap` option to
a tmpfs mount.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-21 07:14:57 -04:00
93f194cfb5 Merge pull request #19676 from rhatdan/pod
use container restart policy if user specifies one
2023-08-21 08:34:39 -02:30
84447c0855 Merge pull request #19677 from n1hility/detect-old-wsl
Validate current generation of WSL2 with user-mode-networking
2023-08-21 04:57:09 -02:30
bdc3040586 Validate current generation of WSL2 with user-mode-networking
Fail with a helpful message when older version is present.

[NO NEW TESTS NEEDED]

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-08-18 23:33:30 -05:00
67756ac604 use container restart policy if user specifies one
Fixes: https://github.com/containers/podman/issues/19671

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-18 06:19:49 -04:00
20f28e538d Merge pull request #19516 from baude/stopgvproxy
Stop gvproxy on hyperv machine stop
2023-08-18 06:45:39 -02:30
884e5f6934 Merge pull request #19668 from ashley-cui/teststart
Update machine start tests
2023-08-18 06:40:32 -02:30
a161e8b7d8 Merge pull request #19667 from ashley-cui/testrm
Update machine rm tests
2023-08-18 06:37:55 -02:30
062511df99 Merge pull request #19669 from ashley-cui/testlist
Update machine list test
2023-08-18 06:35:22 -02:30
0772d8ddb0 Stop gvproxy on hyperv machine stop
when we stop a machine, we need to also stop the gvproxy process that is
running.

JIRA: RUN-1828

also, remove unused applehv function for ssh

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

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-08-17 15:21:06 -05:00
50136ea866 [CI:BUILD] rpm: depend on man-db
Include dependencies in rpm/podman.spec to make it easy for end users to
build podman from source. This way users can install all build
dependencies by running `dnf -y builddep rpm/podman.spec`.

This is not usually noticeable except on container environments where
man-db often isn't installed by default.

Refs:
https://github.com/containers/podman.io/issues/157
https://github.com/containers/podman.io/pull/174

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-08-17 15:31:54 -04:00
36e09f18bb Update machine list test
check if --format json returns valid json

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-08-17 15:05:48 -04:00
8b29901316 Update machine start tests
Start machine that is already running
Start bad name

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-08-17 15:04:18 -04:00
c3dbfa9a1e Update machine rm tests
Remove with --save-ignition, --save-image, --save-keys
Removing a running machine should result in error

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-08-17 15:00:35 -04:00
938a3e1601 Merge pull request #19635 from Luap99/utf8-log-tag
libpod: correctly pass env so alternative locales work
2023-08-17 13:55:37 -02:30
c726cf8106 libpod: improve conmon error handling
When conmon is started it blocks and waits for us to signal it to start
via pipe. This works but when conmon exits before it waits for the start
message it causes podman to fail with `write child: broken pipe`. This
error is meaningless to podman users.

The real error is that conmon failed so we should not return early if we
fail to send the start message to conmon. Instead ignore the EPIPE error
case as it is safe to assume to the conmon died and for other errors we
make sure to kill conmon so that the following wait() call does not hang
forever. This also fixes problems with having conmon zombie processes
leaked as wait() was never called.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-08-17 15:32:59 +02:00
ed1f514d55 cirrus setup: install en_US.UTF-8 locale
Make sure the en_US.UTF-8 locale is available so that we can use it in
tests, namely "podman logs with non ASCII log tag succeeds with env".

It is already there in fedora (except container image but we cannot use
journald there anyway) so only do this for debian. I think it makes
most sense to move this into the image build process in the future to
only do it once at build time.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-08-17 15:31:56 +02:00
8f85aaf07f fixup "podman logs with non ASCII log tag" tests
We need to actually check the output not just exit codes. While doing
this it was clear that the first test was not checking what it should
be so I had to remove the quotes from the arg.

Also this check did not work with remote testing at all, we must set the
env then restart the server as the env for conmon must be set on the
server obviously.
Also we can only match the conmon error messages on the local client.

Lastly this test requires the journald driver but we cannot use the in
container tests so skip it there.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-08-17 15:30:59 +02:00
27b41f0877 libpod: use /var/run instead of /run on FreeBSD
This changes /run to /var/run for .containerenv and secrets in FreeBSD
containers for consistency with FreeBSD path conventions. Running Linux
containers on FreeBSD hosts continue to use /run for compatibility.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-08-17 14:04:53 +01:00
9b4f1cdb97 cirrus/lib.sh: extend env to passthrough at start for locale work
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2023-08-17 12:15:08 +02:00
ff66f31ddd libpod: correctly pass env so alternative locales work
in addition to b6167cedb2
we also need to pass LANG. Do so, and add a test to verify

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2023-08-17 12:15:08 +02:00
e0b8178ad0 Merge pull request #19656 from jontte75/fix-resource-leak-in-linux
cgroups_linux: use SessionBusPrivateNoAutoStartup
2023-08-17 07:06:51 -02:30
29c298856e cgroups_linux: use SessionBusPrivateNoAutoStartup
port Commit 55397de (cgroups: use SessionBusPrivateNoAutoStartup)
from cgroups.go to cgroups_linux.go

do not start up a dbus daemon if it is not already running.

[NO NEW TESTS NEEDED] the fix is in a dependency.

Signed-off-by: Joni Korhonen <joni.korhonen@gmail.com>
2023-08-17 08:23:48 +03:00
53b2b0222d Merge pull request #19648 from edsantiago/scrap_icmp_test
CI: systests: remove pasta ICMP tests
2023-08-16 17:08:03 -02:30
3c6d800b29 Merge pull request #19647 from rhatdan/podmansh
[CI:DOCS] podmansh man page UID=3267 is not allowed
2023-08-16 16:59:06 -02:30
e163e26880 Merge pull request #19618 from PeterWhittaker/main
[CI:DOCS] Update podman.1.md: Fix formatting of exit code 127, clarify wording …
2023-08-16 16:30:11 -02:30
4ae71e0d86 Merge pull request #19582 from arixmkii/gvproxy-0.7.0
Bump bundled gvproxy to 0.7.0
2023-08-16 16:27:21 -02:30
f559fc55bb Merge pull request #19567 from vrothberg/RUN-1873
add --module flag
2023-08-16 16:23:54 -02:30
6062a64ea6 Merge pull request #19643 from dfr/freebsd-readonly
pkg/specgen: add support for read-only root on FreeBSD
2023-08-16 16:20:40 -02:30
c1c0b4a030 Merge pull request #19641 from christian-2/issue-18387
document available secret drivers
2023-08-16 16:16:49 -02:30
362747cfab podmansh man page UID=$(id -u lockedu) is not allowed
Switch man page to user USERID instead of UID, since UID environment
variable is set at login, and is not allowed to be changed.

UID=foobar
bash: UID: readonly variable

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-16 14:16:33 -04:00
e38cf33a66 CI: systests: remove pasta ICMP tests
IPv6 test has been hard-skipped for six months.

IPv4 test is flaking in Cirrus and hard-failing in Gating.

Absent a reliable way to test in CI and gating, and absent
a strong reason to test ICMP in pasta anyway, the solution
is simple.

Closes: #19612

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-16 09:02:48 -06:00
7103fdb3fe podman.1.md: Fix formatting of exit code 127, clarify wording of exit code example.
Signed-off-by: Peter Whittaker <PeterWhittaker@SphyrnaSecurity.com>
2023-08-16 10:59:06 -04:00
896cab6120 document available secret drivers
[NO NEW TESTS NEEDED]

Signed-off-by: Christian Hörtnagl <christian.hoertnagl@univie.ac.at>
2023-08-16 16:23:39 +02:00
53dd37cc43 pkg/specgen: add support for read-only root on FreeBSD
This just sets the flag in the runtime spec - the actual implementation
is in the OCI runtime.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-08-16 13:41:04 +01:00
d5841ed528 add --module flag
Support a new concept in containers.conf called "modules".  A "module"
is a containers.conf file located at a specific directory.  More than
one module can be loaded in the specified order, following existing
override semantics.

There are three directories to load modules from:
 - $CONFIG_HOME/containers/containers.conf.modules
 - /etc/containers/containers.conf.modules
 - /usr/share/containers/containers.conf.modules

With CONFIG_HOME pointing to $HOME/.config or, if set, $XDG_CONFIG_HOME.
Absolute paths will be loaded as is, relative paths will be resolved
relative to the three directories above allowing for admin configs
(/etc/) to override system configs (/usr/share/) and user configs
($CONFIG_HOME) to override admin configs.

Pulls in containers/common/pull/1599.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-08-16 14:32:35 +02:00
9cd4286922 Merge pull request #19596 from baude/allowdownload
enabled hyperv image downloads
2023-08-16 09:52:18 -02:30
7836401c8f Merge pull request #19626 from michalbiesek/feat-riscv64-support
Add riscv64 support for cross compilation
2023-08-16 06:45:37 -02:30
464e97f65e Merge pull request #19638 from containers/renovate/setuptools-68.x
Update dependency setuptools to ~=68.1.0
2023-08-16 04:48:22 -02:30