summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Merge pull request #15687 from vrothberg/RUN-1639OpenShift Merge Robot2022-09-09
|\ | | | | health check: add on-failure actions
| * health check: add on-failure actionsValentin Rothberg2022-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For systems that have extreme robustness requirements (edge devices, particularly those in difficult to access environments), it is important that applications continue running in all circumstances. When the application fails, Podman must restart it automatically to provide this robustness. Otherwise, these devices may require customer IT to physically gain access to restart, which can be prohibitively difficult. Add a new `--on-failure` flag that supports four actions: - **none**: Take no action. - **kill**: Kill the container. - **restart**: Restart the container. Do not combine the `restart` action with the `--restart` flag. When running inside of a systemd unit, consider using the `kill` or `stop` action instead to make use of systemd's restart policy. - **stop**: Stop the container. To remain backwards compatible, **none** is the default action. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | Merge pull request #15462 from edsantiago/system_tests_for_updateOpenShift Merge Robot2022-09-09
|\ \ | | | | | | system tests for update
| * | System tests for podman-updateEd Santiago2022-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The e2e tests are incomplete, because they're just too hard for any human to read/maintain. This defines tests in a table, so they're easily reviewed and updated. This makes it very easy to see which options are actually tested and which are not, under root/rootless cgroups v1/v2. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | Merge pull request #15695 from Luap99/update-buildahOpenShift Merge Robot2022-09-09
|\ \ \ | | | | | | | | Update buildah and c/common to latest
| * | | Fixes for vendoring BuildahEd Santiago2022-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit was automatically cherry-picked by buildah-vendor-treadmill v0.3 from the buildah vendor treadmill PR, #13808 Changes since 2022-08-16: - buildah 4139: minor line-number changes to the diff file because helpers.bash got edited - buildah 4190: skip the new test if remote - buildah 4195: add --retry / --retry-delay - changes to deal with vendoring gomega, units - changes to the podman login error message in system test Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | | Merge pull request #15692 from giuseppe/pod-spec-usernsOpenShift Merge Robot2022-09-09
|\ \ \ \ | | | | | | | | | | kube: plug HostUsers in the pod spec
| * | | | generate, kube: plug HostUsersGiuseppe Scrivano2022-09-08
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
| * | | | kube: plug HostUsers in the pod specGiuseppe Scrivano2022-09-08
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | map HostUsers=false to userns=auto. One difference with the current implementation in the Kubelet is that the podman default size is 1024 while the Kubelet uses 65536. This is done on purpose, because 65536 is a problem for rootless as the entire IDs space would be allocated to a single pod. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | | Merge pull request #15658 from rhatdan/configOpenShift Merge Robot2022-09-09
|\ \ \ \ | | | | | | | | | | Add --config for Docker compatibility
| * | | | Add --config for Docker compatibilityDaniel J Walsh2022-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: https://github.com/containers/podman/issues/14767 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | | Ignore cpu realtime options on cgroups V2 systemsToshiki Sonoda2022-09-09
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `--cpu-rt-period` and `--cpu-rt-runtime` options are only supported on cgroups V1 rootful systems. Therefore, podman prints an warning message and ignores these options when we use cgroups V2 systems. Related to: #15666 Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
* | | | Merge pull request #15607 from fpoirotte/mainOpenShift Merge Robot2022-09-08
|\ \ \ \ | |_|/ / |/| | | Fix #15243 Set AutomountServiceAccountToken to false
| * | | Fix #15243 Set AutomountServiceAccountToken to falseFrançois Poirotte2022-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | podman does not use any service account token, so we set the automount flag to false in podman generate kube. Signed-off-by: François Poirotte <clicky@erebot.net>
* | | | Merge pull request #15593 from ↵OpenShift Merge Robot2022-09-08
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | containers/dependabot/go_modules/github.com/docker/go-units-0.5.0 Bump github.com/docker/go-units from 0.4.0 to 0.5.0
| * | | | Bump github.com/docker/go-units from 0.4.0 to 0.5.0dependabot[bot]2022-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [github.com/docker/go-units](https://github.com/docker/go-units) from 0.4.0 to 0.5.0. - [Release notes](https://github.com/docker/go-units/releases) - [Commits](https://github.com/docker/go-units/compare/v0.4.0...v0.5.0) --- updated-dependencies: - dependency-name: github.com/docker/go-units dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | | | | Merge pull request #15675 from Luap99/pod-inspectOpenShift Merge Robot2022-09-08
|\ \ \ \ \ | |_|_|/ / |/| | | | fix podman pod inspect to support multiple pods
| * | | | fix podman pod inspect to support multiple podsPaul Holzinger2022-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like the other inspect commands `podman pod inspect p1 p2` should return the json for both. To correctly implement this we follow the container inspect logic, this allows use to reuse the global inspect command. Note: To not break the existing single pod output format for podman pod inspect I added a pod-legacy inspect type. This is only used to make sure we will print the pod as single json and not an array like for the other commands. We cannot use the pod type since podman inspect --type pod did return an array and we should not break that as well. Fixes #15674 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | | | Merge pull request #15681 from sstosh/fix-e2e-sameip-proxyOpenShift Merge Robot2022-09-08
|\ \ \ \ \ | |/ / / / |/| | | | e2e: fix run_staticip_test in proxy environment
| * | | | e2e: fix run_staticip_test in proxy environmentToshiki Sonoda2022-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Podman run two containers with the same IP [It]` This test will be failed in proxy environment. We need to set the static ip to no_proxy. Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
* | | | | proper --debug/-D flag supportPaul Holzinger2022-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --debug should not be a global flag, you can only use this as podman --debug never podman ps --debug. This matches docker and allows us to add the shorthand "D" since they now no longer conflict. Fixes changes from commit 2d30b4dee596 which claims to add -D but never did. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | | | Merge pull request #15663 from sstosh/fix-proxy-testOpenShift Merge Robot2022-09-07
|\ \ \ \ \ | | | | | | | | | | | | system tests: fix systemd tests in proxy environment
| * | | | | system tests: fix systemd tests in proxy environmentToshiki Sonoda2022-09-07
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under proxy environment, we need to add proxy environment variables. Related to: #15639 Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
* | | | | Merge pull request #15633 from thediveo/eventsOpenShift Merge Robot2022-09-07
|\ \ \ \ \ | |/ / / / |/| | | | Closes #15617: emit container labels for container exited and exec died events
| * | | | emit container labels also for container exited and exec died eventsHarald Albrecht2022-09-06
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | - adds unit test for container labels on container die event - implements #15617 Signed-off-by: Harald Albrecht <harald.albrecht@gmx.net>
* | | | Merge pull request #15547 from vrothberg/RUN-1606OpenShift Merge Robot2022-09-06
|\ \ \ \ | |/ / / |/| | | Support auto updates for Kubernetes workloads
| * | | kube play: support auto updates and rollbacksValentin Rothberg2022-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add auto-update support to `podman kube play`. Auto-update policies can be configured for: * the entire pod via the `io.containers.autoupdate` annotation * a specific container via the `io.containers.autoupdate/$name` annotation To make use of rollbacks, the `io.containers.sdnotify` policy should be set to `container` such that the workload running _inside_ the container can send the READY message via the NOTIFY_SOCKET once ready. For further details on auto updates and rollbacks, please refer to the specific article [1]. Since auto updates and rollbacks bases on Podman's systemd integration, the k8s YAML must be executed in the `podman-kube@` systemd template. For further details on how to run k8s YAML in systemd via Podman, please refer to the specific article [2]. An examplary k8s YAML may look as follows: ```YAML apiVersion: v1 kind: Pod metadata: annotations: io.containers.autoupdate: "local" io.containers.autoupdate/b: "registry" labels: app: test name: test_pod spec: containers: - command: - top image: alpine name: a - command: - top image: alpine name: b ``` [1] https://www.redhat.com/sysadmin/podman-auto-updates-rollbacks [2] https://www.redhat.com/sysadmin/kubernetes-workloads-podman-systemd Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | | | Merge pull request #15644 from Luap99/event-formatOpenShift Merge Robot2022-09-06
|\ \ \ \ | | | | | | | | | | fix podman events with custom format
| * | | | remove SkipIfNotFedora() from events testPaul Holzinger2022-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They should work on all distros. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | | | fix podman events with custom formatPaul Holzinger2022-09-06
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | podman events --format {{.ID}} was not working since the template was converted to a range but we only render each event individually. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | | Merge pull request #15639 from fj-tsubasa/system-test-proxyOpenShift Merge Robot2022-09-06
|\ \ \ \ | | | | | | | | | | system tests: fix some tests in proxy environment
| * | | | system tests: fix some tests in proxy environmentTsubasa Watanabe2022-09-06
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some system tests in `255-auto-update.bats` and `500-networking.bats` fail under proxy environment. This PR fixes this problem. Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>
* | | | Merge pull request #15584 from sstosh/generate-systemd-envOpenShift Merge Robot2022-09-06
|\ \ \ \ | |/ / / |/| | | Add generate systemd -e/--env option
| * | | Add generate systemd -e/--env optionToshiki Sonoda2022-09-06
| |/ / | | | | | | | | | | | | | | | | | | | | | -e/--env option sets environment variables to the systemd unit files. Fixes: #15523 Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
* | | Merge pull request #15618 from mheon/add_group_to_addtlgroupsOpenShift Merge Robot2022-09-05
|\ \ \ | | | | | | | | Add container GID to additional groups
| * | | Add container GID to additional groupsMatthew Heon2022-09-02
| |/ / | | | | | | | | | | | | | | | | | | Mitigates a potential permissions issue. Mirrors Buildah PR #4200 and CRI-O PR #6159. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | | Merge pull request #15605 from TomSweeneyRedHat/dev/tsweeney/adjusttestOpenShift Merge Robot2022-09-04
|\ \ \ | | | | | | | | Update test per comment in #15555
| * | | Update test per comment in #15555tomsweeneyredhat2022-09-01
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | While backporting a test from main, @edsantiago asked that the test be adjusted as noted here: https://github.com/containers/podman/pull/15555#issuecomment-1232791752. This PR brings those same changes to main for posterity sake. Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
* | | Merge pull request #15599 from umohnani8/gen-kubeOpenShift Merge Robot2022-09-02
|\ \ \ | |_|/ |/| | Fix bind-mount-option annotation in gen/play kube
| * | Fix bind-mount-option annotation in gen/play kubeUrvashi Mohnani2022-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | The format used for setting the bind-mount-options annotations in the kube yaml was incorrect and caused k8s to throw an error when trying to play the generated kube yaml. Fix the annotation format to match the rules of k8s. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* | | Merge pull request #15587 from edsantiago/skip_ubuntu_flakeOpenShift Merge Robot2022-09-02
|\ \ \ | |_|/ |/| | CI: disable flaking test on ubuntu
| * | CI: disable flaking test on ubuntuEd Santiago2022-09-01
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/containers/conmon/pull/352 As of a few days ago, Ubuntu still hadn't built a fixed conmon. Just skip the test until we get a fixed Ubuntu or until we figure out a better solution to the test-something-RHEL8ish problem. UPDATE: WEIRD: this 'skip' triggered a baffling failure on Ubuntu: the "Kubernetes only allows 63 characters" warning message stopped appearing, on Ubuntu only, which then caused the kube-generate tests to fail because they actually checked for that. The message doesn't appear because generate-kube is no longer spitting out a line for org.opencontainers.image.base.digest/CONTAINER. (Why this line is gone, I don't know, and choose not to investigate). Solution: stop checking for the kube-63 warning. It's just not that important. Signed-off-by: Ed Santiago <santiago@redhat.com>
* / implement podman updateCharlie Doern2022-09-01
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | podman update allows users to change the cgroup configuration of an existing container using the already defined resource limits flags from podman create/run. The supported flags in crun are: this command is also now supported in the libpod api via the /libpod/containers/<CID>/update endpoint where the resource limits are passed inthe request body and follow the OCI resource spec format –memory –cpus –cpuset-cpus –cpuset-mems –memory-swap –memory-reservation –cpu-shares –cpu-quota –cpu-period –blkio-weight –cpu-rt-period –cpu-rt-runtime -device-read-bps -device-write-bps -device-read-iops -device-write-iops -memory-swappiness -blkio-weight-device resolves #15067 Signed-off-by: Charlie Doern <cdoern@redhat.com>
* Merge pull request #15571 from umohnani8/gen-kubeOpenShift Merge Robot2022-09-01
|\ | | | | Set enableServiceLinks to false in generated yaml
| * Set enableServiceLinks to false in generated yamlUrvashi Mohnani2022-08-31
| | | | | | | | | | | | | | | | Since podman doesn't set/use the needed service env variable, always set enableServiceLinks to false in the generated kube yaml. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* | Merge pull request #15360 from m0duspwnens/api_compat_containersOpenShift Merge Robot2022-09-01
|\ \ | |/ |/| api: return imageID instead of imageName, for "Image" when Podman api is queried
| * Merge branch 'containers:main' into api_compat_containersJason Ertel2022-08-30
| |\
| * \ Merge remote-tracking branch 'upstream/main' into api_compat_containersJosh Patterson2022-08-29
| |\ \
| * | | updated apiv2 tests to reflect hash compat fixJason Ertel2022-08-29
| | | | | | | | | | | | | | | | Signed-off-by: Jason Ertel <jason.ertel@securityonionsolutions.com>
* | | | Merge pull request #15473 from umohnani8/empty-dirOpenShift Merge Robot2022-08-31
|\ \ \ \ | | | | | | | | | | Add emptyDir volume support to kube play