Commit graph

1726 commits

Author SHA1 Message Date
Matthew Heon 95c45773d7 Do not mount sysfs as rootless in more cases
We can't mount sysfs as rootless unless we manage the network
namespace. Problem: slirp4netns is now creating and managing a
network namespace separate from the OCI runtime, so we can't
mount sysfs in many circumstances. The `crun` OCI runtime will
automatically handle this by falling back to a bind mount, but
`runc` will not, so we didn't notice until RHEL gating tests ran
on the new branch.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-12-04 13:49:56 -05:00
Ashley Cui d6d3af9e8e Add ability to set system wide options for slirp4netns
Wire in containers.conf options for slirp

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-12-04 13:37:22 -05:00
Milivoje Legenovic 15d36f120c More docker compat API fixes
Fixes wrong VirtualSize, ParentId, Architecture, Author, Os and OsVersion value

Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2020-12-04 15:58:46 +01:00
Valentin Rothberg ccbca0b4ab rewrite podman-cp
* Add a new `pkg/copy` to centralize all container-copy related code.

* The new code is based on Buildah's `copier` package.

* The compat `/archive` endpoints use the new `copy` package.

* Update docs and an several new tests.

* Includes many fixes, most notably, the look-up of volumes and mounts.

Breaking changes:

 * Podman is now expecting that container-destination paths exist.
   Before, Podman created the paths if needed.  Docker does not do
   that and I believe Podman should not either as it's a recipe for
   masking errors.  These errors may be user induced (e.g., a path
   typo), or internal typos (e.g., when the destination may be a
   mistakenly unmounted volume).  Let's keep the magic low for such
   a security sensitive feature.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-04 14:39:55 +01:00
Valentin Rothberg 8dab410181 e2e: bump pull timeout to 240 seconds
I am constantly hitting the 90 seconds limit with my very slow
connection.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-04 11:43:17 +01:00
OpenShift Merge Robot caa84cd35d
Merge pull request #8551 from rhatdan/default
Support --network=default as if it was private
2020-12-03 09:31:43 -05:00
OpenShift Merge Robot 5cf7aa65fb
Merge pull request #8408 from umohnani8/sec-opt
Add mask and unmask option to --security-opt
2020-12-03 00:49:23 +01:00
Daniel J Walsh ee418c8565
Support --network=default as if it was private
Docker defines an option of "default" which means to
use the default network.  We should support this with
the same code path as --network="".

This is important for compatibility with the Docker API.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-02 18:38:35 -05:00
Urvashi Mohnani 0334b61958 Add mask and unmask option to --security-opt
Add the mask and unmask option to the --security-opt flag
to allow users to specify paths to mask and unmask in the
container. If unmask=ALL, this will unmask all the paths we
mask by default.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2020-12-02 16:07:18 -05:00
Jhon Honce 2a02833e9f Fix podman images... missing headers in table templates
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-02 10:50:37 -07:00
Paul Holzinger c31a5c0d9c Add support for network ids
The network ID is not stored. It is just the sha256 hash from
the network name. There is a risk of a potential hash collision.
However it's very unlikely and even if we hit this it will
complain that more than network with this ID exists.

The main benefit is that the compat api can have proper
network ID support. Also this adds the support for
`podman network ls --format "{{.ID}}"` and `--filter id=<ID>`.

It also ensures that we can do network rm <ID> and network
inspect <ID>.

Since we use a hash this commit is backwards compatible even for
already existing networks.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-02 10:27:00 +01:00
OpenShift Merge Robot c585012db3
Merge pull request #8457 from afbjorklund/bridge-mtu
Add podman network create flag for bridge mtu
2020-12-02 01:01:09 +01:00
OpenShift Merge Robot b2cd6e0402
Merge pull request #8542 from rhatdan/test
Fix typo in tests
2020-12-01 22:38:58 +01:00
Anders F Björklund db70e91bde Validate that the bridge option is supported
Thanks Luap99 for the validation suggestion

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-01 22:33:16 +01:00
Anders F Björklund de2b15f4d5 Add integration test for the bridge options
Thanks Luap99 for doing the implementation

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-01 22:33:16 +01:00
OpenShift Merge Robot e3313fdd50
Merge pull request #8488 from rhatdan/platform
Add support for --platform
2020-12-01 21:48:40 +01:00
OpenShift Merge Robot b7ff6f0912
Merge pull request #8505 from Luap99/network-labels
podman network label support
2020-12-01 21:43:27 +01:00
Daniel J Walsh 1f91521d24
Fix typo in tests
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-01 15:08:26 -05:00
OpenShift Merge Robot 429d9492f8
Merge pull request #8515 from baude/netconnectstate
network connect disconnect on non-running containers
2020-12-01 16:15:19 +01:00
OpenShift Merge Robot e3f0b7db75
Merge pull request #8400 from rhatdan/varlink
Remove varlink support from podman
2020-12-01 15:30:06 +01:00
baude 7d43cc06dc network connect disconnect on non-running containers
a container can connect and disconnet to networks even when not in a
running state.

Signed-off-by: baude <bbaude@redhat.com>
2020-11-30 16:10:01 -06:00
Luap99 f3402c73d4 Revert "Allow multiple --network flags for podman run/create"
As described in issue #8507 this commit contains a breaking
change which is not wanted in v2.2.

We can discuss later if we want this in 3.0 or not.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-30 18:10:26 +01:00
OpenShift Merge Robot 8b2c0a4fa3
Merge pull request #8493 from Luap99/net-rm-macvlan
Fix problems with network remove
2020-11-28 20:32:26 +01:00
Paul Holzinger 8494bcb866 podman network label support
Add label support for podman network create. Use the `args`
field in the cni config file to store the podman labels.
Use `podman_labels` as key name and store the labels as
map[string]string.

For reference: https://github.com/containernetworking/cni/blob/master/CONVENTIONS.md#args-in-network-config
https://github.com/containernetworking/cni/blob/spec-v0.4.0/SPEC.md#network-configuration

Example snippet:

```
...
"args": {
	"podman_labels": {
		"key1":"value1",
		"key2":"value2"
	}
}
...
```

Make podman network list support several filters. Supported filters are name,
plugin, driver and label. Filters with different keys work exclusive. Several label
filters work exclusive and the other filter keys are working inclusive.

Also adjust the compat api to support labels in network create and list.

Breaking changes:

- podman network ls -f shortform is used for --filter instead --format
This matches docker and other podman commands (container ps, volume ps)

- libpod network list endpoint filter parameter is removed. Instead the
filters paramter should be used as json encoded map[string][]string.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-28 18:35:43 +01:00
Alban Bedel 66944baad6 Add support for persistent volume claims in kube files
In k8s a persistent volume claim (PVC) allow pods to define a volume
by referencing the name of a PVC. The PVC basically contains criterias
that k8s then use to select which storage source it will use for the
volume.

Podman only provide one abtracted storage, the named volumes, and
create them if they don't exists yet. So this patch simply use a
volume with the name of the PVC.

Signed-off-by: Alban Bedel <albeu@free.fr>
2020-11-27 11:38:33 +01:00
Alban Bedel b84304da5e Prepare support in kube play for other volume types than hostPath
Replace the simple map of names to paths with a map of names to a struct
to allow passing more parameters. Also move the code to parse the volumes
to its own file to avoid making the playKubePod() function overly complex.
Finally rework the kube volumes test to also be ready to support more
volume types.

Signed-off-by: Alban Bedel <albeu@free.fr>
2020-11-27 11:38:33 +01:00
Daniel J Walsh f62a356515
Remove varlink support from Podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-26 16:50:42 -05:00
Paul Holzinger 2f7bca0685 Fix problems with network remove
First, make sure we are only trying to remove the network
interface if we are root.
Second, if we cannot get the interface name (e.g macvlan config)
then we should not fail. Just remove the config file.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-26 21:42:28 +01:00
Daniel J Walsh 88f8d96ed8
Add support for --platform
For docker compatibility we need to support --platform
flag.

