Commit graph

741 commits

Author SHA1 Message Date
Valentin Rothberg 9738f63bac auto-update service: prune images
Extend the systemd auto-update service to prune images after an update
has run.  As reported by a user [1], auto updates can over time cause
the disk to run out of space.  With Edge being a target use case, we
need to make sure that systems can run without much supervision, so
let's make sure to run `podman image prune` to clean up dangling images.

[1] https://twitter.com/r_isc_y/status/1388981737011793921

Fixes: #10190
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-14 14:32:43 +02:00
Paul Holzinger 439a515026 fix incorrect log driver in podman container image
Commit 7f2c27d43f added an invalid value for the log_driver in the
containers.conf file inside the podman image.

Fixes #10312

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-05-12 09:34:59 +02:00
OpenShift Merge Robot 9b9bd9e0e7
Merge pull request #10231 from rhatdan/cleanup
codespell cleanup
2021-05-06 02:31:20 -04:00
OpenShift Merge Robot db48da4d99
Merge pull request #10227 from cevich/podman_image_docs
[CI:DOCS] Minor podmanimage docs updates.
2021-05-05 16:20:09 -04:00
Daniel J Walsh 0d1ebc180e
codespell cleanup
[NO TESTS NEEDED] This is just running codespell on podman

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-05 15:50:59 -04:00
Chris Evich 914eab059d
Minor podmanimage docs updates.
Discovered by review of
https://github.com/containers/buildah/pull/3200

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-05-05 14:59:05 -04:00
Daniel J Walsh 7f2c27d43f
Force log_driver to k8s-file for containers in containers
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-04 14:22:04 -04:00
Chris Evich f8be69e1f3
Don't require tests for github-actions & metadata
Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-30 16:26:48 -04:00
Chris Evich 21bef6db6e
Update container image docs + fix unstable execution
Update the order of image documentation to be from most to least stable.
Similarly, avoid depending on execution of upstream podman, when
building/pushing.  It's easily possible for this build to function but
execution to fail due to some partially implemented feature.

Also, ensure images tagged `latest` are pushed for every matrix
item.  For 'upstream' and 'testing', this replaces use of the
'master' tag.

Lastly, update workflow comments and split the 'podman' and 'containers'
FQIN steps and outputs to improve readability.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-29 11:23:59 -04:00
Chris Evich 0a08216990
Cirrus: Update Ubuntu images to 21.04
Also simplify `lib.sh` after supporting changes incorporated
into automation library 2.x+ (present in all VM and container images).

* No need to force-load `/etc/profile` and handle it's expectation
  to **not** being in `errexit` mode.
* Slightly re-arrange loading of automation library files for
  clarity.
* Update comments.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-27 10:28:09 -04:00
Daniel J Walsh 9c8277247d
Fixes from make codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-21 13:16:33 -04:00
Lokesh Mandvekar 501b4751a3 Fix build with GO111MODULE=off
Distro builds on Fedora and Kubic projects use GO111MODULE=off
by default which are currently failing. This commit fixes it and
going forward, podman CI will also indicate failures in rpm builds.

The additional LDFLAGS have been removed  from the spec file
which is not ideal. But, currently we only use the spec file
to check if the rpm builds fine. We can fix the LDFLAGS in a
later commit when we're working on packit integration.

conmon build has also been removed from podman.spec.in because the COPR
for which it was provided has been discontinued.

[NO TESTS NEEDED]

Fixes: #10009

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2021-04-15 14:24:39 -04:00
Ed Santiago 31e31aa9dd compose test: try to get useful data from flakes
docker-compose test continues to flake even after #9961.
Let's try to get some useful data from the failures, by:

  * adding -S (--show-error) to curl. With just -s (--silent),
    curl is completely quiet. With -S, it displays errors.
    (Not in TAP form, but I'm OK with that)

  * oops, adding safety checks to the fix from #9961 (it
    was inadvertently clobbering the curl exit status)

And, as long as I'm in this code: logformatter was not
highlighting these results, because the '1..N' TAP line
needs to be spit out at the end. Have test-compose emit
a 'TAP' header <http://testanything.org/> and make
logformatter recognize it.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-04-13 15:18:34 -06:00
OpenShift Merge Robot 6933d4611a
Merge pull request #9381 from cevich/add_make_release
Reorganize and overhaul Makefile & release archive workflows
2021-04-12 12:16:44 -07:00
Chris Evich b6b0b6e8bd
Overhaul Makefile binary and release worflows
* Incorporate changes from abandoned #9918: Use dedicated `bin`
  sub-directories for `windows` and `darwin` when building
  `podman-remote`.  The linux flavor remains under `bin` as before.

