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>
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>
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>
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>
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>
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>
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>
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>
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>