853 Commits

Author SHA1 Message Date
536f23c0b7 Merge pull request #11431 from jmguzik/secrets-ls-filters
Add filtering functionality to http api secrets list
2021-09-07 19:24:20 +02:00
88976fcede Merge pull request #11466 from jelly/doc_api_restart
[CI:DOCS] Document default timeout for libpod API Container Restart
2021-09-07 17:03:45 +02:00
1150d1b0b8 Document default timeout for libpod API Container Restart
Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
2021-09-07 14:46:00 +02:00
d1573b95e3 generate systemd: handle --restart
Handle custom restart policies of containers when generating the unit
files; those should be set on the unit level and removed from ExecStart
flags.

Fixes: #11438
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-07 13:58:11 +02:00
d346e6e734 Add filtering functionality to http api secrets list
Filtering is missing in both compat API and libpod API, while docker
has filtering functinality. This commit enables filtering option using
name and id in both libpod and http API.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-09-03 10:29:31 +02:00
d28e85741f InfraContainer Rework
InfraContainer should go through the same creation process as regular containers. This change was from the cmd level
down, involving new container CLI opts and specgen creating functions. What now happens is that both container and pod
cli options are populated in cmd and used to create a podSpecgen and a containerSpecgen. The process then goes as follows

FillOutSpecGen (infra) -> MapSpec (podOpts -> infraOpts) -> PodCreate -> MakePod -> createPodOptions -> NewPod -> CompleteSpec (infra) -> MakeContainer -> NewContainer -> newContainer -> AddInfra (to pod state)

Signed-off-by: cdoern <cdoern@redhat.com>
2021-08-26 16:05:16 -04:00
94c37d7d47 Merge pull request #11298 from baude/kubeupdown
teardown play kube
2021-08-26 13:58:44 -04:00
54e0afffe7 Merge pull request #11218 from cdoern/untilBug
logFile until flag issue, negative duration replaced with positive
2021-08-26 10:12:09 -04:00
1e176923b1 teardown play kube
add the ability for play kube to tear down based on the yaml used to
play it.  it is indicated by --down in the play kube command.  volumes
are NOT deleted during the teardown.  pods and their containers are
stopped and removed.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-24 14:26:14 -05:00
21f396de6f logs: adjust handling around partial log messages
In libpod/logs.LogLine.Write(), don't write a newline to stdout/stderr
when the log message is only part of a line.

In libpod.ConmonOCIRuntime.HTTPAttach(), don't send a newline over the
HTTP connection when the log message is only part of a line.

In pkg/api/handlers/compat.LogsFromContainer(), don't send a newline
over the HTTP connection when the log message is only part of a line,
and don't make doing so conditional on whether or not the client used
the docker or podman endpoint.

In pkg/domain/infra/tunnel.ContainerEngine.ContainerLogs(), don't add
our own newline to log messages, since they already come through from
the server when they need to.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-08-23 18:00:18 -04:00
d06d285e66 logFile until flag issue
we were adding a negative duration in podman events, causing inputs like
-5s to be correct and 5s to be incorrect.

fixes #11158

Signed-off-by: cdoern <cdoern@redhat.com>
2021-08-23 12:51:56 -04:00
2d43e685c3 Merge pull request #11286 from jwhonce/issues/11227
Update /version endpoint to add components
2021-08-20 10:55:00 -04:00
30b036c5d3 Merge pull request #11280 from Luap99/info-plugins
Podman info output plugin information
2021-08-19 17:28:22 -04:00
fd32c73e3a Update /version endpoint to add components
* Include OCI and conmon information as components

Fixes #11227

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-08-19 14:19:45 -07:00
a3f4fbd176 Merge pull request #11271 from jwhonce/issues/8577
Clean up swagger
2021-08-19 14:49:22 -04:00
16dfce486b Podman info output plugin information
For docker compat include information about available volume, log and
network drivers which should be listed under the plugins key.

Fixes #11265

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-08-19 17:33:20 +02:00
0897946f60 [NO TESTS NEEDED] Clean up swagger
* Removed defined by unused responses
* Added missing body definitions
* Updated header input definitions

Outstanding issues:
* Supporting body ContainerConfig for /commit endpoint

