7885 Commits

Author SHA1 Message Date
f4b59c74a7 cgroup: skip unified if we are using v1
There exists a chance for a node to be booted in v1, but have reminents of v2. An example is this CRI-O ci run: https://deck-ci.apps.ci.l2s4.p1.openshiftapps.com/view/gcs/origin-federated-results/pr-logs/pull/cri-o_cri-o/3565/test_pull_request_crio_critest_fedora/11243/

We fail because we are incorrectly writing to the unified path, because we are v1. We should not write to the unified path if we are v1

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2020-05-12 15:36:33 -04:00
cf502b99fe enable podman v2 networking for remote client
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-12 13:23:43 -05:00
440e97c2c0 Remove libpod.conf from repo
Now that we're shipping containers.conf, we don't want to provide
a libpod.conf anymore. This removes libpod.conf from the repo and
as many direct uses as I can find.

There are a few more mentions in the documentation, but someone
more familiar with containers.conf should make those edits.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-05-12 14:15:44 -04:00
5b4e91db73 Merge pull request #6174 from giuseppe/fix-events-rootless
rootless: do not set pids limits with cgroupfs
2020-05-12 10:09:09 -07:00
38c4b9bcc0 Merge pull request #6182 from baude/v2remotedf
add podman remote system df
2020-05-12 09:05:03 -07:00
d6d94cfdd7 Merge pull request #6154 from baude/v2sign
v2podman image sign
2020-05-12 09:02:30 -07:00
03c29c357f add podman remote system df
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-12 08:35:48 -05:00
46cf421ed7 Merge pull request #6181 from baude/v2remoteport
add port to podman remote command
2020-05-12 06:34:26 -07:00
07f775d161 Merge pull request #6189 from vrothberg/ocicni
vendor crio/ocicni@v0.2.0
2020-05-12 06:13:36 -07:00
5cfd09073c vendor crio/ocicni@v0.2.0
Fixes: #5193
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-12 14:28:10 +02:00
968741d6de Merge pull request #6173 from containers/dependabot/go_modules/github.com/containers/common-0.11.2
Bump github.com/containers/common from 0.11.1 to 0.11.2
2020-05-12 05:02:47 -07:00
1e85ebd154 Merge pull request #6187 from openSUSE/netgo
Add netgo build tag to static binary
2020-05-12 04:59:52 -07:00
caf46abd3a Merge pull request #6101 from sujil02/systemreset-v2
Adds tunnel routes for system reset.
2020-05-12 03:32:20 -07:00
171dd10125 Merge pull request #6172 from containers/dependabot/go_modules/github.com/containers/image/v5-5.4.4
Bump github.com/containers/image/v5 from 5.4.3 to 5.4.4
2020-05-12 03:18:28 -07:00
2ad59d311b Merge pull request #6186 from vrothberg/auto-update
auto-update: support authfiles
2020-05-12 03:13:12 -07:00
664e0595dd test: enable networking test for rootless
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-05-12 11:31:15 +02:00
45e712a2c6 rootless: do not set pids limits with cgroupfs
and enable events tests.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-05-12 11:00:54 +02:00
1c3bd95b81 auto-update: support authfiles
Support using custom authfiles for auto updates by adding a new
`--authfile` flag and passing it down into the backend.

Also do some minor fixes in the help text and the man page.

Fixes: #6159
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-12 10:20:48 +02:00
6a87e4b3a6 Add netgo build tag to static binary
This allows us to system independently resolve DNS requests in static
Podman binaries.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-05-12 10:12:27 +02:00
1c6ae73a89 Adds tunnel routes for system reset.
Adds tunnel routes for system reset.
Makes forces flag local as options are not propogated down the stack.
Adds relevant test cases and swagger docs.

Signed-off-by: Sujil02 <sushah@redhat.com>
2020-05-11 17:03:32 -04:00
a36e8d8eaa add port to podman remote command
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-11 14:09:41 -05:00
164768c3b9 Bump github.com/containers/image/v5 from 5.4.3 to 5.4.4
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.4.3 to 5.4.4.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.4.3...v5.4.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-11 14:40:55 -04:00
c4e391ad2e Bump github.com/containers/common from 0.11.1 to 0.11.2
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.11.1 to 0.11.2.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.11.1...v0.11.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-11 14:18:28 -04:00
7837bf3c07 Merge pull request #6176 from edsantiago/bats_more
Some BATS cleanup: run and systemd tests
2020-05-11 18:19:07 +02:00
a82de0e3a0 Some BATS cleanup: run and systemd tests
run test: run positive test before negative; and actually
implement real negative tests. Also, add confirmation tests for
cidfile/pidfile, not just 'exit status is good'.

