21556 Commits

Author SHA1 Message Date
d6ddd9fc21 Merge pull request #21584 from lsm5/rpm-module
[CI:BUILD] rpm: bump podman module version
2024-02-09 14:42:33 +00:00
4413e75f0b [CI:BUILD] rpm: bump podman module version
[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-02-09 19:27:10 +05:30
0c752df863 Merge pull request #21581 from lsm5/docs-userns
[CI:DOCS] fix userns.pod.md mapping table
2024-02-09 12:44:10 +00:00
a2c086c789 [CI:DOCS] fix userns.pod.md mapping table
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-02-09 15:53:34 +05:30
2fbf793bdf Merge pull request #21553 from paomian/paomian-patch-1
[CI:DOCS] hierarchical issues with userns parameters
2024-02-09 10:15:38 +00:00
3495aae42b docs: resole hierarchical issues with userns parameters
Signed-off-by: paomian <xpaomian@gmail.com>
2024-02-09 14:45:05 +08:00
5311233f86 Merge pull request #21556 from ygalblum/quadlet-comment-line
Quadlet - do not look for line continuation in comment lines
2024-02-08 19:54:38 +00:00
9011327e84 Merge pull request #21568 from joelpurra/patch-1
[CI:DOCS] Fix Quadlet Options=key=value documentation/example
2024-02-08 19:51:52 +00:00
b7d15a2efe Merge pull request #21558 from Luap99/freebsd-build
pkg/machine: make it build for freebsd
2024-02-08 18:54:09 +00:00
4570ccb95d Merge pull request #21535 from edsantiago/upgrade_tests
Upgrade tests: reenable, but revamped
2024-02-08 17:26:11 +00:00
88b994902d Merge pull request #21512 from Luap99/pasta-netname-removal
drop support for "pasta" as a network name
2024-02-08 17:17:55 +00:00
10265661ec Fix Quadlet Options=key=value documentation/example
Quadlet `[Network]` does not accept `Options=key` for `podman network create --opt key`. Options have to be provided in `key=value` format, where the `=` is required even though the value may be empty.

One usage example is `Options=isolate=true`. In this case, passing `netavark` an empty `isolate` value may be a valid/parseable setting: `Options=isolate=`, equivalent to `Options=isolate=false`.

This commit documents the explicit `Options=key=value` usage. Compare to `[Network]` tests, which use `key=value`.

Usage verified locally by inspecting the generated network in `/run/user/${UID}/systemd/generator/example-network.service` and `podman network inspect systemd-example` using podman v4.9.2 and netavark v1.10.2.

See

- https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html#network-units-network
- https://github.com/containers/podman/blob/v4.9.2/test/e2e/quadlet/options.network
- https://github.com/containers/podman/blob/v4.9.2/test/e2e/quadlet/options.multiple.network
- https://github.com/containers/netavark/blob/v1.10.2/src/network/bridge.rs#L824-L833

Signed-off-by: Joel Purra <mig@joelpurra.se>
2024-02-08 17:48:36 +01:00
9f38b22152 pkg/machine: make it build for freebsd
This is completely untested as I do not have access to a freebsd system
but it compiles and changes look simple enough to assume it works.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-08 17:43:50 +01:00
cb1bac7331 Merge pull request #21550 from mheon/bump_500_rc1
Bump to v5.0.0-RC1
2024-02-08 16:31:15 +00:00
bcd48a6a79 Bump to v5.0.0-dev
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-08 09:35:39 -05:00
dc218a3c6e Bump to v5.0.0-rc1
Signed-off-by: Matt Heon <mheon@redhat.com>
v5.0.0-rc1
2024-02-08 09:35:39 -05:00
7e73bb3419 Add v4.8, v4.9 to release notes
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-08 09:35:39 -05:00
30fb5de719 Restore Cirrus DEST_BRANCH to main
This slipped in from the machine-dev-5 branch merge. Oops.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-08 09:35:39 -05:00
72f1617fac Bump Go module to v5
Moving from Go module v4 to v5 prepares us for public releases.

Move done using gomove [1] as with the v3 and v4 moves.

[1] https://github.com/KSubedi/gomove

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-08 09:35:39 -05:00
4fc52ed068 Merge pull request #21534 from mheon/stats_per_interface
Send container stats over API on a per-interface basis
2024-02-08 14:19:08 +00:00
246831b50f Merge pull request #21409 from rhatdan/events
Show network name network events with podman -remote events
2024-02-08 14:16:24 +00:00
5e081e47aa Merge pull request #21332 from rhatdan/timezone
Reuse timezone code from containers/common
2024-02-08 14:13:40 +00:00
9ad07d10b9 Merge pull request #21446 from vikas-goel/network
Set interface name to the network_interface name for macvlan and ipvlan networks
2024-02-08 13:32:41 +00:00
e20b70c2e6 Upgrade tests: reenable, but revamped
No longer bother testing any 2.x or 3.x. Only 4.1 and above.

Remove all CNI-related code. CNI is gone.

Add DatabaseBackend tests, confirming that we can handle
both boltdb and sqlite.

Require BATS >= 1.8.0, and use "run -0" to do exit-status checks.

Update docs.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-08 06:22:56 -07:00
4c9bd246c3 Merge pull request #21514 from Luap99/pod-inspect-output
make podman pod inspect output a json array
2024-02-08 11:31:40 +00:00
d47979761f Quadlet - do not look for line continuation in comment lines
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-02-08 13:03:33 +02:00
8a6165e592 Merge pull request #21522 from Luap99/restart-userns
fix userns + restart policy with slirp4netns
2024-02-08 10:41:54 +00:00
3aa413f933 Merge pull request #21541 from mheon/refresh_rm_autoremove
Remove leftover autoremove containers during refresh
2024-02-08 10:28:18 +00:00
a613f07a26 Merge pull request #21545 from giuseppe/make-doc-clearer
docs: make --seccomp=profile.json clearer
2024-02-08 10:08:53 +00:00
caea1f43ed Merge pull request #21543 from cfergeau/gomodtidy
gomod: Update containers/psgo to latest release
2024-02-08 08:46:24 +00:00
c935f68903 Merge pull request #21470 from cevich/simpler_to_read_followup
Secret-scanning followup fixes
2024-02-07 21:12:45 +00:00
4b90bfbe36 Merge pull request #21536 from containers/machine-dev-5
Podman Machine 5 Refactor
2024-02-07 20:23:15 +00:00
90c938737a Add functionality for podman machine set --rootful
Adds the functionality for `podman machine set --rootful` for AppleHV,
QEMU, and HyperV. Abstracts the functionality out to a method of
`MachineConfig`. WSL currently uses a function `SetRootful` that is
provided by the `machine` package, which will eventually get changed
when WSL moves to the refactored structure.

Re-enables the "set rootful with docker sock change" test.

[NO NEW TESTS NEEDED]

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-02-07 13:24:18 -06:00
f23b144c60 Podman Machine AppleHV CI fixes
This PR contains several fixes that allow the applehv podman tests run
to completion.

Signed-off-by: Brent Baude <baude@redhat.com>
2024-02-07 09:19:16 -06:00
d5eb8f3b71 AppleHV - make gz ops sparse
gz by definition is not able to preserve the sparse nature of files.  using some code from the crc project and gluing it together with our decompression code, we can re-create the sparseness of a file.  one downside is the operation is a little bit slower, but i think the gains from the sparse file are well worth it in IO alone.

there are a number of todo's in this PR that would be ripe for quick hitting fixes.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <baude@redhat.com>
2024-02-07 09:19:09 -06:00
85d8281484 create machine dirs at discovery
in various use cases, the required machine dirs are not created.  the
machine dirs are runtimedir, datadir, and configdir.  Example in Linux
would be:

configDir /<HOME>/.config/containers/podman/machine/<provider>
dataDir /<HOME>/.local/share/containers/podman/machine/<provider>
runtimeDir /run/user/1000/podman/machine

now we blindly create them without checking for their existence (because
it is faster).

this fixes a bug where runtimedir does not exist on macos after a reboot

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <baude@redhat.com>
2024-02-07 09:19:00 -06:00
b1ce6ef9a8 podman machine 5 - hyperv
this pr represents the podman 5 maching refactoring for HyperV.  with
the exception of already skipped tests, all local tests pass.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-02-07 09:18:51 -06:00
6b02c4894b Podman 5 machine refactor - applehv
this is the second provider done (qemu first).  all tests pass on arm64 hardware locally ... the hybrid pull from oci registries limit this to arm64 only.

calling gvproxy, waiting for it, and then vfkit seems to still be problematic.  this would be an area that should be cleaned up once all providers are implemented.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-02-07 09:18:45 -06:00
e8501ca991 Implement generic providers
The intial refactor used specifically qemu for testing and infra bring
up.  But the whole point was to have things interfaced.  This PR results
in an interface experience like podman 4 using the same term `provider`
to generically represent 'a provider' like qemu/applehv/etc.

This PR is required to move forward with new providers.

Also renamed pkg/machine/p5 to pkg/machine/shim.

[NO NEW TESTS REQUIRED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-02-07 09:18:38 -06:00
9bb191df51 [CI:MACHINE]Podman5 QEMU refactor
The following PR is the leading PR for refactoring podman machine with
the following goals:

* less duplication/more re-use
* common configuration file between providers
* more consistentency in how machines are handled by providers

The goal of this PR is the rough refactor.  There are still rough spots
for sure, specifically around the podman socket and pipe.  This
implemention is only for Linux. All other providers are still present
but will not compile or work.  This is why tests for them have been
temporarily suspended.

The ready socket code is another area that needs to be smoothed over.
Right now, the ready socket code is still in QEMU.  Preferably it would
be moved to a generic spot where all three approaches to readiness
socket use can be defined.

It should also be noted:

* all machine related tests pass.
* make validate for Linux passes
* Apple QEMU was largely removed
* More code pruning is possible; will become clearer when other
  providers are complete.

the dir pkg/machine/p5 is not permanent.  i had to seperate this from
machine initially due to circular import problems.  i think when all
providers are done (or nearly done), it can be placed and named
properly.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-02-07 09:18:36 -06:00
caee76ed57 Merge pull request #20790 from lsm5/rpm-remove-dnsname
[CI:BUILD] rpm: remove dnsname
2024-02-07 15:04:43 +00:00
b9bcfa4749 podman5 machine reconfig 1
this is a logical place to get changes upstream before they grow out of
control.  this pr is the first in an effort to deduplicate machine code
and streamline code flow.

a lot of code is simply moved to eliminate circular imports.  names and
specific paths can ultimately be changed.  i dont like some of the
descriptive interface names, etc.  ultimately, i think once we have the
"old" code sanitized, we can re-use some of those.

clearly some of what is in here is temporary and will either be deleted,
changed, or moved again as this effort comes to a close.

right now, the machine code does not use any of the "new" code.  you
will see in `init` and `rm` some commented out code that hooks it. i'm
afraid things will get worse before they get better (way worse).

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-02-07 08:17:43 -06:00
c89dd4a92f Use tmpfs mounts when creating a memory-backed emptyDir volume
Signed-off-by: Andre Marianiello <andremarianiello@users.noreply.github.com>
2024-02-07 08:17:43 -06:00
3cf2f8ccf4 Handle more states during refresh
We were preserving ContainerStateExited, which is better than
nothing, but definitely not correct. A container that ran at any
point during the last boot should be moved to Exited state to
preserve the fact that they were run at least one. This means we
have to convert Running, Stopped, Stopping, Paused containers to
exited as well.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-07 08:33:56 -05:00
77847bd67a docs: make --seccomp=profile.json clearer
There are not only allowed syscalls, also blocked ones or handled
differently.

[CI:DOCS]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-02-07 13:16:35 +01:00
6ca6184ed6 gomod: Update containers/psgo to 1.9.0
This solves an issue with a non-existing module:

```
$ go mod tidy
[...]
github.com/mitchellh/osext@v0.0.0-20151018003038-5e2d6d41470f: invalid version
```

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2024-02-07 12:31:35 +01:00
6b592bd4e4 Merge pull request #21524 from andremarianiello/memory-emptydir
Use tmpfs mounts when creating a memory-backed emptyDir volume
2024-02-07 06:46:27 +00:00
a8b2256cc1 Set interface name to the network_interface name for macvlan and ipvlan networks
When interface_name attribute in containers.conf file is set to "device", then set interface names inside containers same as the network_interface names of the respective network.

The change applies to macvlan and ipvlan networks only. The interface_name attribute value has no impact on any other types of networks.

If the interface name is set in the user request, then that takes precedence.

Fixes: #21313

Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
2024-02-06 19:05:16 -08:00
f4f96a226f Merge pull request #21518 from Luap99/strongunits
vendor: update c/common + libhvee to latest main and use pkg/strongunits from c/common
2024-02-07 01:46:06 +00:00
6e0decbe03 Send container stats over API on a per-interface basis
This mirrors how the Docker API handles things, allowing us to be
more compatible with Docker and more verbose on the Libpod API.
Stats are given as per network interface in the container, but
still aggregated for `podman stats` and `podman pod stats`
display (so the CLI does not change, only the Libpod and Compat
APIs).

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-06 17:05:07 -05:00