Cache information about images that isn't trivially read from them, so
that ImageStatus and particularly ListImages don't have to do
potentially-expensive things for every image that they report.
The cache is an in-memory map, and we prune it after ListImages has
assembled its result set.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
We had a bug in ImageStatus where we weren't returning the default
image user if set, thus running all containers as root despite a user
being set in the image config. We weren't populating the Username field
of ImageStatus.
This patch fixes that along with the handling of multiple images based
on the registry patch for multiple images.
It also fixes ListImages to return Username as well.
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
We weren't setting the logPath of the sandbox when restoring sandboxes
and containers upon a crio restarts. That means that if you restart
CRI-O you get sandboxes with empty logPath. That means that when you're
starting a container in a restored sandbox you get a relative logPath
for the container:
sandboxLogPath: "/var/something"
- restore
sandboxLogPath: ""
- create container foo
containerLogPath: "foo_attempt.log"
With this patch we actually get an absolute path (which is correct):
sandboxLogPath: "/var/something"
- restore
sandboxLogPath: "/var/something"
- create container foo
containerLogPath: "/var/something/foo_attempt.log"
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
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>