podman create --platform
podman run --platform
podman pull --platform

Since we have --override-os and --override-arch already
this can be done just by modifying the client to split
the --platform call into os and arch and then pass those
options to the server side.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-26 06:08:11 -05:00
Paul Holzinger 9602e290de Fix custom mac address with a custom cni network
The cni plugin `tuning` is required to set a custom mac address.
This plugin is configured in the default cni config file which is
packaged with podman but was not included the generated config form
`podman network create`.

Fixes #8385

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-24 15:16:23 +01:00
OpenShift Merge Robot 10c2c839c0
Merge pull request #8446 from Luap99/podman-container-ps
Add podman container ps command
2020-11-23 19:09:45 +01:00
OpenShift Merge Robot dd343418ce
Merge pull request #8263 from rhatdan/restart
Allow containers to --restart on-failure with --rm
2020-11-23 13:44:37 +01:00
Paul Holzinger c901a766fb Add podman container ps command
This command exists in docker and is also in our documentation.

Also remove mentions of `podman ls` or `podman list`. These
commands do not exists in podman or docker.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-23 10:49:26 +01:00
OpenShift Merge Robot b30ca110ec
Merge pull request #8410 from Luap99/fix-multiple-networks
Allow multiple --network flags for podman run/create
2020-11-21 02:11:22 +01:00
Daniel J Walsh dc8996ec84
Allow containers to --restart on-failure with --rm
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-20 13:55:19 -05:00
Paul Holzinger f441190d10 Allow multiple --network flags for podman run/create
We allow a container to be connected to several cni networks
but only if they are listed comma sperated. This is not intuitive
for users especially since the flag parsing allows multiple string
flags but only would take the last value. see: spf13/pflag#72

Also get rid of the extra parsing logic for pods. The invalid options
are already handled by `pkg/specgen`.

A test is added to prevent a future regression.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-20 17:02:48 +01:00
OpenShift Merge Robot 042d4884ea
Merge pull request #8285 from rhatdan/containers.conf
Document containers.conf settings for remote connections
2020-11-20 13:15:49 +01:00
OpenShift Merge Robot eb4b26aab7
Merge pull request #8404 from rhatdan/rm
Add alias for podman network rm -> remove
2020-11-20 11:23:45 +01:00
Daniel J Walsh 9770947818
Document containers.conf settings for remote connections
Currently we don't document which end of the podman-remote client server
operations uses the containers.conf.  This PR begins documenting this
and then testing to make sure the defaults follow the rules.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-19 14:48:10 -05:00
OpenShift Merge Robot e239bfa15b
Merge pull request #8391 from baude/networkconnectdisconnect
add network connect|disconnect compat endpoints
2020-11-19 16:54:29 +01:00
Daniel J Walsh f4eac94f4d
Add alias for podman network rm -> remove
docker network remove exists and is alias to docker network rm.

Bug for bug compatible.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-19 10:18:06 -05:00
baude a3e0b7d117 add network connect|disconnect compat endpoints
this enables the ability to connect and disconnect a container from a
given network. it is only for the compatibility layer. some code had to
be refactored to avoid circular imports.

additionally, tests are being deferred temporarily due to some
incompatibility/bug in either docker-py or our stack.

Signed-off-by: baude <bbaude@redhat.com>
2020-11-19 08:16:19 -06:00
OpenShift Merge Robot b1007caca5
Merge pull request #8379 from rhatdan/remote2
Remove build \!remote flags from test phase 2
2020-11-18 22:51:52 +01:00
OpenShift Merge Robot 4434bd7978
Merge pull request #8395 from Luap99/podman-pod-ps-filters
Align the podman pod ps --filter behavior with podman ps
2020-11-18 21:16:21 +01:00
OpenShift Merge Robot 8672c4dea0
Merge pull request #8170 from rhatdan/remote
Remove build \!remote flags from test
2020-11-18 20:27:49 +01:00
Paul Holzinger e7fd9234cd Align the podman pod ps --filter behavior with podman ps
Filters with the same key work inclusive with the only exception being
`label` which is exclusive. Filters with different keys always work exclusive.

Also update the documentation with the new behavior.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-18 19:31:25 +01:00
Daniel J Walsh 3b6d7a3669
Remove build \!remote flags from test phase 2
Add some more tests, document cases where remote will not work
Add FIXMEs for tests that should work on podman-remote but currently
do not.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-18 13:02:44 -05:00
OpenShift Merge Robot 61a82159db
Merge pull request #8376 from Luap99/podman-filters
Align the podman ps --filter behavior with docker
2020-11-18 18:55:05 +01:00
Daniel J Walsh 080ccf512d
Remove build \!remote flags from test
Add some more tests, document cases where remote will not work
Add FIXMEs for tests that should work on podman-remote but currently
do not.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-18 10:44:35 -05:00
Paul Holzinger 4f427a89cb Align the podman ps --filter behavior with docker
All of our filters worked exclusive resulting in `--filter status=created --filter status=exited` to return nothing.

In docker filters with the same key work inclusive with the only exception being `label` which is exclusive. Filters with different keys always work exclusive.

This PR aims to match the docker behavior with podman.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-18 11:36:06 +01:00
zhangguanzhang 76a38fc3f2 Fix podman pod inspect show wrong MAC string
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2020-11-18 18:06:06 +08:00
OpenShift Merge Robot 0f745272e7
Merge pull request #8381 from Luap99/rename-test-files
Rename e2e test files to include _test.go suffix
2020-11-17 22:42:21 +01:00
OpenShift Merge Robot 770b03a50c
Merge pull request #8363 from AlbanBedel/play-kube-create-only
Add an option to control if play kube should start the pod
2020-11-17 22:40:28 +01:00
Paul Holzinger d4446501f3 Rename e2e test files to include _test.go suffix
The test were working fine. Just my IDE doesn't like the files
without the suffix and I don't like red errors.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-17 21:18:27 +01:00
Alban Bedel 7ab936eafa Add an option to control if play kube should start the pod
Having play kube start the pod is not always appropriate, one might
for example like to have the pod running as a set of systemd services.
Add a `start` option to the command line and API to control if the pod
should be started or not; it defaults to true for backward
compatibility.

Signed-off-by: Alban Bedel <albeu@free.fr>
2020-11-17 20:00:58 +01:00
Valentin Rothberg c2c7dd8ff3 remove contrib/gate
Remove references on contrib/gate.  The gating image is currently not
maintained and was replaced in the CI rewrite.  We can disable builds
in Quay once the change is merged.

Note that running `make validate` in a container is still desired.
A similar approach may be re-added in the future.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-11-17 15:21:50 +01:00
OpenShift Merge Robot 42ec4cf87f
Merge pull request #8290 from vrothberg/fix-8265
use container cgroups path
2020-11-17 14:00:09 +01:00
Valentin Rothberg 39bf07694c use container cgroups path
When looking up a container's cgroup path, parse /proc/[PID]/cgroup.
This will work across all cgroup managers and configurations and is
supported on cgroups v1 and v2.

Fixes: #8265
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-11-17 12:29:50 +01:00
Daniel J Walsh 4ca4234af1
Make sure /etc/hosts populated correctly with networks
The --hostname and containername should always be added to containers.

Added some tests to make sure you can always ping the hostname and container
name from within the container.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-16 16:40:50 -05:00
baude 15539c1c4b use lookaside storage for remote tests
in an effort to speed up the remote testing, we should be using
lookaside storage to avoid pull images as well as importing multiple
images into the RW store.

one test was removed and added into system test by Ed in #8325

