22466 Commits

Author SHA1 Message Date
7b3456b5d9 add list as an alias to list networks
this makes it consistent with other commands,
but also makes the example actually work

Signed-off-by: Evgeni Golov <evgeni@golov.de>
2024-04-17 17:10:22 +02:00
482ef7bfcf Add support for updating restart policy
This is something Docker does, and we did not do until now. Most
difficult/annoying part was the REST API, where I did not really
want to modify the struct being sent, so I made the new restart
policy parameters query parameters instead.

Testing was also a bit annoying, because testing restart policy
always is.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-17 08:23:51 -04:00
ddea30e40e Add Compat API for Update
The Docker endpoint here is kind of a nightmare - accepts a full
Resources block, including a large number of scary things like
devices. But it only documents (and seems to use) a small subset
of those. This implements support for that subset. We can always
extend things to implement more later if we have a need.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-17 08:23:51 -04:00
be3f075402 Make podman update changes persistent
The logic here is more complex than I would like, largely due to
the behavior of `podman inspect` for running containers. When a
container is running, `podman inspect` will source as much as
possible from the OCI spec used to run that container, to grab
up-to-date information on things like devices. We don't want to
change this, it's definitely the right behavior, but it does make
updating a running container inconvenient: we have to rewrite the
OCI spec as part of the update to make sure that `podman inspect`
will read the correct resource limits.

Also, make update emit events. Docker does it, we should as well.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-17 08:23:50 -04:00
4817811cb7 Merge pull request #22403 from edsantiago/nuke-nixery
Emergency fix (well, skip) for failing bud tests
2024-04-17 12:21:05 +00:00
7ef0290a1d Emergency fix (well, skip) for failing bud tests
nixery registry has been down all day. Disable test.

Someone will need to fix this on the buildah end.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-16 17:21:04 -06:00
f3276e77ae Merge pull request #22372 from baltitenger/man-network-fix
[CI:DOCS] options/network: fix markdown lists
2024-04-16 15:13:31 +00:00
9697a5f08b Merge pull request #22390 from Luap99/swagger-manifest-doc
[CI:DOCS] fix swagger doc for manifest create
2024-04-16 12:13:42 +00:00
7c4f2c79ea fix swagger doc for manifest create
The manifest name is part of the path in the URL.

Fixes #22255

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-16 12:37:03 +02:00
d4ecae59bd [CI:DOCS] options/network: fix markdown lists
Markdown needs lists to be separate paragraphs, otherwise all the items
end up in a single line.

I also made arguments to be replaced italic to clarify that they
shouldn't be typed exactly as shown.

Signed-off-by: Baltazár Radics <baltazar.radics@gmail.com>
2024-04-16 10:59:30 +02:00
7eaedaf359 Merge pull request #22370 from fanqiaojun/main
Fix some comments
2024-04-15 20:22:31 +00:00
5984ffc1b1 Merge pull request #22385 from containers/renovate/go-golang.org/x/crypto-vulnerability
chore(deps): update module golang.org/x/crypto to v0.17.0 [security]
2024-04-15 20:17:01 +00:00
3dc69a01e3 chore(deps): update module golang.org/x/crypto to v0.17.0 [security]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 17:41:53 +00:00
2364b90736 Merge pull request #22357 from Luap99/swagger
fix api swagger docs
2024-04-15 17:40:39 +00:00
076902b452 Merge pull request #22365 from containers/renovate/setuptools-69.x
chore(deps): update dependency setuptools to ~=69.5.0
2024-04-15 11:41:25 +00:00
0e291ce760 chore(deps): update dependency setuptools to ~=69.5.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-13 17:31:33 +00:00
1600cfffa5 Fix some comments
Signed-off-by: fanqiaojun <fanqiaojun@yeah.net>
2024-04-13 15:20:19 +08:00
e8055904e1 swagger fix infinitive recursion on some types
Commit 668d517af9 moved a lot of type definitions and by that also
copied a bucnh of swagger:model comments, this caused swagger to create
a incorrect yaml that can no longer be parsed by redoc due
"Self-referencing circular pointer".

