Commit graph

374 commits

Author SHA1 Message Date
Valentin Rothberg dc80267b59 compat handlers: add X-Registry-Auth header support
* Support the `X-Registry-Auth` http-request header.

 * The content of the header is a base64 encoded JSON payload which can
   either be a single auth config or a map of auth configs (user+pw or
   token) with the corresponding registries being the keys.  Vanilla
   Docker, projectatomic Docker and the bindings are transparantly
   supported.

 * Add a hidden `--registries-conf` flag.  Buildah exposes the same
   flag, mostly for testing purposes.

 * Do all credential parsing in the client (i.e., `cmd/podman`) pass
   the username and password in the backend instead of unparsed
   credentials.

 * Add a `pkg/auth` which handles most of the heavy lifting.

 * Go through the authentication-handling code of most commands, bindings
   and endpoints.  Migrate them to the new code and fix issues as seen.
   A final evaluation and more tests is still required *after* this
   change.

 * The manifest-push endpoint is missing certain parameters and should
   use the ABI function instead.  Adding auth-support isn't really
   possible without these parts working.

 * The container commands and endpoints (i.e., create and run) have not
   been changed yet.  The APIs don't yet account for the authfile.

 * Add authentication tests to `pkg/bindings`.

Fixes: #6384
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-29 15:39:37 +02:00
Chris Evich 8d54e4855c
Cirrus: Fix image-name hints
This properly prints out image-name hints when executing the hack script
without any arguments.  It is required due to changes made by Ed for
test-name beatification.  An identical change was made and reviewed by
Ed in the containers/storage repo.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-05-14 15:00:34 -04:00
Chris Evich 6479b54f41
Cirrus: Update Ubuntu 18 to 20
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-05-14 15:00:34 -04:00
Matthew Heon 440e97c2c0 Remove libpod.conf from repo
Now that we're shipping containers.conf, we don't want to provide
a libpod.conf anymore. This removes libpod.conf from the repo and
as many direct uses as I can find.

There are a few more mentions in the documentation, but someone
more familiar with containers.conf should make those edits.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-05-12 14:15:44 -04:00
Brent Baude a4c607cc71 set binding tests to required
some small fix ups for binding tests and then make them required.

update containers-common

V2 bindings tests were failing because of changes introduced in commit
a2ad5bb.

Fix some typos.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

in the case where the specgen attribute for Env and Labels are nil, we should should then make the map IF we have labels and envs that need to be added.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-08 09:05:37 -05:00
Chris Evich 50cb32fdfb
CI:DOCS: Document API docs + CORS maintenance
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-05-06 15:52:53 -04:00
Chris Evich 6e60772dc3
Cirrus: Utilize new base images
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-04-30 13:21:03 -04:00
Chris Evich 7c44c05425
cirrus: Update to Fedora 32 proper
Now that it's officially released, update to it from the beta.  Also
(and significant), adjust the SELinux context of the GCP metadata
service.  Add a comment to the code explaining why this is necessary.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-04-30 13:21:03 -04:00
Chris Evich 97ecd21b59
Cirrus: Unify package installation
Also, test-build critical container images depended upon for
CI-purposes.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-04-24 08:22:50 -04:00
Chris Evich d2d9722454
Cirrus: Add support for Fedora 32
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-04-20 14:22:23 -04:00
Chris Evich e282c88d2c
Cirrus: More Ubuntu 19 + Fedora 31
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-04-20 14:22:23 -04:00
Ed Santiago 1be8a34f5e Log formatter: add BATS summary line
BATS emits a summary line (number of tests passed/failed)...
but only on a tty or when run with --pretty! In our CI
context, with TAP output, it gives no end summary.

Fix that. Keep track of 'ok', 'not ok', and 'skipped',
and display the counts at the end.

Also: add a regression test. You don't need to review
or even read it: it's stark, and I'm not even enabling
it for CI because it almost certainly won't run due to
missing Perl library modules. It's just something I
need on my end.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-04-17 08:12:09 -06:00
Ed Santiago 55eea9127a logformat: handle apiv2 results, add anchor links
apiv2 tests emit TAP-compliant output; recognize it and
highlight it the same way we do BATS tests.

Add anchor links to TAP output, so other tools (e.g.
cirrus-flake-summarize) can link to particular lines

And, remove a "-f" from "wait" in test-apiv2; looks
like there's some version of bash used in some CI VM
that doesn't grok it.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-04-08 12:10:24 -06:00
Chris Evich 19c3b5462f
Cirrus: Minor docs update
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-03-30 16:00:01 -04:00
OpenShift Merge Robot 17ad800905
Merge pull request #5368 from cevich/opensuse_ubuntu_packages
Opensuse openbuild ubuntu + buildah packages
2020-03-28 10:50:10 +01:00
OpenShift Merge Robot debd6face3
Merge pull request #4340 from cevich/libseccomp_update
Log libseccomp package version
2020-03-28 10:47:32 +01:00
OpenShift Merge Robot b743f60a4b
Merge pull request #5479 from cevich/auto_release
Cirrus: Disable non-docs release processing
2020-03-23 14:36:30 +01:00
Chris Evich 6ac04366ee
Cirrus: Enable future installing buildah packages
Many of the packages required for CI in buildah overlap with libpod.
When building new VM images, attempt to source a package list
from the buildah repository.  If found, also install the listed
packages on the VM.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-03-19 12:28:24 -04:00
Chris Evich e810dd135e
Cirrus: Include packages for buildah CI
Also, move some setup steps at VM image build time to save runtime.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-03-19 12:28:24 -04:00
Chris Evich 4c9b021533
Cirrus: Update Ubuntu base images
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-03-19 12:28:24 -04:00
Chris Evich 7cbdd48f78
Cirrus: Use opensuse open build Ubuntu packages
This is necessary as the projectatomic PPA is no longer maintained.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-03-19 12:28:24 -04:00
Brent Baude 14186ca28e fix timeout file flake
this is a temporary fix for the flake that has been troubling us.  once conmon is in fedora 30 and 31 stable, we can remove this fix.  the images will just need to be rebuilt.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-03-17 15:44:39 -05:00
Ed Santiago 3003384785 Four small CI fixes:
1) 'podman system info' (in logcollector): has been silently
     failing in special_testing_rootless, with:
       logcollector.sh: line 16: podman: command not found
     Use ./bin/podman instead of just podman; this is probably
     the right thing to do in the general case anyway

  2) logformatter: highlight 'panic:', seen in bindings test:
        https://storage.googleapis.com/cirrus-ci-5385732420009984-fcae48/artifacts/containers/libpod/6693715108429824/html/integration_test.log.html

  3) logformatter: handle Unicode bullet in front of 'Running',
     seen in bindings test.

  4) logformatter: turn down contrast on BATS 'ok' results,
     for legibility

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-03-16 11:37:27 -06:00
Chris Evich 9215eb0331
Cirrus: Disable non-docs release processing
Detecting when it's time to upload a release inside Cirrus-CI is really
difficult for many automation and human reasons.  Disabling it for now
until a more robust solution can be implemented

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-03-12 15:41:03 -04:00
Brent Baude 194759b96e turn off color-mode for bindings
the binding ginkgo tests were using color mode which throws in a bunch of ansi garbage that makes it hard to read the logs

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-03-12 13:45:56 -05:00
Daniel J Walsh ac354ac94a
Fix spelling mistakes in code found by codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-03-07 10:30:44 -05:00
Brent Baude 8b5e2a6297 add default network for apiv2 create
during container creation, if no network is provided, we need to add a default value so the container can be later started.

