Commit graph

125 commits

Author SHA1 Message Date
Chris Evich
61c643330e Revert "integration-playbook: Idempotent Swapping"
This reverts commit b198c57cfb.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-10-24 09:36:56 -07:00
Daniel J Walsh
fd43871187 Merge pull request #1037 from mrunalp/revert_move_sock
Revert "Move crio default sock to /var/run/crio/crio.sock"
2017-10-19 15:41:16 -04:00
Daniel J Walsh
c46b875fe7 Merge pull request #1001 from cevich/fix_reswap
integration-playbook: Don't re-swap
2017-10-19 15:17:23 -04:00
Mrunal Patel
b0e9f0eba8 Revert "Move crio default sock to /var/run/crio/crio.sock"
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-10-19 10:13:49 -07:00
Antonio Murdaca
d91877dbb2
contrib: test: fix e2e cmdline
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-10-19 16:37:26 +02:00
Chris Evich
b198c57cfb integration-playbook: Idempotent Swapping
If the playbook is run multiple times or a host already has
swap configured, re-adding swap over the existing file
will cause untold problems.  Also, it will not persist across
reboots unless added to fstab.

Avoid this by checking if any swap is active. If not
create a unique swapfile and format it.  Then enable
it to persist across reboots.

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-10-18 13:42:07 -04:00
Mrunal Patel
761e73c82e Move crio default sock to /var/run/crio/crio.sock
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-10-17 22:02:53 -07:00
Antonio Murdaca
ab68c553d8
CI: use a fixed runc version, not master
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-10-16 14:50:13 +02:00
Nalin Dahyabhai
a88f6840d8 Look up the container's name for kpod-stop-by-name
In the kpod-stop-by-name test, use 'kpod inspect' to look up the name of
the container, rather than predicting the name that crio will assign.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-10-12 17:54:47 -04:00
Mrunal Patel
9c518dc03b test: Fix kube dns bring up in cluster
We have to call hack/local-up-cluster from kubernetes directory
as it makes relative calls to cluster/kubectl.sh. The failure
of these calls led to kube-dns not coming up.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-10-06 11:50:27 -07:00
Mrunal Patel
c3630f807e test: Update go to 1.8.4
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-10-05 11:30:15 -07:00
Mrunal Patel
a643e533d8 Skip building btrfs support if library isn't installed
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-10-03 13:18:36 -07:00
Steve Kuznetsov
40132d786d
Install Go directly from upstream, not through RPM
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-10-02 07:18:41 -07:00
Daniel J Walsh
6866589be7 Drop btrfs support from RHEL and CentOS
Packages are no longer available to build on RHEL and CentOS and
btrfs is not longer supported, so we should not build with it.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-29 20:34:29 +00:00
Daniel J Walsh
1a41d6ecd4 Remove references to overlay2 in the code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-29 20:34:29 +00:00
Mrunal Patel
e0ffa43c34 test: Add flags to enable xfs pquota support
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-09-29 10:31:46 -07:00
Chris Evich
9024bdbc28 integration: Fix chdir in wrapper script
Previously the wrapper changed to $WORKSPACE prior to executing
the ansible-playbook command.  This has the unintended consequence of
preventing use of relative paths.  Fix this by using absolute paths in
wrapper script instead of changing directories.

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-09-28 14:05:25 -04:00
Chris Evich
493a72bbc9 integration: Use vars_files in plays
It's unsightly and hard to maintain collections of references and long
lists across multiple playbooks/include files.  Centralize them all
in ``vars.yml``, then include that in all plays.

Minor: Update all files with a newline at the start and end.

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-09-28 14:05:25 -04:00
Chris Evich
a30a118fe6 integration: Collect subject results
Add a playbook to pull down the integration and e2e testing
logs/xml.  By default they will appear in a 'artifacts' subdirectory
of wherever the ``results.yml`` playbook lives. If the ``$WORKSPACE``
env. var is set and non-empty, the subdirectory will be created
there instead.

Inside the ``artifacts`` directory, further sub-directories are created,
one for each subject's Ansible inventory name.  Within those
sub-directories are all the collected logs from that host.  In this way,
automation may simply archive the entire 'artifacts' directory to
capture the important log files.