Signed-off-by: baude <bbaude@redhat.com>
2020-11-16 08:15:44 -06:00
OpenShift Merge Robot 392075631a
Merge pull request #8345 from afbjorklund/volume-filter
Add support for volume ls --filter label=key=value
2020-11-15 15:13:51 +01:00
Anders F Björklund 0dad2499a3 Add support for volume ls --filter label=key=value
Supposed to be able to search for labels with a given value.

Previously it meant searching for label key and label value:

--filter label=key --filter label=value

Add some documentation and integration tests for it as well.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-11-14 20:18:52 +01:00
Daniel J Walsh c69565d83c
test for buildah version in container images.
Check to see if we are recording the version of buildah
used to build the image as a label in the image.

Also we should make sure the filter "since" works.
We are only testing "after", which we don't document.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-13 03:54:08 -05:00
Daniel J Walsh a7431003b8
Fix issues found with codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-12 13:37:38 -05:00
OpenShift Merge Robot 39e3ec767a
Merge pull request #8307 from mheon/fix_8221
Ensure we do not double-lock the same volume in create
2020-11-12 16:11:30 +01:00
OpenShift Merge Robot 6c2503ca04
Merge pull request #8272 from rhatdan/logs
Test podman-remote logs works the same as podman logs
2020-11-12 12:00:38 +01:00
Matthew Heon 0f637e09da Ensure we do not double-lock the same volume in create
When making containers, we want to lock all named volumes we are
adding the container to, to ensure they aren't removed from under
us while we are working. Unfortunately, this code did not account
for a container having the same volume mounted in multiple places
so it could deadlock. Add a map to ensure that we don't lock the
same name more than once to resolve this.

Fixes #8221

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-11-11 16:06:03 -05:00
OpenShift Merge Robot bb07b8c9f1
Merge pull request #8252 from baude/playkubetospecgen
migrate play kube to spec gen
2020-11-10 19:43:47 +01:00
Daniel J Walsh 0fc3c0d91b
Add tests to make sure podman-remote logs works correctly.
Fixes: https://github.com/containers/podman/issues/7942

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-10 13:40:56 -05:00
OpenShift Merge Robot ce2ac7d2d2
Merge pull request #8251 from baude/networkaliases
network aliases for container creation
2020-11-10 19:10:59 +01:00
baude 72ec8b0aa2 migrate play kube to spec gen
we need to migrate play kube away from using the old container creation
method.  the new approach is specgen and this aligns play kube with
container creation in the rest of podman.

Signed-off-by: baude <bbaude@redhat.com>
2020-11-10 07:55:24 -06:00
OpenShift Merge Robot 20b26b5210
Merge pull request #8143 from aojea/dual
enable ipv6 networks
2020-11-10 13:50:43 +00:00
OpenShift Merge Robot da95fb4226
Merge pull request #8270 from andylibrian/log-driver-option-for-play-kube
Add --log-driver to play kube
2020-11-10 12:29:19 +00:00
Antonio Ojea aabf28a168 skip ipv6 e2e tests on rootless
The IPv6 e2e tests on the CI for rootles mode fails because
it needs the ip6tables modules loaded.

Example error:

stdout="", stderr="failed to list chains: running [/sbin/ip6tables -t nat -S --wait]: exit status 3: modprobe: can't change directory to '/lib/modules': No such file or directory\nip6tables v1.8.4 (legacy): can't initialize ip6tables table `nat': Table does not exist (do you need to insmod?)\nPerhaps ip6tables or your kernel needs to be upgraded.\n\n"

Signed-off-by: Antonio Ojea <aojea@redhat.com>
2020-11-10 11:04:02 +01:00
Antonio Ojea 98d770747e add e2e test for network with same subnet
add e2e test that checks that is not possible to create
different networks with the same subnet, in IPv6 neither
in IPv4

Signed-off-by: Antonio Ojea <aojea@redhat.com>
2020-11-10 11:03:56 +01:00
Antonio Ojea e7a72d72fd enable ipv6 network configuration options
enable the ipv6 flag in podman network to be able to create
dual-stack networks for containers.

This is required to be compatible with docker, where --ipv6
really means dual stack.

podman, unlike docker, support IPv6 only containers since
07e3f1bba9.

Signed-off-by: Antonio Ojea <aojea@redhat.com>
2020-11-10 08:34:52 +01:00
baude ddadc99e99 make network name uniq for dnsname tests
ed identified that the dnsname integration test does not use a unique
name and therefore cannot be cleaned up.  this was made worse by a
improper defer statement to remove the network should the test fail.

Signed-off-by: baude <bbaude@redhat.com>
2020-11-09 16:35:12 -06:00
baude b7b5b6f8e3 network aliases for container creation
podman can now support adding network aliases when running containers
(--network-alias).  It requires an updated dnsname plugin as well as an
updated ocicni to work properly.

Signed-off-by: baude <bbaude@redhat.com>
2020-11-09 15:08:58 -06:00
Paul Holzinger f14cb5ef61 Add support for podman search --format json
Fixes #8274

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-09 12:59:59 +01:00
Andy Librian f3355d9697
Add --log-driver to play kube
addresses #6604

Signed-off-by: Andy Librian <andylibrian@gmail.com>
2020-11-08 08:59:18 +07:00
OpenShift Merge Robot 3ef721fa1f
Merge pull request #8238 from joelsmith/master
Use regex for "pod ps" name filter to match "ps" behavior
2020-11-05 01:54:22 +01:00
Chris Evich f37d1d2175
Use ping from alpine
As of this commit, in Fedora 33, without without `CAP_NET_ADMIN` and
`CAP_NET_RAW`, require setting `net.ipv3.ping_group_range` in order for
the `ping` command to work inside a container.  However, not all images
`ping` are created equal.  For whatever reason, the busybox version in
the busybox container image, does not function.  Switch to the Alpine
image's busybox ping, which seems to work fine.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-11-04 09:37:35 -05:00
OpenShift Merge Robot 7699557b5d
Merge pull request #8225 from debarshiray/wip/rishi/exec_test-use-containsubstring
Improve error messages from failing tests
2020-11-04 06:18:08 -05:00
Joel Smith a47fe37a97 Use regex for "pod ps" name filter to match "ps" behavior
Signed-off-by: Joel Smith <joelsmith@redhat.com>
2020-11-03 15:31:39 -07:00
OpenShift Merge Robot 5f897d2abe
Merge pull request #8232 from ashley-cui/volfilt
Make volume filters inclusive
2020-11-03 16:25:39 -05:00
Ashley Cui 532bce4ad4 Make volume filters inclusive
When using multiple filters, return a volume that matches any one of the used filters, rather than matching both of the filters.
This is for compatibility with docker's cli, and more importantly, the apiv2 compat endpoint
Closes #6765

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-11-03 14:35:01 -05:00
Debarshi Ray 2b859a9d18 Improve error messages from failing tests
Using a function like ContainSubstring or Equal is better because if
the test fails it will log a descriptive error that includes the
actual string generated during the test. This is more helpful than a
function like BeTrue that will only indicate that an assertion failed
without giving further details of the failure.

Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2020-11-03 19:36:44 +01:00
OpenShift Merge Robot 110c1c8b4b
Merge pull request #8231 from baude/fedorarootlesscpulimit
fedora rootless cpu settings
2020-11-03 12:21:08 -05:00
OpenShift Merge Robot 2a6e96e7ae
Merge pull request #8226 from debarshiray/wip/rishi/toolbox_test-userns-keepid-HOME
Test $HOME when it's parent is bind mounted with --userns=keep-id
2020-11-03 12:04:26 -05:00
baude 73742a0e73 fedora rootless cpu settings
fedora does not have the the ability in rootless to set cpu limits.
this requires a simple fix for fedora 33 to pass ci tests.

