Commit graph

442 commits

Author SHA1 Message Date
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
TomSweeneyRedHat 6dc0f1bec3 Change wait to sleep in podmanimage readme
Change wait to sleep 100000 as we've had some reports of problems
with wait:  https://github.com/containers/buildah/issues/1665

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-07-22 16:23:39 -04:00
Peter Hunt 0671dca90d bump conmon to 1.0.0-rc2
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-07-22 13:20:51 -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
OpenShift Merge Robot 7633bd3b1b
Merge pull request #1936 from cevich/cirrus_packaged_deps
Cirrus: Use packaged-based dependencies
2019-07-09 00:16:45 +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
Matthew Heon 4ced285857 Bump to v1.4.5-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-07-02 14:58:54 -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
OpenShift Merge Robot fccf4ad503
Merge pull request #3193 from cevich/check_image
Cirrus: More tests to verify cache_images
2019-06-27 03:31:35 +02:00
Matthew Heon 5f21858ae3 Bump to v1.4.4-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-25 15:46:02 -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
Peter Hunt 284208a238 Update conmon to include attach socket unlink
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-06-21 10:55:24 -04:00
OpenShift Merge Robot 7be87f5551
Merge pull request #3078 from cevich/cirrus_f30
Cirrus F30
2019-06-19 16:13:47 +02:00
Matthew Heon c225934726 Bump to v1.4.3-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-18 19:27:19 -04: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
Matthew Heon e0db4690aa Bump to v1.4.2-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-14 18:19:30 -04: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 60a857db62
Bump gate-container up to F30
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-14 10:27:06 -04:00
OpenShift Merge Robot 1322b41aa0
Merge pull request #3320 from cevich/fix_ssh_race
Cirrus: Guarantee ssh is running for rootless
2019-06-14 15:44:58 +02: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
Peter Hunt a3ed16416f Bump conmon to 0.3.0
This enables cgroup v2 OOM

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-06-13 12:03:57 -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
TomSweeneyRedHat cdffb69493 Touchup upstream Dockerfile
The upstream/Dockerfile had a few issues that this
cleans up.  A few files were misplaced, wrong installs
and removes.  This corrects those issues.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-06-08 21:31:46 -04:00
OpenShift Merge Robot 5646f13178
Merge pull request #3253 from cevich/clean_brent_mess
Cirrus: Minor cleanup of dependencies and docs
2019-06-08 12:35:57 +02:00
Matthew Heon 4bd0fcf561 Bump to v1.4.1-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-07 16:49:51 -04:00
Matthew Heon 41365a8f67 Bump to v1.4.0
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-06-07 16:49:48 -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
Chris Evich 32fb83e3ab
Cirrus: Track VM Image calling GCE project
With multiple `containers` projects updating VM Image metadata,
it would be very difficult to discover which Cirrus-CI setup
was responsible.  Add the GCE project name to the list
of metadata labels to update when this container runs.  This
will give more context as to which images are currently in use.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-05 15:53:00 -04:00
OpenShift Merge Robot 88eefaecb6
Merge pull request #3156 from TomSweeneyRedHat/dev/tsweeney/podmanimage
Create Dockerfiles for podmanimage
2019-06-04 07:49:47 +02: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
TomSweeneyRedHat 54e1a3a103 Create Dockerfiles for podmanimage
The Dockerfiles necessary to create the stable, testing and upstream container images
on quay.io/user/podman.  Once this is commited, I will set up those images
such that they will be built with every git commit.

