717 Commits

Author SHA1 Message Date
9ba2e78cdc Merge pull request #9958 from jmguzik/limit-prune-filters-for-volumes
Volumes prune endpoint should use only prune filters
2021-04-07 18:55:23 -04:00
84907324fa Volumes prune endpoint should use only prune filters
Volumes endpoints for HTTP compat and libpod APIs allowed
usage of list HTTP endpoint filter funcs. Documentation in
case of compat API does not allow that. This commit aligns
code with the documentation and also ligns libpod with compat API.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-04-07 22:37:49 +02:00
5994377bd0 Merge pull request #9966 from jwhonce/wip/operation_id
[CI:DOCS] Update swagger definition of inspect manifest
2021-04-07 13:39:14 -04:00
9b35262ca2 [CI:DOCS] Update swagger definition of inspect manifest
* Changed reference in swagger to correct struture that was being
  returned.
* Added summary to ManifestAddLibpod to clean up generated web site
* Added serve target to Makefile, to aid in debugging generated
  web site

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-04-07 09:18:23 -07:00
b68106703e Handle podman-remote --arch, --platform, --os
Podman remote should be able to handle remote specification of
arches.

Requires: https://github.com/containers/buildah/pull/3116

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-07 05:00:16 -06:00
d83f49ef6b Merge pull request #9754 from mheon/add_dep
Add --requires flag to podman run/create
2021-04-06 16:16:49 -04:00
6acd265306 Add --requires flag to podman run/create
Podman has, for a long time, had an internal concept of
dependency management, used mainly to ensure that pod infra
containers are started before any other container in the pod. We
also have the ability to recursively start these dependencies,
which we use to ensure that `podman start` on a container in a
pod will not fail because the infra container is stopped. We have
not, however, exposed these via the command line until now.

Add a `--requires` flag to `podman run` and `podman create` to
allow users to manually specify dependency containers. These
containers must be running before the container will start. Also,
make recursive starting with `podman start` default so we can
start these containers and their dependencies easily.

Fixes #9250

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-04-06 14:01:31 -04:00
51b23be38b [CI:DOCS] Polish swagger OpertionIDs
Renamed 4 IDs to be consistent with other endpoints.

Fixes #9951

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-04-06 10:10:54 -07:00
fa47b4f572 [CI:DOCS] Set all operation id to be compatibile
Libpod operation id's changed to better match compatibile id

Builds on https://github.com/containers/podman/pull/9123 and corrects
a duplicated ID.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-04-05 19:54:30 -07:00
5cbda3b789 Move operationIds to swagger:operation line
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
2021-04-05 13:57:13 -07:00
1214b1a38b swagger: add operationIds that match with docker
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
2021-04-05 13:56:51 -07:00
052732857a Fix missing podman-remote build options
Fix handling of SecurityOpts
   LabelOpts
   SeccompProfilePath
   ApparmorProfile

Fix Ulimits

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-02 09:19:03 -04:00
23ee8b1df1 Merge pull request #9899 from kellen-dunham/fix_9698
Fix #9698 Updated reference to network
2021-04-01 23:47:46 +02:00
6c1f6bdccc Fixed podman-remote --network flag
Updated reference to network

[NO TESTS NEEDED]

Signed-off-by: Kellen Dunham <kellen@oneaib.com>
2021-03-31 09:55:45 -05:00
ab7c83392b Fix handling of remove --log-rusage param
Fixes: https://github.com/containers/podman/issues/9889

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-31 07:46:20 -04:00
bd07179e9c Merge pull request #9892 from jwhonce/wip/top
Trim white space from /top endpoint results
2021-03-30 21:29:26 +02:00
989c8e9785 Merge pull request #9863 from jmguzik/fix-prune-filter-funcs
Containers prune endpoint should use only prune filters
2021-03-30 20:51:00 +02:00
eef66973de Trim white space from /top endpoint results
Versions of the ps command have additional spaces between fields, this
manifests as the container asking to run "top" and API reporting "top "
as a process.

Endpoint and tests updated to check that "top" is reported.

There is no libpod specialized endpoint to update.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-03-30 10:42:06 -07:00
f7d82a1f30 Containers prune endpoint should use only prune filters
Containers endpoints for HTTP compad and libpod APIs allowed usage of list HTTP
endpoint filter funcs. Documentation in case of libpod and compat API does not allow that.
This commit aligns code with the documentation.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-30 10:19:22 +02:00
26b0ebd22f Merge pull request #9516 from rhatdan/shrink
[NO TESTS NEEDED] Shrink the size of podman bindings
2021-03-29 17:14:26 +00:00
58bf62f2d1 Merge pull request #9861 from TristanCacqueray/version-swagger
[CI:DOCS] swagger: update system version response body
2021-03-29 17:01:22 +00:00
48549ccc17 swagger: update system version response body
This change updates the swagger documentation of the
system version response body to match the actual
response.