Signed-off-by: baude <bbaude@redhat.com>
2020-11-03 09:28:06 -06:00
Debarshi Ray b00a195ba2 Test $HOME when it's parent is bind mounted with --userns=keep-id
When --userns=keep-id is used, Podman is supposed to set up the home
directory of the user inside the container to match that on the host
as long as the home directory or any of its parents are marked as
volumes to be bind mounted into the container.

Currently, the test only considers the case where the home directory
itself is bind mounted into the container. It doesn't cover the Podman
code that walks through all the bind mounts looking for ancestors in
case the home directory itself wasn't specified as a bind mount.

Therefore, this improves the existing test added in commit
6ca8067956 ("Setup HOME environment when using --userns=keep-id")

Note that this test can't be run as root. The home directory of the
root user is /root, and it's parent is /. Bind mounting the entire /
from the host into the container prevents it from starting:
  Error: openat2 ``: No such file or directory: OCI not found

Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2020-11-03 01:56:16 +01:00
Giuseppe Scrivano afa4ec0db0
specgen: keep capabilities with --userns=keep-id
if --userns=keep-id is specified and not --user is specified, take the
unprivileged capabilities code path so that ambient capabilities are
honored in the container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-11-02 15:46:56 +01:00
Giuseppe Scrivano 6a94429098
specgen: fix check for root user
if the username is specified in the USER:GROUP form, make sure we only
check for USER.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-11-02 14:39:02 +01:00
Giuseppe Scrivano bce8f851c1
specgen: add support for ambient capabilities
if the kernel supports ambient capabilities (Linux 4.3+), also set
them when running with euid != 0.

This is different that what Moby does, as ambient capabilities are
never set.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-11-02 14:36:39 +01:00
OpenShift Merge Robot 5a53c6e5c9
Merge pull request #8203 from Luap99/fix-8194
Fix dnsname when joining a different network namespace in a pod
2020-10-31 11:12:05 +01:00
OpenShift Merge Robot b6ab2df9d1
Merge pull request #8100 from QiWang19/mirror-manifest
manifest list inspect single image
2020-10-31 00:19:52 +01:00
OpenShift Merge Robot e5227b9d75
Merge pull request #8201 from QiWang19/search-limit
Remove search limit since pagination support
2020-10-30 20:34:28 +01:00
Paul Holzinger 2704dfbb7a Fix dnsname when joining a different network namespace in a pod
When creating a container in a pod the podname was always set as
the dns entry. This is incorrect when the container is not part
of the pods network namespace. This happend both rootful and
rootless. To fix this check if we are part of the pods network
namespace and if not use the container name as dns entry.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-10-30 18:53:55 +01:00
Qi Wang 57650aa5f3 manifest list inspect single image
If the image name not a manifest list type, enable manifest inspect to return manifest of single image manifest type vnd.docker.distribution.manifest.v2+json.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-10-30 11:13:57 -04:00
Qi Wang cab33cfbf6 Remove search limit since pagination support
Remove the search limit check since the c/image v5.6.0 supports pagination and can give result over 100 entries.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-10-30 11:00:40 -04:00
Daniel J Walsh 916825b675
Pod's that share the IPC Namespace need to share /dev/shm
Containers that share IPC Namespaces share each others
/dev/shm, which means a private /dev/shm needs to be setup
for the infra container.

Added a system test and an e2e test to make sure the
/dev/shm is shared.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-30 05:21:34 -04:00
OpenShift Merge Robot 6d72e7611e
Merge pull request #8165 from edsantiago/move_from_dockerio
Move from docker.io
2020-10-29 18:00:33 +01:00
OpenShift Merge Robot 464aa36b0c
Merge pull request #8081 from mheon/pod_degraded
Add a Degraded state to pods
2020-10-28 16:10:33 -04:00
Ed Santiago 20e104351d move from docker.io
Followon to #7965 (mirror registry). mirror.gcr.io doesn't
cache all the images we need, and I can't find a way to
add to its cache, so let's just use quay.io for those
images that it can't serve.

Tools used:
  skopeo copy --all docker://docker.io/library/alpine:3.10.2 \
                    docker://quay.io/libpod/alpine:3.10.2

...and also:

    docker.io/library/alpine:3.2
    docker.io/library/busybox:latest
    docker.io/library/busybox:glibc
    docker.io/library/busybox:1.30.1
    docker.io/library/redis:alpine
    docker.io/libpod/alpine-with-bogus-seccomp:label
    docker.io/libpod/alpine-with-seccomp:label
    docker.io/libpod/alpine_healthcheck:latest
    docker.io/libpod/badhealthcheck:latest

Since most of those were new quay.io/libpod images, they required
going in through the quay.io GUI, image, settings, Make Public.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-10-28 13:16:37 -06:00
OpenShift Merge Robot 7149a7cb39
Merge pull request #8102 from ashley-cui/inspect
Add pod, volume, network to inspect package
2020-10-27 17:04:44 -04:00
Ashley Cui 61deec451f Add pod, volume, network to inspect package
podman inspect only had the capabilities to inspect containers and images. if a user wanted to inspect a pod, volume, or network, they would have to use `podman network inspect`, `podman pod inspect` etc. Docker's cli allowed users to inspect both volumes and networks using regular inspect, so this commit gives the user the functionality

If the inspect type is not specified using --type, the order of inspection is:

containers
images
volumes
networks
pods

meaning if container that has the same name as an image, podman inspect would return the container inspect.

