Commit graph

2150 commits

Author SHA1 Message Date
Dongsu Park
2080744963 server: fix panic when assigning entry to nil map
When running cri-tests with cri-o, I found out that cri-o panicked
immediately with the following message. Fix it by accessing to the
labels map only if it's non-nil.

```
panic: assignment to entry in nil map

goroutine 57 [running]:
.../cri-o/server.(*Server).RunPodSandbox(0xc42048e000, 0x7efcad4cd400,
0xc42066ec90, 0xc4201703d0, 0x0, 0x0, 0x0)
        .../cri-o/server/sandbox_run.go:225 +0xda5
.../cri-o/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime
._RuntimeService_RunPodSandbox_Handler(0x21793e0, 0xc42048e000,
0x7efcad4cd400, 0xc42066ec90, 0xc4204fe780, 0x0, 0x0, 0x0, 0x0, 0x0)
        .../cri-o/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.pb.go:3645 +0x279
.../cri-o/vendor/google.golang.org/grpc.(*Server).processUnaryRPC(0xc420
09e3c0, 0x33e79c0, 0xc4203d1950, 0xc42080a000, 0xc4202bb980, 0x33b1d58,
0xc42066ec60, 0x0, 0x0)
        .../cri-o/vendor/google.golang.org/grpc/server.go:638 +0x99c
```

Signed-off-by: Dongsu Park <dongsu@kinvolk.io>
2017-09-29 16:19:21 +02:00
Mrunal Patel
7d5d652f65 Merge pull request #945 from cevich/just_collect_results
Write playbook to collect results from subjects
2017-09-28 18:39:18 -07:00
Daniel J Walsh
3394b3b2d6 Merge pull request #958 from umohnani8/man_pages
Made some changes to man pages
2017-09-28 14:59:54 -04: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
Daniel J Walsh
7e3d0c652d Merge pull request #853 from mheon/libpod_state
Add skeletons for libpod container, pod, state
2017-09-28 13:11:08 -04:00
Daniel J Walsh
a40aa7ad54 Merge pull request #907 from baude/kpod_kill
Add support for kpod kill
2017-09-28 12:59:38 -04:00
umohnani8
5a1314547a Made some changes to man pages
kpod ps manpage had misleading info
Fixed the Global options and options in other man pages

Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-09-28 11:45:01 -04:00
Matthew Heon
00e1ac7b25 Move runtime Pod and Container APIs to separate files
Signed-off-by: Matthew Heon <mheon@redhat.com>
2017-09-28 11:18:47 -04:00
Matthew Heon
ae5634f8dd Add errors listing to libpod
Signed-off-by: Matthew Heon <mheon@redhat.com>
2017-09-28 11:18:47 -04:00
Matthew Heon
f8e48aad29 Change names of GetContainers and GetPods
Signed-off-by: Matthew Heon <mheon@redhat.com>
2017-09-28 11:16:09 -04:00
Matthew Heon
35e951fc8c Add basic skeletons of state handling, containers and pods
Signed-off-by: Matthew Heon <mheon@redhat.com>
2017-09-28 11:16:09 -04:00
Matthew Heon
2850fb60a5 Add basic state interface for libpod
Signed-off-by: Matthew Heon <mheon@redhat.com>
2017-09-28 11:13:11 -04:00
Matthew Heon
ee24340f0c Make runtimes invalid on shutdown to prevent furhter use
Signed-off-by: Matthew Heon <mheon@redhat.com>
2017-09-28 11:13:11 -04:00
Matthew Heon
bb77300641 Move everything in libpod into a single package for simplicity
Signed-off-by: Matthew Heon <mheon@redhat.com>
2017-09-28 11:13:11 -04:00
Daniel J Walsh
251f16af80 Merge pull request #883 from umohnani8/libpod
Continue switching commands from libkpod to libpod
2017-09-28 11:09:01 -04:00
baude
7b062cf4c1 Add support for kpod kill
Kill one or more containers using a user-provided signal.  If not signal
is provided, KILL is used.

