Commit Graph

18677 Commits

Author SHA1 Message Date
OpenShift Merge Robot 653261aa2c
Merge pull request #18278 from vrothberg/fix/compat-image-remove-noprune
compat: Translate `noprune` into ImageRemoveOptions.NoPrune
2023-04-20 09:30:57 -04:00
Paul Holzinger 750442d093
podman-remote logs: handle server error correctly
If the server responds with an error we must report it correct back to
the user.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-20 14:11:03 +02:00
Paul Holzinger 3aaa2793da
test/e2e: use custom network config v2
Adds two custom config dirs to tests that were missed in
commit dc9a65e348.

Fixes #17946 (hopefully finally)

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-20 13:34:47 +02:00
Valentin Rothberg 00fdfa0636 rename ImagePushReport to ImagePushStream
The Report will be used in a future change as a new return value for the
internal Push API.

Note: this change is only breaking internal APIs while user-facing
external ones remain unchanges.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-20 13:29:07 +02:00
OpenShift Merge Robot 0d171e9b7a
Merge pull request #18264 from raballew/main
Add eBPF snooper that traces the entire fork/exec graph of podman
2023-04-20 07:27:51 -04:00
OpenShift Merge Robot f57020149a
Merge pull request #18267 from Luap99/always-stop
libpod: stop containers with --restart=always
2023-04-20 07:16:49 -04:00
OpenShift Merge Robot 85d383bb35
Merge pull request #18277 from giuseppe/fix-race-test-rm-cgroup
test: fix race when listing cgroups
2023-04-20 07:03:41 -04:00
Daniel J Walsh 81621ce8af
Specify format to buildah before commit
If user specifies commit --format, we were not setting it before
commit, this caused warning messages that made no sense to be
printed that made no sense.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-04-20 06:24:35 -04:00
OpenShift Merge Robot e74a4086ec
Merge pull request #18270 from edsantiago/try_another_hostip
e2e networking test: better way to get host IP
2023-04-20 06:21:23 -04:00
Paul Wallrabe 7382494ca4
Add eBPF snooper that traces the entire fork/exec graph of podman
As long as podman uses a fork/exec model this eBPF program is able to trace the performance of each podman command and the resulting child processes from start to finish. This is an improvement to the already existing podmansnoop eBPF program which only looks at sched_process_exit and enter/exit sys_execve tracepoints.

Signed-off-by: Paul Wallrabe <54737071+raballew@users.noreply.github.com>
2023-04-20 11:30:47 +02:00
Paul Holzinger edb64f8a76
libpod: stop containers with --restart=always
Commit 1ab833fb73 improved the situation but it is still not enough.
If you run short lived containers with --restart=always podman is
basically permanently restarting them. To only way to stop this is
podman stop. However podman stop does not do anything when the
container is already in a not running state. While this makes sense we
should still mark the container as explicitly stopped by the user.

Together with the change in shouldRestart() which now checks for
StoppedByUser this makes sure the cleanup process is not going to start
it back up again.

A simple reproducer is:
```
podman run --restart=always --name test -d alpine true
podman stop test
```
then check if the container is still running, the behavior is very
flaky, it took me like 20 podman stop tries before I finally hit the
correct window were it was stopped permanently.
With this patch it worked on the first try.

Fixes #18259