To avoid duplicate code, podman network inspect and podman volume inspect now use the inspect package as well. Podman pod inspect does not because podman pod inspect returns a single json object while podman inspect can return multiple)

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-10-27 14:42:54 -04:00
Daniel J Walsh 2099c86f33
build(deps): bump github.com/containers/common from 0.26.0 to 0.26.3
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.26.0 to 0.26.3.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](containers/common@v0.26.0...v0.26.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-27 07:25:23 -04:00
Matej Vasek 97d47ef3d5 fix: podman-cp respects "--extract" flag
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2020-10-25 15:58:36 +01:00
OpenShift Merge Robot 8e06f8efbc
Merge pull request #8053 from rhatdan/detachkeys
podman create doesn't support creating detached containers
2020-10-22 16:29:28 -04:00
OpenShift Merge Robot 2ca4af6c40
Merge pull request #8110 from lsm5/cap-net-raw
replace net_raw with setuid
2020-10-22 16:22:38 -04:00
Lokesh Mandvekar 914bbf5e49 replace net_raw with setuid
podman does not allow setting CAP_NET_RAW

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2020-10-22 12:18:04 -04:00
OpenShift Merge Robot d340f8523c
Merge pull request #8101 from mheon/net_none_hostname
Add hostname to /etc/hosts for --net=none
2020-10-22 11:25:27 -04:00
OpenShift Merge Robot 513c2610f3
Merge pull request #7956 from QiWang19/save-rm-sig
Allow save image remove-signatures
2020-10-22 11:00:09 -04:00
Daniel J Walsh 15345ce4c3
podman create doesn't support creating detached containers
Detached containers and detach keys are only created with the podman run, i
exec, and start commands.  We do not store the detach key sequence or the
detach flags in the database, nor does Docker. The current code was ignoreing
these fields but documenting that they can be used.

Fix podman create man page and --help output to no longer indicate that
--detach and --detach-keys works.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-21 21:00:50 -04:00
Matthew Heon 0864d82cb5 Add hostname to /etc/hosts for --net=none
This does not match Docker, which does not add hostname in this
case, but it seems harmless enough.

Fixes #8095

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-10-21 13:45:41 -04:00
Matthew Heon cddfe3983b Add a Degraded state to pods
Make a distinction between pods that are completely running (all
containers running) and those that have some containers going,
but not all, by introducing an intermediate state between Stopped
and Running called Degraded. A Degraded pod has at least one, but
not all, containers running; a Running pod has all containers
running.

First step to a solution for #7213.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-10-21 13:31:40 -04:00
OpenShift Merge Robot 9060af9719
Merge pull request #8093 from rhatdan/wait
Fix handling and documentation of podman wait --interval
2020-10-21 11:30:44 -04:00
Qi Wang b898f914a3 save image remove signatures
remove signatures to podman save since the image formats do not support signatures
Close: #7659

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-10-21 10:00:08 -04:00
OpenShift Merge Robot b4a10538e1
Merge pull request #7948 from saschagrunert/ps-fix
Fix ps port output
2020-10-21 08:42:41 -04:00
OpenShift Merge Robot 9d9c58ba64
Merge pull request #8065 from edsantiago/flake_tweaks
Tests: Fix common flakes, and improve apiv2 test log
2020-10-21 07:21:49 -04:00
Daniel J Walsh 3f265e91f4
Fix handling and documentation of podman wait --interval
In older versions of podman, we supported decimal numbers defaulting
to microseconds.  This PR fixes to allow users to continue to specify
only digits.

Also cleaned up documentation to fully describe what input for --interval flag.

Finally improved testing on podman wait to actually make sure the command succeeded.
Fixed tests to work on podman-remote.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-21 06:25:36 -04:00
OpenShift Merge Robot 94873a237a
Merge pull request #8075 from mheon/fix_8073
Retrieve network inspect info from dependency container
2020-10-20 17:07:11 -04:00
OpenShift Merge Robot 4822cc8cab
Merge pull request #8042 from rhatdan/tlsverify
--tls-verify and --authfile should work for all remote commands
2020-10-20 15:34:56 -04:00
OpenShift Merge Robot 6961b9475d
Merge pull request #8067 from mheon/net_host_hosts
Ensure that hostname is added to hosts with net=host
2020-10-20 15:18:53 -04:00
Ed Santiago f5b3dc976c Tests: Fix common flakes, and improve apiv2 test log
- apiv2 - the 'ten /info requests' test is flaking often,
  taking ~8 seconds (our limit is 7, up from 5 a few weeks
  ago). Brent suggested that the first /info call might be
  expensive, because it needs to access storage. So, let's
  prime it by running one /info outside the timing loop.
  And, because even that continues to fail, bump it up
  to 10 seconds and file #8076 to track the slowdown.

- toolbox test - WaitForReady() has timed out, even on one
  occasion causing a run failure because it failed 3 times.
  Solution: bump up timeout from 2s to 5s. Not really great,
  but CI systems are underpowered, and it's not unreasonable
  that 2s might be too low.

- sdnotify test - add a 'podman wait' between stop & rm.
  This may prevent a "cannot rm container as it is running"
  race condition.

While working on this, Brent and I noticed a few ways that
test-apiv2 logging can be improved:

- test name: when request is POST, display the jsonified
  parameters, not the original input ones. This should
  make it much easier to reproduce failures.

- use curl's "--write-out" option to capture http code,
  content type, and request time. We were getting the
  first two via grep from logged headers; this is cleaner.
  And there was no other way to get timing. We now include
  the timing as X-Response-Time in the log file.

- abort on *any* curl error, not just 7 (cannot connect).
  Any error at all from curl is bad news.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-10-20 11:32:49 -06:00
Matthew Heon c1b844ecc8 Retrieve network inspect info from dependency container
When a container either joins a pod that shares the network
namespace or uses `--net=container:` to share the network
namespace of another container, it does not have its own copy of
the CNI results used to generate `podman inspect` output. As
such, to inspect these containers, we should be going to the
container we share the namespace with for network info.

Fixes #8073

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-10-20 13:27:33 -04:00
Sascha Grunert f63bbca4da
Fix ps port output
When defining multiple ports (same src/dst) like `-p 80:80 -p 443:443`
then podman will not show the complete output on `podman ps` (only
`0.0.0.0:80->80/tcp` in the example). This also applies to port ranges.

This patch refactors the port loop by pre-checking for ranges and
displaying them correctly to the end user.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-10-20 17:00:23 +02:00
Matthew Heon 1b288a35ba Ensure that hostname is added to hosts with net=host
When a container uses --net=host the default hostname is set to
the host's hostname. However, we were not creating any entries
in `/etc/hosts` despite having a hostname, which is incorrect.
This hostname, for Docker compat, will always be the hostname of
the host system, not the container, and will be assigned to IP
127.0.1.1 (not the standard localhost address).

Also, when `--hostname` and `--net=host` are both passed, still
use the hostname from `--hostname`, not the host's hostname (we
still use the host's hostname by default in this case if the
`--hostname` flag is not passed).

Fixes #8054

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-10-20 10:31:15 -04:00
Matthew Heon 1b4933376f Add a system test to verify --runtime is preserved
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-10-20 09:24:32 -04:00
Jordan Christiansen 8cbf7700a5 Make invalid image name error more specific
Previously, using an invalid image name would produce an error like
this:

    Error: error encountered while bringing up pod test-pod-0: invalid reference format

This message didn't specify that there was an problem with an image
name, and it didn't specify which image name had a problem if there were
multiple. Now the error reads:

    Error: error encountered while bringing up pod test-pod-0: Failed to parse image "./myimage": invalid reference format

Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-10-19 10:06:17 -05:00
Daniel J Walsh 3d2ad0f97a
--tls-verify and --authfile should work for all remote commands
These options are now fully supported in the remote API and should no
longer be hidden and/or documented as non supported.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-19 05:55:11 -04:00
OpenShift Merge Robot 9d5f28ba9e
Merge pull request #8039 from zhangguanzhang/runlabel-panic
Fix panic when runlabel is missing
2020-10-16 16:10:02 -04:00
zhangguanzhang 97fec29212 Fix panic when runlabel is missing
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2020-10-16 11:09:21 +08:00
Paul Holzinger a261819183 Fix podman image trust show --raw output
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-10-15 19:04:57 +02:00
OpenShift Merge Robot 41eda417fe
Merge pull request #8013 from rhatdan/homedir
Setup HOME environment when using --userns=keep-id
2020-10-15 05:09:40 -04:00
Daniel J Walsh 6ca8067956
Setup HOME environment when using --userns=keep-id
Currently the HOME environment is set to /root if
the user does not override it.

Also walk the parent directories of users homedir
to see if it is volume mounted into the container,
if yes, then set it correctly.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-14 16:45:24 -04:00
Jhon Honce eb4a746efc Restore --format table support
* system df
* events
  * fix error handling from go routine
  * update tests to use gomega matchers for better error messages
* system info
* version
* volume inspect

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-10-13 17:28:45 -07:00
OpenShift Merge Robot 609f230ad7
Merge pull request #7853 from xordspar0/play-kube-limits-#7742
Add support for resource limits to play kube
2020-10-12 12:47:24 -04:00
OpenShift Merge Robot ce7478b15c
Merge pull request #7588 from HarryMichal/add-toolbox-e2e-tests
tests/e2e: Add Toolbox-specific test cases
2020-10-12 11:31:59 -04:00
OpenShift Merge Robot e8f48a11b6
Merge pull request #7983 from mheon/inspect_network_not_running
Include CNI networks in inspect output when not running
2020-10-12 11:08:22 -04:00
Jordan Christiansen a413d4d77f Add support for resource limits to play kube
Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-10-12 08:38:37 -05:00
OpenShift Merge Robot 212011f166
Merge pull request #7836 from QiWang19/search-tags
Search repository tags using --list-tags
2020-10-12 07:01:10 -04:00
Matthew Heon 77033c4aed Include CNI networks in inspect output when not running
We were only including the CNI Network fields in the output of
`podman inspect` when the container was not running. It's simple
enough to fix (populate with empty structs, since we can't fill
anything without a CNI response to get IP address assigned, etc).