use apiv2 container creation for RunTopContainer instead of an exec to the system podman. RunTopContainer now also returns the container id and an error.

added a libpod commit endpoint.

also, changed the use of the connections and bindings slightly to make it more convenient to write tests.

Fixes: 5366
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-03-06 14:31:45 -06:00
OpenShift Merge Robot 60e9e7ca9c
Merge pull request #5039 from cevich/fix_gobin_exit_bug
Cirrus: Fix gate image & false-positive exits
2020-03-05 19:28:10 +01:00
Ed Santiago 1814638000 CI: format cirrus logs
This introduces a new cirrus helper script, logformatter.
Usage is:

    [commands...] | logformatter TEST-NAME

It reformats its input into a readable, highlighed, linkable
form. Some features:

   - boring stuff (timestamps, standard podman options) is
     deemphasized
   - important stuff (warnings, errors) is emphasized
   - in-page links to the actual failures
   - active links to source files
   - jumps to bottom of page on load, because that's where
     the errors are. (All errors are linked)

Add it to select test commands (integration, system) and
add a new artifacts_html, run in the 'always' block, which
uploads generated *.log.html into Cirrus; from there we
generate a live URL that can be viewed in browser.

Unfortunately, due to security concerns in Cirrus, it is
not currently possible to make the link a live one.

Kludge: add a line of dashes after Restoring images; without this,
the first test ("systemd PID 1") has no dashes before it, so
logformatter doesn't see it.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-03-02 15:55:05 -07:00
Ed Santiago 5612089412 CI: add API v2 tests
API v2 has been quiet for a few days, and the test script is
actually passing. Let's take advantage of this opportunity
to get them running in CI.

Requires adding a check for cgroupsv2

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-03-02 13:19:42 -07:00
Chris Evich d0782e7839
Cirrus: Fix gate image & false-positive exits
A number of scripts relating to tooling used and the gate container
image were not exiting upon errors as intended.  Coupled with
external service unavailability (i.e. downloading golangci-lint)
was observed to cause difficult to debug failures.

This change corrects the scripts inside/out of the gate container as
well as fixes many golang related path consistency problems vs other CI
jobs.  After this change, all jobs use consistent path names reducing
the number of special-case overrides needed.

Lastly, I also made a documentation-pass, updating/correcting as needed,
including documenting a likely local validation-failure mode, related to
`$EPOCH_TEST_COMMIT`.  This is dependent on the developers git
environment, so documentation is the only possible "fix".

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-03-02 08:50:54 -05:00
Chris Evich 0885f76742
Cirrus: Force runc use in F30
Suspect crun might be sneaking in during VM image build via podman RPM
dependency.  Add it to the removal list when building, then also force
use of runc at runtime in F30.

Also quote all true/false vars to force them as strings instead of
booleans (which will become capitalized)

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-28 10:37:31 -05:00
Chris Evich c96eb612e5
Cirrus: Remove unnecessary handle_crun workaround
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-28 09:54:36 -05:00
Chris Evich e874b5b222
Cirrus: Print env. vars at end of setup.
There are a number of env. vars set during the setup script.  Therefore
displaying them at end of the script is more helpful for debugging.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-28 09:54:36 -05:00
Chris Evich 42f04bbdaf
Cirrus: Fix not growing Fedora root
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-28 09:54:35 -05:00
Ed Santiago cabd6c1607 CI: package_versions: include hostinfo, kernel
In the package_versions CI step, include Fedora/Ubuntu
version, uname -r, and cgroups version.

Cgroups version is simply the FS type of /sys/fs/cgroup,
which shows 'tmpfs' for v1 and 'cgroup2fs' for v2. I
don't think it's worth the effort to prettify those
into 'v1/v2' - I think our readers are sophisticated
enough to figure it out from context - but am willing
to add that feature if requested.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-02-27 09:40:35 -07:00
Chris Evich 22904c1799
Cirrus: Log libseccomp package version
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-26 11:42:19 -05:00
Chris Evich 5973641404
Cirrus: SELinux Enforcing for F31 w/ CGv2
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-25 12:34:26 -05:00
Chris Evich 7e95e1e25c
Cirrus: collect podman system info
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-25 12:34:25 -05:00
Chris Evich 0ac0e6e612
Cirrus: F31: Force systemd cgroup mgr
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-25 12:34:25 -05:00
Chris Evich 614917d6aa
Cirrus: Handle runc->crun when both are possible
In some distributions it's possible to have both runc and crun
installed and/or for podman to be confused about which to use.  In these
instances, force the decision by adding `OCI_RUNTIME=/usr/bin/crun` into
`/etc/environment`. Also in-place modify libpod.conf to use 'crun'
instead of 'runc'

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-25 12:34:25 -05:00
Chris Evich 70b28bc2cc
Cirrus: Use deadline elevator in F31
The default scheduler is BFQ but integration tests run into

https://bugzilla.redhat.com/show_bug.cgi?id=1767539
aka
https://bugzilla.kernel.org/show_bug.cgi?id=205447

Using the deadline elevator as a workaround.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-25 12:34:25 -05:00
Chris Evich e0ca4a2260
Cirrus: Support testing with F31
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-25 12:34:24 -05:00
Brent Baude a64985c71b enable ci on go binding tests
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-02-22 09:43:19 -06:00
baude cc0f7defdc [CI:DOCS]Connect API docs and RTD
Signed-off-by: baude <bbaude@redhat.com>
2020-01-17 15:12:35 -06:00
baude 9be6f30a42
post-process swagger yaml for publish
Signed-off-by: baude <bbaude@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-01-17 15:41:33 -05:00
OpenShift Merge Robot e83a1b87da
Merge pull request #4817 from rhatdan/codespell
Add codespell to validate spelling mistakes in code.
2020-01-13 17:59:58 +01:00
Daniel J Walsh 4093b2c011
Add codespell to validate spelling mistakes in code.
Fix all errors found by codespell

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-11 06:32:19 -05:00
Chris Evich 49be255fee
Cirrus: Fix libpod base images going stale
VM Base images are used as a starting point for runtime VM images.
The in-use VM base images should never be pruned, which is an
operation that potentially occurs periodically from automation
running on the master branch of the libpod repo.