systemd test: enable rootless, and again add actual content
testing.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-05-11 09:30:09 -06:00
fbd0fccf89 v2podman image sign
this is a straight port to add the podman image sign command. no improvements or refactoring done

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-11 09:18:56 -05:00
d8c6cc1684 Merge pull request #6169 from vrothberg/fix-6164
shm_lock_test: add nil check
2020-05-11 15:34:44 +02:00
d473e6e351 Merge pull request #5566 from openSUSE/static-binary
Add podman static build
2020-05-11 15:15:18 +02:00
01f747fdc3 Merge pull request #6168 from vrothberg/mount-tests
enable rootless mount tests
2020-05-11 15:12:42 +02:00
6a26caf6bf Merge pull request #6167 from giuseppe/fix-setting-limits
spec: fix order for setting rlimits
2020-05-11 15:10:12 +02:00
64a12898ad shm_lock_test: add nil check
Fixes: #6164
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-11 13:20:32 +02:00
c21258b70e Add podman static build
We’re now able to build a static podman binary based on a custom nix
derivation. This is integrated in cirrus as well, whereas a later target
would be to provide a self-contained static binary bundle which can be
installed on any Linux x64-bit system.

Fixes: https://github.com/containers/libpod/issues/1399

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-05-11 13:11:07 +02:00
e4ab0cfbc6 enable rootless mount tests
Remove the annotation from the umount command to make mount tests pass
and let podman-umount run as a non-root user.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-11 13:03:09 +02:00
76f8efc0d0 spec: fix order for setting rlimits
also make sure that the limits we set for rootless are not higher than
what we'd set for root containers.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-05-11 13:02:33 +02:00
18b273b72b Merge pull request #6156 from TomSweeneyRedHat/sec
[CI:DOCS] Add Security Policy
2020-05-10 23:55:27 +02:00
dc82b3630d Merge pull request #6126 from baude/v2rootless
enable rootless integration testing
2020-05-10 23:52:59 +02:00
9b66d1321e enable rootless integration testing
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-10 09:09:07 -05:00
bd80b00d5d Merge pull request #6151 from lsm5/tests-apiv2-inspect-remove
bindings tests for container remove and inspect
2020-05-10 13:33:29 +02:00
dc7d6f4818 Merge pull request #6152 from mheon/fix_pod_join_cgroupns
Fix bug where pods would unintentionally share cgroupns
2020-05-09 23:06:51 +02:00
3ff96383f3 Merge pull request #6148 from jwhonce/wip/version
V2 Implement tunnelled podman version
2020-05-09 23:04:23 +02:00
b43e0eb6a1 [CI:DOCS] Add Security Policy
As the title says

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-05-09 16:15:41 -04:00
2a6487c4aa Merge pull request #6145 from baude/v2rootlesssearch
v2 podman search rootless
2020-05-09 05:12:05 -04:00
e81f8008a3 Merge pull request #6147 from mheon/fix_inspect_annotations
Add remaining annotations for `podman inspect`
2020-05-09 05:11:18 -04:00
931bd5ace6 V2 Impliment tunnelled podman version
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-05-08 15:57:26 -07:00
8238b7e706 Ensure podman inspect output for NetworkMode is right
I realized that setting NetworkMode to private when we are making
a network namespace but not configuring it with CNI or Slirp is
wrong; that's considered `--net=none` not `--net=private`. At the
same time, realized that we actually store whether Slirp is in
use, so we can be more specific than just "default" and instead
say slirp4netns or bridge.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-05-08 18:00:42 -04:00
c57c560d90 Fix bug where pods would unintentionally share cgroupns
This one was a massive pain to track down.

The original symptom was an error message from rootless Podman
trying to make a container in a pod. I unfortunately did not look
at the error message closely enough to realize that the namespace
in question was the cgroup namespace (the reproducer pod was
explicitly set to only share the network namespace), else this
would have been quite a bit shorter.

I spent considerable effort trying to track down differences
between the inspect output of the two containers, and when that
failed I was forced to resort to diffing the OCI specs. That
finally proved fruitful, and I was able to determine what should
have been obvious all along: the container was joining the cgroup
namespace of the infra container when it really ought not to
have.

From there, I discovered a variable collision in pod config. The
UsePodCgroup variable means "create a parent cgroup for the pod
and join containers in the pod to it". Unfortunately, it is very
similar to UsePodUTS, UsePodNet, etc, which mean "the pod shares
this namespace", so an accessor was accidentally added for it
that indicated the pod shared the cgroup namespace when it really
did not. Once I realized that, it was a quick fix - add a bool to
the pod's configuration to indicate whether the cgroup ns was
shared (distinct from UsePodCgroup) and use that for the
accessor.

Also included are fixes for `podman inspect` and
`podman pod inspect` that fix them to actually display the state
of the cgroup namespace (for container inspect) and what
namespaces are shared (for pod inspect). Either of those would
have made tracking this down considerably quicker.

Fixes #6149

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-05-08 18:00:42 -04:00
5c7ac1ba78 Merge pull request #6146 from baude/v2unshare
v2 podman unshare command
2020-05-08 15:59:28 -04:00
1ca263bdfc bindings tests for container remove and inspect
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2020-05-08 15:50:24 -04:00
7f8b31f5fb Merge pull request #6049 from containers/dependabot/go_modules/github.com/uber/jaeger-client-go-2.23.1incompatible
build(deps): bump github.com/uber/jaeger-client-go from 2.22.1+incompatible to 2.23.1+incompatible
2020-05-08 21:34:06 +02:00
26f48139ce Add remaining annotations for podman inspect
This should finish support for `podman inspect` in APIv2.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-08 14:45:32 -04:00