This is necessary for Docker compatibility.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-10-09 20:20:19 -04:00
OpenShift Merge Robot ffabd57d6d
Merge pull request #7975 from jwhonce/jira/run-898-4
Restore --format table...
2020-10-09 13:20:39 -04:00
Qi Wang 66798e993a Search repository tags using --list-tags
For fix of BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1684263
Add --list-tags to podman search to return a table the repository tags.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-10-09 11:49:46 -04:00
OpenShift Merge Robot 7348836958
Merge pull request #7973 from jwhonce/jira/run-898-3
Port V1 --format table to V2 podman
2020-10-09 10:58:48 -04:00
OpenShift Merge Robot fa01b838a6
Merge pull request #7891 from rhatdan/rm
This PR allows users to remove external containers directly
2020-10-09 10:55:15 -04:00
Ondřej Míchal a1e1a3af71 tests/e2e: Add Toolbox-specific test cases
In the past, Toolbox[0] has been affected by several of Podman's
bugs/changes of behaviour. This is one of the steps to assure that as
Podman progresses, Podman itself and subsequently Toolbox do not regress.
One of the other steps is including Toolbox's system tests in Podman's
gating systems (which and to what extent is yet to be decided on).

The tests are trying to stress parts of Podman that Toolbox needs for
its functionality: permission to handle some system files, correct
values/permissions/limits in certain parts, management of users and
groups, mounting of paths,.. The list is most likely longer and
therefore more commits will be needed to control every aspect of the
Toolbox/Podman relationship :).

Some test cases in test/e2e/toolbox_test.go rely on some tools being
present in the base image[1]. That is not the case with the common
ALPINE image or the basic Fedora image.

Some tests might be duplicates of already existing tests. I'm more in
favour of having those duplicates. Thanks to that it will be clear what
functionality/behaviour Toolbox requires.

[0] https://github.com/containers/toolbox
[1] https://github.com/containers/toolbox/#image-requirements

Signed-off-by: Ondřej Míchal <harrymichal@seznam.cz>
2020-10-09 16:32:47 +02:00
OpenShift Merge Robot 2694fb85f4
Merge pull request #7974 from andylibrian/kube-generate-support-resource-limits-7855
Add support for resource cpu limit to generate kube
2020-10-09 06:10:45 -04:00
Daniel J Walsh fea78d5530
This PR allows users to remove external containers directly
Currenly if a user specifies the name or ID of an external storage
container, we report an error to them.

buildah from scratch
working-container-2
podman rm working-container-2
Error: no container with name or ID working-container-2 found: no such container

Since the user specified the correct name and the container is in storage we
force them to specify --storage to remove it. This is a bad experience for the
user.

This change will just remove the container from storage.  If the container
is known by libpod, it will remove the container from libpod as well.

The podman rm --storage option has been deprecated, and removed from docs.

Also cleaned documented options that are not available to podman-remote.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-09 06:06:08 -04:00
OpenShift Merge Robot 953e16f31a
Merge pull request #7910 from EduardoVega/7567-podman-configmaps
Enable k8s configmaps as flags for play kube
2020-10-09 06:01:50 -04:00
Jhon Honce f128bff232 Restore --format table...
Following commands:
* systemd generate
* networks inspect
* pod stats
  * Fixed test where format was quoted and then quoted again
  * Fixed bug where output never printed '--' on missed reads
* pod ps

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-10-08 18:19:37 -07:00
Andy Librian 34a33d614e
Add support for resource cpu limit to generate kube
fixes #7855

Signed-off-by: Andy Librian <andylibrian@gmail.com>
2020-10-09 05:54:16 +07:00
Jhon Honce e9b667bb5f Port V1 --format table to V2 podman
* volume ls
* container ps
* updated broken tests when skip removed

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-10-08 14:55:58 -07:00
OpenShift Merge Robot 0afbe2d152
Merge pull request #7951 from mheon/fix_7947
Ports given only by number should have random host port
2020-10-08 14:17:26 -04:00
Matthew Heon b754ba9753 Ports given only by number should have random host port
In Podman 1.9.3, `podman run -p 80` would assign port 80 in the
container to a random port on the host. In Podman 2.0 and up, it
assigned Port 80 in the container to Port 80 on the host. This is
an easy fix, fortunately - just need to remove the bit that
assumed host port, if not given, should be set to container port.

We also had a test for the bad behavior, so fix it to test for
the correct way of doing things.

Fixes #7947

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-10-08 09:16:10 -04:00
OpenShift Merge Robot 59b5f0ac32
Merge pull request #7932 from jwhonce/jira/run-898
Restore V1 --format "table..." support
2020-10-07 16:11:07 -04:00
OpenShift Merge Robot 0e1d01103e
Merge pull request #7382 from mheon/pod_parallel
Move pod jobs to parallel execution
2020-10-07 15:06:02 -04:00
OpenShift Merge Robot 9ae873e60e
Merge pull request #7943 from baude/issue7807
prevent unpredictable results with network create|remove
2020-10-07 13:56:56 -04:00
Jhon Honce b490905f26 Port commands to V2 --format 'table...'
* 'containers mount'
 * 'image history'
 * 'images mount'
 * 'images search'
 * Correct spelling errors

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-10-07 10:40:30 -07:00
OpenShift Merge Robot 173e3c2faa
Merge pull request #7937 from rhatdan/size
Populate /etc/hosts file when run in a user namespace
2020-10-07 13:29:04 -04:00
baude fe3faa517e prevent unpredictable results with network create|remove
due to a lack of "locking" on cni operations, we could get ourselves in trouble when doing rapid creation or removal of networks.  added a simple file lock to deal with the collision and because it is not considered a performent path, use of the file lock should be ok.  if proven otherwise in the future, some generic shared memory lock should be implemented for libpod and also used here.

moved pkog/network to libpod/network because libpod is now being pulled into the package and it has therefore lost its generic nature. this will make it easier to absorb into libpod as we try to make the network closer to core operations.

Fixes: #7807

Signed-off-by: baude <bbaude@redhat.com>
2020-10-07 10:03:21 -05:00
Eduardo Vega 39dde9bcb7 Enable k8s configmaps as flags for play kube
Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
2020-10-07 08:54:24 -06:00
Daniel J Walsh ccc5bc167f
Attempt to turn on some more remote tests
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-07 10:19:08 -04:00
Matthew Heon 55f5e4af11 Use WaitWithDefaultTimeout in cleanup
Ensure that we actually print the output of all commands when
cleaning up the results of the E2E tests.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-10-07 10:00:11 -04:00
Daniel J Walsh 3ae47f7d2b
Populate /etc/hosts file when run in a user namespace
We do not populate the hostname field with the IP Address
when running within a user namespace.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-07 08:39:44 -04:00
Daniel J Walsh 348f2df0c0
Support max_size logoptions
Docker supports log-opt max_size and so does conmon (ALthough poorly).
Adding support for this allows users to at least make sure their containers
logs do not become a DOS vector.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-05 17:51:45 -04:00
OpenShift Merge Robot 436dda2385
Merge pull request #7913 from andylibrian/kube-generate-support-resource-limits-7855
Add support for resource memory limit to generate kube
2020-10-05 12:15:04 +02:00
OpenShift Merge Robot a9d572f40f
Merge pull request #7909 from zhangguanzhang/remote-ps-ns-broken
Fix podman-remote ps --ns broken
2020-10-05 12:11:41 +02:00
Andy Librian d6258eb6c2
Add support for resource memory limit to generate kube
addresses #7855

Signed-off-by: Andy Librian <andylibrian@gmail.com>
2020-10-04 21:17:00 +07:00
zhangguanzhang 4a2c4c3989 Fix podman-remote ps --ns broken
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2020-10-04 19:48:13 +08:00
Daniel J Walsh d0f3c17912
Add SELinux support for pods
All containers within a Pod need to run with the same SELinux
label, unless overwritten by the user.