However the only place which updates timestamps (blocking pruning)
of base images, occurs during runtime VM image building.  Therefor,
if images are not regularly rebuilt, it's possible their base images
go stale and are pruned.

Changes:

* Add freshly-produced base images (old ones got pruned)
* Wrap the timestamp update script to include base image names
in the update list.

Notes:

* Regularly updating base image timestamps only needs to happen
on the libpod repo's meta task, since all base images live there.
* Using a wrapper is needed to maintain compatibility with multiple
versions of the imgts container image used by other repos / branchs.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-01-10 13:13:27 -05:00
Dmitry Smirnov 8d928d525f codespell: spelling corrections
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
2019-11-13 08:15:00 +11:00
Daniel J Walsh 5f3a61ed42
Add support for make vendor-in-container
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-11-08 06:27:17 -05:00
OpenShift Merge Robot 45e0bd3891
Merge pull request #4379 from cevich/fix_upload_release_archive
Cirrus: Fix upload_release_archive on branch or tag
2019-10-30 21:31:32 +01:00
Chris Evich 326ef19d94
Cirrus: Fix upload_release_archive on branch or tag
Cirrus-CI only sets `$CIRRUS_BASE_SHA` when testing PRs since the
destination and it's state is easy to discover.  However, when
post-merge and/or tag-push testing, the previous state is not
easily discoverable (changes have already merged).  The
`upload_release_archive` script incorrectly assumed this
variable was always set, causing a constant stream of post-merge
testing failures.

Tweak the `is_release()` function to properly handle an empty
`$CIRRUS_BASE_SHA` whether or not `$CIRRUS_TAG` is also set.  Also
update the unit-tests to check for this.  Also account for a
corner case where hack/get_ci_vm.sh is running on a VM w/o git.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-30 14:31:38 -04:00
OpenShift Merge Robot 9ba8dae0bf
Merge pull request #4365 from cevich/safe_load
Cirrus: Fix minor python deprecation warning
2019-10-30 18:10:16 +01:00
Giuseppe Scrivano 2046be6ae0
build: drop support for ostree
it is going to be removed from containers/image as well, so no longer
depend on it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-30 11:28:10 +01:00
Chris Evich d4c80b755e
Cirrus: Fix minor python deprecation warning
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-29 10:45:08 -04:00
Chris Evich 8303eb3037
Cirrus: Only upload tagged releases
Prior to this commit, every push to master had it's builds packaged and
uploaded to google storage.  This is a waste, since potential users
are only ever concerned about tagged releases.

Unfortunately because the release process involves humans with
potentially multiple human and automation steps happening in parallel,
it's easy for automation to not detect a tagged release, or trigger on
development|pre-release tags.

Fix this in `upload_release_archive.sh` using a new unit-tested
function `is_release()`.  This acts as the definitive authority
on whether or not a specific commit rage or `$CIRRUS_TAG` value
constitutes something worthy of upload.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-29 10:34:58 -04:00
OpenShift Merge Robot 2bf184aa01
Merge pull request #4222 from cevich/collect_varlink_log
Cirrus: Produce and collect varlink output
2019-10-09 14:33:14 -07:00
Chris Evich ffe726ed64
Cirrus: Produce and collect varlink output
When executing 'make remotesystem' testing, a varlink process is started
up but it's stdio is dumped due to the production of excessive data.
However, this also means if the process has a problem, any errors will
not be accessible.

Instead, grab only the last 100 lines and direct them into a file.  Also
update automation's log collection to retrieve this file when the
`$REMOTE_CLIENT` env. var. is `true`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-08 16:47:37 -04:00
Chris Evich 09b6cd06c8
Cirrus: Install conmon in Fedora VMs
This is needed because older versions of podman (1.5.1) do not
automatically install the new conmon package.

Also, include removal of `/usr/libexec/podman/conmon` when preparing to
install and test podman built from source.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-07 11:27:45 -04:00
Chris Evich 5756fd8ff9
Cirrus: Simplify package NVR logging
Also include runc/crun version for Fedora

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-03 15:53:07 -04:00
OpenShift Merge Robot 7e47abe1f7
Merge pull request #4154 from cevich/show_packages
Cirrus: Show names/versions of critical packages
2019-10-01 08:42:04 -07:00
OpenShift Merge Robot 049aafa4c0
Merge pull request #4090 from vrothberg/build-catatonit
Build catatonit
2019-10-01 06:05:22 -07:00
Chris Evich 0b5100ff79
Cirrus: Show names/versions of critical packages
Adds an output to all testing tasks which lists the names/versions of
critical/essential packages present on the VM.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-01 08:54:50 -04:00
OpenShift Merge Robot 01b7af8ee9
Merge pull request #4100 from cevich/cache_image_docs
Cirrus: VM Image accounting doc update
2019-09-29 07:11:31 -07:00
OpenShift Merge Robot 742a8b0c6e
Merge pull request #4028 from cevich/add_bash_completion_support
cirrus: Add bash-completion support
2019-09-29 07:01:46 -07:00
Chris Evich 8368a894ba
Cirrus: Disable boottime Ubuntu package update
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-09-26 12:36:33 -04:00
Chris Evich b9e21af44f
cirrus: Add bash-completion support
This is fairly standard thing to have on a user's workstation, supported
by podman.  When installed in a VM image, then it's useful for debugging
with `hack/get_ci_vm.sh` at the cost of a minor increase in disk-space.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-09-26 09:58:16 -04:00
Valentin Rothberg 80f6af7766 catatonit: clone and build
Instead of unconditionally pulling the x86 binary, clone the repository
and build the binary to make it independent of the architecture.

Fixes: #2699
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-09-25 11:05:41 +02:00
Chris Evich 601052b386
Cirrus: Upload windows MSI release file
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-09-24 15:13:40 -04:00
Chris Evich 85bfd70c91
Cirrus: VM Image accounting doc update
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-09-24 11:27:42 -04:00
OpenShift Merge Robot c0eff1a81c
Merge pull request #4071 from cevich/more_podbot
Cirrus: More podbot/success improvements
2019-09-22 16:57:54 +02:00
Chris Evich 831a64393e
Cirrus: disable Evil Units in base-images
Also, minor update to prevent harmless 'Fatal: not a git repo' error.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-09-20 14:34:13 -04:00
Chris Evich 9a2ae2442d
Cirrus: Add latest ubuntu
Add the latest Ubuntu version into the testing matrix
and image-build workflow. This is also needed to support
other containers projects which share use of VM images
from this one.