Fixes: #9522
Signed-off-by: Tristan Cacqueray <tdecacqu@redhat.com>
2021-03-29 14:25:25 +00:00
127400880a [NO TESTS NEEDED] Shrink the size of podman-remote
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-29 09:49:45 -04:00
ac3499cc96 Merge pull request #9631 from rhatdan/pull
Fix podman build --pull-never
2021-03-29 13:41:42 +00:00
ccbe7e9456 Merge pull request #9829 from rhatdan/rmi
[NO TESTS NEEDED] Use same function podman-remote rmi as podman
2021-03-28 17:07:45 +00:00
7e4b13b946 Merge pull request #9467 from rhatdan/buildah
[NO TESTS NEEDED] Turn on podman-remote build --isolation
2021-03-28 11:00:45 +00:00
eb82c48cc5 [NO TESTS NEEDED] Use same function podman-remote rmi as podman
Make sure fixes that go into local podman commands also work in
podman-remote, by using the same function.

Since this is just a rewrite of existing code, existing tests should
handle it.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-28 06:56:44 -04:00
ec47312eeb Merge pull request #9822 from jmguzik/fix-pods-list-filters-http-api
Fix list pods filter handling in libpod api
2021-03-27 12:36:47 +00:00
4d51995377 Fix podman build --pull-never
Currently pull policy is set incorrectly when users set --pull-never.

Also pull-policy is not being translated correctly when using
podman-remote.

Fixes: #9573

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-27 05:33:30 -04:00
6e250c317c [NO TESTS NEEDED] Turn on podman-remote build --isolation
Currently podman only works with --isolation chroot.  This PR
fixes this by allowing the isolation mode to default to OCI and to
also allow users to pass the isolation mode into the containers.

The current tests for --isolation should cause this code to be tested.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-26 22:04:14 -04:00
85015a5e23 Fix list pods filter handling in libpod api
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-26 20:19:12 +01:00
dcabf6dd71 Remove resize race condition
Since podman-remote resize requests can come in at random times, this
generates a real potential for race conditions. We should only be
attempting to resize TTY on running containers, but the containers can
go from running to stopped at any time, and returning an error to the
caller is just causing noice.

This change will basically ignore requests to resize terminals if the
container is not running and return the caller to success.  All other
callers will still return failure.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-26 15:15:17 -04:00
429a655866 Fix filters in image http compat/libpod api endpoints
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-25 12:29:53 +01:00
4db4c65443 fixup
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-03-23 18:07:36 +01:00
aba3bbd059 fix: build endpoint for compat API
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-03-23 17:48:28 +01:00
d0bd775c02 Merge pull request #9773 from jmguzik/containers-prune-filters-http-api
Fix containers list/prune http api filter behaviour
2021-03-22 10:17:24 -07:00
907b34c46f Fix containers list/prune http api filter behaviour
The problem described in #9711 and followed by #9758 affects
containers as well. When user provides wrong filter input, error
message should occur, not fallback to full list/prune command.
This change fixes the issue. Additionally, there are error message
fixes for docker http api compat.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-20 22:56:01 +01:00
417f362811 Cleanup /libpod/images/load handler
* Remove orphaned code
* Add meaningful error from LoadImageFromSingleImageArchive() when
  heuristic fails to determine payload format
* Correct swagger to output correct types and headers

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-03-19 09:25:12 -07:00
aa2d6e6e6c Fix volumes and networks list/prune filters in http api
This is the continuation work started in #9711. It turns out
that list/prune commands for volumes in libpod/compat api have
very dangerous error handling when broken filter input is supplied.
Problem also affects network list/prune in libpod. This commit
unifies filter handling across libpod/compat api and adds sanity
apiv2 testcases.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-19 00:09:29 +01:00
629183bd7f Merge pull request #9710 from jmguzik/network-prune-filters-http-api
Network prune filters for http api (compat and libpod)
2021-03-18 06:32:29 -07:00
8ea02d0b60 network prune filters for http compat and libpod api
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-18 00:01:50 +01:00
604459b404 Merge pull request #9711 from jmguzik/volume-prune-fix-http-compat
Fix for volumes prune in http compat api when using filters
2021-03-16 11:32:32 +01:00
0f954e2371 Merge pull request #9695 from jmguzik/array-inspect-network-fix
Fix array instead of one elem network http api
2021-03-16 11:31:33 +01:00
d9f84692c1 Merge pull request #9589 from troyready/add_compat_auth_endpoint
add /auth for docker compatibility
2021-03-16 11:26:32 +01:00
f4b2d597a8 Fix for volumes prune in http compat api
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-15 20:17:05 +01:00
762148deb6 Split libpod/network package
The `libpod/network` package should only be used on the backend and not the
client. The client used this package only for two functions so move them
into a new `pkg/network` package.

This is needed so we can put linux only code into `libpod/network`, see #9710.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-15 14:01:52 +01:00
955aaccc55 fix use with localhost (testing)
Signed-off-by: troyready <troy@troyready.com>
2021-03-12 10:48:03 -08:00
9251b6c8cf add /auth for docker compatibility
This endpoint just validates credentials:
https://github.com/moby/moby/blob/v20.10.4/api/swagger.yaml#L7936-L7977

Fixes: #9564
Signed-off-by: troyready <troy@troyready.com>
2021-03-12 10:39:15 -08:00
605df430d9 Merge pull request #9703 from jmguzik/endpoint-networks
[NO TESTS NEEDED] create endpoint for querying libpod networks
2021-03-12 12:14:27 -05:00
3803d0a4a9 create endpoint for querying libpod networks
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-12 13:06:08 +01:00