Commit graph

374 commits

Author SHA1 Message Date
OpenShift Merge Robot 56b2937f87
Merge pull request #13653 from jmontleon/fix-manifest-push-header
Resolves #13629 Add RegistryAuthHeader to manifest push
2022-03-27 13:13:42 +02:00
jason 3cc1739373 Resolves #13629 Add RegistryAuthHeader to manifest push
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
2022-03-26 16:39:11 -04:00
OpenShift Merge Robot 4d271912e8
Merge pull request #13602 from edsantiago/size_check_part2
Binary growth check, part 2 of 2
2022-03-24 18:47:51 +01:00
OpenShift Merge Robot f049cba47c
Merge pull request #13559 from cevich/success_artifacts
[CI:BUILD] Cirrus: Publish binary artifacts on success
2022-03-23 14:03:46 +01:00
Ed Santiago 88d4db009e Binary growth check, part 2 of 2
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>
2022-03-22 13:17:10 -06:00
Chris Evich 1a7f5b3d51
Cirrus: Publish binary artifacts on success
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>
2022-03-22 11:01:45 -04:00
Ed Santiago 501355d4a5 Fix unreadable netavark logs
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>
2022-03-22 08:56:36 -06:00
OpenShift Merge Robot 3853ef9b59
Merge pull request #13540 from mheon/fix_11822
Deduplicate between Volumes and Mounts in compat API
2022-03-18 12:48:41 +01:00
Ed Santiago d3e3ea843e logformatter: link to bats sources on error
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>
2022-03-17 14:25:09 -06:00
Matthew Heon bde3ca8c36 Add tests with Docker Compose v2
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>
2022-03-17 14:29:48 -04:00
Jhon Honce dca2e7924b Move all python tests to pytest
* 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>
2022-03-04 10:35:29 -07:00
Chris Evich dbf34bfe70
Clarify v2 API testing for podman vs docker clients
Fixes: #13273

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-28 13:15:07 -05:00
Chris Evich 632c089cc6
Cirrus: Use updated VM images
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>
2022-02-17 16:38:42 -05:00
Ed Santiago 7a83d16f95 [CI:DOCS] logformatter: handle python logs
We've got some python tests running in CI, and they're really hard
to troubleshoot. This PR:

  1) colorizes python unittest lines (ok / skipped / fail), and
  2) links to source files

The color is nice for skimming, but it's the linking that might
make it much easier to diagnose future failures.

(Context: failure today in test/python/docker/compat/test_images.py)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-02-16 06:31:05 -07:00
Chris Evich 642a691cbb
Cirrus: Add netavark/aardvark system test task
Also add a system-test that verifies netavark driver is in use when
magic env. var. is set.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-03 13:07:56 -05:00
Chris Evich ebbf10ae8c
Cirrus: Log netavark/aardvark binary build info.
Enabled by:
* https://github.com/containers/netavark/pull/191
* https://github.com/containers/aardvark-dns/pull/36

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-03 11:03:20 -05:00
OpenShift Merge Robot ef9a734d6e
Merge pull request #12814 from cevich/netavark
Cirrus: Add e2e task w/ upstream netavark
2022-02-01 14:55:36 -05:00
Lokesh Mandvekar e7bdd1260b
CI: fix nightly builds
Nightly builds were failing on CI ever since the Makefile change to have
install target independent of build targets.
See: e4636ebdc8

This commit ensures everything is built before installation.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-01-31 11:47:39 -05:00
Lokesh Mandvekar e4636ebdc8 Makefile: install targets independent of build
Building from source would involve separate `make` and `make install`
steps.

This removes a lot of unnecessary `-nobuild` targets which were
otherwise needed for packaging.

This commit also removes spec files for unused copr jobs.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-01-25 08:27:44 -05:00
Chris Evich 29e89da1a2
Github workflow: Send e-mail on job error
This job is designed to be silent when Cirrus-cron executions pass.
Unless specifically instructed, the workflow itself will also remain
silent if there's an error.  Fix this by catching workflow errors and
sending a notification e-mail containing a link to the failed run.  This
also requires listing the recipient addresses directly in the workflow.
Otherwise (as previouslly implemented) the value would not be retrieved
if/when any previous step raised an error.