Also added a bunch of SELinux tests to make sure selinux labels
are correct on namespaces.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-02 15:14:18 -04:00
OpenShift Merge Robot f1cdead33d
Merge pull request #7199 from jwhonce/jira/run-898
Restore "table" --format from V1
2020-10-02 14:49:02 -04:00
OpenShift Merge Robot 819a4e0288
Merge pull request #7895 from zhangguanzhang/run-ctr-restartPolicy-with-rm
[podman run] --rm option shold conflicts with --restart
2020-10-02 14:28:25 -04:00
OpenShift Merge Robot 1132bcfeb5
Merge pull request #7893 from ashley-cui/journald
Fix Podman logs reading journald
2020-10-02 14:24:53 -04:00
Ashley Cui c0d1954663 Fix Podman logs reading journald
A podman could not read logs written to journald properly, due to a tail config bug.
Added a system test to check this - since e2e tests don't like journald

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-10-02 10:05:19 -04:00
Jhon Honce c0757374bf Restore "table" --format from V1
* --format "table {{.field..." will print fields out in a table with
  headings.  Table keyword is removed, spaces between fields are
  converted to tabs
* Update parse.MatchesJSONFormat()'s regex to be more inclusive
* Add report.Headers(), obtain all the field names to be used as
  column headers, a map of field name to column headers may be provided
  to override the field names
* Update several commands to use new functions

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-10-02 06:58:02 -07:00
zhangguanzhang 1492f3c936 --rm option shold conflicts with --restart
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2020-10-02 21:57:37 +08:00
OpenShift Merge Robot 6a2c7d8831
Merge pull request #7849 from baude/f33tests
misc fixes for f33 integration tests
2020-10-01 16:35:29 -04:00
OpenShift Merge Robot 5d22eb02f9
Merge pull request #7735 from QiWang19/manifest-inspect
fix allowing inspect manifest of non-local image
2020-10-01 13:32:02 -04:00
OpenShift Merge Robot 11dfe9385c
Merge pull request #7835 from Luap99/network-test-cleanup
Fix some flakes in the e2e network tests.
2020-10-01 12:43:52 -04:00
OpenShift Merge Robot a29ef605f9
Merge pull request #7846 from rhatdan/rootless
Attempt to test all Broken SkipIfRootless FIXME
2020-10-01 12:08:14 -04:00
Paul Holzinger 45b73c1ed7 Fix some flakes in the e2e network tests.
The network test created config files with random filenames
but the network name was static. Since the tests can run in
parallel podman was not able to distinguish the networks.
We need to make sure that each test has its own config file
and network name. This helps to prevent unnecessary flakes.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-10-01 15:56:59 +02:00
OpenShift Merge Robot 556117c2e9
Merge pull request #7848 from cevich/fix_tests
Fix two e2e tests
2020-10-01 06:05:00 -04:00
OpenShift Merge Robot c70f5fb19b
Merge pull request #7823 from vrothberg/fix-6381
image look up: consult registries.conf
2020-10-01 03:31:06 -04:00
baude df532ee8c1 misc fixes for f33 integration tests
some small fixes for testing on fedora 33 (non-btrfs)

Signed-off-by: baude <bbaude@redhat.com>
2020-09-30 14:15:59 -05:00
OpenShift Merge Robot 1d7cb7f477
Merge pull request #7798 from QiWang19/run-manifest
Use local image if input image is a manifest list
2020-09-30 18:38:07 +00:00
Qi Wang 7ac8000cc1 fix allowing inspect manifest of non-local image
Add support of `podman manifest inspect` returning manifest list of non-local manifest.
Close #https://github.com/containers/podman/issues/7726

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-09-30 14:12:32 -04:00
Chris Evich d4ca13f7c0
Distinguish userns vs containerized tests
The systemd test was inaccurately being skipped when a userns env. var.
flag was set.  At best this is confusing to new developers, and at worse
it actively blocks an otherwise legitimate class of tests.  Improve the
accuracy of skip-logic by adding/using a purpose built set of
functions.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-09-30 13:33:57 -04:00
OpenShift Merge Robot f86e01ab10
Merge pull request #7820 from giuseppe/fix-capabilities-not-root
capabilities: always set ambient and inheritable
2020-09-30 17:22:54 +00:00
OpenShift Merge Robot e2050d7c35
Merge pull request #7847 from rhatdan/network
Make the e2e test network cleanup more robust.
2020-09-30 16:07:26 +00:00
Qi Wang d24ec64887 Use local image if input image is a manifest list
If run&create image returns error: image contains manifest list, not a runnable image, find the local image that has digest matching the digest from the list and use the image from local storage for the command.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-09-30 10:38:02 -04:00
Valentin Rothberg 8ff35a098c image look up: consult registries.conf
When looking up local images, take the unqualified-serach registries of
the registries.conf into account (on top of "localhost/").

Also extend the integration tests to prevent future regressions.

Fixes: #6381
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-30 16:30:41 +02:00
Daniel J Walsh bad761e7c7
Attempt to test all Broken SkipIfRootless FIXME
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-30 10:01:57 -04:00
Daniel J Walsh 5766f5b587
Make the e2e test network cleanup more robust.
We need to handle removal of non existing network.

This allows the `removeCNINetwork` function
always to be called. This is needed by tests which are trying
to remove the network manually in order to prevent flakes.

Fixes #7809

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-30 09:50:59 -04:00
Chris Evich f32fa3dd59
Fix ubuntu exec_test
Test passes on Fedora because the registry server is one of the
defaults.  However it is not typically configured on Ubuntu hosts, and
therefor this test can fail.  While specifying the FQIN in the
dockerfile text is not an ideal solution, it cannot negatively
affect other tests which utilize `podmanTest.BuildImage`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-09-30 09:24:01 -04:00
Giuseppe Scrivano 703381b4a2
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>
2020-09-30 15:14:07 +02:00
OpenShift Merge Robot 4d57313449
Merge pull request #7840 from vrothberg/remote-untag
fix remote untag
2020-09-30 12:58:08 +00:00
OpenShift Merge Robot 08d036cbd4
Merge pull request #7825 from rhatdan/exitcode
Fix handling of remove of bogus volumes, networks and Pods
2020-09-30 11:33:19 +00:00
Valentin Rothberg 1a3e409412 fix remote untag
Fix the remote client to untag all tags of the specified image.
Instead of querying the image on the client side, support the
case where both, repo and tag, are empty and remove all tags.

Reuse the ABI implementation where possible.  In retrospective,
the libpod untag endpoint should support a slice of strings to
batch remove tags rather than reaching out for each tag individually.

Enable the skipped test.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-30 11:57:31 +02:00
Daniel J Walsh b496802413
Make all Skips specify a reason
Always use CGROUPV2 rather then reading from system all the time.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-29 16:01:26 -04:00
Daniel J Walsh 22474095ab
Fix handling of remove of bogus volumes, networks and Pods
In podman containers rm and podman images rm, the commands
exit with error code 1 if the object does not exists.

This PR implements similar functionality to volumes, networks, and Pods.

