9508 Commits

Author SHA1 Message Date
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
34b87961af Merge pull request #7714 from rhatdan/make
Print nice error message when python is not installed
2020-09-22 16:04:24 +00:00
20d90320fc Bump to v2.2.0-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-09-22 11:16:48 -04:00
d8868746fd Bump to v2.1.0
Signed-off-by: Matthew Heon <mheon@redhat.com>
v2.1.0
2020-09-22 11:15:41 -04:00
b05bdfd970 Merge pull request #7725 from mheon/release_notes_210_final
[CI:DOCS] Update release notes for v2.1.0 Final Release
2020-09-22 15:11:27 +00:00
78afe67e00 podman save: fix redirect of multi-images
Fix a bug when saving multi-image archives where the progress bars from
copying images was accidentally written to the archive and hence
corrupted it.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-22 17:04:38 +02:00
78a870103d Update release notes for v2.1.0 Final Release
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-09-22 10:28:37 -04:00
4b4d73b2d3 Merge pull request #7720 from vrothberg/campfire
update stale bot
2020-09-22 13:17:00 +00:00
6900b5a2be Merge pull request #7717 from rhatdan/attach
Fix up attach tests for podman remote
2020-09-22 13:06:53 +00:00
fed1ecf470 pkg/hooks: support all hooks
Add support for the missing hook types [1]:
- createContainer
- createRuntime
- startContainer

Otherwise, Podman won't inject them into the runtime config (and pass it
on to runc/crun) but error out.

[1] 44341cdd36/runtime.md (lifecycle)

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-22 14:44:09 +02:00
141688cd6f Merge pull request #7691 from rhatdan/mount
Fix podman image unmount to only report images unmounted
2020-09-22 12:43:56 +00:00
f949cfddaa Fix up attach tests for podman remote
When we execute podman-remote attach, we were not checking if the
container was in the correct state, this is leading to timeouts and
we had turned off remote testing.

Also added an IfRemote() function so we can turn on more tests when
using the "-l" flag for local, but use container name for remote.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-22 06:19:59 -04:00
1921a82a91 update stale bot
Update the GitHub action to mark issues and PRs as stale.  There are a
couple of useful features, most importantly, the bot will remove the
stale label from issues as soon as there's either an activity or a
comment.

This reduces some manual overhead: the stale bot will only drop a
comment on issues and PRs that are not marked as stale.  Hence, as we
appreciated the reminders, we had to manually remove the label which
should now turn into campfire tales.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-22 11:16:40 +02:00
fffcc25d8d Merge pull request #7715 from TomSweeneyRedHat/dev/tsweeney/contrib
[CI:DOCS] Add 'In Progress' note to CONTRIBUTING.md
2020-09-21 19:08:25 -04:00
65878c48d7 [CI:DOCS] Add 'In Progress' note to CONTRIBUTING.md
Update the CONTRIBUTING.md to explain the use of the
new "In Progress" label in the Podman repository.
This emulates the verbiage in Buildah.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-09-21 17:03:05 -04:00
63ba4ff871 Print nice error message when python is not installed
If user runs `make help` on a system without python, we should print a
decent message.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-21 16:32:02 -04:00
d308312fa8 Merge pull request #7695 from jwhonce/issues/7686
Restore 'id' stanza in pull results
2020-09-21 16:20:30 -04:00
dc5cc43563 Merge pull request #7698 from AkihiroSuda/rootless-cni-deflake-lo-up
rootless-cni-infra: fix flakiness during bringing up lo interface
2020-09-21 14:38:07 -04:00
cd65f133d5 add missing return for compat kill
on an error condition in kill for the compatibility layer, we were missing a return.

Signed-off-by: baude <bbaude@redhat.com>
2020-09-21 12:31:07 -05:00
e06230c9d5 Restore 'id' stanza in pull results
id is the last image id from the set of id's returned via the images
stanza.

id may be deprecated in a future version of the API

Created test_rest_v2_0_0.py to reflect the bump in the API Version.

Fixes #7686

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-09-21 08:51:52 -07:00
0f9a2735b7 Fix podman image unmount to only report images unmounted
Currently `podman image unmount` report every image that is mounted
when it unmounts them. We should only report unmounted actually mounted images.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-21 11:08:23 -04:00
051912c8e6 Merge pull request #7688 from vrothberg/fix-7521
remote stats fixes
2020-09-21 10:33:01 -04:00