Fixes #8577

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-08-19 07:57:54 -07:00
8c228bdbd0 Merge pull request #11154 from cdoern/imagesPull
Libpod images pull changes
2021-08-16 15:46:33 +00:00
de043a5a02 Merge pull request #11203 from rhatdan/codespell
Run codespell to fix spelling
2021-08-12 07:22:48 +00:00
5a32946d61 For compatibility, ignore Content-Type
Endpoint /build logs an info entry when a client uses the wrong
Content-Type for build payload. Given Content-Type is ignored and
assumed to be "application/x-tar".

Endpoint /libpod/build will fail unless "application/x-tar" or
"application/tar" is given for Content-Type. "application/tar" will
be logged as an info entry.

Fixes #11012

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-08-11 13:50:51 -07:00
404488a087 Run codespell to fix spelling
[NO TESTS NEEDED] Just fixing spelling.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-08-11 16:41:45 -04:00
1968fdc874 Merge pull request #11173 from jmguzik/pod-ps-until-filter
Add until filter to podman pod ps
2021-08-11 08:38:20 +00:00
ed30ae4a8a Add until filter to podman pod ps
This commit adds additional until filter to podman pod ps (ls/list).
Additionally, it also adds descriptions for podman pod ps filters available
via http api.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-08-10 22:10:40 +02:00
221b1add74 Add support for pod inside of user namespace.
Add the --userns flag to podman pod create and keep
track of the userns setting that pod was created with
so that all containers created within the pod will inherit
that userns setting.

Specifically we need to be able to launch a pod with
--userns=keep-id

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-08-09 15:17:22 -04:00
12ac4198ca Libpod images pull changes
Added quiet param to docs to limit stream output. Formatted JSON.

fixes #10612

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
Signed-off-by: cdoern <cdoern@redhat.com>
2021-08-09 14:17:08 -04:00
ddc360fe17 Bump Buildah to v1.22.0 [NO TESTS NEEDED]
Bump Buildah to v1.22.0 in preparation for RHEL 8.5 and
RHEL 9.0beta.  Also bump c/common to v0.42.1
[NO TESTS NEEDED]

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-08-04 12:52:34 -04:00
3a922cbc99 Merge pull request #11003 from pascomnet/f_stats
stats: add a interval parameter to cli and api stats streaming
2021-08-04 09:56:57 +00:00
1bc8c94409 Merge pull request #11104 from jwhonce/bz/1988252
Only support containers stats using cgroups v2
2021-08-04 09:53:58 +00:00
9cc974c963 Only support containers stats using cgroups v2
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1988252

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-08-03 15:31:59 -07:00
a210a22920 Compat API: Fix healthcheck status and healthcheck config
Fixes:

- Do not show healthcheck status if not available or if container
  status is "created" (Docker behaviour)
- Show healthcheck configuration if present (Config.Healthcheck)

Tests:

- Ensure State.Health is not present if container status is "created"
- Ensure Config.Healthcheck is present and values correct
- Ensure State.Health is present if container started

Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2021-08-03 15:38:04 +02:00
1f43e82d38 Merge pull request #11072 from matejvasek/header-timeout
Remove ReadHeaderTimeout
2021-08-02 12:25:19 +00:00
872c442e67 Remove ReadHeaderTimeout
Effectively sets timeout to infinity.
This is needed in order to make `podman` work with `pack`.
The `pack` CLI is keeping one connection for prolonged time.
Closing the connection breaks `pack`'s functionality.

[NO TESTS NEEDED]

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-07-29 14:07:47 +02:00
4df6e31ccb remote build: fix streaming and error handling
Address a number of issues in the streaming logic in remote build, most
importantly an error in using buffered channels on the server side.

The pattern below does not guarantee that the channel is entirely read
before the context fires.

for {
	select {
		case <- bufferedChannel:
		...
		case <- ctx.Done():
		...
	}
}

Fixes: #10154
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-28 14:46:15 +02:00
6fe03b25ab support container to container copy
Implement container to container copy.  Previously data could only be
copied from/to the host.

Fixes: #7370
Co-authored-by: Mehul Arora <aroram18@mcmaster.ca>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-27 15:32:23 +02:00
cdbbd79155 stats: add a interval parameter to cli and api stream mode
podman stats polled by default in a 1 sec period.
This can put quite some load on a machine if you run many containers.