Similarly if volumes or Networks are in use by other containers, and return
exit code 2.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-29 15:52:43 -04:00
OpenShift Merge Robot 63f0bb93f8
Merge pull request #7783 from ashley-cui/slirp
Add support for slirp network for pods
2020-09-29 15:34:37 +00:00
Daniel J Walsh 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
OpenShift Merge Robot b0e70a6411
Merge pull request #7786 from rhatdan/rootless
Remove SkipIfRootless if possible, document other calls
2020-09-28 14:43:46 +00:00
OpenShift Merge Robot d2802636b0
Merge pull request #7770 from rhatdan/pullpolicy
Properly handle podman run --pull command
2020-09-28 14:36:43 +00:00
Paul Holzinger 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
Paul Holzinger 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
Daniel J Walsh 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
Daniel J Walsh 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
Ashley Cui b6176d8987 Add support for slirp network for pods
flag --network=slirp4netns[options] for root and rootless pods

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-09-25 21:34:23 -04:00
Daniel J Walsh 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
OpenShift Merge Robot 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
OpenShift Merge Robot 3957058f29
Merge pull request #7753 from vrothberg/fix-7689
remote stats
2020-09-24 15:32:36 +00:00
Valentin Rothberg 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
Valentin Rothberg 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
OpenShift Merge Robot c256944d00
Merge pull request #7759 from xordspar0/app-filter
Allow filtering on pod label values
2020-09-24 00:11:45 +00:00
Jordan Christiansen 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
Daniel J Walsh 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
OpenShift Merge Robot 81c543bbe3
Merge pull request #7745 from rhatdan/systemd
Systemd should be able to run as rootless
2020-09-23 17:52:14 +00:00
Ed Santiago 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
Daniel J Walsh 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
Daniel J Walsh 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
OpenShift Merge Robot 6900b5a2be
Merge pull request #7717 from rhatdan/attach
Fix up attach tests for podman remote
2020-09-22 13:06:53 +00:00
Daniel J Walsh 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
Daniel J Walsh 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
OpenShift Merge Robot e9ddfa0518
Merge pull request #7697 from rhatdan/ignore
Fix handling of podman-remote stop --ignore
2020-09-21 10:12:01 -04:00
OpenShift Merge Robot 0a46b9c9e6
Merge pull request #7696 from jwhonce/wip/version
Refactor version handling in cmd tree
2020-09-21 13:23:20 +00:00
Paul Holzinger 44d7270a34 Fix incorrect parsing of create/run --volumes-from
Add a bunch of tests to ensure that --volumes-from
works as expected.

Also align the podman create and run man page.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-09-20 22:49:09 +02:00
OpenShift Merge Robot c2068f11cc
Merge pull request #7694 from mheon/fix_exec_supplemental_groups
Preserve groups in exec sessions in ctrs with --user
2020-09-19 06:32:59 -04:00
Daniel J Walsh 1b610e93d2
Fix handling of podman-remote stop --ignore
This patch simplifies the hanlding of rhe --ignore flag, for podman stop, rm

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-19 06:21:18 -04:00
Jhon Honce c4b49afad3 Refactor version handling in cmd tree
* Move from simple string to semver objects
* Change client API Version from '1' to 2.0.0

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-09-18 15:13:58 -07:00
Matthew Heon 2f605dcc1c Preserve groups in exec sessions in ctrs with --user
Podman wants to guarantee that exec sessions retain the groups of
the container they are started in, unless explicitly overridden
by the user. This guarantee was broken for containers where the
`--user` flag was specified; this patch resolves that.

Somewhere in the Exec rewrite for APIv2, I changed the location
where the container's User is passed into the exec session
(similar to groups, we also want to preserve user unless
overridden). The lower-level Exec APIs already handled setting
user and group appropriately if not specified when the exec
session was created, but I added duplicate code to handle this
higher in the stack - and that code only handled setting user,
not supplemental groups, breaking support in that specific case.

Two things conspired to make this one hard to track down: first,
things were only broken if the container explicitly set a user;
otherwise, the container user would still appear to be unset to
the lower-level code, which would properly set supplemental
groups (this tricked our existing test into passing). Also, the
`crun` OCI runtime will add the groups without prompting, which
further masked the problem there. I debated making `runc` do the
same, but in the end it's better to fix this in Podman - it's
better to be explicit about what we want done so we will work
with all OCI runtimes.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-09-18 13:54:25 -04:00
OpenShift Merge Robot 273b9545bb
Merge pull request #7679 from baude/remoteiidfile
enable --iidfile for podman-remote build
2020-09-18 06:26:18 -04:00
OpenShift Merge Robot fc131a207e
Merge pull request #7671 from zhangguanzhang/play-kube-handle-restartPolicy
handle the restartPolicy for play kube and generate kube
2020-09-18 06:19:19 -04:00
zhangguanzhang f0ccac199b handle the play kube and generate kube for with restartPolicy
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2020-09-18 13:28:22 +08:00
zhangguanzhang 5f6fff0899 fix the .Path and .Args when use the infra-command
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2020-09-18 09:57:54 +08:00
baude ec58650939 enable --iidfile for podman-remote build
for podman-remote build operations, the iidfile, when used, needs to write the file to the client's local filesystem.

Signed-off-by: baude <bbaude@redhat.com>
2020-09-17 12:55:48 -05:00
Jordan Christiansen 7837afe165 Fix play_kube_test deployment template
Annotations were at the wrong indentation, making them a part of the
labels map.

Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-09-17 10:04:56 -05:00
OpenShift Merge Robot d8414add00
Merge pull request #7654 from vrothberg/fix-7651
image list: return all associated names
2020-09-17 09:36:49 -04:00
Valentin Rothberg ecae5f7ade image list: return all associated names
Always return all associated names / repo tags of an image and fix a bug
with malformed repo tags.

Previously, Podman returned all names only with `--all` but this flag
only instructs to list intermediate images and should not alter
associated names.  With `--all` Podman queried the repo tags of an image
which splits all *tagged* names into repository and tag which is then
reassembled to eventually be parsed again in the frontend.  Lot's of
redundant CPU heat and buggy as the reassembly didn't consider digests
which ultimately broke parsing in the frontend.

Fixes: #7651
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-17 12:23:58 +02:00
Jordan Christiansen 55dfa7fad2 Add labels to a pod created via play kube
When using `podman play kube` with a YAML file that has pod labels,
apply those labels to the pods that podman makes.

For example, this Deployment spec has labels on a pod:

	apiVersion: apps/v1
	kind: Deployment
	metadata:
	  name: myapp
	  labels:
	    app: myapp
	spec:
	  selector:
	    matchLabels:
	      app: myapp
	  template:
	    metadata:
	      labels:
		app: myapp
	    spec:
	      containers:
	      - name: web
		image: nginx
		ports:
		- containerPort: 80

The pods that podman creates will have the label "app" set to "myapp" so
that these pods can be found with `podman pods ps --filter label=app`.

Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-09-16 15:46:08 -05:00
Daniel J Walsh b3d6383f25
Fix podman pod create --infra-command and --infra-image
Currently infr-command and --infra-image commands are ignored
from the user.  This PR instruments them and adds tests for
each combination.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-16 07:42:19 -04:00
Qi Wang 2fcd1d7b4d Supports import&run--signature-policy
Enables podman create, pull, run, import to use --signature-policy option. Set it as hidden flag to be consistent with other commands.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-09-15 16:09:33 -04:00
OpenShift Merge Robot 3b4ad9a81d
Merge pull request #7452 from jwhonce/issues/7136
Refactor API build endpoint to be more compliant
2020-09-15 12:17:12 +02:00
Paul Holzinger 685ef847dd podman wait accept args > 1
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-09-15 00:02:45 +02:00
Jhon Honce 146c68f3ac Refactor API build endpoint to be more compliant
* Refactor/Rename channel.WriteCloser() to encapsulate the channel
* Refactor build endpoint to "live" stream buildah output channels
  over API rather then buffering output
* Refactor bindings/tunnel build because endpoint changes
  * building tar file now in bindings rather then depending on
    caller
* Cleanup initiating extra image engine
* Remove setting fields to zero values (less noise in code)
* Update tests to support remote builds

Fixes #7136
Fixes #7137

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-09-14 13:46:59 -07:00
Daniel J Walsh 526f01cdf5
Fix up errors found by codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-11 06:14:25 -04:00
OpenShift Merge Robot d1798d0383
Merge pull request #7591 from haircommander/play-kube-process-namespace
play/generate: support shareProcessNamespace
2020-09-11 05:56:35 -04:00
OpenShift Merge Robot e59c3ce1c5
Merge pull request #7593 from edsantiago/network_test_cleanup
run_networking e2e test: add cleanup to some tests
2020-09-11 05:53:19 -04:00