summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* port forward range test: fix many oopsesEd Santiago2022-07-07
| | | | | | | | | | | | Wrong variable. And, wrong index range. And, wrong bash syntax for extracting end_port. And, add explicit check for valid range, because die() inside 'foo=$(...)' will not actually die. And, refactor some confusing code. And, reformat/clean up a confusing and too-wide comment. Fixes: #14854 Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #14825 from jmguzik/fix_streaming_pod_statsopenshift-ci[bot]2022-07-07
|\ | | | | Fix streaming for libpod/pods/stats endpoint
| * test-apiv2: streamed response testing based on response durationJakub Guzik2022-07-06
| | | | | | | | Signed-off-by: Jakub Guzik <jguzik@redhat.com>
* | Merge pull request #14673 from idleroamer/fix-network-inspect-mainopenshift-ci[bot]2022-07-07
|\ \ | | | | | | Fix network inspect compat API discrepancy
| * | Fix network inspect compat API discrepancy🤓 Mostafa Emami2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | - containerInspect compat API expects field value PrefixLen instead of PrefixLength for type Address for SecondaryIPAddresses - Add tests for network part of containerInspect compat api Closes: containers#14674 Signed-off-by: 🤓 Mostafa Emami <mustafaemami@gmail.com>
* | | Merge pull request #14501 from cdoern/podUTSopenshift-ci[bot]2022-07-06
|\ \ \ | | | | | | | | podman pod create --uts support
| * | | podman pod create --uts supportcdoern2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add support for the --uts flag in pod create, allowing users to avoid issues with default values in containers.conf. uts follows the same format as other namespace flags: --uts=private (default), --uts=host, --uts=ns:PATH resolves #13714 Signed-off-by: Charlie Doern <cdoern@redhat.com>
* | | | e2e tests: cleanup: capitalize CONSTANTSEd Santiago2022-07-05
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A number of standard image names were lower-case, leading to confusion in code such as: registry := podman(... , "-n", "registry", registry, ...) ^--- variable ^---- constant Fix a number of those to be capitalized and with _IMAGE suffix: registry := podman(..., REGISTRY_IMAGE Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Merge pull request #14370 from umohnani8/todoopenshift-ci[bot]2022-07-05
|\ \ \ | | | | | | | | Fix podman pod unpause TODO
| * | | Fix podman pod unpaue TODOUrvashi Mohnani2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the podman pod unpause to only show the paused containers with autocomplete. Fix a typo in the help command. Update the unpause function to only attempt an unpause on pasued pods instead of all the pods. Update the tests accordingly. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* | | | Merge pull request #14828 from saschagrunert/errors-libpodopenshift-ci[bot]2022-07-05
|\ \ \ \ | |/ / / |/| | | libpod: switch to golang native error wrapping
| * | | libpod: switch to golang native error wrappingSascha Grunert2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now use the golang error wrapping format specifier `%w` instead of the deprecated github.com/pkg/errors package. [NO NEW TESTS NEEDED] Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
* | | | Merge pull request #14831 from giuseppe/fix-leak-connections-testopenshift-ci[bot]2022-07-05
|\ \ \ \ | |/ / / |/| | | two minor tweaks to common_test.go
| * | | test: reduce sleep intervalGiuseppe Scrivano2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is no need to use such long sleep intervals for such cheap operations like opening a connection or stat'ing a file. Also make WaitForService() honor defaultWaitTimeout. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
| * | | test: return immediately on connectGiuseppe Scrivano2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if the connection is successfull then return immediately instead of doing all the iterations. It also solves a problem where connections are leaked since there are multiple Dial but only one Close. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | | Merge pull request #14626 from jakecorrenti/disable-docker-compose-health-checkopenshift-ci[bot]2022-07-05
|\ \ \ \ | | | | | | | | | | Docker-compose disable healthcheck properly handled
| * | | | Docker-compose disable healthcheck properly handledJake Correnti2022-07-05
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if a container had healthchecks disabled in the docker-compose.yml file and the user did a `podman inspect <container>`, they would have an incorrect output: ``` "Healthcheck":{ "Test":[ "CMD-SHELL", "NONE" ], "Interval":30000000000, "Timeout":30000000000, "Retries":3 } ``` After a quick change, the correct output is now the result: ``` "Healthcheck":{ "Test":[ "NONE" ] } ``` Additionally, I extracted the hard-coded strings that were used for comparisons into constants in `libpod/define` to prevent a similar issue from recurring. Closes: #14493 Signed-off-by: Jake Correnti <jcorrenti13@gmail.com>
* | | | Merge pull request #14534 from jakecorrenti/docker-compose-update-network-mtuopenshift-ci[bot]2022-07-05
|\ \ \ \ | | | | | | | | | | (rootful) docker-compose now updates network MTU
| * | | | (rootful) docker-compose now updates network MTUJake Correnti2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the following network block did not update using docker-compose: ``` networks: default: driver: bridge driver_opts: mtu: 9000 ``` In the API, the network options were previously not being handled when the network was being created. I translated the docker options into podman options, and added the options to the network. When doing `podman network inspect <network>`, the results now contain `"mtu": "9000"` Fixes: #14482 Signed-off-by: Jake Correnti <jcorrenti13@gmail.com>
* | | | | Merge pull request #14805 from jakecorrenti/df-format-outputopenshift-ci[bot]2022-07-05
|\ \ \ \ \ | | | | | | | | | | | | Podman system df JSON format outputs `Size` and `Reclaimable`
| * | | | | Podman system df JSON format outputs `Size` and `Reclaimable`Jake Correnti2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, `podman system df --format "{{json .}}"` would not output `Size` and `Reclaimable` like `podman system df` would. ``` {"Type":"Images","Total":5,"Active":0,"Size":39972240,"Reclaimable":39972240} {"Type":"Containers","Total":0,"Active":0,"Size":0,"Reclaimable":0} {"Type":"Local Volumes","Total":0,"Active":0,"Size":0,"Reclaimable":0} ``` Closes: #14769 Signed-off-by: Jake Correnti <jcorrenti13@gmail.com>
* | | | | | Merge pull request #14830 from vrothberg/fix-14761openshift-ci[bot]2022-07-05
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Sync: handle exit file
| * | | | | Sync: handle exit fileValentin Rothberg2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure `Sync()` handles state transitions and exit codes correctly. The function was only being called when batching which could render containers in an unusable state when running concurrently with other state-altering functions/commands since the state must be re-read from the database before acting upon it. Fixes: #14761 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | | | | | Merge pull request #14829 from saschagrunert/errors-hack-test-utilsopenshift-ci[bot]2022-07-05
|\ \ \ \ \ \ | | | | | | | | | | | | | | hack/test/utils: switch to golang native error wrapping
| * | | | | | hack/test/utils: switch to golang native error wrappingSascha Grunert2022-07-05
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now use the golang error wrapping format specifier `%w` instead of the deprecated github.com/pkg/errors package. [NO NEW TESTS NEEDED] Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
* / / / / / specgen,run: support running container from valid manifest listAditya R2022-07-05
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following PR adds support for running containers from a manifest list present on localstorage. Before this PR podman only supports running containers from valid images but not from manifest list. So `podman run -it --platform <some> <manifest-list> command` should become functional now and users should be able to resolve images on the bases of provided `--platform` string. Example ``` podman manifest create test podman build --platform linux/amd64,linux/arm64 --manifest test . podman run --rm --platform linux/arm64/v8 test uname -a ``` Closes: https://github.com/containers/podman/issues/14773 Signed-off-by: Aditya R <arajan@redhat.com>
* | | / / fix flake in aardvark testsPaul Holzinger2022-07-04
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The retry logic in digshort() did not work because dig always exits with 0 even when the domain name is not found. To make it work we have to check the standard output. We work on fixing the underlying issue in aardvark/netavark but this will take more time. Fixes #14173 Fixes #14171 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | | Merge pull request #14807 from eriksjolund/fix_read_only_spellingopenshift-ci[bot]2022-07-04
|\ \ \ \ | | | | | | | | | | [CI:DOCS] Fix spelling "read only" -> "read-only"
| * | | | Fix spelling "read only" -> "read-only"Erik Sjölund2022-07-02
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
* | | | | test: drop pod-create --device-read-bps testGiuseppe Scrivano2022-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the test is not doing what it believes to do. The containers are not supposed to be joining the infra container cgroup. In addition, the result is validated only on cgroup v1 systems (that are not used in the CI). We may want to add it back, or a variant of it, once the --device-read-bps option applies to the pod parent cgroup. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | | | podman pod create --memoryCharlie Doern2022-07-01
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | using the new resource backend, implement podman pod create --memory which enables users to modify memory.max inside of the parent cgroup (the pod), implicitly impacting all children unless overriden Signed-off-by: Charlie Doern <cdoern@redhat.com>
* | | | Merge pull request #14799 from vrothberg/fix-buildopenshift-ci[bot]2022-07-01
|\ \ \ \ | | | | | | | | | | fix build
| * | | | fix buildValentin Rothberg2022-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR containers/podman/pull/14449 had an outdated base. Merging it broke builds. [NO NEW TESTS NEEDED] Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | | | | Merge pull request #14798 from flouthoc/overlay-mount-path-absopenshift-ci[bot]2022-07-01
|\ \ \ \ \ | |/ / / / |/| | | | overlay,mount: convert source to absolute path for `overlay` mounts of paths
| * | | | overlay,mount: convert lowerdir to absolute path for overlay mounts of pathAditya R2022-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When mounting paths as overlay mounts we end up passing source as is to lowerdir options, resolve all relative paths in such cases for overlay mounts. Closes: https://github.com/containers/podman/issues/14797 Signed-off-by: Aditya R <arajan@redhat.com>
* | | | | Merge pull request #14795 from giuseppe/fix-wildcard-major-device-cgroupopenshift-ci[bot]2022-07-01
|\ \ \ \ \ | | | | | | | | | | | | specgen: fix parsing of cgroup devices rule
| * | | | | specgen: fix parsing of cgroup devices ruleGiuseppe Scrivano2022-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the parse for the cgroup devices rule to correctly handle the wildcard syntax for the device major. Also make sure the device major and minor are not negative numbers. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | | | | Merge pull request #14788 from vrothberg/rename-templateopenshift-ci[bot]2022-07-01
|\ \ \ \ \ \ | | | | | | | | | | | | | | podman-play-kube template: rename to podman-kube
| * | | | | | podman-play-kube template: rename to podman-kubeValentin Rothberg2022-06-30
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the upcoming plans of introducing a podman-kube command with various subcommands, rename the podman-play-kube systemd template to podman-kube before releasing it. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | | | | | Merge pull request #14449 from cdoern/podVolumesopenshift-ci[bot]2022-07-01
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | podman volume create --opt=o=timeout...
| * | | | | podman volume create --opt=o=timeout...cdoern2022-06-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add an option to configure the driver timeout when creating a volume. The default is 5 seconds but this value is too small for some custom drivers. Signed-off-by: cdoern <cdoern@redhat.com>
* | | | | | api,images: add support for LookupManifest to Image remove APIAditya R2022-06-30
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ImagesBatchRemoval and ImageRemoval now honors and accepts `LookupManifest` parameter which further tells libimage to resolve to manifest list if it exists instead of actual image. Following PR also makes `podman-remote manifest rm` functional which was broken till now. Closes: https://github.com/containers/podman/issues/14763 Signed-off-by: Aditya R <arajan@redhat.com>
* | | | | Merge pull request #14720 from sstosh/rm-optionopenshift-ci[bot]2022-06-29
|\ \ \ \ \ | | | | | | | | | | | | Fix: Prevent OCI runtime directory remain
| * | | | | Fix: Prevent OCI runtime directory remainToshiki Sonoda2022-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug was introduced in https://github.com/containers/podman/pull/8906. When we use 'podman rm/restart/stop/kill etc...' command to the container running with --rm, the OCI runtime directory remains at /run/<runtime name> (root user) or /run/user/<user id>/<runtime name> (rootless user). This bug could cause other bugs. For example, when we checkpoint the container running with --rm (podman checkpoint --export) and restore it (podman restore --import) with crun, error message "Error: OCI runtime error: crun: container `<container id>` already exists" is outputted. This error is caused by an attempt to restore the container with the same container ID as the remaining OCI runtime's container ID. Therefore, I fix that the cleanupRuntime() function runs to remove the OCI runtime directory, even if the container has already been removed by --rm option. Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
* | | | | | Merge pull request #14706 from ashley-cui/rootmachopenshift-ci[bot]2022-06-29
|\ \ \ \ \ \ | | | | | | | | | | | | | | Only allow Rootless runs of Podman Machine
| * | | | | | Only allow Rootless runs of Podman MachineAshley Cui2022-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Podman Machine crashes if run as root. When creating the machine, we write the ignition so that the UID of the core user matches the UID of the user on the host. We by default, create the root user on the machine with UID 0. If the user on the host is root, the core UID and the Root UID collide, causing a the VM not to boot. [NO NEW TESTS NEEDED] Signed-off-by: Ashley Cui <acui@redhat.com>
* | | | | | | Merge pull request #14755 from cdoern/systemopenshift-ci[bot]2022-06-28
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | fix volume reporting in system df
| * | | | | | | fix volume reporting in system dfCharlie Doern2022-06-28
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | currently, podman system df incorrectly calculates the reclaimable storage for volumes, using a cumulative reclaimable variable that is incremented and placed into each report entry causing values to rise above 100%. Switch this variables to be in the context of the loop, so it resets per volume just like the size variable does. resolves #13516 Signed-off-by: Charlie Doern <cdoern@redhat.com>
* | | | | | | Merge pull request #14717 from ZeyadYasser/fix-restore-runtime-checkopenshift-ci[bot]2022-06-28
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix runtime check during restore
| * | | | | | | Add test for restore runtime verification using non-default runtimeZeyad Yasser2022-06-28
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Runtime verification test for container checkpoint with export used the default runtime for test which causes test to always pass. Problem rises when using non-default runtime, then doing a restore. This test forcse using a non-default runtime during container creation. Edge case: 1. Default runtime is crun 2. Container is created with runc 3. Checkpoint without setting --runtime into archive 4. Restore without setting --runtime from archive It should be expected that podman identifies runtime from the checkpoint archive. Signed-off-by: Zeyad Yasser <zeyady98@gmail.com>