674 Commits

Author SHA1 Message Date
c2c7dd8ff3 remove contrib/gate
Remove references on contrib/gate.  The gating image is currently not
maintained and was replaced in the CI rewrite.  We can disable builds
in Quay once the change is merged.

Note that running `make validate` in a container is still desired.
A similar approach may be re-added in the future.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-11-17 15:21:50 +01:00
0da801a446 logformatter: highlight timing results
Add a :hover style to rows in the 'integration timing results'
section. Without that, it's really hard for my eye to scan
across and match a time to a test name.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-11-16 14:34:59 -07:00
2993e97dec Merge pull request #6442 from Luap99/podman-autocomplete
Shell completion
2020-11-13 16:46:51 +01:00
e362d438b2 Set podman-auto-update.service Type=oneshot
Signed-off-by: Vilgot Fredenberg <vilgot@fredenberg.xyz>
2020-11-13 11:10:36 +01:00
2e9c94235b Merge pull request #8107 from cevich/measure_testing_stats
Cirrus: Collect runner.sh stats
2020-11-12 20:08:47 +01:00
ae3816614d Install the new shell completion logic
Add a new make target (completion) to generate the shell
completion scripts. This will generate the scripts for bash,
zsh and fish for both podman and podman-remote with `podman completion`.
The scripts are put into the completions directory and can be
installed system wide with `sudo make install.completions`.

This commit replaces the current handwritten scripts for bash and zsh.

The `validate.completion` target has been adjusted to make sure nobody
edits these scripts directly.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-12 11:40:29 +01:00
92e31a2085 Cirrus: update VMs
Reason: include perl-FindBin RPM in f33 VM, needed for
hack/xref-helpmsgs-manpages

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

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-11-11 08:56:08 -07:00
b0601cb34a [CI:DOCS] Restore man page cross-checker
Somewhere in the CIv2 migration we lost the man page vs --help
cross-checker. Add it back, by adding it into the man-page-check
Makefile target; this is part of 'make validate', which is run
in CI even on CI:DOCS PRs.

As happens when CI doesn't run, things broke. Man pages got out
of sync with --help. This PR:

 1) Fixes hack/xref-helpmsgs-manpages to deal with the new
    "Options" (instead of "Flags") form of podman help. #8034
    did part of that, but one of my review comments was
    accidentally left out.

 2) Fixes hack/xref-helpmsgs-manpages to deal with the new
    option syntax in man pages, post- #8292, in which each
    option is preceded by four hashes so as to make them
    HTML <h4> elements with named anchors.

 3) Fixes man pages that #8292 accidentally missed.

 4) Adds man page entries for two flags that got added
    to podman but not documented (pod create --network-alias,
    play kube --log-driver)

Fixes: #8296

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-11-11 08:31:30 -07:00
f44af20561 Cirrus: Detailed CPU/Memory/Time runner.sh stats
On several occasions, there have been questions about CPU/Memory/IO
trends in testing over time. Start collecting this data for all jobs,
using a common/stable format so that trending analysis can be performed
within/across multiple Cirrus-CI builds. This PR doesn't add any related
tooling, it simply arranges for the collection of the data.

Stats generation is done at the orchestration level to guarantee they
reflect everything happening inside `runner.sh`.  For example, the
container-based tests re-exec `runner.sh` inside a container, but
we're only interested in the top-level stats.

Update all tasks to include collection of the stats file.
Unfortunately, due to the way the Cirrus-CI YAML parser works,
it is *not* possible to alias the artifacts collection more clearly,
for example:

```yaml
    always:
        <<: *runner_stats
        <<: *logs_artifacts
```

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-11-09 14:32:39 -05:00
2d50ec6996 Update CI tests to run python docker library against API
* Update reference to docker-py to docker to reflect change in library
  name
