9479 Commits

Author SHA1 Message Date
b9d77796c0 Merge pull request #7687 from edsantiago/bats
system tests: new tests
2020-09-25 16:06:07 +00:00
2583246a17 Merge pull request #7760 from rhatdan/rootless
Remove some SkipIfRootless flags from tests
2020-09-25 15:56:31 +00:00
ff63715485 Remove some SkipIfRootess flags from tests
We need to get more tests running in rootless mode.  Since cgroupsV2 allows
management of cgroups in rootless environments a lot of more tests can be run.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-25 05:06:28 -04:00
017f8d6a63 Bump github.com/containers/common from 0.22.0 to 0.23.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.22.0 to 0.23.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.22.0...v0.23.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-25 04:19:55 -04:00
90c2cc6c83 Merge pull request #7762 from mheon/maybe_this_works
HTTP Attach: Wait until both STDIN and STDOUT finish
2020-09-24 20:49:48 +00:00
00cca405d2 HTTP Attach: Wait until both STDIN and STDOUT finish
In the old code, there was a chance that we could return when
only one of STDIN or STDOUT had finished - this could lead to us
dropping either input to the container, or output from it, in the
case that one stream terminated early.

To resolve this, use separate channels to return STDOUT and STDIN
errors, and track which ones have returned cleanly to ensure that
we need bith in order to return from the HTTP attach function and
pass control back to the HTTP handler (which would assume we
exited cleanly and close the client's attach connection).

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-09-24 14:48:26 -04:00
684cde87fa Merge pull request #7662 from jwhonce/issues/7535
Evict containers before removing via V2 API
2020-09-24 17:04:03 +00:00
0839300a71 Merge pull request #7758 from edsantiago/test_log_driver
system tests: new test for run --log-driver
2020-09-24 16:57:05 +00:00
0f5f8dcdd3 Merge pull request #7741 from vrothberg/remote-load-dir-check
remote load: check if input is directory
2020-09-24 16:53:48 +00:00
c191466bd9 Merge pull request #7473 from giuseppe/honor-runtime-for-buildah
build: honor --runtime setting
2020-09-24 16:44:12 +00:00
3957058f29 Merge pull request #7753 from vrothberg/fix-7689
remote stats
2020-09-24 15:32:36 +00:00
7807bf1956 build: honor --runtime setting
pass down to Buildah the --runtime setting.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-09-24 15:37:17 +02:00
1f66a827e8 remote load: check if input is directory
The remote client does not support loading directories yet.  To prevent
confusing error messages and to make the behaviour more explicit, check
if the input points to a directory and throw an error if needed.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-24 14:40:54 +02:00
19b955f099 stats: break out CLI options
Have a clear separation of concerns for the CLI-only options (and their
logic) from the backend.  The backend logic is now easier to understand
(e.g., `stream` instead of `noStream`).

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-24 14:28:10 +02:00
762b787fbf new endpoint: /libpod/containers/stats
Add a new endpoint for container stats allowing for batch operations on
more than one container.  The new endpoint deprecates the
single-container endpoint which will eventually be removed with the next
major release.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-24 14:09:55 +02:00
08cc91926d Merge pull request #7763 from edsantiago/bats_better_parse_table
system tests: helpers: safer parse_table
2020-09-24 09:50:11 +00:00
9765619787 Merge pull request #7761 from baude/interactive
set interactive mode with compat create endpoint
2020-09-24 09:46:46 +00:00
c3d1cefa02 Merge pull request #7739 from zhangguanzhang/apiv2-containers-limit
apiv2 /containers/json limit differ from docker-api
2020-09-24 09:43:19 +00:00
873989f7a4 apiv2 container limit differ from docker-api
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2020-09-24 08:54:46 +08:00
c256944d00 Merge pull request #7759 from xordspar0/app-filter
Allow filtering on pod label values
2020-09-24 00:11:45 +00:00
505f3122b8 Merge pull request #7731 from rhatdan/v2remotefail
Remove final v2remotefail failures
2020-09-24 00:08:31 +00:00
e628487525 system tests: helpers: safer parse_table
The parse_table() helper has until now dumbly split lines
on every single '|' character. This prevents us from running
simple tests such as 'cgroupManager: (systemd|cgroupfs)'.

We now use an ugly but robust sed expression to split
on '|' but *only* when surrounded by spaces and/or beginning
or end of line. This is safe because, for readability, all
tables already keep the '|' symbols well separated from
table content.

Add tests. And, the whole reason behind this, add
an actual real test for cgroupManager and cgroupVersion.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-09-23 16:38:05 -06:00
b60bb3b622 system tests: new test for run --log-driver
Tests all (current) values for --log-driver=X, and one test
for invalid value. For those drivers that write a local
file (json-file, k8s-file), test that the file exists and
contains results of the expected form (timestamp, stdout,
'F' for 'F'ull line, and the expected string output.

For json-file, confirm that podman issues a "Choosing k8s-file"
warning (only on local. On podman-remote, the warning goes only
to the server's stderr).

Written in response to #7754 in which driver=json-file was
falling through to 'none' instead of 'k8s-file'.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-09-23 15:16:54 -06:00
139100a1f4 set interactive mode with compat create endpoint
when creating a container using the compat endpoint, the interactive bool was being hard set to false and ignoring the user's input.

Signed-off-by: baude <bbaude@redhat.com>
2020-09-23 15:44:23 -05:00
393fa4b92f Allow filtering on pod label values
Before this change, filters of the form `podman pod ps --filter
label=app=myapp` were not working. The results would include all pods
that contained the app label with any value. Looking at the code, this
makes sense. It appears that the second = and everything after it were
getting truncated.

Even though there was already a passing test that tested `podman pod ps
--filter label=io.podman.test.label=value1`, the test failed with the
above example with a label `app=myapp`. The new code works in both
cases.

Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-09-23 15:26:12 -05:00
a6b300ef7e Merge pull request #7754 from mheon/fix_logdriver_order
Fix a bug where log-driver json-file was made no logs
2020-09-23 20:12:29 +00:00
8863e0f005 Remove final v2remotefail failures
Most have been fixed, others I replaced with SkipIfRemote

Fix ContainerStart on tunnel, it needs to wait for the exit status
before returning.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-23 14:50:22 -04:00
81c543bbe3 Merge pull request #7745 from rhatdan/systemd
Systemd should be able to run as rootless
2020-09-23 17:52:14 +00:00
bbbc0655b9 Fix a bug where log-driver json-file was made no logs
When we added the None log driver, it was accidentally added in
the middle of a set of Fallthrough stanzas which all should have
led to k8s-file, so that JSON file logging accidentally caused
no logging to be selected instead of k8s-file.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-09-23 13:28:55 -04:00
274ed31498 Merge pull request #7752 from edsantiago/skipifremote_verbose
e2e tests: SkipIfRemote(): add a reason
2020-09-23 17:07:23 +00:00
b7147afde9 e2e tests: SkipIfRemote(): add a reason
Now that Dan has added helpful comments to each SkipIfRemote,
let's take the next step and include those messages in the
Skip() output so someone viewing test results can easily
see if a remote test is skipped for a real reason or for
a FIXME.

This commit is the result of a simple:

   perl -pi -e 's;(SkipIfRemote)\(\)(\s+//\s+(.*))?;$1("$3");' *.go

in the test/e2e directory, with a few minor (manual) changes
in wording.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-09-23 08:09:31 -06:00
376ba349bf stats refactor
Refactor the entities' stats API to simplify using it and reduce the
risk of running into concurrency issues at the call sites.  Further
simplify the stats code by de-spaghetti-ing the logic and reducing
duplicate code.

`ContainerStats` now returns a data channel and an error.  If the error
is nil, callers can read from the channel.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-23 15:39:25 +02:00
3059bf8ef0 Merge pull request #7743 from containers/dependabot/go_modules/github.com/containers/buildah-1.16.2
Bump github.com/containers/buildah from 1.16.1 to 1.16.2
2020-09-23 13:12:52 +00:00
7d273c40f5 Merge pull request #7727 from rhatdan/attach
Examine all SkipIfRemote functions
2020-09-23 13:02:53 +00:00
3532bc688e Systemd should be able to run as rootless
Turn on most of the systemd tests for rootless.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-23 07:06:32 -04:00
e1270de308 Bump github.com/containers/buildah from 1.16.1 to 1.16.2
Bumps [github.com/containers/buildah](https://github.com/containers/buildah) from 1.16.1 to 1.16.2.
- [Release notes](https://github.com/containers/buildah/releases)
- [Changelog](https://github.com/containers/buildah/blob/master/CHANGELOG.md)
- [Commits](https://github.com/containers/buildah/compare/v1.16.1...v1.16.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-23 05:36:41 -04:00
5cedd830f7 Merge pull request #7734 from lsm5/fix-build-with-varlink
fix build with varlink
2020-09-22 23:47:59 +00:00
4c48c71729 Merge pull request #7712 from baude/killreturn
add missing return for compat kill
2020-09-22 21:04:37 +00:00
2270be1871 Merge pull request #7729 from mheon/info_cgroup_manager
Include cgroup manager in `podman info` output
2020-09-22 21:00:57 +00:00
a277b7eb0b Examine all SkipIfRemote functions
Remove ones that are not needed.
Document those that should be there.
Document those that should be fixed.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-22 16:55:37 -04:00
16763c3df0 fix build with varlink
also add a cirrus task for building binaries with varlink.
From: Chris Evich <cevich@redhat.com>

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2020-09-22 16:46:15 -04:00
a8917996c4 Merge pull request #7733 from mheon/bump_readme_210
[CI:DOCS] Bump version in README to v2.1.0
2020-09-22 19:09:34 +00:00
d8c30675d2 Bump version in README to v2.1.0
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-09-22 14:48:55 -04:00
a7c7cd21e4 Merge pull request #7730 from jwhonce/wip/headers
Add Server header to API service responses
2020-09-22 18:41:01 +00:00
961a3d03c8 Merge pull request #7400 from cevich/fix_missing_gpg2
Cirrus: Provide gpg2 in Ubuntu images
2020-09-22 17:43:39 +00:00
fac9252205 Merge pull request #7719 from vrothberg/fix-multi-image-save
podman save: fix redirect of multi-images
2020-09-22 17:40:16 +00:00
4e4c9056e0 Merge pull request #7728 from mheon/bump-2.1.0
[CI:DOCS] Bump to v2.1.0
2020-09-22 17:33:36 +00:00
99386c7ae7 Include cgroup manager in podman info output
This is very useful for debugging cgroups v2, especially on
rootless - we need to ensure people are correctly using systemd
cgroups in these cases.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-09-22 13:15:01 -04:00
23bd99623e Add Server header to API service responses
Aids in reading logs of different services

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-09-22 09:34:48 -07:00
23cb200919 Merge pull request #7724 from vrothberg/hooks
pkg/hooks: support all hooks
2020-09-22 16:07:39 +00:00