aboutsummaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAge
...
* | Add ExecStop and dependencies to fix shutdownAndrin Brunner2022-06-01
|/ | | | Signed-off-by: Andrin Brunner <andrin@acloud.one>
* Cirrus: Fix several TODOsChris Evich2022-05-26
| | | | | | | | Most were simply deleted, the main one addressed is in the "pre-testing" `ext_svc_check.sh` script. It will now verify accessibility of several key test images we maintain in `quay.io`. Signed-off-by: Chris Evich <cevich@redhat.com>
* Merge pull request #13870 from kolyshkin/makefile-cleanupsOpenShift Merge Robot2022-05-19
|\ | | | | Makefile: simplify for modern Go
| * ci: pr-should-include-tests: add more exceptionsKir Kolyshkin2022-05-17
| | | | | | | | | | | | Add .golangci.yml, podman.spec.rpkg, and non top-level Makefiles. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
* | k8systemd: run k8s workloads in systemdValentin Rothberg2022-05-17
|/ | | | | | | | | | | | | | | | | | | | Support running `podman play kube` in systemd by exploiting the previously added "service containers". During `play kube`, a service container is started before all the pods and containers, and is stopped last. The service container communicates its conmon PID via sdnotify. Add a new systemd template to dispatch such k8s workloads. The argument of the template is the path to the k8s file. Note that the path must be escaped for systemd not to bark: Let's assume we have a `top.yaml` file in the home directory: ``` $ escaped=$(systemd-escape ~/top.yaml) $ systemctl --user start podman-play-kube@$escaped.service ``` Closes: https://issues.redhat.com/browse/RUN-1287 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Fix hang in build-each-commit testEd Santiago2022-05-11
| | | | | | | | | | Followup to #14178: I broke CI. "--fork-point" does not do what I thought it did, so remove it. Also, add 'set -x' to help us debug the next time something like this happens. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #14179 from cevich/ensure_dest_branchOpenShift Merge Robot2022-05-10
|\ | | | | Cirrus: Guarantee $DEST_BRANCH is passed through
| * Cirrus: Guarantee $DEST_BRANCH is passed throughChris Evich2022-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | There are several runtime contexts (rootless and container) where `$DEST_BRANCH` is needed but was not supplied. A prior commit (c4865767171b) removed the default value, `main` which was being set incorrectly when CI ran on release branches. Fix this by ensuring the variable is non-empty upon entry to `setup_environment.sh`, then ensure it gets passed through to child environments by way of the `/etc/ci_environment` file. This will maintain compatibility with both CI and `hack/get_ci_vm.sh` use. Signed-off-by: Chris Evich <cevich@redhat.com>
* | Cirrus: Update images + new automation libraryChris Evich2022-05-10
| | | | | | | | | | | | | | | | Add support for new automation library version w/ `$DEBUG` fix (ref: containers/automation_images#128) and added definitions for commonly used Distro/version variables. Signed-off-by: Chris Evich <cevich@redhat.com>
* | Cirrus: Simplify use of cache in automationChris Evich2022-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the increasingly complex `.cirrus.yml` task relationships, build cache wasn't always working as intended. Recently, non-build tasks were observed assuming authority over `gopath_cache`. Ref.: https://github.com/containers/podman/pull/13998#issuecomment-1108834538 Address this by an overall simplification using artifacts instead of cache. Using artifacts allows establishing concrete authorship/authority over cached repo. content. In this way, dependent tasks may simply consume the artifact with `curl` instead of relying on complex caching algorithms. Also/Minor: Add YAML checking to the pre-commit configuration. Signed-off-by: Chris Evich <cevich@redhat.com>
* | Cirrus: Simplify rootless ssh setupChris Evich2022-05-10
|/ | | | | | | | | | | | | The sshd service is guaranteed to be running by the VM image build process - it's required by the packer tool for access. Remove the startup and check on the sshd service. For many tests, man ssh connections to/from $ROOTLESS_USER on the host are needed. To facilitate this, the localhost key is added to `known_hosts` for root and `$ROOTLESS_USER`. Simplify this setup using the `ssh-keyscan` tool. Signed-off-by: Chris Evich <cevich@redhat.com>
* bloat check: make more robustEd Santiago2022-05-10
| | | | | | | | | | | | | | | | | | | The use of 'C^' (parent) in 'git rebase' is counterintuitive, at least to me: when C is a merge of multiple commits, rebase picks each of those commits. That probably makes good sense to a git expert, which I'm not. Solution: forget using '^', just calculate the baseline sizes by doing a checkout of the PR's parent. Also: compute PR parent using git-merge-base instead of blindly trusting $DEST_BRANCH (which may be volatile as other PRs are merged). Also: run git-rebase directly, not via make rule. That indirection is too confusing here. Signed-off-by: Ed Santiago <santiago@redhat.com>
* test skipper: check for $DEST_BRANCHEd Santiago2022-05-09
| | | | | | | | | | | | | | The test-skipping optimization is failing as rootless on non-main, because $DEST_BRANCH is not set. Solution: check for envariable, skip test if missing. (This was part of my original PR, but was accidentally removed in #14013) Also: DEST_BRANCH was silently being defaulted to 'main' in lib.sh. Remove that: per @cevich, it is no longer necessary. Fixes: #14131 Signed-off-by: Ed Santiago <santiago@redhat.com>
* Cirrus: Fix ownership of repos. to keep git happyChris Evich2022-04-27
| | | | | | | | | | | | | | | | | | Newer versions of git are much more pedantic about who owns the repository files. When setting up to run rootless, prior to this commit, the repo. ownership was changed from root. This causes all subsequent git-operations as root to fail: ``` fatal: unsafe repository ('<$GOSRC>' is owned by someone else) ``` Fix this by re-ordering operations, such that the change in ownership is done immediately before executing as a user. Also disable the git-ownership check on the source repository assuming the CI environment is disposable. Signed-off-by: Chris Evich <cevich@redhat.com>
* Cirrus: Temporarily update netavark/aardvark-dnsChris Evich2022-04-27
| | | | | | | | | | | | Normally installing/updating packages at test runtime is highly discouraged for reliability and efficiency reasons. However, in this specific case, development work of these packages is still fairly hot. As a compromise to support podman test development, temporarily update these two specific packages at runtime. At a future date, when updates are less frequent, this commit can/should be safely reverted. At that point, the versions installed at VM image build time will persist. Signed-off-by: Chris Evich <cevich@redhat.com>
* Cirrus: Test w/ netavark/aardvark-dns in F36+Chris Evich2022-04-27
| | | | | | | | | | | | | | | | | | | | Now that netavark and aardvark are packaged and default in F36, support CNI-based testing in F35 and Ubuntu. * Remove the temporary/special `$TEST_ENVIRON=host-netavark` construct. * Remove dedicated/special integration and system testing tasks. * Update test-config setup to properly handle CNI vs netavark/aardvark environments. * Update package-version logging to operate based on installed packages (along with some other minor script cleanups). * Update global environment setup to force `$NETWORK_BACKEND=netavark` in F36 and later. Except when `upgrade_test` task runs. * Discontinue installing netavark and aardvark-dns binaries from upstream build artifacts. * Drop CGV1-vs-2 policy check. Ubuntu VMs now exclusively test CGv1, Fedora VMs test CGv2, with F35 testing CNI and F36 testing Netavark. Signed-off-by: Chris Evich <cevich@redhat.com>
* Cirrus: Fix skipping all/most testsChris Evich2022-04-26
| | | | | | | | | | The originally intent for skipping tests based on change-content was to optimize the PR workflow. However, a mistake in a conditional is causing almost all tasks running for Cron and branches to be skipped. Fix this by checking for an empty '$CIRRUS_PR' variable. This value is always empty when operating outside of PRs. Signed-off-by: Chris Evich <cevich@redhat.com>
* Cirrus: Re-fix build-cache miss on mainChris Evich2022-04-25
| | | | | | | | | | | | | | After merging #13998 it was observed that the `docker-py` task was still failing with the same error on `main`. The original quick-fix had placed the full-build (`make`) call too late in the process. This commit moves it up to right before the `make install` call which was resulting in an error. Again, a further future commit is planned to re-work and simplify the entire cache setup. This is only a quick fix to make branch-builds pass. Signed-off-by: Chris Evich <cevich@redhat.com>
* Revert "Cirrus: Fix cirrus cache race on bin/podman"Chris Evich2022-04-25
| | | | | | This reverts commit 2f53259a8d5cd8022e797ea22a354a63bef1803a. Signed-off-by: Chris Evich <cevich@redhat.com>
* Merge pull request #13998 from cevich/fix_docker-py_testOpenShift Merge Robot2022-04-25
|\ | | | | Cirrus: Fix cirrus cache race on bin/podman
| * Cirrus: Fix cirrus cache race on bin/podmanChris Evich2022-04-25
| | | | | | | | | | | | | | | | | | | | | | A suspected race on uploading gopath cache is causing the docker-py (and possibly other) tasks to fail unpredictably with an error from `make` regarding missing `bin/podman`. Since this failure is affecting all development activity, apply a quick/dirty fix to the failing task, by simply rebuilding the binary. A more comprehensive/long-term fix will be worked in a future PR. Signed-off-by: Chris Evich <cevich@redhat.com>
* | Revert "Switch all rootful to rootfull"Ashley Cui2022-04-25
|/ | | | | | | | | | This reverts commit cc3790f332d989440eb1720e24e3619fc97c74ee. We can't change rootful to rootfull because `rootful` is written into the machine config. Changing this will break json unmarshalling, which will break existing machines. [NO NEW TESTS NEEDED] Signed-off-by: Ashley Cui <acui@redhat.com>
* Increase verbosity and sequencing of APIv2 testingChris Evich2022-04-22
| | | | | | | | | | | The default verbosity level does not show the classes or function names. This makes it difficult to debug problems like hangs. Also, separate the bats and python-based tests into two sections. This allows for easier debugging, since isolation can be done in `runner.sh` rather than mucking with the `Makefile`. Lastly, update the logformatter script to `autoflush stdout` (thanks @edsantiago). Signed-off-by: Chris Evich <cevich@redhat.com>
* Merge pull request #13964 from rhatdan/rootfullOpenShift Merge Robot2022-04-22
|\ | | | | Switch all rootful to rootfull
| * Switch all rootful to rootfullDaniel J Walsh2022-04-21
| | | | | | | | | | | | | | | | | | We are inconsistent on the name, we should stick with rootfull. [NO NEW TESTS NEEDED] Existing tests should handle this and no tests for machines exists yet. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #13956 from cevich/fix_git_idOpenShift Merge Robot2022-04-22
|\ \ | |/ |/| Cirrus: Fix missing git-enforced runtime identity
| * Cirrus: Fix missing git-enforced runtime identityChris Evich2022-04-21
| | | | | | | | | | | | | | | | | | Newer versions of git (like `2.35`) fail on certain operations (like `rebase` and `am`) without a local identity. Add a fake one from the start, with a clearly identifiable test-value to avoid problems at runtime. Signed-off-by: Chris Evich <cevich@redhat.com>
* | Optimization: skip tests in some circumstancesEd Santiago2022-04-21
|/ | | | | | | | | | | | | | | A common pattern is to submit PRs that update only tests or docs. When the only changes are to test/e2e, there is no point in running test/system or test/upgrade or test/buildah-bud. Likewise, reciprocally, and similarly for a bunch of other tests (alt, cross, apiv2, ...) And when the only changes are under docs/ , there is no point in running any of the above. Exception: if $CIRRUS_<mumble> are undefined (e.g., cron), never skip Signed-off-by: Ed Santiago <santiago@redhat.com>
* Cirrus: Multi-arch build auto-update + tagging updateChris Evich2022-04-07
| | | | | | | | | | | | | | | | This new VM image brings in two important updates to multi-arch image build operations: 1. Future operational changes will no-longer require also updating VM images. Updates to build-push made in `containers/automation_images` will automatically be picked up at runtime. ref: https://github.com/containers/automation_images/pull/123 2. On the next run, both `vX` and `vX.Y` tagged manifest-lists will be pushed. This is now also reflected in the README. ref: https://github.com/containers/automation_images/pull/125 Signed-off-by: Chris Evich <cevich@redhat.com>
* Cirrus: Allow manually running image-build taskChris Evich2022-03-31
| | | | | | | | | | Building multi-arch images in a standardized way is complex. Some of the builds themselves can take a really long time to run (over an hour). Make changes easier to test inside a PR by adding manually-triggered image-build tasks. These mirror most of the real cron-triggered task, without actually pushing the final images. Signed-off-by: Chris Evich <cevich@redhat.com>
* systemd: enable all cgroups when running as a serviceGiuseppe Scrivano2022-03-30
| | | | | | | | | enable cgroup delegation when running as a systemd service so all the available controllers are correctly detected. Closes: https://github.com/containers/podman/issues/13710 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Cirrus: Build multi-arch images + manifestsChris Evich2022-03-28
| | | | | | | | | | | Github-actions for large/complex tasks is hard to read and maintain. Reimplement the multi-arch image build workflow into a set of bash scripts that use all native contrainer-org tooling. This requires a special VM image setup with emulation to build foreign architectures. It also requires renaming the `helloimage` directory, because the build script uses the directory name in the image FQIN. Signed-off-by: Chris Evich <cevich@redhat.com>
* Merge pull request #13653 from jmontleon/fix-manifest-push-headerOpenShift Merge Robot2022-03-27
|\ | | | | Resolves #13629 Add RegistryAuthHeader to manifest push
| * Resolves #13629 Add RegistryAuthHeader to manifest pushjason2022-03-26
| | | | | | | | Signed-off-by: Jason Montleon <jmontleo@redhat.com>
* | Run codespell to cleanup typosDaniel J Walsh2022-03-25
| | | | | | | | | | | | [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #13602 from edsantiago/size_check_part2OpenShift Merge Robot2022-03-24
|\ \ | |/ |/| Binary growth check, part 2 of 2
| * Binary growth check, part 2 of 2Ed Santiago2022-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a CI check to prevent unwanted bloat in binary images, by building a baseline (pre-PR) binary then comparing file sizes post-PR. Part 1 (#13518) added a new script that runs multiple 'make's, comparing image sizes against an original, and failing loudly if growth is too big. An override mechanism is defined. This is part 2 of 2: adding the CI rule. We couldn't do that in part 1, because the rule would call a script that didn't exist in the pre-PR commit. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | Merge pull request #13559 from cevich/success_artifactsOpenShift Merge Robot2022-03-23
|\ \ | | | | | | [CI:BUILD] Cirrus: Publish binary artifacts on success
| * | Cirrus: Publish binary artifacts on successChris Evich2022-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In general continuous-delivery (CD) tends to pair well with CI. More specifically, there is a need for some reverse-dependency CI testing in netavark/aardvark-dns. In all cases, the download URL needs to remain consistent, without elements like `Build%20for%20fedora-35`. The 'Total Success' task only ever executes when all dependencies are successful. When a non `[CI:DOCS]` build is successful, gather all binary/release artifacts in a new task which depends on 'Total Success'. This will provide a uniform name (`artifacts`) and URL for downstream users to use. For example: https://api.cirrus-ci.com/v1/artifact/github/containers/podman/artifacts/binary.zip or https://api.cirrus-ci.com/v1/artifact/github/containers/podman/artifacts/binary/FILENAME Where ***FILENAME*** is one of: * `podman` * `podman-remote` * `rootlessport` * `podman-release-386.tar.gz` * `podman-release-amd64.tar.gz` * `podman-release-arm64.tar.gz` * `podman-release-arm.tar.gz` * `podman-release-mips64le.tar.gz` * `podman-release-mips64.tar.gz` * `podman-release-mipsle.tar.gz` * `podman-release-mips.tar.gz` * `podman-release-ppc64le.tar.gz` * `podman-release-s390x.tar.gz` * `podman-remote-release-darwin_amd64.zip` * `podman-remote-release-darwin_arm64.zip` * `podman-remote-release-windows_amd64.zip` * `podman-v4.0.0-dev.msi` Signed-off-by: Chris Evich <cevich@redhat.com>
* | | Merge pull request #13567 from n1hility/upgradesOpenShift Merge Robot2022-03-23
|\ \ \ | |_|/ |/| | Add Windows installer support for upgrades
| * | Add Windows installer support for upgradesJason T. Greene2022-03-19
| |/ | | | | | | | | | | Fixes duplicate installer entries after multiple installs Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* / Fix unreadable netavark logsEd Santiago2022-03-22
|/ | | | | | | | | | | ginkgo netavark logs (and, to a lesser extent, cni logs) are unreadable because the hide-boring-opts code did not know about --network-backend. Now it does. Manually filtered an existing netavark log to confirm there are no other new options we should know about. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #13540 from mheon/fix_11822OpenShift Merge Robot2022-03-18
|\ | | | | Deduplicate between Volumes and Mounts in compat API
| * Add tests with Docker Compose v2Matthew Heon2022-03-17
| | | | | | | | | | | | | | | | | | | | | | Add a pair of new Cirrus test suites using Compose v2 instead of Compose v1 (as is currently packaged in Fedora). They work identically, and run the same tests, as the Compose v1 tests, but with the new v2 binary instead. [NO NEW TESTS NEEDED] This adds an entire Cirrus suite... Signed-off-by: Matthew Heon <mheon@redhat.com>
* | logformatter: link to bats sources on errorEd Santiago2022-03-17
|/ | | | | | | | | | | | | | | We already link to ginkgo sources, now add links to bats. Ugly, because we need to hardcode containers/podman (git repo) and test/system (test file path): those can't be determined from the log results like they can in ginkgo. Also, great suggestion from @Luap99: in addition to the 'Annotated results' link which we append to the basic log, include a short summary of failures. This should help a viewer see exactly which test(s) failed, which in turn can be helpful for diagnosing known-flake or real-problem. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Move all python tests to pytestJhon Honce2022-03-04
| | | | | | | * Add configuration to add report header for python client used in tests * Move report headers into the individual test runners vs runner.sh Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Clarify v2 API testing for podman vs docker clientsChris Evich2022-02-28
| | | | | | Fixes: #13273 Signed-off-by: Chris Evich <cevich@redhat.com>
* Load ip_tables modules at bootPaul Holzinger2022-02-23
| | | | | | | | | | | | | | | | | | Rootless users cannot load the ip_tables module, in fedora 36 this module is no longer loaded by default so we have to add it manually. This is needed because rootless network setup tries to use iptables and if iptables-legacy is used instead of iptables-nft it will fail. To provide a better user experience we will load the module at boot. Note that this is not needed for RHEL because iptables-legacy is not supported on RHEL 8 and newer. [NO NEW TESTS NEEDED] Fixes #12661 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Add containers-common spec and command to podmanDaniel J Walsh2022-02-22
| | | | | | | | | Since containers-common package is tied to specific versions of Podman, add tools to build the package into the contrib directory This should help other distributions to figure out which commont package to ship. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Cirrus: Use updated VM imagesChris Evich2022-02-17
| | | | | | | | | | | Mainly this is to confirm some changes needed for the podman-py CI setup don't disrupt operations here. Ref: https://github.com/containers/automation_images/pull/111 Also includes a minor steup fix WRT setting up for test-rpm build. Signed-off-by: Chris Evich <cevich@redhat.com>