**Note**: Due to the way this workflow is implemented, there is no way
easy way to test it other than directly on the `main` repo. branch.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-01-24 15:41:50 -05:00
Chris Evich 8842dab686
Cirrus: Also download aardvark-dns binary
This involves a minor code-change so the download/install can run in a
loop for the two different repositories and binaries.  Given everything
is exactly the same except the URLs and names.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-01-24 11:06:55 -05:00
Chris Evich b381d7565a
Cirrus: Add e2e task w/ upstream netavark
This PR adds the CI mechanisms to obtain the latest upstream netavark
binary, and set a magic env-var to indicate e2e tests should execute
podman with `--network-driver=netavark`.  A future commit implement
this functionality within the e2e tests.

Due to the way the new environment is enabled, the standard task name
is too long for github to display without adding ellipsis.  Force the
custom task name `Netavark Integration` to workaround this.  At some
future point, when netavark is more mainstream/widely supported, this
custom task and upstream binary install can simply be removed - i.e.
netavark will simply be used by default in the normal e2e tasks.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-01-24 11:06:55 -05:00
OpenShift Merge Robot 094b11cbcb
Merge pull request #12908 from Luap99/network-conf-dir
rename --cni-config-dir to --network-config-dir
2022-01-18 15:42:06 -05:00
Paul Holzinger c0e0723463
rename --cni-config-dir to --network-config-dir
Since this option will also be used for netavark we should rename it to
something more generic. It is important that --cni-config-dir still
works otherwise we could break existing container cleanup commands.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-18 19:28:25 +01:00
Ed Santiago 471a4356bf CI: rootless user: also create in some root tests
viz, rootful system tests. The rootless account will be
used by image-scp tests.

Unfortunately, having ssh available means the system-connection
tests will start running, which is very bad because they will
fail, because system connection doesn't actually work (long story).
Add a few more checks to prevent this test from running.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-01-17 14:40:30 -07:00
Chris Evich 799078216b
Cirrus: Freshen VM images
Specifically, this brings in `crun 1.4-1` allowing removal of a
temporary workaround.  Ref:

https://github.com/containers/podman/pull/12759

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-01-10 14:50:17 -05:00
Daniel J Walsh 7a24be6ad9
Fix CI
crun should be available in f35.

[ NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-06 09:21:28 -05:00
OpenShift Merge Robot cbb2b68fc9
Merge pull request #12429 from cdoern/scp
podman image scp never enter podman user NS
2022-01-05 17:50:37 +01:00
cdoern f6d00ea6ef podman image scp never enter podman user NS
Podman image scp should never enter the Podman UserNS unless it needs to. This allows for
a sudo exec.Command to transfer images to and from rootful storage. If this command is run using sudo,
the simple sudo podman save/load does not work, machinectl/su is necessary here.

This modification allows for both rootful and rootless transfers, and an overall change of scp to be
more of a wrapper function for different load and save calls as well as the ssh component

Signed-off-by: cdoern <cdoern@redhat.com>
2021-12-23 10:10:51 -05:00
Giuseppe Scrivano fca66b6cb5
ci: force scratch build for crun
force a version with this fix: https://github.com/containers/crun/pull/819

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-12-21 15:49:32 +01:00
Chris Evich a63035be20
Cirrus: Use cached swagger binary
An error was observed in another PR while downloading the swagger
binary.  The error was relating to the upstream egress quota.  Obviously
our downloading it every time for each CI run isn't helping.  Fix this
by moving the download into the image-build process, and simply re-use
the already present binary here.

Ref: https://github.com/containers/automation_images/pull/103

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-12-09 12:14:44 -05:00
Chris Evich 851349345b
Cirrus: Remove remnants of nix-based static build
Simply a readme update and dead-code cleanup.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-12-06 16:00:17 -05:00
Ed Santiago aafbaa4975 [CI:DOCS] logformatter: fix corner case with links
A test name beginning with non-alpha, e.g., "--build should ...",
was not being recognized and linkified:

   https://storage.googleapis.com/cirrus-ci-6707778565701632-fcae48/artifacts/containers/podman/6500723916537856/html/int-podman-fedora-34-rootless-host.log.html

Fix that. Also fix two other cases (single/double quotes) that were
resulting in weird unreliable links.

While I'm at it, add a few usability enhancements:

  * Colorize [SKIPPING] and [SLOW TEST]
  * Deemphasize '[It] testname' when it appears mid-test
  * Replace 'Running:' with a (deemphasized) '#' or '$' prompt

Add regression tests

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-12-02 12:28:13 -07:00
Ed Santiago d5c3cc9496 Bindings test: emit GIT_COMMIT, for links in logs
Add a magic 'echo' to runner.sh, displaying $GIT_COMMIT in
a special syntax. The logformatter script, seeing this,
will hyperlink error messages to the failing source file.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-11-24 07:42:11 -07:00
Chris Evich 7f52bd8437
Cirrus: Bump Fedora to release 35
The Fedora 35 cloud images have switched to UEFI boot with a GPT
partition. Formerly, all Fedora images included support for runtime
re-partitioning. However, the requirement to test alternate storage
has since been dropped/removed.  Rather than maintain a disused
feature, and supporting scripts, these Fedora VM images have reverted
to the default: Automatically resize to 100% on boot.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-18 13:50:11 -05:00
Chris Evich 3ee2d2367a
Cirrus: Partially revert catatonit --force install
VM Images created as of this commit contain the new/required version.
Remove the `--force` install, but retain the hack script's ability to
support this in the future.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-18 13:50:11 -05:00
Chris Evich 5bd43fbea7
Cirrus: Workaround log_driver=journald setting
In F35 the hard-coded default (from
containers-common-1-32.fc35.noarch) is 'journald' despite
the upstream repository having this line commented-out.
Containerized integration tests cannot run with 'journald'
as there is no daemon/process there to receive them.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-18 13:50:11 -05:00
Chris Evich 155a443a91
Cirrus: Timeout bindings test after 30m
During initial testing of Fedora 35beta VM images in CI, the bindings
task was timing out.  In order to allow time for collection of system
details (logs), execution needs to timeout earlier than the task.
Under normal conditions, the bindings test finishes in about 10-minutes.
Use the ginkgo timeout option to limit execution, so it times out after
30 minutes.

Also add the `-progress` option so the output more closely resembles how
ginkgo runs the integration tests.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-18 13:50:11 -05:00
Valentin Rothberg c8790bfbbb cirrus: force-install catatonit
A temporary workaround until the CI images are updated.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-11-15 12:53:25 +01:00
Ed Santiago 2ed31f9f1d Minor test tweaks
- remove 'NO TESTS NEEDED' as a valid bypass string. Henceforth
  only 'NO NEW TESTS NEEDED' will work.

- add a debugging aid for #11871, in which bodhi tests time out
  in nslookup.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-11-08 14:23:55 -07:00
Jhon Honce e907f095b2 test connection add
* Fix connection JSON encoding
* Add custom ginkgo matchers for connection testing
* Cleanup code

Fixes #11984

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-11-08 09:20:58 -07:00
Chris Evich 9c34bd52fd
Cirrus: Authorize rootless user self-ssh
Future testing needs dictate rootless (in addition to root) users are
able to ssh to localhost.  Add ssh-key generation commands for the
rootless user, and authorize their public key.

Minor: Also remove update of `/etc/sub{uid,gid}` files, since this is
now done automatically by `{user,group}add` commands.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-01 12:05:05 -04:00
Valentin Rothberg e86549b18d cirrus: containers: mount directory in /var/tmp to /tmp
Mount a directory from /var/tmp to /tmp to make sure that /tmp is not on
an overlay mount.  This should make overlay mounts possible in the
containerized tests which we're currently skipping.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-10-26 13:51:45 +02:00
Paul Holzinger 3ba69dccf7
rootlessport: reduce memory usage of the process
Don't use reexec for the rootlessport process, instead make it a
separate binary to reduce the memory usage. The problem with reexec is
that it will import all packages that podman uses and therefore loads a
lot of stuff into the heap. The rootlessport process however only needs
the rootlesskit library.
The memory usage is a concern since the rootlessport process will spawn
two process per container which has ports forwarded. The processes stay
until the container dies. On my laptop the current reexec version uses
47800 KB RSS. The new separate binary only uses 4540 KB RSS. This is
more than a 90% improvement.

The Makefile has been updated to compile the new binary and install it
to the libexec directory.

Fixes #10790

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-10-12 21:43:11 +02:00
Ed Santiago 521c0cbd1c It really should be no **NEW** tests needed
Accept both "NO TESTS NEEDED" and "NO NEW TESTS NEEDED".
That was a usability mistake I made on Day One. Fixed it
in Buildah but oops never got around to fixing it here.

Also, fix the test suite script: remove a no-longer-working
test case (changelog.txt, removed in #11467) and add a new
test for commits that include the magic string.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-10-04 19:23:38 -06:00
Chris Evich d6b9451b49
Cirrus: Fix defunct package metadata breaking cache
Original workaround https://github.com/containers/podman/pull/11821

During VM image build, a number of packages are downloaded but not
installed, since they may interfere with some testing.  Then at runtime,
where required, the packages are installed from cache and used.
However, between image build and runtime it's possible the repository
contents change, which will invalidate the package cache.  Since the
`--no-download --ignore-missing` options were used, the install will
fail.

Ref: https://github.com/containers/automation_images/issues/95

Fortunately, when it comes to the docker packages, no other dependencies
are required and so `apt-get` isn't required.  Switch to using a simple
dpkg install command on the necessary files.  If this ever breaks due
to new dependencies, the list of files may simply be updated.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-10-01 15:45:51 -04:00
Valentin Rothberg 0b5a2b7468 cirrus: gitlab: download packages
It looks like the containerd.io package is not present anymore in the
package cache which ultimately breaks CI since it's a requirement for
docker.

Hence, download the few packages instead of relying on the cache.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-10-01 10:34:44 +02:00
Chris Evich f76fa3475d
Cirrus: Add gitlab podman runner test
Add execution of the downstream gitlab-runner tests using
rootless podman through the magic of socket-level
docker compatibility.  Include a comment suggesting how
to temporarily disable the test in case it fails beyond
podman code scope.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-09-27 10:37:31 -04:00
Chris Evich 319fcf52fc
Cross-build release-archives w/ arch in filename
Fixes #11417

Cross-building the podman-remote documentation requires a functional
native architecture executable.  However `make` only deals with
files/timestamps, it doesn't understand if an existing binary will
function on the system or not.  This makes building cross-platform
releases incredibly accident-prone and fragile.

A practical way to deal with this, is via multiple conditional (nested)
`make` calls along with careful manipulation of `$GOOS` and `$GOARCH`.
Also, when cross-building releases be kind to humans and cleanup
any non-native binaries left behind.

Update the `Alt Arch. Cross` Cirrus-CI task to build release archives
for all Linux architectures supported by golang and podman.  Update
the `OSX Cross` task to additionally build for the M1 (arm64)
architecture.

Finally, update the release process documentation to reflect the
new locations (Cirrus-CI task names) for the release archives.  Include
a note about additional manual work being required to produce the
signed `.dmg` file for MacOS.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-09-21 14:34:30 -04:00
Paul Holzinger 1bcd006c5f
CI: load ipv6 kernel modules for rootless tests
Rootless cni with ipv6 needs the `ip6_tables` module loaded, normally
the cni plugins will load this module but as rootless it does not have
the necessary permission to do so. Therefore we load it manually.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-15 20:00:28 +02:00