Commit graph

1823 commits

Author SHA1 Message Date
baude
e27230bbaf kpod rmi by ID untagged: %name incorrect
As described in https://github.com/kubernetes-incubator/cri-o/issues/888, when
deleting by ID, the name being returned for the untagged message was "".

Signed-off-by: baude <bbaude@redhat.com>
2017-10-04 15:16:10 -05:00
baude
ee2b84167c kpod rmi by ID untagged: %name incorrect
As described in https://github.com/kubernetes-incubator/cri-o/issues/888, when
deleting by ID, the name being returned for the untagged message was "".

Signed-off-by: baude <bbaude@redhat.com>
2017-10-04 15:49:51 -04:00
baude
3611f92ddf BUGFIX: Invalid return codes in kpod
Set the exitsdir for kpod back to /var/run/crio... so kpod can benefit
from the container exit file.

Because 0 is the int32 blank value, kpod needs its own container state
struct with the omitempty removed so it can actually display 0 in
its default json output.

Signed-off-by: baude <bbaude@redhat.com>
2017-10-04 09:34:28 -05:00
TomSweeneyRedHat
f92ed659ab Add pause state to ps, touchup kpod man page
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2017-10-04 07:42:21 -04:00
Daniel J Walsh
04e96d05fc validateFlags command line options to make sure the user entered a value
When a user enters a CLI with a StringFlags or StringSliceFlags and does not add
a value the CLI mistakently takes the next option and uses it as a value.

This usually ends up with an error like not enough options or others.  Some times
it could also succeed, with weird results.  This patch looks for any values that
begin with a "-" and return an error.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-10-04 09:36:29 +00:00
Mrunal Patel
3e2ad8f10a Merge pull request #969 from mrunalp/btrfs_build
Btrfs build
2017-10-03 18:01:14 -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
Daniel J Walsh
1a61584c2f Merge pull request #970 from nikhita/fix-design-proposal-link
tutorial: fix link after design proposal move
2017-10-03 06:08:34 -04:00
Nikhita Raghunath
37debee9a2 Fix link to design proposal 2017-10-03 11:53:58 +05:30
Mrunal Patel
a8ea146d71 Merge pull request #963 from stevekuznetsov/skuznets/assume-golang
Install Golang from source
2017-10-02 10:06:14 -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
e5749088b2 Merge pull request #962 from kinvolk/dongsu/fix-panic-run-podsandbox
server: fix 2 panics in RunPodSandbox
2017-10-02 09:18:06 -04:00
Daniel J Walsh
88fc20be1e Merge pull request #948 from rhatdan/quota
Add Overlay Quota support
2017-10-02 08:48:06 -04:00
Daniel J Walsh
f33b59861b Merge pull request #878 from umohnani8/refactor_tests
Refactor kpod tests
2017-10-02 08:45:25 -04:00
Nalin Dahyabhai
2491d38e03 Also refactor setting flags for running kpod
* Remove duplicate definitions of storage-related flags for kpod, since
  we set them in helpers.bash now, and the other locations that were
  also setting it were doing so after loading the definitions in
  helpers.
* Set kpod storage flags after checking if we need to force use of the
  "vfs" storage driver for cri-o, to make sure kpod also ends up with
  the same override if we're using one.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-09-29 16:37:07 -04:00
Daniel J Walsh
e16bb3feb3 Refactor kpod tests
Move kpod tests from kpod.bats to kpod_[commandname].bats
Also make sure all status checks have a echo $output before them.

Signed-off-by: Ryan Cole <rcyoalne@gmail.com>

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-09-29 16:37:07 -04: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
Daniel J Walsh
51fc13abf3 Add documentation on setting up quota
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-29 20:34:29 +00:00
Daniel J Walsh
29bd1c79dd Vendor in container storage
This should add quota support to cri-o

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-29 20:34:29 +00:00
Mrunal Patel
e838611fdd Merge pull request #954 from mrunalp/add_pquota
test: Add task to enable xfs pquota support
2017-09-29 10:38:34 -07: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
Dongsu Park
644a4af377 server: handle cases of securityContext, namespaceOptions being nil
Both GetSecurityContext() and GetNamespaceOptions() can return nil.
In these cases, cri-o will panic like this:

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1 pc=0x1cc43f6]

goroutine 66 [running]:
.../cri-o/server.(*Server).RunPodSandbox(0xc42060e300, 0x7f611d37a0b8,
0xc420207e60, 0xc42015e318, 0x0, 0x0, 0x0)
        .../cri-o/server/sandbox_run.go:261 +0xfe6
.../cri-o/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime._RuntimeService_RunPodSandbox_Handler(0x2180920,
0xc42060e300, 0x7f611d37a0b8, 0xc420207e60, 0xc420505950, 0x0, 0x0, 0x0,
0x64ed0d, 0xc42064bc80)
        .../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(0xc4200a4240,
0x33f28e0, 0xc4204b0360, 0xc42074a870, 0xc420476de0, 0x33bcd38, 0xc420207e30, 0x0, 0x0)
```

Signed-off-by: Dongsu Park <dongsu@kinvolk.io>
2017-09-29 17:00:16 +02:00
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