11923 Commits

Author SHA1 Message Date
0a39ad196c podman unshare: add --rootless-cni to join the ns
Add a new --rootless-cni option to podman unshare to also join the
rootless-cni network namespace. This is useful if you want to connect
to a rootless container via IP address. This is only possible from the
rootless-cni namespace and not from the host namespace. This option also
helps to debug problems in the rootless-cni namespace.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-07 15:54:12 +02:00
0e67053b9a Merge pull request #9955 from edsantiago/bats
System tests: special case for RHEL: require runc
2021-04-07 09:27:41 -04:00
4ceed6eb2f Update swagger-check
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
2021-04-07 15:26:24 +02:00
71322d6c1f swagger: remove name wildcards
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
2021-04-07 15:21:44 +02:00
b8a4494b10 Merge pull request #9961 from Luap99/fix-compose-flake
Fix flaking rootless compose test
2021-04-07 08:16:38 -04:00
48b4b665b1 Update buildah-bud diffs
Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-04-07 05:00:26 -06:00
b68106703e Handle podman-remote --arch, --platform, --os
Podman remote should be able to handle remote specification of
arches.

Requires: https://github.com/containers/buildah/pull/3116

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-07 05:00:16 -06:00
68269a0ee1 buildah-bud tests: handle go pseudoversions, plus...
Handle go pseudoversions, e.g. a custom non-released buildah
used during testing of a PR. This will be something like:

   v1.20.1-0.20210402144408-36a37402d0c8

...and it makes it impossible (AFAIK) to do a shallow checkout;
we need to do a full clone of buildah, then git-checkout the
SHA (last element of the long string above).

FIXME: this is great for testing, but we almost certainly
want some way to block this PR from merging, don't we?

And, while testing this, found and fixed three bugs:

  - quote "$failhint" when echoing it on failure; otherwise
    we lose original whitespace.

  - invoke git-am with --reject! This makes it SO MUCH EASIER
    to identify the failing part of our patch!

  - sigh: generate the make-new-buildah-diffs helper *BEFORE*
    we try git-am! Otherwise, duh, if git-am fails we have no
    way to help the developer create a new diff file.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-04-07 04:59:39 -06:00
42e4609faf Fix flaking rootless compose test
The compose port test is flaking with an empty curl result. The curl retry
does not work properly. Given the the tests never expect an empty result
lets just wait one second and retry again.
Unfortunately there is no way for me to actually verify if this will fix
the flake.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-07 11:41:15 +02:00
6d0c554cbb Merge pull request #9934 from alvistack/master-linux-amd64
Update nix pin with `make nixpkgs`
2021-04-07 01:41:48 -04:00
9b0627617a Merge pull request #9959 from Luap99/rootless-cni-path
rootless cni add /usr/sbin to PATH if not present
2021-04-07 01:40:47 -04:00
f230214db1 rootless cni add /usr/sbin to PATH if not present
The CNI plugins need access to iptables in $PATH. On debian /usr/sbin
is not added to $PATH for rootless users. This will break rootless
cni completely. To prevent breaking existing users add /usr/sbin to
$PATH in podman if needed.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-06 23:55:05 +02:00
2ab5a294b9 System tests: special case for RHEL: require runc
As discussed in watercooler 2021-04-06: make sure that RHEL8
and CentOS are using runc. Using crun is probably a packaging
error that should be caught early.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-04-06 14:21:46 -06:00
d83f49ef6b Merge pull request #9754 from mheon/add_dep
Add --requires flag to podman run/create
2021-04-06 16:16:49 -04:00
b7dd714532 Merge pull request #9952 from edsantiago/swagger_check_operations
[CI:DOCS] swagger-check: compare operations
2021-04-06 15:30:55 -04:00
6acd265306 Add --requires flag to podman run/create
Podman has, for a long time, had an internal concept of
dependency management, used mainly to ensure that pod infra
containers are started before any other container in the pod. We
also have the ability to recursively start these dependencies,
which we use to ensure that `podman start` on a container in a
pod will not fail because the infra container is stopped. We have
not, however, exposed these via the command line until now.

