Commit graph

2120 commits

Author SHA1 Message Date
Mrunal Patel
a480b20652 Support stdin once
We leave the stdin open on first client disconnect if stdin once
is not set in the container configuration.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2018-01-30 15:24:51 -08:00
Antonio Murdaca
3ab6c36b83
Merge pull request #1289 from mrunalp/bump_critools
Bump up cri-tools to f1a58d681c056f259802f5cae2fe1fbcc6b28667
2018-01-30 20:07:14 +01:00
Mrunal Patel
d0fd1f5fa8 Bump up cri-tools to f1a58d681c056f259802f5cae2fe1fbcc6b28667
We need this to pick up a fix for attach test.
This change brings in changes to the crictl CLI
requiring changes to the integration tests.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2018-01-29 19:25:49 -08:00
Mrunal Patel
99b0bdf24e
Merge pull request #1292 from runcom/releases
releases: add releases
2018-01-29 17:43:48 -08:00
Antonio Murdaca
6059a58877
releases: add releases
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2018-01-27 12:43:31 +01:00
Antonio Murdaca
33e1057102
Merge pull request #1288 from mrunalp/attach_close_ctl
container_attach: Ensure ctl file is closed
2018-01-26 18:05:30 +01:00
Mrunal Patel
d2f07f7359
Merge pull request #1287 from wking/lint-command-check
.tool/lint: Use 'command -v' to detect LINTER presence
2018-01-25 18:09:05 -08:00
Mrunal Patel
6f45c1726e container_attach: Ensure ctl file is closed
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2018-01-25 17:04:01 -08:00
W. Trevor King
64bc1c7226 .tool/lint: Use 'command -v' to detect LINTER presence
There was a 'command -v' check back when this script landed in
aa748b62 (makefile stuff, 2016-09-19, #30), but it was removed in
741873ad (Makefile: suggests install.tools, 2016-09-28, #70).  The
default changed from 'gometalinter' to '${GOPATH}/bin/gometalinter' in
6c9628cd (Build and install from GOPATH, 2017-01-17, #320) and the -f
guard landed in 9c240aed (lint: Exit and give instructions when linter
missing, 2017-09-06, #850).  This commit brings us back to our
original 'command -v' check (in POSIX [1]), which allows support for
both filesystem and $PATH based commands (and shell aliases, etc.).

I've also made the default LINTER more flexible, using the
${parameter:-word} syntax from POSIX [2].  That keeps the default
linter unchanged, but allows callers to set the LINTER environent
variable to override.  For example:

  $ LINTER=gometalinter .tool/lint

will use the linter from your $PATH.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html
[2]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-25 15:50:53 -08:00
Mrunal Patel
4b658672aa
Merge pull request #1282 from runcom/etc-hosts-kube
container_create: only bind mount /etc/hosts if not provided by k8s
2018-01-25 13:46:56 -08:00
Antonio Murdaca
54e76afc03
Merge pull request #1281 from wking/gofmt-show-diff
Makefile: Use 'git diff' to show gofmt changes
2018-01-24 15:32:49 +01:00
Antonio Murdaca
cf37995d30
container_create: only bind mount /etc/hosts if not provided by k8s
k8s already mounts /etc/hosts from /var/lib/kubelet/pods/<ID>/etc-hosts
even for host network. We shouldn't play with it unless we're running
from crictl for instance.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2018-01-24 15:06:41 +01:00
Daniel J Walsh
4fee97abe3
Merge pull request #1278 from remore/patch-1
Fix a few minor errors in the tutorial document
2018-01-24 04:15:33 -05:00
Kei Sawada
a50f352eb4 Update tutorial.md to fix a few minor errors
Signed-off-by: Kei Sawada <k@swd.cc>
2018-01-24 14:47:32 +09:00
Mrunal Patel
ed40d645cd
Merge pull request #1255 from runcom/panics-grpc-getters
server: use grpc getters to avoid panics
2018-01-23 07:43:08 -08:00
W. Trevor King
8dbc2d1fff Makefile: Use 'git diff' to show gofmt changes
This makes fixing errors easier.  Before this commit, errors looked
like [1]:

  $ make gofmt
  !!! 'gofmt -s' needs to be run on the following files:
  ./lib/config.go
  make: *** [gofmt] Error 1

But that's not very helpful when your local gofmt thinks the file is
fine.  With this commit, errors will look like:

  $ make gofmt
  find . -name '*.go' ! -path './vendor/*' -exec gofmt -s -w {} \+
  git diff --exit-code
  diff --git a/lib/config.go b/lib/config.go
  index 1acca8c7..6a63b2b0 100644
  --- a/lib/config.go
  +++ b/lib/config.go
  @@ -2,7 +2,7 @@ package lib

   import (
          "bytes"
  -"io/ioutil"
  +       "io/ioutil"

          "github.com/BurntSushi/toml"
          "github.com/kubernetes-incubator/cri-o/oci"
  make: *** [Makefile:68: gofmt] Error 1

(or whatever, I just stuffed in a formatting error for demonstration
purposes).

Also remove the helper script in favor of direct Makefile calls,
because with Git handling difference reporting and exit status, this
becomes a simpler check.  find's -exec, !, and -path arguments are
specified in POSIX [2].

[1]: https://travis-ci.org/kubernetes-incubator/cri-o/jobs/331949394#L1075
[2]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-22 16:47:09 -08:00
Mrunal Patel
ddb14b7303
Merge pull request #1269 from wking/server-capabilities-setup-helper
server/container_create: Factor out setupCapabilities helper
2018-01-22 15:29:22 -08:00
Mrunal Patel
924821e4bf
Merge pull request #1277 from wking/namespace-test-helper
test/namespaces: Factor out pid_namespace_test helper
2018-01-20 19:49:38 -08:00
W. Trevor King
080b84dfcd test/namespaces: Factor out pid_namespace_test helper
DRY up this code.  The ${parameter:-word} syntax is in POSIX [1].

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-20 15:58:47 -08:00
Mrunal Patel
214096b7ed
Merge pull request #1268 from wking/libdevmapper-install-check
hack/libdm_installed.sh: Add a test for libdevmapper.h
2018-01-20 09:19:24 -08:00
Antonio Murdaca
8c87b6104f
Merge pull request #1267 from mrunalp/update_readme_1.9
Add 1.9 release to compatibility table
2018-01-20 02:28:20 +01:00
Mrunal Patel
b7995aa526
Merge pull request #1275 from wking/remove-unused-play-png
docs: Remove the unused play.png
2018-01-19 17:02:33 -08:00
W. Trevor King
822a6516cf docs: Remove the unused play.png
The last consumer was removed in 1bf6d203 (Remove kpod code after
repository move, 2017-11-02, #1111).

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-19 16:12:39 -08:00
W. Trevor King
523326b7ba server/container_create: Factor out setupCapabilities helper
Having a separate function holding the details of this makes reading
createSandboxContainer easier.

While I was moving the code, I've also cleaned up two things:

* The nil capabilities check is now earlier, where before it had been
  between the ALL handling and the non-ALL handling.

* I've added a capPrefixed variable to avoid having multiple
  toCAPPrefixed calls per capability.

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-19 11:52:45 -08:00
W. Trevor King
826298483a hack/libdm_installed: Add a test for libdevmapper.h
Avoid crashing 'make' with:

  No package 'devmapper' found

by disabling the devmapper driver when the library it requires is not
installed.  Also give the libdm_no_deferred_remove script a more
specific name to avoid confusion.

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-19 11:43:24 -08:00
Mrunal Patel
7851115693 Add 1.9 release to compatibility table
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2018-01-19 10:37:51 -08:00
Antonio Murdaca
77561e95cf
Merge pull request #1264 from wking/test-readme-plugins-moved-from-cni
test/README: Update the CNI plugins instructions for /cni → /plugins
2018-01-18 23:58:08 +01:00
Antonio Murdaca
cbfdda868a
Merge pull request #1263 from wking/doc-stale-make-output
kubernetes: Simplify and freshen the required-files table
2018-01-18 23:54:15 +01:00
W. Trevor King
282b900433 test/README: Update the CNI plugins instructions for /cni -> /plugins
Catching up with the Dockerfile change from f51b0a10 (Dockerfile: move
to containernetworking/plugins, 2017-05-25, #536).  The new plugins
commit from f51b0a10 is still the current Dockerfile entry.

This commit also replaces the previous 'go get' call with a git clone
to match the Dockerfile's approach.  I've added an additional 'cd'
call so I don't have to repeat $GOPATH/... more than once, but other
than that, the example matches the current Dockerfile entry.

I've also removed some line-continuation slashes we've been dragging
around since the section landed 07ccda33 (tests: Install CNI
configuration files by default, 2017-04-06, #434).  I'm guessing they
were a copy/paste bug from the Dockerfile, but this example has new
prompts for each command (so it doesn't need continuation) while the
Dockerfile is using && chaining (so it does).

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-18 14:12:33 -08:00
Mrunal Patel
1bb5846d7d
Merge pull request #1261 from wking/clear-containers-moved
test/README: Clear Containers moved to clearcontainers/runtime
2018-01-18 14:01:42 -08:00
W. Trevor King
15d839ea0d kubernetes: Simplify and freshen the required-files table
The cri-o entries are stale vs. the content currently installed by the
Makefile.  This commit drops them and just references the make call
before starting the table, which lets us stay DRY.

runc is not built from the cri-o repository.  The docs have claimed it
was since 983aec63 (doc: Add instruction to run cri-o with kubernetes,
2017-01-31, #353), but it's independent like the CNI plugins.

The CNI plugins were moved to containernetworking/plugins in
containernetworking/cni@bc0d09e (plugins: moved to
containernetworking/plugins, 2017-05-17, containernetworking/cni#457).

I've added a link to the in-repo policy.json example.  We probably
also want to link to the docs (for the version we vendor?) [1], but
I've left that alone for now.

The CNI config examples were removed from the project README in
9088a12c (contrib: cni: provide example CNI configurations,
2016-12-24, #295).  I've adjusted the reference to point to the new
location, although again, I'd rather replace this with links to
upstream docs.

[1]: 3d0304a021/docs/policy.json.md

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-18 13:49:50 -08:00
W. Trevor King
bf8a99c085 tutorial: Drop 'make install' output to stay DRY
'make install' hasn't installed crio.conf since 8b632729 (Install to
/usr/local to avoid conflicts with vendor binaries, 2017-01-04, #304).
And Make output is usually not particularly interesting.

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-18 13:27:39 -08:00
W. Trevor King
2bf750c871 tutorial: Drop install.config output to stay DRY
install.config has also installed rio-umount.conf since 51b225474
(Tell oci-umount where to remove mountpoints inside container, #937,
2017-09-21).  And Make output is usually not particularly interesting.

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-18 13:18:28 -08:00
Mrunal Patel
ba2b4a03d0
Merge pull request #1262 from wking/mailmap
.mailmap: Add entries for inconsistent users
2018-01-18 10:55:53 -08:00
W. Trevor King
8c7c70c2db .mailmap: Add entries for inconsistent users
Where the same user had multiple entries, I mostly went with whichever
entry had the most-recent non-merge commits.

The order is alphabetical according to Emacs' sort-lines.

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-18 10:17:00 -08:00
W. Trevor King
e124834b0d test/README: Clear Containers moved to clearcontainers/runtime
And changed the name of their binary.  This commit catches the docs up
with intel/cc-oci-runtime#1065 (merged 2017-09-25).

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-18 09:47:56 -08:00
Antonio Murdaca
cb8033cd19
Merge pull request #1244 from rhatdan/hooks-args
Allow additional arguments to be passed into hooks
2018-01-15 23:29:45 +01:00
Antonio Murdaca
8c190a683c
server: use grpc getters to avoid panics
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2018-01-12 16:14:29 +01:00
Mrunal Patel
d0e0303921
Merge pull request #1252 from runcom/node-e2e
[DO NOT MERGE] contrib: test: add node-e2e job
2018-01-11 10:13:36 -08:00
Antonio Murdaca
8d2a572ead
contrib: test: add node-e2e job
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2018-01-11 16:56:47 +01:00
Daniel J Walsh
22e25158ca
Merge pull request #1251 from vbatts/Makefile_config_target
Makefile: installing a config, requires a config
2018-01-11 06:12:47 -05:00
27c2eda635
Makefile: installing a config, requires a config
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2018-01-10 16:23:35 -05:00
Daniel J Walsh
23d20c9db5 Allow additional arguments to be passed into hooks
If a packager wants to be able to support addititional arguments on his
hook this will allow them to setup the configuration with these arguments.

For example this would allow a hook developer to add support for a --debug
flag to change the level of debugging in his hook.

In order to complete this task, I had to vendor in the latest
github.com://opencontainers/runtime-tools, which caused me to have to fix a
Mount and Capability interface calls

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-01-09 13:44:16 -05:00
Mrunal Patel
41aaf4e3d8
Merge pull request #1250 from giuseppe/fix-tmpdir-files
syscontainer: create /var/run/crio
2018-01-09 10:01:11 -08:00
Giuseppe Scrivano
2cb22eba49
syscontainer, fedora: create /var/run/crio
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-01-09 18:01:03 +01:00
Giuseppe Scrivano
6bb1b7e17d
syscontainer, rhel: create /var/run/crio
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-01-09 18:00:53 +01:00
Giuseppe Scrivano
b1b380d67b
syscontainer, centos: create /var/run/crio
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-01-09 18:00:43 +01:00
Antonio Murdaca
6f4d7c1ae0
Merge pull request #1216 from rhatdan/conmon
Improve error messages on missing runtime
2018-01-06 14:48:22 +01:00
Mrunal Patel
c351bc81e1
Merge pull request #1245 from giuseppe/system-container-read-env-from-file
contrib: system containers read env from /etc/sysconfig/crio-(network|storage)
2018-01-04 14:31:43 -08:00
Giuseppe Scrivano
b5167d4e8f
syscontainer, centos: read env variables from files
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-01-04 20:14:52 +01:00