* Fix MacOS Documentation-generation for release-packaging.
  The `install-podman-remote-%-docs` target requires local execution
  of `podman-remote`, but it was assuming GOOS=linux.  Fix this
  by dynamically discovering the local OS/architecture type while
  still permitting cross-building of MacOS binaries under Linux.

* Unify temporary directory/file behavior to use a common template.
  In case of left-over temporary items left in the repository,
  update the `clean` target accordingly to remove them.

* Fix broken podman-remote-static and MacOS release archive targets
  mismatching the `podman-remote-%` target.  Disambiguate this target
  for all platforms by spelling each out in full, instead of using
  a wild-card recipe.

* Fix Windows-installer target to properly recognize existing
  output files and not constantly rebuild every time.

* Include the podman version number in the Windows-installer target
  in case a user downloads multiple releases.

* Include a subdirectory containing the podman version number for
  both `tar.gz` and `zip` targets.  This prevents users clobbering
  existing directories when un-archiving from releases.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-12 10:21:28 -04:00
Chris Evich de8243453d
Exclude .gitignore from test req.
Also sort the explicit files by name, since the list is growing.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-12 09:59:30 -04:00
Daniel J Walsh adbddac60f
Update podman image Dockerfile to support Podman in container
[NO TEST NEEDED] Can not test this in CI/CD system since it needs to be
merged in order for the Dockerfiles to even work.

Modified the /etc/subuid and /etc/subgid to be able to run in rootless
containers.  The Range can not be the same as on the host.

Add /home/podman/.config/containers/containers.conf to automatically
mount /proc on /proc while inside of the container. This prevents
additional permissions being required that are blocked when not in
--privileged mode.

Setup volumes for /var/lib/containers and
/home/podman/.local/share/containwers

This will prevent the errors where people are doing overlay on overlay.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-12 06:31:08 -04:00
Chris Evich ec88445fc8
Cirrus: Use Fedora 34beta images
Also, revert 4875a8fb

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-07 15:20:06 -04:00
Chris Evich 82a29d24c3
Exempt Makefile changes from test requirements
Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-07 15:19:51 -04:00
Chris Evich 804da7ca07
Cirrus: Make use of shared get_ci_vm container
Depends on:
    https://github.com/containers/automation_images/pull/57
    https://github.com/containers/automation/pull/64
    https://github.com/containers/automation/pull/66
    https://github.com/containers/automation/pull/67
    https://github.com/containers/automation/pull/68

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-05 15:38:04 -04:00
Paul Holzinger d1e32dc6c6 Add rootless docker-compose test to the CI
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
Paul Holzinger d7e003f362 Remove unused rootless-cni-infra container files
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
OpenShift Merge Robot b9e064ab84
Merge pull request #9795 from mheon/bump_320_dev
Bump to v3.2.0-dev
2021-03-29 20:42:03 +00:00
Matthew Heon 637c5d55e1 Bump to v3.2.0-dev
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-03-29 14:03:04 -04:00
Daniel J Walsh 6e250c317c
[NO TESTS NEEDED] Turn on podman-remote build --isolation
Currently podman only works with --isolation chroot.  This PR
fixes this by allowing the isolation mode to default to OCI and to
also allow users to pass the isolation mode into the containers.

The current tests for --isolation should cause this code to be tested.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-26 22:04:14 -04:00
Daniel J Walsh 9ba23be549
[NO TESTS NEEDED] Remove /tmp/containers-users-* files on reboot
Helps Fix https://github.com/containers/podman/issues/9765

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-24 15:58:31 -04:00
Ed Santiago 3baa9da4ed WIP: run buildah bud tests using podman
Set of scripts to run buildah's bud.bats test using
podman build in podman CI.

podman build is not 100% compatible with buildah bud.
In particular:

  * podman defaults to --layers=true; buildah to false
  * podman defaults to --force-rm=true; buildah to false
  * podman error exit status is 125; buildah is 2
  * differences in error messages, command-line arguments

Some of the above can be dealt with programmatically,
by tweaking the buildah helpers.bash (BATS helpers).
Some need to be tweaked by patching bud.bats itself.
This PR includes a patch that will, I fear, need to
be periodically maintained over time.