stable - Latest Fedora release image
testing - Latest release on bohdi Fedora testing
upstream - Latest version in upstream podman

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-06-01 14:22:38 -04: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
OpenShift Merge Robot 8649dbdc11
Merge pull request #3210 from haircommander/conmon-0.2.0
bump conmon to v0.2.0
2019-05-28 21:07:43 +02:00
Peter Hunt f2c8391ecc bump conmon to v0.2.0
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-05-28 10:42:52 -04: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 9567d87bdf
Merge pull request #3152 from rhatdan/remote
install.remote should be separate for install.bin
2019-05-20 20:26:09 +02: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
Daniel J Walsh 6154ba4a80
install.remote should be separate for install.bin
For people who want to install podman remote or podman
only we need to separate out the two install commands.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-05-17 14:20:45 -04: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
Matthew Heon 03918cfd5f Bump to v1.3.2-dev
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-16 17:38:43 -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
Matthew Heon 8eb0a1437a Bump to v1.3.1-dev
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-06 09:41:21 -04: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
Daniel J Walsh d1a7378aa0
change from sysregistries to sysregistriesv2
We want to start supporting the registries.conf format.
Also start showing blocked registries in podman info
Fix sorting so all registries are listed together in podman info.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-05-03 10:38:51 -04: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
OpenShift Merge Robot e4947e5fd6
Merge pull request #2948 from baude/remotepause
podman-remote pause|unpause
2019-04-18 14:17:41 -07: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
baude 7987a1dfee Fix COPR builds to start working again
We now need systemd in the root of the COPR build for podman.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-17 16:12:54 -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
Matthew Heon 87162d6cd8 Bump to v1.3.0-dev
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-30 11:33:15 -04:00
Matthew Heon 5ed62991dc Remove ulele/deepcopier in favor of JSON deep copy
We have a very high performance JSON library that doesn't need to
perform code generation. Let's use it instead of our questionably
performant, reflection-dependent deep copy library.

Most changes because some functions can now return errors.

Also converts cmd/podman to use jsoniter, instead of pkg/json,
for increased performance.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-27 20:00:31 -04:00
Chris Evich bb068e46f0
Cirrus: Verify manpages for all subcommands exist
fixes #2630

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-21 10:47:27 -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
OpenShift Merge Robot e16cdf711f
Merge pull request #2637 from edsantiago/zsh_completion
zsh completion
2019-03-15 07:01:28 -07:00
Giuseppe Scrivano 1442abf032
cirrus: upgrade slirp4netns
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-14 22:12:12 +01:00
TomSweeneyRedHat d033452b3d Replace skopeo-containers with containers-common
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Replaces 'skopeo-containers' with 'containers-common' in the files that
I feel comfortable changing it in.  There are a number of rpm building
related files that still have it, but I was hesitant to do so.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-03-14 09:01:30 -04:00
Ed Santiago 6aa8078cc1 zsh completion
Weekend hack by someone who doesn't grok zsh completion
but who finds it deeply offensive that most completion
files have an unmaintainable duplication of options
and arguments. The idea behind this one is to discover
the command line using --help, with a few hardcoded
helpers for discovering containers, images, pods,
and figuring out which args take files/dirs as args.

Working remarkably well. I am using this in my daily
routine and wondering how I ever managed without it.
It's not perfect -- a future version can perhaps
show only stopped containers for podman rm, only
running ones for podman stop -- but ROI seems low
on that given my limited zsh completion skills.

Sadly, I can't figure out how to write a regression
test suite for this. It would be lovely to have a
list if partial command lines and expected completions,
because the history of this change is that (seemingly)
minor tweaks in one place cause breakage in another.
Does anyone know of such a framework?

Still... working well enough to ship, IMO.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-13 16:40:07 -06: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
Matthew Heon bd9a18df15 Add a task to Cirrus gating to build w/o Varlink
We had a regression on master where we broke the build for
non-Varlink builds. Catch this in CI in the future.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-27 12:21:57 -05:00
Matthew Heon e130657e28 Bump to v1.2.0-dev
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-26 17:33:45 -05:00
Matthew Heon 006206abe1 Bump to v1.1.0
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-26 17:33:45 -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
Peter Hunt 81804fc464 pod infra container is started before a container in a pod is run, started, or attached.
Prior, a pod would have to be started immediately when created, leading to confusion about what a pod state should be immediately after creation. The problem was podman run --pod ... would error out if the infra container wasn't started (as it is a dependency). Fix this by allowing for recursive start, where each of the container's dependencies are started prior to the new container. This is only applied to the case where a new container is attached to a pod.

