744 Commits

Author SHA1 Message Date
141d3f1ac3 Merge pull request #10259 from rhatdan/pull
Report Download complete in Compatibility mode
2021-05-07 15:06:51 -04:00
3757d8820d Report Download complete in Compatibility mode
Fixes: https://github.com/containers/podman/issues/10258

[NO TESTS NEEDED] Difficult to create tests for this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-07 11:53:19 -04:00
9da542a78b fix pre review request
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-05-06 19:36:36 +02:00
c58feddb7b fix: docker APIv2 images/get
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-05-05 22:03:11 +02:00
120e1b78ef Merge pull request #10208 from Luap99/play-kube-mac
add --mac-address to podman play kube
2021-05-05 10:10:16 -04:00
0f7d54b026 migrate Podman to containers/common/libimage
Migrate the Podman code base over to `common/libimage` which replaces
`libpod/image` and a lot of glue code entirely.

Note that I tried to leave bread crumbs for changed tests.

Miscellaneous changes:

 * Some errors yield different messages which required to alter some
   tests.

 * I fixed some pre-existing issues in the code.  Others were marked as
   `//TODO`s to prevent the PR from exploding.

 * The `NamesHistory` of an image is returned as is from the storage.
   Previously, we did some filtering which I think is undesirable.
   Instead we should return the data as stored in the storage.

 * Touched handlers use the ABI interfaces where possible.

 * Local image resolution: previously Podman would match "foo" on
   "myfoo".  This behaviour has been changed and Podman will now
   only match on repository boundaries such that "foo" would match
   "my/foo" but not "myfoo".  I consider the old behaviour to be a
   bug, at the very least an exotic corner case.

 * Futhermore, "foo:none" does *not* resolve to a local image "foo"
   without tag anymore.  It's a hill I am (almost) willing to die on.

 * `image prune` prints the IDs of pruned images.  Previously, in some
   cases, the names were printed instead.  The API clearly states ID,
   so we should stick to it.

 * Compat endpoint image removal with _force_ deletes the entire not
   only the specified tag.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-05 11:30:12 +02:00
fb7d16c7a8 add --mac-address to podman play kube
Add a new --mac-address flag to podman play kube. This is used to specify
a static MAC address which should be used for the pod. This option can be
specified several times because play kube can create more than one pod.

Fixes #9731

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-05-04 20:14:13 +02:00
f185666da8 compat api: Networks must be empty instead of null
The compat endpoint for container inspect must return {} instead of null
for NetworkSettings.Networks.

Fixes #9837

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-05-04 11:25:12 +02:00
92371d6382 Docker returns 'die' status rather then 'died' status
In order to be more compatible with Docker, we should return a
container die status rather then a "container died", Too late to
change this for Podman.

Partially fixes: https://github.com/containers/podman/issues/10168

[NO TESTS NEEDED] No easy way to test this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-28 15:56:19 -04:00
825c84efe1 Allow docker volume create API to pass without name
The Docker API does not require Volume name to be specified when
creating a volume.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-27 10:32:06 -04:00
2df5c6383f Fix removal race condition in ListContainers
It is possible that a container is removed between fetching the
initial list of containers and the second access during conversion.

Closes #10120

[NO TESTS NEEDED]

Signed-off-by: Jakob Ahrer <jakob@ahrer.dev>
2021-04-23 10:14:19 +02:00
9c8277247d Fixes from make codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-21 13:16:33 -04:00
659dc7843c podman-remote should show podman.sock info
Currently podman-remote info does not show socket information.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-20 15:56:45 -04:00
a917bae67d Merge pull request #10025 from zhangguanzhang/remote-save-dir
Fixes podman-remote save to directories does not work
2021-04-19 10:22:52 -04:00
d7292dbf27 add --ip to podman play kube
Add a new --ip flag to podman play kube. This is used to specify a
static IP address which should be used for the pod. This option can be
specified several times because play kube can create more than one pod.

Fixes #8442

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-16 09:55:03 +02:00
21827f6a0c Fixes podman-remote save to directories does not work
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2021-04-15 19:24:46 +08:00
855a5a89dd Fix flake on failed podman-remote build : try 2
This time we are checking if the function actually succeeded,
otherwise we will report an error.

Also if we did not get the id, report unexpected failure.

[NO TESTS NEEDED] Still no good way to test this, but manually.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-14 16:51:13 -04:00
4347a62e08 Fix flake on failed podman-remote build
We have a race condition where podman build can fail
but still return an exit code of 0.  This PR ensures
that as soon as the build fails, the failed flag is set
eliminating the race.

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

[NO TESTS NEEDED] Tests of failed builds are already in place, and
the elimination of the race should be enough.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-14 12:05:59 -04:00
9d74825c7e Reflect current state of prune implementation in docs
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-04-13 09:16:25 +02:00
59283322e7 [CI:DOCS] Correct status code for /pods/create
Swagger documentation reported that the API endpoint /pods/create
returned 200 while the as-built code returned 201. 201 is more
correct so documentation updated.

Tests already checked for 201 so no updated needed.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-04-12 09:33:51 -07:00
d41c33eb91 Update manifest API endpoints
* Add validation for manifest name
* Always return an array for manifests even if empty
* Add missing return in df handler when returning error. Caused an
  additional null to be written to client crashing python decoder.

When c/image is refactored to include manifests, manifest endpoints should
be revisited.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-04-09 11:00:06 -07:00
002180f02a Merge pull request #9971 from jwhonce/wip/df
Add missing return
2021-04-08 17:15:22 -04:00
3a03c2ec71 Merge pull request #9121 from tmds/swagger_remove_name_wildcards
[NO TESTS NEEDED] swagger: remove name wildcards
2021-04-08 13:04:23 -04:00
6cc0dc44ec Add missing return
libpod df handler missing a return after writing error to client. This
caused a null to be appended to JSON and crashed python decoder.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-04-08 08:59:37 -07:00
99e3111814 Merge pull request #9968 from pablofsf/fix-libpod-container-wait-docs
[CI:DOCS] Adjust libpod API Container Wait documentation to the code
2021-04-08 11:39:09 -04:00
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
6f6dad4048 Adjust libpod API Container Wait documentation to the code
Closes #9960

Signed-off-by: Pablo Correa Gómez <ablocorrea@hotmail.com>
2021-04-07 19:01:10 +02: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
71322d6c1f swagger: remove name wildcards
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
2021-04-07 15:21:44 +02: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