summaryrefslogtreecommitdiff
path: root/test/system
Commit message (Collapse)AuthorAge
* Support automatic labeling of kube volumesDaniel J Walsh2021-05-16
| | | | | | | | | | Allow users to specify options on the volume mount path. This will trigger relabels of user specifies :z,:Z Also will handle User Relabels if the user specifies :U Fixes: https://github.com/containers/podman/issues/9371 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #10222 from vrothberg/image-treeOpenShift Merge Robot2021-05-12
|\ | | | | podman image tree: restore previous behavior
| * podman image tree: restore previous behaviorValentin Rothberg2021-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial version of libimage changed the order of layers which has now been restored to remain backwards compatible. Further changes: * Fix a bug in the journald logging which requires to strip trailing new lines from the message. The system tests did not pass due to empty new lines. Triggered by changing the default logger to journald in containers/common. * Fix another bug in the journald logging which embedded the container ID inside the message rather than the specifid field. That surfaced in a preceeding whitespace of each log line which broke the system tests. * Alter the system tests to make sure that the k8s-file and the journald logging drivers are executed. * A number of e2e tests have been changed to force the k8s-file driver to make them pass when running inside a root container. * Increase the timeout in a kill test which seems to take longer now. Reasons are unknown. Tests passed earlier and no signal-related changes happend. It may be CI VM flake since some system tests but other flaked. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | fix network restart always testPaul Holzinger2021-05-12
|/ | | | | | | The added test in 30544f225e73 is flaking. Podman inspect is always working so we have to check the pid instead. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* fix restart always with slirp4netnsPaul Holzinger2021-05-11
| | | | | | | | | | | | When a container is automatically restarted due its restart policy and the container used the slirp4netns netmode, the slirp4netns process died. This caused the container to lose network connectivity. To fix this we have to start a new slirp4netns process. Fixes #8047 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Merge pull request #10291 from edsantiago/remove_obsolete_skipsOpenShift Merge Robot2021-05-10
|\ | | | | Remove obsolete skips
| * Remove obsolete skipsEd Santiago2021-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | The following bugs seem to be fixed: * #6510 (e2e tests) - podman rmi gives "layer not known" * #9915 (buildah-bud tests) - podman build --arch * #10248 - spurious warning from first-ever invocation of rootless podman Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Add envars to the generated systemd unitPaul Holzinger2021-05-10
|/ | | | | | | | | | | | | | | The with --new generated systemd unit loses the environment variables when the create command only contains the key without the value. Since podman tries to lookup those values from the environment the unit can fail. This commits ensures that we will add the environment variables to the unit file when this is the case. The container environment variables are looked up in the container spec. Fixes #10101 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Merge pull request #10237 from edsantiago/ci_rootless_add_ubuntuOpenShift Merge Robot2021-05-07
|\ | | | | CI: run rootless tests under ubuntu
| * CI: run rootless tests under ubuntuEd Santiago2021-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reason: to catch errors before they surface in RHEL. One of the Ubuntus is specially crafted to run with cgroups v1 and runc. Although this isn't quite the same as RHEL, it's as close as we can come in our CI environment, and I suspect it would have caught #10234 (a regression). Sorry, team. Also: play kube limits test: skip on all rootless, not just rootless+fedora. There was a complicated and unnecessary check in there for Fedora. Also: workaround for bug #10248, a spurious error message on the first invocation of rootless podman on Ubuntu.Old Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Revert Patch to relabel if selinux not enabledDaniel J Walsh2021-05-06
| | | | | | | | | | | | | | | | | | | | Revert : https://github.com/containers/podman/pull/9895 Turns out that if Docker is in --selinux-enabeled, it still relabels if the user tells the system to, even if running a --privileged container or if the selinux separation is disabled --security-opt label=disable. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Add restart-policy to container filters & --filter to podman startBoaz Shuster2021-05-06
|/ | | | Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
* migrate Podman to containers/common/libimageValentin Rothberg2021-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate the Podman code base over to `common/libimage` which replaces `libpod/image` and a lot of glue code entirely. Note that I tried to leave bread crumbs for changed tests. Miscellaneous changes: * Some errors yield different messages which required to alter some tests. * I fixed some pre-existing issues in the code. Others were marked as `//TODO`s to prevent the PR from exploding. * The `NamesHistory` of an image is returned as is from the storage. Previously, we did some filtering which I think is undesirable. Instead we should return the data as stored in the storage. * Touched handlers use the ABI interfaces where possible. * Local image resolution: previously Podman would match "foo" on "myfoo". This behaviour has been changed and Podman will now only match on repository boundaries such that "foo" would match "my/foo" but not "myfoo". I consider the old behaviour to be a bug, at the very least an exotic corner case. * Futhermore, "foo:none" does *not* resolve to a local image "foo" without tag anymore. It's a hill I am (almost) willing to die on. * `image prune` prints the IDs of pruned images. Previously, in some cases, the names were printed instead. The API clearly states ID, so we should stick to it. * Compat endpoint image removal with _force_ deletes the entire not only the specified tag. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Merge pull request #10199 from edsantiago/system_tests_with_runc_overrideOpenShift Merge Robot2021-05-04
|\ | | | | System tests: honor $OCI_RUNTIME (for CI)
| * System tests: honor $OCI_RUNTIME (for CI)Ed Santiago2021-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some CI systems set $OCI_RUNTIME as a way to override the default crun. Integration (e2e) tests honor this, but system tests were not aware of the convention; this means we haven't been testing system tests with runc, which means RHEL gating tests are now failing. The proper solution would be to edit containers.conf on CI systems. Sorry, that would involve too much CI-VM work. Instead, this PR detects $OCI_RUNTIME and creates a dummy containers.conf file using that runtime. Add: various skips for tests that don't work with runc. Refactor: add a helper function so we don't need to do the complicated 'podman info blah blah .OCIRuntime.blah' thing in many places. BUG: we leave a tmp file behind on exit. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #8828 from boaz0/closes_8779OpenShift Merge Robot2021-05-04
|\ \ | | | | | | Add --all to podman start
| * | Add --all to podman startBoaz Shuster2021-05-03
| |/ | | | | | | | | Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com> Co-authored-by: Ed Santiago <santiago@redhat.com>
* / system test image: add arm64v8 imageEd Santiago2021-05-03
|/ | | | | | | | | | | The RHEL multi-arch team informed me that we were missing aarch64; add it, using the new name (arm64v8). (This is from last week, so the image date tag does not match today's date. I was waiting for confirmation that things were working). Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #10063 from ParkerVR/autoupdate-localOpenShift Merge Robot2021-04-29
|\ | | | | Autoupdate Local
| * TODO completeParker Van Roy2021-04-29
| | | | | | | | | | | | | | | | | | | | | | changed struct to policyMapper change "image" to "registry" in multiple locations Updated documentation with registry alias & autoupdate local Added relevant test Signed-off-by: Parker Van Roy <pvanroy@redhat.com>
* | system tests: networking: fix another race conditionEd Santiago2021-04-28
| | | | | | | | | | | | | | Our current #1 flake; this is a simple one: we can't run 'logs' on a container run with '-d --rm'. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #10157 from edsantiago/batsOpenShift Merge Robot2021-04-28
|\ \ | |/ |/| System tests: fix two race conditions
| * System tests: fix two race conditionsEd Santiago2021-04-27
| | | | | | | | | | | | | | Basically, add 'podman wait' before 'podman rm'. See if this fixes gating tests run on ppc64le (possibly very very slow hosts) Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #10119 from rhatdan/timeoutOpenShift Merge Robot2021-04-27
|\ \ | |/ |/| Add podman run --timeout option
| * Add podman run --timeout optionDaniel J Walsh2021-04-23
| | | | | | | | | | | | | | | | | | This option allows users to specify the maximum amount of time to run before conmon sends the kill signal to the container. Fixes: https://github.com/containers/podman/issues/6412 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Fix rootlesskit port forwarder with custom slirp cidrPaul Holzinger2021-04-23
|/ | | | | | | | | | | | | The source ip for the rootlesskit port forwarder was hardcoded to the standard slirp4netns ip. This is incorrect since users can change the subnet used by slirp4netns with `--network slirp4netns:cidr=10.5.0.0/24`. The container interface ip is always the .100 in the subnet. Only when the rootlesskit port forwarder child ip matches the container interface ip the port forwarding will work. Fixes #9828 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Merge pull request #9495 from rhatdan/groupsOpenShift Merge Robot2021-04-22
|\ | | | | Add '--group-add keep-groups': supplementary groups into container
| * Add --group-add keep-groups: suplimentary groups into containerDaniel J Walsh2021-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently we have rootless users who want to leak their groups access into containers, but this group access is only able to be pushed in by a hard to find OCI Runtime annotation. This PR makes this option a lot more visable and hides the complexity within the podman client. This option is only really needed for local rootless users. It makes no sense for remote clients, and probably makes little sense for rootfull containers. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
| * Fixes from make codespellDaniel J Walsh2021-04-21
| | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #10102 from edsantiago/batsOpenShift Merge Robot2021-04-21
|\ \ | | | | | | corrupt-image test: fix an oops
| * | corrupt-image test: fix an oopsEd Santiago2021-04-21
| |/ | | | | | | | | | | | | Followup to #10033: actually implement the system reset test. And, just out of paranoia, extend the warning-message check. Signed-off-by: Ed Santiago <santiago@redhat.com>
* / Add --noheading flag to all list commandsDaniel J Walsh2021-04-21
|/ | | | | | | | | | Currently we have only podman images list --noheading. This PR Adds this option to volumes, containers, pods, networks, machines, and secrets. Fixes: https://github.com/containers/podman/issues/10065 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* rmi: don't break when the image is missing a manifestNalin Dahyabhai2021-04-20
| | | | | | | | | | | | | | | | | | | | In libpod/image.Image.Remove(), if the attempt to find the image's parent fails for any reason, log a warning and proceed as though it didn't have one instead of failing, which would leave us unable to remove the image without resetting everything. In libpod/Runtime.RemoveImage(), if we can't determine if an image has children, log a warning, and assume that it doesn't have any instead of failing, which would leave us unable to remove the image without resetting everything. In pkg/domain/infra/abi.ImageEngine.Remove(), when attempting to remove all images, if we encounter an error checking if a given image has children, log a warning, and assume that it doesn't have any instead of failing, which would leave us unable to remove the image without resetting everything. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
* Merge pull request #10046 from edsantiago/batsOpenShift Merge Robot2021-04-16
|\ | | | | system tests: build --pull-never: deal with flakes
| * system tests: build --pull-never: deal with flakesEd Santiago2021-04-15
| | | | | | | | | | | | | | | | This test continues to flake on podman-remote (especially Ubuntu) even after #10030 and #10034. I give up. Stop checking the error message in podman-remote tests. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #10032 from nalind/trace-levelOpenShift Merge Robot2021-04-15
|\ \ | |/ |/| Recognize "trace" logging, and use it for lone errors at exit
| * Test that we don't error out on advertised --log-level valuesNalin Dahyabhai2021-04-14
| | | | | | | | Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
* | Merge pull request #10028 from edsantiago/batsOpenShift Merge Robot2021-04-14
|\ \ | | | | | | System tests: fix racy podman-inspect
| * | System tests: fix racy podman-inspectEd Santiago2021-04-14
| |/ | | | | | | | | | | | | | | Add 'podman wait' between kill & inspect. Fixes: #9751 Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #9945 from rhatdan/runlabelOpenShift Merge Robot2021-04-14
|\ \ | |/ |/| Fix handling of $NAME and $IMAGE in runlabel
| * Fix handling of $NAME and $IMAGE in runlabelDaniel J Walsh2021-04-12
| | | | | | | | | | | | | | | | Fixes: https://github.com/containers/podman/issues/9405 Add system runlabel tests. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | System tests: setup: better cleanup of stray imagesEd Santiago2021-04-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a corner case in basic_setup(), where we rmi stray images. If a test tags $IMAGE and fails to rmi by tag name, cleanup could rmi both tag name and IID, wiping out the desired image: podman tag $IMAGE foo ... cleanup: rmi foo $FOO_IID [this removes $IMAGE!] Solution: rmi by name, but only rmi by IID if != $IMAGE. TOTH to ypu for bringing this to my attention. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | cgroup: do not set cgroup parent when rootless and cgroupfsGiuseppe Scrivano2021-04-12
|/ | | | | | | | | do not set the cgroup parent when running as rootless with cgroupfs, even if cgroup v2 is used. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1947999 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Merge pull request #9955 from edsantiago/batsOpenShift Merge Robot2021-04-07
|\ | | | | System tests: special case for RHEL: require runc
| * System tests: special case for RHEL: require runcEd Santiago2021-04-06
| | | | | | | | | | | | | | | | As discussed in watercooler 2021-04-06: make sure that RHEL8 and CentOS are using runc. Using crun is probably a packaging error that should be caught early. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | rootless cni add /usr/sbin to PATH if not presentPaul Holzinger2021-04-06
|/ | | | | | | | | The CNI plugins need access to iptables in $PATH. On debian /usr/sbin is not added to $PATH for rootless users. This will break rootless cni completely. To prevent breaking existing users add /usr/sbin to $PATH in podman if needed. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
* Merge pull request #9940 from rhatdan/authOpenShift Merge Robot2021-04-05
|\ | | | | Verify existence of auth file if specified
| * Verify existence of auth file if specifiedDaniel J Walsh2021-04-05
| | | | | | | | | | | | Fixes: https://github.com/containers/podman/issues/9572 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #9911 from rhatdan/storageOpenShift Merge Robot2021-04-05
|\ \ | | | | | | Allow users to override default storage opts with --storage-opt
| * | Allow users to override default storage opts with --storage-optDaniel J Walsh2021-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We define in the man page that this overrides the default storage options, but the code was appending to the existing options. This PR also makes a change to allow users to specify --storage-opt="". This will turn off all storage options. https://github.com/containers/podman/issues/9852 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>