9350 Commits

Author SHA1 Message Date
bf10168614 Merge pull request #7811 from rhatdan/sysctls
Ignore containers.conf sysctl when namespaces set to host
2020-09-29 14:59:16 +00:00
84dede4452 Merge pull request #7819 from containers/dependabot/go_modules/github.com/sirupsen/logrus-1.7.0
Bump github.com/sirupsen/logrus from 1.6.0 to 1.7.0
2020-09-29 13:20:30 +00:00
e6789cb3e8 Bump github.com/sirupsen/logrus from 1.6.0 to 1.7.0
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.6.0...v1.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-29 05:58:49 -04:00
5cf865926e Merge pull request #7792 from Landrash/master
[CI:DOCS] Adds missing . to README.md file.
2020-09-29 08:45:01 +00:00
4a7fb62adc Merge pull request #7803 from edsantiago/bats
System tests: reenable some skipped tests
2020-09-29 01:45:20 +00:00
e7e466e0c8 Merge pull request #7805 from Luap99/journald-test
Journald log driver test
2020-09-28 21:04:55 +00:00
6b803a66fa Merge pull request #7804 from baude/issue7740
fix for compatibility volume creation
2020-09-28 20:26:09 +00:00
63420d50a1 Adds missing . to README.md file.
Signed-off-by: Fredrik Lindqvist <landrash@mail.com>
2020-09-28 22:25:49 +02:00
0d70df1195 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>
2020-09-28 16:17:28 -04:00
1f78d33f76 System tests: reenable some skipped tests
- pause test: enable when rootless + cgroups v2
   (was previously disabled for all rootless)

 - run --pull: now works with podman-remote
   (in #7647, thank you @jwhonce)

 - various other run/volumes tests: try reenabling
   It looks like #7195 was fixed (by #7451? I'm not
   sure if I'm reading the conversation correctly).
   Anyway, remove all the skip()s on 7195. Only time
   will tell if it's really fixed)

Also:

 - new test for podman image tree --whatrequires
   (because TIL). Doesn't work with podman-remote.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-09-28 13:59:42 -06:00
1db49d95b7 Journald log driver test
Test that the journald log driver writes to journald and
that we can read it with journalctl.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-09-28 20:48:12 +02:00
be88d45f5a fix for compatibility volume creation
in the compatibility layer, creating a volume with a name that already does not result in an error.  instead a 201 response with the existing volume's information is returned. while it seems like a bug on the part of docker and they agree, no attempt has been made to fix it in five years.  See https://github.com/moby/moby/issues/16068

Fixes: #7740

Signed-off-by: baude <bbaude@redhat.com>
2020-09-28 13:28:07 -05:00
b0e70a6411 Merge pull request #7786 from rhatdan/rootless
Remove SkipIfRootless if possible, document other calls
2020-09-28 14:43:46 +00:00
d2802636b0 Merge pull request #7770 from rhatdan/pullpolicy
Properly handle podman run --pull command
2020-09-28 14:36:43 +00:00
97841e5507 Merge pull request #7793 from Luap99/network-force
Fix podman network rm --force when network is used by a pod
2020-09-28 14:13:32 +00:00
343a10e25f Fix network remove for the podman remote client
The podman remote client ignored the force option due a typo.
If an error occured the remote client would panic with an
index out of range error.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-09-28 13:34:56 +02:00
393120c135 Fix podman network rm --force when network is used by a pod
I added a test to prevent a future regression.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-09-28 10:41:25 +02:00
007c0ecd50 Remove SkipIfRootless if possible, document other calls
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-27 07:55:16 -04:00
1b5853e647 Properly handle podman run --pull command
Currently the --pull missing|always|never is ignored

This PR implements this for local API.  For remote we
need to default to pullpolicy specified in the containers.conf
file.

Also fixed an issue when images were matching other images names
based on prefix, causing images to always be pulled.

I had named an image myfedora and when ever I pulled fedora, the system
thought that it there were two images named fedora since it was checking
for the name fedora as well as the prefix fedora.  I changed it to check
for fedora and the prefix /fedora, to prefent failures like I had.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-27 07:25:28 -04:00
03d01abec6 Merge pull request #7784 from giuseppe/no-newidmap-fix-hang
rootless: fix hang when newidmap is not installed
2020-09-25 20:21:28 +00:00
a1045adbf4 Merge pull request #7777 from containers/dependabot/go_modules/github.com/containers/common-0.23.0
Bump github.com/containers/common from 0.22.0 to 0.23.0
2020-09-25 17:17:36 +00:00
7147c935aa 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>
2020-09-25 18:08:46 +02:00
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