Signed-off-by: baude <bbaude@redhat.com>
2017-09-28 09:34:21 -05:00
Daniel J Walsh
e2c87f515b Merge pull request #925 from baude/kpod_wait
Add kpod wait
2017-09-28 05:08:53 -04:00
Daniel J Walsh
e70802863e Switch kpod load/push/save to use libpod runtime
Since this is the last use of libpod/images/copy.go,
removing that code

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-27 22:33:20 -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
Ed Santiago
b2d347d8cd Parameterize CRIO_CNI_PLUGIN
Allow overriding CRIO_CNI_PLUGIN (default: /opt/cni/bin) and
make sure it gets written to our crio.conf file. This is
intended for running cri-o tests with containernetworking-cni
rpm which installs into /usr/libexec/cni

Signed-off-by: Ed Santiago <santiago@redhat.com>
2017-09-27 14:19:20 -06:00
Mrunal Patel
0f01268557 Merge pull request #952 from stevekuznetsov/skuznets/e2e-fail
Don't ignore failures in the e2e suite
2017-09-27 09:26:49 -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
baude
3bf23b684a Add kpod wait
Waits on one or more containers to stop and prints the container's
return code

Signed-off-by: baude <bbaude@redhat.com>
2017-09-27 09:03:33 -05:00
Daniel J Walsh
214adee0ef Merge pull request #926 from TomSweeneyRedHat/pause
Add `kpod pause` and `kpod unpause`
2017-09-27 09:33:22 -04:00
Daniel J Walsh
154283764d Merge pull request #866 from vbatts/fine_grain_targets
Makefile: break out the `install` target
2017-09-27 09:20:26 -04:00
Mrunal Patel
41372dba70 Merge pull request #940 from vbatts/no-pivot
*: allow to not use pivot_root
2017-09-26 16:18:08 -07:00
Daniel J Walsh
8e6d5b1c9a Merge branch 'master' of github.com:kubernetes-incubator/cri-o into umount
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-26 21:41:02 +00:00
Daniel J Walsh
8949e669c9 Modify kpod tag to use libpod runtime interface
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-26 16:14:34 -04:00
53a9472b94
man-pages: add no_pivot information
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-09-26 11:35:09 -04:00
d6a44bf111
*: allow to not use pivot_root
runc has a `--no-pivot` flag, that uses MS_MOVE instead.

This patch set bubbles up a runtime config to enable using no-pivot
globally.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-09-26 11:35:00 -04:00
Antonio Murdaca
0ff3580f05 Merge pull request #891 from mrunalp/cfg_log_max
Max log size config
2017-09-26 17:04:57 +02:00
a22d04de4b
Makefile: break out the install target
Where `make install` still has the same behaviour, but you could instead
only `make install.bin` if you don't need the man pages.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-09-26 09:32:39 -04:00
Daniel J Walsh
9db7cf1370 Add kpod pause and kpod unpause
Implement the ability to pause and unpause running containers.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2017-09-26 08:38:07 -04:00
Daniel J Walsh
45747cc5d0 Merge pull request #946 from sameo/topic/readme
README: Update status
2017-09-26 07:54:18 -04:00
Samuel Ortiz
266e620ea9 README: Update status
We're at rc2 now.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-09-26 12:24:14 +02:00
Mrunal Patel
37e282a29b docs: Add docs for log size max
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-09-25 16:08:09 -07:00
Mrunal Patel
d47061ac57 test: Add a test for log size max
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-09-25 15:37:55 -07:00
Mrunal Patel
4d0270d138 crio: Add flag for --log-size-max
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-09-25 15:37:10 -07:00
Mrunal Patel
c7d33e1899 conmon: Re-open the log file to not exceed max log file size
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-09-25 15:36:14 -07:00
Mrunal Patel
82899bdb4e conmon: Track the number of bytes written to the container log file
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-09-25 15:35:25 -07:00
Mrunal Patel
48d0706a49 Add log size max flag to conmon and pass it on container create
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-09-25 15:31:31 -07:00
Mrunal Patel
bb11ee522b oci: Add log size max to container
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-09-25 15:28:29 -07:00
Mrunal Patel
c7f5347673 Add log size max configuration
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-09-25 15:27:21 -07:00
Mrunal Patel
db0bd66fca Merge pull request #917 from runcom/fixes-rc3-0
Fix Origin test and update kube to v1.7.6
2017-09-25 14:55:42 -07:00
Antonio Murdaca
a8ee86b1cc Merge pull request #943 from mrunalp/info_client
client: Add crio client package
2017-09-25 23:04:04 +02: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