Commit graph

847 commits

Author SHA1 Message Date
Giuseppe Scrivano 81632722ea
systemd: enable all cgroups when running as a service
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>
2022-03-30 15:49:06 +02:00
Chris Evich f6963cea13
Cirrus: Build multi-arch images + manifests
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>
2022-03-28 16:56:28 -04:00
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
Daniel J Walsh ffbab30d7b
Run codespell to cleanup typos
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-03-25 15:34:41 -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
OpenShift Merge Robot ad123687d0
Merge pull request #13567 from n1hility/upgrades
Add Windows installer support for upgrades
2022-03-23 01:35:15 +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
Jason T. Greene 36ff8f2b38 Add Windows installer support for upgrades
Fixes duplicate installer entries after multiple installs

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-03-19 19:37:24 -05: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
Paul Holzinger eab5a4cfb7
Load ip_tables modules at boot
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>
2022-02-23 16:11:19 +01:00
Daniel J Walsh 80c5962dba
Add containers-common spec and command to podman
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>
2022-02-22 14:38:57 -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
OpenShift Merge Robot a429dcd2ab
Merge pull request #13241 from edsantiago/logformatter_do_python
[CI:DOCS] logformatter: handle python logs
2022-02-17 11:56:37 -05:00
Chmouel Boudjnah 13f6261f84
increase subuid and subgid in image
increase the number of ids available to the podman users when running as
rootless.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2022-02-16 20:00:47 +01: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
tomsweeneyredhat 40ba9f10e5 Make the hello image leaner
[NO TESTS NEEDED]

Change from using a bash script to a c file
for running the image.  With thanks to discussions
with @afbjorklund, the Containerfile was rigged
up to make the final image be only KB's in size.

Also add USER 1000 to make the image test/run as
non-root, and update the README.md

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-02-10 15:45:04 -05:00
Valentin Rothberg 411fca0b3d helloimage: header symmetry
Make the header symmetric by adding a whitespace before the `!` on the
righthand side.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-02-09 14:57:16 +01: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
tomsweeneyredhat 012e24b791 [CI:DOCS] Add a hello world image to quay.io
[NO NEW TESTS NEEDED]

This commit describes how to run the quay.io/podman/hello
image.  It also contains the files necessary to build that
image localy, and a README.md explaining the image and how
to build it.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-02-01 16:35:33 -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
Jason T. Greene 2d0b5ebb5b Implement API forwarding for podman machine on Windows
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-01-19 13:03:49 -06: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
OpenShift Merge Robot ea2656dc86
Merge pull request #12880 from eriksjolund/replace_master_branch_links_with_main_branch_links_in_docs
[CI:DOCS] fix default branch links
2022-01-17 12:45:18 +01:00
Erik Sjölund 3c2a5947c2 fix default branch links
* Replace https://github.com/containers/podman/blob/master
  with https://github.com/containers/podman/blob/main
  to match the new default branch "main". Previously
  the default branch was "master". This is the only
  occurence found in the code.

* Replace https://raw.githubusercontent.com/containers/libpod/master
  with https://raw.githubusercontent.com/containers/podman/main

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-15 22:08:42 +01:00
Erik Sjölund d6e55577cf [CI:DOCS] fix default branch links
* Replace https://github.com/containers/podman/blob/master
  with https://github.com/containers/podman/blob/main
  to match the new default branch "main". Previously
  the default branch was "master". The substitutions were
  made in the documentation but not the code.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-15 20:56:19 +01: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
Jason T. Greene a8a3e8bc99 Fix type-o in podman.wxs
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-01-09 21:00:02 -06: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
Jason T. Greene 3ac5999f85 Switch to a new installer approach using a path manipulation helper
Fixes #11089 - cleanup PATH on MSI uninstall
Additionally fixes scenarios where the path can be overwritten by setx
Also removes the console flash, since the helper is built as a silent gui
Helper executable can be rerun by user to repair PATHs broken by other tools
Utilizes executable location instead of passed parameters to remove delicate escaping requirements

[NO NEW TESTS NEEDED]

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2021-12-23 00:29:10 -06: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