* Update tests to create storage sandbox
* Enable all tests that endpoints support
* Refactor containers/{id}/rename to return 404 not 500
* Refactor tests to use quay.io vs. docker.io

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-11-09 10:45:54 -07:00
dc58d4e285 Merge pull request #8241 from rhatdan/tmpfile
Use /tmp/podman-run-* for backup XDG_RUNTIME_DIR
2020-11-06 15:43:33 +00:00
3daef2e826 Use /tmp/podman-run-* for backup XDG_RUNTIME_DIR
We need to block systemd from cleaning up this directory
by dropping a /usr/lib/tmpfiles.d/podman.conf file in place.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-04 15:32:00 -05:00
46498331a3 Cirrus: Use F33beta VM image
Includes disk-space increase for all Fedora images to accommodate
the static-build job disk space requirements.  This job substantially
leverages task-cache, which was previously failing to restore early on
in the Cirrus-CI task setup, due to disk-space limitations.

Also simplify .cirrus.yml slightly by removing an unncessary setup
and run directory change step.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-11-04 09:40:38 -05:00
0ebee0ce8e Cirrus: Workaround F32 BFQ Kernel bug
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-30 09:15:56 -04:00
e439aec4fa Merge pull request #8046 from cevich/simplify_environment
Cirrus: Simplify setting/passing env. vars.
2020-10-29 18:07:29 +01:00
3ba77a5618 Cirrus: Simplify setting/passing env. vars.
Test VMs by design are to be single-purpose, single-use, and
readily disposable.  Therefore it's unnecessary to overcomplicate
storage of runtime environment variables.  This commit makes these
points clear, and reorganizes all CI-related env. vars on the system
into a single location, `/etc/ci_environment`.  This file is then
automatically loaded, and variables exported, (by `lib.sh`) from
`runner.sh` prior to executing all forms of testing.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-29 09:02:31 -04:00
53fe386da0 Cirrus: Use google mirror for docker.io
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-28 12:25:53 -06:00
5d48606dae Cirrus: Always record runc/crun versions
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-28 12:24:06 -06:00
1b4933376f Add a system test to verify --runtime is preserved
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-10-20 09:24:32 -04:00
3858fc1d01 Use runtime names instead of paths in E2E tests
My patches to fix `--runtime /usr/bin/crun` being allowed to use
a different version of the crun runtime revealed a problem: we
were actually relying on that exact behavior in our E2E tests. We
specified the runtime path as `/usr/bin/runc` for the Ubuntu
tests, but that didn't exist, so Podman was actively looking for
a different, usable runc binary and using that, instead of the
path we explicitly hardcoded. Fixing the bug broke this, and thus
broke the tests.

Instead of hard-coding OCI runtime paths, swap to just using the
runtime name, `runc` or `crun`, and letting Podman figure out
where the runtime lives - it's quite good at that. This should
un-break the tests and make them more durable.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-10-20 09:20:33 -04:00
23087f77ae Cirrus: Restore APIv2 Testing
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-13 11:42:31 -04:00
5b7c64cc97 Cirrus: Fix obtaining a CI VM
Also removed automatic exection of setup_environment.sh since most
people using this script are podman developers (not automation/CI
folks).  If executing the automation scripts is necessary, manual
attendance to required variables like `$TEST_FLAVOR` is mandatory.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-07 15:29:43 -04:00
ae0f655652 Cirrus: Fix running shellcheck locally
Also, check the contents of hack/get_ci_vm.sh

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-06 16:01:24 -04:00
e1125558a2 Cirrus CI runner: refactor
While reviewing #6784 I found myself having a lot of trouble
with this script: it was a complicated mix of case statement
and helper functions, requiring a reader to jump back and
forth between the two.

This PR defines a convention such that a given TEST_FLAVOR=foo
must have a corresponding _run_foo() handler function. The
goal is to have all TEST_FLAVOR-related code in one place,
or at least less scattered (integration and system tests
still rely on other helper functions).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-10-06 11:14:29 -06:00
9546638a09 logformatter: run on system tests & bindings
(that got accidentally dropped in the new Cirrus makeover).
Note that 'dotest' does not actually 'do tests', it's
only used for a small subset of tests.