The yaml basically defined the type with a name and the pointed to the
same name definition again so it caused a infinitive recursion where
redoc just throws an error but the swagger style ignored the case so it
seemed like it worked but obviously the type information was not
working.

Fixes #22351

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-12 15:26:34 +02:00
5e9725983d install swagger from source
First of all this removes the need for a network connection, second
renovate can update the version as it is tracked in go.mod.

However the real important part is that the binary downloads are
broken[1]. For some reason the swagger created with them does not
include all the type information for the examples. However when building
from source the same thing works fine.

[1] https://github.com/go-swagger/go-swagger/issues/2842

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-12 15:26:34 +02:00
f95b9d4e37 Revert "Swap out javascript engine"
This reverts commit 1b6e8d73aa666ee3438e97f9d0d8258a71b88e08.

This does not say what error this is supposed to fix. But assuming this
was about "Self-referencing circular pointer" by redoc then see the
following commit "swagger fix infinitive recursion on some types" for a
proper fix.

Our public docs.podman.io page uses redoc so this doesn't fix anything
other than a local run which is not very helpful.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-12 15:26:34 +02:00
b8a684b64d Merge pull request #22347 from rhatdan/exec
podman exec CID without command should exit 125
2024-04-12 12:51:35 +00:00
5e68fbd132 podman exec CID without command should exit 125
Fixes: https://github.com/containers/podman/issues/22329

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-12 07:44:22 -04:00
e1ec17a569 Merge pull request #22352 from edsantiago/systest-prefetch
(minor) prefetch systemd image before use
2024-04-12 10:52:54 +00:00
0f24d6f698 Merge pull request #22348 from containers/renovate/github.com-docker-docker-26.x
fix(deps): update module github.com/docker/docker to v26.0.1+incompatible
2024-04-12 10:50:08 +00:00
4b2c7f272e Merge pull request #22319 from Luap99/exposed-ports-ps
podman ps: show exposed ports under PORTS as well
2024-04-12 10:11:43 +00:00
df69b36ee5 (minor) prefetch systemd image before use
Two system tests were relying on $SYSTEMD_IMAGE but were not
running _prefetch. This led to baffling flakes that wasted
my time. (Quay flakes, of course. New manifestation.)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-11 13:48:27 -06:00
7b95a8af80 Merge pull request #22349 from jwhonce/wip/swagger_serve
[CI:DOCS] Swap out javascript engine
2024-04-11 18:23:44 +00:00
49729c82a9 Update go-swagger version
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2024-04-11 10:48:10 -07:00
1b6e8d73aa Swap out javascript engine
* Replace redoc with swagger javascript engine. redoc was causing an
  error

Signed-off-by: Jhon Honce <jhonce@redhat.com>
Reported-by: Brent Baude <bbaude@redhat.com>
2024-04-11 10:16:11 -07:00
3418405351 fix(deps): update module github.com/docker/docker to v26.0.1+incompatible
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-11 16:36:51 +00:00
d65f3996dd Merge pull request #21889 from containers/renovate/pytest-8.x
chore(deps): update dependency pytest to v8
2024-04-11 15:09:50 +00:00
8a7c3ea2f5 Merge pull request #22266 from baude/run2077
Add os, arch, and ismanifest to libpod image list
2024-04-11 15:01:32 +00:00
c64f440a70 Merge pull request #22267 from containers/renovate/github.com-gorilla-schema-1.x
Update module github.com/gorilla/schema to v1.3.0
2024-04-11 14:40:32 +00:00
a1e23b6b49 Merge pull request #22340 from containers/renovate/github.com-containers-gvisor-tap-vsock-digest
fix(deps): update github.com/containers/gvisor-tap-vsock digest to d744d71
2024-04-11 14:18:10 +00:00
2388b4571b Merge pull request #22331 from edsantiago/tools-ginkgo-update
vendor ginkgo 2.17.1 into test/tools
2024-04-11 14:05:03 +00:00
08a49389c8 Add os, arch, and ismanifest to libpod image list
when listing images through the restful service, consumers want to know
if the image they are listing is a manifest or not because the libpod
endpoint returns both images and manifest lists.

in addition, we now add `arch` and `os` as fields in the libpod endpoint
for image listing as well.

