summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Add support for rootless network-aliasesPaul Holzinger2021-01-27
| | | | | | | | | | Make sure we pass the network aliases as capability args to the cnitool in the rootless-cni-infra container. Also update the dnsname plugin in the cni-infra container. Fixes #8567 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Allow static ip and mac with rootless cni networkPaul Holzinger2021-01-27
| | | | | | | | Make sure we pass the ip and mac address as CNI_ARGS to the cnitool which is executed in the rootless-cni-infra container. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Merge pull request #9124 from vrothberg/fix-8358OpenShift Merge Robot2021-01-27
|\ | | | | e2e tests: synchronize test results
| * e2e tests: synchronize test resultsValentin Rothberg2021-01-27
| | | | | | | | | | | | | | | | | | Use a mutex to synchronize the slice for storing tests results. Running the e2e tests in parallel is otherwise subject to race conditions surfacing in lost entries. Fixes: #8358 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #9095 from rhatdan/psOpenShift Merge Robot2021-01-27
|\ \ | | | | | | podman-remote ps --external --pod --sort do not work.
| * | podman-remote ps --external --pod --sort do not work.Daniel J Walsh2021-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixup the bindings and the handling of the --external --por and --sort flags. The --storage option was renamed --external, make sure we use external up and down the stack. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #9025 from mheon/add_support_volumes_fieldOpenShift Merge Robot2021-01-27
|\ \ \ | | | | | | | | Ensure the Volumes field in Compat Create is honored
| * | | Ensure the Volumes field in Compat Create is honoredMatthew Heon2021-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Docker has, for unclear reasons, three separate fields in their Create Container struct in which volumes can be placed. Right now we support two of those - Binds and Mounts, which (roughly) correspond to `-v` and `--mount` respectively. Unfortunately, we did not support the third, `Volumes`, which is used for anonymous named volumes created by `-v` (e.g. `-v /test`). It seems that volumes listed here are *not* included in the remaining two from my investigation, so it should be safe to just append them into our handling of the `Binds` (`-v`) field. Fixes #8649 Signed-off-by: Matthew Heon <mheon@redhat.com>
* | | | Merge pull request #9122 from Luap99/fix-9120OpenShift Merge Robot2021-01-27
|\ \ \ \ | |_|/ / |/| | | Fix podman history --no-trunc for the CREATED BY field
| * | | Fix podman history --no-trunc for the CREATED BY fieldPaul Holzinger2021-01-27
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #9120 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | | | Add default net info in container inspectbaude2021-01-26
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when inspecting a container that is only connected to the default network, we should populate the default network in the container inspect information. Fixes: #6618 Signed-off-by: baude <bbaude@redhat.com> MH: Small fixes, added another test Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | | Merge pull request #9054 from vrothberg/fix-9040OpenShift Merge Robot2021-01-26
|\ \ \ | | | | | | | | make sure the workdir exists on container mount
| * | | workdir presence checksValentin Rothberg2021-01-26
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A container's workdir can be specified via the CLI via `--workdir` and via an image config with the CLI having precedence. Since images have a tendency to specify workdirs without necessarily shipping the paths with the root FS, make sure that Podman creates the workdir. When specified via the CLI, do not create the path, but check for its existence and return a human-friendly error. NOTE: `crun` is performing a similar check that would yield exit code 127. With this change, however, Podman performs the check and yields exit code 126. Since this is specific to `crun`, I do not consider it to be a breaking change of Podman. Fixes: #9040 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #9070 from rhatdan/searchOpenShift Merge Robot2021-01-26
|\ \ \ | | | | | | | | Fixup search
| * | | Fixup searchDaniel J Walsh2021-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | podman-remote search had some FIXMEs in tests that were failing. So I reworked the search handler to use the local abi. This means the podman search and podman-remote search will use the same functions. While doing this, I noticed we were just outputing errors via logrus.Error rather then returning them, which works ok for podman but the messages get lost on podman-remote. Changed the code to actually return the error messages to the caller. This allows us to turn on the remaining podman-remote FIXME tests. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | Merge pull request #9084 from rhatdan/overrideOpenShift Merge Robot2021-01-26
|\ \ \ \ | |_|_|/ |/| | | Fix --arch and --os flags to work correctly
| * | | Fix --arch and --os flags to work correctlyDaniel J Walsh2021-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently podman implements --override-arch and --overide-os But Podman has made these aliases for --arch and --os. No reason to have to specify --override, since it is clear what the user intends. Currently if the user specifies an --override-arch field but the image was previously pulled for a different Arch, podman run uses the different arch. This PR also fixes this issue. Fixes: https://github.com/containers/podman/issues/8001 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | Pass DefaultMountsFile to podman buildDaniel J Walsh2021-01-25
| |_|/ |/| | | | | | | | | | | | | | | | | The --default-mounts-file path was not being handled in podman build. This will enable it to use for testing. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | System tests: cover gaps from the last monthEd Santiago2021-01-25
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - stop: test --all and --ignore (#9051) - build: test /run/secrets (#8679, but see below) - sensitive mount points: deal with 'stat' failures - selinux: confirm useful diagnostics on unknown labels (#8946) The 'build' test is intended as a fix for #8679, in which 'podman build' does not mount secrets from mounts.conf. Unfortunately, as of this writing, 'podman build' does not pass the --default-mounts-file option to buildah, so there's no reasonable way to test this path. Still, we can at least confirm /run/secrets on 'podman run'. The /sys thing is related to #8949: RHEL8, rootless, cgroups v1. It's just a workaround to get gating tests to pass on RHEL. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #9057 from baude/dnsnameinternalOpenShift Merge Robot2021-01-25
|\ \ | | | | | | disable dnsname when --internal
| * | disable dnsname when --internalbaude2021-01-25
| | | | | | | | | | | | | | | | | | | | | | | | when doing a network creation, the dnsname plugin should be disabled when the --internal bool is set. a warning is displayed if this happens and docs are updated. Signed-off-by: baude <bbaude@redhat.com>
* | | Merge pull request #9066 from giuseppe/set-source-to-netOpenShift Merge Robot2021-01-24
|\ \ \ | |_|/ |/| | networking: lookup child IP in networks
| * | networking: lookup child IP in networksGiuseppe Scrivano2021-01-23
| |/ | | | | | | | | | | | | | | | | | | | | | | if a CNI network is added to the container, use the IP address in that network instead of hard-coding the slirp4netns default. commit 5e65f0ba30f3fca73f8c207825632afef08378c1 introduced this regression. Closes: https://github.com/containers/podman/issues/9065 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* / Small API test improvement for compatibility search endpointMilivoje Legenovic2021-01-23
|/ | | | Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
* Merge pull request #9028 from mlegenovic/masterOpenShift Merge Robot2021-01-23
|\ | | | | Accept and ignore 'null' as value for X-Registry-Auth
| * Accept and ignore 'null' as value for X-Registry-AuthMilivoje Legenovic2021-01-22
| | | | | | | | | | | | | | | | | | | | docker-client is a library written in Java and used in Eclipse to speak with Docker API. When endpoint /images/search is called, HTTP header attribute X-Registry-Auth has value "null". This is for sure wrong but Docker tolerates this value, and call works. With this patch call works also with Podman. #7857 Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
* | Merge pull request #9067 from Luap99/podman-manifest-existsOpenShift Merge Robot2021-01-23
|\ \ | | | | | | podman manifest exists
| * | podman manifest existsPaul Holzinger2021-01-22
| |/ | | | | | | | | | | Add podman manifest exists command with remote support. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* / Turn on some remote testDaniel J Walsh2021-01-22
|/ | | | | | | Just running through the tests that have SkipIfRemote("FIXME") and attempting to not skip. Found these tests now work. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* rootlessport: set source IP to slirp4netns deviceGiuseppe Scrivano2021-01-22
| | | | | | | | | set the source IP to the slirp4netns address instead of 127.0.0.1 when using rootlesskit. Closes: https://github.com/containers/podman/issues/5138 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Merge pull request #9027 from Luap99/podman-volume-existsOpenShift Merge Robot2021-01-21
|\ | | | | Podman volume exists
| * podman volume existsPaul Holzinger2021-01-21
| | | | | | | | | | | | Add podman volume exists command with remote support. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Use random network names in the e2e testsPaul Holzinger2021-01-21
| | | | | | | | | | | | | | | | | | Unlike the container storage all e2e test are using the same cni config directory. This causes problems if the network name already exists. Using random names will make the second run pass even if the first failed. This is only done to prevent full CI failures. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Merge pull request #9014 from rhatdan/rmOpenShift Merge Robot2021-01-20
|\ \ | | | | | | Fix handling of container remove
| * | Fix handling of container removeDaniel J Walsh2021-01-20
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found several problems with container remove podman-remote rm --all Was not handled podman-remote rm --ignore Was not handled Return better errors when attempting to remove an --external container. Currently we return the container does not exists, as opposed to container is an external container that is being used. This patch also consolidates the tunnel code to use the same code for removing the container, as the local API, removing duplication of code and potential problems. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* / Make generate systemd --new robust against double curly bracesPaul Holzinger2021-01-20
|/ | | | | | | | | | | If the container create command contains an argument with double curly braces the golang template parsing can fail since it tries to interpret the value as variable. To fix this change the default delimiter for the internal template to `{{{{`. Fixes #9034 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* podman network existsPaul Holzinger2021-01-19
| | | | | | Add podman network exists command with remote support. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Merge pull request #8942 from rhatdan/pushOpenShift Merge Robot2021-01-17
|\ | | | | Allow podman push to push manifest lists
| * Allow podman push to push manifest listsDaniel J Walsh2021-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing a podman images, manifests lists look just like images, so it is logical that users would assume that they can just podman push them to a registry. The problem is we throw out weird errors when this happens and users need to somehow figure out this is a manifest list rather then an image, and frankly the user will not understand the difference. This PR will make podman push just do the right thing, by failing over and attempting to push the manifest if it fails to push the image. Fix up handling of manifest push Protocol should bring back a digest string, which can either be printed or stored in a file. We should not reimplement the manifest push setup code in the tunnel code but take advantage of the api path, to make sure remote and local work the same way. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #8456 from kazimsarikaya/fix-send-tarOpenShift Merge Robot2021-01-15
|\ \ | | | | | | podman remote send tar
| * | podman-remote fix sending tar contentKazım SARIKAYA2021-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.) podman cannot send proper dockerfile when it is not inside root folder. 2.) support for sending symlinks and folders inside context dir 3.) when sending context dir as tar to remote, prevent sending items inside .dockerignore Signed-off-by: Kazım SARIKAYA <kazimsarikaya@sanaldiyar.com>
* | | Merge pull request #8949 from giuseppe/sysfs-for-rootlessOpenShift Merge Robot2021-01-15
|\ \ \ | | | | | | | | specgen: improve heuristic for /sys bind mount
| * | | specgen: improve heuristic for /sys bind mountGiuseppe Scrivano2021-01-15
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | partially revert 95c45773d7dbca2880152de681c81f0a2afec99b restrict the cases where /sys is bind mounted from the host. The heuristic doesn't detect all the cases where the bind mount is not necessary, but it is an improvement on the previous version where /sys was always bind mounted for rootless containers unless --net none was specified. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Merge pull request #8983 from rhatdan/testOpenShift Merge Robot2021-01-15
|\ \ \ | | | | | | | | Turn on podman pod stats test for rootless cgroup v2
| * | | Turn on podman pod stats test for rootless cgroup v2Daniel J Walsh2021-01-15
| |/ / | | | | | | | | | | | | | | | | | | These tests should only be blocked for cgroups V1 Fixes: https://github.com/containers/podman/issues/8734 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* / / Container rename bindingsPaul Holzinger2021-01-15
|/ / | | | | | | | | | | Add bindings and podman-remote support for container rename. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* | Merge pull request #8955 from mheon/renameOpenShift Merge Robot2021-01-14
|\ \ | | | | | | Container Rename
| * | Initial implementation of renaming containersMatthew Heon2021-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basic theory: We remove the container, but *only from the DB*. We leave it in c/storage, we leave the lock allocated, we leave it running (if it is). Then we create an identical container with an altered name, and add that back to the database. Theoretically we now have a renamed container. The advantage of this approach is that it doesn't just apply to rename - we can use this to make *any* configuration change to a container that does not alter its container ID. Potential problems are numerous. This process is *THOROUGHLY* non-atomic at present - if you `kill -9` Podman mid-rename things will be in a bad place, for example. Also, we can't rename containers that can't be removed normally - IE, containers with dependencies (pod infra containers, for example). The largest potential improvement will be to move the majority of the work into the DB, with a `RecreateContainer()` method - that will add atomicity, and let us remove the container without worrying about depencies and similar issues. Potential problems: long-running processes that edit the DB and may have an older version of the configuration around. Most notable example is `podman run --rm` - the removal command needed to be manually edited to avoid this one. This begins to get at the heart of me not wanting to do this in the first place... This provides CLI and API implementations for frontend, but no tunnel implementation. It will be added in a future release (just held back for time now - we need this in 3.0 and are running low on time). This is honestly kind of horrifying, but I think it will work. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | | Add tests for volume pluginsMatthew Heon2021-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | This involves a new test binary (a basic implementation of the volume plugin protocol) and a new image on quay.io (Containerfile to produce it and all sources located in this commit). The image is used to run a containerized plugin we can test against. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | | Initial implementation of volume pluginsMatthew Heon2021-01-14
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements support for mounting and unmounting volumes backed by volume plugins. Support for actually retrieving plugins requires a pull request to land in containers.conf and then that to be vendored, and as such is not yet ready. Given this, this code is only compile tested. However, the code for everything past retrieving the plugin has been written - there is support for creating, removing, mounting, and unmounting volumes, which should allow full functionality once the c/common PR is merged. A major change is the signature of the MountPoint function for volumes, which now, by necessity, returns an error. Named volumes managed by a plugin do not have a mountpoint we control; instead, it is managed entirely by the plugin. As such, we need to cache the path in the DB, and calls to retrieve it now need to access the DB (and may fail as such). Notably absent is support for SELinux relabelling and chowning these volumes. Given that we don't manage the mountpoint for these volumes, I am extremely reluctant to try and modify it - we could easily break the plugin trying to chown or relabel it. Also, we had no less than *5* separate implementations of inspecting a volume floating around in pkg/infra/abi and pkg/api/handlers/libpod. And none of them used volume.Inspect(), the only correct way of inspecting volumes. Remove them all and consolidate to using the correct way. Compat API is likely still doing things the wrong way, but that is an issue for another day. Fixes #4304 Signed-off-by: Matthew Heon <matthew.heon@pm.me>