(Depends on PR #935)

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-09-28 14:05:25 -04:00
Chris Evich
76e25eea42 integration: jUnit output from e2e
Processing node-e2e.log into jUnit format is insane, it's chock-full of
terminal escape codes.  They would either need to be scraped/removed or
disabled somehow.  Instead, take advantage of ``e2e.go --report-dir=``
option.  This will cause it to store native jUnit results in the
specified directory for later collection.  The jUnit results are also
needed for the google test grid.

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-09-28 14:05:25 -04:00
Chris Evich
0e55fb2ea3 integration: Add color + readable logging
When run by hand, it's much easier to spot things going wrong when
they're colored in red.  Add an ansible.cfg to make that happen.  This
also sets a default output log file (``$ARTIFACTS/main.log``) - that
doesn't contain color-codes.

When executing against multple hosts, the output can sometimes become
difficult to read, esp. with lots of async. tasks.  The callback_plugin
script reorganizes how the console and log is organized, making it
clearer which host did what and when.

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-09-28 14:05:25 -04:00
Mrunal Patel
d669878914 Merge pull request #937 from rhatdan/umount
Tell oci-umount where to remove mountpoints inside container
2017-09-27 13:57:10 -07:00
Steve Kuznetsov
5b763286ff
Don't ignore failures in the e2e suite
There are no tasks that we need to run after the suite has finished,
like we do with the integration suite, so it does not make sense to
ignore the errors coming out of the e2e suite.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-09-27 08:11:27 -07:00
Daniel J Walsh
51b2254742 Tell oci-umount where to remove mountpoints inside container
This patch set add crio-umount.conf file which tells oci-umount plugin
to look for leaked mount points in /var/lib/containers/storage/* and
/var/run/containers/*

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-25 15:21:17 -04:00
Steve Kuznetsov
e160796d4e
Refactor the CRI-O test playbook to be more modular
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-09-25 10:02:04 -07:00
Chris Evich
bedf75dcfc integration-playbook: Require RHEL repos.
Both the base and extras repos are required.  Rather than try to fuss
around with subscription manager, require two variables be defined
pointing to the baseurl's to use.  Assert that these variables are set
and non-empty.

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-09-21 13:01:08 -04:00
Chris Evich
78c400ccd3 integration-playbook: Increase test timeout
Depending on circumstances out of our control, the 'integration tests'
may take longer than an hour (3600 seconds).  Since the maximum time
is referenced in several places, define a variable with a larger value
then reference it from the affected tasks.

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-09-21 13:01:08 -04:00
Chris Evich
e6b5fc7d53 integration-playbook: Add hidden dependencies
Previously, an internal playbook installed many extra
necessary/unnecessary packages before this playbook even started.  Since
this is a terrible design, move all dependencies here so that nothing is
unwritten.  This includes installing some deps. for ansible itself
(which must be done as a raw command).

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-09-21 13:01:08 -04:00
Chris Evich
29c4d890c8 Faster venv-ansible-playbook.sh
If running a playbook more than once, there's no need to re-bootstrap
the virtual environment.  Assume if the verified crio directory already
exists, it should be used (after re-asserting hashes of requirements).

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-09-21 12:59:33 -04:00
Antonio Murdaca
0c1383fd30
test: add inspect integration tests
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-09-17 10:19:31 +02:00
Aaron Weitekamp
adb0d19416
Add image pull with signature integration test
Signed-off-by: Aaron Weitekamp <aweiteka@redhat.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-09-11 13:34:30 +02:00
Antonio Murdaca
c9672671db
contrib: test: redirect stderr to stdout
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-09-09 18:13:56 +02:00
Antonio Murdaca
dd1c617467
contrib: test: switch node-e2e to e2e
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-09-09 00:44:21 +02:00
Antonio Murdaca
09a8d1a751
contrib: test: run kube tests in CI with same cgroup driver
Our CI tests on RHEL and Fedora and we want to test the systemd cgroup
driver. However, kubelet needs to run in tests with systemd cgroup
driver as well, or tests fail. This patch fixes broken CI because of
not matching cgroup driver between CRI-O and the kubelet.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-09-08 14:26:39 +02:00
Antonio Murdaca
b8a6d358e7 Merge pull request #562 from rhatdan/hooks
Add support for running oci-hooks
2017-09-07 19:06:01 +02:00
Mrunal Patel
b13e881a9b Merge pull request #858 from runcom/fix-add-registry
pkg: storage: fix additional registries
2017-09-07 07:34:57 -07:00
Antonio Murdaca
f7cbbf5e69 Merge pull request #813 from cevich/addswap
Add file-backed swap to prevent OOM
2017-09-07 14:56:08 +02:00
Antonio Murdaca
1f908f0890
pkg: storage: fix additional registries
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-09-07 11:57:16 +02:00
Antonio Murdaca
5947698818
test: replace bash CNI plugin with a custom bridge
Because we need a working CNI plugin to setup a correct netns so
sandbox_run can grab a working IP address.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-09-06 17:14:53 +02:00
Daniel J Walsh
139d0841e8 Add support for oci-hooks to libkpod
Add new directory /etc/crio/hooks.d, where packagers can drop a json config
file to specify a hook.

The json must specify a valid executable to run.
The json must also specify which stage(s) to run the hook:
prestart, poststart, poststop
The json must specify under which criteria the hook should be launched
If the container HasBindMounts
If the container cmd matches a list of regular expressions
If the containers annotations matches a list of regular expressions.
If any of these match the the hook will be launched.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-05 07:39:31 -04:00
Chris Evich
4f1d303824 Minor: Update venv req. hashes for internal CI
Signed-off-by: Chris Evich <cevich@redhat.com>
2017-08-31 15:25:19 -04:00
Chris Evich
8689fe8aed Minor: Make wrapper script non-zero exits fatal.
Signed-off-by: Chris Evich <cevich@redhat.com>
2017-08-31 13:06:58 -04:00
Chris Evich
054793b80e Add Ansible playbook env. setup wrapper script
The environment executing the test playbooks matters.  Establish a
script to bootstrap a known-good and fixed-version python virtual
environment.  Spell out precise execution requirements in a standard
pip 'requirements.txt' file, including version numbers and hashes.

Upon executing the ``venv-ansible-playbook.sh`` wrapper, a virtual
environment is setup and contained within a fixed (or temporary)
directory, with full logs from setup.  If this is to be preserved
across executions, the ``$WORKSPACE`` environment variable must be
set and exported beforehand.

Example execution command-line provided in script file

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-08-31 06:10:48 -04:00
Chris Evich
f65d548ac2 Add file-backed swap to prevent OOM
Without any swap space enabled, it's possible some intensive operation
can chew up all the memory on the test VM.  Enabling swap space will
prevent this for minor cases, but could lead to disk-thrashing if the
memory demand is excessive.

Since the test system never reboots, using a file-backed swap should
suffice. Though not ideal, it's easy to setup and doesn't require any
interactions with the cloud that owns the VM or the job that created it.

Signed-off-by: Chris Evich <cevich@redhat.com>
2017-08-30 14:01:25 -04:00
Antonio Murdaca
59ba89d64d
*: fix crictl vendor
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-08-27 10:54:36 +02:00
Antonio Murdaca
49bdd59406
*: initial wire in of crictl from cri-tools
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-08-22 20:14:49 +02:00
Antonio Murdaca
d56bf090ce
*: update kube vendor to v1.7.4
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-08-22 17:32:14 +02:00
asifdxtreme
39722ab5e6 Fix Typo in Readme
Signed-off-by: asifdxtreme <mohammad.asif.siddiqui1@huawei.com>
2017-08-15 10:48:39 +08:00
Nalin Dahyabhai
1e1d6a512f Build with ostree
Build using a locally-built copy of ostree in testing setups.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-24 13:03:07 -04:00
Daniel J Walsh
23c66c7bdf We need to support the name cri-o and crio for rpm and systemd
Adding these aliases will make it easier for users who forget to
use crio or cri-o.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-07-19 07:29:36 -04:00
Mrunal Patel
0d0f651828 test: Use cgroupfs for tests
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-07-05 17:29:32 -07:00
Mrunal Patel
c7dd594604 contrib: Set the OOM Score Adjust of cri-o service to be low
We don't want cri-o to be OOM killed easily.

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-06-23 09:04:27 -07:00
Samuel Ortiz
0fb682641b contrib/cni: Fix README link
The CNI plugins are now living in a repo of their own.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-06-12 23:14:35 +02:00
Antonio Murdaca
6a0aab40cb
contrib: systemd: change After to network-online.target
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-06-08 01:25:37 +02:00
Antonio Murdaca
4369537d32
contrib: test: fix failing networking tests in RHEL
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-06-04 19:30:30 +02:00
Alexander Larsson
2507ba6453 Remove json-glib in the remaining places
Signed-off-by: Alexander Larsson <alexl@redhat.com>
2017-06-02 16:18:27 +02:00
Antonio Murdaca
cf037ce947
contrib: test: fix and enable RHEL k8s node-e2e tests
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-05-30 11:52:59 +02:00
Antonio Murdaca
7c43d34a1b
contrib: test: redirect stderr to stdout
I don't want to see stuff like this anymore
https://aos-ci.s3.amazonaws.com/kubernetes-incubator/cri-o/crio-integration-tests-prs/360/fullresults.txt

It's basically missing the actual go build error because stdout gets
eaten somewhere by ansible I guess.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-05-27 10:20:54 +02:00
Antonio Murdaca
0472c33344
contrib: test: CNI plugins moved repo
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-05-25 18:13:15 +02:00
Antonio Murdaca
a19d60654e Merge pull request #526 from runcom/test-cgroup-manager
Test systemd cgroup manager
2017-05-19 11:49:59 +02:00
Antonio Murdaca
3946692107
contrib: test: enable k8s Conformance tests
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-05-18 19:58:35 +02:00
Antonio Murdaca
aeaca81280
contrib: test: run tests with systemd cgroup manager
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-05-18 17:49:49 +02:00
Antonio Murdaca
87ca182f5c
contrib: test: run CentOS tests with overlay2
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-05-17 18:05:07 +02:00
Antonio Murdaca
26a080ad88
contrib: test: tune stuff for CentOS CI
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-05-17 18:03:31 +02:00
Antonio Murdaca
80ad55405f
contrib: test: use upstream Golang to build on CentOS
Cause the one shipped in CentOS is way too old at this point

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-05-17 13:29:59 +02:00
Johnny Bieren
ca963c9959 Update playbook so simply changingg xunit to true will function properly
Signed-off-by: Johnny Bieren <jbieren@redhat.com>
2017-05-16 15:11:54 -04:00
Antonio Murdaca
8c45e7b120
contrib: test: add jenkins playbook
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-05-16 18:29:01 +02:00
Mrunal Patel
5e4809bdfe Fix remnants of ocid -> crio rename
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-05-15 15:05:58 -07:00
Dan Walsh
4493b6f176 Rename ocid to crio.
The ocid project was renamed to CRI-O, months ago, it is time that we moved
all of the code to the new name.  We want to elminate the name ocid from use.
Move fully to crio.

Also cric is being renamed to crioctl for the time being.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2017-05-12 09:56:06 -04:00
Antonio Murdaca
a73f39acf2
contrib: systemd: fix ocid path
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-05-03 23:25:12 +02:00
Daniel J Walsh
54ee55493d Need to cleanup all pods on service poweroff
When powering off the system, we want the ocid service, to shutdown
all containers running on the system so they can cleanup properly
This patch will cleanup all pods on poweroff.

The ocid-shutdown.service drops a file /var/run/ocid.shutdown when the system
is shutting down. The ocid-shutdown.service should only be executed at system
shutdown.

On bootup sequence should be
start ocid.service
start ocid-shutdown.service (This is a NO-OP)

On system shutdown
stop ocid-shutdown.service (Creates /var/run/ocid.shutdown)
stop ocid.service (Notices /var/run/ocid.service and stops all pods before exiting.)

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-04-14 06:04:14 -04:00
Aleksa Sarai
9088a12c75
contrib: cni: provide example CNI configurations
This also updates the readme to no longer contain CNI configuration
information (which had incorrect steps), and rather just points to the
example configs.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-03-20 23:08:28 +11:00
Dan Walsh
71eaad13b1 foobar
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2016-10-31 15:17:23 -04:00
Dan Walsh
8ba639952a Add ocid.spec to build rpms
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2016-10-31 13:43:50 -04:00
Aleksa Sarai
f2f369f6f8
systemd: move ocid.service to contrib/
In addition, remove the installation steps from the Makefile. In
general, I personally don't like projects that install service files on
`make install` -- that's the job of a package manager.

Signed-off-by: Aleksa Sarai <asarai@suse.com>
2016-10-31 23:31:05 +11:00