Commit Graph

22100 Commits

Author SHA1 Message Date
tomsweeneyredhat 079bfb085a CVE-2024-1753 fix for main
Bump to the version of Buidah in it's main branch to get the
CVE-2024-1753 fix.

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-03-18 16:30:07 -04:00
openshift-merge-bot[bot] 8a643c243e
Merge pull request #22074 from edsantiago/xref-rst
xref-helpmsgs-manpages: cross-check Commands.rst
2024-03-18 17:11:45 +00:00
openshift-merge-bot[bot] 112aeb7fda
Merge pull request #22055 from garthy/build_context_cleanup
Cleanup build scratch dir if remote end disconnects while passing the context
2024-03-18 17:08:53 +00:00
openshift-merge-bot[bot] 15c33c0218
Merge pull request #22058 from sbrivio-rh/main
test/system: Add support for multipath routes in pasta networking tests
2024-03-18 15:35:23 +00:00
Ed Santiago 1141962e2a xref-helpmsgs-manpages: cross-check Commands.rst
Belated followup to #21981. (Looks like I started to add this
functionality back in 2020 but left it unfinished. Tsk tsk.)

docs/source/Commands.rst is unnecessary duplication. It _should_
be autogenerated, but I can't figure out how to cleanly add
that to our Make process. This PR is an interim cross-check
until we get that resolved:

  - everything in podman --help must have a matching entry
    in Commands.rst (top-level commands only)

  - check for dups and out-of-sequence in Commands.rst
    - also for anything in Commands.rst that is not in --help

Fix existing mismatches in Commands.rst.

Also, #21784 removed a format specifier that I was using in
regression tests. Switch to using something else, to get
test passing again. Given the fact the correct solution
is autogenerating Commands.rst, I choose not to add new
tests for the rst xref.

Also, executive decision, remove volume.rst. It is not referenced
from anywhere, it looks like a lonely orphan remnant from days
of yore.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-03-18 09:09:25 -06:00
openshift-merge-bot[bot] affdf66360
Merge pull request #22060 from xduugu/podman-remote-static
Makefile: add target `podman-remote-static`
2024-03-18 15:05:07 +00:00
openshift-merge-bot[bot] 404a137593
Merge pull request #22062 from n1hility/wsl-5x-image-pull
Switch to 5.x WSL machine os stream using new automation
2024-03-18 14:18:27 +00:00
openshift-merge-bot[bot] 4095464517
Merge pull request #22042 from lsm5/rpm-licenses
[skip-ci] rpm: use macro supported vendoring
2024-03-18 13:42:40 +00:00
Stefano Brivio 23433ec7bd test/system: Add support for multipath routes in pasta networking tests
In some environments, such as the one described in
https://github.com/containers/podman/issues/20927, the default route
is given as nexthop gateways. That is, it's a multipath routes with
multiple gateways.