Update package lists to include needs for contianers/storage
use of images.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-09-20 14:34:13 -04:00
Chris Evich 33b3d2914f
Cirrus: More podbot/success improvements
* Fix one disused and two missing required env. vars.
* Slightly optomize processing of commit-author names
* Fix problem of printing duplicate author names when there are multiple
commits.
* Fix bot's IRC connection timeout too short.
* Add a single retry of IRC connection after 5-second delay.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-09-20 14:03:54 -04:00
Chris Evich babe201dae
Cirrus: Fix success script
Fixed a typo.

Also script was grabbing quotes and other non-email-address junk
while looping. Filter before and after to make sure we get 'em all.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-09-20 12:31:56 -04:00
OpenShift Merge Robot 7ed1816900
Merge pull request #4051 from giuseppe/use-crun-pkg
tests: use crun package
2019-09-20 09:00:22 +02:00
Giuseppe Scrivano 6e35886dc2
tests: use crun package
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-09-19 13:58:56 +02:00
OpenShift Merge Robot 408f2780a1
Merge pull request #3985 from cevich/verify_no_podman
Cirrus: Prevent resident pollution
2019-09-19 04:00:54 +02:00
Chris Evich 866d4763a1
Cirrus: Fix unnecessary setsebool
By mistake this was added to run for the image-building-VM and is not
supported.  Kill it.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-09-11 14:03:20 -04:00
OpenShift Merge Robot 7ac6ed3b4b
Merge pull request #3581 from mheon/no_cgroups
Support running containers without CGroups
2019-09-11 00:58:46 +02:00
Chris Evich a58ac7be7b
Cirrus: Prevent resident pollution
When constructing VM cache-images, the latest/greatest podman package is
installed to ensure all necessary dependencies are met.  Prior to
testing source-built binaries, most of of the packaged files are removed.
However, if the `io.podman` service or socket is enabled/running, it
could cause the packaged podman and varlink binaries to be both resident
and cached.  Since this condition would cause very difficult to diagnose
behaviors, add preventative measures to ensure these services are absent
prior to removing packaged podman files.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-09-10 16:22:15 -04:00
Matthew Heon c2284962c7 Add support for launching containers without CGroups
This is mostly used with Systemd, which really wants to manage
CGroups itself when managing containers via unit file.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-10 10:52:37 -04:00
xcffl 3d240bd795 Replace "podman" with "Podman"
Signed-off-by: xcffl <xcffl@outlook.com>
2019-09-07 20:16:42 +08:00
Chris Evich 34dad57cbc
Cirrus: Update e-mail -> IRC Nick table
Also add fixes to help prevent 'fatal: Invalid revision range' error.
Should obtaining all authors from the range still fail, only grab the
HEAD commit author as a fallback.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-09-03 16:39:35 -04:00
Chris Evich 48d1c49078
Cirrus: On success, add IRC nick mention to msg
Rather than spamming the podman channel with impersonal success
messages referring to PR numbers, mention the author by nick name
and include the PR title and link.

Also avoid needless logging of all bot-script interactions with
IRC when there is no error detected.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-30 14:57:42 -04:00
OpenShift Merge Robot ab5f52c0d2
Merge pull request #3710 from cevich/release_redo
Release redo
2019-08-29 06:56:43 -07:00
OpenShift Merge Robot 9926a299f7
Merge pull request #3892 from cevich/google_vpc
Cirrus: Block CNI use of google VPCs
2019-08-28 13:03:51 -07:00
Chris Evich 370b1a887c
Cirrus: Reimplement release archive + upload
The initial implementation was far more complicated than necessary.
Strip out the complexities in favor of a simpler and more direct
approach.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-28 11:54:06 -04:00
Matthew Heon 63d989a344 Add an integration test for systemd in a container
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 09:28:49 -04:00
Chris Evich e06f17f580
Cirrus: Block CNI use of google VPCs
Specifically pertaining to executing tests in google cloud, there are
default, pre-allocated class-a subnetworks for each region (data-center).
Each includes a gateway using a `.1` LSB and all are routable from other
regions in google cloud via these gateways.

Because the default CNI configuration also utilizes class-a subnetworks,
this creates the possibility for IPv4 address-space clashes.  Since the
default regional cloud subnets are pre-defined/known, preventing clashes
can be accomplished by seeding these subnets in a dummy CNI configuration.

The default behavior of podman is to grab the highest priority CNI
configuration.  Name the dummy config. appropriate so it always loads
last.  Also name the bridge itself with an obvious name `do-not-use`,
such that any related testing errors should be easier to debug.

Also:

* Minor cleanup of `install_test_configs()`
* Move install_test_configs in `setup_environment.sh` to after possible
  run of `remove_packaged_podman_files()` because that also strips out
  `/etc/cni/net.d/87-podman-bridge.conflist`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-28 09:02:31 -04:00
OpenShift Merge Robot 67926d86b5
Merge pull request #3824 from baude/varlinkendpointtest
Create framework for varlink endpoint integration tests
2019-08-26 17:11:12 +02:00
OpenShift Merge Robot 098ce2f33a
Merge pull request #3822 from cevich/simplify_crun_task
Cirrus: Minor: Simplify crun test task
2019-08-17 08:06:14 +02:00
Chris Evich 7e406fe8e6
Cirrus: Minor: Simplify crun test task
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-16 14:33:37 -04:00
baude 04f2f95bb4 Create framework for varlink endpoint integration tests
add the ability to write integration tests similar to our e2e tests for
the varlink endpoints.

Signed-off-by: baude <bbaude@redhat.com>
2019-08-16 10:10:50 -05:00
Chris Evich 122f694159
Cirrus: Confirm networking more
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-16 11:03:03 -04:00
Giuseppe Scrivano a3fd890b86
cirrus: enable cgroups v2 tests with crun
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-13 21:53:00 +02:00
Chris Evich 386e939acb
Cirrus: Install varlink on Ubuntu
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-13 09:16:37 -04:00
Chris Evich 0bf7d599f8
Cirrus: Install varlink on Fedora
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-13 09:16:37 -04:00
OpenShift Merge Robot f634fd3900
Merge pull request #3607 from cevich/cgroup2_vm
Add another Fedora VM with cgroups v2 enabled
2019-08-12 21:28:56 +02:00
Chris Evich 5f99703594
Cirrus: Add verification for cgroupv2 image
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-12 12:01:55 -04:00
Chris Evich 7508179ed9
Cirrus: Add experimental fedora VM image & test
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-12 12:01:55 -04:00
Chris Evich fd312ae30a
Cirrus: Minor, use newer Ubuntu base image
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-12 11:02:02 -04:00
Giuseppe Scrivano 0798fc5fc4
cirrus: install crun
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-12 14:11:59 +02:00
OpenShift Merge Robot 926901d78d
Merge pull request #3594 from cevich/second_partition
Add Second partition for storage-drive testing
2019-08-10 12:10:43 +02:00
Chris Evich ec2ea0278e
Cirrus: Enable updates-testing repo for Fedora
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-09 10:25:50 -04:00
Chris Evich 0a05af1dd6
Cirrus: Add Second partition for storage testing
This is mainly/initially to support use of Cirrus-CI
in https://github.com/containers/buildah since that setup
re-uses the VM images from this project. However, it also
opens doors here, if libpod ever needs/wants to do things
with a dedicated storage device and/or storage-drivers.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-01 14:07:55 -04:00
Chris Evich 3e3afb942a
Cirrus: Fix release dependencies
The release-task ***must*** always execute last, in order to guarantee a
consistent cache of release archives from dependent tasks.  It
accomplishes this by verifying it's task-number matches one-less than
the total number of tasks.  Previous to this commit, a YAML anchor/alias
was used to avoid duplication of the dependency list between 'success'
and 'release'

