766 Commits

Author SHA1 Message Date
8d33bfabaa Merge pull request #9524 from riyad/apiv3-print-tags-when-building
[Compat API] Also print successfully tagging images in /build endpoint
2021-03-11 17:55:00 +01:00
f1eb8e8162 Removing a non existing container API should return 404
Currently we were overwrapping error returned from removal
of a non existing container.

$ podman rm bogus -f
Error: failed to evict container: "": failed to find container "bogus" in state: no container with name or ID bogus found: no such container

Removal of wraps gets us to.

./bin/podman rm bogus -f
Error: no container with name or ID "bogus" found: no such container

Finally also added quotes around container name to help make it standout
when you get an error, currently it gets lost in the error.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-10 04:08:29 -05:00
2033fa4c79 rm pkg/api/handlers/libpod/copy.go
Remove the file since it only contains dead code.  The archive endpoints
are shared between the libpod and the compat API and both use the compat
package.

[NO TESTS NEEDED] since we're removing dead code.

Fixes: #9670
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-09 09:27:03 +01:00
b6079bcf4a Merge pull request #9592 from rhatdan/timestamp
Numerous buildah fixes found by Ed's testing of buildah tests against podman.
2021-03-08 10:07:54 -05:00
b7c00f2cc0 Merge pull request #9647 from mlegenovic/master
Compat API: Fix the response of 'push image' endpoint
2021-03-07 14:25:52 -05:00
326f3eda31 Handle podman build --dns-search
Fixes: https://github.com/containers/podman/issues/9574

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-07 08:08:32 -05:00
9fc29f63e0 Correct compat images/{name}/push response
Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2021-03-07 02:38:01 +01:00
d107c37296 podman-remote stop -time 0 does not work
This patch will allow users to pass in the time 0.
Currently the timeout will take 10 seconds if user passes
in the 0 flag.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-05 10:39:17 -05:00
7a92de4bac Merge pull request #9550 from baude/issue9517
Support label type dict on compat build
2021-03-04 11:09:25 -05:00
f86d641308 Use version package to track all versions
* Server, bindings, and CLI all now pull version information from version
package.
* Current /libpod API version slaved to podman/libpod Version
* Bindings validate against libpod API Minimal version
* Remove pkg/bindings/bindings.go and updated tests

Fixes: #9207

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-03-03 17:03:19 -07:00
8a1955f419 Merge pull request #9581 from baude/issue9529
Add network summary to compat ps
2021-03-03 11:13:22 -05:00
259bb5f723 Merge pull request #9583 from ashley-cui/sec
Add version field to secret compat list/inspect api
2021-03-03 09:17:21 -05:00
8f2192922d Add network summary to compat ps
The compatibility endpoint for listing containers should have the
summarized network configuration with it.

Fixes: #9529

Signed-off-by: baude <bbaude@redhat.com>
2021-03-03 08:16:58 -06:00
aed632cb8c Merge pull request #9580 from rhatdan/timestamp
Fix support for podman build --timestamp
2021-03-03 05:08:13 -05:00
9391bfc520 Add version field to secret compat list/inspect api
Docker api expects secrets endpoint to have a version field. So, the
version field is added into the compat endpoint only. The version field
is always 1, since Docker uses the version to keep track of updates to
the secret, and currently we cannot update a secret.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-03-02 16:55:21 -05:00
f4304c6592 Merge pull request #9560 from TristanCacqueray/libpodPutArchive
[NO TESTS NEEDED] swagger: update the libpodPutArchive verb
2021-03-02 12:24:59 -08:00
5df6251402 Fix support for podman build --timestamp
Currently podman is ignoreing the build --timestamp flag.
This PR fixes this for local and remote clients.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-02 14:25:29 -05:00
2c8c5393a4 Support label type dict on compat build
The compatibility endpoint for build labels should be of type dict (not
list).  For backwards compatibility, we support both.

Fixes: #9517

Signed-off-by: baude <bbaude@redhat.com>
2021-03-02 10:56:28 -06:00
774aea45ee swagger: update the libpodPutArchive operation verb
This change fixes the libpodPutArchive verb to PUT
(POST results in 405).

Signed-off-by: Tristan Cacqueray <tdecacqu@redhat.com>
2021-03-02 13:09:50 +00:00
8b7caa6d04 Compat api containers/json Ports field is null
Fixes #9553

Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2021-03-02 02:50:41 +01:00
b5827d80d3 Merge pull request #9531 from Luap99/fix-9526
compat api network ls accept both format options
2021-03-01 16:28:51 +01:00
b154c519ac Merge pull request #9509 from mlegenovic/master
Correct compat images/create?fromImage response
2021-03-01 08:27:47 +01:00
f54ed7269a compat api network ls accept both format options
Docker allows both the old `map[string]map[string]bool`
and the newer `map[string][]string` for the filter param
so we should too.

Fixes #9526

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-26 19:42:34 +01:00
05410e81ef Merge pull request #9505 from TristanCacqueray/master
[CI:DOCS] swagger: removes the schema type for PodSpecGenerator $ref
2021-02-26 11:21:26 +01:00
fcce1da1bb Correct compat images/create?fromImage response
Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2021-02-26 03:08:10 +01:00
ba319e3ba6 [Compat API] Also print successfully tagging images in /build endpoint
[NO TESTS NEEDED]

Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
2021-02-25 21:06:18 +01:00
24d9bda7ff prune remotecommand dependency
prune a dependency that was only being used for a simple struct.  Should
correct checksum issue on tarballs