Add a `--requires` flag to `podman run` and `podman create` to
allow users to manually specify dependency containers. These
containers must be running before the container will start. Also,
make recursive starting with `podman start` default so we can
start these containers and their dependencies easily.

Fixes #9250

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-04-06 14:01:31 -04:00
daab9658f8 [CI:DOCS] swagger-check: compare operations
Until now we've only compared operations when called with the
non-default --pedantic flag, because there were way too many
exceptions.

With the merge of #9944 the rules have become much cleaner.
Still not perfect, but it's now possible to have simple
general rules with a (semi-)manageable list of exceptions.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-04-06 11:36:38 -06:00
a0873b6650 Merge pull request #9953 from jwhonce/wip/operation_id
[CI:DOCS] Polish swagger OperationIDs
2021-04-06 13:31:56 -04:00
453aab3941 Merge pull request #9840 from cevich/new_get_ci_vm.sh
Cirrus: Make use of shared get_ci_vm container
2021-04-06 13:30:57 -04:00
51b23be38b [CI:DOCS] Polish swagger OpertionIDs
Renamed 4 IDs to be consistent with other endpoints.

Fixes #9951

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-04-06 10:10:54 -07:00
382b5b81d2 Merge pull request #9942 from mheon/fix_9919
Ensure that `--userns=keep-id` sets user in config
2021-04-06 17:04:50 +02:00
6d98473945 [NO TESTS NEEDED] Update nix pin with make nixpkgs
- Bugfix `make nixpkgs` which pin with branch `nixos-20.09`
  - Code lint with `nixpkgs-fmt`
  - Code sync between x86\_64 and aarch64

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
2021-04-06 21:52:00 +08:00
541252afa7 Ensure that --userns=keep-id sets user in config
One of the side-effects of the `--userns=keep-id` command is
switching the default user of the container to the UID of the
user running Podman (though this can still be overridden by the
`--user` flag). However, it did this by setting the UID and GID
in the OCI spec, and not by informing Libpod of its intention to
switch users via the `WithUser()` option. Because of this, a lot
of the code that should have triggered when the container ran
with a non-root user was not triggering. In the case of the issue
that this fixed, the code to remove capabilities from non-root
users was not triggering. Adjust the keep-id code to properly
inform Libpod of our intention to use a non-root user to fix
this.

Also, fix an annoying race around short-running exec sessions
where Podman would always print a warning that the exec session
had already stopped.

Fixes #9919

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-04-06 09:18:46 -04:00
f143de9db6 Merge pull request #9944 from jwhonce/wip/operation_id
[CI:DOCS] Set all swagger operation id's to be compatible
2021-04-06 14:31:45 +02:00
fa47b4f572 [CI:DOCS] Set all operation id to be compatibile
Libpod operation id's changed to better match compatibile id

