| Commit message (Collapse) | Author | Age |
|\
| |
| | |
Add API support for NoOverwriteDirNonDir
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update method signatures and structs to pass option to buildah code
```release-note
NONE
```
[NO NEW TESTS NEEDED]
Signed-off-by: Jhon Honce <jhonce@redhat.com>
|
|/
|
|
|
|
| |
Bump buildah to v1.26.1-0.20220524184833-5500333c2e06
Signed-off-by: Aditya R <arajan@redhat.com>
|
|\
| |
| | |
Todo part 2
|
| |
| |
| |
| |
| |
| | |
An undefined "this" or "that" is terrible.
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
|
|/
|
|
|
|
| |
[NO NEW TESTS NEEDED]
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
|
|\
| |
| | |
compat, build: suppress `step` errors when `quiet=1` is set
|
| |
| |
| |
| |
| |
| |
| |
| | |
Match with docker API and suppress step errors when field quiet is set.
Closes: https://github.com/containers/podman/issues/14315
Signed-off-by: Aditya R <arajan@redhat.com>
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Fix a bug in the resolution of images in the Docker compat API.
When looking up an image by a short name, the name may match
an image that does not live on Docker Hub. The resolved name
should be used for normalization instead of the input name to
make sure that `busybox` can resolve to `registry.com/busybox`
if present in the local storage.
Fixes: #14291
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove duplicate or unused types and constants
* Move all documetation-only models and responses into swagger package
* Remove all unecessary names, go-swagger will determine names from
struct declarations
* Use Libpod suffix to differentiate between compat and libpod models
and responses. Taken from swagger:operation declarations.
* Models and responses that start with lowercase are for swagger use
only while uppercase are used "as is" in the code and swagger comments
* Used gofumpt on new code
```release-note
```
Signed-off-by: Jhon Honce <jhonce@redhat.com>
|
|\
| |
| | |
linter: enable unconvert linter
|
| |
| |
| |
| |
| |
| |
| | |
Detects unneccessary type conversions and helps in keeping the code base
cleaner.
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
|
|\ \
| |/
|/| |
Makefile: simplify for modern Go
|
| |
| |
| |
| |
| |
| | |
Using it is no longer needed.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
|
|\ \
| |/
|/| |
Deleting an n use image should return conflict not system error
|
| |
| |
| |
| |
| |
| | |
Fixes: https://github.com/containers/podman/issues/14208
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
Podman API `libpod/build` accepts paramemter `remote` which overrides
`dockerfile` but currently parameter is no-op. Following commit adds
support for `remote` parameter in libpod API.
See: https://docs.podman.io/en/v3.2.3/_static/api.html#operation/ImageBuildLibpod
Closes: https://github.com/containers/podman/issues/13831
Signed-off-by: Aditya R <arajan@redhat.com>
|
|
|
|
| |
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than assuming a filesystem path, the API service URI is recorded
in the libpod runtime configuration and then reported as requested.
Note: All schemes other than "unix" are hard-coded to report URI exists.
Fixes #12023
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The default log driver is not used when using play kube
without --log-driver. The LogDriver function needs to
be called in order to use the default log driver.
fixes #13781
Signed-off-by: Niall Crowe <nicrowe@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the decoder is shared registering the decoder inside a single
endpoint will also register it for all others. Also the problem with
that is the it will register it everytime this endpoint is called which
is wrong.
Instead we should register it once like the other custom decoder
functions.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OK this is a pretty bad design IMO. We have to endpoints:
manifest create: `POST /{name}`
manifest push: `POST /{name}/registry/{destination}`
So basically all push requests are valid create requests.
Fortunately we can change the order in which the endpoints are matched.
If the logic matches push first it will fall back to create if the
request does not have the `/registry/{}` part.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
|
|
|
|
| |
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The linter ensures a common code style.
- use switch/case instead of else if
- use if instead of switch/case for single case statement
- add space between comment and text
- detect the use of defer with os.Exit()
- use short form var += "..." instead of var = var + "..."
- detect problems with append()
```
newSlice := append(orgSlice, val)
```
This could lead to nasty bugs because the orgSlice will be changed in
place if it has enough capacity too hold the new elements. Thus we
newSlice might not be a copy.
Of course most of the changes are just cosmetic and do not cause any
logic errors but I think it is a good idea to enforce a common style.
This should help maintainability.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
|
|
|
|
|
|
|
|
| |
Fixes: https://github.com/containers/podman/issues/13979
[NO NEW TESTS NEEDED] Buildah has a test for this.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
golint, scopelint and interfacer are deprecated. golint is replaced by
revive. This linter is better because it will also check for our error
style: `error strings should not be capitalized or end with punctuation or a newline`
scopelint is replaced by exportloopref (already endabled)
interfacer has no replacement but I do not think this linter is
important.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no reason to mark them directly as deprecated since we still
have to use them as long as we want to support 3.X calls. The
staticcheck linter is complaining about the Deprecated comment but that
doesn't make sense in this context. There is no good way to only exclude
a single check with golangci-lint.
I renamed the function with a V3 suffix to make clear that we only use
this for backwards compat.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
|
|
|
|
|
|
|
| |
Fix many problems reported by the staticcheck linter, including many
real bugs!
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
|
|\
| |
| | |
Add support for checkpoint image
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is an enhancement proposal for the checkpoint / restore feature of
Podman that enables container migration across multiple systems with
standard image distribution infrastructure.
A new option `--create-image <image>` has been added to the
`podman container checkpoint` command. This option tells Podman to
create a container image. This is a standard image with a single layer,
tar archive, that that contains all checkpoint files. This is similar to
the current approach with checkpoint `--export`/`--import`.
This image can be pushed to a container registry and pulled on a
different system. It can also be exported locally with `podman image
save` and inspected with `podman inspect`. Inspecting the image would
display additional information about the host and the versions of
Podman, criu, crun/runc, kernel, etc.
`podman container restore` has also been extended to support image
name or ID as input.
Suggested-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
activation.Listeners() can return an net.Listener array which contains
nil entries if it cannot listen on the given fds. This can cause podman
to panic so we should check the we have non nil net.Listener first.
[NO NEW TESTS NEEDED] No idea how to reproduce this.
Fixes #13911
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
|
|/
|
|
|
|
|
| |
Since the listener is already an interface there is no reason to use a
extra pointer for it.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
|
|
|
|
|
|
|
|
|
| |
in specgen, CLI path uses the given memory limit to define the swap value (if not already specified)
add a route to this piece of code from within the api handlers
resolves #13145
Signed-off-by: cdoern <cdoern@redhat.com>
|
|\
| |
| | |
Revert "images --size"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit e133a06d2f4a3e94bfbd60b647046f2f515c9c24.
@nalind found a proper fix in c/storage [1] to address the performance
issue. So we really don't need the flag anymore. Note the flag has
never made it into any release.
[1] https://github.com/containers/storage/commit/d76b3606fc9ca975bf436379f91105f0fac1555f
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's a potential race condition where we attempt to attach to
a container immediately after it's been stopped, but before the
cleanup process has run on it. The existing code doesn't allow an
attach to containers in the Stopped state (cleanup process has
not run) but does allow an attach to containers in the Exited
state (cleanup process has run). This doesn't make very much
sense and there's no technical reason to restrict attach to only
Exited containers, so allow attaching to Stopped containers.
[NO NEW TESTS NEEDED] Testing this is very racy - we need to get
in before the cleanup process runs, which isn't really
deterministic when we're invoked from a script - like the CI
tests.
Signed-off-by: Matthew Heon <mheon@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The API endpoints should properly honour the `no_hosts=true` setting in
containers.conf.
Fixes #13719
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
|
|\
| |
| | |
Vendor in new opencontainers/selinux
|
| |
| |
| |
| |
| |
| |
| |
| | |
Also update vendor of containers/common,buildah,storage,image
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2069586
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
|
|/
|
|
|
|
|
|
|
|
| |
Add a --size option to podman images to allow for disabling computing
the size of listed images. If listing images is critical to
performance, user may chose to turn off size computation to speed things
up.
Context: #13755
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
|
|\
| |
| | |
Resolves #13629 Add RegistryAuthHeader to manifest push
|
| |
| |
| |
| | |
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
|
|\ \
| |/
|/| |
Fix manifest 4.0 endpoints
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[NO NEW TESTS NEEDED]
* Branch forced 4.0 only endpoints, which broke bindings
* Fix lint error, in new code
Signed-off-by: Jhon Honce <jhonce@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The PlayKube and PlayKubeDown commands accepted a "path" argument to a YAML file
to play. This requires the caller to write the YAML to a file path. The downside
of this is apparent in the HTTP handlers which have to use a temporary file on
disk to store the YAML file.
The file is opened & used as the body of the HTTP request. It's possible to
instead pass a io.Reader and use a fully in-memory request body.
Add backwards-compatible changes to bindings to allow passing either a filepath
or a io.Reader body.
Refactor the podman bindings to use a io.Reader instead of a filepath.
Simplify the HTTP handlers for PlayKube by removing the now unneeded tempfile.
[NO NEW TESTS NEEDED]
Signed-off-by: Christian Stewart <christian@paral.in>
|
|\ \
| |/
|/| |
podman stats: calc CPU percentage correctly
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When you run podman stats, the first interval always shows the wrong cpu
usage. To calculate cpu percentage we get the cpu time from the cgroup
and compare this against the system time between two stats. Since the
first time we do not have a previous stats an empty struct is used
instead. Thus we do not use the actual running time of the container but
the current unix timestamp (time since Jan 1 1970).
To fix this we make sure that the previous stats time is set to the
container start time, when it is empty.
[NO NEW TESTS NEEDED] No idea how I could create a test which would have
a predictable cpu usage.
See the linked bugzilla for a reproducer.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2066145
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
|
|\ \
| | |
| | | |
import: allow users to set `--os`, `--arch` and `--variant` of image imports
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allows users to set `--os` , `--arch` and `--variant` of the image
created from the custom import.
Following is useful when user is already aware of the values which are
correct for their generated rootfs
Signed-off-by: Aditya R <arajan@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[NO NEW TESTS NEEDED]
Improve swagger and handler code compatibility.
Fixes #12804
Signed-off-by: Jhon Honce <jhonce@redhat.com>
|