[NO NEW TESTS NEEDED] This is super flaky and hard to correctly test
in CI. MY ginkgo v2 work seems to trigger this in play kube tests so
that should catch at least some regressions. Also this may be something
that should be tested at podman test days by users (#17912).

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-20 11:23:05 +02:00
Giuseppe Scrivano 0364aef1e0
test: fix race when listing cgroups
A cgroup could have been deleted by the time WalkDir is trying to
access it.  Ignore the error and continue.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-20 11:21:10 +02:00
OpenShift Merge Robot 6a360eaab5
Merge pull request #18234 from containers/renovate/github.com-opencontainers-runtime-spec-1.x
fix(deps): update module github.com/opencontainers/runtime-spec to v1.1.0-rc.2
2023-04-20 05:17:40 -04:00
Andreas Kohn b65ab52d8d compat: Translate `noprune` into ImageRemoveOptions.NoPrune
PR #15093 implemented support for NoPrune in the ImageRemoveOptions,
this PR simply brings that also to the compat API along with
regression tests.

Signed-off-by: Andreas Kohn <andreas.kohn@gmail.com>
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-20 11:11:19 +02:00
Ashley Cui 3464837173 [CI:DOCS] Update RELEASE_PROCESS.md
Update the process. Added announcement section, removed obsolete steps,
changed order of some steps for fewer PR's and simplification of process.

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-04-19 20:37:28 -04:00
Brent Baude 8019dc9e60 hyperv: add podman socket mapping
on machine start, create a socket representing the machine's podman
service socket so local (to the host) applications can take advanatge of
it.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-04-19 16:41:34 -05:00
Ed Santiago a089f1b5c3 e2e networking test: better way to get host IP
uber/jaeger-client-go library is deprecated. Remove it.

Only place it's used is in one e2e test, a test that is flaking
in a way that suggests that the HostIP() weighting heuristic from
that module was not actually getting the best outgoing IP address.
So, switch to using what seems to be the current best practice.
No need to make it reusable, since it's only used in one place.

Oh, also remove undesired "-dt" from two "podman run"s. In one
it's harmless, in the other it would cause a test failure under
some circumstances.

Closes: #18269   (optimistic, aren't I?)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-19 13:35:32 -06:00
rbagd bce38c1afb Updated system test to be easier to read
Following @edsantiago guidance,

* Additional explanations for each step of the test
* Timezone for tests normalized to UTC
* Smarter choice of separator and use of shell substring extraction

Signed-off-by: rbagd <mail@rbagd.eu>
2023-04-19 21:10:40 +02:00
OpenShift Merge Robot 911be1cbcb
Merge pull request #18268 from edsantiago/bindingtest_fail_early
bindings tests: bail out early on image errors
2023-04-19 12:28:58 -04:00
OpenShift Merge Robot 190fb30dd1
Merge pull request #18166 from containers/renovate/setuptools-67.x
chore(deps): update dependency setuptools to v67
2023-04-19 11:10:57 -04:00
Ed Santiago 5f5bea0d12 bindings tests: bail out early on image errors
If Pull() fails, which it does on registry or network flakes,
bail out early: there's no point in continuing. Same with
Save() and restoreImageFromCache(), although those are
unlikely to fail.

Possibly better solution: retry with backoff. Left as exercise
for future maintainer.

Use Expect() for failure checks, and correct two existing
instances of Printf()/Exit() to also use Expect().

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-19 08:16:45 -06:00
Paul Holzinger f2cec73486
libpod: fix TestPostDeleteHooks do not depend on version
It really doesn't make sense to match the version one to one,
this just requires us to update it every time manually.
Use a regex instead.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-19 15:29:52 +02:00
OpenShift Merge Robot 53d8e4b50f
Merge pull request #18192 from containers/renovate/github.com-containers-libhvee-0.x
fix(deps): update module github.com/containers/libhvee to v0.0.5
2023-04-19 08:45:43 -04:00
OpenShift Merge Robot 339344c50e
Merge pull request #18198 from vrothberg/fix-18153
fix remote start --filter
2023-04-19 05:19:06 -04:00
OpenShift Merge Robot 8de9014ff5
Merge pull request #18246 from sstosh/fix-quadlet-test
e2e: quadlet uses PODMAN env for podman binary path
2023-04-19 04:48:56 -04:00
renovate[bot] 8125bab9b8
chore(deps): update dependency setuptools to v67
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-04-19 08:46:21 +00:00
OpenShift Merge Robot 35ae059ca9
Merge pull request #18208 from SoMuchForSubtlety/info-sec-opts
Add missing security options to /info response
2023-04-19 04:45:43 -04:00
renovate[bot] a00ed20e01
fix(deps): update module github.com/containers/libhvee to v0.0.5
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-04-19 08:40:47 +00:00
Toshiki Sonoda da83364eb0 e2e: quadlet uses PODMAN env for podman binary path
Adapts to pass the test even if
podman binary path is not `/usr/local/bin/podman`.

[NO NEW TESTS NEEDED]

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-04-19 16:17:57 +09:00
rbagd 6e0cf93447 Fixes format inconsistencies with docker for certain history fields
Closes #17767
Closes #17768

System test for image list and history dates

* Changed field separator in the test to `;` for easier parsing
* Converted date output from image history and image list to be comparable

Signed-off-by: rbagd <mail@rbagd.eu>
2023-04-19 00:20:47 +02:00
OpenShift Merge Robot 5b58246e2f
Merge pull request #18254 from Luap99/netns-cleanup
libpod: configureNetNS() tear down on errors
2023-04-18 12:05:10 -04:00
OpenShift Merge Robot c47ccf28fc
Merge pull request #18242 from baude/hypervwaitonstop
HyperV: wait on stop
2023-04-18 11:15:58 -04:00
Valentin Rothberg acb24f164b Makefile: do not prefix /etc
Revert commit 3d0e08f04e.
`/etc/` does not need a prefix and can be customized
with the `ETCDIR` env variable.

Fixes: #18250
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-18 16:14:02 +02:00
Paul Holzinger 7e4cd22acb
libpod: configureNetNS() tear down on errors
Make sure to tear down the netns again on errors. This is needed when a
later call fails and we do not have already stored the netns in the
container state.

[NO NEW TESTS NEEDED] My ginkgo-v2 PR will catch problem like this once
merged.

Fixes #18205

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-18 15:18:05 +02:00
Paul Holzinger 4f93a6eee4
libpod: rootlessNetNs.Cleanup() fix error message
The wrong error was logged.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-18 15:14:22 +02:00
Brent Baude 4b8230119e HyperV: wait on stop
When using podman machine with hyperv, stop was releasing the terminal
back top the user prematurely.  This resulted in users being able to run
subsequent commands while the vm was still stopped.  Commands like
machine stop were prone to failing.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-04-18 08:02:48 -05:00
dependabot[bot] 3cdaf85d66
build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 23.0.3+incompatible to 23.0.4+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v23.0.3...v23.0.4)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-18 12:58:07 +00:00
OpenShift Merge Robot 3c995c2c52
Merge pull request #18238 from lsm5/makefile-release-artifact-target
Makefile: include `release-artifacts` target
2023-04-18 08:26:44 -04:00
OpenShift Merge Robot e7b9ae4f3b
Merge pull request #18236 from baude/vsock0
Enabled network over vsock
2023-04-17 17:25:24 -04:00
OpenShift Merge Robot 15e4189fce
Merge pull request #18235 from containers/renovate/github.com-microsoft-go-winio-0.x
fix(deps): update module github.com/microsoft/go-winio to v0.6.1
2023-04-17 17:01:17 -04:00
Lokesh Mandvekar 459f751ae3
Makefile: include `release-artifacts` target
The current release artifacts generation process is still fairly manual
with a bunch of steps. This commit bundles them all into a single
convenient Makefile target.