Builds on https://github.com/containers/podman/pull/9123 and corrects
a duplicated ID.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-04-05 19:54:30 -07:00
5cbda3b789 Move operationIds to swagger:operation line
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
2021-04-05 13:57:13 -07:00
1214b1a38b swagger: add operationIds that match with docker
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
2021-04-05 13:56:51 -07:00
2b13c5d92a Merge pull request #9938 from jmguzik/network-bindings-initial-tests
Initial network bindings tests
2021-04-05 22:24:15 +02:00
8d411a876c Merge pull request #9917 from baude/machineconventions
fix machine naming conventions
2021-04-05 22:16:15 +02:00
a64f39ba3c Merge pull request #9933 from jmguzik/network-prune-with-until-tests
Http api tests for network prune with until filter
2021-04-05 22:15:16 +02:00
626b7ebd74 Merge pull request #9939 from mheon/release_notes_cve
[ci:docs] Update release notes to indicate CVE fix
2021-04-05 21:40:16 +02:00
804da7ca07 Cirrus: Make use of shared get_ci_vm container
Depends on:
    https://github.com/containers/automation_images/pull/57
    https://github.com/containers/automation/pull/64
    https://github.com/containers/automation/pull/66
    https://github.com/containers/automation/pull/67
    https://github.com/containers/automation/pull/68

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-05 15:38:04 -04:00
4f57a10344 Merge pull request #9940 from rhatdan/auth
Verify existence of auth file if specified
2021-04-05 21:15:15 +02:00
254a5d4c26 Merge pull request #9909 from w4tsn/docs/add-containers-storage-transport
[CI:DOCS] Add transport and destination info to manifest doc
2021-04-05 21:12:15 +02:00
6b23fece73 Merge pull request #9911 from rhatdan/storage
Allow users to override default storage opts with --storage-opt
2021-04-05 20:55:15 +02:00
e9e4898048 Merge pull request #9907 from rhatdan/options
Add support for podman --context default
2021-04-05 20:54:15 +02:00
ca095e435c Merge pull request #9895 from rhatdan/relabel
Don't relabel volumes if running in a privileged container
2021-04-05 20:53:14 +02:00
6831c72f6a Don't relabel volumes if running in a privileged container
Docker does not relabel this content, and openstack is running
containers in this manner.  There is a penalty for doing this
on each container, that is not worth taking on a disable SELinux
container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-05 13:07:36 -04:00
69ace20535 Allow users to override default storage opts with --storage-opt
We define in the man page that this overrides the default storage
options, but the code was appending to the existing options.

This PR also makes a change to allow users to specify --storage-opt="".
This will turn off all storage options.

https://github.com/containers/podman/issues/9852

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-05 12:48:09 -04:00
c6a21a38b3 Add support for podman --context default
This is a noop but helps with scripting and docker-compose.

Fixes: https://github.com/containers/podman/issues/9806

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-05 12:41:47 -04:00
28251f41ff Verify existence of auth file if specified
Fixes: https://github.com/containers/podman/issues/9572

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-05 12:36:04 -04:00
3fae801a37 Merge pull request #9313 from jwhonce/issues/8773
Add default template functions
2021-04-05 17:44:15 +02:00
131458e956 Merge pull request #9423 from Luap99/rootless-cni-no-infra
rootless cni without infra container
2021-04-05 17:12:14 +02:00
7a446b06c3 fix machine naming conventions
try to align the machine commands and their usage descriptions.

[NO TESTS NEEDED]

Signed-off-by: baude <bbaude@redhat.com>
2021-04-05 09:50:03 -05:00
7ec8760cbf Initial network bindings tests
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-04-05 16:48:10 +02:00
ab94827cbb Update release notes to indicate CVE fix
We didn't release this with the original release notes as the fix
was still under embargo.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-04-05 10:33:27 -04:00
1c8d3d0f6f Merge pull request #9928 from pendulm/fix_rootless_socket_activation
Fix rootless socket activation
2021-04-05 16:02:15 +02:00
9005f40c69 Merge pull request #9937 from containers/dependabot/go_modules/github.com/onsi/ginkgo-1.16.0
Bump github.com/onsi/ginkgo from 1.15.2 to 1.16.0
2021-04-05 13:16:13 +02:00
11917a1a6b Move socket activation check into init() and set global condition.
So rootless setup could use this condition in parent and child, child
podman should adjust LISTEN_PID to its self PID.

Add system test for systemd socket activation

Signed-off-by: pendulm <lonependulm@gmail.com>
2021-04-05 17:43:11 +08:00
ed5ad8cac4 Bump github.com/onsi/ginkgo from 1.15.2 to 1.16.0
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.15.2 to 1.16.0.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v1.15.2...v1.16.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-05 09:37:20 +00:00