However, it's been observed that this opens the possibility for
'release' and 'success' tasks to race when running on a PR.  Because
YAML anchor/aliases cannot be used to modify lists, duplication is
required to make 'release' actually depend upon 'success'.

This duplication will introduce an additional maintenance burden.
Though when adding a new task, it's already very easy to forget to
update the 'depends_on' list.  Assist both cases by the addition
unit-tests to verify ``.cirrus.yml`` dependency contents and structure.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-31 11:49:53 -04:00
Chris Evich cb2ea1a27b
Cirrus: Fix re-run of release task into no-op.
This task depends upon other tasks caching their binaries.  If for
whatever reason the `release` task is re-run and/or is out-of-order
with it's dependents, the state of cache will be undefined. Previously
this would result in an error, and failing of the release task.
This commit alters this behavior to issue a warning instead.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-31 09:42:52 -04:00
Chris Evich 07b1e331c2
Cirrus: Ubuntu: Set + Test for $RUNC_BINARY
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-25 14:02:12 -04:00
Chris Evich f55288c96f
Cirrus: Simplify evil-unit check in image
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-25 13:51:33 -04:00
Chris Evich ceb3d76298
Cirrus: Silence systemd-banish noise
It's somewhat hard to predict which units are certinly present
for any given base-image.  Therefore, at image-build time, it's
distracting and unhelpful to see all the errors about units that
don't exist, on every platform.  Simply ignore them and rely on
the `check_image.sh` test to confirm none are enabled.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-25 13:51:33 -04:00
Chris Evich e3082762fe
Cirrus: Fix image build metadata update
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-25 13:51:33 -04:00
Chris Evich 6942d3275d
Cirrus: Fix missing -n on CentOS
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-25 13:51:33 -04:00
Chris Evich 67098029bc
Cirrus: Minor scripting typo fix
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-18 10:40:26 -04:00
OpenShift Merge Robot 04a9cb01fe
Merge pull request #3335 from cevich/imgprune
Cirrus: Print images that should be pruned
2019-07-17 11:47:42 +02:00
Chris Evich f58b754c8d
Cirrus: Add image-test for locked dpkg
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-16 14:30:42 -04:00
Chris Evich 1abb217493
Cirrus: Disable most periodic services/timers
For CI testing, it's important to remove as much variability from the
overall system as possible.  This permits focusing just on problems
closely related to code-changes.  To this end, and because VMs are very
short-lived (2 hours at most), disable all systemd services and timers
which perform periodic activities.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-16 14:30:42 -04:00
Chris Evich 35c174f723
Cirrus: Abstract destination branch refs.
Various tasks and scripts behave differently depending on whether or not
the build is running against a PR or on a branch, post-merge.  However,
a great number of them are hard-coded to the string 'master' as the
destination.  Since this is not always the case (there are other
relevant branches), it makes sense to abstract the references with a
single definition.

Add a top-level `$DEST_BRANCH` variable to CI, and otherwise
default to 'master' when unset.  This enables running CI builds on
additional branches without the overhead of updating all the static
references to 'master'.  Simply update `$DEST_BRANCH` at the top-level
and all branch-conditional logic will function as intended.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-15 16:42:41 -04:00
Chris Evich e8564dc44f
Cirrus: Print images that should be pruned
Over time unless they're removed, the project could grow quite a large
collection of VM images.  While generally cheap (less than a penny each,
per month), these will become a significant cost item if not kept
in-check.

Add a specialized container for handling image-pruning, but limit
it to only finding and printing (not actually deleting) images.

Also update the image-building workflow so that base-images used to
compose cache-images are also labeled with metadata.

N/B: As an additional safeguard, the service account which
     executes the new container in production *DOES NOT*
     have access to delete images.  This can be enabled
     by adding the GCE IAM role: CustomComputeImagePrune

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-15 15:26:26 -04:00
Chris Evich 9043b816d4
Cirrus: Fix missing removal of packaged podman
This was originally intended, but somehow omitted from #1936

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-12 08:44:27 -04:00
OpenShift Merge Robot 81e722d086
Merge pull request #3106 from cevich/cirrus_release
Cirrus: Automate releasing of tested binaries
2019-07-10 15:08:03 +02:00
Chris Evich 1ef8637ae3
Cirrus: Automate releasing of tested binaries
It's desirable to make archives available of builds containing actual
tested content.  While not official distro-releases, these will enable
third-party testing, experimentation, and development for both branches
(e.g. "master") and pull requests (e.g. "pr3106").

* Add a Makefile targets for archiving both regular podman binaries
  and the remote-client.  Encode release metadata within these
  archives so that their exact source can be identified.

* Fix bug with cross-compiling remote clients for the Windows and Darwin
  platforms.

* Add unit-testing of cross-compiles for Windows and Darwin platforms.

* A few small CI-script typo-fixes

* Add a script which operates in two modes:

  1. Call Makefile targets which produce release archives.
     Upload the archive to Cirrus-CI's built-in caching system
     using reproducible cache keys.

  2. Utilize reproduced cache keys to attempt download of cache
     from each tasks.  When successful, parse the file's
     release metadata, using it to name the archive file.  Upload
     all recovered archives to a publicly accessible storage bucket
     for future reference.

* Update the main testing task to call the script in mode #1 for
  all primary platforms.

* Add a new `$SPECIALMODE` task to call the script in mode #1 for
  Windows and Darwin targets.

* Add a new 'release' task to the CI system, dependent upon all other
  tasks.  This new tasks executes the script in mode #2.

* Update CI documentation

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-03 16:51:21 -04:00
Chris Evich 3d559df540
Cirrus: Use packaged dependencies
Building/installing dependencies from fixed source-version ensures
testing is reliable, but introduces a maintenance burden and
risks testing far outside of a real-world environment.  The
sensible alternative is to install dependencies from distro-packaging
systems.