There will likely be failures when vendoring in a
new buildah, possibly because new tests were added
for new features that don't exist in podman, possibly
(I hope unlikely) if existing tests are changed in
ways that make the patch file fail to apply. I've
tried to write good instructions and to write the run
script in such a way that it will offer helpful hints
on failure. My instructions and code will be imperfect;
I hope they will be good enough to merit continued use
of this test (possibly with improvements to the instructions
as we learn more about real-world failures).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-03-21 06:59:01 -06:00
Matthew Heon e926b5d73e Bump to v3.1.0-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-03-08 15:45:43 -05:00
Matthew Heon aa9616cd4d Bump to v3.1.0-rc1
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-03-08 15:45:40 -05:00
Ed Santiago 79eaadd3fb podman upgrade tests
Initial validation of using podman-in-podman to create an
old-podman root, then use new-podman to play with the
containers created therein.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-02-23 06:58:54 -07:00
Ed Santiago d9655b0f01 pr-should-include-tests: recognized "renamed" tests
git tries to recognize renamed files. This isn't always
as helpful as intended. Turn it off, so we'll always see
files as 'A'dded.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-02-22 07:21:04 -07:00
OpenShift Merge Robot 4d604c1089
Merge pull request #9268 from cevich/podman_monitor
[CI:DOCS] Cirrus: Send cirrus-cron report e-mail to list.
2021-02-10 13:12:38 -05:00
Lokesh Mandvekar 21deafba85 hardening flags for fedora rpmbuilds
This commit sets the CGO_CFLAGS variable for hardening the Fedora rpm
binaries.

The flags used are the same as those in the official Fedora rpms.
Setting the flags in upstream spec would provide early warnings for
flag adjustments or other hardening issues.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2021-02-09 15:48:43 -05:00
Chris Evich 6c75419a8f
Cirrus: Send cirrus-cron report e-mail to list.
This mailing-list was established to allow people to sub/unsub from
automated notifications.  Add it to the list of destinations picked up
by the Github Actions workflow
`.github/workflows/check_cirrus_cron.yml`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-02-08 12:11:16 -05:00
Chris Evich 6a6e868290
Cirrus: Collect ginkgo node logs artifacts
In rare cases, it's possible for one of the ginkgo processes to "hang".
When this occurs, the main output will contain this message:

``Ginkgo timed out waiting for all parallel nodes to report``

The only way to debug this was to look through concatenated printing
of the ginkgo node logs.  This is a tedious and daunting task,
requiring special search knowledge, facing a "wall of text".

Simplify the situation by collecting the node logs separately, as
individual files in a cirrus-artifact.  In this way, it's faster to
figure out which test "hung" by examining each log individually.  The
log file which does not have a pass/fail summary at the end,
indicates the last test hung (for whatever reason), and includes it's
output (if any).

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-02-03 10:44:41 -05:00
OpenShift Merge Robot 735b16e347
Merge pull request #9063 from cevich/master_fix_validate
Cirrus: Fix running Validate task on branches
2021-01-30 06:26:58 -05:00
Chris Evich 8d979e093e
Cirrus: Build static podman-remote
Prior to this commit, the "Static Build" task only produced a
`bin/podman`.  Update this to also include a `bin/podman-remote`
binary.

Update the pr-should-include-tests checker to ignore the `nix`
directory, which isn't applicable.

Lastly, restore the static build task to 'required' for CI success.
Leaving the comment inplace in case it needs to be bypassed in the
future on short notice.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-28 13:58:11 -05:00
OpenShift Merge Robot fb653c43ed
Merge pull request #8585 from Luap99/rootless-net-alias
Add support for rootless network-aliases and static ip/mac
2021-01-28 04:58:28 -05:00
OpenShift Merge Robot 9d59daa7cc
Merge pull request #9082 from saschagrunert/static-build
Fix static build cache by using cachix
2021-01-27 15:18:22 -05:00
Paul Holzinger 1fac43654c Add support for rootless network-aliases
Make sure we pass the network aliases as capability args to the
cnitool in the rootless-cni-infra container. Also update the
dnsname plugin in the cni-infra container.

Fixes #8567

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-27 20:58:03 +01:00
Paul Holzinger c717b3caca Allow static ip and mac with rootless cni network
Make sure we pass the ip and mac address as CNI_ARGS to
the cnitool which is executed in the rootless-cni-infra
container.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-27 17:35:54 +01:00
Chris Evich bfc1b66be1
Cirrus: Fix running Validate task on branches
Followup to dbb9943