That means that pasta(1), after commit 6c7623d07bbd ("netlink: Add
support to fetch default gateway from multipath routes"), can start
and use a default gateway from that route.

Just like in pasta(1), in these tests, the default route indicates
which upstream interface we should pick. If we ignore multipath
routes, IPv6 addresses and gateway addresses themselves won't be
available, so, while pasta is now able to configure the container,
IPv6 tests will expect to find no address and no gateway, hence fail
due to the mismatch.

Try to get routes, including gateway addresses and interface names,
from nexthop objects, in case the selection of a regular default
route yields no results.

Link: https://github.com/containers/podman/issues/20927
Closes: #20927
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2024-03-18 14:29:38 +01:00
Lokesh Mandvekar 73a12b0c07
[skip-ci] rpm: use macro supported vendoring
This removes the need for any `Provides: bundled()` we needed in spec
files.

The updated Provides will be visible in the build logs and can also be
verified with `rpm -q --provides $RPM_FILE`.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-03-18 16:56:38 +05:30
Jason T. Greene 7fbdd9e6e2 Adjust to the standard location of gvforwarder used in new images
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-03-16 14:03:40 -05:00
Cedric Staniewski 7711833827 Makefile: add target `podman-remote-static`
This allows to build a static `podman-remote` binary for the host architecture.

Signed-off-by: Cedric Staniewski <cedric@gmx.ca>
2024-03-16 17:04:35 +01:00
Jason T. Greene fdad9ab1ff Switch to 5.x WSL machine os stream using new automation
Includes a switch from XZ to ZSTD for significantly improved fetch performance

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-03-15 23:27:38 -05:00
openshift-merge-bot[bot] e38c713f3f
Merge pull request #21910 from l0rd/windows-build-doc
[CI:DOCS] Add doc to build podman on windows without MSYS
2024-03-15 23:05:59 +00:00
Garth Bushell 3a9eef4bee Cleanup build scratch dir if remote end disconnects while passing the context
Signed-off-by: Garth Bushell <garth@garthy.com>
2024-03-15 10:39:23 +00:00
openshift-merge-bot[bot] f5abca415d
Merge pull request #21979 from chilikk/fix-exec-headers
fix invalid HTTP header values when hijacking a connection
2024-03-14 19:38:46 +00:00
openshift-merge-bot[bot] 5067f0fd65
Merge pull request #22041 from garthy/speed_up_context_compress
Use faster gzip for compression for 3x build speedup for large context send to remote
2024-03-14 17:21:16 +00:00
openshift-merge-bot[bot] c15c815818
Merge pull request #22032 from Luap99/machine-lock
podman machine start: make checkExclusiveActiveVM check race free
2024-03-14 14:25:24 +00:00
Garth Bushell 3f068d1973 Use faster gzip for compression for 3x speedup for sending large contexts to remote
Signed-off-by: Garth Bushell <garth@garthy.com>
2024-03-14 11:35:37 +00:00
openshift-merge-bot[bot] 410f0988e2
Merge pull request #22030 from lsm5/fedora-rpm-deps
[skip-ci] rpm: update containers-common dep on f40+
2024-03-14 10:56:16 +00:00
openshift-merge-bot[bot] 841114369d
Merge pull request #22003 from nachtjasmin/fix/20903-ensure-livenessprobe-affects-containers
Pass pod restart policy to individual containers
2024-03-14 10:53:31 +00:00
Paul Holzinger e82d196269
pkg/machine: make checkExclusiveActiveVM race free
We need to take another lock to prevent concurrent starts from different
machines.

I manually tested it by starting three VM in parallel with:
podman machine start & podman machine start test1 & podman machine start test2

I also added a CI test that seems to work as expected (failed with the
old binary, worked with the new)

Before this patch I was able to start more than VM, with this patch it
now only starts one of them and the other ones will fail to start with
a proper error.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-14 11:13:08 +01:00
Paul Holzinger b238303a40
pkg/machine/wsl: remove unused CheckExclusiveActiveVM()
This function is not used, it has been refactored in the general
starting good higher up the stack.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-14 11:08:16 +01:00
Paul Holzinger c9a5c4b943
pkg/machine: CheckExclusiveActiveVM should also check for starting
Also make the error message there better.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-14 11:07:56 +01:00
Paul Holzinger 1dfd3d3d12
pkg/machine: refresh config after we hold lock
Currently we first read the conf and then lock, this is racy because
while we wait for the lock another process might change the state so
the only way to have the actual current state is to read the file
while holding the lock.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-14 11:06:04 +01:00
openshift-merge-bot[bot] be25514b5f
Merge pull request #22035 from containers/renovate/setuptools-69.x
Update dependency setuptools to ~=69.2.0
2024-03-14 08:27:51 +00:00
renovate[bot] d5e0ecc619
Update dependency setuptools to ~=69.2.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-14 02:36:50 +00:00
openshift-merge-bot[bot] 8d02d8a96b
Merge pull request #22018 from containers/renovate/github.com-containers-ocicrypt-1.x
fix(deps): update module github.com/containers/ocicrypt to v1.1.10
2024-03-14 02:35:09 +00:00
openshift-merge-bot[bot] 075bf503ec
Merge pull request #22033 from Luap99/validate-test-included
Makefile: drop tests-included from validate target
2024-03-13 19:39:41 +00:00
openshift-merge-bot[bot] 358ac20a1e
Merge pull request #22028 from n1hility/fix-api-socket
Change API socket to be machine name isolated
2024-03-13 19:36:56 +00:00
openshift-merge-bot[bot] 87896d3f43
Merge pull request #21963 from mheon/release_notes_500
[CI:DOCS] Add release notes for v5.0.0
2024-03-13 18:36:28 +00:00
Jason T. Greene e58cb97de1 Change API socket to be machine name isolated
- Fixes conflicts such as removal of second machine deleting a socket of a
  the first machine while it's running
- Move API socket into runtime directory for consistency
- Add API and gvproxy sockets to removal list
- Cleanup related logic

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2024-03-13 13:28:14 -05:00
Paul Holzinger dbf38779bd
Makefile: drop tests-included from validate target
make validate should work locally, this check makes no sense in a local
context as it checks for a github label.
To fix this remove this check from the validate target and only use it
as part of the CI validate run.

While at it remove old dnf install step, the issue has been closed for a
long time and it should already be part of our base images.

Fixes #22031

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-13 18:17:43 +01:00
openshift-merge-bot[bot] c25bfe1c8c
Merge pull request #21864 from l0rd/compress-refactoring-v5-plus-plus
Machine decompress.go refactoring follow-up
2024-03-13 16:49:17 +00:00
openshift-merge-bot[bot] cc495a9fac
Merge pull request #22014 from baude/norqdpolicy
do not require policy.json
2024-03-13 15:21:12 +00:00
Matt Heon 0fdd83173f Add release notes for v5.0.0
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-03-13 10:23:06 -04:00
openshift-merge-bot[bot] 469fd84688
Merge pull request #21883 from l0rd/winmake-win-gvproxy-target
Add target win-gvproxy in winmake.ps1
2024-03-13 14:17:57 +00:00
Brent Baude d7bc7b7b41 do not require policy.json
we are having second thoughts about *requiring* a policy.json on podman
machine hosts.  we are concerned that we need to work out some more use
cases to be sure we do not make choices now that limit us in the near
term future. for example, should the policy files be the same for
container images and machine images? And should one live on the host
machine and the other live in the machine?

therefore, if a policy.json *is* present in the correct location, we will use and honor it; however, if it does not, we will allow the machine image to be pulled without a policy.

Signed-off-by: Brent Baude <baude@redhat.com>
Co-authored-by: Paul Holzinger <45212748+Luap99@users.noreply.github.com>
Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-03-13 09:07:51 -05:00
Lokesh Mandvekar 60a3eb8491
[skip-ci] rpm: update containers-common dep on f40+
This commit bumps containers-common dep such that passt and netavark become hard
deps for podman on fedora 40+.
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=2269148

With this commit, f40+ envs will use the min name-version-release for
containers-common-extra while other deps will use whatever's available.
This change can be reverted after a few releases to keep conditionals to
a minimum.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-03-13 17:56:38 +05:30
Mario Loriedo 82597144b6 Machine decompress.go refactoring follow-up
1. Added the xz decompression unit tests

2. Removed the xz implementation to use the one from c/images

3. Removed the specific macos gzip, zstd compressor and use
   the generic compressor but with SparseWriter if GOOS == darwin

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-03-13 00:58:50 +01:00
Mario Loriedo abaa179aa0 Add target win-gvproxy in winmake.ps1
For consistency with linux/osx makefile
I have added the win-gvproxy target as
an alias of win-sshproxy

[NO NEW TESTS NEEDED]

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-03-13 00:45:10 +01:00
Denys Knertser 2ff5716b7e fix invalid HTTP header values when hijacking a connection
Signed-off-by: Denys Knertser <denys@avassa.io>
2024-03-12 23:05:25 +01:00
openshift-merge-bot[bot] c2695fc9d2
Merge pull request #22026 from baude/finalmachineimageref
Add final machine endpoint
2024-03-12 16:50:59 +00:00
openshift-merge-bot[bot] a7d38c6ea2
Merge pull request #22020 from Luap99/api-doc-version
[CI:DOCS] update API doc version to 5.0.0
2024-03-12 15:58:49 +00:00
Brent Baude 4c5d26f6f9 Add final machine endpoint
Adding the final machine endpoint as quay.io/podman/machine-os in the
Podman code.  As a reminder, we decided we would set this in containers
conf once things settle down and this code would then be removed.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-03-12 09:37:57 -05:00
Mario Loriedo c6ae7fd145 Add doc to build podman on windows without MSYS
Updated build_windows.md with a new section that
document how to build and run the windows podman
client without the need to install MSYS.

[NO NEW TESTS NEEDED]

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-03-12 14:58:32 +01:00
Paul Holzinger 068ddfd19f
update API doc version to 5.0.0
Also update the website to display the correct swagger doc for the right
version, the 5.0 swagger file will not exist until we branch but I added
it anyway so we do not forget it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-12 12:06:15 +01:00
renovate[bot] 83e671a2c5
fix(deps): update module github.com/containers/ocicrypt to v1.1.10
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-12 03:55:46 +00:00
Jasmin Oster d7fa0aa351
Pass the restart policy to the individual containers
Healthchecks, defined in a .yaml file as livenessProbe did not had any
effect. They were executing as intended, containers were marked as
unhealthy, yet no action was taken. This was never the intended
behaviour, as observed by the comment:

> if restart policy is in place, ensure the health check enforces it

A minimal example is tracked in containers/podman#20903 [1] with the
following YAML:

```yaml
apiVersion: v1
kind: Pod
metadata:
  name: ubi-httpd-24
spec:
  restartPolicy: Always
  containers:
    - name: ubi8-httpd
      image: registry.access.redhat.com/rhscl/httpd-24-rhel7:2.4-217
      livenessProbe:
        httpGet:
          path: "/"
          port: 8081
```

By passing down the restart policy (and using constants instead of
actually wrong hard-coded ones), Podman actually restarts the container
now.

[1]: https://github.com/containers/podman/issues/20903

Closes #20903.

Signed-off-by: Jasmin Oster <nachtjasmin@posteo.de>
2024-03-11 20:39:54 +01:00
openshift-merge-bot[bot] 38e22d443c
Merge pull request #21950 from cevich/move_podmanimage
[CI:DOCS] Migrate podman container image
2024-03-11 17:28:28 +00:00