Install all development and testing dependencies at VM cache-image build
time, to help ensure testing remains stable.  The existing cache-image
build workflow can be utilized at any future time to build/test
with updated packages.

***N/B***: This does not update any dockerfiles used by testing, that is
left up to future efforts.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-27 09:05:26 -04:00
Chris Evich cd78825be7
Cirrus: More tests to verify cache_images
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-25 15:45:12 -04:00
OpenShift Merge Robot 7be87f5551
Merge pull request #3078 from cevich/cirrus_f30
Cirrus F30
2019-06-19 16:13:47 +02:00
Ed Santiago d6f436204f run BATS tests in Cirrus
I'm running the BATS tests manually once in a while, and
catching several problems each week that make it past
the rest of CI. Since the BATS tests run at RPM gating
time, we need to catch problems earlier. Try running
the tests from Cirrus.

Tests will be skipped on Ubuntu due to a too-ancient
version of coreutils (8.28; the 'timeout -v' we use
requires 8.29).

Tests are run *after* integration tests, even though
these take three minutes and would be nice to have
fail quickly, because running before causes bizarre
CI failures. Shrug.

UPDATE: also fix run test, broken by #3311.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-06-17 13:41:14 -06:00
OpenShift Merge Robot 058c93f850
Merge pull request #3308 from cevich/always_collect_logs
Cirrus: Simplify log collection commands
2019-06-17 21:38:25 +02:00
Chris Evich ab3105a46d
Cirrus: Fix F30 ssh guarantee
The original solution using --wait does not function on F30, waiting
forever.  Replace it with a simple 5-minute timeout loop.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-14 15:47:07 -04:00
Chris Evich 11484580d3
Cirrus: Add support for testing F30
Remove disused `build_cache_images` task, and
update relevant dockerfiles for F30.

Fix problem of cloud-init failing to expand root-device on boot
(/var/lib/cloud/instance left in improper state).

Fix problem of cloud-init racing with google-network-daemon.service on
boot (looking for cloudconfig metadata too early).  Causing
root-device to _sometimes_ fail to expand.

Fix problem of hack/get_ci_vm.sh argument passing.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-14 13:41:58 -04:00
Chris Evich 4e9f5e5f2b
Cirrus: Simplify log collection commands
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-14 08:49:18 -04:00
Chris Evich 8440656fd5
Cirrus: Guarantee ssh is running for rootless
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-13 11:32:06 -04:00
Chris Evich 1a9accb379
Remove source-built buildah from CI
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-10 12:54:42 -04:00
Chris Evich ae16fa33d7
Cirrus: Minor cleanup of dependencies and docs
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-06 15:33:01 -04:00
Ed Santiago a47bb4d29f cirrus: minor cleanup and refactoring
...with the goal of (very soon) reusing this code, in #2947,
to run system tests in CI. This is the cleanest way I can
think of to do so without duplication or a large maintenance
burden.

Changes are:
 - replace references to 'ginkgo' with 'integration'. That
   target is already in Makefile, and is not only more
   readable, it's also more abstract. There is no reason
   for this level of code to know about ginkgo.
 - allow rootless_test.sh to accept an argument,
   that being the name of the test suite to run
   (default: integration). #2947 will enable 'system'.
 - allow integration_test.sh to serve multiple purposes,
   by checking its filename. #2947 will add a symlink,
   system_test.sh, which will then cascade down to
   invoke system tests.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-06-03 05:34:31 -06:00
baude d1c44ea856 split rootless local and remote testing
Signed-off-by: baude <bbaude@redhat.com>
2019-05-31 14:54:06 -05:00
baude ce6e3b80d1 do not run remote tests inside container
when running the podman integration tests inside a container, we should
not be running the remote tests.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-30 10:30:14 -05:00
Chris Evich 361f787abe
Cirrus: Add zip package to images
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-23 09:16:17 -04:00
Chris Evich bd0ac639bf
Cirrus: Fix missing CRIO_COMMIT -> CONMON_COMMIT
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 10:56:47 -04:00
Chris Evich c7d9780be4
Cirrus: workaround root expand failure
Occasionally, and seemingly only on F29 the root disk fails to expand
upon boot.  When this happens, any number of failures could occur if
space runs out.  Until there is time to investigate the actual cause,
workaround this problem by detecting it and acting accordingly.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:02 -04:00
Chris Evich 1a2055ffac
Cirrus: Stub in F30 support
New base-image boots, a cache-image builds, but more work is needed for
it to be prime-time ready.  This commit just adds some updates to the
scafolding necessary to build the base-image.  Future work will make F30
more of a reality.

Also add log-collection scripts to test image verification task

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:02 -04:00
Chris Evich 95141f88d4
Cirrus: fixups based on review feedback
Also remove disused distros (RHEL/CentOS/FAH) and fix get_ci_vm script

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:02 -04:00
Chris Evich c4d9b03f78
Cirrus: Overhaul/Simplify env. var setup
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:02 -04:00
Chris Evich 51a95e6ef1
Cirrus: Run tests on test-built cache-images
Also, add jq and catatonit installs to images.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:01 -04:00
Chris Evich 191a08ae43
Cirrus: Support testing of VM cache-image changes
Previously, it was quite difficult to affect changes to VM cache images
without lots of manual work.  This commit adds a new optional testing
task which mirrors the official-image build task which only runs on
master.  In contrast, the new task may be run at any time in a PR, but
including a magic phrase in the PR description.

Update documentation to describe the new task and inform on it's usage.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:01 -04:00
Chris Evich 84c6f7c55d
Cirrus: Remove "too new" runc hack
Hack was to workaround not having fix for:
https://bodhi.fedoraproject.org/updates/FEDORA-2019-b4356521ba