Despite skipping the `Smoke` check, it was observed on a *new* branch,
the `validate` task (specifically `git-validation`) will fail.  This
is because:

* `$CIRRUS_LAST_GREEN_CHANGE` will be empty on a new branch.
* `$CIRRUS_BASE_SHA` is always empty for runs triggered by branch-push
* `$EPOCH_TEST_COMMIT` will be set to `YOU_FOUND_A_BUG`.

Fix this by eliminating the `Smoke` task entirely, simplifying all
the `make validate` operations into the `validate` cirrus task.  Ensure
this task does not run when a new branch or tag is pushed.

Also, eliminate the `$CIRRUS_BUILD_ID` value as it's confusing and not
actually used anywhere.  It was formerly used for building VM images,
but this has moved to another repo entirely.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-27 10:35:27 -05:00
Sascha Grunert f8bf509d16
Fix static build cache by using cachix
It looks like we always hit the caching issue in Cirrus CI described
within #8313. A solution around that is to use cachix, which has been
pre-populated from my local machine.

To push all (runtime and build) dependencies, we can leverage a
pre-populated store by:

```
> nix-store -qR --include-outputs $(nix-instantiate nix/default.nix) | cachix push podman
```

The cache can be re-used by everybody to rapidly build static Podman
binaries: https://app.cachix.org/cache/podman

[NO TESTS NEEDED]

Signed-off-by: Sascha Grunert <mail@saschagrunert.de>
2021-01-27 16:15:23 +01:00
Chris Evich 4e4d318b71
Cirrus: Upload swagger YAML in every context
The podman documentation site uses javascript to display
API documentation at:

http://docs.podman.io/en/latest/Reference.html

As input, the javascript sources from a CORS-enabled Google Cloud
Storage object.  This commit ensures the storage object is present and
updated for every Cirrus-CI execution context: Tags, Branches, and PRs.

As of this commit, the documentation site only utilizes the object
uploaded by the Cirrus-CI run on the `master` branch:
`swagger-master.yaml`.  The file produced and uploaded due to a PR is
intended for testing purposes: Confirm it's generation and uploading are
both functional.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-21 10:26:57 -05:00
Valentin Rothberg a3621a7cff Cirrus: add bindings checks
Make sure that bindings are in sync with the code.  The check is similar
to what's already being done with `make vendor`, so integrate the two.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-20 14:38:02 +01:00
OpenShift Merge Robot 54c465bda6
Merge pull request #8911 from edsantiago/prs_must_include_tests
CI: smoke test: insist on adding tests on PRs
2021-01-20 05:57:09 -05:00
Ed Santiago 9f6bb3563d CI: smoke test: insist on adding tests on PRs
On each PR (with a few exceptions), check the list of git-touched
files, and abort if no tests are added. Include instructions
on how to bypass the check if tests really aren't needed.

Include a hardcoded exception list for PRs that only touch a
well-known subset of "safe" files: docs, .cirrus.yml, vendor,
version, hack, contrib, or *.md. This list is likely to need
tuning over time.

Add a test suite, but not one recognized by the new script
(because it's a "*.t" file), so: [NO TESTS NEEDED]

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-01-19 10:45:58 -07:00
Ed Santiago d2ee3d8151 runner.sh : deal with bash 'set -e'
Release trigger script failed[1] because the entire script
runs under 'set -e'; so a 'grep -- -dev' that finds no
results will cause a nonzero exit status and hence the
entire script to fail. Work around that.

 [1] https://cirrus-ci.com/task/4541290882793472

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-01-18 15:10:58 -07:00
Chris Evich 7490402fab
Cirrus: Upd. ext. service check host list
Since CI doesn't depend heavily on installing packages at runtime
(there is some minor use) there's no need to exhaustively check
repository mirror hosts.  Remove them from the list.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-14 09:40:01 -05:00
Ed Santiago 34304df281 CI: fix broken diagnostic message for -dev check
There's a CI check for the presence of "-dev" in podman-info output
(it should not appear). This test is unlikely to fail, but if it
ever does, the diagnostic output is unhelpful. This makes it helpful.

Tested via:

    $ ln -s /bin/echo ~/bin/msg
    $ ln -s /bin/echo ~/bin/die
    $ TEST_FLAVOR=release ./contrib/cirrus/runner.sh
    ...
    Releases must never contain '-dev' in output of 'podman info' ( buildahVersion: 1.19.0-dev
      Version: 3.0.0-dev)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-01-13 10:14:10 -07:00