Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit 047df7a

Browse files
authored
Merge pull request #602 from mikebrow/critools-install-minor-update
update critools
2 parents 2acd6c1 + edb2b23 commit 047df7a

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed

cluster/health-monitor.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ CHECK_PERIOD=${CHECK_PERIOD:-10}
2828
SLEEP_SECONDS=${SLEEP_SECONDS:-120}
2929

3030
while true; do
31-
# Use crictl sandboxes because it requires both containerd and
31+
# Use crictl pods because it requires both containerd and
3232
# cri-containerd to be working.
33-
if ! timeout ${COMMAND_TIMEOUT} ${CRICTL} sandboxes > /dev/null; then
34-
echo "crictl sandboxes timeout!"
33+
if ! timeout ${COMMAND_TIMEOUT} ${CRICTL} pods > /dev/null; then
34+
echo "crictl pods timeout!"
3535
pkill containerd
3636
pkill cri-containerd
3737
# Wait for a while, as we don't want to kill it again before it is really up.

docs/crictl.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@ $ cat sandbox-config.json
5050
}
5151
}
5252

53-
$ crictl runs sandbox-config.json
53+
$ crictl runp sandbox-config.json
5454
e1c83b0b8d481d4af8ba98d5f7812577fc175a37b10dc824335951f52addbb4e
55-
$ crictl sandboxes
56-
SANDBOX ID CREATED STATE NAME NAMESPACE ATTEMPT
55+
$ crictl pods
56+
PODSANDBOX ID CREATED STATE NAME NAMESPACE ATTEMPT
5757
e1c83b0b8d481 2 hours ago SANDBOX_READY nginx-sandbox default 1
5858
$ crictl inspects e1c8
59-
... displays information about the pod and the sandbox pause container.
59+
... displays information about the pod and the pod sandbox pause container.
6060
```
6161
* Note: As shown above, you may use truncated IDs if they are unique.
6262
* Other commands to manage the pod include `stops ID` to stop a running pod and
63-
`rms ID` to remove a pod sandbox.
63+
`rmp ID` to remove a pod sandbox.
6464

65-
## Create and Run a Container in a Sandbox (using a config file)
65+
## Create and Run a Container in a Pod Sandbox (using a config file)
6666
```console
6767
$ cat sandbox-config.json
6868
{

hack/cri-reset.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ crictl_rm_stopped_containers() {
2929
done
3030
}
3131

32-
crictl_stop_sandboxes() {
33-
for x in $($CRICTL_CLI sandboxes | awk '{ print $1 }' | awk '{if(NR>1)print}') ;do
32+
crictl_stop_pods() {
33+
for x in $($CRICTL_CLI pods | awk '{ print $1 }' | awk '{if(NR>1)print}') ;do
3434
$CRICTL_CLI stops $x
3535
done
3636
}
3737

38-
crictl_rm_sandboxes() {
39-
for x in $($CRICTL_CLI sandboxes | awk '{ print $1 }' | awk '{if(NR>1)print}') ;do
38+
crictl_rm_pods() {
39+
for x in $($CRICTL_CLI pods | awk '{ print $1 }' | awk '{if(NR>1)print}') ;do
4040
$CRICTL_CLI rms $x
4141
done
4242
}
@@ -50,6 +50,6 @@ crictl_rm_images() {
5050
command -v crictl >/dev/null 2>&1 || { echo >&2 "crictl not installed. Install from https://github.com/kubernetes-incubator/cri-tools. Aborting."; exit 2; }
5151
crictl_stop_running_containers
5252
crictl_rm_stopped_containers
53-
crictl_stop_sandboxes
54-
crictl_rm_sandboxes
53+
crictl_stop_pods
54+
crictl_rm_pods
5555
crictl_rm_images

hack/install-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ ${sudo} sh -c "PATH=${PATH} make install -e DESTDIR=${CONTAINERD_DIR}"
178178
checkout_repo ${CRITOOL_PKG} ${CRITOOL_VERSION}
179179
cd ${GOPATH}/src/${CRITOOL_PKG}
180180
make crictl
181-
${sudo} install -D -m 755 ${GOPATH}/bin/crictl ${CRICTL_DIR}/crictl
181+
${sudo} make install-crictl -e BINDIR=${CRICTL_DIR} GOPATH=${GOPATH}
182182
${sudo} mkdir -p ${CRICTL_CONFIG_DIR}
183183
${sudo} bash -c 'cat >'${CRICTL_CONFIG_DIR}'/crictl.yaml <<EOF
184184
runtime-endpoint: /var/run/cri-containerd.sock

hack/versions

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ RUNC_VERSION=9f9c96235cc97674e935002fc3d78361b696a69e
22
CNI_VERSION=v0.6.0
33
CONTAINERD_VERSION=f12ba2407e328c98f8be5eacbb9c510b073dd4c0
44
CONTAINERD_REPO=
5-
CRITOOL_VERSION=v1.0.0-alpha.0
5+
CRITOOL_VERSION=ded07bb08aa23492fa0233bb3af8c4629875f286
66
KUBERNETES_VERSION=v1.9.0

pkg/server/instrumented_service.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (in *instrumentedService) ListPodSandbox(ctx context.Context, r *runtime.Li
7171
if err != nil {
7272
logrus.WithError(err).Error("ListPodSandbox failed")
7373
} else {
74-
log.Tracef("ListPodSandbox returns sandboxes %+v", res.GetItems())
74+
log.Tracef("ListPodSandbox returns pod sandboxes %+v", res.GetItems())
7575
}
7676
}()
7777
return in.c.ListPodSandbox(ctx, r)

pkg/server/restart.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -452,15 +452,15 @@ func cleanupOrphanedSandboxDirs(cntrs []containerd.Container, sandboxesRoot stri
452452
// Cleanup orphaned sandbox directories.
453453
dirs, err := ioutil.ReadDir(sandboxesRoot)
454454
if err != nil && !os.IsNotExist(err) {
455-
return fmt.Errorf("failed to read sandboxes directory %q: %v", sandboxesRoot, err)
455+
return fmt.Errorf("failed to read pod sandboxes directory %q: %v", sandboxesRoot, err)
456456
}
457457
cntrsMap := make(map[string]containerd.Container)
458458
for _, cntr := range cntrs {
459459
cntrsMap[cntr.ID()] = cntr
460460
}
461461
for _, d := range dirs {
462462
if !d.IsDir() {
463-
logrus.Warnf("Invalid file %q found in sandboxes directory", d.Name())
463+
logrus.Warnf("Invalid file %q found in pod sandboxes directory", d.Name())
464464
continue
465465
}
466466
if _, ok := cntrsMap[d.Name()]; ok {
@@ -469,9 +469,9 @@ func cleanupOrphanedSandboxDirs(cntrs []containerd.Container, sandboxesRoot stri
469469
}
470470
sandboxDir := filepath.Join(sandboxesRoot, d.Name())
471471
if err := system.EnsureRemoveAll(sandboxDir); err != nil {
472-
logrus.WithError(err).Warnf("Failed to remove sandbox directory %q", sandboxDir)
472+
logrus.WithError(err).Warnf("Failed to remove pod sandbox directory %q", sandboxDir)
473473
} else {
474-
logrus.Debugf("Cleanup orphaned sandbox directory %q", sandboxDir)
474+
logrus.Debugf("Cleanup orphaned pod sandbox directory %q", sandboxDir)
475475
}
476476
}
477477
return nil

0 commit comments

Comments
 (0)