The default value is now 5 seconds.
You can change this interval with a new, optional, --interval, -i cli flag.
The api request got also a interval query parameter for the same purpose.

Additionally a unused const was removed.
Api and cli will fail the request if a 0 or negative value is passed in.

Signed-off-by: Thomas Weber <towe75@googlemail.com>
2021-07-27 07:20:47 +02:00
1b6423e9f1 refine dangling checks
By proxy by vendoring containers/common. Previously, a "dangling" image
was an untagged image; just a described in the Docker docs. The
definition of dangling has now been refined to an untagged image without
children to be compatible with Docker.

Further update a redundant image-prune test.

Fixes: #10998
Fixes: #10832
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-26 09:28:17 +02:00
365775489f Merge pull request #11015 from jmguzik/until-list-volume
Add until filter to volume ls filters list
2021-07-22 14:11:24 -04:00
2d8e837a9b Add until filter to volume ls filters list
As a conclusion of a discussion in #10861, until filter is added
by this commit to volume ls filters.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-07-22 00:01:07 +02:00
ac588c751b [CI:DOCS] Fix GitHub URL to Podman logo
The Podman logo is not rendered on docs.podman.io with the current URL.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
2021-07-21 11:22:01 -04:00
db2f474284 Drop podman create --storage-opt container flag
The global flag will work in either location, and this flag just breaks
users expectations, and is basically a noop.

Also fix global storage-opt so that podman-remote can use it.

[NO TESTS NEEDED] Since it would be difficult to test in ci/cd.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-20 16:36:10 -04:00
eaaca49992 compat: image create: handle platform correctly
Handle the platform parameter correctly.  The parameter was only parsed
in presence of credentials and the code was a bit complex.  Also add a
regression test.

Fixes: #10977
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-20 09:00:44 +02:00
68585b0168 Merge pull request #10848 from vrothberg/update-libimage
vendor containers/common@main
2021-07-16 11:12:44 -04:00
e1ac0c3033 vendor containers/common@main
The `IgnorePlatform` options has been removed from the
`LookupImageOptions` in libimage to properly support multi-arch images.

Skip one buildah-bud test which requires updated CI images.  This is
currently being done in github.com/containers/podman/pull/10829 but
we need to unblock merging common and buildah into podman.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-16 14:19:56 +02:00
af40dfc2bf --infra-name command line argument
Adds the new --infra-name command line argument allowing users to define
the name of the infra container

Issue #10794

Signed-off-by: José Guilherme Vanz <jvanz@jvanz.com>
2021-07-15 21:27:51 -03:00
48e6a8eed0 Return macvlan object in /network REST API response
Fixes: #10266

Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
2021-07-14 12:24:03 -07:00
bef1f03d3c Merge pull request #10868 from cdoern/untilLog
Implemented Until Query Parameter for Containers/logs
2021-07-10 06:31:49 -04:00
4624142c2d Implemented Until Query Parameter for Containers/logs
compat containers/logs was missing actual usage of until query param.

fixes #10859

Signed-off-by: cdoern <cdoern@redhat.com>
2021-07-09 12:21:46 -04:00
daebdf3859 Add container config to compat image inspect
With docker-compose, there is a use case where you can `docker-compose
up -d`, then change a file like docker-compose.yml and run up again.
This requires a ContainerConfig with at least Volumes be populated in
the inspect data.  This PR adds just that.

Fixes: #10795

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-07-09 10:10:04 -05:00
895b815188 Merge pull request #10836 from Luap99/diff
podman diff accept two images or containers
2021-07-03 06:17:03 -04:00
8f6a0243f4 podman diff accept two images or containers
First, make podman diff accept optionally a second argument. This allows
the user to specify a second image/container to compare the first with.
If it is not set the parent layer will be used as before.

Second, podman container diff should only use containers and podman
image diff should only use images. Previously, podman container diff
would use the image when both an image and container with this name
exists.

To make this work two new parameters have been added to the api. If they
are not used the previous behaviour is used. The same applies to the
bindings.

Fixes #10649

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-07-02 17:11:56 +02:00