[NO TESTS NEEDED]

Fixes: #9355

Signed-off-by: baude <bbaude@redhat.com>
2021-02-25 10:02:41 -06:00
1aa96ed2e2 swagger: removes the schema type for PodSpecGenerator $ref
When using a $ref, the type is ignored and it can confuse the openapi codegen
and make it fails with this error:

  attribute paths.'/libpod/pods/create'(post).[create].type is unexpected

This change removes the schema type attribute.

Signed-off-by: Tristan Cacqueray <tdecacqu@redhat.com>
2021-02-24 18:34:57 +00:00
96fc9d983e Merge pull request #9480 from jmguzik/replace-nil-with-braces-network-resource
[NO TESTS NEEDED] Replace Labels and Options nulls with {} in NetworkResource
2021-02-22 20:41:39 -05:00
fcf669fd98 Replace Labels and Options nulls with {} in NetworkResource
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-02-23 00:31:17 +01:00
a6e7d19c46 Merge pull request #9445 from jmguzik/no-header-info-for-systemd-generation
No header info for systemd generation
2021-02-22 13:44:43 -05:00
cb3af5b05b Merge pull request #9117 from tmds/swagger_missing_schema_properties
[NO TESTS NEEDED] swagger: add missing schema properties
2021-02-22 11:03:14 -05:00
d2f3098c6f --no-header flag implementation for generate systemd
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-02-22 14:48:33 +01:00
10d52c05e2 Merge pull request #9275 from rhatdan/build
Add missing params for podman-remote build
2021-02-22 06:29:32 -05:00
a2e1b3eabc swagger: add missing schema properties
NO_TESTS_NEEDED

Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
2021-02-22 09:27:41 +01:00
5dded6fae7 bump go module to v3
We missed bumping the go module, so let's do it now :)

* Automated go code with github.com/sirkon/go-imports-rename
* Manually via `vgrep podman/v2` the rest

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-22 09:03:51 +01:00
caa0bc1576 [CI:DOCS] [NO TESTS NEEDED] Update swagger doc for libpod container wait
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-18 18:09:21 +01:00
9699e81a06 API: fix libpod's container wait endpoint condition conversion
Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
2021-02-18 00:34:23 +03:00
68a8d397ce Add missing early returns in compat API
[NO TESTS NEEDED]

Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
2021-02-16 23:40:09 +01:00
2a21ecafa7 images/create: always pull image
The `images/create` endpoint should always attempt to pull a newer
image.  Previously, the local images was used which is not compatible
with Docker and caused issues in the Gitlab CI.

Fixes: #9232
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-16 13:32:31 +01:00
690c02f602 Add missing params for podman-remote build
Fixes: https://github.com/containers/podman/issues/9290

Currently we still have hard coded --isolation=chroot for podman-remote build.

Implement missing arguments for podman build

Implements
--jobs, --disable-compression, --excludes

Fixes:
MaxPullPushRetries
RetryDuration

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-16 06:48:35 -05:00
2c31f38399 Fix superfluous response.WriteHeader call in WaitContainerLibpod()
When the query decoding fails at the beginning of WaitContainerLibpod(),
the Error() sets the header but doesn't returns after that.

This causes the execution flow to reach the WriteResponse() at the end
of WaitContainerLibpod(), which attempts to set another header, thus
causing the following error:

http: superfluous response.WriteHeader call from github.com/containers/podman/pkg/api/handlers/utils.WriteResponse (handler.go:124)

[NO TESTS NEEDED]

Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
2021-02-12 23:55:12 +03:00
64255f5fb8 Merge pull request #9311 from deadNightTiger/fix-pull-dockerjava
apiv2: handle docker-java clients pulling
2021-02-12 12:52:58 -05:00
78c8a87362 Enable whitespace linter
Use the whitespace linter and fix the reported problems.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-11 23:01:56 +01:00
69ab67bf90 Enable golint linter
Use the golint linter and fix the reported problems.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-11 23:01:49 +01:00
ef2fc90f2d Enable stylecheck linter
Use the stylecheck linter and fix the reported problems.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-11 23:01:29 +01:00
f28b08fe96 Correct compat network prune response
Correcting the structure of the compat network prune response.  They
should follow {"NetworksDeleted": [<network_name>",...]}

Fixes: #9310

Signed-off-by: baude <bbaude@redhat.com>
2021-02-10 15:48:14 -06:00
fdf39e1699 apiv2: handle docker-java clients pulling
When docker-java calls images/create?fromImage=x, it expects two things
for a successful response: that both "error" and "errorDetail" are not
set, and that the "progress" message contains one of five hard-coded
strings ("Download complete" being one of them).

Signed-off-by: Igor Korolev <missterr@gmail.com>
2021-02-11 00:10:21 +04:00
b4ca924365 Merge pull request #9297 from matejvasek/apiv2_push_get_digest
Docker [APIv2] push sends digest in response body
2021-02-10 08:52:36 -05:00
055e2dda3a Merge pull request #9295 from Luap99/fix-9293
Fix compat networks endpoint for a empty result
2021-02-10 01:45:31 -05:00