summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Merge pull request #11763 from rhatdan/timeoutOpenShift Merge Robot2021-10-04
|\ | | | | Add --time option for podman * rm -f flag
| * Add --time out for podman * rm -f commandsDaniel J Walsh2021-10-04
| | | | | | | | | | | | | | | | | | Add --time flag to podman container rm Add --time flag to podman pod rm Add --time flag to podman volume rm Add --time flag to podman network rm Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | CNI networks: reload networks if neededPaul Holzinger2021-10-04
|/ | | | | | | | | | | | | | | | | | | | The current implementation of the CNI network interface only loads the networks on the first call and saves them in a map. This is done to safe performance and not having to reload all configs every time which will be costly for many networks. The problem with this approach is that if a network is created by another process it will not be picked up by the already running podman process. This is not a problem for the short lived podman commands but it is problematic for the podman service. To make sure we always have the actual networks store the mtime of the config directory. If it changed since the last read we have to read again. Fixes #11828 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Merge pull request #11816 from cdoern/podEventsBugOpenShift Merge Robot2021-10-02
|\ | | | | Pod Events Logging Fix
| * Pod Events Logging Fixcdoern2021-10-01
| | | | | | | | | | | | | | on create, libpod was only creating a new event if the pod had an infra container. now, pod creation triggers a new pod event with or without infra Signed-off-by: cdoern <cdoern@redhat.com>
* | Pod Volumes From Supportcdoern2021-10-01
|/ | | | | | | added support for a volumes from container. this flag just required movement of the volumes-from flag declaration out of the !IsInfra block, and minor modificaions to container_create.go Signed-off-by: cdoern <cdoern@redhat.com>
* Merge pull request #11707 from rhatdan/playOpenShift Merge Robot2021-10-01
|\ | | | | Add podman play kube --no-hosts options
| * Add podman play kube --no-hosts optionsDaniel J Walsh2021-10-01
| | | | | | | | | | | | | | | | | | This option will setup the containers to not modify their /etc/hosts file and just use the one from the image. Fixes: https://github.com/containers/podman/issues/9500 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #11686 from cdoern/podDeviceOptionsOpenShift Merge Robot2021-10-01
|\ \ | |/ |/| Pod Device-Read-BPS support
| * Pod Device-Read-BPS supportcdoern2021-09-28
| | | | | | | | | | | | | | | | | | added the option for the user to specify a rate, in bytes, at which they would like to be able to read from the device being added to the pod. This is the first in a line of pod device options. WARNING: changed pod name json tag to pod_name to avoid confusion when marshaling with the containerspec's name Signed-off-by: cdoern <cdoern@redhat.com>
* | Gating tests: fix permissions errorEd Santiago2021-10-01
| | | | | | | | | | | | | | | | ...in volume test. Looks like Bodhi gating tests run from a nonwritable directory. I feel really stupid for not realizing this when I first tried to fix this bug two weeks ago. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #11776 from edsantiago/bats_is_cleanupOpenShift Merge Robot2021-10-01
|\ \ | | | | | | System tests: tighten 'is' operator
| * | System tests: tighten 'is' operatorEd Santiago2021-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix day-one sloppiness: when I first wrote this framework it compared strings using 'expr', not '=', to be more forgiving of extra cruft in output. This was a bad decision. It means that warnings or additional text are ignored: is "all is ok, NOT!" "all is ok" <-- this would pass Solution: tighten up the 'is' check. Use '=' (direct compare) first. If it fails, look for wild cards ('*') or character classes ('[') in the expect string. If so, and only then, use 'expr'. And, thanks to a clever suggestion from Luap99, include '(using expr)' in the error message when we do so; this could make it easier for a developer to understand a string mismatch. This change exposes a lot of instances in which we weren't doing proper comparisons. Fix those. Thankfully, there weren't as many as I'd feared. Also, and completely unrelated, add '-T' flag to bats helper, for showing timing results. (I will open this as a separate PR if requested. I too find it offensive to jumble together unrelated commits.) Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | sdnotify test: accept MAINPID anywhereEd Santiago2021-09-30
|/ / | | | | | | | | | | | | | | | | | | systemd sometimes spits out lines in the wrong order. Deal with it. This fixes an infrequent flake that I haven't filed because I didn't understand it well enough. (Hence, this reduces BUGS but does not reduce BUG COUNT. Sorry!) Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #11806 from giuseppe/play-kube-fix-cpu-limitsOpenShift Merge Robot2021-09-30
|\ \ | | | | | | kube: fix conversion from milliCPU to period/quota
| * | kube: fix conversion from milliCPU to period/quotaGiuseppe Scrivano2021-09-30
| | | | | | | | | | | | | | | | | | Closes: https://github.com/containers/podman/issues/11803 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Support selinux options with bind mounts play/genBrent Baude2021-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using play kube and generate kube, we need to support if bind mounts have selinux options. As kubernetes does not support selinux in this way, we tuck the selinux values into a pod annotation for generation of the kube yaml. Then on play, we check annotations to see if a value for the mount exists and apply it. Fixes BZ #1984081 Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #11798 from ↵OpenShift Merge Robot2021-09-30
|\ \ \ | |/ / |/| | | | | | | | giuseppe/skip-pid-shared-ns-on-rootless-cgroups-v1 test: skip test on rootless cgroupsv1
| * | test: use new helperGiuseppe Scrivano2021-09-30
| | | | | | | | | | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
| * | test: skip test on rootless cgroupsv1Giuseppe Scrivano2021-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | skip the test "podman selinux: shared context in (some) namespaces" on cgroupsv1 when running as rootless since the tests requires --pid=container:. If the container runtime cannot use cgroupsv1 and the container has no pid namespace. then it is not possible to correctly terminate the container. Without a cgroup or a pid namespace, the runtime has no control on what processes are in the container. Closes: https://github.com/containers/podman/issues/11785 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Ensure pod ID bucket is properly updated on renameMatthew Heon2021-09-28
|/ / | | | | | | | | | | | | | | | | | | | | | | | | As we were not updating the pod ID bucket, removing a pod with containers still in it (including the infra container, which will always suffer from this) will not properly update the name registry to remove the name of any renamed containers. This patch ensures that does not happen - all containers will be fully removed, even if renamed. Fixes #11750 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | Merge pull request #11751 from Luap99/net-aliasOpenShift Merge Robot2021-09-28
|\ \ | | | | | | always add short container id as net alias
| * | always add short container id as net aliasPaul Holzinger2021-09-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This matches what docker does. Also make sure the net aliases are also shown when the container is stopped. docker-compose uses this special alias entry to check if it is already correctly connected to the network. [1] Because we do not support static ips on network connect at the moment calling disconnect && connect will loose the static ip. Fixes #11748 [1] https://github.com/docker/compose/blob/0bea52b18dda3de8c28fcfb0c80cc08b8950645e/compose/service.py#L663-L667 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #11762 from edsantiago/batsOpenShift Merge Robot2021-09-28
|\ \ \ | | | | | | | | System tests: speed up. They've gotten too slow.
| * | | System tests: speed up. They've gotten too slow.Ed Santiago2021-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - logs: remove unnecessary sleeps. This saves ~25s. Unfortunately, journald seems to have some sort of lag, so we need to keep retrying until we get the 'after' string. - ps: add placeholder test for once buildah 3544 is fixed - cp: bulk-kill containers when finished, instead of one by one. This is a big change and only saves about 8s per run, but hey. - mount,pause,healthcheck: 'podman stop -t 0' before rm'ing containers. Easy 50s. Have I mentioned, lately, that 'podman rm -f' needs a '-t 0' flag? - play: same, and also 'podman pod stop'. Seems to shave ~20s. - socket-activation: UGH! Buggy and useless tests! They were running "sleep 90" containers for no reason whatsoever. I assume the intention was to run them with "-d", so that's what I've done here. Also fixed some language. 180 seconds! (Unrelated: cleanup in 070-build, use $IMAGE, not alpine) Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | image prune: support removing external containersValentin Rothberg2021-09-28
|/ / / | | | | | | | | | | | | | | | | | | | | | Support removing external containers (e.g., build containers) during image prune. Fixes: #11472 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #11756 from Luap99/network-pruneOpenShift Merge Robot2021-09-27
|\ \ \ | | | | | | | | CNI: network remove do not error for ENOENT
| * | | fix podman network prune integration test flakesPaul Holzinger2021-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The podman integration tests run in parallel. Because all tests use the same CNI config dir the podman network prune test will remove networks which are used by other tests at the moment and thus creating unexpected flakes. The solution use an extra cni config dir for the network prune test. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | | Merge pull request #11754 from flouthoc/podman-stop-report-non-runningOpenShift Merge Robot2021-09-27
|\ \ \ \ | | | | | | | | | | stop: Do nothing if container was never created in runtime or in a invalid state.
| * | | | stop: Do nothing if container was never created in runtimeAditya Rajan2021-09-27
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following commit ensures we silently return container id on `stop` if container was never created in OCI runtime. Following behaviour ensures that we are in parity with docker. Signed-off-by: Aditya Rajan <arajan@redhat.com>
* | | | Merge pull request #11755 from nalind/remote-build-eval-contextdirOpenShift Merge Robot2021-09-27
|\ \ \ \ | |_|/ / |/| | | remote build: EvalSymlinks() the context directory
| * | | remote build: EvalSymlinks() the context directoryNalin Dahyabhai2021-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use EvalSymlinks() to find the context directory, in case there's shenanigans. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
* | | | Vendor in containers/common v0.46.0Daniel J Walsh2021-09-27
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: https://github.com/containers/podman/issues/11745 [NO TESTS NEEDED] Since this is just a revendor and a one line change for the revendor Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | added healthcheck to ps commandSankalp Rangare2021-09-24
|/ / | | | | | | Signed-off-by: Sankalp Rangare <sankalprangare786@gmail.com>
* | Merge pull request #11675 from baude/playkubebuildcontextdirOpenShift Merge Robot2021-09-23
|\ \ | | | | | | Set context dir for play kube build
| * | Set context dir for play kube buildBrent Baude2021-09-23
| | | | | | | | | | | | | | | | | | | | | | | | When performing an image build with play kube, we need to set the context directory so things like file copies have the correct input path. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #11654 from Luap99/health-dockerOpenShift Merge Robot2021-09-23
|\ \ \ | | | | | | | | podman inspect add State.Health field for docker compat
| * | | podman inspect add State.Health field for docker compatPaul Holzinger2021-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | podman inspect shows the healthcheck status in `.State.Healthcheck`, docker uses `.State.Health`. To make sure docker scripts work we should add the `Health` key. Because we do not want to display both keys by default we only use the new `Health` key. This is a breaking change for podman users but matches what docker does. To provide some form of compatibility users can still use `--format {{.State.Healthcheck}}`. IT is just not shown by default. Fixes #11645 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | | shell completion: do not show images without tagPaul Holzinger2021-09-23
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shell completion should only suggest arguments that work. Using a image without tag does not work in many cases. Having both the version with and without tag also forces users to press one key more because tab completion will always stop at the colon. Fixes #11673 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #11647 from EduardoVega/11491-U-suffix-mount-optionOpenShift Merge Robot2021-09-23
|\ \ \ | | | | | | | | Add support for :U flag with --mount option
| * | | Add support for :U flag with --mount optionEduardo Vega2021-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The :U flag can be used to change the ownership of source volumes based on the UID, GID of the container. This is only supported by the --volume option, this will allow to use --mount option as well. Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
* | | | Merge pull request #11704 from rhatdan/kubeOpenShift Merge Robot2021-09-23
|\ \ \ \ | | | | | | | | | | podman generate kube should not include images command
| * | | | podman generate kube should not include images commandDaniel J Walsh2021-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the command came from the underlying image, then we should not include it in the generate yaml file. Fixes: https://github.com/containers/podman/issues/11672 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | | standardize logrus messages to upper caseDaniel J Walsh2021-09-22
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove ERROR: Error stutter from logrus messages also. [ NO TESTS NEEDED] This is just code cleanup. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | Merge pull request #11689 from Luap99/con-stateOpenShift Merge Robot2021-09-22
|\ \ \ \ | |/ / / |/| | | sync container state before reading the healthcheck
| * | | sync container state before reading the healthcheckPaul Holzinger2021-09-22
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | The health check result is stored in the container state. Since the state can change or might not even be set we have to retrive the current state before we try to read the health check result. Fixes #11687 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #11694 from edsantiago/prevent_port_collisionsOpenShift Merge Robot2021-09-22
|\ \ \ | | | | | | | | Eighty-six eighty-eighty
| * | | Eighty-six eighty-eightyEd Santiago2021-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Sorry, couldn't resist). CI flakes have been coming down - thank you to everyone who has been making them a priority. This leaves a noisy subset that I've just been ignoring for months: Running: podman ... -p 8080:something ...cannot listen on the TCP port: listen tcp4 :8080: bind: address already in use Sometimes these are one-time errors resolved on 2nd try; sometimes they fail three times, forcing CI user to hit Rerun. In all cases they make noise in my flake logs, which costs me time. My assumption is that this has to do with ginkgo running random tests in parallel. Since many e2e tests simplemindedly use 8080, collisions are inevitable. Solution: simplemindedly replace 8080 with other (also arbitrarily picked) numbers. This is imperfect -- it requires human developers to pick a number NNNN and 'grep NNNN test/e2e/*' before adding new tests, which I am 100% confident ain't gonna happen -- but it's better than what we have now. Side note: I considered writing and using a RandomAvailablePort() helper, but that would still be racy. Plus, it would be a pain to interpolate strings into so many places. Finally, with this hand-tooled approach, if/when we _do_ get conflicts on port NNNN, it should be very easy to grep for NNNN, find the offending tests that reuse that port, and fix one of them. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | Merge pull request #11678 from vrothberg/fix-11613OpenShift Merge Robot2021-09-22
|\ \ \ \ | |/ / / |/| | | podman save: add `--uncompressed`
| * | | podman save: add `--uncompressed`Valentin Rothberg2021-09-22
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an option to `podman save` to allow uncompressed layers when copying OCI images. Do the neccessary plumbing for the remote client, add tests and vendor in the latest commit from c/common to fetch the neccessary changes in libimage. Closes: #11613 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>