Update `RUNC_COMMIT` value to match commit id to working package.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:01 -04:00
OpenShift Merge Robot 00ecbfc131
Merge pull request #2844 from haircommander/cri-o-update
move to cri-o/cri-o and build with containers/conmon
2019-05-17 21:49:10 +02:00
Chris Evich 0f31c6bdc4
Cirrus: Confirm networking is working
Thanks to @edsantiago for suggestion to use nc

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-17 13:25:59 -04:00
Peter Hunt cb0d89c56e Use containers/conmon
There were some build issues updating cri-o to cri-o/cri-o. Since the only thing we need cri-o for is conmon, we should just build using conmon.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-05-17 12:54:47 -04:00
Peter Hunt 38333970ba s|kubernetes-sigs/cri-o|cri-o/cri-o|g
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-05-17 11:10:09 -04:00
OpenShift Merge Robot 7ede159465
Merge pull request #3089 from baude/splittest
split remote tests from distro tests
2019-05-15 22:20:04 +02:00
baude a86aa4b1e9 split remote tests from distro tests
We want the remote tests for our distributions to be tested in a
different VM than the local tests.  This allows for faster CI runs and
easier debug as well as seperation of flakes.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-13 12:17:55 -05:00
OpenShift Merge Robot 2ded1f6199
Merge pull request #2705 from adrianreber/ci-test
Enabling checkpoint/restore testing on Fedora >= 29 again
2019-05-13 15:58:39 +02:00
baude bc7b1ca03d enable integration tests for remote-client
first pass at enabling a swath of integration tests for the
remote-client.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-07 14:06:02 -05:00
Adrian Reber 5e6ce93b1e
Upgrade to latest criu and selinux-policy
This fixes all the current errors concerning checkpoint/restore.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-05-06 13:02:52 +02:00
Chris Evich 3ab67b9c30
Cirrus: timestamp all output script output
Also remove direct time-stamping by CI scripts that would compete.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-02 15:03:15 -04:00
Ed Santiago 295c531ece cirrus lib.sh: refactor req_env_var()
Existing code was not working due to a bash gotcha ('exit'
from a pipeline). It also had unnecessary duplication.

New version is safer; also includes unit tests run under localunit.

Existing invocations of req_env_var replaced via:

   $ [ edit setup_environment.sh, move one closing quote to its own line ]
   $ perl -ni -e 's/(?<=req_env_var )"(\S+)\s+\$\1"/$1/; if (/req_env_var "$/ .. /^\s*"/) { chomp; s/(?<=\S)\s.*//; if (/^\s*"/) { print "\n" } else { unless (/req_env_var/) { s/^\s+//; print " ";} print;} } else { print }' $(ack -l req_env_var)
   $ [ hand-massage an incorrect instance of '@' in lib.sh:ircmsg() ]

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-05-02 08:14:59 -06:00
baude 499767eefd remove manual install of libsystemd-dev
Signed-off-by: baude <bbaude@redhat.com>
2019-04-26 13:05:40 -05:00
OpenShift Merge Robot a85155617f
Merge pull request #2991 from cevich/libsystemd_dev
Libsystemd dev + newer runc
2019-04-26 09:00:45 -07:00
baude 7bf7c177ab journald event logging
add the ability for podman to read and write events to journald instead
of just a logfile.  This can be controlled in libpod.conf with the
`events_logger` attribute of `journald` or `file`.  The default will be
set to `journald`.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-24 16:00:04 -05:00
Chris Evich 6fa72887a7
Cirrus: fix obsolete Ubuntu package
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-24 14:25:45 -04:00
Chris Evich 5d1f8b0a0b
Cirrus: Install libsystemd-dev on Ubuntu
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-24 14:25:45 -04:00
Chris Evich 72007746aa
Cirrus: Temp. override container-selinux on F29
Also, undo oooooold runc package hack

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-24 11:54:41 -04:00
baude 55e630e787 podman-remote pause|unpause
Add the ability to pause and unpause containers with the remote client.

Also turned on the pause tests!

Signed-off-by: baude <bbaude@redhat.com>
2019-04-18 13:42:27 -05:00
Giuseppe Scrivano ce82e19a37
cirrus: enable remote tests for rootless
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-08 22:16:56 +02:00
Giuseppe Scrivano ae10f55362
test: fix remote tests for rootless
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-08 22:16:55 +02:00
Chris Evich 599714d9f2
Cirrus: Support special-case modes of testing
Previously libpod CI was fairly straight-forward, run unit and
integration tests in a standard set of 3 VMs.  Off on the side was a
single special case of running tests as an ordinary user.  There is a
desire to stop using the PAPR system to support testing inside of a
container.

Since having two special cases potentially invites more
down the road, make provisions to handle them more gracefully.  This
commit introduces an environment variable:  ``$SPECIALMODE``.  It's
value has the following meanings within the CI scripts:

Mode 'none': Nothing special, business as usual (default)
Mode 'rootless': Rootless testing
Mode 'in_podman': Build container, run integration tests in it.