Also rework container_api Start, StartAndAttach, and Init functions, as there was some duplicated code, which made addressing the problem easier to fix.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-02-15 16:39:24 -05:00
Daniel J Walsh 52df1fa7e0
Fix volume handling in podman
iFix builtin volumes to work with podman volume

Currently builtin volumes are not recored in podman volumes when
they are created automatically. This patch fixes this.

Remove container volumes when requested

Currently the --volume option on podman remove does nothing.
This will implement the changes needed to remove the volumes
if the user requests it.

When removing a volume make sure that no container uses the volume.

Signed-off-by: Daniel J Walsh dwalsh@redhat.com
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-14 13:21:52 -05:00
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
Daniel J Walsh 3554bfce98
Merge pull request #2196 from baude/toolbox
Changes to container runlabel for toolbox project
2019-02-05 10:34:40 -05:00
OpenShift Merge Robot 465e19b555
Merge pull request #2213 from cevich/cirrus_imgts_container
[skip ci] Cirrus: Container for tracking image use
2019-02-04 19:18:10 +01:00
baude 735f0de633 Changes to container runlabel for toolbox project
The toolbox project would benefit from a few changes to more closely
resembe the original atomic cli project.  Changes made are:

* only pull image for container runlabel if the label exists in the image
* if a container image does not have the desired label, exit with non-zero

Signed-off-by: baude <bbaude@redhat.com>
2019-01-30 08:44:58 -06: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 01e609d460
[skip ci] Cirrus: Container for tracking image use
Once built, this container can be utilized by automation to help keep
track of VM images.  All parameters are passed in via env. vars.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-24 08:47:08 -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
Matthew Heon 9ab838524c Update master branch with v1.0 changes from 1.0 branch
Grab release notes, changelog, and version changes so master is
up to date.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-14 10:18:09 -05:00
OpenShift Merge Robot 6524041fb0
Merge pull request #2119 from jwhonce/wip/python_podman
Move python code from contrib to it's own repo python-podman
2019-01-10 11:11:46 -08:00
OpenShift Merge Robot e4525cf844
Merge pull request #2129 from cevich/timestamp
Cirrus: (Minor) Print timestamp
2019-01-10 10:58:25 -08:00
Jhon Honce 45fb935fe4 Move python code from contrib to it's own repo python-podman
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-01-10 11:27:50 -07: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
OpenShift Merge Robot 792f10988e
Merge pull request #2023 from rhatdan/config
Switch all references to image.ContainerConfig to image.Config
2018-12-22 03:11:08 -08: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
Daniel J Walsh c657dc4fdb
Switch all referencs to image.ContainerConfig to image.Config
This will more closely match what Docker is doing.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-12-21 15:59:34 -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
OpenShift Merge Robot 65c5883f5c
Merge pull request #1757 from kunalkushwaha/contrib-perftest
perf test a stress test to profile CPU load of podman
2018-12-20 06:51:01 -08:00
baude f080ba846d prepare for move to validate on 1.11 only
Signed-off-by: baude <bbaude@redhat.com>
2018-12-19 13:43:09 -06:00
Kunal Kushwaha 658f772c16 perf test a stress test to profile CPU load of podman
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-12-19 16:05:21 +09:00
OpenShift Merge Robot 51d80ed01b
Merge pull request #2022 from baude/flakeflake
all flakes must die
2018-12-18 11:16:09 -08:00
baude 8e62d0120e all flakes must die
when cleaning up after a test, don't fail if cleanup doesn't run
perfectly.

Signed-off-by: baude <bbaude@redhat.com>
2018-12-18 12:43:49 -06: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
Chris Evich ac7ddc189e
Cirrus: Update base-image build docs
Mostly minor tweaks and clarifications.  Though there was
one missing (required) make value I fixed.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-10 16:03:37 -05:00
OpenShift Merge Robot d266460f7b
Merge pull request #1893 from jwhonce/bug/1869
Refactor CLI booleans to be consistent and defined behavior
2018-12-07 08:31:55 -08:00
OpenShift Merge Robot d4af59d57c
Merge pull request #1788 from cevich/cirrus_base_images
Codify and document base-image production + Enable testing with Fedora
2018-12-07 07:46:46 -08:00