Also, make logformatter work better in the new Cirrus setup.
Remove duplicate test/subtest, remove no-longer-used SPECIALMODE,
and make the Cirrus build/task display a little cleaner.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-10-05 11:31:04 -06:00
0f04cf27c5 Cirrus: Fix branch-validation failure
When validating code on a branch, determining a starting commit to check
from isn't as straightforward as it would seem.  Default to using the
SHA from last time CI was green.  If for some reason that isn't
available, use an obviously wrong value to cause an intentional
failure.  Entirely skip this check on tag-push, since determining a
starting point is incredibly difficult to do automatically.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-05 10:13:24 -04:00
2c9084e224 Cirrus: Implement podman automation 2.0
Reimplement CI-automation to remove accumulated technical-debt and
optimize workflow.  The task-dependency graph designed goal was to
shorten it's depth and increase width (i.e. more parallelism).  A
reduction in redundant building (and 3rd party module download) was
also realized by caching `$GOPATH` and `$GOCACHE` early on.  This
cache is then reused in favor of a fresh clone of the repository
(when possible).

Note: The system tests typically execute MUCH faster than the
integration tests.  However, contrary to a fail-fast/fail-early
principal, they are executed last.  This was implemented due to
debug-ability related concerns/preferences of the primary
(golang-centric) project developers.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-02 11:53:04 -04:00
1784f4f338 Merge pull request #7873 from edsantiago/logformatter_env
logformatter: add Synopsis at top of each page
2020-10-02 11:24:31 -04:00
d380ba0394 logformatter: add Synopsis at top of each page
At the top of each generated page, add a Synopsis table with:

  PR number/name, and link to github
  Author name(s)
  Test name (fedora/ubuntu, rootless, etc)
  Cirrus build ID (usually uninteresting)
  Cirrus task ID (usu. important), with link to Cirrus
  The value of $SPECIALMODE

This is all we can get from the Cirrus environment in
which logformatter runs; we can't get things like
cgroup manager or username that the test runs under.

Note that the table is at the top, which is usually
unseen because we autoscroll to the bottom on
page load. I tentatively think that top is a more
natural place for this info than bottom, but am
willing to listen to arguments against.

Also, one minor tweak: highlight podman commands in
the BATS output. The idea is to make it easier for the eye
to spot those, then copy/paste them to find a reproducer.

And, sigh, disable the new 'podman network create'
system test. It is flaking much too much.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-10-01 20:33:20 -06:00
7c9c159e93 Migrate container images to automation_images
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-01 14:27:32 -04:00
eb56673b3b rootless-cni-infra v3: fix cleaning up DNS entries
Fix "Old DNS entries are not cleaned up" by passing CNI_ARGS to `cnitool del`.

Fix #7789

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-09-30 18:59:39 +09:00
20d90320fc Bump to v2.2.0-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-09-22 11:16:48 -04:00
7bffd49ade rootless-cni-infra: fix flakiness during bringing up lo interface
Fix #7618

This bumps up ROOTLESS_CNI_INFRA_VERSION to 2

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-09-20 00:29:23 +09:00
5095a34135 dependabot-dance: new tool for managing revendor PRs
dependabot seems to submit PRs without running 'make vendor'.
This script automates (with some safety checks) the manual
process for pulling the PR, running 'make vendor-in-container',
and force-pushing the PR.

Usage: ./contrib/dependabot-dance

It should take care of identifying your github repo, finding
all active dependabot branches, running the make, git-add,
and commit, then git-pushing.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-09-17 05:22:49 -06:00
d4bea54dfe move rootless-cni-infra image to quay.io
Move the `rootless-cni-infra` image to `quay.io/libpod/rootless-cni-image:$tag`
where $tag has the format `$version-$architecture`.  Whenever we upload
a new image (e.g., after changing the Containerfile), we need to make
sure to increase the version number (an ordinary integer for simplicity) so we
have a notion of support.

Thanks to @AkihiroSuda for working on rootless CNI!