Fixes: #22184
Fixes: #22185

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-04-11 08:46:37 -05:00
0b0335259e Merge pull request #22260 from baude/validatepr
[CI:DOCS]Initial PR validation
2024-04-11 13:18:55 +00:00
e773ed42b3 [CI:DOCS]Initial PR validation
This PR is only a first step towards being able to validate developer
code locally prior to pushing a PR and using CI.  Right now, we have a
prepared image in a temporary spot (will change when done).  That image
can be used to exercise various podman builds, make validate, and DCO
check.

The idea here is we have a make target that spins a podman container (or
machine) and then execute a small script to perform the actual builds.
Note, these builds are to verify code, not make production binaries so
corners are cut.  As of now, we choose to not build cross-arch binaries
because most of our problems thus far have been operating system builds
and not arch.

Of course this can be expanded in the future.  This is just step one to
start getting some of it in place.  The rest of the work is tracked in
JIRA under two cards.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-04-11 07:49:03 -05:00
4a07131f83 fix(deps): update github.com/containers/gvisor-tap-vsock digest to d744d71
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-11 00:29:10 +00:00
67c6d7ec80 vendor ginkgo 2.17.1 into test/tools
...to match the version in root dir, to get rid of the mismatch
warning on every ginkgo run.

The last bump was done by renovatebot; I don't know why bot didn't
do it this time.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-10 15:18:42 -06:00
2f603fc372 Merge pull request #22332 from Luap99/concurrent-map-write
fix "concurrent map writes" in network ls compat endpoint
2024-04-10 18:05:28 +00:00
999d6c0750 fix "concurrent map writes" in network ls compat endpoint
Not sure why this only triggers now but this code was broken for a
while. It is racy as reported on the issue but because it changes the
actual map part of the network backend it means it can also alter the
behavior of the network which is very bad.

Fixes #22330

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-10 18:41:20 +02:00
17f36a3690 Merge pull request #22270 from edsantiago/redefine-ExitWithError
e2e: redefine ExitWithError() to require exit code
2024-04-10 14:58:29 +00:00
26f866b5df chore(deps): update dependency pytest to v8
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-10 12:39:09 +00:00
2d9159821a e2e: redefine ExitWithError() to require exit code
...and an optional error-message string, to be checked
against stderr.

This is a starting point and baby-steps progress toward #18188.
There are 249 ExitWithError() checks in test/e2e. It will take
weeks to fix them all. This commit enables new functionality:

    Expect(ExitWithError(125, "expected substring"))

...while also allowing the current empty-args form. Once
all 249 empty-args uses are modernized, the matcher code
will be cleaned up.

I expect it will take several months of light effort to get
all e2e tests transitioned to the new form. I am choosing to
do so in pieces, for (relative) ease of review. This PR:

  1) makes the initial changes described above; and
  2) updates a small subset of e2e _test.go files such that:
     a) ExitWithError() is given an exit code and error string; and
     b) Exit(Nonzero) is changed to ExitWithError(Nonzero, "string")
        (when possible)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-10 06:35:52 -06:00
8de92ec912 docs: fix missleading run/create --expose description
The --expose option doesn't actually affect port forwarding or anything
like that.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-10 14:24:32 +02:00
0bedf7f1d2 podman ps: show exposed ports under PORTS as well
Docker shows exposed ports as just PORT/PROTO so match that behavior. It
is not clear to me why someone needs that information in ps as "expose"
doesn't effect anything networking related.

Fixes https://issues.redhat.com/browse/RHEL-32154

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-10 14:24:23 +02:00
2debcf6531 Merge pull request #21822 from containers/renovate/github.com-crc-org-crc-v2-2.x
Update module github.com/crc-org/crc/v2 to v2.34.1
2024-04-10 12:22:52 +00:00
f455f4a5f9 Merge pull request #22328 from giuseppe/drop-ReadMappingsProc
rootless: drop function ReadMappingsProc
2024-04-10 12:20:07 +00:00
140470863f Merge pull request #22324 from edsantiago/new-pasta-0405
New CI VMs, to give us pasta 2024-04-05
2024-04-10 12:17:24 +00:00