The `clean-binaries` target ends up removing `bin/`. So, the artifact
dir has been changed to `release/` instead of the current `bin/` to
avoid breaking other Makefile targets.

Related: https://github.com/containers/podman/issues/18215

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-04-17 14:54:20 -04:00
Brent Baude 3222545ad5 Enabled network over vsock
podman machine with Microsoft HyperV will use hvsock on the guest and
vsock on the guest for its networking.  this pr enables the basics for
this to happen as well as changes to ignition to automatically set this
up with network manager.

the vm binary referenced in this pr is in containers/gvisor-tap-vsock
and will need to be added to distributions.

[NO NEW TESTS NEEDED]
Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-04-17 12:34:37 -05:00
renovate[bot] aec7ce4a10
fix(deps): update module github.com/microsoft/go-winio to v0.6.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-17 17:27:04 +00:00
OpenShift Merge Robot ef4dbc27b0
Merge pull request #18167 from baude/hypervvsock
Add support for HVSOCK on hyperv
2023-04-17 13:25:45 -04:00
renovate[bot] 64b26df608
fix(deps): update module github.com/opencontainers/runtime-spec to v1.1.0-rc.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-17 16:16:45 +00:00
OpenShift Merge Robot b7fc57ca14
Merge pull request #18226 from arctic-alpaca/main
[CI:DOCS] Update API reference to include v4.5
2023-04-17 12:15:22 -04:00
OpenShift Merge Robot 9676391c4e
Merge pull request #18202 from R3DRUN3/main
[CI:DOCS] Add license, release and go report badges
2023-04-17 09:24:11 -04:00
Valentin Rothberg 41d5164125 fix remote start --filter
Fix a number of bugs wrt. filtering remote containers and how to
process specified names or IDs.  I _really_ do not like the duplication
between remote and local Podman but want to focus on fixing #18153
for now.

What I desire in the future is to consolidate all functionality of
looking up containers (all, latest, filters, specified names/IDs, etc.)
and for remote clients to just call containers/list etc.

Fixes: #18153
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-17 15:11:40 +02:00
arctic-alpaca 1cac535062
Update API reference to include v4.5
Signed-off-by: arctic-alpaca <67190338+arctic-alpaca@users.noreply.github.com>
2023-04-17 14:52:36 +02:00
OpenShift Merge Robot 5c70641e4f
Merge pull request #18209 from mtrmac/no-NewBuffer
Don't use bytes.NewBuffer to read data
2023-04-17 03:19:35 -04:00