Fixes: #7617
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-15 10:14:34 +02:00
526f01cdf5 Fix up errors found by codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-11 06:14:25 -04:00
2f0e803e76 Merge pull request #7460 from AkihiroSuda/allow-rootless-cni
rootless: support `podman network create` (CNI-in-slirp4netns)
2020-09-10 14:00:49 -04:00
ed1e87ecb5 Cirrus: Obsolete CI:IMG process & related files
All VM-building functionality has been migrated to
https://github.com/containers/automation_images

Some container-build functions are still maintained here
but are on a very-short list to also be migrated to
the repository linked above.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-09-09 13:46:52 -04:00
d34868a136 add contrib/rootless-cni-infra
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-09-09 15:45:56 +09:00
11679c27a7 Merge pull request #7538 from edsantiago/cap_test_robust
Update VM images for new crun; adapt Cap tests to work with new kernel
2020-09-08 10:40:39 -04:00
38f7084d35 [CI:DOCS] Add note on run image fuse problem - try 2
We've recently had a number of issues reported against our
pre-fabricated images on quay.io and a couple of rhel repositories
throwing a fuse error when run:
```
fuse: device not found, try 'modprobe fuse' first
```

The tip on modprobe fuse is not always seen by or displayed to
the end user.  Adding a couple of doc pointers to hopefully help.
Arises from this BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1867892
and several others.

Replaces: 7453 where I was going crazy with whitespace and merge issues.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-09-04 07:18:09 -04:00
36caf4ee44 WIP: update VM images
(This is an adoption of #7533 because Brent is on PTO).

Pick up new crun and crio-runc.

Also: renames from useful fedora-32 and -31 to less-useful
names; presumably this is needed by something-something in
the new VM setup.

Also: tweak two e2e tests to more properly handle a kernel
(5.8.4) with a greater set of capabilities than what we
or crun can yet handle.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-09-03 14:08:34 -06:00
053cbd5e0c use crio runc on CICID ubuntu
when running CICD on Ubuntu where no cgroups v2, we need to use a newer runc for things like seccomp and the default ubuntu runc
 is not new enough.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-08-31 16:40:22 -05:00
ba9f18e2b8 Use bash binary from env instead of /bin/bash for scripts
It's not possible to run any of the scripts on distributions which do
have `bash` not in `/bin`. This is being fixed by using `/usr/bin/env
bash` instead.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-17 10:42:23 +02:00
ca4423e94d Merge pull request #7237 from TomSweeneyRedHat/dev/tsweeney/imagedoc
[CI:DOCS] Update podmanimages README.md
2020-08-15 12:48:06 +02:00
0f4e2be073 podman.service: use sdnotiy
Commit 2b6dd3fb4384 set the killmode of the podman.service to the
systemd default which ultimately lead to the problem that systemd
will kill *all* processes inside the unit's cgroup and hence kill
all containers whenever the service is stopped.

Fix it by setting the type to sdnotify and the killmode to process.
`podman system service` will send the necessary notify messages
when the NOTIFY_SOCKET is set and unset it right after to prevent
the backend and container runtimes from jumping in between and send
messages as well.

Fixes: #7294
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-08-13 17:53:59 +02:00
8e4842a14d Merge pull request #7299 from jobcespedes/patch-1
add xz as a recommended pkg
2020-08-12 13:08:54 -04:00
6ff42395d0 podman-remote fixes for msi and client
correct small typo that sets the path on windows via the msi xml.

in the remote client, prompt for SSH password when no identity or alternate means of authentication are provided.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-08-12 09:19:52 -05:00
c817e5ab2b add xz as a recommended pkg
xz package is required by buildah and podman when building a
image and ADD a tar.xz file archive is used

See https://github.com/containers/buildah/issues/2525

Signed-off-by: Job Cespedes Ortiz <jobcespedes@gmail.com>
2020-08-11 14:57:34 -06:00
df0ad51075 Merge pull request #7270 from Fodoj/master
Allign container image storage configuration with Buildah
2020-08-10 19:41:30 -04:00