This will make adding additional special-cases later easier, as well as
extending the special cases in a Matrix across multiple OS's.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-03 09:57:20 -04:00
Chris Evich 37eb694bd0
Cirrus: Various fixes for rootless testing
* Randomize the user's UID and GID
* Simplify `setup_environment.sh`
* Support new "-r" option for `hack/get_ci_vm.sh` setting up rootless
* Connect as $ROOTLESS_USER when using "-r" with `hack/get_ci_vm.sh`

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-19 13:00:18 -04:00
baude c6b205be77
Enable rootless integration tests
Signed-off-by: baude <bbaude@redhat.com>
2019-03-19 15:01:48 +01:00
OpenShift Merge Robot 91b00281e8
Merge pull request #2689 from cevich/new_images
Cirrus: Update VM Cache images
2019-03-18 09:47:55 -07:00
Chris Evich 51f223ec1c
Cirrus: Update VM Cache images
Undo short-term slirp4netns workaround (#2660)

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-18 11:25:38 -04:00
Chris Evich 2e2a173567
Cirrus: Fix post-merge failure notice
Likely caused by rebase typos after removing test-commit.  This fixes
notifications to actually get sent.  Also show env. vars after setting
up the environment - helps debugging.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-16 12:14:43 -04:00
Chris Evich 0e76921048
Cirrus: Notify on IRC if post-merge testing fails
Until recently it was very difficult to execute any scripts if part of a
task failed.  A new feature in Cirrus-CI makes this easy.  Use it to
post a notice on IRC when any task fails.

Also: Add quotes around yaml-string values for consistency and
syntax-highlighting correctness.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-15 21:21:50 -04:00
Giuseppe Scrivano 1442abf032
cirrus: upgrade slirp4netns
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-14 22:12:12 +01:00
OpenShift Merge Robot b15273a0ca
Merge pull request #2531 from cevich/rootless_stub
Cirrus: Add dedicated rootless mode testing
2019-03-09 04:15:09 -08:00
Chris Evich 4531800f49
Cirrus: Use imgts container to record metadata
Make use of the built imgts container image to track
VM image usage statistics for every automation run.

Also update and add small check to the gate test
that verifies expected formatting/content of the
`.cirrus.yml` file WRT VM Image names.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-06 12:21:14 -05:00
Chris Evich 142442edaa
Cirrus: Add dedicated rootless mode testing
Certain integration tests require execution as a regular user.
This is acomplished by `PodmanTest.PodmanAsUserBase()` wrapping a
specialized execution environment, in `test/utils/utils.go`.  However,
doing this requires passing through python, which vastly increases the
complexity of debugging low-level problems.

This commit introduces a new parallel task, run as a regular user on the
VM as set by three environment variables.  All commands executed in the
``rootless_test.sh`` script, will occur as a real user with a name and
home directory, just as `$DIETY` intended.  All env. vars established
during `environment_setup.sh` (for root) are available.  The PR source
in `$GOSRC` and `$GOPATH` are owned by this user, and ready for use.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-05 11:03:37 -05:00
Chris Evich ba476c1407
Globally increase test timeout to 90-minutes
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-04 17:08:21 -05:00
Chris Evich a888e0fad2
cirrus: Drop ginkgo, gomega, easyjson install
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-04 17:08:21 -05:00
Chris Evich a810d96b6c
Cirrus: Add BATS package for all platforms
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-04 17:08:21 -05:00
Daniel J Walsh b87bdced1f
Fix up handling of user defined network namespaces
If user specifies network namespace and the /etc/netns/XXX/resolv.conf
exists, we should use this rather then /etc/resolv.conf

Also fail cleaner if the user specifies an invalid Network Namespace.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-23 05:47:27 -05:00
Chris Evich 69c91e044a
Cirrus: Install Go 1.11 on Ubuntu VMs
There is no native package for this, so the packaged version must also
be installed, otherwise all the support/dependencies would be removed
also (like go-md2man).  Fix this by installing from the google released
tarball, into /usr/local/go and set $GOROOT to point there.

Also, include a small fix for hack/get_ci_vm.sh not installing
testing dependencies because of an old assumption.

***CIRRUS: REBUILD IMAGES***

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-02-22 12:07:36 -05:00
Chris Evich 7184efe939
Cirrus: Add 20m extra timeout for Ubuntu
Tests running slower than normally-slow, bump timeout to allow them to
pass until better solution (for slow Ubuntu tests) can be found.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-02-22 12:07:34 -05:00
Nitesh Konkar 383e573299 packer: Make Makefile host arch sensitive
`make localunit` fails on non-amd64 archs
as it unzips packer_1.3.2_linux_amd64.zip
irrespective of host arch its running on.

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-02-18 10:23:57 +05:30
Valentin Rothberg 9ac0ebb079 Cirrus: add vendor_check_task
* Make sure that all vendored dependencies are in sync with the code and
  the vendor.conf by running `make vendor` with a follow-up status check
  of the git tree.

* Vendor ginkgo and gomega to include the test dependencies.

Signed-off-by: Chris Evic <cevich@redhat.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-06 11:14:06 +01:00
Chris Evich 8ca6706be0
Cirrus: Add RHEL-7 testing
Add necessary tweaks to base-image build/import process so that image
can successfully boot with networking enabled.  Build the base image and
update ``.cirrus.yml`` accordingly.

Also make a minor improvement to cache-image building to help save space in
GCP image storage.  Namely, instead of storing every produced image, export
them into google storage buckets w/ life-cycle enabled.  For production use,
they may be converted back into GCE images, otherwise they will expire after
a time.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-30 08:26:48 -05:00
Chris Evich 88f222b41d
Cirrus: Enable AppArmor build and test
This was specifically disabled early on in transitioning to cirrus due to
an excessive number of test failures and lack of knowledge.  This commit
reverses the stance and unifies build and test commands across all
current platforms.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-29 10:38:51 -05:00
Chris Evich 7124ef71b5
cirrus: Record start/end time of important things
Previously we only reported the date/time at the beginning of a run
since it's not available in the Cirrus-CI system.  This commit
generalizes the solution, recording start/end times for all major
events.

Also the timestamps are recorded into a local file on the VMs.  This
is intended for future use, for example tracking execution-time
trends.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-17 14:32:28 -05:00
baude b30a56c156 Run integrations test with remote-client
Add the ability to run the integration (ginkgo) suite using
the remote client.

Only the images_test.go file is run right now; all the rest are
isolated with a // +build !remotelinux.  As more content is
developed for the remote client, we can unblock the files and
just block single tests as needed.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-14 14:51:32 -06:00
OpenShift Merge Robot e4525cf844
Merge pull request #2129 from cevich/timestamp
Cirrus: (Minor) Print timestamp
2019-01-10 10:58:25 -08:00
Chris Evich 4e7a7ffe9d
(Minor) Cirrus: Print timestamp at start
Also record into a file in case a later reference is required

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-10 12:59:55 -05:00
Chris Evich b9814e76b2
Minor: Remove redundant basename command in ooe.sh
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-07 14:41:52 -05:00
Chris Evich 727f8faff6
cirrus: Use updated images including new crui
Also add two minor tweaks which were preventing images from building
properly.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-21 16:08:21 -05:00
Adrian Reber 38e3fb53f6
Use existing CRIU packages in CI setup
For all in testing involved distribution a new enough CRIU exists as a
package.

Fedora provides CRIU packages directly. For CentOS/RHEL there is a COPR
with the latest CRIU version and for Ubuntu there is a PPA for the
latest CRIU version. Let's use these packages and fall back to building
from git if necessary.

Signed-off-by: Adrian Reber <adrian@lisas.de>
2018-12-21 08:18:21 +01:00
Chris Evich 4bf7c4b62b
Cirrus: One IRC notice only
The podbot messages are becoming obnoxious as more distributions are
tested.  Only call the `success.sh` script once, after all testing was
successful.  Also make update the message to include more helpful text
and url.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-18 09:16:05 -05:00
Daniel J Walsh 68414c5ee3
Merge pull request #2010 from cevich/cirrus_editors
Cirrus: Add text editors to cache-images
2018-12-17 15:55:03 -05:00
Chris Evich 7b53e86e4f
Add script to create CI VMs for debugging
Frequently debugging of CI-related problems requires going hands-on
within the environment.  However, reproducing the environment by hand is
very tedious and error prone.  This script permits authorized users to
produce VM's based on any available cache-image, and automatically remove
them upon logout.

Also: Bump up VM disk sizes to 200GB due to performance reasons

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 14:34:43 -05:00
Chris Evich a1a5f3ba51
Cirrus: Migrate PAPR testing of F28 to Cirrus
Since the most recent TWO versions of Fedora are officially supported
upstream, both need to be tested.  Implement the concept of a 'prior'
Fedora release in both base-image and cache-image production.  Utilize
the produced cache-image to test libpod.  Remove F28 testing from PAPR.

Much thanks to @baude @giuseppe for help with this.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 11:19:41 -05:00
Chris Evich 401fb2bf2f
Cirrus: Add text editors to cache-images
Occasionally people need to access the VM's for
troubleshooting/debugging.  Having an editor pre-installed makes life
easier and doesn't cost any extra test-time.

***CIRRUS: REBUILD IMAGES***

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 10:51:39 -05:00
Chris Evich d038497b09
Fix documentation links and flow
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-12 10:56:18 -05:00