9305 Commits

Author SHA1 Message Date
9d8a948f66 Merge pull request #8140 from afbjorklund/podman-remote-host-port
Add support for host keys for non-22 ports (v2.1)
2020-11-18 18:58:45 +01:00
8794e8db1c Add support for host keys for non-22 ports
When not using the standard SSH port (22), the port is appended
to the hostname (in brackets) like so: "host" -> "[host]:1234"

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-10-25 14:49:09 +01:00
9b0f5dd968 Merge pull request #7921 from vrothberg/v2.1-bz-1884668
[v2.1] compat: images/create: fix tag parsing
2020-10-05 19:38:45 +02:00
ba0e0a5e5e compat: images/create: fix tag parsing
The `tag` parameter of the compat `images/create` endpoint can be both,
a tag and a digest.  Fix parsing of the parameter to detect digests and
use the appropriate `@` separator.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1884668
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-10-05 16:26:52 +02:00
3873f305d9 Merge pull request #7915 from lsm5/v2.1-net-host-backport
[2.1] Ignore containers.conf sysctl when namespaces set to host
2020-10-05 12:08:14 +02:00
e896ca924f Ignore containers.conf sysctl when namespaces set to host
If user sets namespace to host, then default sysctls need to be ignored
that are specific to that namespace.

--net=host ignore sysctls that begin with net.
--ipc=host ignore fs.mqueue
--uts=host ignore kernel.domainname and kernel.hostname

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
(cherry picked from commit 0d70df119539d818224b0d014602aaad2bd1b95e)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2020-10-04 19:11:01 -04:00
58a2e07d6b Merge pull request #7898 from giuseppe/backport-fix-capabilities
[2.1] capabilities: always set ambient and inheritable
2020-10-02 16:55:02 -04:00
f352500963 Merge pull request #7897 from lsm5/v2.1-gating-backport
[2.1] Gating-test fix: deal with new crun error msg
2020-10-02 14:24:49 -04:00
445b6cc2e7 capabilities: always set ambient and inheritable
change capabilities handling to reflect what docker does.

Bounding: set to caplist
Inheritable: set to caplist
Effective: if uid != 0 then clear; else set to caplist
Permitted: if uid != 0 then clear; else set to caplist
Ambient: clear

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit 703381b4a2b1dc761ffee0d8e36b47f21ffd92c5)
2020-10-02 17:20:20 +02:00
b60d033720 Gating-test fix: deal with new crun error msg
crun changed an error message:

   https://github.com/containers/crun/pull/439

It's a good change, absolutely the right thing to do, but
it broke gating tests. Fix tests so they handle both old
and new format.

Fixes: #7814

Signed-off-by: Ed Santiago <santiago@redhat.com>
(cherry picked from commit f732e2edcb5a1b925aa2bea65bfe1162edec032e)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2020-10-02 11:08:22 -04:00
4f43055d37 Merge pull request #7892 from giuseppe/backport-fix-hang-no-newidmap
[2.1] rootless: fix hang when newidmap is not installed
2020-10-02 10:37:03 -04:00
ed5f1d69ae rootless: fix hang when newidmap is not installed
when newidmap is not installed the code would hit the
reexec_in_user_namespace_wait code and wait for the child process to
be terminated.  The child process is blocked waiting on the w pipe.

So make sure to unblock the child process first and then clean it up.

Closes: https://github.com/containers/podman/issues/7776

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
(cherry picked from commit 7147c935aa29dca2f89083bfbe2c058a0ca69857)
2020-10-02 14:41:04 +02:00
ce5b48bc3c Merge pull request #7787 from mheon/bump_211
[CI:DOCS] Bump to v2.1.1
2020-09-25 20:18:11 +00:00
02457d15e7 Bump to v2.1.2-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-09-25 14:39:56 -04:00
9f6d6ba0b3 Bump to v2.1.1
Signed-off-by: Matthew Heon <mheon@redhat.com>
v2.1.1
2020-09-25 14:39:06 -04:00
bb8e77d7f4 Merge pull request #7785 from mheon/backports_211
Backports for v2.1.1
2020-09-25 18:22:50 +00:00
65f2f1a763 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-25 11:52:57 -04:00
de11de7f73 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-25 11:52:19 -04:00
742c5a2854 Update release notes for v2.1.1
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-09-25 11:21:16 -04:00
76e841b650 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-25 11:19:55 -04:00
8ead007e5a Evict containers before removing via V2 API
Fixes #7535

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-09-25 11:19:06 -04:00
5de9b2b512 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-25 11:17:24 -04:00
8cae9b56f7 build: honor --runtime setting
pass down to Buildah the --runtime setting.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-09-25 11:13:28 -04:00
e72592c25d 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-25 11:09:17 -04:00
0b8456b44c apiv2 container limit differ from docker-api
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2020-09-25 11:08:27 -04:00
3be6c483c6 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-25 11:06:32 -04:00
c06dfe4ea6 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-25 11:06:01 -04:00
f96db0501b 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-25 11:03:31 -04:00
8252fd24c1 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-25 11:02:12 -04:00
29215ec523 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-25 11:00:52 -04:00
bcd5128207 Add Server header to API service responses
Aids in reading logs of different services

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-09-25 10:59:35 -04:00
bc8ada648a 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-25 10:57:30 -04:00
17db9851d0 Merge pull request #7732 from mheon/bump_211dev
Bump to v2.1.1-dev
2020-09-24 17:40:46 +00:00
ca6fef1e1c Bump to v2.1.1-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-09-23 13:57:44 -04:00
c1a0b7d9d6 Merge pull request #7737 from lsm5/v2.1
[v2.1] fix build with varlink
2020-09-23 11:11:53 +00:00
1cc9cd704d 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>
(cherry picked from commit 16763c3df0eaf3b6e5b7883c60b59f051f811cda)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2020-09-22 17:14:07 -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
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
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
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
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