From 5770dc2640c216525ab84031e3712fcc46b3b087 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 15 Dec 2017 16:58:36 -0500 Subject: Rename all references to kpod to podman The decision is in, kpod is going to be named podman. Signed-off-by: Daniel J Walsh Closes: #145 Approved by: umohnani8 --- .github/ISSUE_TEMPLATE.md | 2 +- .papr.yml | 2 +- .tool/lint | 2 +- KPOD_VERSION | 1 - Makefile | 20 +- PODMAN_VERSION | 1 + README.md | 80 +- cmd/kpod/README.md | 16 - cmd/kpod/attach.go | 86 - cmd/kpod/common.go | 438 - cmd/kpod/common_test.go | 41 - cmd/kpod/create.go | 507 -- cmd/kpod/create_cli.go | 242 - cmd/kpod/create_cli_test.go | 70 - cmd/kpod/diff.go | 128 - cmd/kpod/docker/types.go | 271 - cmd/kpod/exec.go | 86 - cmd/kpod/export.go | 65 - cmd/kpod/formats/formats.go | 143 - cmd/kpod/formats/templates.go | 78 - cmd/kpod/history.go | 246 - cmd/kpod/images.go | 337 - cmd/kpod/import.go | 190 - cmd/kpod/info.go | 84 - cmd/kpod/inspect.go | 364 - cmd/kpod/kill.go | 80 - cmd/kpod/load.go | 123 - cmd/kpod/login.go | 110 - cmd/kpod/logout.go | 69 - cmd/kpod/logs.go | 153 - cmd/kpod/main.go | 161 - cmd/kpod/mount.go | 125 - cmd/kpod/parse.go | 863 -- cmd/kpod/pause.go | 58 - cmd/kpod/ps.go | 606 -- cmd/kpod/pull.go | 120 - cmd/kpod/push.go | 167 - cmd/kpod/rm.go | 90 - cmd/kpod/rmi.go | 75 - cmd/kpod/run.go | 146 - cmd/kpod/save.go | 129 - cmd/kpod/spec.go | 561 -- cmd/kpod/spec_test.go | 39 - cmd/kpod/start.go | 131 - cmd/kpod/stats.go | 226 - cmd/kpod/stop.go | 104 - cmd/kpod/tag.go | 77 - cmd/kpod/top.go | 258 - cmd/kpod/umount.go | 40 - cmd/kpod/unpause.go | 58 - cmd/kpod/user.go | 121 - cmd/kpod/version.go | 48 - cmd/kpod/wait.go | 61 - cmd/podman/README.md | 16 + cmd/podman/attach.go | 86 + cmd/podman/common.go | 438 + cmd/podman/common_test.go | 41 + cmd/podman/create.go | 507 ++ cmd/podman/create_cli.go | 242 + cmd/podman/create_cli_test.go | 70 + cmd/podman/diff.go | 128 + cmd/podman/docker/types.go | 271 + cmd/podman/exec.go | 86 + cmd/podman/export.go | 65 + cmd/podman/formats/formats.go | 143 + cmd/podman/formats/templates.go | 78 + cmd/podman/history.go | 246 + cmd/podman/images.go | 337 + cmd/podman/import.go | 190 + cmd/podman/info.go | 84 + cmd/podman/inspect.go | 364 + cmd/podman/kill.go | 80 + cmd/podman/load.go | 123 + cmd/podman/login.go | 110 + cmd/podman/logout.go | 69 + cmd/podman/logs.go | 153 + cmd/podman/main.go | 161 + cmd/podman/mount.go | 125 + cmd/podman/parse.go | 863 ++ cmd/podman/pause.go | 58 + cmd/podman/ps.go | 606 ++ cmd/podman/pull.go | 120 + cmd/podman/push.go | 167 + cmd/podman/rm.go | 90 + cmd/podman/rmi.go | 75 + cmd/podman/run.go | 146 + cmd/podman/save.go | 129 + cmd/podman/spec.go | 561 ++ cmd/podman/spec_test.go | 39 + cmd/podman/start.go | 131 + cmd/podman/stats.go | 226 + cmd/podman/stop.go | 104 + cmd/podman/tag.go | 77 + cmd/podman/top.go | 258 + cmd/podman/umount.go | 40 + cmd/podman/unpause.go | 58 + cmd/podman/user.go | 121 + cmd/podman/version.go | 48 + cmd/podman/wait.go | 61 + completions/bash/kpod | 1546 ---- completions/bash/podman | 1539 ++++ docs/kpod-attach.1.md | 40 - docs/kpod-cp.1.md | 46 - docs/kpod-create.1.md | 566 -- docs/kpod-diff.1.md | 45 - docs/kpod-exec.1.md | 43 - docs/kpod-export.1.md | 44 - docs/kpod-history.1.md | 106 - docs/kpod-images.1.md | 125 - docs/kpod-import.1.md | 88 - docs/kpod-info.1.md | 36 - docs/kpod-inspect.1.md | 82 - docs/kpod-kill.1.md | 33 - docs/kpod-load.1.md | 78 - docs/kpod-login.1.md | 65 - docs/kpod-logout.1.md | 56 - docs/kpod-logs.1.md | 61 - docs/kpod-mount.1.md | 50 - docs/kpod-pause.1.md | 24 - docs/kpod-ps.1.md | 131 - docs/kpod-pull.1.md | 136 - docs/kpod-push.1.md | 141 - docs/kpod-rm.1.md | 38 - docs/kpod-rmi.1.md | 37 - docs/kpod-run.1.md | 799 -- docs/kpod-save.1.md | 97 - docs/kpod-start.1.md | 45 - docs/kpod-stats.1.md | 77 - docs/kpod-stop.1.md | 43 - docs/kpod-tag.1.md | 34 - docs/kpod-top.1.md | 59 - docs/kpod-umount.1.md | 19 - docs/kpod-unpause.1.md | 24 - docs/kpod-version.1.md | 24 - docs/kpod-wait.1.md | 36 - docs/kpod.1.md | 158 - docs/podman-attach.1.md | 40 + docs/podman-cp.1.md | 46 + docs/podman-create.1.md | 566 ++ docs/podman-diff.1.md | 45 + docs/podman-exec.1.md | 43 + docs/podman-export.1.md | 44 + docs/podman-history.1.md | 106 + docs/podman-images.1.md | 125 + docs/podman-import.1.md | 88 + docs/podman-info.1.md | 36 + docs/podman-inspect.1.md | 82 + docs/podman-kill.1.md | 33 + docs/podman-load.1.md | 78 + docs/podman-login.1.md | 65 + docs/podman-logout.1.md | 56 + docs/podman-logs.1.md | 61 + docs/podman-mount.1.md | 50 + docs/podman-pause.1.md | 24 + docs/podman-ps.1.md | 131 + docs/podman-pull.1.md | 136 + docs/podman-push.1.md | 141 + docs/podman-rm.1.md | 38 + docs/podman-rmi.1.md | 37 + docs/podman-run.1.md | 799 ++ docs/podman-save.1.md | 97 + docs/podman-start.1.md | 45 + docs/podman-stats.1.md | 77 + docs/podman-stop.1.md | 43 + docs/podman-tag.1.md | 34 + docs/podman-top.1.md | 59 + docs/podman-umount.1.md | 19 + docs/podman-unpause.1.md | 24 + docs/podman-version.1.md | 24 + docs/podman-wait.1.md | 36 + docs/podman.1.md | 158 + hooks.md | 2 +- install.md | 8 +- kpod-images.json | 18446 -------------------------------------- libkpod/hooks.go | 17 +- libkpod/testdata/config.toml | 2 +- test/helpers.bash | 8 +- test/kpod_attach.bats | 33 - test/kpod_create.bats | 30 - test/kpod_diff.bats | 31 - test/kpod_exec.bats | 31 - test/kpod_export.bats | 26 - test/kpod_history.bats | 54 - test/kpod_images.bats | 52 - test/kpod_import.bats | 146 - test/kpod_inspect.bats | 53 - test/kpod_kill.bats | 65 - test/kpod_load.bats | 82 - test/kpod_logs.bats | 53 - test/kpod_mount.bats | 39 - test/kpod_pause.bats | 111 - test/kpod_ps.bats | 191 - test/kpod_pull.bats | 136 - test/kpod_push.bats | 103 - test/kpod_rm.bats | 72 - test/kpod_rmi.bats | 52 - test/kpod_run.bats | 138 - test/kpod_run_ns.bats | 51 - test/kpod_save.bats | 59 - test/kpod_start.bats | 51 - test/kpod_stats.bats | 61 - test/kpod_stop.bats | 50 - test/kpod_tag.bats | 50 - test/kpod_top.bats | 52 - test/kpod_version.bats | 13 - test/kpod_wait.bats | 37 - test/podman_attach.bats | 33 + test/podman_create.bats | 30 + test/podman_diff.bats | 31 + test/podman_exec.bats | 31 + test/podman_export.bats | 26 + test/podman_history.bats | 54 + test/podman_images.bats | 52 + test/podman_import.bats | 146 + test/podman_inspect.bats | 53 + test/podman_kill.bats | 65 + test/podman_load.bats | 82 + test/podman_logs.bats | 53 + test/podman_mount.bats | 39 + test/podman_pause.bats | 111 + test/podman_ps.bats | 191 + test/podman_pull.bats | 136 + test/podman_push.bats | 103 + test/podman_rm.bats | 72 + test/podman_rmi.bats | 52 + test/podman_run.bats | 138 + test/podman_run_ns.bats | 51 + test/podman_save.bats | 59 + test/podman_start.bats | 51 + test/podman_stats.bats | 61 + test/podman_stop.bats | 50 + test/podman_tag.bats | 50 + test/podman_top.bats | 52 + test/podman_version.bats | 13 + test/podman_wait.bats | 37 + transfer.md | 94 +- 236 files changed, 15258 insertions(+), 33710 deletions(-) delete mode 100644 KPOD_VERSION create mode 100644 PODMAN_VERSION delete mode 100644 cmd/kpod/README.md delete mode 100644 cmd/kpod/attach.go delete mode 100644 cmd/kpod/common.go delete mode 100644 cmd/kpod/common_test.go delete mode 100644 cmd/kpod/create.go delete mode 100644 cmd/kpod/create_cli.go delete mode 100644 cmd/kpod/create_cli_test.go delete mode 100644 cmd/kpod/diff.go delete mode 100644 cmd/kpod/docker/types.go delete mode 100644 cmd/kpod/exec.go delete mode 100644 cmd/kpod/export.go delete mode 100644 cmd/kpod/formats/formats.go delete mode 100644 cmd/kpod/formats/templates.go delete mode 100644 cmd/kpod/history.go delete mode 100644 cmd/kpod/images.go delete mode 100644 cmd/kpod/import.go delete mode 100644 cmd/kpod/info.go delete mode 100644 cmd/kpod/inspect.go delete mode 100644 cmd/kpod/kill.go delete mode 100644 cmd/kpod/load.go delete mode 100644 cmd/kpod/login.go delete mode 100644 cmd/kpod/logout.go delete mode 100644 cmd/kpod/logs.go delete mode 100644 cmd/kpod/main.go delete mode 100644 cmd/kpod/mount.go delete mode 100644 cmd/kpod/parse.go delete mode 100644 cmd/kpod/pause.go delete mode 100644 cmd/kpod/ps.go delete mode 100644 cmd/kpod/pull.go delete mode 100644 cmd/kpod/push.go delete mode 100644 cmd/kpod/rm.go delete mode 100644 cmd/kpod/rmi.go delete mode 100644 cmd/kpod/run.go delete mode 100644 cmd/kpod/save.go delete mode 100644 cmd/kpod/spec.go delete mode 100644 cmd/kpod/spec_test.go delete mode 100644 cmd/kpod/start.go delete mode 100644 cmd/kpod/stats.go delete mode 100644 cmd/kpod/stop.go delete mode 100644 cmd/kpod/tag.go delete mode 100644 cmd/kpod/top.go delete mode 100644 cmd/kpod/umount.go delete mode 100644 cmd/kpod/unpause.go delete mode 100644 cmd/kpod/user.go delete mode 100644 cmd/kpod/version.go delete mode 100644 cmd/kpod/wait.go create mode 100644 cmd/podman/README.md create mode 100644 cmd/podman/attach.go create mode 100644 cmd/podman/common.go create mode 100644 cmd/podman/common_test.go create mode 100644 cmd/podman/create.go create mode 100644 cmd/podman/create_cli.go create mode 100644 cmd/podman/create_cli_test.go create mode 100644 cmd/podman/diff.go create mode 100644 cmd/podman/docker/types.go create mode 100644 cmd/podman/exec.go create mode 100644 cmd/podman/export.go create mode 100644 cmd/podman/formats/formats.go create mode 100644 cmd/podman/formats/templates.go create mode 100644 cmd/podman/history.go create mode 100644 cmd/podman/images.go create mode 100644 cmd/podman/import.go create mode 100644 cmd/podman/info.go create mode 100644 cmd/podman/inspect.go create mode 100644 cmd/podman/kill.go create mode 100644 cmd/podman/load.go create mode 100644 cmd/podman/login.go create mode 100644 cmd/podman/logout.go create mode 100644 cmd/podman/logs.go create mode 100644 cmd/podman/main.go create mode 100644 cmd/podman/mount.go create mode 100644 cmd/podman/parse.go create mode 100644 cmd/podman/pause.go create mode 100644 cmd/podman/ps.go create mode 100644 cmd/podman/pull.go create mode 100644 cmd/podman/push.go create mode 100644 cmd/podman/rm.go create mode 100644 cmd/podman/rmi.go create mode 100644 cmd/podman/run.go create mode 100644 cmd/podman/save.go create mode 100644 cmd/podman/spec.go create mode 100644 cmd/podman/spec_test.go create mode 100644 cmd/podman/start.go create mode 100644 cmd/podman/stats.go create mode 100644 cmd/podman/stop.go create mode 100644 cmd/podman/tag.go create mode 100644 cmd/podman/top.go create mode 100644 cmd/podman/umount.go create mode 100644 cmd/podman/unpause.go create mode 100644 cmd/podman/user.go create mode 100644 cmd/podman/version.go create mode 100644 cmd/podman/wait.go delete mode 100644 completions/bash/kpod create mode 100644 completions/bash/podman delete mode 100644 docs/kpod-attach.1.md delete mode 100644 docs/kpod-cp.1.md delete mode 100644 docs/kpod-create.1.md delete mode 100644 docs/kpod-diff.1.md delete mode 100644 docs/kpod-exec.1.md delete mode 100644 docs/kpod-export.1.md delete mode 100644 docs/kpod-history.1.md delete mode 100644 docs/kpod-images.1.md delete mode 100644 docs/kpod-import.1.md delete mode 100644 docs/kpod-info.1.md delete mode 100644 docs/kpod-inspect.1.md delete mode 100644 docs/kpod-kill.1.md delete mode 100644 docs/kpod-load.1.md delete mode 100644 docs/kpod-login.1.md delete mode 100644 docs/kpod-logout.1.md delete mode 100644 docs/kpod-logs.1.md delete mode 100644 docs/kpod-mount.1.md delete mode 100644 docs/kpod-pause.1.md delete mode 100644 docs/kpod-ps.1.md delete mode 100644 docs/kpod-pull.1.md delete mode 100644 docs/kpod-push.1.md delete mode 100644 docs/kpod-rm.1.md delete mode 100644 docs/kpod-rmi.1.md delete mode 100644 docs/kpod-run.1.md delete mode 100644 docs/kpod-save.1.md delete mode 100644 docs/kpod-start.1.md delete mode 100644 docs/kpod-stats.1.md delete mode 100644 docs/kpod-stop.1.md delete mode 100644 docs/kpod-tag.1.md delete mode 100644 docs/kpod-top.1.md delete mode 100644 docs/kpod-umount.1.md delete mode 100644 docs/kpod-unpause.1.md delete mode 100644 docs/kpod-version.1.md delete mode 100644 docs/kpod-wait.1.md delete mode 100644 docs/kpod.1.md create mode 100644 docs/podman-attach.1.md create mode 100644 docs/podman-cp.1.md create mode 100644 docs/podman-create.1.md create mode 100644 docs/podman-diff.1.md create mode 100644 docs/podman-exec.1.md create mode 100644 docs/podman-export.1.md create mode 100644 docs/podman-history.1.md create mode 100644 docs/podman-images.1.md create mode 100644 docs/podman-import.1.md create mode 100644 docs/podman-info.1.md create mode 100644 docs/podman-inspect.1.md create mode 100644 docs/podman-kill.1.md create mode 100644 docs/podman-load.1.md create mode 100644 docs/podman-login.1.md create mode 100644 docs/podman-logout.1.md create mode 100644 docs/podman-logs.1.md create mode 100644 docs/podman-mount.1.md create mode 100644 docs/podman-pause.1.md create mode 100644 docs/podman-ps.1.md create mode 100644 docs/podman-pull.1.md create mode 100644 docs/podman-push.1.md create mode 100644 docs/podman-rm.1.md create mode 100644 docs/podman-rmi.1.md create mode 100644 docs/podman-run.1.md create mode 100644 docs/podman-save.1.md create mode 100644 docs/podman-start.1.md create mode 100644 docs/podman-stats.1.md create mode 100644 docs/podman-stop.1.md create mode 100644 docs/podman-tag.1.md create mode 100644 docs/podman-top.1.md create mode 100644 docs/podman-umount.1.md create mode 100644 docs/podman-unpause.1.md create mode 100644 docs/podman-version.1.md create mode 100644 docs/podman-wait.1.md create mode 100644 docs/podman.1.md delete mode 100644 kpod-images.json delete mode 100644 test/kpod_attach.bats delete mode 100644 test/kpod_create.bats delete mode 100644 test/kpod_diff.bats delete mode 100644 test/kpod_exec.bats delete mode 100644 test/kpod_export.bats delete mode 100644 test/kpod_history.bats delete mode 100644 test/kpod_images.bats delete mode 100644 test/kpod_import.bats delete mode 100644 test/kpod_inspect.bats delete mode 100644 test/kpod_kill.bats delete mode 100644 test/kpod_load.bats delete mode 100644 test/kpod_logs.bats delete mode 100644 test/kpod_mount.bats delete mode 100644 test/kpod_pause.bats delete mode 100644 test/kpod_ps.bats delete mode 100644 test/kpod_pull.bats delete mode 100644 test/kpod_push.bats delete mode 100644 test/kpod_rm.bats delete mode 100644 test/kpod_rmi.bats delete mode 100644 test/kpod_run.bats delete mode 100644 test/kpod_run_ns.bats delete mode 100644 test/kpod_save.bats delete mode 100644 test/kpod_start.bats delete mode 100644 test/kpod_stats.bats delete mode 100644 test/kpod_stop.bats delete mode 100644 test/kpod_tag.bats delete mode 100644 test/kpod_top.bats delete mode 100644 test/kpod_version.bats delete mode 100644 test/kpod_wait.bats create mode 100644 test/podman_attach.bats create mode 100644 test/podman_create.bats create mode 100644 test/podman_diff.bats create mode 100644 test/podman_exec.bats create mode 100644 test/podman_export.bats create mode 100644 test/podman_history.bats create mode 100644 test/podman_images.bats create mode 100644 test/podman_import.bats create mode 100644 test/podman_inspect.bats create mode 100644 test/podman_kill.bats create mode 100644 test/podman_load.bats create mode 100644 test/podman_logs.bats create mode 100644 test/podman_mount.bats create mode 100644 test/podman_pause.bats create mode 100644 test/podman_ps.bats create mode 100644 test/podman_pull.bats create mode 100644 test/podman_push.bats create mode 100644 test/podman_rm.bats create mode 100644 test/podman_rmi.bats create mode 100644 test/podman_run.bats create mode 100644 test/podman_run_ns.bats create mode 100644 test/podman_save.bats create mode 100644 test/podman_start.bats create mode 100644 test/podman_stats.bats create mode 100644 test/podman_stop.bats create mode 100644 test/podman_tag.bats create mode 100644 test/podman_top.bats create mode 100644 test/podman_version.bats create mode 100644 test/podman_wait.bats diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 44c35f561..3181ac7a5 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -36,7 +36,7 @@ Briefly describe the problem you are having in a few paragraphs. **Additional information you deem important (e.g. issue happens only occasionally):** -**Output of `kpod version`:** +**Output of `podman version`:** ``` (paste your output here) diff --git a/.papr.yml b/.papr.yml index ad94cce0b..2100a3773 100644 --- a/.papr.yml +++ b/.papr.yml @@ -12,7 +12,7 @@ required: true timeout: 45m tests: - - CRIO_ROOT=/var/tmp/checkout KPOD_BINARY=/usr/bin/kpod CONMON_BINARY=/usr/libexec/crio/conmon PAPR=1 sh .papr.sh + - CRIO_ROOT=/var/tmp/checkout PODMAN_BINARY=/usr/bin/podman CONMON_BINARY=/usr/libexec/crio/conmon PAPR=1 sh .papr.sh packages: - bats diff --git a/.tool/lint b/.tool/lint index 4ec8bf7ab..72109a809 100755 --- a/.tool/lint +++ b/.tool/lint @@ -42,6 +42,6 @@ ${LINTER} \ --exclude='duplicate of.*_test.go.*\(dupl\)$'\ --exclude='cmd\/client\/.*\.go.*\(dupl\)$'\ --exclude='vendor\/.*'\ - --exclude='kpod\/.*'\ + --exclude='podman\/.*'\ --exclude='server\/seccomp\/.*\.go.*$'\ ${PKGS[@]} diff --git a/KPOD_VERSION b/KPOD_VERSION deleted file mode 100644 index ceab6e11e..000000000 --- a/KPOD_VERSION +++ /dev/null @@ -1 +0,0 @@ -0.1 \ No newline at end of file diff --git a/Makefile b/Makefile index 8784ba1e4..2f6c50f74 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true) GIT_COMMIT := $(if $(shell git status --porcelain --untracked-files=no),"${COMMIT_NO}-dirty","${COMMIT_NO}") BUILD_INFO := $(shell date +%s) -KPOD_VERSION := ${shell cat ./KPOD_VERSION} +PODMAN_VERSION := ${shell cat ./PODMAN_VERSION} # If GOPATH not specified, use one in the local directory ifeq ($(GOPATH),) @@ -38,9 +38,9 @@ GOPKGBASEDIR := $(shell dirname "$(GOPKGDIR)") VPATH := $(VPATH):$(GOPATH) SHRINKFLAGS := -s -w BASE_LDFLAGS := ${SHRINKFLAGS} -X main.gitCommit=${GIT_COMMIT} -X main.buildInfo=${BUILD_INFO} -KPOD_LDFLAGS := -X main.kpodVersion=${KPOD_VERSION} +PODMAN_LDFLAGS := -X main.podmanVersion=${PODMAN_VERSION} LDFLAGS := -ldflags '${BASE_LDFLAGS}' -LDFLAGS_KPOD := -ldflags '${BASE_LDFLAGS} ${KPOD_LDFLAGS}' +LDFLAGS_PODMAN := -ldflags '${BASE_LDFLAGS} ${PODMAN_LDFLAGS}' BOX="fedora_atomic" @@ -52,7 +52,7 @@ help: @echo "Usage: make " @echo @echo " * 'install' - Install binaries to system locations" - @echo " * 'binaries' - Build conmon and kpod" + @echo " * 'binaries' - Build conmon and podman" @echo " * 'integration' - Execute integration tests" @echo " * 'clean' - Clean artifacts" @echo " * 'lint' - Execute the source code linter" @@ -87,8 +87,8 @@ test/copyimg/copyimg: .gopathok $(wildcard test/copyimg/*.go) test/checkseccomp/checkseccomp: .gopathok $(wildcard test/checkseccomp/*.go) $(GO) build $(LDFLAGS) -tags "$(BUILDTAGS) containers_image_ostree_stub" -o $@ $(PROJECT)/test/checkseccomp -kpod: .gopathok $(shell hack/find-godeps.sh $(GOPKGDIR) cmd/kpod $(PROJECT)) - $(GO) build -i $(LDFLAGS_KPOD) -tags "$(BUILDTAGS)" -o bin/$@ $(PROJECT)/cmd/kpod +podman: .gopathok $(shell hack/find-godeps.sh $(GOPKGDIR) cmd/podman $(PROJECT)) + $(GO) build -i $(LDFLAGS_PODMAN) -tags "$(BUILDTAGS)" -o bin/$@ $(PROJECT)/cmd/podman clean: ifneq ($(GOPATH),) @@ -99,7 +99,7 @@ endif rm -fr test/testdata/redis-image find . -name \*~ -delete find . -name \#\* -delete - rm -f bin/kpod + rm -f bin/podman make -C conmon clean rm -f test/bin2img/bin2img rm -f test/copyimg/copyimg @@ -123,7 +123,7 @@ localintegration: test-binaries vagrant-check: BOX=$(BOX) sh ./vagrant.sh -binaries: conmon kpod +binaries: conmon podman test-binaries: test/bin2img/bin2img test/copyimg/copyimg test/checkseccomp/checkseccomp @@ -138,7 +138,7 @@ docs: $(MANPAGES) install: .gopathok install.bin install.man install.bin: - install ${SELINUXOPT} -D -m 755 bin/kpod $(BINDIR)/kpod + install ${SELINUXOPT} -D -m 755 bin/podman $(BINDIR)/podman install ${SELINUXOPT} -D -m 755 bin/conmon $(LIBEXECDIR)/crio/conmon install.man: @@ -151,7 +151,7 @@ install.config: install.completions: install ${SELINUXOPT} -d -m 755 ${BASHINSTALLDIR} - install ${SELINUXOPT} -m 644 -D completions/bash/kpod ${BASHINSTALLDIR} + install ${SELINUXOPT} -m 644 -D completions/bash/podman ${BASHINSTALLDIR} uninstall: rm -f $(LIBEXECDIR)/crio/conmon diff --git a/PODMAN_VERSION b/PODMAN_VERSION new file mode 100644 index 000000000..ceab6e11e --- /dev/null +++ b/PODMAN_VERSION @@ -0,0 +1 @@ +0.1 \ No newline at end of file diff --git a/README.md b/README.md index 7e51dff87..a603db444 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![KPOD logo](https://cdn.rawgit.com/kubernetes-incubator/cri-o/master/logo/crio-logo.svg) +![PODMAN logo](https://cdn.rawgit.com/kubernetes-incubator/cri-o/master/logo/crio-logo.svg) # libpod - library for running OCI-based containers in Pods ### Status: Development @@ -6,9 +6,9 @@ ## What is the scope of this project? libpod provides a library for applications looking to use the Container Pod concept popularized by Kubernetes. -libpod also contains a tool kpod, which allows you to manage Pods, Containers, and Container Images. +libpod also contains a tool podman, which allows you to manage Pods, Containers, and Container Images. -At a high level, we expect the scope of libpod/kpod to the following functionalities: +At a high level, we expect the scope of libpod/podman to the following functionalities: * Support multiple image formats including the existing Docker/OCI image formats * Support for multiple means to download images including trust & image verification @@ -33,53 +33,53 @@ libpod is currently in active development. ## Commands | Command | Description | Demo| | ---------------------------------------------------- | --------------------------------------------------------------------------|-----| -| [kpod(1)](/docs/kpod.1.md) | Simple management tool for pods and images || -| [kpod-attach(1)](/docs/kpod-attach.1.md) | Attach to a running container. -| [kpod-cp(1)](/docs/kpod-cp.1.md) | Instead of providing a `kpod cp` command, the man page `kpod-cp` describes how to use the `kpod mount` command to have even more flexibility and functionality.|| -| [kpod-diff(1)](/docs/kpod-diff.1.md) | Inspect changes on a container or image's filesystem |[![...](/docs/play.png)](https://asciinema.org/a/FXfWB9CKYFwYM4EfqW3NSZy1G)| -| [kpod-exec(1)](/docs/kpod-exec.1.md) | Execute a command in a running container. -| [kpod-export(1)](/docs/kpod-export.1.md) | Export container's filesystem contents as a tar archive |[![...](/docs/play.png)](https://asciinema.org/a/913lBIRAg5hK8asyIhhkQVLtV)| -| [kpod-history(1)](/docs/kpod-history.1.md) | Shows the history of an image |[![...](/docs/play.png)](https://asciinema.org/a/bCvUQJ6DkxInMELZdc5DinNSx)| -| [kpod-images(1)](/docs/kpod-images.1.md) | List images in local storage |[![...](/docs/play.png)](https://asciinema.org/a/133649)| -| [kpod-info(1)](/docs/kpod-info.1.md) | Display system information || -| [kpod-inspect(1)](/docs/kpod-inspect.1.md) | Display the configuration of a container or image |[![...](/docs/play.png)](https://asciinema.org/a/133418)| -| [kpod-kill(1)](/docs/kpod-kill.1.md) | Kill the main process in one or more running containers |[![...](/docs/play.png)](https://asciinema.org/a/3jNos0A5yzO4hChu7ddKkUPw7)| -| [kpod-load(1)](/docs/kpod-load.1.md) | Load an image from docker archive or oci |[![...](/docs/play.png)](https://asciinema.org/a/kp8kOaexEhEa20P1KLZ3L5X4g)| -| [kpod-login(1)](/docs/kpod-login.1.md) | Login to a container registry |[![...](/docs/play.png)](https://asciinema.org/a/oNiPgmfo1FjV2YdesiLpvihtV)| -| [kpod-logout(1)](/docs/kpod-logout.1.md) | Logout of a container registry |[![...](/docs/play.png)](https://asciinema.org/a/oNiPgmfo1FjV2YdesiLpvihtV)| -| [kpod-logs(1)](/docs/kpod-logs.1.md) | Display the logs of a container || -| [kpod-mount(1)](/docs/kpod-mount.1.md) | Mount a working container's root filesystem || -| [kpod-pause(1)](/docs/kpod-pause.1.md) | Pause one or more running containers |[![...](/docs/play.png)](https://asciinema.org/a/141292)| -| [kpod-ps(1)](/docs/kpod-ps.1.md) | Prints out information about containers |[![...](/docs/play.png)](https://asciinema.org/a/bbT41kac6CwZ5giESmZLIaTLR)| -| [kpod-pull(1)](/docs/kpod-pull.1.md) | Pull an image from a registry |[![...](/docs/play.png)](https://asciinema.org/a/lr4zfoynHJOUNu1KaXa1dwG2X)| -| [kpod-push(1)](/docs/kpod-push.1.md) | Push an image to a specified destination |[![...](/docs/play.png)](https://asciinema.org/a/133276)| -| [kpod-rename(1)](/docs/kpod-rename.1.md) | Rename a container || -| [kpod-rm(1)](/docs/kpod-rm.1.md) | Removes one or more containers |[![...](/docs/play.png)](https://asciinema.org/a/7EMk22WrfGtKWmgHJX9Nze1Qp)| -| [kpod-rmi(1)](/docs/kpod-rmi.1.md) | Removes one or more images |[![...](/docs/play.png)](https://asciinema.org/a/133799)| -| [kpod-save(1)](/docs/kpod-save.1.md) | Saves an image to an archive |[![...](/docs/play.png)](https://asciinema.org/a/kp8kOaexEhEa20P1KLZ3L5X4g)| -| [kpod-start(1)](/docs/kpod-start.1.md) | Starts one or more containers -| [kpod-stats(1)](/docs/kpod-stats.1.md) | Display a live stream of one or more containers' resource usage statistics|| -| [kpod-stop(1)](/docs/kpod-stop.1.md) | Stops one or more running containers || -| [kpod-tag(1)](/docs/kpod-tag.1.md) | Add an additional name to a local image |[![...](/docs/play.png)](https://asciinema.org/a/133803)| -| [kpod-top(1)](/docs/kpod-top.1.md) | Display the running processes of a container -| [kpod-umount(1)](/docs/kpod-umount.1.md) | Unmount a working container's root filesystem || -| [kpod-unpause(1)](/docs/kpod-unpause.1.md) | Unpause one or more running containers |[![...](/docs/play.png)](https://asciinema.org/a/141292)| -| [kpod-version(1)](/docs/kpod-version.1.md) | Display the version information |[![...](/docs/play.png)](https://asciinema.org/a/mfrn61pjZT9Fc8L4NbfdSqfgu)| -| [kpod-wait(1)](/docs/kpod-wait.1.md) | Wait on one or more containers to stop and print their exit codes|| +| [podman(1)](/docs/podman.1.md) | Simple management tool for pods and images || +| [podman-attach(1)](/docs/podman-attach.1.md) | Attach to a running container. +| [podman-cp(1)](/docs/podman-cp.1.md) | Instead of providing a `podman cp` command, the man page `podman-cp` describes how to use the `podman mount` command to have even more flexibility and functionality.|| +| [podman-diff(1)](/docs/podman-diff.1.md) | Inspect changes on a container or image's filesystem |[![...](/docs/play.png)](https://asciinema.org/a/FXfWB9CKYFwYM4EfqW3NSZy1G)| +| [podman-exec(1)](/docs/podman-exec.1.md) | Execute a command in a running container. +| [podman-export(1)](/docs/podman-export.1.md) | Export container's filesystem contents as a tar archive |[![...](/docs/play.png)](https://asciinema.org/a/913lBIRAg5hK8asyIhhkQVLtV)| +| [podman-history(1)](/docs/podman-history.1.md) | Shows the history of an image |[![...](/docs/play.png)](https://asciinema.org/a/bCvUQJ6DkxInMELZdc5DinNSx)| +| [podman-images(1)](/docs/podman-images.1.md) | List images in local storage |[![...](/docs/play.png)](https://asciinema.org/a/133649)| +| [podman-info(1)](/docs/podman-info.1.md) | Display system information || +| [podman-inspect(1)](/docs/podman-inspect.1.md) | Display the configuration of a container or image |[![...](/docs/play.png)](https://asciinema.org/a/133418)| +| [podman-kill(1)](/docs/podman-kill.1.md) | Kill the main process in one or more running containers |[![...](/docs/play.png)](https://asciinema.org/a/3jNos0A5yzO4hChu7ddKkUPw7)| +| [podman-load(1)](/docs/podman-load.1.md) | Load an image from docker archive or oci |[![...](/docs/play.png)](https://asciinema.org/a/kp8kOaexEhEa20P1KLZ3L5X4g)| +| [podman-login(1)](/docs/podman-login.1.md) | Login to a container registry |[![...](/docs/play.png)](https://asciinema.org/a/oNiPgmfo1FjV2YdesiLpvihtV)| +| [podman-logout(1)](/docs/podman-logout.1.md) | Logout of a container registry |[![...](/docs/play.png)](https://asciinema.org/a/oNiPgmfo1FjV2YdesiLpvihtV)| +| [podman-logs(1)](/docs/podman-logs.1.md) | Display the logs of a container || +| [podman-mount(1)](/docs/podman-mount.1.md) | Mount a working container's root filesystem || +| [podman-pause(1)](/docs/podman-pause.1.md) | Pause one or more running containers |[![...](/docs/play.png)](https://asciinema.org/a/141292)| +| [podman-ps(1)](/docs/podman-ps.1.md) | Prints out information about containers |[![...](/docs/play.png)](https://asciinema.org/a/bbT41kac6CwZ5giESmZLIaTLR)| +| [podman-pull(1)](/docs/podman-pull.1.md) | Pull an image from a registry |[![...](/docs/play.png)](https://asciinema.org/a/lr4zfoynHJOUNu1KaXa1dwG2X)| +| [podman-push(1)](/docs/podman-push.1.md) | Push an image to a specified destination |[![...](/docs/play.png)](https://asciinema.org/a/133276)| +| [podman-rename(1)](/docs/podman-rename.1.md) | Rename a container || +| [podman-rm(1)](/docs/podman-rm.1.md) | Removes one or more containers |[![...](/docs/play.png)](https://asciinema.org/a/7EMk22WrfGtKWmgHJX9Nze1Qp)| +| [podman-rmi(1)](/docs/podman-rmi.1.md) | Removes one or more images |[![...](/docs/play.png)](https://asciinema.org/a/133799)| +| [podman-save(1)](/docs/podman-save.1.md) | Saves an image to an archive |[![...](/docs/play.png)](https://asciinema.org/a/kp8kOaexEhEa20P1KLZ3L5X4g)| +| [podman-start(1)](/docs/podman-start.1.md) | Starts one or more containers +| [podman-stats(1)](/docs/podman-stats.1.md) | Display a live stream of one or more containers' resource usage statistics|| +| [podman-stop(1)](/docs/podman-stop.1.md) | Stops one or more running containers || +| [podman-tag(1)](/docs/podman-tag.1.md) | Add an additional name to a local image |[![...](/docs/play.png)](https://asciinema.org/a/133803)| +| [podman-top(1)](/docs/podman-top.1.md) | Display the running processes of a container +| [podman-umount(1)](/docs/podman-umount.1.md) | Unmount a working container's root filesystem || +| [podman-unpause(1)](/docs/podman-unpause.1.md) | Unpause one or more running containers |[![...](/docs/play.png)](https://asciinema.org/a/141292)| +| [podman-version(1)](/docs/podman-version.1.md) | Display the version information |[![...](/docs/play.png)](https://asciinema.org/a/mfrn61pjZT9Fc8L4NbfdSqfgu)| +| [podman-wait(1)](/docs/podman-wait.1.md) | Wait on one or more containers to stop and print their exit codes|| ## OCI Hooks Support -[KPOD configures OCI Hooks to run when launching a container](./hooks.md) +[PODMAN configures OCI Hooks to run when launching a container](./hooks.md) -## KPOD Usage Transfer +## PODMAN Usage Transfer -[Useful information for ops and dev transfer as it relates to infrastructure that utilizes KPOD](/transfer.md) +[Useful information for ops and dev transfer as it relates to infrastructure that utilizes PODMAN](/transfer.md) ## Communication For async communication and long running discussions please use issues and pull requests on the github repo. This will be the best place to discuss design and implementation. -For sync communication we have an IRC channel #KPOD, on chat.freenode.net, that everyone is welcome to join and chat about development. +For sync communication we have an IRC channel #PODMAN, on chat.freenode.net, that everyone is welcome to join and chat about development. ## [Installation Instructions](install.md) diff --git a/cmd/kpod/README.md b/cmd/kpod/README.md deleted file mode 100644 index 7a79e4893..000000000 --- a/cmd/kpod/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# kpod - Simple debugging tool for pods and images -kpod is a simple client only tool to help with debugging issues when daemons such as CRI runtime and the kubelet are not responding or -failing. A shared API layer could be created to share code between the daemon and kpod. kpod does not require any daemon running. kpod -utilizes the same underlying components that crio uses i.e. containers/image, container/storage, oci-runtime-tool/generate, runc or -any other OCI compatible runtime. kpod shares state with crio and so has the capability to debug pods/images created by crio. - -## Use cases -1. List pods. -2. Launch simple pods (that require no daemon support). -3. Exec commands in a container in a pod. -4. Launch additional containers in a pod. -5. List images. -6. Remove images not in use. -7. Pull images. -8. Check image size. -9. Report pod disk resource usage. diff --git a/cmd/kpod/attach.go b/cmd/kpod/attach.go deleted file mode 100644 index 700023abe..000000000 --- a/cmd/kpod/attach.go +++ /dev/null @@ -1,86 +0,0 @@ -package main - -import ( - "sync" - - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/sirupsen/logrus" - "github.com/urfave/cli" -) - -var ( - attachFlags = []cli.Flag{ - cli.StringFlag{ - Name: "detach-keys", - Usage: "Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl- where is one of: a-z, @, ^, [, , or _.", - }, - cli.BoolFlag{ - Name: "no-stdin", - Usage: "Do not attach STDIN. The default is false.", - }, - } - attachDescription = "The kpod attach command allows you to attach to a running container using the container's ID or name, either to view its ongoing output or to control it interactively." - attachCommand = cli.Command{ - Name: "attach", - Usage: "Attach to a running container", - Description: attachDescription, - Flags: attachFlags, - Action: attachCmd, - ArgsUsage: "", - } -) - -func attachCmd(c *cli.Context) error { - args := c.Args() - if err := validateFlags(c, attachFlags); err != nil { - return err - } - - if len(c.Args()) < 1 || len(c.Args()) > 1 { - return errors.Errorf("attach requires the name or id of one running container") - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "error creating libpod runtime") - } - defer runtime.Shutdown(false) - - ctr, err := runtime.LookupContainer(args[0]) - - if err != nil { - return errors.Wrapf(err, "unable to exec into %s", args[0]) - } - - conState, err := ctr.State() - if err != nil { - return errors.Wrapf(err, "unable to determine state of %s", args[0]) - } - if conState != libpod.ContainerStateRunning { - return errors.Errorf("you can only attach to running containers") - } - // Create a bool channel to track that the console socket attach - // is successful. - attached := make(chan bool) - // Create a waitgroup so we can sync and wait for all goroutines - // to finish before exiting main - var wg sync.WaitGroup - - // We increment the wg counter because we need to do the attach - wg.Add(1) - // Attach to the running container - go func() { - logrus.Debugf("trying to attach to the container %s", ctr.ID()) - defer wg.Done() - if err := ctr.Attach(c.Bool("no-stdin"), c.String("detach-keys"), attached); err != nil { - logrus.Errorf("unable to attach to container %s: %q", ctr.ID(), err) - } - }() - if !<-attached { - return errors.Errorf("unable to attach to container %s", ctr.ID()) - } - wg.Wait() - - return nil -} diff --git a/cmd/kpod/common.go b/cmd/kpod/common.go deleted file mode 100644 index 99685107b..000000000 --- a/cmd/kpod/common.go +++ /dev/null @@ -1,438 +0,0 @@ -package main - -import ( - "os" - "reflect" - "regexp" - "strings" - - "github.com/containers/storage" - "github.com/fatih/camelcase" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libkpod" - "github.com/projectatomic/libpod/libpod" - "github.com/urfave/cli" -) - -var ( - stores = make(map[storage.Store]struct{}) -) - -const crioConfigPath = "/etc/crio/crio.conf" - -func getRuntime(c *cli.Context) (*libpod.Runtime, error) { - - config, err := getConfig(c) - if err != nil { - return nil, errors.Wrapf(err, "could not get config") - } - - options := storage.DefaultStoreOptions - options.GraphRoot = config.Root - options.RunRoot = config.RunRoot - options.GraphDriverName = config.Storage - options.GraphDriverOptions = config.StorageOptions - - return libpod.NewRuntime(libpod.WithStorageConfig(options), libpod.WithConmonPath(config.Conmon), libpod.WithOCIRuntime(config.Runtime), libpod.WithCNIConfigDir(config.NetworkDir)) -} - -func shutdownStores() { - for store := range stores { - if _, err := store.Shutdown(false); err != nil { - break - } - } -} - -func getConfig(c *cli.Context) (*libkpod.Config, error) { - config := libkpod.DefaultConfig() - var configFile string - if c.GlobalIsSet("config") { - configFile = c.GlobalString("config") - } else if _, err := os.Stat(crioConfigPath); err == nil { - configFile = crioConfigPath - } - // load and merge the configfile from the commandline or use - // the default crio config file - if configFile != "" { - err := config.UpdateFromFile(configFile) - if err != nil { - return config, err - } - } - if c.GlobalIsSet("root") { - config.Root = c.GlobalString("root") - } - if c.GlobalIsSet("runroot") { - config.RunRoot = c.GlobalString("runroot") - } - if c.GlobalIsSet("conmon") { - config.Conmon = c.GlobalString("conmon") - } - if c.GlobalIsSet("storage-driver") { - config.Storage = c.GlobalString("storage-driver") - } - if c.GlobalIsSet("storage-opt") { - opts := c.GlobalStringSlice("storage-opt") - if len(opts) > 0 { - config.StorageOptions = opts - } - } - if c.GlobalIsSet("runtime") { - config.Runtime = c.GlobalString("runtime") - } - if c.GlobalIsSet("cni-config-dir") { - config.NetworkDir = c.GlobalString("cni-config-dir") - } - return config, nil -} - -func splitCamelCase(src string) string { - entries := camelcase.Split(src) - return strings.Join(entries, " ") -} - -// validateFlags searches for StringFlags or StringSlice flags that never had -// a value set. This commonly occurs when the CLI mistakenly takes the next -// option and uses it as a value. -func validateFlags(c *cli.Context, flags []cli.Flag) error { - for _, flag := range flags { - switch reflect.TypeOf(flag).String() { - case "cli.StringSliceFlag": - { - f := flag.(cli.StringSliceFlag) - name := strings.Split(f.Name, ",") - val := c.StringSlice(name[0]) - for _, v := range val { - if ok, _ := regexp.MatchString("^-.+", v); ok { - return errors.Errorf("option --%s requires a value", name[0]) - } - } - } - case "cli.StringFlag": - { - f := flag.(cli.StringFlag) - name := strings.Split(f.Name, ",") - val := c.String(name[0]) - if ok, _ := regexp.MatchString("^-.+", val); ok { - return errors.Errorf("option --%s requires a value", name[0]) - } - } - } - } - return nil -} - -// Common flags shared between commands -var createFlags = []cli.Flag{ - cli.StringSliceFlag{ - Name: "add-host", - Usage: "Add a custom host-to-IP mapping (host:ip) (default [])", - }, - cli.StringSliceFlag{ - Name: "attach, a", - Usage: "Attach to STDIN, STDOUT or STDERR (default [])", - }, - cli.StringFlag{ - Name: "blkio-weight", - Usage: "Block IO weight (relative weight) accepts a weight value between 10 and 1000.", - }, - cli.StringSliceFlag{ - Name: "blkio-weight-device", - Usage: "Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`)", - }, - cli.StringSliceFlag{ - Name: "cap-add", - Usage: "Add capabilities to the container", - }, - cli.StringSliceFlag{ - Name: "cap-drop", - Usage: "Drop capabilities from the container", - }, - cli.StringFlag{ - Name: "cgroup-parent", - Usage: "Optional parent cgroup for the container", - }, - cli.StringFlag{ - Name: "cidfile", - Usage: "Write the container ID to the file", - }, - cli.Uint64Flag{ - Name: "cpu-period", - Usage: "Limit the CPU CFS (Completely Fair Scheduler) period", - }, - cli.Int64Flag{ - Name: "cpu-quota", - Usage: "Limit the CPU CFS (Completely Fair Scheduler) quota", - }, - cli.Uint64Flag{ - Name: "cpu-rt-period", - Usage: "Limit the CPU real-time period in microseconds", - }, - cli.Int64Flag{ - Name: "cpu-rt-runtime", - Usage: "Limit the CPU real-time runtime in microseconds", - }, - cli.Uint64Flag{ - Name: "cpu-shares", - Usage: "CPU shares (relative weight)", - }, - cli.StringFlag{ - Name: "cpus", - Usage: "Number of CPUs. The default is 0.000 which means no limit", - }, - cli.StringFlag{ - Name: "cpuset-cpus", - Usage: "CPUs in which to allow execution (0-3, 0,1)", - }, - cli.StringFlag{ - Name: "cpuset-mems", - Usage: "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.", - }, - cli.BoolFlag{ - Name: "detach, d", - Usage: "Run container in background and print container ID", - }, - cli.StringFlag{ - Name: "detach-keys", - Usage: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`", - }, - cli.StringSliceFlag{ - Name: "device", - Usage: "Add a host device to the container (default [])", - }, - cli.StringSliceFlag{ - Name: "device-read-bps", - Usage: "Limit read rate (bytes per second) from a device (e.g. --device-read-bps=/dev/sda:1mb)", - }, - cli.StringSliceFlag{ - Name: "device-read-iops", - Usage: "Limit read rate (IO per second) from a device (e.g. --device-read-iops=/dev/sda:1000)", - }, - cli.StringSliceFlag{ - Name: "device-write-bps", - Usage: "Limit write rate (bytes per second) to a device (e.g. --device-write-bps=/dev/sda:1mb)", - }, - cli.StringSliceFlag{ - Name: "device-write-iops", - Usage: "Limit write rate (IO per second) to a device (e.g. --device-write-iops=/dev/sda:1000)", - }, - cli.StringSliceFlag{ - Name: "dns", - Usage: "Set custom DNS servers", - }, - cli.StringSliceFlag{ - Name: "dns-opt", - Usage: "Set custom DNS options", - }, - cli.StringSliceFlag{ - Name: "dns-search", - Usage: "Set custom DNS search domains", - }, - cli.StringFlag{ - Name: "entrypoint", - Usage: "Overwrite the default ENTRYPOINT of the image", - }, - cli.StringSliceFlag{ - Name: "env, e", - Usage: "Set environment variables in container", - }, - cli.StringSliceFlag{ - Name: "env-file", - Usage: "Read in a file of environment variables", - }, - cli.StringSliceFlag{ - Name: "expose", - Usage: "Expose a port or a range of ports (default [])", - }, - cli.StringSliceFlag{ - Name: "group-add", - Usage: "Add additional groups to join (default [])", - }, - cli.StringFlag{ - Name: "hostname", - Usage: "Set container hostname", - }, - cli.BoolFlag{ - Name: "interactive, i", - Usage: "Keep STDIN open even if not attached", - }, - cli.StringFlag{ - Name: "ip", - Usage: "Container IPv4 address (e.g. 172.23.0.9)", - }, - cli.StringFlag{ - Name: "ip6", - Usage: "Container IPv6 address (e.g. 2001:db8::1b99)", - }, - cli.StringFlag{ - Name: "ipc", - Usage: "IPC Namespace to use", - }, - cli.StringFlag{ - Name: "kernel-memory", - Usage: "Kernel memory limit (format: `[]`, where unit = b, k, m or g)", - }, - cli.StringSliceFlag{ - Name: "label", - Usage: "Set metadata on container (default [])", - }, - cli.StringSliceFlag{ - Name: "label-file", - Usage: "Read in a line delimited file of labels (default [])", - }, - cli.StringSliceFlag{ - Name: "link-local-ip", - Usage: "Container IPv4/IPv6 link-local addresses (default [])", - }, - cli.StringFlag{ - Name: "log-driver", - Usage: "Logging driver for the container", - }, - cli.StringSliceFlag{ - Name: "log-opt", - Usage: "Logging driver options (default [])", - }, - cli.StringFlag{ - Name: "mac-address", - Usage: "Container MAC address (e.g. 92:d0:c6:0a:29:33)", - }, - cli.StringFlag{ - Name: "memory, m", - Usage: "Memory limit (format: [], where unit = b, k, m or g)", - }, - cli.StringFlag{ - Name: "memory-reservation", - Usage: "Memory soft limit (format: [], where unit = b, k, m or g)", - }, - cli.StringFlag{ - Name: "memory-swap", - Usage: "Swap limit equal to memory plus swap: '-1' to enable unlimited swap", - }, - cli.Int64Flag{ - Name: "memory-swappiness", - Usage: "Tune container memory swappiness (0 to 100) (default -1)", - Value: -1, - }, - cli.StringFlag{ - Name: "name", - Usage: "Assign a name to the container", - }, - cli.StringFlag{ - Name: "net", - Usage: "Setup the network namespace", - }, - cli.StringFlag{ - Name: "network", - Usage: "Connect a container to a network (default 'default')", - }, - cli.StringSliceFlag{ - Name: "network-alias", - Usage: "Add network-scoped alias for the container (default [])", - }, - cli.BoolFlag{ - Name: "oom-kill-disable", - Usage: "Disable OOM Killer", - }, - cli.StringFlag{ - Name: "oom-score-adj", - Usage: "Tune the host's OOM preferences (-1000 to 1000)", - }, - cli.StringFlag{ - Name: "pid", - Usage: "PID Namespace to use", - }, - cli.Int64Flag{ - Name: "pids-limit", - Usage: "Tune container pids limit (set -1 for unlimited)", - }, - cli.StringFlag{ - Name: "pod", - Usage: "Run container in an existing pod", - }, - cli.BoolFlag{ - Name: "privileged", - Usage: "Give extended privileges to container", - }, - cli.StringSliceFlag{ - Name: "publish, p", - Usage: "Publish a container's port, or a range of ports, to the host (default [])", - }, - cli.BoolFlag{ - Name: "publish-all, P", - Usage: "Publish all exposed ports to random ports on the host interface", - }, - cli.BoolFlag{ - Name: "read-only", - Usage: "Make containers root filesystem read-only", - }, - cli.BoolFlag{ - Name: "rm", - Usage: "Remove container (and pod if created) after exit", - }, - cli.StringSliceFlag{ - Name: "security-opt", - Usage: "Security Options (default [])", - }, - cli.StringFlag{ - Name: "shm-size", - Usage: "Size of `/dev/shm`. The format is ``. default is 64 MB", - }, - cli.BoolFlag{ - Name: "sig-proxy", - Usage: "Proxy received signals to the process (default true)", - }, - cli.StringFlag{ - Name: "stop-signal", - Usage: "Signal to stop a container. Default is SIGTERM", - }, - cli.IntFlag{ - Name: "stop-timeout", - Usage: "Timeout (in seconds) to stop a container. Default is 10", - }, - cli.StringSliceFlag{ - Name: "storage-opt", - Usage: "Storage driver options per container (default [])", - }, - cli.StringSliceFlag{ - Name: "sysctl", - Usage: "Sysctl options (default [])", - }, - cli.StringSliceFlag{ - Name: "tmpfs", - Usage: "Mount a temporary filesystem (`tmpfs`) into a container (default [])", - }, - cli.BoolFlag{ - Name: "tty, t", - Usage: "Allocate a pseudo-TTY for container", - }, - cli.StringSliceFlag{ - Name: "ulimit", - Usage: "Ulimit options (default [])", - }, - cli.StringFlag{ - Name: "user, u", - Usage: "Username or UID (format: [:])", - }, - cli.StringFlag{ - Name: "userns", - Usage: "User namespace to use", - }, - cli.StringFlag{ - Name: "uts", - Usage: "UTS namespace to use", - }, - cli.StringSliceFlag{ - Name: "volume, v", - Usage: "Bind mount a volume into the container (default [])", - }, - cli.StringSliceFlag{ - Name: "volumes-from", - Usage: "Mount volumes from the specified container(s) (default [])", - }, - cli.StringFlag{ - Name: "workdir, w", - Usage: "Working `directory inside the container", - Value: "/", - }, -} diff --git a/cmd/kpod/common_test.go b/cmd/kpod/common_test.go deleted file mode 100644 index 8a3bfd181..000000000 --- a/cmd/kpod/common_test.go +++ /dev/null @@ -1,41 +0,0 @@ -package main - -import ( - "os/user" - "testing" - - "flag" - - "github.com/urfave/cli" -) - -func TestGetStore(t *testing.T) { - t.Skip("FIX THIS!") - - //cmd/kpod/common_test.go:27: cannot use c (type *cli.Context) as type *libkpod.Config in argument to getStore - - // Make sure the tests are running as root - skipTestIfNotRoot(t) - - set := flag.NewFlagSet("test", 0) - globalSet := flag.NewFlagSet("test", 0) - globalSet.String("root", "", "path to the root directory in which data, including images, is stored") - globalCtx := cli.NewContext(nil, globalSet, nil) - command := cli.Command{Name: "imagesCommand"} - c := cli.NewContext(nil, set, globalCtx) - c.Command = command - - //_, err := getStore(c) - //if err != nil { - //t.Error(err) - //} -} - -func skipTestIfNotRoot(t *testing.T) { - u, err := user.Current() - if err != nil { - t.Skip("Could not determine user. Running without root may cause tests to fail") - } else if u.Uid != "0" { - t.Skip("tests will fail unless run as root") - } -} diff --git a/cmd/kpod/create.go b/cmd/kpod/create.go deleted file mode 100644 index afed70eaa..000000000 --- a/cmd/kpod/create.go +++ /dev/null @@ -1,507 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "os" - "strconv" - "strings" - - "github.com/docker/docker/api/types/container" - "github.com/docker/go-units" - "github.com/opencontainers/selinux/go-selinux/label" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/sirupsen/logrus" - "github.com/urfave/cli" - pb "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime" -) - -type mountType string - -// Type constants -const ( - // TypeBind is the type for mounting host dir - TypeBind mountType = "bind" - // TypeVolume is the type for remote storage volumes - // TypeVolume mountType = "volume" // re-enable upon use - // TypeTmpfs is the type for mounting tmpfs - TypeTmpfs mountType = "tmpfs" -) - -var ( - defaultEnvVariables = map[string]string{ - "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", - "TERM": "xterm", - } -) - -type createResourceConfig struct { - BlkioWeight uint16 // blkio-weight - BlkioWeightDevice []string // blkio-weight-device - CPUPeriod uint64 // cpu-period - CPUQuota int64 // cpu-quota - CPURtPeriod uint64 // cpu-rt-period - CPURtRuntime int64 // cpu-rt-runtime - CPUShares uint64 // cpu-shares - CPUs string // cpus - CPUsetCPUs string - CPUsetMems string // cpuset-mems - DeviceReadBps []string // device-read-bps - DeviceReadIOps []string // device-read-iops - DeviceWriteBps []string // device-write-bps - DeviceWriteIOps []string // device-write-iops - DisableOomKiller bool // oom-kill-disable - KernelMemory int64 // kernel-memory - Memory int64 //memory - MemoryReservation int64 // memory-reservation - MemorySwap int64 //memory-swap - MemorySwappiness int // memory-swappiness - OomScoreAdj int //oom-score-adj - PidsLimit int64 // pids-limit - ShmSize string - Ulimit []string //ulimit -} - -type createConfig struct { - Runtime *libpod.Runtime - Args []string - CapAdd []string // cap-add - CapDrop []string // cap-drop - CidFile string - CgroupParent string // cgroup-parent - Command []string - Detach bool // detach - Devices []*pb.Device // device - DNSOpt []string //dns-opt - DNSSearch []string //dns-search - DNSServers []string //dns - Entrypoint string //entrypoint - Env map[string]string //env - Expose []string //expose - GroupAdd []uint32 // group-add - Hostname string //hostname - Image string - Interactive bool //interactive - IpcMode container.IpcMode //ipc - IP6Address string //ipv6 - IPAddress string //ip - Labels map[string]string //label - LinkLocalIP []string // link-local-ip - LogDriver string // log-driver - LogDriverOpt []string // log-opt - MacAddress string //mac-address - Name string //name - NetMode container.NetworkMode //net - Network string //network - NetworkAlias []string //network-alias - PidMode container.PidMode //pid - NsUser string - Pod string //pod - Privileged bool //privileged - Publish []string //publish - PublishAll bool //publish-all - ReadOnlyRootfs bool //read-only - Resources createResourceConfig - Rm bool //rm - ShmDir string - SigProxy bool //sig-proxy - StopSignal string // stop-signal - StopTimeout int64 // stop-timeout - StorageOpts []string //storage-opt - Sysctl map[string]string //sysctl - Tmpfs []string // tmpfs - Tty bool //tty - User uint32 //user - Group uint32 // group - UtsMode container.UTSMode //uts - Volumes []string //volume - WorkDir string //workdir - MountLabel string //SecurityOpts - ProcessLabel string //SecurityOpts - NoNewPrivileges bool //SecurityOpts - ApparmorProfile string //SecurityOpts - SeccompProfilePath string //SecurityOpts - SecurityOpts []string -} - -var createDescription = "Creates a new container from the given image or" + - " storage and prepares it for running the specified command. The" + - " container ID is then printed to stdout. You can then start it at" + - " any time with the kpod start command. The container" + - " will be created with the initial state 'created'." - -var createCommand = cli.Command{ - Name: "create", - Usage: "create but do not start a container", - Description: createDescription, - Flags: createFlags, - Action: createCmd, - ArgsUsage: "IMAGE [COMMAND [ARG...]]", - SkipArgReorder: true, - UseShortOptionHandling: true, -} - -func createCmd(c *cli.Context) error { - // TODO should allow user to create based off a directory on the host not just image - // Need CLI support for this - var imageName string - if err := validateFlags(c, createFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "error creating libpod runtime") - } - defer runtime.Shutdown(false) - - createConfig, err := parseCreateOpts(c, runtime) - if err != nil { - return err - } - - // Deal with the image after all the args have been checked - createImage := runtime.NewImage(createConfig.Image) - createImage.LocalName, _ = createImage.GetLocalImageName() - if createImage.LocalName == "" { - // The image wasnt found by the user input'd name or its fqname - // Pull the image - fmt.Printf("Trying to pull %s...", createImage.PullName) - createImage.Pull() - } - - runtimeSpec, err := createConfigToOCISpec(createConfig) - if err != nil { - return err - } - if createImage.LocalName != "" { - nameIsID, err := runtime.IsImageID(createImage.LocalName) - if err != nil { - return err - } - if nameIsID { - // If the input from the user is an ID, then we need to get the image - // name for cstorage - createImage.LocalName, err = createImage.GetNameByID() - if err != nil { - return err - } - } - imageName = createImage.LocalName - } else { - imageName, err = createImage.GetFQName() - } - if err != nil { - return err - } - imageID, err := createImage.GetImageID() - if err != nil { - return err - } - options, err := createConfig.GetContainerCreateOptions() - if err != nil { - return errors.Wrapf(err, "unable to parse new container options") - } - // Gather up the options for NewContainer which consist of With... funcs - options = append(options, libpod.WithRootFSFromImage(imageID, imageName, false)) - options = append(options, libpod.WithSELinuxLabels(createConfig.ProcessLabel, createConfig.MountLabel)) - options = append(options, libpod.WithShmDir(createConfig.ShmDir)) - ctr, err := runtime.NewContainer(runtimeSpec, options...) - if err != nil { - return err - } - - createConfigJSON, err := json.Marshal(createConfig) - if err != nil { - return err - } - if err := ctr.AddArtifact("create-config", createConfigJSON); err != nil { - return err - } - - logrus.Debug("new container created ", ctr.ID()) - - if c.String("cidfile") != "" { - libpod.WriteFile(ctr.ID(), c.String("cidfile")) - } else { - fmt.Printf("%s\n", ctr.ID()) - } - - return nil -} - -const seccompDefaultPath = "/etc/crio/seccomp.json" - -func parseSecurityOpt(config *createConfig, securityOpts []string) error { - var ( - labelOpts []string - err error - ) - - if config.PidMode.IsHost() { - labelOpts = append(labelOpts, label.DisableSecOpt()...) - } else if config.PidMode.IsContainer() { - ctr, err := config.Runtime.LookupContainer(config.PidMode.Container()) - if err != nil { - return errors.Wrapf(err, "container %q not found", config.PidMode.Container()) - } - labelOpts = append(labelOpts, label.DupSecOpt(ctr.ProcessLabel())...) - } - - if config.IpcMode.IsHost() { - labelOpts = append(labelOpts, label.DisableSecOpt()...) - } else if config.IpcMode.IsContainer() { - ctr, err := config.Runtime.LookupContainer(config.IpcMode.Container()) - if err != nil { - return errors.Wrapf(err, "container %q not found", config.IpcMode.Container()) - } - labelOpts = append(labelOpts, label.DupSecOpt(ctr.ProcessLabel())...) - } - - for _, opt := range securityOpts { - if opt == "no-new-privileges" { - config.NoNewPrivileges = true - } else { - con := strings.SplitN(opt, "=", 2) - if len(con) != 2 { - return fmt.Errorf("Invalid --security-opt 1: %q", opt) - } - - switch con[0] { - case "label": - labelOpts = append(labelOpts, con[1]) - case "apparmor": - config.ApparmorProfile = con[1] - case "seccomp": - config.SeccompProfilePath = con[1] - default: - return fmt.Errorf("Invalid --security-opt 2: %q", opt) - } - } - } - - if config.SeccompProfilePath == "" { - if _, err := os.Stat(seccompDefaultPath); err != nil { - if !os.IsNotExist(err) { - return errors.Wrapf(err, "can't check if %q exists", seccompDefaultPath) - } - } else { - config.SeccompProfilePath = seccompDefaultPath - } - } - config.ProcessLabel, config.MountLabel, err = label.InitLabels(labelOpts) - return err -} - -// Parses CLI options related to container creation into a config which can be -// parsed into an OCI runtime spec -func parseCreateOpts(c *cli.Context, runtime *libpod.Runtime) (*createConfig, error) { - var command []string - var memoryLimit, memoryReservation, memorySwap, memoryKernel int64 - var blkioWeight uint16 - var uid, gid uint32 - - if len(c.Args()) < 1 { - return nil, errors.Errorf("image name or ID is required") - } - image := c.Args()[0] - - if len(c.Args()) > 1 { - command = c.Args()[1:] - } - - // LABEL VARIABLES - labels, err := getAllLabels(c.StringSlice("label-file"), c.StringSlice("labels")) - if err != nil { - return &createConfig{}, errors.Wrapf(err, "unable to process labels") - } - // ENVIRONMENT VARIABLES - env := defaultEnvVariables - if err := readKVStrings(env, c.StringSlice("env-file"), c.StringSlice("env")); err != nil { - return &createConfig{}, errors.Wrapf(err, "unable to process environment variables") - } - - sysctl, err := convertStringSliceToMap(c.StringSlice("sysctl"), "=") - if err != nil { - return &createConfig{}, errors.Wrapf(err, "sysctl values must be in the form of KEY=VALUE") - } - - groupAdd, err := stringSlicetoUint32Slice(c.StringSlice("group-add")) - if err != nil { - return &createConfig{}, errors.Wrapf(err, "invalid value for groups provided") - } - - if c.String("user") != "" { - // TODO - // We need to mount the imagefs and get the uid/gid - // For now, user zeros - uid = 0 - gid = 0 - } - - if c.String("memory") != "" { - memoryLimit, err = units.RAMInBytes(c.String("memory")) - if err != nil { - return nil, errors.Wrapf(err, "invalid value for memory") - } - } - if c.String("memory-reservation") != "" { - memoryReservation, err = units.RAMInBytes(c.String("memory-reservation")) - if err != nil { - return nil, errors.Wrapf(err, "invalid value for memory-reservation") - } - } - if c.String("memory-swap") != "" { - memorySwap, err = units.RAMInBytes(c.String("memory-swap")) - if err != nil { - return nil, errors.Wrapf(err, "invalid value for memory-swap") - } - } - if c.String("kernel-memory") != "" { - memoryKernel, err = units.RAMInBytes(c.String("kernel-memory")) - if err != nil { - return nil, errors.Wrapf(err, "invalid value for kernel-memory") - } - } - if c.String("blkio-weight") != "" { - u, err := strconv.ParseUint(c.String("blkio-weight"), 10, 16) - if err != nil { - return nil, errors.Wrapf(err, "invalid value for blkio-weight") - } - blkioWeight = uint16(u) - } - - if err = parseVolumes(c.StringSlice("volume")); err != nil { - return nil, err - } - - // Because we cannot do a non-terminal attach, we need to set tty to true - // if detach is not false - // TODO Allow non-terminal attach - tty := c.Bool("tty") - if !c.Bool("detach") && !tty { - tty = true - } - - pidMode := container.PidMode(c.String("pid")) - if !pidMode.Valid() { - return nil, errors.Errorf("--pid %q is not valid", c.String("pid")) - } - - if c.Bool("detach") && c.Bool("rm") { - return nil, errors.Errorf("--rm and --detach can not be specified together") - } - - utsMode := container.UTSMode(c.String("uts")) - if !utsMode.Valid() { - return nil, errors.Errorf("--uts %q is not valid", c.String("uts")) - } - ipcMode := container.IpcMode(c.String("ipc")) - if !ipcMode.Valid() { - return nil, errors.Errorf("--ipc %q is not valid", ipcMode) - } - shmDir := "" - if ipcMode.IsHost() { - shmDir = "/dev/shm" - } else if ipcMode.IsContainer() { - ctr, err := runtime.LookupContainer(ipcMode.Container()) - if err != nil { - return nil, errors.Wrapf(err, "container %q not found", ipcMode.Container()) - } - shmDir = ctr.ShmDir() - } - - config := &createConfig{ - Runtime: runtime, - CapAdd: c.StringSlice("cap-add"), - CapDrop: c.StringSlice("cap-drop"), - CgroupParent: c.String("cgroup-parent"), - Command: command, - Detach: c.Bool("detach"), - DNSOpt: c.StringSlice("dns-opt"), - DNSSearch: c.StringSlice("dns-search"), - DNSServers: c.StringSlice("dns"), - Entrypoint: c.String("entrypoint"), - Env: env, - Expose: c.StringSlice("expose"), - GroupAdd: groupAdd, - Hostname: c.String("hostname"), - Image: image, - Interactive: c.Bool("interactive"), - IP6Address: c.String("ipv6"), - IPAddress: c.String("ip"), - Labels: labels, - LinkLocalIP: c.StringSlice("link-local-ip"), - LogDriver: c.String("log-driver"), - LogDriverOpt: c.StringSlice("log-opt"), - MacAddress: c.String("mac-address"), - Name: c.String("name"), - Network: c.String("network"), - NetworkAlias: c.StringSlice("network-alias"), - IpcMode: ipcMode, - NetMode: container.NetworkMode(c.String("network")), - UtsMode: utsMode, - PidMode: pidMode, - Pod: c.String("pod"), - Privileged: c.Bool("privileged"), - Publish: c.StringSlice("publish"), - PublishAll: c.Bool("publish-all"), - ReadOnlyRootfs: c.Bool("read-only"), - Resources: createResourceConfig{ - BlkioWeight: blkioWeight, - BlkioWeightDevice: c.StringSlice("blkio-weight-device"), - CPUShares: c.Uint64("cpu-shares"), - CPUPeriod: c.Uint64("cpu-period"), - CPUsetCPUs: c.String("cpu-period"), - CPUsetMems: c.String("cpuset-mems"), - CPUQuota: c.Int64("cpu-quota"), - CPURtPeriod: c.Uint64("cpu-rt-period"), - CPURtRuntime: c.Int64("cpu-rt-runtime"), - CPUs: c.String("cpus"), - DeviceReadBps: c.StringSlice("device-read-bps"), - DeviceReadIOps: c.StringSlice("device-read-iops"), - DeviceWriteBps: c.StringSlice("device-write-bps"), - DeviceWriteIOps: c.StringSlice("device-write-iops"), - DisableOomKiller: c.Bool("oom-kill-disable"), - ShmSize: c.String("shm-size"), - Memory: memoryLimit, - MemoryReservation: memoryReservation, - MemorySwap: memorySwap, - MemorySwappiness: c.Int("memory-swappiness"), - KernelMemory: memoryKernel, - OomScoreAdj: c.Int("oom-score-adj"), - - PidsLimit: c.Int64("pids-limit"), - Ulimit: c.StringSlice("ulimit"), - }, - Rm: c.Bool("rm"), - ShmDir: shmDir, - SigProxy: c.Bool("sig-proxy"), - StopSignal: c.String("stop-signal"), - StopTimeout: c.Int64("stop-timeout"), - StorageOpts: c.StringSlice("storage-opt"), - Sysctl: sysctl, - Tmpfs: c.StringSlice("tmpfs"), - Tty: tty, - User: uid, - Group: gid, - Volumes: c.StringSlice("volume"), - WorkDir: c.String("workdir"), - } - - if !config.Privileged { - if err := parseSecurityOpt(config, c.StringSlice("security-opt")); err != nil { - return nil, err - } - } - config.SecurityOpts = c.StringSlice("security-opt") - warnings, err := verifyContainerResources(config, false) - if err != nil { - return nil, err - } - for _, warning := range warnings { - fmt.Fprintln(os.Stderr, warning) - } - return config, nil -} diff --git a/cmd/kpod/create_cli.go b/cmd/kpod/create_cli.go deleted file mode 100644 index 0cc265e92..000000000 --- a/cmd/kpod/create_cli.go +++ /dev/null @@ -1,242 +0,0 @@ -package main - -import ( - "fmt" - "os" - "strings" - - "github.com/docker/docker/pkg/sysinfo" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" -) - -const ( - // It's not kernel limit, we want this 4M limit to supply a reasonable functional container - linuxMinMemory = 4194304 -) - -func getAllLabels(labelFile, inputLabels []string) (map[string]string, error) { - labels := make(map[string]string) - labelErr := readKVStrings(labels, labelFile, inputLabels) - if labelErr != nil { - return labels, errors.Wrapf(labelErr, "unable to process labels from --label and label-file") - } - return labels, nil -} - -func convertStringSliceToMap(strSlice []string, delimiter string) (map[string]string, error) { - sysctl := make(map[string]string) - for _, inputSysctl := range strSlice { - values := strings.Split(inputSysctl, delimiter) - if len(values) < 2 { - return sysctl, errors.Errorf("%s in an invalid sysctl value", inputSysctl) - } - sysctl[values[0]] = values[1] - } - return sysctl, nil -} - -func addWarning(warnings []string, msg string) []string { - logrus.Warn(msg) - return append(warnings, msg) -} - -func parseVolumes(volumes []string) error { - if len(volumes) == 0 { - return nil - } - for _, volume := range volumes { - arr := strings.SplitN(volume, ":", 3) - if len(arr) < 2 { - return errors.Errorf("incorrect volume format %q, should be host-dir:ctr-dir:[option]", volume) - } - if err := validateVolumeHostDir(arr[0]); err != nil { - return err - } - if err := validateVolumeCtrDir(arr[1]); err != nil { - return err - } - if len(arr) > 2 { - if err := validateVolumeOpts(arr[2]); err != nil { - return err - } - } - } - return nil -} - -func validateVolumeHostDir(hostDir string) error { - if _, err := os.Stat(hostDir); err != nil { - return errors.Wrapf(err, "error checking path %q", hostDir) - } - return nil -} - -func validateVolumeCtrDir(ctrDir string) error { - if ctrDir[0] != '/' { - return errors.Errorf("invalid container directory path %q", ctrDir) - } - return nil -} - -func validateVolumeOpts(option string) error { - var foundRootPropagation, foundRWRO, foundLabelChange int - options := strings.Split(option, ",") - for _, opt := range options { - switch opt { - case "rw", "ro": - if foundRWRO > 1 { - return errors.Errorf("invalid options %q, can only specify 1 'rw' or 'ro' option", option) - } - foundRWRO++ - case "z", "Z": - if foundLabelChange > 1 { - return errors.Errorf("invalid options %q, can only specify 1 'z' or 'Z' option", option) - } - foundLabelChange++ - case "private", "rprivate", "shared", "rshared", "slave", "rslave": - if foundRootPropagation > 1 { - return errors.Errorf("invalid options %q, can only specify 1 '[r]shared', '[r]private' or '[r]slave' option", option) - } - foundRootPropagation++ - default: - return errors.Errorf("invalid option type %q", option) - } - } - return nil -} - -func verifyContainerResources(config *createConfig, update bool) ([]string, error) { - warnings := []string{} - sysInfo := sysinfo.New(true) - - // memory subsystem checks and adjustments - if config.Resources.Memory != 0 && config.Resources.Memory < linuxMinMemory { - return warnings, fmt.Errorf("minimum memory limit allowed is 4MB") - } - if config.Resources.Memory > 0 && !sysInfo.MemoryLimit { - warnings = addWarning(warnings, "Your kernel does not support memory limit capabilities or the cgroup is not mounted. Limitation discarded.") - config.Resources.Memory = 0 - config.Resources.MemorySwap = -1 - } - if config.Resources.Memory > 0 && config.Resources.MemorySwap != -1 && !sysInfo.SwapLimit { - warnings = addWarning(warnings, "Your kernel does not support swap limit capabilities,or the cgroup is not mounted. Memory limited without swap.") - config.Resources.MemorySwap = -1 - } - if config.Resources.Memory > 0 && config.Resources.MemorySwap > 0 && config.Resources.MemorySwap < config.Resources.Memory { - return warnings, fmt.Errorf("minimum memoryswap limit should be larger than memory limit, see usage") - } - if config.Resources.Memory == 0 && config.Resources.MemorySwap > 0 && !update { - return warnings, fmt.Errorf("you should always set the memory limit when using memoryswap limit, see usage") - } - if config.Resources.MemorySwappiness != -1 { - if !sysInfo.MemorySwappiness { - msg := "Your kernel does not support memory swappiness capabilities, or the cgroup is not mounted. Memory swappiness discarded." - warnings = addWarning(warnings, msg) - config.Resources.MemorySwappiness = -1 - } else { - swappiness := config.Resources.MemorySwappiness - if swappiness < -1 || swappiness > 100 { - return warnings, fmt.Errorf("invalid value: %v, valid memory swappiness range is 0-100", swappiness) - } - } - } - if config.Resources.MemoryReservation > 0 && !sysInfo.MemoryReservation { - warnings = addWarning(warnings, "Your kernel does not support memory soft limit capabilities or the cgroup is not mounted. Limitation discarded.") - config.Resources.MemoryReservation = 0 - } - if config.Resources.MemoryReservation > 0 && config.Resources.MemoryReservation < linuxMinMemory { - return warnings, fmt.Errorf("minimum memory reservation allowed is 4MB") - } - if config.Resources.Memory > 0 && config.Resources.MemoryReservation > 0 && config.Resources.Memory < config.Resources.MemoryReservation { - return warnings, fmt.Errorf("minimum memory limit can not be less than memory reservation limit, see usage") - } - if config.Resources.KernelMemory > 0 && !sysInfo.KernelMemory { - warnings = addWarning(warnings, "Your kernel does not support kernel memory limit capabilities or the cgroup is not mounted. Limitation discarded.") - config.Resources.KernelMemory = 0 - } - if config.Resources.KernelMemory > 0 && config.Resources.KernelMemory < linuxMinMemory { - return warnings, fmt.Errorf("minimum kernel memory limit allowed is 4MB") - } - if config.Resources.DisableOomKiller == true && !sysInfo.OomKillDisable { - // only produce warnings if the setting wasn't to *disable* the OOM Kill; no point - // warning the caller if they already wanted the feature to be off - warnings = addWarning(warnings, "Your kernel does not support OomKillDisable. OomKillDisable discarded.") - config.Resources.DisableOomKiller = false - } - - if config.Resources.PidsLimit != 0 && !sysInfo.PidsLimit { - warnings = addWarning(warnings, "Your kernel does not support pids limit capabilities or the cgroup is not mounted. PIDs limit discarded.") - config.Resources.PidsLimit = 0 - } - - if config.Resources.CPUShares > 0 && !sysInfo.CPUShares { - warnings = addWarning(warnings, "Your kernel does not support CPU shares or the cgroup is not mounted. Shares discarded.") - config.Resources.CPUShares = 0 - } - if config.Resources.CPUPeriod > 0 && !sysInfo.CPUCfsPeriod { - warnings = addWarning(warnings, "Your kernel does not support CPU cfs period or the cgroup is not mounted. Period discarded.") - config.Resources.CPUPeriod = 0 - } - if config.Resources.CPUPeriod != 0 && (config.Resources.CPUPeriod < 1000 || config.Resources.CPUPeriod > 1000000) { - return warnings, fmt.Errorf("CPU cfs period can not be less than 1ms (i.e. 1000) or larger than 1s (i.e. 1000000)") - } - if config.Resources.CPUQuota > 0 && !sysInfo.CPUCfsQuota { - warnings = addWarning(warnings, "Your kernel does not support CPU cfs quota or the cgroup is not mounted. Quota discarded.") - config.Resources.CPUQuota = 0 - } - if config.Resources.CPUQuota > 0 && config.Resources.CPUQuota < 1000 { - return warnings, fmt.Errorf("CPU cfs quota can not be less than 1ms (i.e. 1000)") - } - // cpuset subsystem checks and adjustments - if (config.Resources.CPUsetCPUs != "" || config.Resources.CPUsetMems != "") && !sysInfo.Cpuset { - warnings = addWarning(warnings, "Your kernel does not support cpuset or the cgroup is not mounted. CPUset discarded.") - config.Resources.CPUsetCPUs = "" - config.Resources.CPUsetMems = "" - } - cpusAvailable, err := sysInfo.IsCpusetCpusAvailable(config.Resources.CPUsetCPUs) - if err != nil { - return warnings, fmt.Errorf("invalid value %s for cpuset cpus", config.Resources.CPUsetCPUs) - } - if !cpusAvailable { - return warnings, fmt.Errorf("requested CPUs are not available - requested %s, available: %s", config.Resources.CPUsetCPUs, sysInfo.Cpus) - } - memsAvailable, err := sysInfo.IsCpusetMemsAvailable(config.Resources.CPUsetMems) - if err != nil { - return warnings, fmt.Errorf("invalid value %s for cpuset mems", config.Resources.CPUsetMems) - } - if !memsAvailable { - return warnings, fmt.Errorf("requested memory nodes are not available - requested %s, available: %s", config.Resources.CPUsetMems, sysInfo.Mems) - } - - // blkio subsystem checks and adjustments - if config.Resources.BlkioWeight > 0 && !sysInfo.BlkioWeight { - warnings = addWarning(warnings, "Your kernel does not support Block I/O weight or the cgroup is not mounted. Weight discarded.") - config.Resources.BlkioWeight = 0 - } - if config.Resources.BlkioWeight > 0 && (config.Resources.BlkioWeight < 10 || config.Resources.BlkioWeight > 1000) { - return warnings, fmt.Errorf("range of blkio weight is from 10 to 1000") - } - if len(config.Resources.BlkioWeightDevice) > 0 && !sysInfo.BlkioWeightDevice { - warnings = addWarning(warnings, "Your kernel does not support Block I/O weight_device or the cgroup is not mounted. Weight-device discarded.") - config.Resources.BlkioWeightDevice = []string{} - } - if len(config.Resources.DeviceReadBps) > 0 && !sysInfo.BlkioReadBpsDevice { - warnings = addWarning(warnings, "Your kernel does not support BPS Block I/O read limit or the cgroup is not mounted. Block I/O BPS read limit discarded") - config.Resources.DeviceReadBps = []string{} - } - if len(config.Resources.DeviceWriteBps) > 0 && !sysInfo.BlkioWriteBpsDevice { - warnings = addWarning(warnings, "Your kernel does not support BPS Block I/O write limit or the cgroup is not mounted. Block I/O BPS write limit discarded.") - config.Resources.DeviceWriteBps = []string{} - } - if len(config.Resources.DeviceReadIOps) > 0 && !sysInfo.BlkioReadIOpsDevice { - warnings = addWarning(warnings, "Your kernel does not support IOPS Block read limit or the cgroup is not mounted. Block I/O IOPS read limit discarded.") - config.Resources.DeviceReadIOps = []string{} - } - if len(config.Resources.DeviceWriteIOps) > 0 && !sysInfo.BlkioWriteIOpsDevice { - warnings = addWarning(warnings, "Your kernel does not support IOPS Block I/O write limit or the cgroup is not mounted. Block I/O IOPS write limit discarded.") - config.Resources.DeviceWriteIOps = []string{} - } - - return warnings, nil -} diff --git a/cmd/kpod/create_cli_test.go b/cmd/kpod/create_cli_test.go deleted file mode 100644 index 63a1e5dd3..000000000 --- a/cmd/kpod/create_cli_test.go +++ /dev/null @@ -1,70 +0,0 @@ -package main - -import ( - "io/ioutil" - "os" - "testing" - - "github.com/stretchr/testify/assert" -) - -var ( - Var1 = []string{"ONE=1", "TWO=2"} -) - -func createTmpFile(content []byte) (string, error) { - tmpfile, err := ioutil.TempFile(os.TempDir(), "unittest") - if err != nil { - return "", err - } - - if _, err := tmpfile.Write(content); err != nil { - return "", err - - } - if err := tmpfile.Close(); err != nil { - return "", err - } - return tmpfile.Name(), nil -} - -func TestConvertStringSliceToMap(t *testing.T) { - strSlice := []string{"BLAU=BLUE", "GELB=YELLOW"} - result, _ := convertStringSliceToMap(strSlice, "=") - assert.Equal(t, result["BLAU"], "BLUE") -} - -func TestConvertStringSliceToMapBadData(t *testing.T) { - strSlice := []string{"BLAU=BLUE", "GELB^YELLOW"} - _, err := convertStringSliceToMap(strSlice, "=") - assert.Error(t, err) -} - -func TestGetAllLabels(t *testing.T) { - fileLabels := []string{} - labels, _ := getAllLabels(fileLabels, Var1) - assert.Equal(t, len(labels), 2) -} - -func TestGetAllLabelsBadKeyValue(t *testing.T) { - inLabels := []string{"ONE1", "TWO=2"} - fileLabels := []string{} - _, err := getAllLabels(fileLabels, inLabels) - assert.Error(t, err, assert.AnError) -} - -func TestGetAllLabelsBadLabelFile(t *testing.T) { - fileLabels := []string{"/foobar5001/be"} - _, err := getAllLabels(fileLabels, Var1) - assert.Error(t, err, assert.AnError) -} - -func TestGetAllLabelsFile(t *testing.T) { - content := []byte("THREE=3") - tFile, err := createTmpFile(content) - defer os.Remove(tFile) - assert.NoError(t, err) - fileLabels := []string{tFile} - result, _ := getAllLabels(fileLabels, Var1) - assert.Equal(t, len(result), 3) -} diff --git a/cmd/kpod/diff.go b/cmd/kpod/diff.go deleted file mode 100644 index 3a3b82e15..000000000 --- a/cmd/kpod/diff.go +++ /dev/null @@ -1,128 +0,0 @@ -package main - -import ( - "fmt" - - "github.com/containers/storage/pkg/archive" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/cmd/kpod/formats" - "github.com/urfave/cli" -) - -type diffJSONOutput struct { - Changed []string `json:"changed,omitempty"` - Added []string `json:"added,omitempty"` - Deleted []string `json:"deleted,omitempty"` -} - -type diffOutputParams struct { - Change archive.ChangeType - Path string -} - -type stdoutStruct struct { - output []diffOutputParams -} - -func (so stdoutStruct) Out() error { - for _, d := range so.output { - fmt.Printf("%s %s\n", d.Change, d.Path) - } - return nil -} - -var ( - diffFlags = []cli.Flag{ - cli.BoolFlag{ - Name: "archive", - Usage: "Save the diff as a tar archive", - Hidden: true, - }, - cli.StringFlag{ - Name: "format", - Usage: "Change the output format.", - }, - } - diffDescription = fmt.Sprint(`Displays changes on a container or image's filesystem. The - container or image will be compared to its parent layer`) - - diffCommand = cli.Command{ - Name: "diff", - Usage: "Inspect changes on container's file systems", - Description: diffDescription, - Flags: diffFlags, - Action: diffCmd, - ArgsUsage: "ID-NAME", - } -) - -func formatJSON(output []diffOutputParams) (diffJSONOutput, error) { - jsonStruct := diffJSONOutput{} - for _, output := range output { - switch output.Change { - case archive.ChangeModify: - jsonStruct.Changed = append(jsonStruct.Changed, output.Path) - case archive.ChangeAdd: - jsonStruct.Added = append(jsonStruct.Added, output.Path) - case archive.ChangeDelete: - jsonStruct.Deleted = append(jsonStruct.Deleted, output.Path) - default: - return jsonStruct, errors.Errorf("output kind %q not recognized", output.Change.String()) - } - } - return jsonStruct, nil -} - -func diffCmd(c *cli.Context) error { - if err := validateFlags(c, diffFlags); err != nil { - return err - } - - if len(c.Args()) != 1 { - return errors.Errorf("container, image, or layer name must be specified: kpod diff [options [...]] ID-NAME") - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - to := c.Args().Get(0) - changes, err := runtime.GetDiff("", to) - if err != nil { - return errors.Wrapf(err, "could not get changes for %q", to) - } - - diffOutput := []diffOutputParams{} - outputFormat := c.String("format") - - for _, change := range changes { - - params := diffOutputParams{ - Change: change.Kind, - Path: change.Path, - } - diffOutput = append(diffOutput, params) - } - - var out formats.Writer - - if outputFormat != "" { - switch outputFormat { - case formats.JSONString: - data, err := formatJSON(diffOutput) - if err != nil { - return err - } - out = formats.JSONStruct{Output: data} - default: - return errors.New("only valid format for diff is 'json'") - } - } else { - out = stdoutStruct{output: diffOutput} - } - formats.Writer(out).Out() - - return nil -} diff --git a/cmd/kpod/docker/types.go b/cmd/kpod/docker/types.go deleted file mode 100644 index a7e456554..000000000 --- a/cmd/kpod/docker/types.go +++ /dev/null @@ -1,271 +0,0 @@ -package docker - -// -// Types extracted from Docker -// - -import ( - "time" - - "github.com/containers/image/pkg/strslice" - "github.com/opencontainers/go-digest" -) - -// TypeLayers github.com/docker/docker/image/rootfs.go -const TypeLayers = "layers" - -// V2S2MediaTypeManifest github.com/docker/distribution/manifest/schema2/manifest.go -const V2S2MediaTypeManifest = "application/vnd.docker.distribution.manifest.v2+json" - -// V2S2MediaTypeImageConfig github.com/docker/distribution/manifest/schema2/manifest.go -const V2S2MediaTypeImageConfig = "application/vnd.docker.container.image.v1+json" - -// V2S2MediaTypeLayer github.com/docker/distribution/manifest/schema2/manifest.go -const V2S2MediaTypeLayer = "application/vnd.docker.image.rootfs.diff.tar.gzip" - -// V2S2MediaTypeUncompressedLayer github.com/docker/distribution/manifest/schema2/manifest.go -const V2S2MediaTypeUncompressedLayer = "application/vnd.docker.image.rootfs.diff.tar" - -// V2S2RootFS describes images root filesystem -// This is currently a placeholder that only supports layers. In the future -// this can be made into an interface that supports different implementations. -// github.com/docker/docker/image/rootfs.go -type V2S2RootFS struct { - Type string `json:"type"` - DiffIDs []digest.Digest `json:"diff_ids,omitempty"` -} - -// V2S2History stores build commands that were used to create an image -// github.com/docker/docker/image/image.go -type V2S2History struct { - // Created is the timestamp at which the image was created - Created time.Time `json:"created"` - // Author is the name of the author that was specified when committing the image - Author string `json:"author,omitempty"` - // CreatedBy keeps the Dockerfile command used while building the image - CreatedBy string `json:"created_by,omitempty"` - // Comment is the commit message that was set when committing the image - Comment string `json:"comment,omitempty"` - // EmptyLayer is set to true if this history item did not generate a - // layer. Otherwise, the history item is associated with the next - // layer in the RootFS section. - EmptyLayer bool `json:"empty_layer,omitempty"` -} - -// ID is the content-addressable ID of an image. -// github.com/docker/docker/image/image.go -type ID digest.Digest - -// HealthConfig holds configuration settings for the HEALTHCHECK feature. -// github.com/docker/docker/api/types/container/config.go -type HealthConfig struct { - // Test is the test to perform to check that the container is healthy. - // An empty slice means to inherit the default. - // The options are: - // {} : inherit healthcheck - // {"NONE"} : disable healthcheck - // {"CMD", args...} : exec arguments directly - // {"CMD-SHELL", command} : run command with system's default shell - Test []string `json:",omitempty"` - - // Zero means to inherit. Durations are expressed as integer nanoseconds. - Interval time.Duration `json:",omitempty"` // Interval is the time to wait between checks. - Timeout time.Duration `json:",omitempty"` // Timeout is the time to wait before considering the check to have hung. - - // Retries is the number of consecutive failures needed to consider a container as unhealthy. - // Zero means inherit. - Retries int `json:",omitempty"` -} - -// PortSet is a collection of structs indexed by Port -// github.com/docker/go-connections/nat/nat.go -type PortSet map[Port]struct{} - -// Port is a string containing port number and protocol in the format "80/tcp" -// github.com/docker/go-connections/nat/nat.go -type Port string - -// Config contains the configuration data about a container. -// It should hold only portable information about the container. -// Here, "portable" means "independent from the host we are running on". -// Non-portable information *should* appear in HostConfig. -// All fields added to this struct must be marked `omitempty` to keep getting -// predictable hashes from the old `v1Compatibility` configuration. -// github.com/docker/docker/api/types/container/config.go -type Config struct { - Hostname string // Hostname - Domainname string // Domainname - User string // User that will run the command(s) inside the container, also support user:group - AttachStdin bool // Attach the standard input, makes possible user interaction - AttachStdout bool // Attach the standard output - AttachStderr bool // Attach the standard error - ExposedPorts PortSet `json:",omitempty"` // List of exposed ports - Tty bool // Attach standard streams to a tty, including stdin if it is not closed. - OpenStdin bool // Open stdin - StdinOnce bool // If true, close stdin after the 1 attached client disconnects. - Env []string // List of environment variable to set in the container - Cmd strslice.StrSlice // Command to run when starting the container - Healthcheck *HealthConfig `json:",omitempty"` // Healthcheck describes how to check the container is healthy - ArgsEscaped bool `json:",omitempty"` // True if command is already escaped (Windows specific) - Image string // Name of the image as it was passed by the operator (e.g. could be symbolic) - Volumes map[string]struct{} // List of volumes (mounts) used for the container - WorkingDir string // Current directory (PWD) in the command will be launched - Entrypoint strslice.StrSlice // Entrypoint to run when starting the container - NetworkDisabled bool `json:",omitempty"` // Is network disabled - MacAddress string `json:",omitempty"` // Mac Address of the container - OnBuild []string // ONBUILD metadata that were defined on the image Dockerfile - Labels map[string]string // List of labels set to this container - StopSignal string `json:",omitempty"` // Signal to stop a container - StopTimeout *int `json:",omitempty"` // Timeout (in seconds) to stop a container - Shell strslice.StrSlice `json:",omitempty"` // Shell for shell-form of RUN, CMD, ENTRYPOINT -} - -// V1Compatibility - For non-top-level layers, create fake V1Compatibility -// strings that fit the format and don't collide with anything else, but -// don't result in runnable images on their own. -// github.com/docker/distribution/manifest/schema1/config_builder.go -type V1Compatibility struct { - ID string `json:"id"` - Parent string `json:"parent,omitempty"` - Comment string `json:"comment,omitempty"` - Created time.Time `json:"created"` - ContainerConfig struct { - Cmd []string - } `json:"container_config,omitempty"` - Author string `json:"author,omitempty"` - ThrowAway bool `json:"throwaway,omitempty"` -} - -// V1Image stores the V1 image configuration. -// github.com/docker/docker/image/image.go -type V1Image struct { - // ID is a unique 64 character identifier of the image - ID string `json:"id,omitempty"` - // Parent is the ID of the parent image - Parent string `json:"parent,omitempty"` - // Comment is the commit message that was set when committing the image - Comment string `json:"comment,omitempty"` - // Created is the timestamp at which the image was created - Created time.Time `json:"created"` - // Container is the id of the container used to commit - Container string `json:"container,omitempty"` - // ContainerConfig is the configuration of the container that is committed into the image - ContainerConfig Config `json:"container_config,omitempty"` - // DockerVersion specifies the version of Docker that was used to build the image - DockerVersion string `json:"docker_version,omitempty"` - // Author is the name of the author that was specified when committing the image - Author string `json:"author,omitempty"` - // Config is the configuration of the container received from the client - Config *Config `json:"config,omitempty"` - // Architecture is the hardware that the image is build and runs on - Architecture string `json:"architecture,omitempty"` - // OS is the operating system used to build and run the image - OS string `json:"os,omitempty"` - // Size is the total size of the image including all layers it is composed of - Size int64 `json:",omitempty"` -} - -// V2Image stores the image configuration -// github.com/docker/docker/image/image.go -type V2Image struct { - V1Image - Parent ID `json:"parent,omitempty"` - RootFS *V2S2RootFS `json:"rootfs,omitempty"` - History []V2S2History `json:"history,omitempty"` - OSVersion string `json:"os.version,omitempty"` - OSFeatures []string `json:"os.features,omitempty"` - - // rawJSON caches the immutable JSON associated with this image. - //rawJSON []byte - - // computedID is the ID computed from the hash of the image config. - // Not to be confused with the legacy V1 ID in V1Image. - //computedID ID -} - -// V2Versioned provides a struct with the manifest schemaVersion and mediaType. -// Incoming content with unknown schema version can be decoded against this -// struct to check the version. -// github.com/docker/distribution/manifest/versioned.go -type V2Versioned struct { - // SchemaVersion is the image manifest schema that this image follows - SchemaVersion int `json:"schemaVersion"` - - // MediaType is the media type of this schema. - MediaType string `json:"mediaType,omitempty"` -} - -// V2S1FSLayer is a container struct for BlobSums defined in an image manifest -// github.com/docker/distribution/manifest/schema1/manifest.go -type V2S1FSLayer struct { - // BlobSum is the tarsum of the referenced filesystem image layer - BlobSum digest.Digest `json:"blobSum"` -} - -// V2S1History stores unstructured v1 compatibility information -// github.com/docker/distribution/manifest/schema1/manifest.go -type V2S1History struct { - // V1Compatibility is the raw v1 compatibility information - V1Compatibility string `json:"v1Compatibility"` -} - -// V2S1Manifest provides the base accessible fields for working with V2 image -// format in the registry. -// github.com/docker/distribution/manifest/schema1/manifest.go -type V2S1Manifest struct { - V2Versioned - - // Name is the name of the image's repository - Name string `json:"name"` - - // Tag is the tag of the image specified by this manifest - Tag string `json:"tag"` - - // Architecture is the host architecture on which this image is intended to - // run - Architecture string `json:"architecture"` - - // FSLayers is a list of filesystem layer blobSums contained in this image - FSLayers []V2S1FSLayer `json:"fsLayers"` - - // History is a list of unstructured historical data for v1 compatibility - History []V2S1History `json:"history"` -} - -// V2S2Descriptor describes targeted content. Used in conjunction with a blob -// store, a descriptor can be used to fetch, store and target any kind of -// blob. The struct also describes the wire protocol format. Fields should -// only be added but never changed. -// github.com/docker/distribution/blobs.go -type V2S2Descriptor struct { - // MediaType describe the type of the content. All text based formats are - // encoded as utf-8. - MediaType string `json:"mediaType,omitempty"` - - // Size in bytes of content. - Size int64 `json:"size,omitempty"` - - // Digest uniquely identifies the content. A byte stream can be verified - // against against this digest. - Digest digest.Digest `json:"digest,omitempty"` - - // URLs contains the source URLs of this content. - URLs []string `json:"urls,omitempty"` - - // NOTE: Before adding a field here, please ensure that all - // other options have been exhausted. Much of the type relationships - // depend on the simplicity of this type. -} - -// V2S2Manifest defines a schema2 manifest. -// github.com/docker/distribution/manifest/schema2/manifest.go -type V2S2Manifest struct { - V2Versioned - - // Config references the image configuration as a blob. - Config V2S2Descriptor `json:"config"` - - // Layers lists descriptors for the layers referenced by the - // configuration. - Layers []V2S2Descriptor `json:"layers"` -} diff --git a/cmd/kpod/exec.go b/cmd/kpod/exec.go deleted file mode 100644 index f76983810..000000000 --- a/cmd/kpod/exec.go +++ /dev/null @@ -1,86 +0,0 @@ -package main - -import ( - "fmt" - "strings" - - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/urfave/cli" -) - -var ( - execFlags = []cli.Flag{ - cli.StringSliceFlag{ - Name: "env, e", - Usage: "Set environment variables", - }, - cli.BoolFlag{ - Name: "privileged", - Usage: "Give the process extended Linux capabilities inside the container. The default is false", - }, - cli.BoolFlag{ - Name: "tty, t", - Usage: "Allocate a pseudo-TTY. The default is false", - }, - cli.StringFlag{ - Name: "user, u", - Usage: "Sets the username or UID used and optionally the groupname or GID for the specified command", - }, - } - execDescription = ` - kpod exec - - Run a command in a running container -` - - execCommand = cli.Command{ - Name: "exec", - Usage: "Run a process in a running container", - Description: execDescription, - Flags: execFlags, - Action: execCmd, - ArgsUsage: "CONTAINER-NAME", - } -) - -func execCmd(c *cli.Context) error { - var envs []string - args := c.Args() - if len(args) < 1 { - return errors.Errorf("you must provide one container name or id") - } - if len(args) < 2 { - return errors.Errorf("you must provide a command to exec") - } - cmd := args[1:] - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "error creating libpod runtime") - } - defer runtime.Shutdown(false) - - ctr, err := runtime.LookupContainer(args[0]) - if err != nil { - return errors.Wrapf(err, "unable to exec into %s", args[0]) - } - // Create a list of keys provided by the user - var userEnvKeys []string - for _, env := range c.StringSlice("env") { - splitEnv := strings.Split(env, "=") - userEnvKeys = append(userEnvKeys, splitEnv[0]) - } - - envs = append(envs, c.StringSlice("env")...) - - // if the default key isnt in the user-provided list, add the default - // key and value to the environment variables. this is needed to set - // PATH for example. - for k, v := range defaultEnvVariables { - if !libpod.StringInSlice(k, userEnvKeys) { - envs = append(envs, fmt.Sprintf("%s=%s", k, v)) - } - } - - return ctr.Exec(c.Bool("tty"), c.Bool("privileged"), envs, cmd, c.String("user")) -} diff --git a/cmd/kpod/export.go b/cmd/kpod/export.go deleted file mode 100644 index 9b498562e..000000000 --- a/cmd/kpod/export.go +++ /dev/null @@ -1,65 +0,0 @@ -package main - -import ( - "os" - - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "github.com/urfave/cli" -) - -var ( - exportFlags = []cli.Flag{ - cli.StringFlag{ - Name: "output, o", - Usage: "Write to a file, default is STDOUT", - Value: "/dev/stdout", - }, - } - exportDescription = "Exports container's filesystem contents as a tar archive" + - " and saves it on the local machine." - exportCommand = cli.Command{ - Name: "export", - Usage: "Export container's filesystem contents as a tar archive", - Description: exportDescription, - Flags: exportFlags, - Action: exportCmd, - ArgsUsage: "CONTAINER", - } -) - -// exportCmd saves a container to a tarball on disk -func exportCmd(c *cli.Context) error { - if err := validateFlags(c, exportFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - args := c.Args() - if len(args) == 0 { - return errors.Errorf("container id must be specified") - } - if len(args) > 1 { - return errors.Errorf("too many arguments given, need 1 at most.") - } - - output := c.String("output") - if output == "/dev/stdout" { - file := os.Stdout - if logrus.IsTerminal(file) { - return errors.Errorf("refusing to export to terminal. Use -o flag or redirect") - } - } - - ctr, err := runtime.LookupContainer(args[0]) - if err != nil { - return errors.Wrapf(err, "error looking up container %q", args[0]) - } - - return ctr.Export(output) -} diff --git a/cmd/kpod/formats/formats.go b/cmd/kpod/formats/formats.go deleted file mode 100644 index 4b6527b30..000000000 --- a/cmd/kpod/formats/formats.go +++ /dev/null @@ -1,143 +0,0 @@ -package formats - -import ( - "bytes" - "encoding/json" - "fmt" - "os" - "strings" - "text/tabwriter" - "text/template" - - "github.com/ghodss/yaml" - "github.com/pkg/errors" -) - -const ( - // JSONString const to save on duplicate variable names - JSONString = "json" - // IDString const to save on duplicates for Go templates - IDString = "{{.ID}}" -) - -// Writer interface for outputs -type Writer interface { - Out() error -} - -// JSONStructArray for JSON output -type JSONStructArray struct { - Output []interface{} -} - -// StdoutTemplateArray for Go template output -type StdoutTemplateArray struct { - Output []interface{} - Template string - Fields map[string]string -} - -// JSONStruct for JSON output -type JSONStruct struct { - Output interface{} -} - -// StdoutTemplate for Go template output -type StdoutTemplate struct { - Output interface{} - Template string - Fields map[string]string -} - -// YAMLStruct for YAML output -type YAMLStruct struct { - Output interface{} -} - -// Out method for JSON Arrays -func (j JSONStructArray) Out() error { - data, err := json.MarshalIndent(j.Output, "", " ") - if err != nil { - return err - } - - // JSON returns a byte array with a literal null [110 117 108 108] in it - // if it is passed empty data. We used bytes.Compare to see if that is - // the case. - if diff := bytes.Compare(data, []byte("null")); diff == 0 { - data = []byte("[]") - } - - // If the we did get NULL back, we should spit out {} which is - // at least valid JSON for the consumer. - fmt.Printf("%s\n", data) - return nil -} - -// Out method for Go templates -func (t StdoutTemplateArray) Out() error { - w := tabwriter.NewWriter(os.Stdout, 0, 0, 3, ' ', 0) - if strings.HasPrefix(t.Template, "table") { - // replace any spaces with tabs in template so that tabwriter can align it - t.Template = strings.Replace(strings.TrimSpace(t.Template[5:]), " ", "\t", -1) - headerTmpl, err := template.New("header").Funcs(headerFunctions).Parse(t.Template) - if err != nil { - return errors.Wrapf(err, "Template parsing error") - } - err = headerTmpl.Execute(w, t.Fields) - if err != nil { - return err - } - fmt.Fprintln(w, "") - } - t.Template = strings.Replace(t.Template, " ", "\t", -1) - tmpl, err := template.New("image").Funcs(basicFunctions).Parse(t.Template) - if err != nil { - return errors.Wrapf(err, "Template parsing error") - } - for _, img := range t.Output { - basicTmpl := tmpl.Funcs(basicFunctions) - err = basicTmpl.Execute(w, img) - if err != nil { - return err - } - fmt.Fprintln(w, "") - } - return w.Flush() -} - -// Out method for JSON struct -func (j JSONStruct) Out() error { - data, err := json.MarshalIndent(j.Output, "", " ") - if err != nil { - return err - } - fmt.Printf("%s\n", data) - return nil -} - -//Out method for Go templates -func (t StdoutTemplate) Out() error { - tmpl, err := template.New("image").Parse(t.Template) - if err != nil { - return errors.Wrapf(err, "template parsing error") - } - err = tmpl.Execute(os.Stdout, t.Output) - if err != nil { - return err - } - fmt.Println() - return nil -} - -// Out method for YAML -func (y YAMLStruct) Out() error { - var buf []byte - var err error - buf, err = yaml.Marshal(y.Output) - if err != nil { - return err - } - fmt.Println(string(buf)) - return nil -} diff --git a/cmd/kpod/formats/templates.go b/cmd/kpod/formats/templates.go deleted file mode 100644 index c2582552a..000000000 --- a/cmd/kpod/formats/templates.go +++ /dev/null @@ -1,78 +0,0 @@ -package formats - -import ( - "bytes" - "encoding/json" - "strings" - "text/template" -) - -// basicFunctions are the set of initial -// functions provided to every template. -var basicFunctions = template.FuncMap{ - "json": func(v interface{}) string { - buf := &bytes.Buffer{} - enc := json.NewEncoder(buf) - enc.SetEscapeHTML(false) - _ = enc.Encode(v) - // Remove the trailing new line added by the encoder - return strings.TrimSpace(buf.String()) - }, - "split": strings.Split, - "join": strings.Join, - "title": strings.Title, - "lower": strings.ToLower, - "upper": strings.ToUpper, - "pad": padWithSpace, - "truncate": truncateWithLength, -} - -// HeaderFunctions are used to created headers of a table. -// This is a replacement of basicFunctions for header generation -// because we want the header to remain intact. -// Some functions like `split` are irrelevant so not added. -var headerFunctions = template.FuncMap{ - "json": func(v string) string { - return v - }, - "title": func(v string) string { - return v - }, - "lower": func(v string) string { - return v - }, - "upper": func(v string) string { - return v - }, - "truncate": func(v string, l int) string { - return v - }, -} - -// Parse creates a new anonymous template with the basic functions -// and parses the given format. -func Parse(format string) (*template.Template, error) { - return NewParse("", format) -} - -// NewParse creates a new tagged template with the basic functions -// and parses the given format. -func NewParse(tag, format string) (*template.Template, error) { - return template.New(tag).Funcs(basicFunctions).Parse(format) -} - -// padWithSpace adds whitespace to the input if the input is non-empty -func padWithSpace(source string, prefix, suffix int) string { - if source == "" { - return source - } - return strings.Repeat(" ", prefix) + source + strings.Repeat(" ", suffix) -} - -// truncateWithLength truncates the source string up to the length provided by the input -func truncateWithLength(source string, length int) string { - if len(source) < length { - return source - } - return source[:length] -} diff --git a/cmd/kpod/history.go b/cmd/kpod/history.go deleted file mode 100644 index 20422b7c3..000000000 --- a/cmd/kpod/history.go +++ /dev/null @@ -1,246 +0,0 @@ -package main - -import ( - "reflect" - "strconv" - "strings" - "time" - - "github.com/containers/image/types" - units "github.com/docker/go-units" - "github.com/opencontainers/image-spec/specs-go/v1" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/cmd/kpod/formats" - "github.com/urfave/cli" -) - -const ( - createdByTruncLength = 45 - idTruncLength = 12 -) - -// historyTemplateParams stores info about each layer -type historyTemplateParams struct { - ID string - Created string - CreatedBy string - Size string - Comment string -} - -// historyJSONParams is only used when the JSON format is specified, -// and is better for data processing from JSON. -// historyJSONParams will be populated by data from v1.History and types.BlobInfo, -// the members of the struct are the sama data types as their sources. -type historyJSONParams struct { - ID string `json:"id"` - Created *time.Time `json:"created"` - CreatedBy string `json:"createdBy"` - Size int64 `json:"size"` - Comment string `json:"comment"` -} - -// historyOptions stores cli flag values -type historyOptions struct { - human bool - noTrunc bool - quiet bool - format string -} - -var ( - historyFlags = []cli.Flag{ - cli.BoolTFlag{ - Name: "human, H", - Usage: "Display sizes and dates in human readable format", - }, - cli.BoolFlag{ - Name: "no-trunc, notruncate", - Usage: "Do not truncate the output", - }, - cli.BoolFlag{ - Name: "quiet, q", - Usage: "Display the numeric IDs only", - }, - cli.StringFlag{ - Name: "format", - Usage: "Change the output to JSON or a Go template", - }, - } - - historyDescription = "Displays the history of an image. The information can be printed out in an easy to read, " + - "or user specified format, and can be truncated." - historyCommand = cli.Command{ - Name: "history", - Usage: "Show history of a specified image", - Description: historyDescription, - Flags: historyFlags, - Action: historyCmd, - ArgsUsage: "", - UseShortOptionHandling: true, - } -) - -func historyCmd(c *cli.Context) error { - if err := validateFlags(c, historyFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - format := genHistoryFormat(c.String("format"), c.Bool("quiet")) - - args := c.Args() - if len(args) == 0 { - return errors.Errorf("an image name must be specified") - } - if len(args) > 1 { - return errors.Errorf("Kpod history takes at most 1 argument") - } - imgName := args[0] - - opts := historyOptions{ - human: c.BoolT("human"), - noTrunc: c.Bool("no-trunc"), - quiet: c.Bool("quiet"), - format: format, - } - - history, layers, imageID, err := runtime.GetHistory(imgName) - if err != nil { - return errors.Wrapf(err, "error getting history of image %q", imgName) - } - - return generateHistoryOutput(history, layers, imageID, opts) -} - -func genHistoryFormat(format string, quiet bool) string { - if format != "" { - // "\t" from the command line is not being recognized as a tab - // replacing the string "\t" to a tab character if the user passes in "\t" - return strings.Replace(format, `\t`, "\t", -1) - } - if quiet { - return formats.IDString - } - return "table {{.ID}}\t{{.Created}}\t{{.CreatedBy}}\t{{.Size}}\t{{.Comment}}\t" -} - -// historyToGeneric makes an empty array of interfaces for output -func historyToGeneric(templParams []historyTemplateParams, JSONParams []historyJSONParams) (genericParams []interface{}) { - if len(templParams) > 0 { - for _, v := range templParams { - genericParams = append(genericParams, interface{}(v)) - } - return - } - for _, v := range JSONParams { - genericParams = append(genericParams, interface{}(v)) - } - return -} - -// generate the header based on the template provided -func (h *historyTemplateParams) headerMap() map[string]string { - v := reflect.Indirect(reflect.ValueOf(h)) - values := make(map[string]string) - for h := 0; h < v.NumField(); h++ { - key := v.Type().Field(h).Name - value := key - values[key] = strings.ToUpper(splitCamelCase(value)) - } - return values -} - -// getHistorytemplateOutput gets the modified history information to be printed in human readable format -func getHistoryTemplateOutput(history []v1.History, layers []types.BlobInfo, imageID string, opts historyOptions) (historyOutput []historyTemplateParams) { - var ( - outputSize string - createdTime string - createdBy string - count = 1 - ) - for i := len(history) - 1; i >= 0; i-- { - if i != len(history)-1 { - imageID = "" - } - if !opts.noTrunc && i == len(history)-1 { - imageID = imageID[:idTruncLength] - } - - var size int64 - if !history[i].EmptyLayer { - size = layers[len(layers)-count].Size - count++ - } - - if opts.human { - createdTime = units.HumanDuration(time.Since((*history[i].Created))) + " ago" - outputSize = units.HumanSize(float64(size)) - } else { - createdTime = (history[i].Created).Format(time.RFC3339) - outputSize = strconv.FormatInt(size, 10) - } - - createdBy = strings.Join(strings.Fields(history[i].CreatedBy), " ") - if !opts.noTrunc && len(createdBy) > createdByTruncLength { - createdBy = createdBy[:createdByTruncLength-3] + "..." - } - - params := historyTemplateParams{ - ID: imageID, - Created: createdTime, - CreatedBy: createdBy, - Size: outputSize, - Comment: history[i].Comment, - } - historyOutput = append(historyOutput, params) - } - return -} - -// getHistoryJSONOutput returns the history information in its raw form -func getHistoryJSONOutput(history []v1.History, layers []types.BlobInfo, imageID string) (historyOutput []historyJSONParams) { - count := 1 - for i := len(history) - 1; i >= 0; i-- { - var size int64 - if !history[i].EmptyLayer { - size = layers[len(layers)-count].Size - count++ - } - - params := historyJSONParams{ - ID: imageID, - Created: history[i].Created, - CreatedBy: history[i].CreatedBy, - Size: size, - Comment: history[i].Comment, - } - historyOutput = append(historyOutput, params) - } - return -} - -// generateHistoryOutput generates the history based on the format given -func generateHistoryOutput(history []v1.History, layers []types.BlobInfo, imageID string, opts historyOptions) error { - if len(history) == 0 { - return nil - } - - var out formats.Writer - - switch opts.format { - case formats.JSONString: - historyOutput := getHistoryJSONOutput(history, layers, imageID) - out = formats.JSONStructArray{Output: historyToGeneric([]historyTemplateParams{}, historyOutput)} - default: - historyOutput := getHistoryTemplateOutput(history, layers, imageID, opts) - out = formats.StdoutTemplateArray{Output: historyToGeneric(historyOutput, []historyJSONParams{}), Template: opts.format, Fields: historyOutput[0].headerMap()} - } - - return formats.Writer(out).Out() -} diff --git a/cmd/kpod/images.go b/cmd/kpod/images.go deleted file mode 100644 index 2b1003ebd..000000000 --- a/cmd/kpod/images.go +++ /dev/null @@ -1,337 +0,0 @@ -package main - -import ( - "fmt" - "reflect" - "strings" - "time" - - "github.com/containers/storage" - "github.com/docker/go-units" - digest "github.com/opencontainers/go-digest" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/cmd/kpod/formats" - "github.com/projectatomic/libpod/libpod" - "github.com/projectatomic/libpod/libpod/common" - "github.com/urfave/cli" -) - -type imagesTemplateParams struct { - Repository string - Tag string - ID string - Digest digest.Digest - Created string - Size string -} - -type imagesJSONParams struct { - ID string `json:"id"` - Name []string `json:"names"` - Digest digest.Digest `json:"digest"` - Created time.Time `json:"created"` - Size int64 `json:"size"` -} - -type imagesOptions struct { - quiet bool - noHeading bool - noTrunc bool - digests bool - format string -} - -var ( - imagesFlags = []cli.Flag{ - cli.BoolFlag{ - Name: "quiet, q", - Usage: "display only image IDs", - }, - cli.BoolFlag{ - Name: "noheading, n", - Usage: "do not print column headings", - }, - cli.BoolFlag{ - Name: "no-trunc, notruncate", - Usage: "do not truncate output", - }, - cli.BoolFlag{ - Name: "digests", - Usage: "show digests", - }, - cli.StringFlag{ - Name: "format", - Usage: "Change the output format to JSON or a Go template", - }, - cli.StringFlag{ - Name: "filter, f", - Usage: "filter output based on conditions provided (default [])", - }, - } - - imagesDescription = "lists locally stored images." - imagesCommand = cli.Command{ - Name: "images", - Usage: "list images in local storage", - Description: imagesDescription, - Flags: imagesFlags, - Action: imagesCmd, - ArgsUsage: "", - UseShortOptionHandling: true, - } -) - -func imagesCmd(c *cli.Context) error { - if err := validateFlags(c, imagesFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "Could not get runtime") - } - defer runtime.Shutdown(false) - - format := genImagesFormat(c.String("format"), c.Bool("quiet"), c.Bool("noheading"), c.Bool("digests")) - - opts := imagesOptions{ - quiet: c.Bool("quiet"), - noHeading: c.Bool("noheading"), - noTrunc: c.Bool("no-trunc"), - digests: c.Bool("digests"), - format: format, - } - - var imageInput string - if len(c.Args()) == 1 { - imageInput = c.Args().Get(0) - } - if len(c.Args()) > 1 { - return errors.New("'kpod images' requires at most 1 argument") - } - - params, err := runtime.ParseImageFilter(imageInput, c.String("filter")) - if err != nil { - return errors.Wrapf(err, "error parsing filter") - } - - // generate the different filters - labelFilter := generateImagesFilter(params, "label") - beforeImageFilter := generateImagesFilter(params, "before-image") - sinceImageFilter := generateImagesFilter(params, "since-image") - danglingFilter := generateImagesFilter(params, "dangling") - referenceFilter := generateImagesFilter(params, "reference") - imageInputFilter := generateImagesFilter(params, "image-input") - - images, err := runtime.GetImages(params, labelFilter, beforeImageFilter, sinceImageFilter, danglingFilter, referenceFilter, imageInputFilter) - if err != nil { - return errors.Wrapf(err, "could not get list of images matching filter") - } - - return generateImagesOutput(runtime, images, opts) -} - -func genImagesFormat(format string, quiet, noHeading, digests bool) string { - if format != "" { - // "\t" from the command line is not being recognized as a tab - // replacing the string "\t" to a tab character if the user passes in "\t" - return strings.Replace(format, `\t`, "\t", -1) - } - if quiet { - return formats.IDString - } - format = "table {{.Repository}}\t{{.Tag}}\t" - if noHeading { - format = "{{.Repository}}\t{{.Tag}}\t" - } - if digests { - format += "{{.Digest}}\t" - } - format += "{{.ID}}\t{{.Created}}\t{{.Size}}\t" - return format -} - -// imagesToGeneric creates an empty array of interfaces for output -func imagesToGeneric(templParams []imagesTemplateParams, JSONParams []imagesJSONParams) (genericParams []interface{}) { - if len(templParams) > 0 { - for _, v := range templParams { - genericParams = append(genericParams, interface{}(v)) - } - return - } - for _, v := range JSONParams { - genericParams = append(genericParams, interface{}(v)) - } - return -} - -// generate the header based on the template provided -func (i *imagesTemplateParams) headerMap() map[string]string { - v := reflect.Indirect(reflect.ValueOf(i)) - values := make(map[string]string) - - for i := 0; i < v.NumField(); i++ { - key := v.Type().Field(i).Name - value := key - if value == "ID" { - value = "Image" + value - } - values[key] = strings.ToUpper(splitCamelCase(value)) - } - return values -} - -// getImagesTemplateOutput returns the images information to be printed in human readable format -func getImagesTemplateOutput(runtime *libpod.Runtime, images []*storage.Image, opts imagesOptions) (imagesOutput []imagesTemplateParams) { - var ( - lastID string - ) - for _, img := range images { - if opts.quiet && lastID == img.ID { - continue // quiet should not show the same ID multiple times - } - createdTime := img.Created - - imageID := "sha256:" + img.ID - if !opts.noTrunc { - imageID = img.ID[:idTruncLength] - } - - repository := "" - tag := "" - if len(img.Names) > 0 { - arr := strings.Split(img.Names[0], ":") - repository = arr[0] - if len(arr) == 2 { - tag = arr[1] - } - } - - imgData, _ := runtime.GetImageInspectInfo(*img) - if imgData != nil { - createdTime = *imgData.Created - } - - params := imagesTemplateParams{ - Repository: repository, - Tag: tag, - ID: imageID, - Digest: imgData.Digest, - Created: units.HumanDuration(time.Since((createdTime))) + " ago", - Size: units.HumanSizeWithPrecision(float64(imgData.Size), 3), - } - imagesOutput = append(imagesOutput, params) - } - return -} - -// getImagesJSONOutput returns the images information in its raw form -func getImagesJSONOutput(runtime *libpod.Runtime, images []*storage.Image) (imagesOutput []imagesJSONParams) { - for _, img := range images { - createdTime := img.Created - - imgData, _ := runtime.GetImageInspectInfo(*img) - if imgData != nil { - createdTime = *imgData.Created - } - - params := imagesJSONParams{ - ID: img.ID, - Name: img.Names, - Digest: imgData.Digest, - Created: createdTime, - Size: imgData.Size, - } - imagesOutput = append(imagesOutput, params) - } - return -} - -// generateImagesOutput generates the images based on the format provided -func generateImagesOutput(runtime *libpod.Runtime, images []*storage.Image, opts imagesOptions) error { - if len(images) == 0 { - return nil - } - - var out formats.Writer - - switch opts.format { - case formats.JSONString: - imagesOutput := getImagesJSONOutput(runtime, images) - out = formats.JSONStructArray{Output: imagesToGeneric([]imagesTemplateParams{}, imagesOutput)} - default: - imagesOutput := getImagesTemplateOutput(runtime, images, opts) - out = formats.StdoutTemplateArray{Output: imagesToGeneric(imagesOutput, []imagesJSONParams{}), Template: opts.format, Fields: imagesOutput[0].headerMap()} - - } - - return formats.Writer(out).Out() -} - -// generateImagesFilter returns an ImageFilter based on filterType -// to add more filters, define a new case and write what the ImageFilter function should do -func generateImagesFilter(params *libpod.ImageFilterParams, filterType string) libpod.ImageFilter { - switch filterType { - case "label": - return func(image *storage.Image, info *libpod.ImageData) bool { - if params == nil || params.Label == "" { - return true - } - - pair := strings.SplitN(params.Label, "=", 2) - if val, ok := info.Labels[pair[0]]; ok { - if len(pair) == 2 && val == pair[1] { - return true - } - if len(pair) == 1 { - return true - } - } - return false - } - case "before-image": - return func(image *storage.Image, info *libpod.ImageData) bool { - if params == nil || params.BeforeImage.IsZero() { - return true - } - return info.Created.Before(params.BeforeImage) - } - case "since-image": - return func(image *storage.Image, info *libpod.ImageData) bool { - if params == nil || params.SinceImage.IsZero() { - return true - } - return info.Created.After(params.SinceImage) - } - case "dangling": - return func(image *storage.Image, info *libpod.ImageData) bool { - if params == nil || params.Dangling == "" { - return true - } - if common.IsFalse(params.Dangling) && params.ImageName != "" { - return true - } - if common.IsTrue(params.Dangling) && params.ImageName == "" { - return true - } - return false - } - case "reference": - return func(image *storage.Image, info *libpod.ImageData) bool { - if params == nil || params.ReferencePattern == "" { - return true - } - return libpod.MatchesReference(params.ImageName, params.ReferencePattern) - } - case "image-input": - return func(image *storage.Image, info *libpod.ImageData) bool { - if params == nil || params.ImageInput == "" { - return true - } - return libpod.MatchesReference(params.ImageName, params.ImageInput) - } - default: - fmt.Println("invalid filter type", filterType) - return nil - } -} diff --git a/cmd/kpod/import.go b/cmd/kpod/import.go deleted file mode 100644 index 2e8702c3d..000000000 --- a/cmd/kpod/import.go +++ /dev/null @@ -1,190 +0,0 @@ -package main - -import ( - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "os" - "strings" - - "github.com/opencontainers/image-spec/specs-go/v1" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/urfave/cli" -) - -var ( - importFlags = []cli.Flag{ - cli.StringSliceFlag{ - Name: "change, c", - Usage: "Apply the following possible instructions to the created image (default []): CMD | ENTRYPOINT | ENV | EXPOSE | LABEL | STOPSIGNAL | USER | VOLUME | WORKDIR", - }, - cli.StringFlag{ - Name: "message, m", - Usage: "Set commit message for imported image", - }, - } - importDescription = `Create a container image from the contents of the specified tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz). - Note remote tar balls can be specified, via web address. - Optionally tag the image. You can specify the Dockerfile instructions using the --change option. - ` - importCommand = cli.Command{ - Name: "import", - Usage: "Import a tarball to create a filesystem image", - Description: importDescription, - Flags: importFlags, - Action: importCmd, - ArgsUsage: "TARBALL [REFERENCE]", - } -) - -func importCmd(c *cli.Context) error { - if err := validateFlags(c, importFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - var opts libpod.CopyOptions - var source string - args := c.Args() - switch len(args) { - case 0: - return errors.Errorf("need to give the path to the tarball, or must specify a tarball of '-' for stdin") - case 1: - source = args[0] - case 2: - source = args[0] - opts.Reference = args[1] - default: - return errors.Errorf("too many arguments. Usage TARBALL [REFERENCE]") - } - - changes := v1.ImageConfig{} - if c.IsSet("change") { - changes, err = getImageConfig(c.StringSlice("change")) - if err != nil { - return errors.Wrapf(err, "error adding config changes to image %q", source) - } - } - - history := []v1.History{ - {Comment: c.String("message")}, - } - - config := v1.Image{ - Config: changes, - History: history, - } - - opts.ImageConfig = config - - // if source is a url, download it and save to a temp file - u, err := url.ParseRequestURI(source) - if err == nil && u.Scheme != "" { - file, err := downloadFromURL(source) - if err != nil { - return err - } - defer os.Remove(file) - source = file - } - - return runtime.ImportImage(source, opts) -} - -// donwloadFromURL downloads an image in the format "https:/example.com/myimage.tar" -// and tempoarily saves in it /var/tmp/importxyz, which is deleted after the image is imported -func downloadFromURL(source string) (string, error) { - fmt.Printf("Downloading from %q\n", source) - - outFile, err := ioutil.TempFile("/var/tmp", "import") - if err != nil { - return "", errors.Wrap(err, "error creating file") - } - defer outFile.Close() - - response, err := http.Get(source) - if err != nil { - return "", errors.Wrapf(err, "error downloading %q", source) - } - defer response.Body.Close() - - _, err = io.Copy(outFile, response.Body) - if err != nil { - return "", errors.Wrapf(err, "error saving %q to %q", source, outFile) - } - - return outFile.Name(), nil -} - -// getImageConfig converts the --change flag values in the format "CMD=/bin/bash USER=example" -// to a type v1.ImageConfig -func getImageConfig(changes []string) (v1.ImageConfig, error) { - // USER=value | EXPOSE=value | ENV=value | ENTRYPOINT=value | - // CMD=value | VOLUME=value | WORKDIR=value | LABEL=key=value | STOPSIGNAL=value - - var ( - user string - env []string - entrypoint []string - cmd []string - workingDir string - stopSignal string - ) - - exposedPorts := make(map[string]struct{}) - volumes := make(map[string]struct{}) - labels := make(map[string]string) - - for _, ch := range changes { - pair := strings.Split(ch, "=") - if len(pair) == 1 { - return v1.ImageConfig{}, errors.Errorf("no value given for instruction %q", ch) - } - switch pair[0] { - case "USER": - user = pair[1] - case "EXPOSE": - var st struct{} - exposedPorts[pair[1]] = st - case "ENV": - env = append(env, pair[1]) - case "ENTRYPOINT": - entrypoint = append(entrypoint, pair[1]) - case "CMD": - cmd = append(cmd, pair[1]) - case "VOLUME": - var st struct{} - volumes[pair[1]] = st - case "WORKDIR": - workingDir = pair[1] - case "LABEL": - if len(pair) == 3 { - labels[pair[1]] = pair[2] - } else { - labels[pair[1]] = "" - } - case "STOPSIGNAL": - stopSignal = pair[1] - } - } - - return v1.ImageConfig{ - User: user, - ExposedPorts: exposedPorts, - Env: env, - Entrypoint: entrypoint, - Cmd: cmd, - Volumes: volumes, - WorkingDir: workingDir, - Labels: labels, - StopSignal: stopSignal, - }, nil -} diff --git a/cmd/kpod/info.go b/cmd/kpod/info.go deleted file mode 100644 index c491b4585..000000000 --- a/cmd/kpod/info.go +++ /dev/null @@ -1,84 +0,0 @@ -package main - -import ( - "runtime" - - "github.com/pkg/errors" - "github.com/projectatomic/libpod/cmd/kpod/formats" - "github.com/projectatomic/libpod/libpod" - "github.com/urfave/cli" -) - -var ( - infoDescription = "display system information" - infoCommand = cli.Command{ - Name: "info", - Usage: infoDescription, - Description: `Information display here pertain to the host, current storage stats, and build of kpod. Useful for the user and when reporting issues.`, - Flags: infoFlags, - Action: infoCmd, - ArgsUsage: "", - } - infoFlags = []cli.Flag{ - cli.BoolFlag{ - Name: "debug, D", - Usage: "display additional debug information", - }, - cli.StringFlag{ - Name: "format", - Usage: "Change the output format to JSON or a Go template", - }, - } -) - -func infoCmd(c *cli.Context) error { - if err := validateFlags(c, infoFlags); err != nil { - return err - } - info := map[string]interface{}{} - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - infoArr, err := runtime.Info() - if err != nil { - return errors.Wrapf(err, "error getting info") - } - - if c.Bool("debug") { - debugInfo := debugInfo(c) - infoArr = append(infoArr, libpod.InfoData{Type: "debug", Data: debugInfo}) - } - - for _, currInfo := range infoArr { - info[currInfo.Type] = currInfo.Data - } - - var out formats.Writer - infoOutputFormat := c.String("format") - switch infoOutputFormat { - case formats.JSONString: - out = formats.JSONStruct{Output: info} - case "": - out = formats.YAMLStruct{Output: info} - default: - out = formats.StdoutTemplate{Output: info, Template: infoOutputFormat} - } - - formats.Writer(out).Out() - - return nil -} - -// top-level "debug" info -func debugInfo(c *cli.Context) map[string]interface{} { - info := map[string]interface{}{} - info["compiler"] = runtime.Compiler - info["go version"] = runtime.Version() - info["kpod version"] = c.App.Version - info["git commit"] = gitCommit - return info -} diff --git a/cmd/kpod/inspect.go b/cmd/kpod/inspect.go deleted file mode 100644 index 3f9da8d83..000000000 --- a/cmd/kpod/inspect.go +++ /dev/null @@ -1,364 +0,0 @@ -package main - -import ( - "encoding/json" - - specs "github.com/opencontainers/runtime-spec/specs-go" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/cmd/kpod/formats" - "github.com/projectatomic/libpod/libpod" - "github.com/sirupsen/logrus" - "github.com/urfave/cli" -) - -const ( - inspectTypeContainer = "container" - inspectTypeImage = "image" - inspectAll = "all" -) - -var ( - inspectFlags = []cli.Flag{ - cli.StringFlag{ - Name: "type, t", - Value: inspectAll, - Usage: "Return JSON for specified type, (e.g image, container or task)", - }, - cli.StringFlag{ - Name: "format, f", - Usage: "Change the output format to a Go template", - }, - cli.BoolFlag{ - Name: "size", - Usage: "Display total file size if the type is container", - }, - } - inspectDescription = "This displays the low-level information on containers and images identified by name or ID. By default, this will render all results in a JSON array. If the container and image have the same name, this will return container JSON for unspecified type." - inspectCommand = cli.Command{ - Name: "inspect", - Usage: "Displays the configuration of a container or image", - Description: inspectDescription, - Flags: inspectFlags, - Action: inspectCmd, - ArgsUsage: "CONTAINER-OR-IMAGE", - } -) - -func inspectCmd(c *cli.Context) error { - args := c.Args() - if len(args) == 0 { - return errors.Errorf("container or image name must be specified: kpod inspect [options [...]] name") - } - if len(args) > 1 { - return errors.Errorf("too many arguments specified") - } - if err := validateFlags(c, inspectFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "error creating libpod runtime") - } - defer runtime.Shutdown(false) - - if c.String("type") != inspectTypeContainer && c.String("type") != inspectTypeImage && c.String("type") != inspectAll { - return errors.Errorf("the only recognized types are %q, %q, and %q", inspectTypeContainer, inspectTypeImage, inspectAll) - } - - name := args[0] - - outputFormat := c.String("format") - var data interface{} - switch c.String("type") { - case inspectTypeContainer: - ctr, err := runtime.LookupContainer(name) - if err != nil { - return errors.Wrapf(err, "error looking up container %q", name) - } - libpodInspectData, err := ctr.Inspect(c.Bool("size")) - if err != nil { - return errors.Wrapf(err, "error getting libpod container inspect data %q", ctr.ID) - } - data, err = getCtrInspectInfo(ctr, libpodInspectData) - if err != nil { - return errors.Wrapf(err, "error parsing container data %q", ctr.ID()) - } - case inspectTypeImage: - image, err := runtime.GetImage(name) - if err != nil { - return errors.Wrapf(err, "error getting image %q", name) - } - data, err = runtime.GetImageInspectInfo(*image) - if err != nil { - return errors.Wrapf(err, "error parsing image data %q", image.ID) - } - case inspectAll: - ctr, err := runtime.LookupContainer(name) - if err != nil { - image, err := runtime.GetImage(name) - if err != nil { - return errors.Wrapf(err, "error getting image %q", name) - } - data, err = runtime.GetImageInspectInfo(*image) - if err != nil { - return errors.Wrapf(err, "error parsing image data %q", image.ID) - } - } else { - libpodInspectData, err := ctr.Inspect(c.Bool("size")) - if err != nil { - return errors.Wrapf(err, "error getting libpod container inspect data %q", ctr.ID) - } - data, err = getCtrInspectInfo(ctr, libpodInspectData) - if err != nil { - return errors.Wrapf(err, "error parsing container data %q", ctr.ID) - } - } - } - - var out formats.Writer - if outputFormat != "" && outputFormat != formats.JSONString { - //template - out = formats.StdoutTemplate{Output: data, Template: outputFormat} - } else { - // default is json output - out = formats.JSONStruct{Output: data} - } - - formats.Writer(out).Out() - return nil -} - -func getCtrInspectInfo(ctr *libpod.Container, ctrInspectData *libpod.ContainerInspectData) (*ContainerData, error) { - config := ctr.Config() - spec := config.Spec - - cpus, mems, period, quota, realtimePeriod, realtimeRuntime, shares := getCPUInfo(spec) - blkioWeight, blkioWeightDevice, blkioReadBps, blkioWriteBps, blkioReadIOPS, blkioeWriteIOPS := getBLKIOInfo(spec) - memKernel, memReservation, memSwap, memSwappiness, memDisableOOMKiller := getMemoryInfo(spec) - pidsLimit := getPidsInfo(spec) - cgroup := getCgroup(spec) - - var createArtifact createConfig - artifact, err := ctr.GetArtifact("create-config") - if err == nil { - if err := json.Unmarshal(artifact, &createArtifact); err != nil { - return nil, err - } - } else { - logrus.Errorf("couldn't get some inspect information, error getting artifact %q: %v", ctr.ID(), err) - } - - data := &ContainerData{ - CtrInspectData: ctrInspectData, - HostConfig: &HostConfig{ - ConsoleSize: spec.Process.ConsoleSize, - OomScoreAdj: spec.Process.OOMScoreAdj, - CPUShares: shares, - BlkioWeight: blkioWeight, - BlkioWeightDevice: blkioWeightDevice, - BlkioDeviceReadBps: blkioReadBps, - BlkioDeviceWriteBps: blkioWriteBps, - BlkioDeviceReadIOps: blkioReadIOPS, - BlkioDeviceWriteIOps: blkioeWriteIOPS, - CPUPeriod: period, - CPUQuota: quota, - CPURealtimePeriod: realtimePeriod, - CPURealtimeRuntime: realtimeRuntime, - CPUSetCPUs: cpus, - CPUSetMems: mems, - Devices: spec.Linux.Devices, - KernelMemory: memKernel, - MemoryReservation: memReservation, - MemorySwap: memSwap, - MemorySwappiness: memSwappiness, - OomKillDisable: memDisableOOMKiller, - PidsLimit: pidsLimit, - Privileged: spec.Process.NoNewPrivileges, - ReadonlyRootfs: spec.Root.Readonly, - Runtime: ctr.RuntimeName(), - NetworkMode: string(createArtifact.NetMode), - IpcMode: string(createArtifact.IpcMode), - Cgroup: cgroup, - UTSMode: string(createArtifact.UtsMode), - UsernsMode: createArtifact.NsUser, - GroupAdd: spec.Process.User.AdditionalGids, - ContainerIDFile: createArtifact.CidFile, - AutoRemove: createArtifact.Rm, - CapAdd: createArtifact.CapAdd, - CapDrop: createArtifact.CapDrop, - DNS: createArtifact.DNSServers, - DNSOptions: createArtifact.DNSOpt, - DNSSearch: createArtifact.DNSSearch, - PidMode: string(createArtifact.PidMode), - CgroupParent: createArtifact.CgroupParent, - ShmSize: createArtifact.Resources.ShmSize, - Memory: createArtifact.Resources.Memory, - Ulimits: createArtifact.Resources.Ulimit, - SecurityOpt: createArtifact.SecurityOpts, - }, - Config: &CtrConfig{ - Hostname: spec.Hostname, - User: spec.Process.User, - Env: spec.Process.Env, - Image: config.RootfsImageName, - WorkingDir: spec.Process.Cwd, - Labels: config.Labels, - Annotations: spec.Annotations, - Tty: spec.Process.Terminal, - OpenStdin: config.Stdin, - StopSignal: config.StopSignal, - Cmd: config.Spec.Process.Args, - Entrypoint: createArtifact.Entrypoint, - }, - } - return data, nil -} - -func getCPUInfo(spec *specs.Spec) (string, string, *uint64, *int64, *uint64, *int64, *uint64) { - if spec.Linux.Resources == nil { - return "", "", nil, nil, nil, nil, nil - } - cpu := spec.Linux.Resources.CPU - if cpu == nil { - return "", "", nil, nil, nil, nil, nil - } - return cpu.Cpus, cpu.Mems, cpu.Period, cpu.Quota, cpu.RealtimePeriod, cpu.RealtimeRuntime, cpu.Shares -} - -func getBLKIOInfo(spec *specs.Spec) (*uint16, []specs.LinuxWeightDevice, []specs.LinuxThrottleDevice, []specs.LinuxThrottleDevice, []specs.LinuxThrottleDevice, []specs.LinuxThrottleDevice) { - if spec.Linux.Resources == nil { - return nil, nil, nil, nil, nil, nil - } - blkio := spec.Linux.Resources.BlockIO - if blkio == nil { - return nil, nil, nil, nil, nil, nil - } - return blkio.Weight, blkio.WeightDevice, blkio.ThrottleReadBpsDevice, blkio.ThrottleWriteBpsDevice, blkio.ThrottleReadIOPSDevice, blkio.ThrottleWriteIOPSDevice -} - -func getMemoryInfo(spec *specs.Spec) (*int64, *int64, *int64, *uint64, *bool) { - if spec.Linux.Resources == nil { - return nil, nil, nil, nil, nil - } - memory := spec.Linux.Resources.Memory - if memory == nil { - return nil, nil, nil, nil, nil - } - return memory.Kernel, memory.Reservation, memory.Swap, memory.Swappiness, memory.DisableOOMKiller -} - -func getPidsInfo(spec *specs.Spec) *int64 { - if spec.Linux.Resources == nil { - return nil - } - pids := spec.Linux.Resources.Pids - if pids == nil { - return nil - } - return &pids.Limit -} - -func getCgroup(spec *specs.Spec) string { - cgroup := "host" - for _, ns := range spec.Linux.Namespaces { - if ns.Type == specs.CgroupNamespace && ns.Path != "" { - cgroup = "container" - } - } - return cgroup -} - -// ContainerData holds the kpod inspect data for a container -type ContainerData struct { - CtrInspectData *libpod.ContainerInspectData `json:"CtrInspectData"` - HostConfig *HostConfig `json:"HostConfig"` - Config *CtrConfig `json:"Config"` -} - -// LogConfig holds the log information for a container -type LogConfig struct { - Type string `json:"Type"` // TODO - Config map[string]string `json:"Config"` //idk type, TODO -} - -// HostConfig represents the host configuration for the container -type HostConfig struct { - ContainerIDFile string `json:"ContainerIDFile"` - LogConfig *LogConfig `json:"LogConfig"` //TODO - NetworkMode string `json:"NetworkMode"` - PortBindings map[string]struct{} `json:"PortBindings"` //TODO - AutoRemove bool `json:"AutoRemove"` - CapAdd []string `json:"CapAdd"` - CapDrop []string `json:"CapDrop"` - DNS []string `json:"DNS"` - DNSOptions []string `json:"DNSOptions"` - DNSSearch []string `json:"DNSSearch"` - ExtraHosts []string `json:"ExtraHosts"` - GroupAdd []uint32 `json:"GroupAdd"` - IpcMode string `json:"IpcMode"` - Cgroup string `json:"Cgroup"` - OomScoreAdj *int `json:"OomScoreAdj"` - PidMode string `json:"PidMode"` - Privileged bool `json:"Privileged"` - PublishAllPorts bool `json:"PublishAllPorts"` //TODO - ReadonlyRootfs bool `json:"ReadonlyRootfs"` - SecurityOpt []string `json:"SecurityOpt"` - UTSMode string `json:"UTSMode"` - UsernsMode string `json:"UsernsMode"` - ShmSize string `json:"ShmSize"` - Runtime string `json:"Runtime"` - ConsoleSize *specs.Box `json:"ConsoleSize"` - Isolation string `json:"Isolation"` //TODO - CPUShares *uint64 `json:"CPUSShares"` - Memory int64 `json:"Memory"` - NanoCPUs int `json:"NanoCPUs"` //check type, TODO - CgroupParent string `json:"CgroupParent"` - BlkioWeight *uint16 `json:"BlkioWeight"` - BlkioWeightDevice []specs.LinuxWeightDevice `json:"BlkioWeightDevice"` - BlkioDeviceReadBps []specs.LinuxThrottleDevice `json:"BlkioDeviceReadBps"` - BlkioDeviceWriteBps []specs.LinuxThrottleDevice `json:"BlkioDeviceWriteBps"` - BlkioDeviceReadIOps []specs.LinuxThrottleDevice `json:"BlkioDeviceReadIOps"` - BlkioDeviceWriteIOps []specs.LinuxThrottleDevice `json:"BlkioDeviceWriteIOps"` - CPUPeriod *uint64 `json:"CPUPeriod"` - CPUQuota *int64 `json:"CPUQuota"` - CPURealtimePeriod *uint64 `json:"CPURealtimePeriod"` - CPURealtimeRuntime *int64 `json:"CPURealtimeRuntime"` - CPUSetCPUs string `json:"CPUSetCPUs"` - CPUSetMems string `json:"CPUSetMems"` - Devices []specs.LinuxDevice `json:"Devices"` - DiskQuota int `json:"DiskQuota"` //check type, TODO - KernelMemory *int64 `json:"KernelMemory"` - MemoryReservation *int64 `json:"MemoryReservation"` - MemorySwap *int64 `json:"MemorySwap"` - MemorySwappiness *uint64 `json:"MemorySwappiness"` - OomKillDisable *bool `json:"OomKillDisable"` - PidsLimit *int64 `json:"PidsLimit"` - Ulimits []string `json:"Ulimits"` - CPUCount int `json:"CPUCount"` //check type, TODO - CPUPercent int `json:"CPUPercent"` //check type, TODO - IOMaximumIOps int `json:"IOMaximumIOps"` //check type, TODO - IOMaximumBandwidth int `json:"IOMaximumBandwidth"` //check type, TODO -} - -// CtrConfig holds information about the container configuration -type CtrConfig struct { - Hostname string `json:"Hostname"` - DomainName string `json:"Domainname"` //TODO - User specs.User `json:"User"` - AttachStdin bool `json:"AttachStdin"` //TODO - AttachStdout bool `json:"AttachStdout"` //TODO - AttachStderr bool `json:"AttachStderr"` //TODO - Tty bool `json:"Tty"` - OpenStdin bool `json:"OpenStdin"` - StdinOnce bool `json:"StdinOnce"` //TODO - Env []string `json:"Env"` - Cmd []string `json:"Cmd"` - Image string `json:"Image"` - Volumes map[string]struct{} `json:"Volumes"` - WorkingDir string `json:"WorkingDir"` - Entrypoint string `json:"Entrypoint"` - Labels map[string]string `json:"Labels"` - Annotations map[string]string `json:"Annotations"` - StopSignal uint `json:"StopSignal"` -} diff --git a/cmd/kpod/kill.go b/cmd/kpod/kill.go deleted file mode 100644 index 776c7ef20..000000000 --- a/cmd/kpod/kill.go +++ /dev/null @@ -1,80 +0,0 @@ -package main - -import ( - "fmt" - "os" - "syscall" - - "github.com/docker/docker/pkg/signal" - "github.com/pkg/errors" - "github.com/urfave/cli" -) - -var ( - killFlags = []cli.Flag{ - cli.StringFlag{ - Name: "signal, s", - Usage: "Signal to send to the container", - Value: "KILL", - }, - } - killDescription = "The main process inside each container specified will be sent SIGKILL, or any signal specified with option --signal." - killCommand = cli.Command{ - Name: "kill", - Usage: "Kill one or more running containers with a specific signal", - Description: killDescription, - Flags: killFlags, - Action: killCmd, - ArgsUsage: "[CONTAINER_NAME_OR_ID]", - } -) - -// killCmd kills one or more containers with a signal -func killCmd(c *cli.Context) error { - args := c.Args() - if len(args) == 0 { - return errors.Errorf("specify one or more containers to kill") - } - if err := validateFlags(c, killFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - var killSignal uint = uint(syscall.SIGTERM) - if c.String("signal") != "" { - // Check if the signalString provided by the user is valid - // Invalid signals will return err - sysSignal, err := signal.ParseSignal(c.String("signal")) - if err != nil { - return err - } - killSignal = uint(sysSignal) - } - - var lastError error - for _, container := range c.Args() { - ctr, err := runtime.LookupContainer(container) - if err != nil { - if lastError != nil { - fmt.Fprintln(os.Stderr, lastError) - } - lastError = errors.Wrapf(err, "unable to find container %v", container) - continue - } - - if err := ctr.Kill(killSignal); err != nil { - if lastError != nil { - fmt.Fprintln(os.Stderr, lastError) - } - lastError = errors.Wrapf(err, "unable to find container %v", container) - } else { - fmt.Println(ctr.ID()) - } - } - return lastError -} diff --git a/cmd/kpod/load.go b/cmd/kpod/load.go deleted file mode 100644 index 5ae75a7a2..000000000 --- a/cmd/kpod/load.go +++ /dev/null @@ -1,123 +0,0 @@ -package main - -import ( - "fmt" - "io" - "io/ioutil" - "os" - - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/urfave/cli" -) - -var ( - loadFlags = []cli.Flag{ - cli.StringFlag{ - Name: "input, i", - Usage: "Read from archive file, default is STDIN", - Value: "/dev/stdin", - }, - cli.BoolFlag{ - Name: "quiet, q", - Usage: "Suppress the output", - }, - cli.StringFlag{ - Name: "signature-policy", - Usage: "`pathname` of signature policy file (not usually used)", - }, - } - loadDescription = "Loads the image from docker-archive stored on the local machine." - loadCommand = cli.Command{ - Name: "load", - Usage: "load an image from docker archive", - Description: loadDescription, - Flags: loadFlags, - Action: loadCmd, - ArgsUsage: "", - } -) - -// loadCmd gets the image/file to be loaded from the command line -// and calls loadImage to load the image to containers-storage -func loadCmd(c *cli.Context) error { - - args := c.Args() - var image string - if len(args) == 1 { - image = args[0] - } - if len(args) > 1 { - return errors.New("too many arguments. Requires exactly 1") - } - if err := validateFlags(c, loadFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - input := c.String("input") - - if input == "/dev/stdin" { - fi, err := os.Stdin.Stat() - if err != nil { - return err - } - // checking if loading from pipe - if !fi.Mode().IsRegular() { - outFile, err := ioutil.TempFile("/var/tmp", "kpod") - if err != nil { - return errors.Errorf("error creating file %v", err) - } - defer outFile.Close() - defer os.Remove(outFile.Name()) - - inFile, err := os.OpenFile(input, 0, 0666) - if err != nil { - return errors.Errorf("error reading file %v", err) - } - defer inFile.Close() - - _, err = io.Copy(outFile, inFile) - if err != nil { - return errors.Errorf("error copying file %v", err) - } - - input = outFile.Name() - } - } - - var writer io.Writer - if !c.Bool("quiet") { - writer = os.Stdout - } - - options := libpod.CopyOptions{ - SignaturePolicyPath: c.String("signature-policy"), - Writer: writer, - } - - src := libpod.DockerArchive + ":" + input - imgName, err := runtime.PullImage(src, options) - if err != nil { - // generate full src name with specified image:tag - fullSrc := libpod.OCIArchive + ":" + input - if image != "" { - fullSrc = fullSrc + ":" + image - } - imgName, err = runtime.PullImage(fullSrc, options) - if err != nil { - src = libpod.DirTransport + ":" + input - imgName, err = runtime.PullImage(src, options) - if err != nil { - return errors.Wrapf(err, "error pulling %q", src) - } - } - } - fmt.Println("Loaded image: ", imgName) - return nil -} diff --git a/cmd/kpod/login.go b/cmd/kpod/login.go deleted file mode 100644 index 8984d069c..000000000 --- a/cmd/kpod/login.go +++ /dev/null @@ -1,110 +0,0 @@ -package main - -import ( - "bufio" - "context" - "fmt" - "os" - "strings" - - "github.com/containers/image/docker" - "github.com/containers/image/pkg/docker/config" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod/common" - "github.com/urfave/cli" - "golang.org/x/crypto/ssh/terminal" -) - -var ( - loginFlags = []cli.Flag{ - cli.StringFlag{ - Name: "password, p", - Usage: "Password for registry", - }, - cli.StringFlag{ - Name: "username, u", - Usage: "Username for registry", - }, - cli.StringFlag{ - Name: "authfile", - Usage: "Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json", - }, - } - loginDescription = "Login to a container registry on a specified server." - loginCommand = cli.Command{ - Name: "login", - Usage: "login to a container registry", - Description: loginDescription, - Flags: loginFlags, - Action: loginCmd, - ArgsUsage: "REGISTRY", - } -) - -// loginCmd uses the authentication package to store a user's authenticated credentials -// in an auth.json file for future use -func loginCmd(c *cli.Context) error { - args := c.Args() - if len(args) > 1 { - return errors.Errorf("too many arguments, login takes only 1 argument") - } - if len(args) == 0 { - return errors.Errorf("registry must be given") - } - var server string - if len(args) == 1 { - server = args[0] - } - - sc := common.GetSystemContext("", c.String("authfile"), false) - - // username of user logged in to server (if one exists) - userFromAuthFile := config.GetUserLoggedIn(sc, server) - username, password, err := getUserAndPass(c.String("username"), c.String("password"), userFromAuthFile) - if err != nil { - return errors.Wrapf(err, "error getting username and password") - } - - if err = docker.CheckAuth(context.TODO(), sc, username, password, server); err == nil { - if err := config.SetAuthentication(sc, server, username, password); err != nil { - return err - } - } - switch err { - case nil: - fmt.Println("Login Succeeded!") - return nil - case docker.ErrUnauthorizedForCredentials: - return errors.Errorf("error logging into %q: invalid username/password\n", server) - default: - return errors.Wrapf(err, "error authenticating creds for %q", server) - } -} - -// getUserAndPass gets the username and password from STDIN if not given -// using the -u and -p flags -func getUserAndPass(username, password, userFromAuthFile string) (string, string, error) { - var err error - reader := bufio.NewReader(os.Stdin) - if username == "" { - if userFromAuthFile != "" { - fmt.Printf("Username (%s): ", userFromAuthFile) - } else { - fmt.Print("Username: ") - } - username, err = reader.ReadString('\n') - if err != nil { - return "", "", errors.Wrapf(err, "error reading username") - } - } - if password == "" { - fmt.Print("Password: ") - pass, err := terminal.ReadPassword(0) - if err != nil { - return "", "", errors.Wrapf(err, "error reading password") - } - password = string(pass) - fmt.Println() - } - return strings.TrimSpace(username), password, err -} diff --git a/cmd/kpod/logout.go b/cmd/kpod/logout.go deleted file mode 100644 index cae8ddfb2..000000000 --- a/cmd/kpod/logout.go +++ /dev/null @@ -1,69 +0,0 @@ -package main - -import ( - "fmt" - - "github.com/containers/image/pkg/docker/config" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod/common" - "github.com/urfave/cli" -) - -var ( - logoutFlags = []cli.Flag{ - cli.StringFlag{ - Name: "authfile", - Usage: "Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json", - }, - cli.BoolFlag{ - Name: "all, a", - Usage: "Remove the cached credentials for all registries in the auth file", - }, - } - logoutDescription = "Remove the cached username and password for the registry." - logoutCommand = cli.Command{ - Name: "logout", - Usage: "logout of a container registry", - Description: logoutDescription, - Flags: logoutFlags, - Action: logoutCmd, - ArgsUsage: "REGISTRY", - } -) - -// logoutCmd uses the authentication package to remove the authenticated of a registry -// stored in the auth.json file -func logoutCmd(c *cli.Context) error { - args := c.Args() - if len(args) > 1 { - return errors.Errorf("too many arguments, logout takes only 1 argument") - } - if len(args) == 0 { - return errors.Errorf("registry must be given") - } - var server string - if len(args) == 1 { - server = args[0] - } - - sc := common.GetSystemContext("", c.String("authfile"), false) - - if c.Bool("all") { - if err := config.RemoveAllAuthentication(sc); err != nil { - return err - } - fmt.Println("Remove login credentials for all registries") - return nil - } - - err := config.RemoveAuthentication(sc, server) - switch err { - case nil: - fmt.Printf("Remove login credentials for %s\n", server) - return nil - case config.ErrNotLoggedIn: - return errors.Errorf("Not logged into %s\n", server) - default: - return errors.Wrapf(err, "error logging out of %q", server) - } -} diff --git a/cmd/kpod/logs.go b/cmd/kpod/logs.go deleted file mode 100644 index 726ba4a65..000000000 --- a/cmd/kpod/logs.go +++ /dev/null @@ -1,153 +0,0 @@ -package main - -import ( - "fmt" - "strings" - "time" - - "github.com/hpcloud/tail" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/urfave/cli" -) - -type logOptions struct { - details bool - follow bool - sinceTime time.Time - tail uint64 -} - -var ( - logsFlags = []cli.Flag{ - cli.BoolFlag{ - Name: "details", - Usage: "Show extra details provided to the logs", - Hidden: true, - }, - cli.BoolFlag{ - Name: "follow, f", - Usage: "Follow log output. The default is false", - }, - cli.StringFlag{ - Name: "since", - Usage: "Show logs since TIMESTAMP", - }, - cli.Uint64Flag{ - Name: "tail", - Usage: "Output the specified number of LINES at the end of the logs. Defaults to 0, which prints all lines", - }, - } - logsDescription = "The kpod logs command batch-retrieves whatever logs are present for a container at the time of execution. This does not guarantee execution" + - "order when combined with kpod run (i.e. your run may not have generated any logs at the time you execute kpod logs" - logsCommand = cli.Command{ - Name: "logs", - Usage: "Fetch the logs of a container", - Description: logsDescription, - Flags: logsFlags, - Action: logsCmd, - ArgsUsage: "CONTAINER", - } -) - -func logsCmd(c *cli.Context) error { - if err := validateFlags(c, logsFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - args := c.Args() - if len(args) != 1 { - return errors.Errorf("'kpod logs' requires exactly one container name/ID") - } - - sinceTime := time.Time{} - if c.IsSet("since") { - // parse time, error out if something is wrong - since, err := time.Parse("2006-01-02T15:04:05.999999999-07:00", c.String("since")) - if err != nil { - return errors.Wrapf(err, "could not parse time: %q", c.String("since")) - } - sinceTime = since - } - - opts := logOptions{ - details: c.Bool("details"), - follow: c.Bool("follow"), - sinceTime: sinceTime, - tail: c.Uint64("tail"), - } - - ctr, err := runtime.LookupContainer(args[0]) - if err != nil { - return err - } - - logs := make(chan string) - go func() { - err = getLogs(ctr, logs, opts) - }() - printLogs(logs) - return err -} - -// getLogs returns the logs of a container from the log file -// log file is created when the container is started/ran -func getLogs(container *libpod.Container, logChan chan string, opts logOptions) error { - defer close(logChan) - - seekInfo := &tail.SeekInfo{Offset: 0, Whence: 0} - if opts.tail > 0 { - // seek to correct position in log files - seekInfo.Offset = int64(opts.tail) - seekInfo.Whence = 2 - } - - t, err := tail.TailFile(container.LogPath(), tail.Config{Follow: opts.follow, ReOpen: false, Location: seekInfo}) - for line := range t.Lines { - if since, err := logSinceTime(opts.sinceTime, line.Text); err != nil || !since { - continue - } - logMessage := line.Text[secondSpaceIndex(line.Text):] - logChan <- logMessage - } - return err -} - -func printLogs(logs chan string) { - for line := range logs { - fmt.Println(line) - } -} - -// returns true if the time stamps of the logs are equal to or after the -// timestamp comparing to -func logSinceTime(sinceTime time.Time, logStr string) (bool, error) { - timestamp := strings.Split(logStr, " ")[0] - logTime, err := time.Parse("2006-01-02T15:04:05.999999999-07:00", timestamp) - if err != nil { - return false, err - } - return logTime.After(sinceTime) || logTime.Equal(sinceTime), nil -} - -// secondSpaceIndex returns the index of the second space in a string -// In a line of the logs, the first two tokens are a timestamp and stdout/stderr, -// followed by the message itself. This allows us to get the index of the message -// and avoid sending the other information back to the caller of GetLogs() -func secondSpaceIndex(line string) int { - index := strings.Index(line, " ") - if index == -1 { - return 0 - } - index = strings.Index(line[index:], " ") - if index == -1 { - return 0 - } - return index -} diff --git a/cmd/kpod/main.go b/cmd/kpod/main.go deleted file mode 100644 index a2a81c8b6..000000000 --- a/cmd/kpod/main.go +++ /dev/null @@ -1,161 +0,0 @@ -package main - -import ( - "fmt" - "os" - "runtime/pprof" - - "github.com/containers/storage/pkg/reexec" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "github.com/urfave/cli" -) - -// This is populated by the Makefile from the VERSION file -// in the repository -var kpodVersion = "" - -func main() { - debug := false - cpuProfile := false - - if reexec.Init() { - return - } - - app := cli.NewApp() - app.Name = "kpod" - app.Usage = "manage pods and images" - - var v string - if kpodVersion != "" { - v = kpodVersion - } - app.Version = v - - app.Commands = []cli.Command{ - attachCommand, - createCommand, - diffCommand, - execCommand, - exportCommand, - historyCommand, - imagesCommand, - importCommand, - infoCommand, - inspectCommand, - killCommand, - loadCommand, - loginCommand, - logoutCommand, - logsCommand, - mountCommand, - pauseCommand, - psCommand, - pullCommand, - pushCommand, - rmCommand, - rmiCommand, - runCommand, - saveCommand, - startCommand, - statsCommand, - stopCommand, - tagCommand, - topCommand, - umountCommand, - unpauseCommand, - versionCommand, - waitCommand, - } - app.Before = func(c *cli.Context) error { - logLevel := c.GlobalString("log-level") - if logLevel != "" { - level, err := logrus.ParseLevel(logLevel) - if err != nil { - return err - } - - logrus.SetLevel(level) - } - - if logLevel == "debug" { - debug = true - - } - if c.GlobalIsSet("cpu-profile") { - f, err := os.Create(c.GlobalString("cpu-profile")) - if err != nil { - return errors.Wrapf(err, "unable to create cpu profiling file %s", - c.GlobalString("cpu-profile")) - } - cpuProfile = true - pprof.StartCPUProfile(f) - } - return nil - } - app.After = func(*cli.Context) error { - // called by Run() when the command handler succeeds - shutdownStores() - if cpuProfile { - pprof.StopCPUProfile() - } - return nil - } - cli.OsExiter = func(code int) { - // called by Run() when the command fails, bypassing After() - shutdownStores() - os.Exit(code) - } - app.Flags = []cli.Flag{ - cli.StringFlag{ - Name: "cni-config-dir", - Usage: "path of the configuration directory for CNI networks", - }, - cli.StringFlag{ - Name: "config, c", - Usage: "path of a config file detailing container server configuration options", - }, - cli.StringFlag{ - Name: "conmon", - Usage: "path of the conmon binary", - }, - cli.StringFlag{ - Name: "cpu-profile", - Usage: "path for the cpu profiling results", - }, - cli.StringFlag{ - Name: "log-level", - Usage: "log messages above specified level: debug, info, warn, error (default), fatal or panic", - Value: "error", - }, - cli.StringFlag{ - Name: "root", - Usage: "path to the root directory in which data, including images, is stored", - }, - cli.StringFlag{ - Name: "runroot", - Usage: "path to the 'run directory' where all state information is stored", - }, - cli.StringFlag{ - Name: "runtime", - Usage: "path to the OCI-compatible binary used to run containers, default is /usr/bin/runc", - }, - cli.StringFlag{ - Name: "storage-driver, s", - Usage: "select which storage driver is used to manage storage of images and containers (default is overlay)", - }, - cli.StringSliceFlag{ - Name: "storage-opt", - Usage: "used to pass an option to the storage driver", - }, - } - if err := app.Run(os.Args); err != nil { - if debug { - logrus.Errorf(err.Error()) - } else { - fmt.Fprintln(os.Stderr, err.Error()) - } - cli.OsExiter(1) - } -} diff --git a/cmd/kpod/mount.go b/cmd/kpod/mount.go deleted file mode 100644 index e90f54537..000000000 --- a/cmd/kpod/mount.go +++ /dev/null @@ -1,125 +0,0 @@ -package main - -import ( - js "encoding/json" - "fmt" - - "github.com/pkg/errors" - of "github.com/projectatomic/libpod/cmd/kpod/formats" - "github.com/urfave/cli" -) - -var ( - mountDescription = ` - kpod mount - Lists all mounted containers mount points - - kpod mount CONTAINER-NAME-OR-ID - Mounts the specified container and outputs the mountpoint -` - - mountFlags = []cli.Flag{ - cli.BoolFlag{ - Name: "notruncate", - Usage: "do not truncate output", - }, - cli.StringFlag{ - Name: "label", - Usage: "SELinux label for the mount point", - }, - cli.StringFlag{ - Name: "format", - Usage: "Change the output format to Go template", - }, - } - mountCommand = cli.Command{ - Name: "mount", - Usage: "Mount a working container's root filesystem", - Description: mountDescription, - Action: mountCmd, - ArgsUsage: "[CONTAINER-NAME-OR-ID]", - Flags: mountFlags, - } -) - -// jsonMountPoint stores info about each container -type jsonMountPoint struct { - ID string `json:"id"` - Names []string `json:"names"` - MountPoint string `json:"mountpoint"` -} - -func mountCmd(c *cli.Context) error { - if err := validateFlags(c, mountFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - formats := map[string]bool{ - "": true, - of.JSONString: true, - } - - args := c.Args() - json := c.String("format") == of.JSONString - if !formats[c.String("format")] { - return errors.Errorf("%q is not a supported format", c.String("format")) - } - - if len(args) > 1 { - return errors.Errorf("too many arguments specified") - } - - if len(args) == 1 { - if json { - return errors.Wrapf(err, "json option can not be used with a container id") - } - ctr, err := runtime.LookupContainer(args[0]) - if err != nil { - return errors.Wrapf(err, "error looking up container %q", args[0]) - } - mountPoint, err := ctr.Mount(c.String("label")) - if err != nil { - return errors.Wrapf(err, "error mounting container %q", ctr.ID()) - } - fmt.Printf("%s\n", mountPoint) - } else { - jsonMountPoints := []jsonMountPoint{} - containers, err2 := runtime.GetContainers() - if err2 != nil { - return errors.Wrapf(err2, "error reading list of all containers") - } - for _, container := range containers { - mountPoint, err := container.MountPoint() - if err != nil { - return errors.Wrapf(err, "error getting mountpoint for %q", container.ID()) - } - if mountPoint == "" { - continue - } - if json { - jsonMountPoints = append(jsonMountPoints, jsonMountPoint{ID: container.ID(), Names: []string{container.Name()}, MountPoint: mountPoint}) - continue - } - - if c.Bool("notruncate") { - fmt.Printf("%-64s %s\n", container.ID(), mountPoint) - } else { - fmt.Printf("%-12.12s %s\n", container.ID(), mountPoint) - } - } - if json { - data, err := js.MarshalIndent(jsonMountPoints, "", " ") - if err != nil { - return err - } - fmt.Printf("%s\n", data) - } - } - return nil -} diff --git a/cmd/kpod/parse.go b/cmd/kpod/parse.go deleted file mode 100644 index 53d49c36c..000000000 --- a/cmd/kpod/parse.go +++ /dev/null @@ -1,863 +0,0 @@ -//nolint -// most of these validate and parse functions have been taken from projectatomic/docker -// and modified for cri-o -package main - -import ( - "bufio" - "bytes" - "encoding/json" - "fmt" - "io/ioutil" - "net" - "os" - "os/user" - "path" - "regexp" - "strconv" - "strings" - - units "github.com/docker/go-units" - specs "github.com/opencontainers/runtime-spec/specs-go" - "github.com/pkg/errors" - pb "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime" -) - -// Note: for flags that are in the form , use the RAMInBytes function -// from the units package in docker/go-units/size.go - -var ( - whiteSpaces = " \t" - alphaRegexp = regexp.MustCompile(`[a-zA-Z]`) - domainRegexp = regexp.MustCompile(`^(:?(:?[a-zA-Z0-9]|(:?[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]))(:?\.(:?[a-zA-Z0-9]|(:?[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])))*)\.?\s*$`) -) - -// validateExtraHost validates that the specified string is a valid extrahost and returns it. -// ExtraHost is in the form of name:ip where the ip has to be a valid ip (ipv4 or ipv6). -// for add-host flag -func validateExtraHost(val string) (string, error) { //nolint - // allow for IPv6 addresses in extra hosts by only splitting on first ":" - arr := strings.SplitN(val, ":", 2) - if len(arr) != 2 || len(arr[0]) == 0 { - return "", fmt.Errorf("bad format for add-host: %q", val) - } - if _, err := validateIPAddress(arr[1]); err != nil { - return "", fmt.Errorf("invalid IP address in add-host: %q", arr[1]) - } - return val, nil -} - -// validateIPAddress validates an Ip address. -// for dns, ip, and ip6 flags also -func validateIPAddress(val string) (string, error) { - var ip = net.ParseIP(strings.TrimSpace(val)) - if ip != nil { - return ip.String(), nil - } - return "", fmt.Errorf("%s is not an ip address", val) -} - -// validateAttach validates that the specified string is a valid attach option. -// for attach flag -func validateAttach(val string) (string, error) { //nolint - s := strings.ToLower(val) - for _, str := range []string{"stdin", "stdout", "stderr"} { - if s == str { - return s, nil - } - } - return val, fmt.Errorf("valid streams are STDIN, STDOUT and STDERR") -} - -// validate the blkioWeight falls in the range of 10 to 1000 -// for blkio-weight flag -func validateBlkioWeight(val int64) (int64, error) { //nolint - if val >= 10 && val <= 1000 { - return val, nil - } - return -1, errors.Errorf("invalid blkio weight %q, should be between 10 and 1000", val) -} - -// weightDevice is a structure that holds device:weight pair -type weightDevice struct { - path string - weight uint16 -} - -func (w *weightDevice) String() string { - return fmt.Sprintf("%s:%d", w.path, w.weight) -} - -// validateweightDevice validates that the specified string has a valid device-weight format -// for blkio-weight-device flag -func validateweightDevice(val string) (*weightDevice, error) { - split := strings.SplitN(val, ":", 2) - if len(split) != 2 { - return nil, fmt.Errorf("bad format: %s", val) - } - if !strings.HasPrefix(split[0], "/dev/") { - return nil, fmt.Errorf("bad format for device path: %s", val) - } - weight, err := strconv.ParseUint(split[1], 10, 0) - if err != nil { - return nil, fmt.Errorf("invalid weight for device: %s", val) - } - if weight > 0 && (weight < 10 || weight > 1000) { - return nil, fmt.Errorf("invalid weight for device: %s", val) - } - - return &weightDevice{ - path: split[0], - weight: uint16(weight), - }, nil -} - -// parseDevice parses a device mapping string to a container.DeviceMapping struct -// for device flag -func parseDevice(device string) (*pb.Device, error) { //nolint - _, err := validateDevice(device) - if err != nil { - return nil, errors.Wrapf(err, "device string not valid %q", device) - } - - src := "" - dst := "" - permissions := "rwm" - arr := strings.Split(device, ":") - switch len(arr) { - case 3: - permissions = arr[2] - fallthrough - case 2: - if validDeviceMode(arr[1]) { - permissions = arr[1] - } else { - dst = arr[1] - } - fallthrough - case 1: - src = arr[0] - default: - return nil, fmt.Errorf("invalid device specification: %s", device) - } - - if dst == "" { - dst = src - } - - deviceMapping := &pb.Device{ - ContainerPath: dst, - HostPath: src, - Permissions: permissions, - } - return deviceMapping, nil -} - -// validDeviceMode checks if the mode for device is valid or not. -// Valid mode is a composition of r (read), w (write), and m (mknod). -func validDeviceMode(mode string) bool { - var legalDeviceMode = map[rune]bool{ - 'r': true, - 'w': true, - 'm': true, - } - if mode == "" { - return false - } - for _, c := range mode { - if !legalDeviceMode[c] { - return false - } - legalDeviceMode[c] = false - } - return true -} - -// validateDevice validates a path for devices -// It will make sure 'val' is in the form: -// [host-dir:]container-path[:mode] -// It also validates the device mode. -func validateDevice(val string) (string, error) { - return validatePath(val, validDeviceMode) -} - -func validatePath(val string, validator func(string) bool) (string, error) { - var containerPath string - var mode string - - if strings.Count(val, ":") > 2 { - return val, fmt.Errorf("bad format for path: %s", val) - } - - split := strings.SplitN(val, ":", 3) - if split[0] == "" { - return val, fmt.Errorf("bad format for path: %s", val) - } - switch len(split) { - case 1: - containerPath = split[0] - val = path.Clean(containerPath) - case 2: - if isValid := validator(split[1]); isValid { - containerPath = split[0] - mode = split[1] - val = fmt.Sprintf("%s:%s", path.Clean(containerPath), mode) - } else { - containerPath = split[1] - val = fmt.Sprintf("%s:%s", split[0], path.Clean(containerPath)) - } - case 3: - containerPath = split[1] - mode = split[2] - if isValid := validator(split[2]); !isValid { - return val, fmt.Errorf("bad mode specified: %s", mode) - } - val = fmt.Sprintf("%s:%s:%s", split[0], containerPath, mode) - } - - if !path.IsAbs(containerPath) { - return val, fmt.Errorf("%s is not an absolute path", containerPath) - } - return val, nil -} - -// throttleDevice is a structure that holds device:rate_per_second pair -type throttleDevice struct { - path string - rate uint64 -} - -func (t *throttleDevice) String() string { - return fmt.Sprintf("%s:%d", t.path, t.rate) -} - -// validateBpsDevice validates that the specified string has a valid device-rate format -// for device-read-bps and device-write-bps flags -func validateBpsDevice(val string) (*throttleDevice, error) { - split := strings.SplitN(val, ":", 2) - if len(split) != 2 { - return nil, fmt.Errorf("bad format: %s", val) - } - if !strings.HasPrefix(split[0], "/dev/") { - return nil, fmt.Errorf("bad format for device path: %s", val) - } - rate, err := units.RAMInBytes(split[1]) - if err != nil { - return nil, fmt.Errorf("invalid rate for device: %s. The correct format is :[]. Number must be a positive integer. Unit is optional and can be kb, mb, or gb", val) - } - if rate < 0 { - return nil, fmt.Errorf("invalid rate for device: %s. The correct format is :[]. Number must be a positive integer. Unit is optional and can be kb, mb, or gb", val) - } - - return &throttleDevice{ - path: split[0], - rate: uint64(rate), - }, nil -} - -// validateIOpsDevice validates that the specified string has a valid device-rate format -// for device-write-iops and device-read-iops flags -func validateIOpsDevice(val string) (*throttleDevice, error) { //nolint - split := strings.SplitN(val, ":", 2) - if len(split) != 2 { - return nil, fmt.Errorf("bad format: %s", val) - } - if !strings.HasPrefix(split[0], "/dev/") { - return nil, fmt.Errorf("bad format for device path: %s", val) - } - rate, err := strconv.ParseUint(split[1], 10, 64) - if err != nil { - return nil, fmt.Errorf("invalid rate for device: %s. The correct format is :. Number must be a positive integer", val) - } - if rate < 0 { - return nil, fmt.Errorf("invalid rate for device: %s. The correct format is :. Number must be a positive integer", val) - } - - return &throttleDevice{ - path: split[0], - rate: uint64(rate), - }, nil -} - -// validateDNSSearch validates domain for resolvconf search configuration. -// A zero length domain is represented by a dot (.). -// for dns-search flag -func validateDNSSearch(val string) (string, error) { //nolint - if val = strings.Trim(val, " "); val == "." { - return val, nil - } - return validateDomain(val) -} - -func validateDomain(val string) (string, error) { - if alphaRegexp.FindString(val) == "" { - return "", fmt.Errorf("%s is not a valid domain", val) - } - ns := domainRegexp.FindSubmatch([]byte(val)) - if len(ns) > 0 && len(ns[1]) < 255 { - return string(ns[1]), nil - } - return "", fmt.Errorf("%s is not a valid domain", val) -} - -// validateEnv validates an environment variable and returns it. -// If no value is specified, it returns the current value using os.Getenv. -// for env flag -func validateEnv(val string) (string, error) { //nolint - arr := strings.Split(val, "=") - if len(arr) > 1 { - return val, nil - } - if !doesEnvExist(val) { - return val, nil - } - return fmt.Sprintf("%s=%s", val, os.Getenv(val)), nil -} - -func doesEnvExist(name string) bool { - for _, entry := range os.Environ() { - parts := strings.SplitN(entry, "=", 2) - if parts[0] == name { - return true - } - } - return false -} - -// reads a file of line terminated key=value pairs, and overrides any keys -// present in the file with additional pairs specified in the override parameter -// for env-file and labels-file flags -func readKVStrings(env map[string]string, files []string, override []string) error { - for _, ef := range files { - if err := parseEnvFile(env, ef); err != nil { - return err - } - } - for _, line := range override { - if err := parseEnv(env, line); err != nil { - return err - } - } - return nil -} - -func parseEnv(env map[string]string, line string) error { - data := strings.SplitN(line, "=", 2) - - // trim the front of a variable, but nothing else - name := strings.TrimLeft(data[0], whiteSpaces) - if strings.ContainsAny(name, whiteSpaces) { - return errors.Errorf("name %q has white spaces, poorly formatted name", name) - } - - if len(data) > 1 { - env[name] = data[1] - } else { - // if only a pass-through variable is given, clean it up. - val, exists := os.LookupEnv(name) - if !exists { - return errors.Errorf("environment variable %q does not exist", name) - } - env[name] = val - } - return nil -} - -// parseEnvFile reads a file with environment variables enumerated by lines -func parseEnvFile(env map[string]string, filename string) error { - fh, err := os.Open(filename) - if err != nil { - return err - } - defer fh.Close() - - scanner := bufio.NewScanner(fh) - for scanner.Scan() { - // trim the line from all leading whitespace first - line := strings.TrimLeft(scanner.Text(), whiteSpaces) - // line is not empty, and not starting with '#' - if len(line) > 0 && !strings.HasPrefix(line, "#") { - if err := parseEnv(env, line); err != nil { - return err - } - } - } - return scanner.Err() -} - -// NsIpc represents the container ipc stack. -// for ipc flag -type NsIpc string - -// IsPrivate indicates whether the container uses its private ipc stack. -func (n NsIpc) IsPrivate() bool { - return !(n.IsHost() || n.IsContainer()) -} - -// IsHost indicates whether the container uses the host's ipc stack. -func (n NsIpc) IsHost() bool { - return n == "host" -} - -// IsContainer indicates whether the container uses a container's ipc stack. -func (n NsIpc) IsContainer() bool { - parts := strings.SplitN(string(n), ":", 2) - return len(parts) > 1 && parts[0] == "container" -} - -// Valid indicates whether the ipc stack is valid. -func (n NsIpc) Valid() bool { - parts := strings.Split(string(n), ":") - switch mode := parts[0]; mode { - case "", "host": - case "container": - if len(parts) != 2 || parts[1] == "" { - return false - } - default: - return false - } - return true -} - -// Container returns the name of the container ipc stack is going to be used. -func (n NsIpc) Container() string { - parts := strings.SplitN(string(n), ":", 2) - if len(parts) > 1 { - return parts[1] - } - return "" -} - -// validateLabel validates that the specified string is a valid label, and returns it. -// Labels are in the form on key=value. -// for label flag -func validateLabel(val string) (string, error) { //nolint - if strings.Count(val, "=") < 1 { - return "", fmt.Errorf("bad attribute format: %s", val) - } - return val, nil -} - -// validateMACAddress validates a MAC address. -// for mac-address flag -func validateMACAddress(val string) (string, error) { //nolint - _, err := net.ParseMAC(strings.TrimSpace(val)) - if err != nil { - return "", err - } - return val, nil -} - -// parseLoggingOpts validates the logDriver and logDriverOpts -// for log-opt and log-driver flags -func parseLoggingOpts(logDriver string, logDriverOpt []string) (map[string]string, error) { //nolint - logOptsMap := convertKVStringsToMap(logDriverOpt) - if logDriver == "none" && len(logDriverOpt) > 0 { - return map[string]string{}, errors.Errorf("invalid logging opts for driver %s", logDriver) - } - return logOptsMap, nil -} - -// NsPid represents the pid namespace of the container. -//for pid flag -type NsPid string - -// IsPrivate indicates whether the container uses its own new pid namespace. -func (n NsPid) IsPrivate() bool { - return !(n.IsHost() || n.IsContainer()) -} - -// IsHost indicates whether the container uses the host's pid namespace. -func (n NsPid) IsHost() bool { - return n == "host" -} - -// IsContainer indicates whether the container uses a container's pid namespace. -func (n NsPid) IsContainer() bool { - parts := strings.SplitN(string(n), ":", 2) - return len(parts) > 1 && parts[0] == "container" -} - -// Valid indicates whether the pid namespace is valid. -func (n NsPid) Valid() bool { - parts := strings.Split(string(n), ":") - switch mode := parts[0]; mode { - case "", "host": - case "container": - if len(parts) != 2 || parts[1] == "" { - return false - } - default: - return false - } - return true -} - -// Container returns the name of the container whose pid namespace is going to be used. -func (n NsPid) Container() string { - parts := strings.SplitN(string(n), ":", 2) - if len(parts) > 1 { - return parts[1] - } - return "" -} - -// parsePortSpecs receives port specs in the format of ip:public:private/proto and parses -// these in to the internal types -// for publish, publish-all, and expose flags -func parsePortSpecs(ports []string) ([]*pb.PortMapping, error) { //nolint - var portMappings []*pb.PortMapping - for _, rawPort := range ports { - portMapping, err := parsePortSpec(rawPort) - if err != nil { - return nil, err - } - - portMappings = append(portMappings, portMapping...) - } - return portMappings, nil -} - -func validateProto(proto string) bool { - for _, availableProto := range []string{"tcp", "udp"} { - if availableProto == proto { - return true - } - } - return false -} - -// parsePortSpec parses a port specification string into a slice of PortMappings -func parsePortSpec(rawPort string) ([]*pb.PortMapping, error) { - var proto string - rawIP, hostPort, containerPort := splitParts(rawPort) - proto, containerPort = splitProtoPort(containerPort) - - // Strip [] from IPV6 addresses - ip, _, err := net.SplitHostPort(rawIP + ":") - if err != nil { - return nil, fmt.Errorf("Invalid ip address %v: %s", rawIP, err) - } - if ip != "" && net.ParseIP(ip) == nil { - return nil, fmt.Errorf("Invalid ip address: %s", ip) - } - if containerPort == "" { - return nil, fmt.Errorf("No port specified: %s", rawPort) - } - - startPort, endPort, err := parsePortRange(containerPort) - if err != nil { - return nil, fmt.Errorf("Invalid containerPort: %s", containerPort) - } - - var startHostPort, endHostPort uint64 = 0, 0 - if len(hostPort) > 0 { - startHostPort, endHostPort, err = parsePortRange(hostPort) - if err != nil { - return nil, fmt.Errorf("Invalid hostPort: %s", hostPort) - } - } - - if hostPort != "" && (endPort-startPort) != (endHostPort-startHostPort) { - // Allow host port range iff containerPort is not a range. - // In this case, use the host port range as the dynamic - // host port range to allocate into. - if endPort != startPort { - return nil, fmt.Errorf("Invalid ranges specified for container and host Ports: %s and %s", containerPort, hostPort) - } - } - - if !validateProto(strings.ToLower(proto)) { - return nil, fmt.Errorf("invalid proto: %s", proto) - } - - protocol := pb.Protocol_TCP - if strings.ToLower(proto) == "udp" { - protocol = pb.Protocol_UDP - } - - var ports []*pb.PortMapping - for i := uint64(0); i <= (endPort - startPort); i++ { - containerPort = strconv.FormatUint(startPort+i, 10) - if len(hostPort) > 0 { - hostPort = strconv.FormatUint(startHostPort+i, 10) - } - // Set hostPort to a range only if there is a single container port - // and a dynamic host port. - if startPort == endPort && startHostPort != endHostPort { - hostPort = fmt.Sprintf("%s-%s", hostPort, strconv.FormatUint(endHostPort, 10)) - } - - ctrPort, err := strconv.ParseInt(containerPort, 10, 32) - if err != nil { - return nil, err - } - hPort, err := strconv.ParseInt(hostPort, 10, 32) - if err != nil { - return nil, err - } - - port := &pb.PortMapping{ - Protocol: protocol, - ContainerPort: int32(ctrPort), - HostPort: int32(hPort), - HostIp: ip, - } - - ports = append(ports, port) - } - return ports, nil -} - -// parsePortRange parses and validates the specified string as a port-range (8000-9000) -func parsePortRange(ports string) (uint64, uint64, error) { - if ports == "" { - return 0, 0, fmt.Errorf("empty string specified for ports") - } - if !strings.Contains(ports, "-") { - start, err := strconv.ParseUint(ports, 10, 16) - end := start - return start, end, err - } - - parts := strings.Split(ports, "-") - start, err := strconv.ParseUint(parts[0], 10, 16) - if err != nil { - return 0, 0, err - } - end, err := strconv.ParseUint(parts[1], 10, 16) - if err != nil { - return 0, 0, err - } - if end < start { - return 0, 0, fmt.Errorf("Invalid range specified for the Port: %s", ports) - } - return start, end, nil -} - -// splitParts separates the different parts of rawPort -func splitParts(rawport string) (string, string, string) { - parts := strings.Split(rawport, ":") - n := len(parts) - containerport := parts[n-1] - - switch n { - case 1: - return "", "", containerport - case 2: - return "", parts[0], containerport - case 3: - return parts[0], parts[1], containerport - default: - return strings.Join(parts[:n-2], ":"), parts[n-2], containerport - } -} - -// splitProtoPort splits a port in the format of port/proto -func splitProtoPort(rawPort string) (string, string) { - parts := strings.Split(rawPort, "/") - l := len(parts) - if len(rawPort) == 0 || l == 0 || len(parts[0]) == 0 { - return "", "" - } - if l == 1 { - return "tcp", rawPort - } - if len(parts[1]) == 0 { - return "tcp", parts[0] - } - return parts[1], parts[0] -} - -// takes a local seccomp file and reads its file contents -// for security-opt flag -func parseSecurityOpts(securityOpts []string) ([]string, error) { //nolint - for key, opt := range securityOpts { - con := strings.SplitN(opt, "=", 2) - if len(con) == 1 && con[0] != "no-new-privileges" { - if strings.Index(opt, ":") != -1 { - con = strings.SplitN(opt, ":", 2) - } else { - return securityOpts, fmt.Errorf("Invalid --security-opt: %q", opt) - } - } - if con[0] == "seccomp" && con[1] != "unconfined" { - f, err := ioutil.ReadFile(con[1]) - if err != nil { - return securityOpts, fmt.Errorf("opening seccomp profile (%s) failed: %v", con[1], err) - } - b := bytes.NewBuffer(nil) - if err := json.Compact(b, f); err != nil { - return securityOpts, fmt.Errorf("compacting json for seccomp profile (%s) failed: %v", con[1], err) - } - securityOpts[key] = fmt.Sprintf("seccomp=%s", b.Bytes()) - } - } - - return securityOpts, nil -} - -// parses storage options per container into a map -// for storage-opt flag -func parseStorageOpts(storageOpts []string) (map[string]string, error) { //nolint - m := make(map[string]string) - for _, option := range storageOpts { - if strings.Contains(option, "=") { - opt := strings.SplitN(option, "=", 2) - m[opt[0]] = opt[1] - } else { - return nil, errors.Errorf("invalid storage option %q", option) - } - } - return m, nil -} - -// parseUser parses the the uid and gid in the format [:] -// for user flag -// FIXME: Issue from https://github.com/projectatomic/buildah/issues/66 -func parseUser(rootdir, userspec string) (specs.User, error) { //nolint - var gid64 uint64 - var gerr error = user.UnknownGroupError("error looking up group") - - spec := strings.SplitN(userspec, ":", 2) - userspec = spec[0] - groupspec := "" - if userspec == "" { - return specs.User{}, nil - } - if len(spec) > 1 { - groupspec = spec[1] - } - - uid64, uerr := strconv.ParseUint(userspec, 10, 32) - if uerr == nil && groupspec == "" { - // We parsed the user name as a number, and there's no group - // component, so we need to look up the user's primary GID. - var name string - name, gid64, gerr = lookupGroupForUIDInContainer(rootdir, uid64) - if gerr == nil { - userspec = name - } else { - if userrec, err := user.LookupId(userspec); err == nil { - gid64, gerr = strconv.ParseUint(userrec.Gid, 10, 32) - userspec = userrec.Name - } - } - } - if uerr != nil { - uid64, gid64, uerr = lookupUserInContainer(rootdir, userspec) - gerr = uerr - } - if uerr != nil { - if userrec, err := user.Lookup(userspec); err == nil { - uid64, uerr = strconv.ParseUint(userrec.Uid, 10, 32) - gid64, gerr = strconv.ParseUint(userrec.Gid, 10, 32) - } - } - - if groupspec != "" { - gid64, gerr = strconv.ParseUint(groupspec, 10, 32) - if gerr != nil { - gid64, gerr = lookupGroupInContainer(rootdir, groupspec) - } - if gerr != nil { - if group, err := user.LookupGroup(groupspec); err == nil { - gid64, gerr = strconv.ParseUint(group.Gid, 10, 32) - } - } - } - - if uerr == nil && gerr == nil { - u := specs.User{ - UID: uint32(uid64), - GID: uint32(gid64), - Username: userspec, - } - return u, nil - } - - err := errors.Wrapf(uerr, "error determining run uid") - if uerr == nil { - err = errors.Wrapf(gerr, "error determining run gid") - } - return specs.User{}, err -} - -// convertKVStringsToMap converts ["key=value"] to {"key":"value"} -func convertKVStringsToMap(values []string) map[string]string { - result := make(map[string]string, len(values)) - for _, value := range values { - kv := strings.SplitN(value, "=", 2) - if len(kv) == 1 { - result[kv[0]] = "" - } else { - result[kv[0]] = kv[1] - } - } - - return result -} - -// NsUser represents userns mode in the container. -// for userns flag -type NsUser string - -// IsHost indicates whether the container uses the host's userns. -func (n NsUser) IsHost() bool { - return n == "host" -} - -// IsPrivate indicates whether the container uses the a private userns. -func (n NsUser) IsPrivate() bool { - return !(n.IsHost()) -} - -// Valid indicates whether the userns is valid. -func (n NsUser) Valid() bool { - parts := strings.Split(string(n), ":") - switch mode := parts[0]; mode { - case "", "host": - default: - return false - } - return true -} - -// NsUts represents the UTS namespace of the container. -// for uts flag -type NsUts string - -// IsPrivate indicates whether the container uses its private UTS namespace. -func (n NsUts) IsPrivate() bool { - return !(n.IsHost()) -} - -// IsHost indicates whether the container uses the host's UTS namespace. -func (n NsUts) IsHost() bool { - return n == "host" -} - -// Valid indicates whether the UTS namespace is valid. -func (n NsUts) Valid() bool { - parts := strings.Split(string(n), ":") - switch mode := parts[0]; mode { - case "", "host": - default: - return false - } - return true -} - -// Takes a stringslice and converts to a uint32slice -func stringSlicetoUint32Slice(inputSlice []string) ([]uint32, error) { - var outputSlice []uint32 - for _, v := range inputSlice { - u, err := strconv.ParseUint(v, 10, 32) - if err != nil { - return outputSlice, err - } - outputSlice = append(outputSlice, uint32(u)) - } - return outputSlice, nil -} diff --git a/cmd/kpod/pause.go b/cmd/kpod/pause.go deleted file mode 100644 index dede89443..000000000 --- a/cmd/kpod/pause.go +++ /dev/null @@ -1,58 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "github.com/pkg/errors" - "github.com/urfave/cli" -) - -var ( - pauseDescription = ` - kpod pause - - Pauses one or more running containers. The container name or ID can be used. -` - pauseCommand = cli.Command{ - Name: "pause", - Usage: "Pauses all the processes in one or more containers", - Description: pauseDescription, - Action: pauseCmd, - ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", - } -) - -func pauseCmd(c *cli.Context) error { - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - args := c.Args() - if len(args) < 1 { - return errors.Errorf("you must provide at least one container name or id") - } - - var lastError error - for _, arg := range args { - ctr, err := runtime.LookupContainer(arg) - if err != nil { - if lastError != nil { - fmt.Fprintln(os.Stderr, lastError) - } - lastError = errors.Wrapf(err, "error looking up container %q", arg) - continue - } - if err = ctr.Pause(); err != nil { - if lastError != nil { - fmt.Fprintln(os.Stderr, lastError) - } - lastError = errors.Wrapf(err, "failed to pause container %v", ctr.ID()) - } else { - fmt.Println(ctr.ID()) - } - } - return lastError -} diff --git a/cmd/kpod/ps.go b/cmd/kpod/ps.go deleted file mode 100644 index 6b807671e..000000000 --- a/cmd/kpod/ps.go +++ /dev/null @@ -1,606 +0,0 @@ -package main - -import ( - "fmt" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - - "github.com/docker/go-units" - specs "github.com/opencontainers/runtime-spec/specs-go" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/cmd/kpod/formats" - "github.com/projectatomic/libpod/libpod" - "github.com/urfave/cli" - "k8s.io/apimachinery/pkg/fields" -) - -type psOptions struct { - all bool - filter string - format string - last int - latest bool - noTrunc bool - quiet bool - size bool - label string - namespace bool -} - -type psTemplateParams struct { - ID string - Image string - Command string - CreatedAt string - RunningFor string - Status string - Ports string - Size string - Names string - Labels string - Mounts string - PID int - Cgroup string - IPC string - MNT string - NET string - PIDNS string - User string - UTS string -} - -// psJSONParams is only used when the JSON format is specified, -// and is better for data processing from JSON. -// psJSONParams will be populated by data from libpod.Container, -// the members of the struct are the sama data types as their sources. -type psJSONParams struct { - ID string `json:"id"` - Image string `json:"image"` - ImageID string `json:"image_id"` - Command string `json:"command"` - CreatedAt time.Time `json:"createdAt"` - RunningFor time.Duration `json:"runningFor"` - Status string `json:"status"` - Ports map[string]struct{} `json:"ports"` - Size uint `json:"size"` - Names string `json:"names"` - Labels fields.Set `json:"labels"` - Mounts []specs.Mount `json:"mounts"` - ContainerRunning bool `json:"ctrRunning"` - Namespaces *namespace `json:"namespace,omitempty"` -} - -type namespace struct { - PID string `json:"pid,omitempty"` - Cgroup string `json:"cgroup,omitempty"` - IPC string `json:"ipc,omitempty"` - MNT string `json:"mnt,omitempty"` - NET string `json:"net,omitempty"` - PIDNS string `json:"pidns,omitempty"` - User string `json:"user,omitempty"` - UTS string `json:"uts,omitempty"` -} - -var ( - psFlags = []cli.Flag{ - cli.BoolFlag{ - Name: "all, a", - Usage: "Show all the containers, default is only running containers", - }, - cli.StringFlag{ - Name: "filter, f", - Usage: "Filter output based on conditions given", - }, - cli.StringFlag{ - Name: "format", - Usage: "Pretty-print containers to JSON or using a Go template", - }, - cli.IntFlag{ - Name: "last, n", - Usage: "Print the n last created containers (all states)", - Value: -1, - }, - cli.BoolFlag{ - Name: "latest, l", - Usage: "Show the latest container created (all states)", - }, - cli.BoolFlag{ - Name: "no-trunc", - Usage: "Display the extended information", - }, - cli.BoolFlag{ - Name: "quiet, q", - Usage: "Print the numeric IDs of the containers only", - }, - cli.BoolFlag{ - Name: "size, s", - Usage: "Display the total file sizes", - }, - cli.BoolFlag{ - Name: "namespace, ns", - Usage: "Display namespace information", - }, - } - psDescription = "Prints out information about the containers" - psCommand = cli.Command{ - Name: "ps", - Usage: "List containers", - Description: psDescription, - Flags: psFlags, - Action: psCmd, - ArgsUsage: "", - UseShortOptionHandling: true, - } -) - -func psCmd(c *cli.Context) error { - if err := validateFlags(c, psFlags); err != nil { - return err - } - - if err := checkFlagsPassed(c); err != nil { - return errors.Wrapf(err, "error with flags passed") - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "error creating libpod runtime") - } - - defer runtime.Shutdown(false) - - if len(c.Args()) > 0 { - return errors.Errorf("too many arguments, ps takes no arguments") - } - - format := genPsFormat(c.String("format"), c.Bool("quiet"), c.Bool("size"), c.Bool("namespace")) - - opts := psOptions{ - all: c.Bool("all"), - filter: c.String("filter"), - format: format, - last: c.Int("last"), - latest: c.Bool("latest"), - noTrunc: c.Bool("no-trunc"), - quiet: c.Bool("quiet"), - size: c.Bool("size"), - namespace: c.Bool("namespace"), - } - - var filterFuncs []libpod.ContainerFilter - // When we are dealing with latest or last=n, we need to - // get all containers. - if !opts.all && !opts.latest && opts.last < 1 { - // only get running containers - filterFuncs = append(filterFuncs, func(c *libpod.Container) bool { - state, _ := c.State() - return state == libpod.ContainerStateRunning - }) - } - - if opts.filter != "" { - filters := strings.Split(opts.filter, ",") - for _, f := range filters { - filterSplit := strings.Split(f, "=") - if len(filterSplit) < 2 { - return errors.Errorf("filter input must be in the form of filter=value: %s is invalid", f) - } - generatedFunc, err := generateContainerFilterFuncs(filterSplit[0], filterSplit[1], runtime) - if err != nil { - return errors.Wrapf(err, "invalid filter") - } - filterFuncs = append(filterFuncs, generatedFunc) - } - } - - containers, err := runtime.GetContainers(filterFuncs...) - var outputContainers []*libpod.Container - if opts.latest && len(containers) > 0 { - outputContainers = append(outputContainers, containers[0]) - } else if opts.last > 0 && opts.last <= len(containers) { - outputContainers = append(outputContainers, containers[:opts.last]...) - } else { - outputContainers = containers - } - - return generatePsOutput(outputContainers, opts) -} - -// checkFlagsPassed checks if mutually exclusive flags are passed together -func checkFlagsPassed(c *cli.Context) error { - // latest, and last are mutually exclusive. - if c.Int("last") >= 0 && c.Bool("latest") { - return errors.Errorf("last and latest are mutually exclusive") - } - // quiet, size, namespace, and format with Go template are mutually exclusive - flags := 0 - if c.Bool("quiet") { - flags++ - } - if c.Bool("size") { - flags++ - } - if c.Bool("namespace") { - flags++ - } - if c.IsSet("format") && c.String("format") != formats.JSONString { - flags++ - } - if flags > 1 { - return errors.Errorf("quiet, size, namespace, and format with Go template are mutually exclusive") - } - return nil -} - -func generateContainerFilterFuncs(filter, filterValue string, runtime *libpod.Runtime) (func(container *libpod.Container) bool, error) { - switch filter { - case "id": - return func(c *libpod.Container) bool { - return c.ID() == filterValue - }, nil - case "label": - return func(c *libpod.Container) bool { - for _, label := range c.Labels() { - if label == filterValue { - return true - } - } - return false - }, nil - case "name": - return func(c *libpod.Container) bool { - return c.Name() == filterValue - }, nil - case "exited": - exitCode, err := strconv.ParseInt(filterValue, 10, 32) - if err != nil { - return nil, errors.Wrapf(err, "exited code out of range %q", filterValue) - } - return func(c *libpod.Container) bool { - ec, err := c.ExitCode() - if ec == int32(exitCode) && err == nil { - return true - } - return false - }, nil - case "status": - if !libpod.StringInSlice(filterValue, []string{"created", "restarting", "running", "paused", "exited", "unknown"}) { - return nil, errors.Errorf("%s is not a valid status", filterValue) - } - return func(c *libpod.Container) bool { - status, err := c.State() - if err != nil { - return false - } - return status.String() == filterValue - }, nil - case "ancestor": - // This needs to refine to match docker - // - ancestor=([:tag]|| ⟨image@digest⟩) - containers created from an image or a descendant. - return func(c *libpod.Container) bool { - containerConfig := c.Config() - if containerConfig.RootfsImageID == filterValue || containerConfig.RootfsImageName == filterValue { - return true - } - return false - }, nil - case "before": - ctr, err := runtime.LookupContainer(filterValue) - if err != nil { - return nil, errors.Errorf("unable to find container by name or id of %s", filterValue) - } - containerConfig := ctr.Config() - createTime := containerConfig.CreatedTime - return func(c *libpod.Container) bool { - cc := c.Config() - return createTime.After(cc.CreatedTime) - }, nil - case "since": - ctr, err := runtime.LookupContainer(filterValue) - if err != nil { - return nil, errors.Errorf("unable to find container by name or id of %s", filterValue) - } - containerConfig := ctr.Config() - createTime := containerConfig.CreatedTime - return func(c *libpod.Container) bool { - cc := c.Config() - return createTime.Before(cc.CreatedTime) - }, nil - case "volume": - //- volume=(|) - return func(c *libpod.Container) bool { - containerConfig := c.Config() - //TODO We need to still lookup against volumes too - return containerConfig.MountLabel == filterValue - }, nil - } - return nil, errors.Errorf("%s is an invalid filter", filter) -} - -// generate the template based on conditions given -func genPsFormat(format string, quiet, size, namespace bool) string { - if format != "" { - // "\t" from the command line is not being recognized as a tab - // replacing the string "\t" to a tab character if the user passes in "\t" - return strings.Replace(format, `\t`, "\t", -1) - } - if quiet { - return formats.IDString - } - if namespace { - return "table {{.ID}}\t{{.Names}}\t{{.PID}}\t{{.Cgroup}}\t{{.IPC}}\t{{.MNT}}\t{{.NET}}\t{{.PIDNS}}\t{{.User}}\t{{.UTS}}\t" - } - format = "table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}\t{{.Ports}}\t{{.Names}}\t" - if size { - format += "{{.Size}}\t" - } - return format -} - -func psToGeneric(templParams []psTemplateParams, JSONParams []psJSONParams) (genericParams []interface{}) { - if len(templParams) > 0 { - for _, v := range templParams { - genericParams = append(genericParams, interface{}(v)) - } - return - } - for _, v := range JSONParams { - genericParams = append(genericParams, interface{}(v)) - } - return -} - -// generate the accurate header based on template given -func (p *psTemplateParams) headerMap() map[string]string { - v := reflect.Indirect(reflect.ValueOf(p)) - values := make(map[string]string) - - for i := 0; i < v.NumField(); i++ { - key := v.Type().Field(i).Name - value := key - if value == "ID" { - value = "Container" + value - } - values[key] = strings.ToUpper(splitCamelCase(value)) - } - return values -} - -// getTemplateOutput returns the modified container information -func getTemplateOutput(containers []*libpod.Container, opts psOptions) ([]psTemplateParams, error) { - var psOutput []psTemplateParams - var status string - for _, ctr := range containers { - ctrID := ctr.ID() - conConfig := ctr.Config() - conState, err := ctr.State() - if err != nil { - return psOutput, errors.Wrapf(err, "unable to obtain container state") - } - exitCode, err := ctr.ExitCode() - if err != nil { - return psOutput, errors.Wrapf(err, "unable to obtain container exit code") - } - pid, err := ctr.PID() - if err != nil { - return psOutput, errors.Wrapf(err, "unable to obtain container pid") - } - runningFor := units.HumanDuration(time.Since(conConfig.CreatedTime)) - createdAt := runningFor + " ago" - imageName := conConfig.RootfsImageName - - // TODO We currently dont have the ability to get many of - // these data items. Uncomment as progress is made - - //command := getStrFromSquareBrackets(ctr.ImageCreatedBy) - command := strings.Join(ctr.Spec().Process.Args, " ") - //mounts := getMounts(ctr.Mounts, opts.noTrunc) - //ports := getPorts(ctr.Config.ExposedPorts) - //size := units.HumanSize(float64(ctr.SizeRootFs)) - labels := formatLabels(ctr.Labels()) - ns := getNamespaces(pid) - - switch conState { - case libpod.ContainerStateStopped: - status = fmt.Sprintf("Exited (%d) %s ago", exitCode, runningFor) - case libpod.ContainerStateRunning: - status = "Up " + runningFor + " ago" - case libpod.ContainerStatePaused: - status = "Paused" - case libpod.ContainerStateCreated: - status = "Created" - default: - status = "Dead" - } - - if !opts.noTrunc { - ctrID = ctr.ID()[:idTruncLength] - imageName = conConfig.RootfsImageName - } - - // TODO We currently dont have the ability to get many of - // these data items. Uncomment as progress is made - - params := psTemplateParams{ - ID: ctrID, - Image: imageName, - Command: command, - CreatedAt: createdAt, - RunningFor: runningFor, - Status: status, - //Ports: ports, - //Size: size, - Names: ctr.Name(), - Labels: labels, - //Mounts: mounts, - PID: pid, - Cgroup: ns.Cgroup, - IPC: ns.IPC, - MNT: ns.MNT, - NET: ns.NET, - PIDNS: ns.PID, - User: ns.User, - UTS: ns.UTS, - } - psOutput = append(psOutput, params) - } - return psOutput, nil -} - -func getNamespaces(pid int) *namespace { - ctrPID := strconv.Itoa(pid) - cgroup, _ := getNamespaceInfo(filepath.Join("/proc", ctrPID, "ns", "cgroup")) - ipc, _ := getNamespaceInfo(filepath.Join("/proc", ctrPID, "ns", "ipc")) - mnt, _ := getNamespaceInfo(filepath.Join("/proc", ctrPID, "ns", "mnt")) - net, _ := getNamespaceInfo(filepath.Join("/proc", ctrPID, "ns", "net")) - pidns, _ := getNamespaceInfo(filepath.Join("/proc", ctrPID, "ns", "pid")) - user, _ := getNamespaceInfo(filepath.Join("/proc", ctrPID, "ns", "user")) - uts, _ := getNamespaceInfo(filepath.Join("/proc", ctrPID, "ns", "uts")) - - return &namespace{ - PID: ctrPID, - Cgroup: cgroup, - IPC: ipc, - MNT: mnt, - NET: net, - PIDNS: pidns, - User: user, - UTS: uts, - } -} - -func getNamespaceInfo(path string) (string, error) { - val, err := os.Readlink(path) - if err != nil { - return "", errors.Wrapf(err, "error getting info from %q", path) - } - return getStrFromSquareBrackets(val), nil -} - -// getJSONOutput returns the container info in its raw form -func getJSONOutput(containers []*libpod.Container, nSpace bool) ([]psJSONParams, error) { - var psOutput []psJSONParams - var ns *namespace - for _, ctr := range containers { - pid, err := ctr.PID() - if err != nil { - return psOutput, errors.Wrapf(err, "unable to obtain container pid") - } - if nSpace { - ns = getNamespaces(pid) - } - cc := ctr.Config() - conState, err := ctr.State() - if err != nil { - return psOutput, errors.Wrapf(err, "unable to obtain container state for JSON output") - } - params := psJSONParams{ - // TODO When we have ability to obtain the commented out data, we need - // TODO to add it - ID: ctr.ID(), - Image: cc.RootfsImageName, - ImageID: cc.RootfsImageID, - //Command: getStrFromSquareBrackets(ctr.ImageCreatedBy), - Command: strings.Join(ctr.Spec().Process.Args, " "), - CreatedAt: cc.CreatedTime, - RunningFor: time.Since(cc.CreatedTime), - Status: conState.String(), - //Ports: cc.Spec.Linux.Resources.Network. - //Size: ctr.SizeRootFs, - Names: cc.Name, - Labels: cc.Labels, - Mounts: cc.Spec.Mounts, - ContainerRunning: conState == libpod.ContainerStateRunning, - Namespaces: ns, - } - psOutput = append(psOutput, params) - } - return psOutput, nil -} - -func generatePsOutput(containers []*libpod.Container, opts psOptions) error { - if len(containers) == 0 && opts.format != formats.JSONString { - return nil - } - var out formats.Writer - - switch opts.format { - case formats.JSONString: - psOutput, err := getJSONOutput(containers, opts.namespace) - if err != nil { - return errors.Wrapf(err, "unable to create JSON for output") - } - out = formats.JSONStructArray{Output: psToGeneric([]psTemplateParams{}, psOutput)} - default: - psOutput, err := getTemplateOutput(containers, opts) - if err != nil { - return errors.Wrapf(err, "unable to create output") - } - out = formats.StdoutTemplateArray{Output: psToGeneric(psOutput, []psJSONParams{}), Template: opts.format, Fields: psOutput[0].headerMap()} - } - - return formats.Writer(out).Out() -} - -// getStrFromSquareBrackets gets the string inside [] from a string -func getStrFromSquareBrackets(cmd string) string { - reg, err := regexp.Compile(".*\\[|\\].*") - if err != nil { - return "" - } - arr := strings.Split(reg.ReplaceAllLiteralString(cmd, ""), ",") - return strings.Join(arr, ",") -} - -// getLabels converts the labels to a string of the form "key=value, key2=value2" -func formatLabels(labels map[string]string) string { - var arr []string - if len(labels) > 0 { - for key, val := range labels { - temp := key + "=" + val - arr = append(arr, temp) - } - return strings.Join(arr, ",") - } - return "" -} - -/* -// getMounts converts the volumes mounted to a string of the form "mount1, mount2" -// it truncates it if noTrunc is false -func getMounts(mounts []specs.Mount, noTrunc bool) string { - var arr []string - if len(mounts) == 0 { - return "" - } - for _, mount := range mounts { - if noTrunc { - arr = append(arr, mount.Source) - continue - } - tempArr := strings.SplitAfter(mount.Source, "/") - if len(tempArr) >= 3 { - arr = append(arr, strings.Join(tempArr[:3], "")) - } else { - arr = append(arr, mount.Source) - } - } - return strings.Join(arr, ",") -} -// getPorts converts the ports used to a string of the from "port1, port2" -func getPorts(ports map[string]struct{}) string { - var arr []string - if len(ports) == 0 { - return "" - } - for key := range ports { - arr = append(arr, key) - } - return strings.Join(arr, ",") -} -*/ diff --git a/cmd/kpod/pull.go b/cmd/kpod/pull.go deleted file mode 100644 index 5726b20f1..000000000 --- a/cmd/kpod/pull.go +++ /dev/null @@ -1,120 +0,0 @@ -package main - -import ( - "fmt" - "io" - "os" - - "golang.org/x/crypto/ssh/terminal" - - "github.com/containers/image/types" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/projectatomic/libpod/libpod/common" - "github.com/sirupsen/logrus" - "github.com/urfave/cli" -) - -var ( - pullFlags = []cli.Flag{ - cli.StringFlag{ - Name: "authfile", - Usage: "Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json", - }, - cli.StringFlag{ - Name: "cert-dir", - Usage: "`pathname` of a directory containing TLS certificates and keys", - }, - cli.StringFlag{ - Name: "creds", - Usage: "`credentials` (USERNAME:PASSWORD) to use for authenticating to a registry", - }, - cli.BoolFlag{ - Name: "quiet, q", - Usage: "Suppress output information when pulling images", - }, - cli.StringFlag{ - Name: "signature-policy", - Usage: "`pathname` of signature policy file (not usually used)", - }, - cli.BoolTFlag{ - Name: "tls-verify", - Usage: "require HTTPS and verify certificates when contacting registries (default: true)", - }, - } - - pullDescription = "Pulls an image from a registry and stores it locally.\n" + - "An image can be pulled using its tag or digest. If a tag is not\n" + - "specified, the image with the 'latest' tag (if it exists) is pulled." - pullCommand = cli.Command{ - Name: "pull", - Usage: "pull an image from a registry", - Description: pullDescription, - Flags: pullFlags, - Action: pullCmd, - ArgsUsage: "", - } -) - -// pullCmd gets the data from the command line and calls pullImage -// to copy an image from a registry to a local machine -func pullCmd(c *cli.Context) error { - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - args := c.Args() - if len(args) == 0 { - logrus.Errorf("an image name must be specified") - return nil - } - if len(args) > 1 { - logrus.Errorf("too many arguments. Requires exactly 1") - return nil - } - if err := validateFlags(c, pullFlags); err != nil { - return err - } - image := args[0] - - var registryCreds *types.DockerAuthConfig - if c.String("creds") != "" { - creds, err := common.ParseRegistryCreds(c.String("creds")) - if err != nil { - if err == common.ErrNoPassword { - fmt.Print("Password: ") - password, err := terminal.ReadPassword(0) - if err != nil { - return errors.Wrapf(err, "could not read password from terminal") - } - creds.Password = string(password) - } else { - return err - } - } - registryCreds = creds - } - - var writer io.Writer - if !c.Bool("quiet") { - writer = os.Stdout - } - - options := libpod.CopyOptions{ - SignaturePolicyPath: c.String("signature-policy"), - AuthFile: c.String("authfile"), - DockerRegistryOptions: common.DockerRegistryOptions{ - DockerRegistryCreds: registryCreds, - DockerCertPath: c.String("cert-dir"), - DockerInsecureSkipTLSVerify: !c.BoolT("tls-verify"), - }, - Writer: writer, - } - - if _, err := runtime.PullImage(image, options); err != nil { - return errors.Wrapf(err, "error pulling image %q", image) - } - return nil -} diff --git a/cmd/kpod/push.go b/cmd/kpod/push.go deleted file mode 100644 index d3d42e0ee..000000000 --- a/cmd/kpod/push.go +++ /dev/null @@ -1,167 +0,0 @@ -package main - -import ( - "fmt" - "io" - "os" - "strings" - - "github.com/containers/image/manifest" - "github.com/containers/image/types" - "github.com/containers/storage/pkg/archive" - imgspecv1 "github.com/opencontainers/image-spec/specs-go/v1" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/projectatomic/libpod/libpod/common" - "github.com/urfave/cli" - "golang.org/x/crypto/ssh/terminal" -) - -var ( - pushFlags = []cli.Flag{ - cli.StringFlag{ - Name: "signature-policy", - Usage: "`pathname` of signature policy file (not usually used)", - Hidden: true, - }, - cli.StringFlag{ - Name: "creds", - Usage: "`credentials` (USERNAME:PASSWORD) to use for authenticating to a registry", - }, - cli.StringFlag{ - Name: "cert-dir", - Usage: "`pathname` of a directory containing TLS certificates and keys", - }, - cli.BoolFlag{ - Name: "compress", - Usage: "compress tarball image layers when pushing to a directory using the 'dir' transport. (default is same compression type as source)", - }, - cli.StringFlag{ - Name: "format, f", - Usage: "manifest type (oci, v2s1, or v2s2) to use when pushing an image using the 'dir:' transport (default is manifest type of source)", - }, - cli.BoolTFlag{ - Name: "tls-verify", - Usage: "require HTTPS and verify certificates when contacting registries (default: true)", - }, - cli.BoolFlag{ - Name: "remove-signatures", - Usage: "discard any pre-existing signatures in the image", - }, - cli.StringFlag{ - Name: "sign-by", - Usage: "add a signature at the destination using the specified key", - }, - cli.BoolFlag{ - Name: "quiet, q", - Usage: "don't output progress information when pushing images", - }, - cli.StringFlag{ - Name: "authfile", - Usage: "Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json", - }, - } - pushDescription = fmt.Sprintf(` - Pushes an image to a specified location. - The Image "DESTINATION" uses a "transport":"details" format. - See kpod-push(1) section "DESTINATION" for the expected format`) - - pushCommand = cli.Command{ - Name: "push", - Usage: "push an image to a specified destination", - Description: pushDescription, - Flags: pushFlags, - Action: pushCmd, - ArgsUsage: "IMAGE DESTINATION", - } -) - -func pushCmd(c *cli.Context) error { - var registryCreds *types.DockerAuthConfig - - args := c.Args() - if len(args) < 2 { - return errors.New("kpod push requires exactly 2 arguments") - } - if err := validateFlags(c, pushFlags); err != nil { - return err - } - srcName := args[0] - destName := args[1] - - // --compress and --format can only be used for the "dir" transport - splitArg := strings.SplitN(destName, ":", 2) - if c.IsSet("compress") || c.IsSet("format") { - if splitArg[0] != libpod.DirTransport { - return errors.Errorf("--compress and --format can be set only when pushing to a directory using the 'dir' transport") - } - } - - registryCredsString := c.String("creds") - certPath := c.String("cert-dir") - skipVerify := !c.BoolT("tls-verify") - removeSignatures := c.Bool("remove-signatures") - signBy := c.String("sign-by") - - if registryCredsString != "" { - creds, err := common.ParseRegistryCreds(registryCredsString) - if err != nil { - if err == common.ErrNoPassword { - fmt.Print("Password: ") - password, err := terminal.ReadPassword(0) - if err != nil { - return errors.Wrapf(err, "could not read password from terminal") - } - creds.Password = string(password) - } else { - return err - } - } - registryCreds = creds - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not create runtime") - } - defer runtime.Shutdown(false) - - var writer io.Writer - if !c.Bool("quiet") { - writer = os.Stdout - } - - var manifestType string - if c.IsSet("format") { - switch c.String("format") { - case "oci": - manifestType = imgspecv1.MediaTypeImageManifest - case "v2s1": - manifestType = manifest.DockerV2Schema1SignedMediaType - case "v2s2", "docker": - manifestType = manifest.DockerV2Schema2MediaType - default: - return fmt.Errorf("unknown format %q. Choose on of the supported formats: 'oci', 'v2s1', or 'v2s2'", c.String("format")) - } - } - - options := libpod.CopyOptions{ - Compression: archive.Uncompressed, - SignaturePolicyPath: c.String("signature-policy"), - DockerRegistryOptions: common.DockerRegistryOptions{ - DockerRegistryCreds: registryCreds, - DockerCertPath: certPath, - DockerInsecureSkipTLSVerify: skipVerify, - }, - SigningOptions: common.SigningOptions{ - RemoveSignatures: removeSignatures, - SignBy: signBy, - }, - AuthFile: c.String("authfile"), - Writer: writer, - ManifestMIMEType: manifestType, - ForceCompress: c.Bool("compress"), - } - - return runtime.PushImage(srcName, destName, options) -} diff --git a/cmd/kpod/rm.go b/cmd/kpod/rm.go deleted file mode 100644 index 2f767457f..000000000 --- a/cmd/kpod/rm.go +++ /dev/null @@ -1,90 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/urfave/cli" -) - -var ( - rmFlags = []cli.Flag{ - cli.BoolFlag{ - Name: "force, f", - Usage: "Force removal of a running container. The default is false", - }, - cli.BoolFlag{ - Name: "all, a", - Usage: "Remove all containers", - }, - } - rmDescription = "Remove one or more containers" - rmCommand = cli.Command{ - Name: "rm", - Usage: fmt.Sprintf(`kpod rm will remove one or more containers from the host. The container name or ID can be used. - This does not remove images. Running containers will not be removed without the -f option.`), - Description: rmDescription, - Flags: rmFlags, - Action: rmCmd, - ArgsUsage: "", - UseShortOptionHandling: true, - } -) - -// saveCmd saves the image to either docker-archive or oci -func rmCmd(c *cli.Context) error { - if err := validateFlags(c, rmFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - args := c.Args() - if len(args) == 0 && !c.Bool("all") { - return errors.Errorf("specify one or more containers to remove") - } - - var delContainers []*libpod.Container - var lastError error - if c.Bool("all") { - delContainers, err = runtime.GetContainers() - if err != nil { - return errors.Wrapf(err, "unable to get container list") - } - } else { - for _, i := range args { - container, err := runtime.LookupContainer(i) - if err != nil { - fmt.Fprintln(os.Stderr, err) - lastError = errors.Wrapf(err, "unable to find container %s", i) - continue - } - delContainers = append(delContainers, container) - } - } - for _, container := range delContainers { - if err != nil { - if lastError != nil { - fmt.Fprintln(os.Stderr, lastError) - } - lastError = errors.Wrapf(err, "failed to find container %s", container.ID()) - continue - } - err = runtime.RemoveContainer(container, c.Bool("force")) - if err != nil { - if lastError != nil { - fmt.Fprintln(os.Stderr, lastError) - } - lastError = errors.Wrapf(err, "failed to delete container %v", container.ID()) - } else { - fmt.Println(container.ID()) - } - } - return lastError -} diff --git a/cmd/kpod/rmi.go b/cmd/kpod/rmi.go deleted file mode 100644 index 1b4cb7390..000000000 --- a/cmd/kpod/rmi.go +++ /dev/null @@ -1,75 +0,0 @@ -package main - -import ( - "fmt" - - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/urfave/cli" -) - -var ( - rmiDescription = "removes one or more locally stored images." - rmiFlags = []cli.Flag{ - cli.BoolFlag{ - Name: "all, a", - Usage: "remove all images", - }, - cli.BoolFlag{ - Name: "force, f", - Usage: "force removal of the image", - }, - } - rmiCommand = cli.Command{ - Name: "rmi", - Usage: "removes one or more images from local storage", - Description: rmiDescription, - Action: rmiCmd, - ArgsUsage: "IMAGE-NAME-OR-ID [...]", - Flags: rmiFlags, - UseShortOptionHandling: true, - } -) - -func rmiCmd(c *cli.Context) error { - if err := validateFlags(c, rmiFlags); err != nil { - return err - } - removeAll := c.Bool("all") - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - args := c.Args() - if len(args) == 0 && !removeAll { - return errors.Errorf("image name or ID must be specified") - } - if len(args) > 0 && removeAll { - return errors.Errorf("when using the --all switch, you may not pass any images names or IDs") - } - imagesToDelete := args[:] - if removeAll { - localImages, err := runtime.GetImages(&libpod.ImageFilterParams{}) - if err != nil { - return errors.Wrapf(err, "unable to query local images") - } - for _, image := range localImages { - imagesToDelete = append(imagesToDelete, image.ID) - } - } - - for _, arg := range imagesToDelete { - image, err := runtime.GetImage(arg) - if err != nil { - return errors.Wrapf(err, "could not get image %q", arg) - } - id, err := runtime.RemoveImage(image, c.Bool("force")) - if err != nil { - return errors.Wrapf(err, "error removing image %q", id) - } - fmt.Printf("%s\n", id) - } - return nil -} diff --git a/cmd/kpod/run.go b/cmd/kpod/run.go deleted file mode 100644 index 6142983ad..000000000 --- a/cmd/kpod/run.go +++ /dev/null @@ -1,146 +0,0 @@ -package main - -import ( - "fmt" - "sync" - - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/sirupsen/logrus" - "github.com/urfave/cli" -) - -var runDescription = "Runs a command in a new container from the given image" - -var runCommand = cli.Command{ - Name: "run", - Usage: "run a command in a new container", - Description: runDescription, - Flags: createFlags, - Action: runCmd, - ArgsUsage: "IMAGE [COMMAND [ARG...]]", - SkipArgReorder: true, - UseShortOptionHandling: true, -} - -func runCmd(c *cli.Context) error { - var imageName string - if err := validateFlags(c, createFlags); err != nil { - return err - } - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "error creating libpod runtime") - } - defer runtime.Shutdown(false) - - createConfig, err := parseCreateOpts(c, runtime) - if err != nil { - return err - } - - createImage := runtime.NewImage(createConfig.Image) - createImage.LocalName, _ = createImage.GetLocalImageName() - if createImage.LocalName == "" { - // The image wasnt found by the user input'd name or its fqname - // Pull the image - fmt.Printf("Trying to pull %s...", createImage.PullName) - createImage.Pull() - } - - runtimeSpec, err := createConfigToOCISpec(createConfig) - if err != nil { - return err - } - logrus.Debug("spec is ", runtimeSpec) - - if createImage.LocalName != "" { - nameIsID, err := runtime.IsImageID(createImage.LocalName) - if err != nil { - return err - } - if nameIsID { - // If the input from the user is an ID, then we need to get the image - // name for cstorage - createImage.LocalName, err = createImage.GetNameByID() - if err != nil { - return err - } - } - imageName = createImage.LocalName - } else { - imageName, err = createImage.GetFQName() - } - if err != nil { - return err - } - logrus.Debug("imageName is ", imageName) - - imageID, err := createImage.GetImageID() - if err != nil { - return err - } - logrus.Debug("imageID is ", imageID) - - options, err := createConfig.GetContainerCreateOptions() - if err != nil { - return errors.Wrapf(err, "unable to parse new container options") - } - - // Gather up the options for NewContainer which consist of With... funcs - options = append(options, libpod.WithRootFSFromImage(imageID, imageName, false)) - options = append(options, libpod.WithSELinuxLabels(createConfig.ProcessLabel, createConfig.MountLabel)) - options = append(options, libpod.WithShmDir(createConfig.ShmDir)) - ctr, err := runtime.NewContainer(runtimeSpec, options...) - if err != nil { - return err - } - - logrus.Debug("new container created ", ctr.ID()) - if err := ctr.Init(); err != nil { - return err - } - logrus.Debugf("container storage created for %q", ctr.ID()) - - if c.String("cidfile") != "" { - libpod.WriteFile(ctr.ID(), c.String("cidfile")) - return nil - } - - // Create a bool channel to track that the console socket attach - // is successful. - attached := make(chan bool) - // Create a waitgroup so we can sync and wait for all goroutines - // to finish before exiting main - var wg sync.WaitGroup - - if !createConfig.Detach { - // We increment the wg counter because we need to do the attach - wg.Add(1) - // Attach to the running container - go func() { - logrus.Debugf("trying to attach to the container %s", ctr.ID()) - defer wg.Done() - if err := ctr.Attach(false, c.String("detach-keys"), attached); err != nil { - logrus.Errorf("unable to attach to container %s: %q", ctr.ID(), err) - } - }() - if !<-attached { - return errors.Errorf("unable to attach to container %s", ctr.ID()) - } - } - // Start the container - if err := ctr.Start(); err != nil { - return errors.Wrapf(err, "unable to start container %q", ctr.ID()) - } - if createConfig.Detach { - fmt.Printf("%s\n", ctr.ID()) - return nil - } - wg.Wait() - - if createConfig.Rm { - return runtime.RemoveContainer(ctr, true) - } - return ctr.CleanupStorage() -} diff --git a/cmd/kpod/save.go b/cmd/kpod/save.go deleted file mode 100644 index 85a8c7930..000000000 --- a/cmd/kpod/save.go +++ /dev/null @@ -1,129 +0,0 @@ -package main - -import ( - "io" - "os" - "strings" - - "github.com/containers/image/manifest" - imgspecv1 "github.com/opencontainers/image-spec/specs-go/v1" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/sirupsen/logrus" - "github.com/urfave/cli" -) - -const ( - ociManifestDir = "oci-dir" - v2s2ManifestDir = "docker-dir" -) - -var ( - saveFlags = []cli.Flag{ - cli.BoolFlag{ - Name: "compress", - Usage: "compress tarball image layers when saving to a directory using the 'dir' transport. (default is same compression type as source)", - }, - cli.StringFlag{ - Name: "output, o", - Usage: "Write to a file, default is STDOUT", - Value: "/dev/stdout", - }, - cli.BoolFlag{ - Name: "quiet, q", - Usage: "Suppress the output", - }, - cli.StringFlag{ - Name: "format", - Usage: "Save image to oci-archive, oci-dir (directory with oci manifest type), docker-dir (directory with v2s2 manifest type)", - }, - } - saveDescription = ` - Save an image to docker-archive or oci-archive on the local machine. - Default is docker-archive` - - saveCommand = cli.Command{ - Name: "save", - Usage: "Save image to an archive", - Description: saveDescription, - Flags: saveFlags, - Action: saveCmd, - ArgsUsage: "", - } -) - -// saveCmd saves the image to either docker-archive or oci -func saveCmd(c *cli.Context) error { - args := c.Args() - if len(args) == 0 { - return errors.Errorf("need at least 1 argument") - } - if err := validateFlags(c, saveFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not create runtime") - } - defer runtime.Shutdown(false) - - if c.IsSet("compress") && (c.String("format") != ociManifestDir && c.String("format") != v2s2ManifestDir && c.String("format") == "") { - return errors.Errorf("--compress can only be set when --format is either 'oci-dir' or 'docker-dir'") - } - - var writer io.Writer - if !c.Bool("quiet") { - writer = os.Stdout - } - - output := c.String("output") - if output == "/dev/stdout" { - fi := os.Stdout - if logrus.IsTerminal(fi) { - return errors.Errorf("refusing to save to terminal. Use -o flag or redirect") - } - } - - var dst, manifestType string - switch c.String("format") { - case libpod.OCIArchive: - dst = libpod.OCIArchive + ":" + output - case "oci-dir": - dst = libpod.DirTransport + ":" + output - manifestType = imgspecv1.MediaTypeImageManifest - case "docker-dir": - dst = libpod.DirTransport + ":" + output - manifestType = manifest.DockerV2Schema2MediaType - case libpod.DockerArchive: - fallthrough - case "": - dst = libpod.DockerArchive + ":" + output - default: - return errors.Errorf("unknown format option %q", c.String("format")) - } - - saveOpts := libpod.CopyOptions{ - SignaturePolicyPath: "", - Writer: writer, - ManifestMIMEType: manifestType, - ForceCompress: c.Bool("compress"), - } - - // only one image is supported for now - // future pull requests will fix this - for _, image := range args { - dest := dst - // need dest to be in the format transport:path:reference for the following transports - if strings.Contains(dst, libpod.OCIArchive) || strings.Contains(dst, libpod.DockerArchive) { - dest = dst + ":" + image - } - if err := runtime.PushImage(image, dest, saveOpts); err != nil { - if err2 := os.Remove(output); err2 != nil { - logrus.Errorf("error deleting %q: %v", output, err) - } - return errors.Wrapf(err, "unable to save %q", image) - } - } - return nil -} diff --git a/cmd/kpod/spec.go b/cmd/kpod/spec.go deleted file mode 100644 index adfdf7347..000000000 --- a/cmd/kpod/spec.go +++ /dev/null @@ -1,561 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "strings" - - "github.com/cri-o/ocicni/pkg/ocicni" - "github.com/docker/docker/daemon/caps" - "github.com/docker/docker/pkg/mount" - "github.com/docker/go-units" - spec "github.com/opencontainers/runtime-spec/specs-go" - "github.com/opencontainers/runtime-tools/generate" - "github.com/opencontainers/selinux/go-selinux/label" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - ann "github.com/projectatomic/libpod/pkg/annotations" - "github.com/sirupsen/logrus" - "golang.org/x/sys/unix" -) - -func blockAccessToKernelFilesystems(config *createConfig, g *generate.Generator) { - if !config.Privileged { - for _, mp := range []string{ - "/proc/kcore", - "/proc/latency_stats", - "/proc/timer_list", - "/proc/timer_stats", - "/proc/sched_debug", - "/proc/scsi", - "/sys/firmware", - } { - g.AddLinuxMaskedPaths(mp) - } - - for _, rp := range []string{ - "/proc/asound", - "/proc/bus", - "/proc/fs", - "/proc/irq", - "/proc/sys", - "/proc/sysrq-trigger", - } { - g.AddLinuxReadonlyPaths(rp) - } - } -} - -func addPidNS(config *createConfig, g *generate.Generator) error { - pidMode := config.PidMode - if pidMode.IsHost() { - return g.RemoveLinuxNamespace(libpod.PIDNamespace) - } - if pidMode.IsContainer() { - ctr, err := config.Runtime.LookupContainer(pidMode.Container()) - if err != nil { - return errors.Wrapf(err, "container %q not found", pidMode.Container()) - } - pid, err := ctr.PID() - if err != nil { - return errors.Wrapf(err, "Failed to get pid of container %q", pidMode.Container()) - } - pidNsPath := fmt.Sprintf("/proc/%d/ns/pid", pid) - if err := g.AddOrReplaceLinuxNamespace(libpod.PIDNamespace, pidNsPath); err != nil { - return err - } - } - return nil -} - -func addNetNS(config *createConfig, g *generate.Generator) error { - netMode := config.NetMode - if netMode.IsHost() { - return g.RemoveLinuxNamespace(libpod.NetNamespace) - } - if netMode.IsNone() { - return libpod.ErrNotImplemented - } - if netMode.IsBridge() { - return libpod.ErrNotImplemented - } - if netMode.IsContainer() { - ctr, err := config.Runtime.LookupContainer(netMode.ConnectedContainer()) - if err != nil { - return errors.Wrapf(err, "container %q not found", netMode.ConnectedContainer()) - } - pid, err := ctr.PID() - if err != nil { - return errors.Wrapf(err, "Failed to get pid of container %q", netMode.ConnectedContainer()) - } - nsPath := fmt.Sprintf("/proc/%d/ns/net", pid) - if err := g.AddOrReplaceLinuxNamespace(libpod.NetNamespace, nsPath); err != nil { - return err - } - } - return nil -} - -func addUTSNS(config *createConfig, g *generate.Generator) error { - utsMode := config.UtsMode - if utsMode.IsHost() { - return g.RemoveLinuxNamespace(libpod.UTSNamespace) - } - return nil -} - -func addIpcNS(config *createConfig, g *generate.Generator) error { - ipcMode := config.IpcMode - if ipcMode.IsHost() { - return g.RemoveLinuxNamespace(libpod.IPCNamespace) - } - if ipcMode.IsContainer() { - ctr, err := config.Runtime.LookupContainer(ipcMode.Container()) - if err != nil { - return errors.Wrapf(err, "container %q not found", ipcMode.Container()) - } - pid, err := ctr.PID() - if err != nil { - return errors.Wrapf(err, "Failed to get pid of container %q", ipcMode.Container()) - } - nsPath := fmt.Sprintf("/proc/%d/ns/ipc", pid) - if err := g.AddOrReplaceLinuxNamespace(libpod.IPCNamespace, nsPath); err != nil { - return err - } - } - - return nil -} - -func addRlimits(config *createConfig, g *generate.Generator) error { - var ( - ul *units.Ulimit - err error - ) - - for _, u := range config.Resources.Ulimit { - if ul, err = units.ParseUlimit(u); err != nil { - return errors.Wrapf(err, "ulimit option %q requires name=SOFT:HARD, failed to be parsed", u) - } - - g.AddProcessRlimits("RLIMIT_"+strings.ToUpper(ul.Name), uint64(ul.Soft), uint64(ul.Hard)) - } - return nil -} - -func setupCapabilities(config *createConfig, configSpec *spec.Spec) error { - var err error - var caplist []string - if config.Privileged { - caplist = caps.GetAllCapabilities() - } else { - caplist, err = caps.TweakCapabilities(configSpec.Process.Capabilities.Bounding, config.CapAdd, config.CapDrop) - if err != nil { - return err - } - } - - configSpec.Process.Capabilities.Bounding = caplist - configSpec.Process.Capabilities.Permitted = caplist - configSpec.Process.Capabilities.Inheritable = caplist - configSpec.Process.Capabilities.Effective = caplist - return nil -} - -// Parses information needed to create a container into an OCI runtime spec -func createConfigToOCISpec(config *createConfig) (*spec.Spec, error) { - g := generate.New() - g.AddCgroupsMount("ro") - g.SetProcessCwd(config.WorkDir) - g.SetProcessArgs(config.Command) - g.SetProcessTerminal(config.Tty) - // User and Group must go together - g.SetProcessUID(config.User) - g.SetProcessGID(config.Group) - for _, gid := range config.GroupAdd { - g.AddProcessAdditionalGid(gid) - } - for key, val := range config.GetAnnotations() { - g.AddAnnotation(key, val) - } - g.SetRootReadonly(config.ReadOnlyRootfs) - g.SetHostname(config.Hostname) - if config.Hostname != "" { - g.AddProcessEnv("HOSTNAME", config.Hostname) - } - - for _, sysctl := range config.Sysctl { - s := strings.SplitN(sysctl, "=", 2) - g.AddLinuxSysctl(s[0], s[1]) - } - - // RESOURCES - MEMORY - if config.Resources.Memory != 0 { - g.SetLinuxResourcesMemoryLimit(config.Resources.Memory) - } - if config.Resources.MemoryReservation != 0 { - g.SetLinuxResourcesMemoryReservation(config.Resources.MemoryReservation) - } - if config.Resources.MemorySwap != 0 { - g.SetLinuxResourcesMemorySwap(config.Resources.MemorySwap) - } - if config.Resources.KernelMemory != 0 { - g.SetLinuxResourcesMemoryKernel(config.Resources.KernelMemory) - } - if config.Resources.MemorySwappiness != -1 { - g.SetLinuxResourcesMemorySwappiness(uint64(config.Resources.MemorySwappiness)) - } - g.SetLinuxResourcesMemoryDisableOOMKiller(config.Resources.DisableOomKiller) - g.SetProcessOOMScoreAdj(config.Resources.OomScoreAdj) - - // RESOURCES - CPU - - if config.Resources.CPUShares != 0 { - g.SetLinuxResourcesCPUShares(config.Resources.CPUShares) - } - if config.Resources.CPUQuota != 0 { - g.SetLinuxResourcesCPUQuota(config.Resources.CPUQuota) - } - if config.Resources.CPUPeriod != 0 { - g.SetLinuxResourcesCPUPeriod(config.Resources.CPUPeriod) - } - if config.Resources.CPURtRuntime != 0 { - g.SetLinuxResourcesCPURealtimeRuntime(config.Resources.CPURtRuntime) - } - if config.Resources.CPURtPeriod != 0 { - g.SetLinuxResourcesCPURealtimePeriod(config.Resources.CPURtPeriod) - } - if config.Resources.CPUs != "" { - g.SetLinuxResourcesCPUCpus(config.Resources.CPUs) - } - if config.Resources.CPUsetMems != "" { - g.SetLinuxResourcesCPUMems(config.Resources.CPUsetMems) - } - - // SECURITY OPTS - g.SetProcessNoNewPrivileges(config.NoNewPrivileges) - g.SetProcessApparmorProfile(config.ApparmorProfile) - g.SetProcessSelinuxLabel(config.ProcessLabel) - g.SetLinuxMountLabel(config.MountLabel) - blockAccessToKernelFilesystems(config, &g) - - // RESOURCES - PIDS - if config.Resources.PidsLimit != 0 { - g.SetLinuxResourcesPidsLimit(config.Resources.PidsLimit) - } - - for _, i := range config.Tmpfs { - options := []string{"rw", "noexec", "nosuid", "nodev", "size=65536k"} - spliti := strings.SplitN(i, ":", 2) - if len(spliti) > 1 { - if _, _, err := mount.ParseTmpfsOptions(spliti[1]); err != nil { - return nil, err - } - options = strings.Split(spliti[1], ",") - } - // Default options if nothing passed - g.AddTmpfsMount(spliti[0], options) - } - - for name, val := range config.Env { - g.AddProcessEnv(name, val) - } - - if err := addRlimits(config, &g); err != nil { - return nil, err - } - - if err := addPidNS(config, &g); err != nil { - return nil, err - } - - if err := addNetNS(config, &g); err != nil { - return nil, err - } - - if err := addUTSNS(config, &g); err != nil { - return nil, err - } - - if err := addIpcNS(config, &g); err != nil { - return nil, err - } - configSpec := g.Spec() - - if config.SeccompProfilePath != "" && config.SeccompProfilePath != "unconfined" { - seccompProfile, err := ioutil.ReadFile(config.SeccompProfilePath) - if err != nil { - return nil, errors.Wrapf(err, "opening seccomp profile (%s) failed", config.SeccompProfilePath) - } - var seccompConfig spec.LinuxSeccomp - if err := json.Unmarshal(seccompProfile, &seccompConfig); err != nil { - return nil, errors.Wrapf(err, "decoding seccomp profile (%s) failed", config.SeccompProfilePath) - } - configSpec.Linux.Seccomp = &seccompConfig - } - - // BIND MOUNTS - mounts, err := config.GetVolumeMounts() - if err != nil { - return nil, errors.Wrapf(err, "error getting volume mounts") - } - configSpec.Mounts = append(configSpec.Mounts, mounts...) - for _, mount := range configSpec.Mounts { - for _, opt := range mount.Options { - switch opt { - case "private", "rprivate", "slave", "rslave", "shared", "rshared": - if err := g.SetLinuxRootPropagation(opt); err != nil { - return nil, errors.Wrapf(err, "error setting root propagation for %q", mount.Destination) - } - } - } - } - - // HANDLE CAPABILITIES - if err := setupCapabilities(config, configSpec); err != nil { - return nil, err - } - - /* - Hooks: &configSpec.Hooks{}, - //Annotations - Resources: &configSpec.LinuxResources{ - Devices: config.GetDefaultDevices(), - BlockIO: &blkio, - //HugepageLimits: - Network: &configSpec.LinuxNetwork{ - // ClassID *uint32 - // Priorites []LinuxInterfacePriority - }, - }, - //CgroupsPath: - //Namespaces: []LinuxNamespace - //Devices - // DefaultAction: - // Architectures - // Syscalls: - }, - // RootfsPropagation - // MaskedPaths - // ReadonlyPaths: - // IntelRdt - }, - } - */ - return configSpec, nil -} - -func (c *createConfig) CreateBlockIO() (spec.LinuxBlockIO, error) { - bio := spec.LinuxBlockIO{} - bio.Weight = &c.Resources.BlkioWeight - if len(c.Resources.BlkioWeightDevice) > 0 { - var lwds []spec.LinuxWeightDevice - for _, i := range c.Resources.BlkioWeightDevice { - wd, err := validateweightDevice(i) - if err != nil { - return bio, errors.Wrapf(err, "invalid values for blkio-weight-device") - } - wdStat := getStatFromPath(wd.path) - lwd := spec.LinuxWeightDevice{ - Weight: &wd.weight, - } - lwd.Major = int64(unix.Major(wdStat.Rdev)) - lwd.Minor = int64(unix.Minor(wdStat.Rdev)) - lwds = append(lwds, lwd) - } - } - if len(c.Resources.DeviceReadBps) > 0 { - readBps, err := makeThrottleArray(c.Resources.DeviceReadBps) - if err != nil { - return bio, err - } - bio.ThrottleReadBpsDevice = readBps - } - if len(c.Resources.DeviceWriteBps) > 0 { - writeBpds, err := makeThrottleArray(c.Resources.DeviceWriteBps) - if err != nil { - return bio, err - } - bio.ThrottleWriteBpsDevice = writeBpds - } - if len(c.Resources.DeviceReadIOps) > 0 { - readIOps, err := makeThrottleArray(c.Resources.DeviceReadIOps) - if err != nil { - return bio, err - } - bio.ThrottleReadIOPSDevice = readIOps - } - if len(c.Resources.DeviceWriteIOps) > 0 { - writeIOps, err := makeThrottleArray(c.Resources.DeviceWriteIOps) - if err != nil { - return bio, err - } - bio.ThrottleWriteIOPSDevice = writeIOps - } - - return bio, nil -} - -// GetAnnotations returns the all the annotations for the container -func (c *createConfig) GetAnnotations() map[string]string { - a := getDefaultAnnotations() - // TODO - Which annotations do we want added by default - // TODO - This should be added to the DB long term - if c.Tty { - a["io.kubernetes.cri-o.TTY"] = "true" - } - return a -} - -func getDefaultAnnotations() map[string]string { - var annotations map[string]string - annotations = make(map[string]string) - annotations[ann.Annotations] = "" - annotations[ann.ContainerID] = "" - annotations[ann.ContainerName] = "" - annotations[ann.ContainerType] = "" - annotations[ann.Created] = "" - annotations[ann.HostName] = "" - annotations[ann.IP] = "" - annotations[ann.Image] = "" - annotations[ann.ImageName] = "" - annotations[ann.ImageRef] = "" - annotations[ann.KubeName] = "" - annotations[ann.Labels] = "" - annotations[ann.LogPath] = "" - annotations[ann.Metadata] = "" - annotations[ann.Name] = "" - annotations[ann.PrivilegedRuntime] = "" - annotations[ann.ResolvPath] = "" - annotations[ann.HostnamePath] = "" - annotations[ann.SandboxID] = "" - annotations[ann.SandboxName] = "" - annotations[ann.ShmPath] = "" - annotations[ann.MountPoint] = "" - annotations[ann.TrustedSandbox] = "" - annotations[ann.TTY] = "false" - annotations[ann.Stdin] = "" - annotations[ann.StdinOnce] = "" - annotations[ann.Volumes] = "" - - return annotations -} - -//GetVolumeMounts takes user provided input for bind mounts and creates Mount structs -func (c *createConfig) GetVolumeMounts() ([]spec.Mount, error) { - var m []spec.Mount - var options []string - for _, i := range c.Volumes { - // We need to handle SELinux options better here, specifically :Z - spliti := strings.Split(i, ":") - if len(spliti) > 2 { - options = strings.Split(spliti[2], ",") - } - options = append(options, "rbind") - var foundrw, foundro, foundz, foundZ bool - var rootProp string - for _, opt := range options { - switch opt { - case "rw": - foundrw = true - case "ro": - foundro = true - case "z": - foundz = true - case "Z": - foundZ = true - case "private", "rprivate", "slave", "rslave", "shared", "rshared": - rootProp = opt - } - } - if !foundrw && !foundro { - options = append(options, "rw") - } - if foundz { - if err := label.Relabel(spliti[0], c.MountLabel, true); err != nil { - return nil, errors.Wrapf(err, "relabel failed %q", spliti[0]) - } - } - if foundZ { - if err := label.Relabel(spliti[0], c.MountLabel, false); err != nil { - return nil, errors.Wrapf(err, "relabel failed %q", spliti[0]) - } - } - if rootProp == "" { - options = append(options, "rprivate") - } - - m = append(m, spec.Mount{ - Destination: spliti[1], - Type: string(TypeBind), - Source: spliti[0], - Options: options, - }) - } - return m, nil -} - -//GetTmpfsMounts takes user provided input for Tmpfs mounts and creates Mount structs -func (c *createConfig) GetTmpfsMounts() []spec.Mount { - var m []spec.Mount - for _, i := range c.Tmpfs { - // Default options if nothing passed - options := []string{"rw", "noexec", "nosuid", "nodev", "size=65536k"} - spliti := strings.Split(i, ":") - destPath := spliti[0] - if len(spliti) > 1 { - options = strings.Split(spliti[1], ",") - } - m = append(m, spec.Mount{ - Destination: destPath, - Type: string(TypeTmpfs), - Options: options, - Source: string(TypeTmpfs), - }) - } - return m -} - -func (c *createConfig) GetContainerCreateOptions() ([]libpod.CtrCreateOption, error) { - var options []libpod.CtrCreateOption - - // Uncomment after talking to mheon about unimplemented funcs - // options = append(options, libpod.WithLabels(c.labels)) - - if c.Interactive { - options = append(options, libpod.WithStdin()) - } - if c.Name != "" { - logrus.Debugf("appending name %s", c.Name) - options = append(options, libpod.WithName(c.Name)) - } - // TODO parse ports into libpod format and include - // TODO should not happen if --net=host - options = append(options, libpod.WithNetNS([]ocicni.PortMapping{})) - - return options, nil -} - -func getStatFromPath(path string) unix.Stat_t { - s := unix.Stat_t{} - _ = unix.Stat(path, &s) - return s -} - -func makeThrottleArray(throttleInput []string) ([]spec.LinuxThrottleDevice, error) { - var ltds []spec.LinuxThrottleDevice - for _, i := range throttleInput { - t, err := validateBpsDevice(i) - if err != nil { - return []spec.LinuxThrottleDevice{}, err - } - ltd := spec.LinuxThrottleDevice{} - ltd.Rate = t.rate - ltdStat := getStatFromPath(t.path) - ltd.Major = int64(unix.Major(ltdStat.Rdev)) - ltd.Minor = int64(unix.Major(ltdStat.Rdev)) - ltds = append(ltds, ltd) - } - return ltds, nil -} diff --git a/cmd/kpod/spec_test.go b/cmd/kpod/spec_test.go deleted file mode 100644 index 01e1a4ad3..000000000 --- a/cmd/kpod/spec_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package main - -import ( - "reflect" - "testing" - - spec "github.com/opencontainers/runtime-spec/specs-go" - "github.com/stretchr/testify/assert" -) - -func TestCreateConfig_GetVolumeMounts(t *testing.T) { - data := spec.Mount{ - Destination: "/foobar", - Type: "bind", - Source: "foobar", - Options: []string{"ro", "rbind", "rprivate"}, - } - config := createConfig{ - Volumes: []string{"foobar:/foobar:ro"}, - } - specMount, err := config.GetVolumeMounts() - assert.NoError(t, err) - assert.True(t, reflect.DeepEqual(data, specMount[0])) -} - -func TestCreateConfig_GetTmpfsMounts(t *testing.T) { - data := spec.Mount{ - Destination: "/homer", - Type: "tmpfs", - Source: "tmpfs", - Options: []string{"rw", "size=787448k", "mode=1777"}, - } - config := createConfig{ - Tmpfs: []string{"/homer:rw,size=787448k,mode=1777"}, - } - tmpfsMount := config.GetTmpfsMounts() - assert.True(t, reflect.DeepEqual(data, tmpfsMount[0])) - -} diff --git a/cmd/kpod/start.go b/cmd/kpod/start.go deleted file mode 100644 index 88dadb1c8..000000000 --- a/cmd/kpod/start.go +++ /dev/null @@ -1,131 +0,0 @@ -package main - -import ( - "fmt" - "os" - "strconv" - "sync" - - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/sirupsen/logrus" - "github.com/urfave/cli" -) - -var ( - startFlags = []cli.Flag{ - cli.BoolFlag{ - Name: "attach, a", - Usage: "Attach container's STDOUT and STDERR", - }, - cli.StringFlag{ - Name: "detach-keys", - Usage: "Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl- where is one of: a-z, @, ^, [, , or _.", - }, - cli.BoolFlag{ - Name: "interactive, i", - Usage: "Keep STDIN open even if not attached", - }, - } - startDescription = ` - kpod start - - Starts one or more containers. The container name or ID can be used. -` - - startCommand = cli.Command{ - Name: "start", - Usage: "Start one or more containers", - Description: startDescription, - Flags: startFlags, - Action: startCmd, - ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", - UseShortOptionHandling: true, - } -) - -func startCmd(c *cli.Context) error { - args := c.Args() - if len(args) < 1 { - return errors.Errorf("you must provide at least one container name or id") - } - - attach := c.Bool("attach") - - if len(args) > 1 && attach { - return errors.Errorf("you cannot start and attach multiple containers at once") - } - - if err := validateFlags(c, startFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "error creating libpod runtime") - } - defer runtime.Shutdown(false) - - var lastError error - for _, container := range args { - // Create a bool channel to track that the console socket attach - // is successful. - attached := make(chan bool) - // Create a waitgroup so we can sync and wait for all goroutines - // to finish before exiting main - var wg sync.WaitGroup - - ctr, err := runtime.LookupContainer(container) - if err != nil { - if lastError != nil { - fmt.Fprintln(os.Stderr, lastError) - } - lastError = errors.Wrapf(err, "unable to find container %s", container) - continue - } - - if err := ctr.Init(); err != nil && errors.Cause(err) != libpod.ErrCtrExists { - return err - } - - // We can only be interactive if both the config and the command-line say so - if c.Bool("interactive") && !ctr.Config().Stdin { - return errors.Errorf("the container was not created with the interactive option") - } - noStdIn := c.Bool("interactive") - tty, err := strconv.ParseBool(ctr.Spec().Annotations["io.kubernetes.cri-o.TTY"]) - if err != nil { - return errors.Wrapf(err, "unable to parse annotations in %s", ctr.ID()) - } - // We only get a terminal session if both a tty was specified in the spec and - // -a on the command-line was given. - if attach && tty { - // We increment the wg counter because we need to do the attach - wg.Add(1) - // Attach to the running container - go func() { - logrus.Debugf("trying to attach to the container %s", ctr.ID()) - defer wg.Done() - if err := ctr.Attach(noStdIn, c.String("detach-keys"), attached); err != nil { - logrus.Errorf("unable to attach to container %s: %q", ctr.ID(), err) - } - }() - if !<-attached { - return errors.Errorf("unable to attach to container %s", ctr.ID()) - } - } - err = ctr.Start() - if err != nil { - if lastError != nil { - fmt.Fprintln(os.Stderr, lastError) - } - lastError = errors.Wrapf(err, "unable to start %s", container) - continue - } - if !attach { - fmt.Println(ctr.ID()) - } - wg.Wait() - } - return lastError -} diff --git a/cmd/kpod/stats.go b/cmd/kpod/stats.go deleted file mode 100644 index d98c2ee27..000000000 --- a/cmd/kpod/stats.go +++ /dev/null @@ -1,226 +0,0 @@ -package main - -import ( - "fmt" - "reflect" - "strings" - "time" - - tm "github.com/buger/goterm" - "github.com/docker/go-units" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/cmd/kpod/formats" - "github.com/projectatomic/libpod/libpod" - "github.com/urfave/cli" -) - -type statsOutputParams struct { - Container string `json:"name"` - ID string `json:"id"` - CPUPerc string `json:"cpu_percent"` - MemUsage string `json:"mem_usage"` - MemPerc string `json:"mem_percent"` - NetIO string `json:"netio"` - BlockIO string `json:"blocki"` - PIDS uint64 `json:"pids"` -} - -var ( - statsFlags = []cli.Flag{ - cli.BoolFlag{ - Name: "all, a", - Usage: "show all containers. Only running containers are shown by default. The default is false", - }, - cli.BoolFlag{ - Name: "no-stream", - Usage: "disable streaming stats and only pull the first result, default setting is false", - }, - cli.StringFlag{ - Name: "format", - Usage: "pretty-print container statistics using a Go template", - }, - cli.BoolFlag{ - Name: "no-reset", - Usage: "disable resetting the screen between intervals", - }, - } - - statsDescription = "display a live stream of one or more containers' resource usage statistics" - statsCommand = cli.Command{ - Name: "stats", - Usage: "Display percentage of CPU, memory, network I/O, block I/O and PIDs for one or more containers", - Description: statsDescription, - Flags: statsFlags, - Action: statsCmd, - ArgsUsage: "", - } -) - -func statsCmd(c *cli.Context) error { - if err := validateFlags(c, statsFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - times := -1 - if c.Bool("no-stream") { - times = 1 - } - - var format string - var ctrs []*libpod.Container - var containerFunc func() ([]*libpod.Container, error) - all := c.Bool("all") - - if c.IsSet("format") { - format = c.String("format") - } else { - format = genStatsFormat() - } - - if len(c.Args()) > 0 { - containerFunc = func() ([]*libpod.Container, error) { return runtime.GetContainersByList(c.Args()) } - } else if all { - containerFunc = runtime.GetAllContainers - } else { - containerFunc = runtime.GetRunningContainers - } - - ctrs, err = containerFunc() - if err != nil { - return errors.Wrapf(err, "unable to get list of containers") - } - - containerStats := map[string]*libpod.ContainerStats{} - for _, ctr := range ctrs { - initialStats, err := ctr.GetContainerStats(&libpod.ContainerStats{}) - if err != nil { - return err - } - containerStats[ctr.ID()] = initialStats - } - step := 1 - if times == -1 { - times = 1 - step = 0 - } - for i := 0; i < times; i += step { - reportStats := []*libpod.ContainerStats{} - for _, ctr := range ctrs { - id := ctr.ID() - if _, ok := containerStats[ctr.ID()]; !ok { - initialStats, err := ctr.GetContainerStats(&libpod.ContainerStats{}) - if err != nil { - return err - } - containerStats[id] = initialStats - } - stats, err := ctr.GetContainerStats(containerStats[id]) - if err != nil { - return err - } - // replace the previous measurement with the current one - containerStats[id] = stats - reportStats = append(reportStats, stats) - } - ctrs, err = containerFunc() - if err != nil { - return err - } - if strings.ToLower(format) != formats.JSONString && !c.Bool("no-reset") { - tm.Clear() - tm.MoveCursor(1, 1) - tm.Flush() - } - outputStats(reportStats, format) - time.Sleep(time.Second) - } - return nil -} - -func outputStats(stats []*libpod.ContainerStats, format string) error { - var out formats.Writer - var outputStats []statsOutputParams - for _, s := range stats { - outputStats = append(outputStats, getStatsOutputParams(s)) - } - if len(outputStats) == 0 { - return nil - } - if strings.ToLower(format) == formats.JSONString { - out = formats.JSONStructArray{Output: statsToGeneric(outputStats, []statsOutputParams{})} - } else { - out = formats.StdoutTemplateArray{Output: statsToGeneric(outputStats, []statsOutputParams{}), Template: format, Fields: outputStats[0].headerMap()} - } - return formats.Writer(out).Out() -} - -func genStatsFormat() (format string) { - return "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}\t{{.PIDS}}" -} - -// imagesToGeneric creates an empty array of interfaces for output -func statsToGeneric(templParams []statsOutputParams, JSONParams []statsOutputParams) (genericParams []interface{}) { - if len(templParams) > 0 { - for _, v := range templParams { - genericParams = append(genericParams, interface{}(v)) - } - return - } - for _, v := range JSONParams { - genericParams = append(genericParams, interface{}(v)) - } - return -} - -// generate the header based on the template provided -func (i *statsOutputParams) headerMap() map[string]string { - v := reflect.Indirect(reflect.ValueOf(i)) - values := make(map[string]string) - - for i := 0; i < v.NumField(); i++ { - key := v.Type().Field(i).Name - value := key - switch value { - case "CPUPerc": - value = "CPU%" - case "MemUsage": - value = "MemUsage/Limit" - case "MemPerc": - value = "Mem%" - } - values[key] = strings.ToUpper(splitCamelCase(value)) - } - return values -} - -func combineHumanValues(a, b uint64) string { - return fmt.Sprintf("%s / %s", units.HumanSize(float64(a)), units.HumanSize(float64(b))) -} - -func floatToPercentString(f float64) string { - strippedFloat, err := libpod.RemoveScientificNotationFromFloat(f) - if err != nil { - // If things go bazinga, return a safe value - return "0.00 %" - } - return fmt.Sprintf("%.2f", strippedFloat) + "%" -} - -func getStatsOutputParams(stats *libpod.ContainerStats) statsOutputParams { - return statsOutputParams{ - Container: stats.ContainerID[:12], - ID: stats.ContainerID, - CPUPerc: floatToPercentString(stats.CPU), - MemUsage: combineHumanValues(stats.MemUsage, stats.MemLimit), - MemPerc: floatToPercentString(stats.MemPerc), - NetIO: combineHumanValues(stats.NetInput, stats.NetOutput), - BlockIO: combineHumanValues(stats.BlockInput, stats.BlockOutput), - PIDS: stats.PIDs, - } -} diff --git a/cmd/kpod/stop.go b/cmd/kpod/stop.go deleted file mode 100644 index f18fbc232..000000000 --- a/cmd/kpod/stop.go +++ /dev/null @@ -1,104 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/sirupsen/logrus" - "github.com/urfave/cli" -) - -var ( - defaultTimeout int64 = 10 - stopFlags = []cli.Flag{ - cli.Int64Flag{ - Name: "timeout, t", - Usage: "Seconds to wait for stop before killing the container", - Value: defaultTimeout, - }, - cli.BoolFlag{ - Name: "all, a", - Usage: "stop all running containers", - }, - } - stopDescription = ` - kpod stop - - Stops one or more running containers. The container name or ID can be used. - A timeout to forcibly stop the container can also be set but defaults to 10 - seconds otherwise. -` - - stopCommand = cli.Command{ - Name: "stop", - Usage: "Stop one or more containers", - Description: stopDescription, - Flags: stopFlags, - Action: stopCmd, - ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", - } -) - -func stopCmd(c *cli.Context) error { - args := c.Args() - stopTimeout := c.Int64("timeout") - if c.Bool("all") && len(args) > 0 { - return errors.Errorf("no arguments are needed with -a") - } - if len(args) < 1 && !c.Bool("all") { - return errors.Errorf("you must provide at least one container name or id") - } - if err := validateFlags(c, stopFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - logrus.Debugf("Stopping containers with timeout %d", stopTimeout) - - var filterFuncs []libpod.ContainerFilter - var containers []*libpod.Container - var lastError error - - if c.Bool("all") { - // only get running containers - filterFuncs = append(filterFuncs, func(c *libpod.Container) bool { - state, _ := c.State() - return state == libpod.ContainerStateRunning - }) - containers, err = runtime.GetContainers(filterFuncs...) - if err != nil { - return errors.Wrapf(err, "unable to get running containers") - } - } else { - for _, i := range args { - container, err := runtime.LookupContainer(i) - if err != nil { - if lastError != nil { - fmt.Fprintln(os.Stderr, lastError) - } - lastError = errors.Wrapf(err, "unable to find container %s", i) - continue - } - containers = append(containers, container) - } - } - - for _, ctr := range containers { - if err := ctr.Stop(stopTimeout); err != nil { - if lastError != nil { - fmt.Fprintln(os.Stderr, lastError) - } - lastError = errors.Wrapf(err, "failed to stop container %v", ctr.ID()) - } else { - fmt.Println(ctr.ID()) - } - } - return lastError -} diff --git a/cmd/kpod/tag.go b/cmd/kpod/tag.go deleted file mode 100644 index f29c8c182..000000000 --- a/cmd/kpod/tag.go +++ /dev/null @@ -1,77 +0,0 @@ -package main - -import ( - "github.com/containers/image/docker/reference" - "github.com/containers/storage" - "github.com/pkg/errors" - "github.com/projectatomic/libpod/libpod" - "github.com/urfave/cli" -) - -var ( - tagDescription = "Adds one or more additional names to locally-stored image" - tagCommand = cli.Command{ - Name: "tag", - Usage: "Add an additional name to a local image", - Description: tagDescription, - Action: tagCmd, - ArgsUsage: "IMAGE-NAME [IMAGE-NAME ...]", - } -) - -func tagCmd(c *cli.Context) error { - args := c.Args() - if len(args) < 2 { - return errors.Errorf("image name and at least one new name must be specified") - } - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not create runtime") - } - defer runtime.Shutdown(false) - - img, err := runtime.GetImage(args[0]) - if err != nil { - return err - } - if img == nil { - return errors.New("null image") - } - err = addImageNames(runtime, img, args[1:]) - if err != nil { - return errors.Wrapf(err, "error adding names %v to image %q", args[1:], args[0]) - } - return nil -} - -func addImageNames(runtime *libpod.Runtime, image *storage.Image, addNames []string) error { - // Add tags to the names if applicable - names, err := expandedTags(addNames) - if err != nil { - return err - } - for _, name := range names { - if err := runtime.TagImage(image, name); err != nil { - return errors.Wrapf(err, "error adding name (%v) to image %q", name, image.ID) - } - } - return nil -} - -func expandedTags(tags []string) ([]string, error) { - expandedNames := []string{} - for _, tag := range tags { - var labelName string - name, err := reference.Parse(tag) - if err != nil { - return nil, errors.Wrapf(err, "error parsing tag %q", name) - } - if _, ok := name.(reference.NamedTagged); ok { - labelName = name.String() - } else { - labelName = name.String() + ":latest" - } - expandedNames = append(expandedNames, labelName) - } - return expandedNames, nil -} diff --git a/cmd/kpod/top.go b/cmd/kpod/top.go deleted file mode 100644 index 0c1eabbdb..000000000 --- a/cmd/kpod/top.go +++ /dev/null @@ -1,258 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "strings" - - "github.com/pkg/errors" - "github.com/projectatomic/libpod/cmd/kpod/formats" - "github.com/projectatomic/libpod/libpod" - "github.com/urfave/cli" -) - -var ( - topFlags = []cli.Flag{ - cli.StringFlag{ - Name: "format", - Usage: "Change the output to JSON", - }, - } - topDescription = ` - kpod top - - Display the running processes of the container. -` - - topCommand = cli.Command{ - Name: "top", - Usage: "Display the running processes of a container", - Description: topDescription, - Flags: topFlags, - Action: topCmd, - ArgsUsage: "CONTAINER-NAME", - SkipArgReorder: true, - } -) - -func topCmd(c *cli.Context) error { - doJSON := false - if c.IsSet("format") { - if strings.ToUpper(c.String("format")) == "JSON" { - doJSON = true - } else { - return errors.Errorf("only 'json' is supported for a format option") - } - } - args := c.Args() - var psArgs []string - psOpts := []string{"-o", "uid,pid,ppid,c,stime,tname,time,cmd"} - if len(args) < 1 { - return errors.Errorf("you must provide the name or id of a running container") - } - if err := validateFlags(c, topFlags); err != nil { - return err - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "error creating libpod runtime") - } - defer runtime.Shutdown(false) - if len(args) > 1 { - psOpts = args[1:] - } - - container, err := runtime.LookupContainer(args[0]) - if err != nil { - return errors.Wrapf(err, "unable to lookup %s", args[0]) - } - conStat, err := container.State() - if err != nil { - return errors.Wrapf(err, "unable to look up state for %s", args[0]) - } - if conStat != libpod.ContainerStateRunning { - return errors.Errorf("top can only be used on running containers") - } - - psArgs = append(psArgs, psOpts...) - - results, err := container.GetContainerPidInformation(psArgs) - if err != nil { - return err - } - headers := getHeaders(results[0]) - format := genTopFormat(headers) - var out formats.Writer - psParams, err := psDataToPSParams(results[1:], headers) - if err != nil { - return errors.Wrap(err, "unable to convert ps data to proper structure") - } - if doJSON { - out = formats.JSONStructArray{Output: topToGeneric(psParams)} - } else { - out = formats.StdoutTemplateArray{Output: topToGeneric(psParams), Template: format, Fields: createTopHeaderMap(headers)} - } - formats.Writer(out).Out() - return nil -} - -func getHeaders(s string) []string { - var headers []string - tmpHeaders := strings.Fields(s) - for _, header := range tmpHeaders { - headers = append(headers, strings.Replace(header, "%", "", -1)) - } - return headers -} - -func genTopFormat(headers []string) string { - format := "table " - for _, header := range headers { - format = fmt.Sprintf("%s{{.%s}}\t", format, header) - } - return format -} - -// imagesToGeneric creates an empty array of interfaces for output -func topToGeneric(templParams []PSParams) (genericParams []interface{}) { - for _, v := range templParams { - genericParams = append(genericParams, interface{}(v)) - } - return -} - -// generate the header based on the template provided -func createTopHeaderMap(v []string) map[string]string { - values := make(map[string]string) - for _, key := range v { - value := key - if value == "CPU" { - value = "%CPU" - } else if value == "MEM" { - value = "%MEM" - } - values[key] = strings.ToUpper(splitCamelCase(value)) - } - return values -} - -// PSDataToParams converts a string array of data and its headers to an -// arra if PSParams -func psDataToPSParams(data []string, headers []string) ([]PSParams, error) { - var params []PSParams - for _, line := range data { - tmpMap := make(map[string]string) - tmpArray := strings.Fields(line) - if len(tmpArray) == 0 { - continue - } - for index, v := range tmpArray { - header := headers[index] - tmpMap[header] = v - } - jsonData, _ := json.Marshal(tmpMap) - var r PSParams - err := json.Unmarshal(jsonData, &r) - if err != nil { - return []PSParams{}, err - } - params = append(params, r) - } - return params, nil -} - -//PSParams is a list of options that the command line ps recognizes -type PSParams struct { - CPU string - MEM string - COMMAND string - BLOCKED string - START string - TIME string - C string - CAUGHT string - CGROUP string - CLSCLS string - CLS string - CMD string - CP string - DRS string - EGID string - EGROUP string - EIP string - ESP string - ELAPSED string - EUIDE string - USER string - F string - FGID string - FGROUP string - FUID string - FUSER string - GID string - GROUP string - IGNORED string - IPCNS string - LABEL string - STARTED string - SESSION string - LWP string - MACHINE string - MAJFLT string - MINFLT string - MNTNS string - NETNS string - NI string - NLWP string - OWNER string - PENDING string - PGID string - PGRP string - PID string - PIDNS string - POL string - PPID string - PRI string - PSR string - RGID string - RGROUP string - RSS string - RSZ string - RTPRIO string - RUID string - RUSER string - S string - SCH string - SEAT string - SESS string - P string - SGID string - SGROUP string - SID string - SIZE string - SLICE string - SPID string - STACKP string - STIME string - SUID string - SUPGID string - SUPGRP string - SUSER string - SVGID string - SZ string - TGID string - THCNT string - TID string - TTY string - TPGID string - TRS string - TT string - UID string - UNIT string - USERNS string - UTSNS string - UUNIT string - VSZ string - WCHAN string -} diff --git a/cmd/kpod/umount.go b/cmd/kpod/umount.go deleted file mode 100644 index 4b6aba99e..000000000 --- a/cmd/kpod/umount.go +++ /dev/null @@ -1,40 +0,0 @@ -package main - -import ( - "github.com/pkg/errors" - "github.com/urfave/cli" -) - -var ( - umountCommand = cli.Command{ - Name: "umount", - Aliases: []string{"unmount"}, - Usage: "Unmount a working container's root filesystem", - Description: "Unmounts a working container's root filesystem", - Action: umountCmd, - ArgsUsage: "CONTAINER-NAME-OR-ID", - } -) - -func umountCmd(c *cli.Context) error { - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - args := c.Args() - if len(args) == 0 { - return errors.Errorf("container ID must be specified") - } - if len(args) > 1 { - return errors.Errorf("too many arguments specified") - } - - ctr, err := runtime.LookupContainer(args[0]) - if err != nil { - return errors.Wrapf(err, "error looking up container %q", args[0]) - } - - return ctr.Unmount() -} diff --git a/cmd/kpod/unpause.go b/cmd/kpod/unpause.go deleted file mode 100644 index 6deed7e77..000000000 --- a/cmd/kpod/unpause.go +++ /dev/null @@ -1,58 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "github.com/pkg/errors" - "github.com/urfave/cli" -) - -var ( - unpauseDescription = ` - kpod unpause - - Unpauses one or more running containers. The container name or ID can be used. -` - unpauseCommand = cli.Command{ - Name: "unpause", - Usage: "Unpause the processes in one or more containers", - Description: unpauseDescription, - Action: unpauseCmd, - ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", - } -) - -func unpauseCmd(c *cli.Context) error { - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "could not get runtime") - } - defer runtime.Shutdown(false) - - args := c.Args() - if len(args) < 1 { - return errors.Errorf("you must provide at least one container name or id") - } - - var lastError error - for _, arg := range args { - ctr, err := runtime.LookupContainer(arg) - if err != nil { - if lastError != nil { - fmt.Fprintln(os.Stderr, lastError) - } - lastError = errors.Wrapf(err, "error looking up container %q", arg) - continue - } - if err = ctr.Unpause(); err != nil { - if lastError != nil { - fmt.Fprintln(os.Stderr, lastError) - } - lastError = errors.Wrapf(err, "failed to unpause container %v", ctr.ID()) - } else { - fmt.Println(ctr.ID()) - } - } - return lastError -} diff --git a/cmd/kpod/user.go b/cmd/kpod/user.go deleted file mode 100644 index 3e2e308c5..000000000 --- a/cmd/kpod/user.go +++ /dev/null @@ -1,121 +0,0 @@ -package main - -// #include -// #include -// #include -// #include -// #include -// #include -// typedef FILE * pFILE; -import "C" - -import ( - "fmt" - "os/user" - "path/filepath" - "sync" - "syscall" - "unsafe" - - "github.com/pkg/errors" -) - -func fopenContainerFile(rootdir, filename string) (C.pFILE, error) { - var st, lst syscall.Stat_t - - ctrfile := filepath.Join(rootdir, filename) - cctrfile := C.CString(ctrfile) - defer C.free(unsafe.Pointer(cctrfile)) - mode := C.CString("r") - defer C.free(unsafe.Pointer(mode)) - f, err := C.fopen(cctrfile, mode) - if f == nil || err != nil { - return nil, errors.Wrapf(err, "error opening %q", ctrfile) - } - if err = syscall.Fstat(int(C.fileno(f)), &st); err != nil { - return nil, errors.Wrapf(err, "fstat(%q)", ctrfile) - } - if err = syscall.Lstat(ctrfile, &lst); err != nil { - return nil, errors.Wrapf(err, "lstat(%q)", ctrfile) - } - if st.Dev != lst.Dev || st.Ino != lst.Ino { - return nil, errors.Errorf("%q is not a regular file", ctrfile) - } - return f, nil -} - -var ( - lookupUser, lookupGroup sync.Mutex -) - -func lookupUserInContainer(rootdir, username string) (uint64, uint64, error) { - name := C.CString(username) - defer C.free(unsafe.Pointer(name)) - - f, err := fopenContainerFile(rootdir, "/etc/passwd") - if err != nil { - return 0, 0, err - } - defer C.fclose(f) - - lookupUser.Lock() - defer lookupUser.Unlock() - - pwd := C.fgetpwent(f) - for pwd != nil { - if C.strcmp(pwd.pw_name, name) != 0 { - pwd = C.fgetpwent(f) - continue - } - return uint64(pwd.pw_uid), uint64(pwd.pw_gid), nil - } - - return 0, 0, user.UnknownUserError(fmt.Sprintf("error looking up user %q", username)) -} - -func lookupGroupForUIDInContainer(rootdir string, userid uint64) (string, uint64, error) { - f, err := fopenContainerFile(rootdir, "/etc/passwd") - if err != nil { - return "", 0, err - } - defer C.fclose(f) - - lookupUser.Lock() - defer lookupUser.Unlock() - - pwd := C.fgetpwent(f) - for pwd != nil { - if uint64(pwd.pw_uid) != userid { - pwd = C.fgetpwent(f) - continue - } - return C.GoString(pwd.pw_name), uint64(pwd.pw_gid), nil - } - - return "", 0, user.UnknownUserError(fmt.Sprintf("error looking up user with UID %d", userid)) -} - -func lookupGroupInContainer(rootdir, groupname string) (uint64, error) { - name := C.CString(groupname) - defer C.free(unsafe.Pointer(name)) - - f, err := fopenContainerFile(rootdir, "/etc/group") - if err != nil { - return 0, err - } - defer C.fclose(f) - - lookupGroup.Lock() - defer lookupGroup.Unlock() - - grp := C.fgetgrent(f) - for grp != nil { - if C.strcmp(grp.gr_name, name) != 0 { - grp = C.fgetgrent(f) - continue - } - return uint64(grp.gr_gid), nil - } - - return 0, user.UnknownGroupError(fmt.Sprintf("error looking up group %q", groupname)) -} diff --git a/cmd/kpod/version.go b/cmd/kpod/version.go deleted file mode 100644 index 586c41da6..000000000 --- a/cmd/kpod/version.go +++ /dev/null @@ -1,48 +0,0 @@ -package main - -import ( - "fmt" - "runtime" - "strconv" - "time" - - "github.com/urfave/cli" -) - -// Overwritten at build time -var ( - // gitCommit is the commit that the binary is being built from. - // It will be populated by the Makefile. - gitCommit string - // buildInfo is the time at which the binary was built - // It will be populated by the Makefile. - buildInfo string -) - -// versionCmd gets and prints version info for version command -func versionCmd(c *cli.Context) error { - fmt.Println("Version: ", c.App.Version) - fmt.Println("Go Version: ", runtime.Version()) - if gitCommit != "" { - fmt.Println("Git Commit: ", gitCommit) - } - if buildInfo != "" { - // Converts unix time from string to int64 - buildTime, err := strconv.ParseInt(buildInfo, 10, 64) - if err != nil { - return err - } - // Prints out the build time in readable format - fmt.Println("Built: ", time.Unix(buildTime, 0).Format(time.ANSIC)) - } - fmt.Println("OS/Arch: ", runtime.GOOS+"/"+runtime.GOARCH) - - return nil -} - -// Cli command to print out the full version of kpod -var versionCommand = cli.Command{ - Name: "version", - Usage: "Display the KPOD Version Information", - Action: versionCmd, -} diff --git a/cmd/kpod/wait.go b/cmd/kpod/wait.go deleted file mode 100644 index 6e22f54e5..000000000 --- a/cmd/kpod/wait.go +++ /dev/null @@ -1,61 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "github.com/pkg/errors" - "github.com/urfave/cli" -) - -var ( - waitDescription = ` - kpod wait - - Block until one or more containers stop and then print their exit codes -` - - waitCommand = cli.Command{ - Name: "wait", - Usage: "Block on one or more containers", - Description: waitDescription, - Action: waitCmd, - ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", - } -) - -func waitCmd(c *cli.Context) error { - args := c.Args() - if len(args) < 1 { - return errors.Errorf("you must provide at least one container name or id") - } - - runtime, err := getRuntime(c) - if err != nil { - return errors.Wrapf(err, "error creating libpod runtime") - } - defer runtime.Shutdown(false) - - if err != nil { - return errors.Wrapf(err, "could not get config") - } - - var lastError error - for _, container := range c.Args() { - ctr, err := runtime.LookupContainer(container) - if err != nil { - return errors.Wrapf(err, "unable to find container %s", container) - } - returnCode, err := ctr.Wait() - if err != nil { - if lastError != nil { - fmt.Fprintln(os.Stderr, lastError) - } - lastError = errors.Wrapf(err, "failed to wait for the container %v", container) - } else { - fmt.Println(returnCode) - } - } - - return lastError -} diff --git a/cmd/podman/README.md b/cmd/podman/README.md new file mode 100644 index 000000000..6978b056a --- /dev/null +++ b/cmd/podman/README.md @@ -0,0 +1,16 @@ +# podman - Simple debugging tool for pods and images +podman is a simple client only tool to help with debugging issues when daemons such as CRI runtime and the kubelet are not responding or +failing. A shared API layer could be created to share code between the daemon and podman. podman does not require any daemon running. podman +utilizes the same underlying components that crio uses i.e. containers/image, container/storage, oci-runtime-tool/generate, runc or +any other OCI compatible runtime. podman shares state with crio and so has the capability to debug pods/images created by crio. + +## Use cases +1. List pods. +2. Launch simple pods (that require no daemon support). +3. Exec commands in a container in a pod. +4. Launch additional containers in a pod. +5. List images. +6. Remove images not in use. +7. Pull images. +8. Check image size. +9. Report pod disk resource usage. diff --git a/cmd/podman/attach.go b/cmd/podman/attach.go new file mode 100644 index 000000000..8c2c99fd5 --- /dev/null +++ b/cmd/podman/attach.go @@ -0,0 +1,86 @@ +package main + +import ( + "sync" + + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/sirupsen/logrus" + "github.com/urfave/cli" +) + +var ( + attachFlags = []cli.Flag{ + cli.StringFlag{ + Name: "detach-keys", + Usage: "Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl- where is one of: a-z, @, ^, [, , or _.", + }, + cli.BoolFlag{ + Name: "no-stdin", + Usage: "Do not attach STDIN. The default is false.", + }, + } + attachDescription = "The podman attach command allows you to attach to a running container using the container's ID or name, either to view its ongoing output or to control it interactively." + attachCommand = cli.Command{ + Name: "attach", + Usage: "Attach to a running container", + Description: attachDescription, + Flags: attachFlags, + Action: attachCmd, + ArgsUsage: "", + } +) + +func attachCmd(c *cli.Context) error { + args := c.Args() + if err := validateFlags(c, attachFlags); err != nil { + return err + } + + if len(c.Args()) < 1 || len(c.Args()) > 1 { + return errors.Errorf("attach requires the name or id of one running container") + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "error creating libpod runtime") + } + defer runtime.Shutdown(false) + + ctr, err := runtime.LookupContainer(args[0]) + + if err != nil { + return errors.Wrapf(err, "unable to exec into %s", args[0]) + } + + conState, err := ctr.State() + if err != nil { + return errors.Wrapf(err, "unable to determine state of %s", args[0]) + } + if conState != libpod.ContainerStateRunning { + return errors.Errorf("you can only attach to running containers") + } + // Create a bool channel to track that the console socket attach + // is successful. + attached := make(chan bool) + // Create a waitgroup so we can sync and wait for all goroutines + // to finish before exiting main + var wg sync.WaitGroup + + // We increment the wg counter because we need to do the attach + wg.Add(1) + // Attach to the running container + go func() { + logrus.Debugf("trying to attach to the container %s", ctr.ID()) + defer wg.Done() + if err := ctr.Attach(c.Bool("no-stdin"), c.String("detach-keys"), attached); err != nil { + logrus.Errorf("unable to attach to container %s: %q", ctr.ID(), err) + } + }() + if !<-attached { + return errors.Errorf("unable to attach to container %s", ctr.ID()) + } + wg.Wait() + + return nil +} diff --git a/cmd/podman/common.go b/cmd/podman/common.go new file mode 100644 index 000000000..99685107b --- /dev/null +++ b/cmd/podman/common.go @@ -0,0 +1,438 @@ +package main + +import ( + "os" + "reflect" + "regexp" + "strings" + + "github.com/containers/storage" + "github.com/fatih/camelcase" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libkpod" + "github.com/projectatomic/libpod/libpod" + "github.com/urfave/cli" +) + +var ( + stores = make(map[storage.Store]struct{}) +) + +const crioConfigPath = "/etc/crio/crio.conf" + +func getRuntime(c *cli.Context) (*libpod.Runtime, error) { + + config, err := getConfig(c) + if err != nil { + return nil, errors.Wrapf(err, "could not get config") + } + + options := storage.DefaultStoreOptions + options.GraphRoot = config.Root + options.RunRoot = config.RunRoot + options.GraphDriverName = config.Storage + options.GraphDriverOptions = config.StorageOptions + + return libpod.NewRuntime(libpod.WithStorageConfig(options), libpod.WithConmonPath(config.Conmon), libpod.WithOCIRuntime(config.Runtime), libpod.WithCNIConfigDir(config.NetworkDir)) +} + +func shutdownStores() { + for store := range stores { + if _, err := store.Shutdown(false); err != nil { + break + } + } +} + +func getConfig(c *cli.Context) (*libkpod.Config, error) { + config := libkpod.DefaultConfig() + var configFile string + if c.GlobalIsSet("config") { + configFile = c.GlobalString("config") + } else if _, err := os.Stat(crioConfigPath); err == nil { + configFile = crioConfigPath + } + // load and merge the configfile from the commandline or use + // the default crio config file + if configFile != "" { + err := config.UpdateFromFile(configFile) + if err != nil { + return config, err + } + } + if c.GlobalIsSet("root") { + config.Root = c.GlobalString("root") + } + if c.GlobalIsSet("runroot") { + config.RunRoot = c.GlobalString("runroot") + } + if c.GlobalIsSet("conmon") { + config.Conmon = c.GlobalString("conmon") + } + if c.GlobalIsSet("storage-driver") { + config.Storage = c.GlobalString("storage-driver") + } + if c.GlobalIsSet("storage-opt") { + opts := c.GlobalStringSlice("storage-opt") + if len(opts) > 0 { + config.StorageOptions = opts + } + } + if c.GlobalIsSet("runtime") { + config.Runtime = c.GlobalString("runtime") + } + if c.GlobalIsSet("cni-config-dir") { + config.NetworkDir = c.GlobalString("cni-config-dir") + } + return config, nil +} + +func splitCamelCase(src string) string { + entries := camelcase.Split(src) + return strings.Join(entries, " ") +} + +// validateFlags searches for StringFlags or StringSlice flags that never had +// a value set. This commonly occurs when the CLI mistakenly takes the next +// option and uses it as a value. +func validateFlags(c *cli.Context, flags []cli.Flag) error { + for _, flag := range flags { + switch reflect.TypeOf(flag).String() { + case "cli.StringSliceFlag": + { + f := flag.(cli.StringSliceFlag) + name := strings.Split(f.Name, ",") + val := c.StringSlice(name[0]) + for _, v := range val { + if ok, _ := regexp.MatchString("^-.+", v); ok { + return errors.Errorf("option --%s requires a value", name[0]) + } + } + } + case "cli.StringFlag": + { + f := flag.(cli.StringFlag) + name := strings.Split(f.Name, ",") + val := c.String(name[0]) + if ok, _ := regexp.MatchString("^-.+", val); ok { + return errors.Errorf("option --%s requires a value", name[0]) + } + } + } + } + return nil +} + +// Common flags shared between commands +var createFlags = []cli.Flag{ + cli.StringSliceFlag{ + Name: "add-host", + Usage: "Add a custom host-to-IP mapping (host:ip) (default [])", + }, + cli.StringSliceFlag{ + Name: "attach, a", + Usage: "Attach to STDIN, STDOUT or STDERR (default [])", + }, + cli.StringFlag{ + Name: "blkio-weight", + Usage: "Block IO weight (relative weight) accepts a weight value between 10 and 1000.", + }, + cli.StringSliceFlag{ + Name: "blkio-weight-device", + Usage: "Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`)", + }, + cli.StringSliceFlag{ + Name: "cap-add", + Usage: "Add capabilities to the container", + }, + cli.StringSliceFlag{ + Name: "cap-drop", + Usage: "Drop capabilities from the container", + }, + cli.StringFlag{ + Name: "cgroup-parent", + Usage: "Optional parent cgroup for the container", + }, + cli.StringFlag{ + Name: "cidfile", + Usage: "Write the container ID to the file", + }, + cli.Uint64Flag{ + Name: "cpu-period", + Usage: "Limit the CPU CFS (Completely Fair Scheduler) period", + }, + cli.Int64Flag{ + Name: "cpu-quota", + Usage: "Limit the CPU CFS (Completely Fair Scheduler) quota", + }, + cli.Uint64Flag{ + Name: "cpu-rt-period", + Usage: "Limit the CPU real-time period in microseconds", + }, + cli.Int64Flag{ + Name: "cpu-rt-runtime", + Usage: "Limit the CPU real-time runtime in microseconds", + }, + cli.Uint64Flag{ + Name: "cpu-shares", + Usage: "CPU shares (relative weight)", + }, + cli.StringFlag{ + Name: "cpus", + Usage: "Number of CPUs. The default is 0.000 which means no limit", + }, + cli.StringFlag{ + Name: "cpuset-cpus", + Usage: "CPUs in which to allow execution (0-3, 0,1)", + }, + cli.StringFlag{ + Name: "cpuset-mems", + Usage: "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.", + }, + cli.BoolFlag{ + Name: "detach, d", + Usage: "Run container in background and print container ID", + }, + cli.StringFlag{ + Name: "detach-keys", + Usage: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`", + }, + cli.StringSliceFlag{ + Name: "device", + Usage: "Add a host device to the container (default [])", + }, + cli.StringSliceFlag{ + Name: "device-read-bps", + Usage: "Limit read rate (bytes per second) from a device (e.g. --device-read-bps=/dev/sda:1mb)", + }, + cli.StringSliceFlag{ + Name: "device-read-iops", + Usage: "Limit read rate (IO per second) from a device (e.g. --device-read-iops=/dev/sda:1000)", + }, + cli.StringSliceFlag{ + Name: "device-write-bps", + Usage: "Limit write rate (bytes per second) to a device (e.g. --device-write-bps=/dev/sda:1mb)", + }, + cli.StringSliceFlag{ + Name: "device-write-iops", + Usage: "Limit write rate (IO per second) to a device (e.g. --device-write-iops=/dev/sda:1000)", + }, + cli.StringSliceFlag{ + Name: "dns", + Usage: "Set custom DNS servers", + }, + cli.StringSliceFlag{ + Name: "dns-opt", + Usage: "Set custom DNS options", + }, + cli.StringSliceFlag{ + Name: "dns-search", + Usage: "Set custom DNS search domains", + }, + cli.StringFlag{ + Name: "entrypoint", + Usage: "Overwrite the default ENTRYPOINT of the image", + }, + cli.StringSliceFlag{ + Name: "env, e", + Usage: "Set environment variables in container", + }, + cli.StringSliceFlag{ + Name: "env-file", + Usage: "Read in a file of environment variables", + }, + cli.StringSliceFlag{ + Name: "expose", + Usage: "Expose a port or a range of ports (default [])", + }, + cli.StringSliceFlag{ + Name: "group-add", + Usage: "Add additional groups to join (default [])", + }, + cli.StringFlag{ + Name: "hostname", + Usage: "Set container hostname", + }, + cli.BoolFlag{ + Name: "interactive, i", + Usage: "Keep STDIN open even if not attached", + }, + cli.StringFlag{ + Name: "ip", + Usage: "Container IPv4 address (e.g. 172.23.0.9)", + }, + cli.StringFlag{ + Name: "ip6", + Usage: "Container IPv6 address (e.g. 2001:db8::1b99)", + }, + cli.StringFlag{ + Name: "ipc", + Usage: "IPC Namespace to use", + }, + cli.StringFlag{ + Name: "kernel-memory", + Usage: "Kernel memory limit (format: `[]`, where unit = b, k, m or g)", + }, + cli.StringSliceFlag{ + Name: "label", + Usage: "Set metadata on container (default [])", + }, + cli.StringSliceFlag{ + Name: "label-file", + Usage: "Read in a line delimited file of labels (default [])", + }, + cli.StringSliceFlag{ + Name: "link-local-ip", + Usage: "Container IPv4/IPv6 link-local addresses (default [])", + }, + cli.StringFlag{ + Name: "log-driver", + Usage: "Logging driver for the container", + }, + cli.StringSliceFlag{ + Name: "log-opt", + Usage: "Logging driver options (default [])", + }, + cli.StringFlag{ + Name: "mac-address", + Usage: "Container MAC address (e.g. 92:d0:c6:0a:29:33)", + }, + cli.StringFlag{ + Name: "memory, m", + Usage: "Memory limit (format: [], where unit = b, k, m or g)", + }, + cli.StringFlag{ + Name: "memory-reservation", + Usage: "Memory soft limit (format: [], where unit = b, k, m or g)", + }, + cli.StringFlag{ + Name: "memory-swap", + Usage: "Swap limit equal to memory plus swap: '-1' to enable unlimited swap", + }, + cli.Int64Flag{ + Name: "memory-swappiness", + Usage: "Tune container memory swappiness (0 to 100) (default -1)", + Value: -1, + }, + cli.StringFlag{ + Name: "name", + Usage: "Assign a name to the container", + }, + cli.StringFlag{ + Name: "net", + Usage: "Setup the network namespace", + }, + cli.StringFlag{ + Name: "network", + Usage: "Connect a container to a network (default 'default')", + }, + cli.StringSliceFlag{ + Name: "network-alias", + Usage: "Add network-scoped alias for the container (default [])", + }, + cli.BoolFlag{ + Name: "oom-kill-disable", + Usage: "Disable OOM Killer", + }, + cli.StringFlag{ + Name: "oom-score-adj", + Usage: "Tune the host's OOM preferences (-1000 to 1000)", + }, + cli.StringFlag{ + Name: "pid", + Usage: "PID Namespace to use", + }, + cli.Int64Flag{ + Name: "pids-limit", + Usage: "Tune container pids limit (set -1 for unlimited)", + }, + cli.StringFlag{ + Name: "pod", + Usage: "Run container in an existing pod", + }, + cli.BoolFlag{ + Name: "privileged", + Usage: "Give extended privileges to container", + }, + cli.StringSliceFlag{ + Name: "publish, p", + Usage: "Publish a container's port, or a range of ports, to the host (default [])", + }, + cli.BoolFlag{ + Name: "publish-all, P", + Usage: "Publish all exposed ports to random ports on the host interface", + }, + cli.BoolFlag{ + Name: "read-only", + Usage: "Make containers root filesystem read-only", + }, + cli.BoolFlag{ + Name: "rm", + Usage: "Remove container (and pod if created) after exit", + }, + cli.StringSliceFlag{ + Name: "security-opt", + Usage: "Security Options (default [])", + }, + cli.StringFlag{ + Name: "shm-size", + Usage: "Size of `/dev/shm`. The format is ``. default is 64 MB", + }, + cli.BoolFlag{ + Name: "sig-proxy", + Usage: "Proxy received signals to the process (default true)", + }, + cli.StringFlag{ + Name: "stop-signal", + Usage: "Signal to stop a container. Default is SIGTERM", + }, + cli.IntFlag{ + Name: "stop-timeout", + Usage: "Timeout (in seconds) to stop a container. Default is 10", + }, + cli.StringSliceFlag{ + Name: "storage-opt", + Usage: "Storage driver options per container (default [])", + }, + cli.StringSliceFlag{ + Name: "sysctl", + Usage: "Sysctl options (default [])", + }, + cli.StringSliceFlag{ + Name: "tmpfs", + Usage: "Mount a temporary filesystem (`tmpfs`) into a container (default [])", + }, + cli.BoolFlag{ + Name: "tty, t", + Usage: "Allocate a pseudo-TTY for container", + }, + cli.StringSliceFlag{ + Name: "ulimit", + Usage: "Ulimit options (default [])", + }, + cli.StringFlag{ + Name: "user, u", + Usage: "Username or UID (format: [:])", + }, + cli.StringFlag{ + Name: "userns", + Usage: "User namespace to use", + }, + cli.StringFlag{ + Name: "uts", + Usage: "UTS namespace to use", + }, + cli.StringSliceFlag{ + Name: "volume, v", + Usage: "Bind mount a volume into the container (default [])", + }, + cli.StringSliceFlag{ + Name: "volumes-from", + Usage: "Mount volumes from the specified container(s) (default [])", + }, + cli.StringFlag{ + Name: "workdir, w", + Usage: "Working `directory inside the container", + Value: "/", + }, +} diff --git a/cmd/podman/common_test.go b/cmd/podman/common_test.go new file mode 100644 index 000000000..042568d7e --- /dev/null +++ b/cmd/podman/common_test.go @@ -0,0 +1,41 @@ +package main + +import ( + "os/user" + "testing" + + "flag" + + "github.com/urfave/cli" +) + +func TestGetStore(t *testing.T) { + t.Skip("FIX THIS!") + + //cmd/podman/common_test.go:27: cannot use c (type *cli.Context) as type *libkpod.Config in argument to getStore + + // Make sure the tests are running as root + skipTestIfNotRoot(t) + + set := flag.NewFlagSet("test", 0) + globalSet := flag.NewFlagSet("test", 0) + globalSet.String("root", "", "path to the root directory in which data, including images, is stored") + globalCtx := cli.NewContext(nil, globalSet, nil) + command := cli.Command{Name: "imagesCommand"} + c := cli.NewContext(nil, set, globalCtx) + c.Command = command + + //_, err := getStore(c) + //if err != nil { + //t.Error(err) + //} +} + +func skipTestIfNotRoot(t *testing.T) { + u, err := user.Current() + if err != nil { + t.Skip("Could not determine user. Running without root may cause tests to fail") + } else if u.Uid != "0" { + t.Skip("tests will fail unless run as root") + } +} diff --git a/cmd/podman/create.go b/cmd/podman/create.go new file mode 100644 index 000000000..f65bc49c6 --- /dev/null +++ b/cmd/podman/create.go @@ -0,0 +1,507 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" + "strconv" + "strings" + + "github.com/docker/docker/api/types/container" + "github.com/docker/go-units" + "github.com/opencontainers/selinux/go-selinux/label" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/sirupsen/logrus" + "github.com/urfave/cli" + pb "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime" +) + +type mountType string + +// Type constants +const ( + // TypeBind is the type for mounting host dir + TypeBind mountType = "bind" + // TypeVolume is the type for remote storage volumes + // TypeVolume mountType = "volume" // re-enable upon use + // TypeTmpfs is the type for mounting tmpfs + TypeTmpfs mountType = "tmpfs" +) + +var ( + defaultEnvVariables = map[string]string{ + "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", + "TERM": "xterm", + } +) + +type createResourceConfig struct { + BlkioWeight uint16 // blkio-weight + BlkioWeightDevice []string // blkio-weight-device + CPUPeriod uint64 // cpu-period + CPUQuota int64 // cpu-quota + CPURtPeriod uint64 // cpu-rt-period + CPURtRuntime int64 // cpu-rt-runtime + CPUShares uint64 // cpu-shares + CPUs string // cpus + CPUsetCPUs string + CPUsetMems string // cpuset-mems + DeviceReadBps []string // device-read-bps + DeviceReadIOps []string // device-read-iops + DeviceWriteBps []string // device-write-bps + DeviceWriteIOps []string // device-write-iops + DisableOomKiller bool // oom-kill-disable + KernelMemory int64 // kernel-memory + Memory int64 //memory + MemoryReservation int64 // memory-reservation + MemorySwap int64 //memory-swap + MemorySwappiness int // memory-swappiness + OomScoreAdj int //oom-score-adj + PidsLimit int64 // pids-limit + ShmSize string + Ulimit []string //ulimit +} + +type createConfig struct { + Runtime *libpod.Runtime + Args []string + CapAdd []string // cap-add + CapDrop []string // cap-drop + CidFile string + CgroupParent string // cgroup-parent + Command []string + Detach bool // detach + Devices []*pb.Device // device + DNSOpt []string //dns-opt + DNSSearch []string //dns-search + DNSServers []string //dns + Entrypoint string //entrypoint + Env map[string]string //env + Expose []string //expose + GroupAdd []uint32 // group-add + Hostname string //hostname + Image string + Interactive bool //interactive + IpcMode container.IpcMode //ipc + IP6Address string //ipv6 + IPAddress string //ip + Labels map[string]string //label + LinkLocalIP []string // link-local-ip + LogDriver string // log-driver + LogDriverOpt []string // log-opt + MacAddress string //mac-address + Name string //name + NetMode container.NetworkMode //net + Network string //network + NetworkAlias []string //network-alias + PidMode container.PidMode //pid + NsUser string + Pod string //pod + Privileged bool //privileged + Publish []string //publish + PublishAll bool //publish-all + ReadOnlyRootfs bool //read-only + Resources createResourceConfig + Rm bool //rm + ShmDir string + SigProxy bool //sig-proxy + StopSignal string // stop-signal + StopTimeout int64 // stop-timeout + StorageOpts []string //storage-opt + Sysctl map[string]string //sysctl + Tmpfs []string // tmpfs + Tty bool //tty + User uint32 //user + Group uint32 // group + UtsMode container.UTSMode //uts + Volumes []string //volume + WorkDir string //workdir + MountLabel string //SecurityOpts + ProcessLabel string //SecurityOpts + NoNewPrivileges bool //SecurityOpts + ApparmorProfile string //SecurityOpts + SeccompProfilePath string //SecurityOpts + SecurityOpts []string +} + +var createDescription = "Creates a new container from the given image or" + + " storage and prepares it for running the specified command. The" + + " container ID is then printed to stdout. You can then start it at" + + " any time with the podman start command. The container" + + " will be created with the initial state 'created'." + +var createCommand = cli.Command{ + Name: "create", + Usage: "create but do not start a container", + Description: createDescription, + Flags: createFlags, + Action: createCmd, + ArgsUsage: "IMAGE [COMMAND [ARG...]]", + SkipArgReorder: true, + UseShortOptionHandling: true, +} + +func createCmd(c *cli.Context) error { + // TODO should allow user to create based off a directory on the host not just image + // Need CLI support for this + var imageName string + if err := validateFlags(c, createFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "error creating libpod runtime") + } + defer runtime.Shutdown(false) + + createConfig, err := parseCreateOpts(c, runtime) + if err != nil { + return err + } + + // Deal with the image after all the args have been checked + createImage := runtime.NewImage(createConfig.Image) + createImage.LocalName, _ = createImage.GetLocalImageName() + if createImage.LocalName == "" { + // The image wasnt found by the user input'd name or its fqname + // Pull the image + fmt.Printf("Trying to pull %s...", createImage.PullName) + createImage.Pull() + } + + runtimeSpec, err := createConfigToOCISpec(createConfig) + if err != nil { + return err + } + if createImage.LocalName != "" { + nameIsID, err := runtime.IsImageID(createImage.LocalName) + if err != nil { + return err + } + if nameIsID { + // If the input from the user is an ID, then we need to get the image + // name for cstorage + createImage.LocalName, err = createImage.GetNameByID() + if err != nil { + return err + } + } + imageName = createImage.LocalName + } else { + imageName, err = createImage.GetFQName() + } + if err != nil { + return err + } + imageID, err := createImage.GetImageID() + if err != nil { + return err + } + options, err := createConfig.GetContainerCreateOptions() + if err != nil { + return errors.Wrapf(err, "unable to parse new container options") + } + // Gather up the options for NewContainer which consist of With... funcs + options = append(options, libpod.WithRootFSFromImage(imageID, imageName, false)) + options = append(options, libpod.WithSELinuxLabels(createConfig.ProcessLabel, createConfig.MountLabel)) + options = append(options, libpod.WithShmDir(createConfig.ShmDir)) + ctr, err := runtime.NewContainer(runtimeSpec, options...) + if err != nil { + return err + } + + createConfigJSON, err := json.Marshal(createConfig) + if err != nil { + return err + } + if err := ctr.AddArtifact("create-config", createConfigJSON); err != nil { + return err + } + + logrus.Debug("new container created ", ctr.ID()) + + if c.String("cidfile") != "" { + libpod.WriteFile(ctr.ID(), c.String("cidfile")) + } else { + fmt.Printf("%s\n", ctr.ID()) + } + + return nil +} + +const seccompDefaultPath = "/etc/crio/seccomp.json" + +func parseSecurityOpt(config *createConfig, securityOpts []string) error { + var ( + labelOpts []string + err error + ) + + if config.PidMode.IsHost() { + labelOpts = append(labelOpts, label.DisableSecOpt()...) + } else if config.PidMode.IsContainer() { + ctr, err := config.Runtime.LookupContainer(config.PidMode.Container()) + if err != nil { + return errors.Wrapf(err, "container %q not found", config.PidMode.Container()) + } + labelOpts = append(labelOpts, label.DupSecOpt(ctr.ProcessLabel())...) + } + + if config.IpcMode.IsHost() { + labelOpts = append(labelOpts, label.DisableSecOpt()...) + } else if config.IpcMode.IsContainer() { + ctr, err := config.Runtime.LookupContainer(config.IpcMode.Container()) + if err != nil { + return errors.Wrapf(err, "container %q not found", config.IpcMode.Container()) + } + labelOpts = append(labelOpts, label.DupSecOpt(ctr.ProcessLabel())...) + } + + for _, opt := range securityOpts { + if opt == "no-new-privileges" { + config.NoNewPrivileges = true + } else { + con := strings.SplitN(opt, "=", 2) + if len(con) != 2 { + return fmt.Errorf("Invalid --security-opt 1: %q", opt) + } + + switch con[0] { + case "label": + labelOpts = append(labelOpts, con[1]) + case "apparmor": + config.ApparmorProfile = con[1] + case "seccomp": + config.SeccompProfilePath = con[1] + default: + return fmt.Errorf("Invalid --security-opt 2: %q", opt) + } + } + } + + if config.SeccompProfilePath == "" { + if _, err := os.Stat(seccompDefaultPath); err != nil { + if !os.IsNotExist(err) { + return errors.Wrapf(err, "can't check if %q exists", seccompDefaultPath) + } + } else { + config.SeccompProfilePath = seccompDefaultPath + } + } + config.ProcessLabel, config.MountLabel, err = label.InitLabels(labelOpts) + return err +} + +// Parses CLI options related to container creation into a config which can be +// parsed into an OCI runtime spec +func parseCreateOpts(c *cli.Context, runtime *libpod.Runtime) (*createConfig, error) { + var command []string + var memoryLimit, memoryReservation, memorySwap, memoryKernel int64 + var blkioWeight uint16 + var uid, gid uint32 + + if len(c.Args()) < 1 { + return nil, errors.Errorf("image name or ID is required") + } + image := c.Args()[0] + + if len(c.Args()) > 1 { + command = c.Args()[1:] + } + + // LABEL VARIABLES + labels, err := getAllLabels(c.StringSlice("label-file"), c.StringSlice("labels")) + if err != nil { + return &createConfig{}, errors.Wrapf(err, "unable to process labels") + } + // ENVIRONMENT VARIABLES + env := defaultEnvVariables + if err := readKVStrings(env, c.StringSlice("env-file"), c.StringSlice("env")); err != nil { + return &createConfig{}, errors.Wrapf(err, "unable to process environment variables") + } + + sysctl, err := convertStringSliceToMap(c.StringSlice("sysctl"), "=") + if err != nil { + return &createConfig{}, errors.Wrapf(err, "sysctl values must be in the form of KEY=VALUE") + } + + groupAdd, err := stringSlicetoUint32Slice(c.StringSlice("group-add")) + if err != nil { + return &createConfig{}, errors.Wrapf(err, "invalid value for groups provided") + } + + if c.String("user") != "" { + // TODO + // We need to mount the imagefs and get the uid/gid + // For now, user zeros + uid = 0 + gid = 0 + } + + if c.String("memory") != "" { + memoryLimit, err = units.RAMInBytes(c.String("memory")) + if err != nil { + return nil, errors.Wrapf(err, "invalid value for memory") + } + } + if c.String("memory-reservation") != "" { + memoryReservation, err = units.RAMInBytes(c.String("memory-reservation")) + if err != nil { + return nil, errors.Wrapf(err, "invalid value for memory-reservation") + } + } + if c.String("memory-swap") != "" { + memorySwap, err = units.RAMInBytes(c.String("memory-swap")) + if err != nil { + return nil, errors.Wrapf(err, "invalid value for memory-swap") + } + } + if c.String("kernel-memory") != "" { + memoryKernel, err = units.RAMInBytes(c.String("kernel-memory")) + if err != nil { + return nil, errors.Wrapf(err, "invalid value for kernel-memory") + } + } + if c.String("blkio-weight") != "" { + u, err := strconv.ParseUint(c.String("blkio-weight"), 10, 16) + if err != nil { + return nil, errors.Wrapf(err, "invalid value for blkio-weight") + } + blkioWeight = uint16(u) + } + + if err = parseVolumes(c.StringSlice("volume")); err != nil { + return nil, err + } + + // Because we cannot do a non-terminal attach, we need to set tty to true + // if detach is not false + // TODO Allow non-terminal attach + tty := c.Bool("tty") + if !c.Bool("detach") && !tty { + tty = true + } + + pidMode := container.PidMode(c.String("pid")) + if !pidMode.Valid() { + return nil, errors.Errorf("--pid %q is not valid", c.String("pid")) + } + + if c.Bool("detach") && c.Bool("rm") { + return nil, errors.Errorf("--rm and --detach can not be specified together") + } + + utsMode := container.UTSMode(c.String("uts")) + if !utsMode.Valid() { + return nil, errors.Errorf("--uts %q is not valid", c.String("uts")) + } + ipcMode := container.IpcMode(c.String("ipc")) + if !ipcMode.Valid() { + return nil, errors.Errorf("--ipc %q is not valid", ipcMode) + } + shmDir := "" + if ipcMode.IsHost() { + shmDir = "/dev/shm" + } else if ipcMode.IsContainer() { + ctr, err := runtime.LookupContainer(ipcMode.Container()) + if err != nil { + return nil, errors.Wrapf(err, "container %q not found", ipcMode.Container()) + } + shmDir = ctr.ShmDir() + } + + config := &createConfig{ + Runtime: runtime, + CapAdd: c.StringSlice("cap-add"), + CapDrop: c.StringSlice("cap-drop"), + CgroupParent: c.String("cgroup-parent"), + Command: command, + Detach: c.Bool("detach"), + DNSOpt: c.StringSlice("dns-opt"), + DNSSearch: c.StringSlice("dns-search"), + DNSServers: c.StringSlice("dns"), + Entrypoint: c.String("entrypoint"), + Env: env, + Expose: c.StringSlice("expose"), + GroupAdd: groupAdd, + Hostname: c.String("hostname"), + Image: image, + Interactive: c.Bool("interactive"), + IP6Address: c.String("ipv6"), + IPAddress: c.String("ip"), + Labels: labels, + LinkLocalIP: c.StringSlice("link-local-ip"), + LogDriver: c.String("log-driver"), + LogDriverOpt: c.StringSlice("log-opt"), + MacAddress: c.String("mac-address"), + Name: c.String("name"), + Network: c.String("network"), + NetworkAlias: c.StringSlice("network-alias"), + IpcMode: ipcMode, + NetMode: container.NetworkMode(c.String("network")), + UtsMode: utsMode, + PidMode: pidMode, + Pod: c.String("pod"), + Privileged: c.Bool("privileged"), + Publish: c.StringSlice("publish"), + PublishAll: c.Bool("publish-all"), + ReadOnlyRootfs: c.Bool("read-only"), + Resources: createResourceConfig{ + BlkioWeight: blkioWeight, + BlkioWeightDevice: c.StringSlice("blkio-weight-device"), + CPUShares: c.Uint64("cpu-shares"), + CPUPeriod: c.Uint64("cpu-period"), + CPUsetCPUs: c.String("cpu-period"), + CPUsetMems: c.String("cpuset-mems"), + CPUQuota: c.Int64("cpu-quota"), + CPURtPeriod: c.Uint64("cpu-rt-period"), + CPURtRuntime: c.Int64("cpu-rt-runtime"), + CPUs: c.String("cpus"), + DeviceReadBps: c.StringSlice("device-read-bps"), + DeviceReadIOps: c.StringSlice("device-read-iops"), + DeviceWriteBps: c.StringSlice("device-write-bps"), + DeviceWriteIOps: c.StringSlice("device-write-iops"), + DisableOomKiller: c.Bool("oom-kill-disable"), + ShmSize: c.String("shm-size"), + Memory: memoryLimit, + MemoryReservation: memoryReservation, + MemorySwap: memorySwap, + MemorySwappiness: c.Int("memory-swappiness"), + KernelMemory: memoryKernel, + OomScoreAdj: c.Int("oom-score-adj"), + + PidsLimit: c.Int64("pids-limit"), + Ulimit: c.StringSlice("ulimit"), + }, + Rm: c.Bool("rm"), + ShmDir: shmDir, + SigProxy: c.Bool("sig-proxy"), + StopSignal: c.String("stop-signal"), + StopTimeout: c.Int64("stop-timeout"), + StorageOpts: c.StringSlice("storage-opt"), + Sysctl: sysctl, + Tmpfs: c.StringSlice("tmpfs"), + Tty: tty, + User: uid, + Group: gid, + Volumes: c.StringSlice("volume"), + WorkDir: c.String("workdir"), + } + + if !config.Privileged { + if err := parseSecurityOpt(config, c.StringSlice("security-opt")); err != nil { + return nil, err + } + } + config.SecurityOpts = c.StringSlice("security-opt") + warnings, err := verifyContainerResources(config, false) + if err != nil { + return nil, err + } + for _, warning := range warnings { + fmt.Fprintln(os.Stderr, warning) + } + return config, nil +} diff --git a/cmd/podman/create_cli.go b/cmd/podman/create_cli.go new file mode 100644 index 000000000..0cc265e92 --- /dev/null +++ b/cmd/podman/create_cli.go @@ -0,0 +1,242 @@ +package main + +import ( + "fmt" + "os" + "strings" + + "github.com/docker/docker/pkg/sysinfo" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" +) + +const ( + // It's not kernel limit, we want this 4M limit to supply a reasonable functional container + linuxMinMemory = 4194304 +) + +func getAllLabels(labelFile, inputLabels []string) (map[string]string, error) { + labels := make(map[string]string) + labelErr := readKVStrings(labels, labelFile, inputLabels) + if labelErr != nil { + return labels, errors.Wrapf(labelErr, "unable to process labels from --label and label-file") + } + return labels, nil +} + +func convertStringSliceToMap(strSlice []string, delimiter string) (map[string]string, error) { + sysctl := make(map[string]string) + for _, inputSysctl := range strSlice { + values := strings.Split(inputSysctl, delimiter) + if len(values) < 2 { + return sysctl, errors.Errorf("%s in an invalid sysctl value", inputSysctl) + } + sysctl[values[0]] = values[1] + } + return sysctl, nil +} + +func addWarning(warnings []string, msg string) []string { + logrus.Warn(msg) + return append(warnings, msg) +} + +func parseVolumes(volumes []string) error { + if len(volumes) == 0 { + return nil + } + for _, volume := range volumes { + arr := strings.SplitN(volume, ":", 3) + if len(arr) < 2 { + return errors.Errorf("incorrect volume format %q, should be host-dir:ctr-dir:[option]", volume) + } + if err := validateVolumeHostDir(arr[0]); err != nil { + return err + } + if err := validateVolumeCtrDir(arr[1]); err != nil { + return err + } + if len(arr) > 2 { + if err := validateVolumeOpts(arr[2]); err != nil { + return err + } + } + } + return nil +} + +func validateVolumeHostDir(hostDir string) error { + if _, err := os.Stat(hostDir); err != nil { + return errors.Wrapf(err, "error checking path %q", hostDir) + } + return nil +} + +func validateVolumeCtrDir(ctrDir string) error { + if ctrDir[0] != '/' { + return errors.Errorf("invalid container directory path %q", ctrDir) + } + return nil +} + +func validateVolumeOpts(option string) error { + var foundRootPropagation, foundRWRO, foundLabelChange int + options := strings.Split(option, ",") + for _, opt := range options { + switch opt { + case "rw", "ro": + if foundRWRO > 1 { + return errors.Errorf("invalid options %q, can only specify 1 'rw' or 'ro' option", option) + } + foundRWRO++ + case "z", "Z": + if foundLabelChange > 1 { + return errors.Errorf("invalid options %q, can only specify 1 'z' or 'Z' option", option) + } + foundLabelChange++ + case "private", "rprivate", "shared", "rshared", "slave", "rslave": + if foundRootPropagation > 1 { + return errors.Errorf("invalid options %q, can only specify 1 '[r]shared', '[r]private' or '[r]slave' option", option) + } + foundRootPropagation++ + default: + return errors.Errorf("invalid option type %q", option) + } + } + return nil +} + +func verifyContainerResources(config *createConfig, update bool) ([]string, error) { + warnings := []string{} + sysInfo := sysinfo.New(true) + + // memory subsystem checks and adjustments + if config.Resources.Memory != 0 && config.Resources.Memory < linuxMinMemory { + return warnings, fmt.Errorf("minimum memory limit allowed is 4MB") + } + if config.Resources.Memory > 0 && !sysInfo.MemoryLimit { + warnings = addWarning(warnings, "Your kernel does not support memory limit capabilities or the cgroup is not mounted. Limitation discarded.") + config.Resources.Memory = 0 + config.Resources.MemorySwap = -1 + } + if config.Resources.Memory > 0 && config.Resources.MemorySwap != -1 && !sysInfo.SwapLimit { + warnings = addWarning(warnings, "Your kernel does not support swap limit capabilities,or the cgroup is not mounted. Memory limited without swap.") + config.Resources.MemorySwap = -1 + } + if config.Resources.Memory > 0 && config.Resources.MemorySwap > 0 && config.Resources.MemorySwap < config.Resources.Memory { + return warnings, fmt.Errorf("minimum memoryswap limit should be larger than memory limit, see usage") + } + if config.Resources.Memory == 0 && config.Resources.MemorySwap > 0 && !update { + return warnings, fmt.Errorf("you should always set the memory limit when using memoryswap limit, see usage") + } + if config.Resources.MemorySwappiness != -1 { + if !sysInfo.MemorySwappiness { + msg := "Your kernel does not support memory swappiness capabilities, or the cgroup is not mounted. Memory swappiness discarded." + warnings = addWarning(warnings, msg) + config.Resources.MemorySwappiness = -1 + } else { + swappiness := config.Resources.MemorySwappiness + if swappiness < -1 || swappiness > 100 { + return warnings, fmt.Errorf("invalid value: %v, valid memory swappiness range is 0-100", swappiness) + } + } + } + if config.Resources.MemoryReservation > 0 && !sysInfo.MemoryReservation { + warnings = addWarning(warnings, "Your kernel does not support memory soft limit capabilities or the cgroup is not mounted. Limitation discarded.") + config.Resources.MemoryReservation = 0 + } + if config.Resources.MemoryReservation > 0 && config.Resources.MemoryReservation < linuxMinMemory { + return warnings, fmt.Errorf("minimum memory reservation allowed is 4MB") + } + if config.Resources.Memory > 0 && config.Resources.MemoryReservation > 0 && config.Resources.Memory < config.Resources.MemoryReservation { + return warnings, fmt.Errorf("minimum memory limit can not be less than memory reservation limit, see usage") + } + if config.Resources.KernelMemory > 0 && !sysInfo.KernelMemory { + warnings = addWarning(warnings, "Your kernel does not support kernel memory limit capabilities or the cgroup is not mounted. Limitation discarded.") + config.Resources.KernelMemory = 0 + } + if config.Resources.KernelMemory > 0 && config.Resources.KernelMemory < linuxMinMemory { + return warnings, fmt.Errorf("minimum kernel memory limit allowed is 4MB") + } + if config.Resources.DisableOomKiller == true && !sysInfo.OomKillDisable { + // only produce warnings if the setting wasn't to *disable* the OOM Kill; no point + // warning the caller if they already wanted the feature to be off + warnings = addWarning(warnings, "Your kernel does not support OomKillDisable. OomKillDisable discarded.") + config.Resources.DisableOomKiller = false + } + + if config.Resources.PidsLimit != 0 && !sysInfo.PidsLimit { + warnings = addWarning(warnings, "Your kernel does not support pids limit capabilities or the cgroup is not mounted. PIDs limit discarded.") + config.Resources.PidsLimit = 0 + } + + if config.Resources.CPUShares > 0 && !sysInfo.CPUShares { + warnings = addWarning(warnings, "Your kernel does not support CPU shares or the cgroup is not mounted. Shares discarded.") + config.Resources.CPUShares = 0 + } + if config.Resources.CPUPeriod > 0 && !sysInfo.CPUCfsPeriod { + warnings = addWarning(warnings, "Your kernel does not support CPU cfs period or the cgroup is not mounted. Period discarded.") + config.Resources.CPUPeriod = 0 + } + if config.Resources.CPUPeriod != 0 && (config.Resources.CPUPeriod < 1000 || config.Resources.CPUPeriod > 1000000) { + return warnings, fmt.Errorf("CPU cfs period can not be less than 1ms (i.e. 1000) or larger than 1s (i.e. 1000000)") + } + if config.Resources.CPUQuota > 0 && !sysInfo.CPUCfsQuota { + warnings = addWarning(warnings, "Your kernel does not support CPU cfs quota or the cgroup is not mounted. Quota discarded.") + config.Resources.CPUQuota = 0 + } + if config.Resources.CPUQuota > 0 && config.Resources.CPUQuota < 1000 { + return warnings, fmt.Errorf("CPU cfs quota can not be less than 1ms (i.e. 1000)") + } + // cpuset subsystem checks and adjustments + if (config.Resources.CPUsetCPUs != "" || config.Resources.CPUsetMems != "") && !sysInfo.Cpuset { + warnings = addWarning(warnings, "Your kernel does not support cpuset or the cgroup is not mounted. CPUset discarded.") + config.Resources.CPUsetCPUs = "" + config.Resources.CPUsetMems = "" + } + cpusAvailable, err := sysInfo.IsCpusetCpusAvailable(config.Resources.CPUsetCPUs) + if err != nil { + return warnings, fmt.Errorf("invalid value %s for cpuset cpus", config.Resources.CPUsetCPUs) + } + if !cpusAvailable { + return warnings, fmt.Errorf("requested CPUs are not available - requested %s, available: %s", config.Resources.CPUsetCPUs, sysInfo.Cpus) + } + memsAvailable, err := sysInfo.IsCpusetMemsAvailable(config.Resources.CPUsetMems) + if err != nil { + return warnings, fmt.Errorf("invalid value %s for cpuset mems", config.Resources.CPUsetMems) + } + if !memsAvailable { + return warnings, fmt.Errorf("requested memory nodes are not available - requested %s, available: %s", config.Resources.CPUsetMems, sysInfo.Mems) + } + + // blkio subsystem checks and adjustments + if config.Resources.BlkioWeight > 0 && !sysInfo.BlkioWeight { + warnings = addWarning(warnings, "Your kernel does not support Block I/O weight or the cgroup is not mounted. Weight discarded.") + config.Resources.BlkioWeight = 0 + } + if config.Resources.BlkioWeight > 0 && (config.Resources.BlkioWeight < 10 || config.Resources.BlkioWeight > 1000) { + return warnings, fmt.Errorf("range of blkio weight is from 10 to 1000") + } + if len(config.Resources.BlkioWeightDevice) > 0 && !sysInfo.BlkioWeightDevice { + warnings = addWarning(warnings, "Your kernel does not support Block I/O weight_device or the cgroup is not mounted. Weight-device discarded.") + config.Resources.BlkioWeightDevice = []string{} + } + if len(config.Resources.DeviceReadBps) > 0 && !sysInfo.BlkioReadBpsDevice { + warnings = addWarning(warnings, "Your kernel does not support BPS Block I/O read limit or the cgroup is not mounted. Block I/O BPS read limit discarded") + config.Resources.DeviceReadBps = []string{} + } + if len(config.Resources.DeviceWriteBps) > 0 && !sysInfo.BlkioWriteBpsDevice { + warnings = addWarning(warnings, "Your kernel does not support BPS Block I/O write limit or the cgroup is not mounted. Block I/O BPS write limit discarded.") + config.Resources.DeviceWriteBps = []string{} + } + if len(config.Resources.DeviceReadIOps) > 0 && !sysInfo.BlkioReadIOpsDevice { + warnings = addWarning(warnings, "Your kernel does not support IOPS Block read limit or the cgroup is not mounted. Block I/O IOPS read limit discarded.") + config.Resources.DeviceReadIOps = []string{} + } + if len(config.Resources.DeviceWriteIOps) > 0 && !sysInfo.BlkioWriteIOpsDevice { + warnings = addWarning(warnings, "Your kernel does not support IOPS Block I/O write limit or the cgroup is not mounted. Block I/O IOPS write limit discarded.") + config.Resources.DeviceWriteIOps = []string{} + } + + return warnings, nil +} diff --git a/cmd/podman/create_cli_test.go b/cmd/podman/create_cli_test.go new file mode 100644 index 000000000..63a1e5dd3 --- /dev/null +++ b/cmd/podman/create_cli_test.go @@ -0,0 +1,70 @@ +package main + +import ( + "io/ioutil" + "os" + "testing" + + "github.com/stretchr/testify/assert" +) + +var ( + Var1 = []string{"ONE=1", "TWO=2"} +) + +func createTmpFile(content []byte) (string, error) { + tmpfile, err := ioutil.TempFile(os.TempDir(), "unittest") + if err != nil { + return "", err + } + + if _, err := tmpfile.Write(content); err != nil { + return "", err + + } + if err := tmpfile.Close(); err != nil { + return "", err + } + return tmpfile.Name(), nil +} + +func TestConvertStringSliceToMap(t *testing.T) { + strSlice := []string{"BLAU=BLUE", "GELB=YELLOW"} + result, _ := convertStringSliceToMap(strSlice, "=") + assert.Equal(t, result["BLAU"], "BLUE") +} + +func TestConvertStringSliceToMapBadData(t *testing.T) { + strSlice := []string{"BLAU=BLUE", "GELB^YELLOW"} + _, err := convertStringSliceToMap(strSlice, "=") + assert.Error(t, err) +} + +func TestGetAllLabels(t *testing.T) { + fileLabels := []string{} + labels, _ := getAllLabels(fileLabels, Var1) + assert.Equal(t, len(labels), 2) +} + +func TestGetAllLabelsBadKeyValue(t *testing.T) { + inLabels := []string{"ONE1", "TWO=2"} + fileLabels := []string{} + _, err := getAllLabels(fileLabels, inLabels) + assert.Error(t, err, assert.AnError) +} + +func TestGetAllLabelsBadLabelFile(t *testing.T) { + fileLabels := []string{"/foobar5001/be"} + _, err := getAllLabels(fileLabels, Var1) + assert.Error(t, err, assert.AnError) +} + +func TestGetAllLabelsFile(t *testing.T) { + content := []byte("THREE=3") + tFile, err := createTmpFile(content) + defer os.Remove(tFile) + assert.NoError(t, err) + fileLabels := []string{tFile} + result, _ := getAllLabels(fileLabels, Var1) + assert.Equal(t, len(result), 3) +} diff --git a/cmd/podman/diff.go b/cmd/podman/diff.go new file mode 100644 index 000000000..a3ca9ae50 --- /dev/null +++ b/cmd/podman/diff.go @@ -0,0 +1,128 @@ +package main + +import ( + "fmt" + + "github.com/containers/storage/pkg/archive" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/cmd/podman/formats" + "github.com/urfave/cli" +) + +type diffJSONOutput struct { + Changed []string `json:"changed,omitempty"` + Added []string `json:"added,omitempty"` + Deleted []string `json:"deleted,omitempty"` +} + +type diffOutputParams struct { + Change archive.ChangeType + Path string +} + +type stdoutStruct struct { + output []diffOutputParams +} + +func (so stdoutStruct) Out() error { + for _, d := range so.output { + fmt.Printf("%s %s\n", d.Change, d.Path) + } + return nil +} + +var ( + diffFlags = []cli.Flag{ + cli.BoolFlag{ + Name: "archive", + Usage: "Save the diff as a tar archive", + Hidden: true, + }, + cli.StringFlag{ + Name: "format", + Usage: "Change the output format.", + }, + } + diffDescription = fmt.Sprint(`Displays changes on a container or image's filesystem. The + container or image will be compared to its parent layer`) + + diffCommand = cli.Command{ + Name: "diff", + Usage: "Inspect changes on container's file systems", + Description: diffDescription, + Flags: diffFlags, + Action: diffCmd, + ArgsUsage: "ID-NAME", + } +) + +func formatJSON(output []diffOutputParams) (diffJSONOutput, error) { + jsonStruct := diffJSONOutput{} + for _, output := range output { + switch output.Change { + case archive.ChangeModify: + jsonStruct.Changed = append(jsonStruct.Changed, output.Path) + case archive.ChangeAdd: + jsonStruct.Added = append(jsonStruct.Added, output.Path) + case archive.ChangeDelete: + jsonStruct.Deleted = append(jsonStruct.Deleted, output.Path) + default: + return jsonStruct, errors.Errorf("output kind %q not recognized", output.Change.String()) + } + } + return jsonStruct, nil +} + +func diffCmd(c *cli.Context) error { + if err := validateFlags(c, diffFlags); err != nil { + return err + } + + if len(c.Args()) != 1 { + return errors.Errorf("container, image, or layer name must be specified: podman diff [options [...]] ID-NAME") + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + to := c.Args().Get(0) + changes, err := runtime.GetDiff("", to) + if err != nil { + return errors.Wrapf(err, "could not get changes for %q", to) + } + + diffOutput := []diffOutputParams{} + outputFormat := c.String("format") + + for _, change := range changes { + + params := diffOutputParams{ + Change: change.Kind, + Path: change.Path, + } + diffOutput = append(diffOutput, params) + } + + var out formats.Writer + + if outputFormat != "" { + switch outputFormat { + case formats.JSONString: + data, err := formatJSON(diffOutput) + if err != nil { + return err + } + out = formats.JSONStruct{Output: data} + default: + return errors.New("only valid format for diff is 'json'") + } + } else { + out = stdoutStruct{output: diffOutput} + } + formats.Writer(out).Out() + + return nil +} diff --git a/cmd/podman/docker/types.go b/cmd/podman/docker/types.go new file mode 100644 index 000000000..a7e456554 --- /dev/null +++ b/cmd/podman/docker/types.go @@ -0,0 +1,271 @@ +package docker + +// +// Types extracted from Docker +// + +import ( + "time" + + "github.com/containers/image/pkg/strslice" + "github.com/opencontainers/go-digest" +) + +// TypeLayers github.com/docker/docker/image/rootfs.go +const TypeLayers = "layers" + +// V2S2MediaTypeManifest github.com/docker/distribution/manifest/schema2/manifest.go +const V2S2MediaTypeManifest = "application/vnd.docker.distribution.manifest.v2+json" + +// V2S2MediaTypeImageConfig github.com/docker/distribution/manifest/schema2/manifest.go +const V2S2MediaTypeImageConfig = "application/vnd.docker.container.image.v1+json" + +// V2S2MediaTypeLayer github.com/docker/distribution/manifest/schema2/manifest.go +const V2S2MediaTypeLayer = "application/vnd.docker.image.rootfs.diff.tar.gzip" + +// V2S2MediaTypeUncompressedLayer github.com/docker/distribution/manifest/schema2/manifest.go +const V2S2MediaTypeUncompressedLayer = "application/vnd.docker.image.rootfs.diff.tar" + +// V2S2RootFS describes images root filesystem +// This is currently a placeholder that only supports layers. In the future +// this can be made into an interface that supports different implementations. +// github.com/docker/docker/image/rootfs.go +type V2S2RootFS struct { + Type string `json:"type"` + DiffIDs []digest.Digest `json:"diff_ids,omitempty"` +} + +// V2S2History stores build commands that were used to create an image +// github.com/docker/docker/image/image.go +type V2S2History struct { + // Created is the timestamp at which the image was created + Created time.Time `json:"created"` + // Author is the name of the author that was specified when committing the image + Author string `json:"author,omitempty"` + // CreatedBy keeps the Dockerfile command used while building the image + CreatedBy string `json:"created_by,omitempty"` + // Comment is the commit message that was set when committing the image + Comment string `json:"comment,omitempty"` + // EmptyLayer is set to true if this history item did not generate a + // layer. Otherwise, the history item is associated with the next + // layer in the RootFS section. + EmptyLayer bool `json:"empty_layer,omitempty"` +} + +// ID is the content-addressable ID of an image. +// github.com/docker/docker/image/image.go +type ID digest.Digest + +// HealthConfig holds configuration settings for the HEALTHCHECK feature. +// github.com/docker/docker/api/types/container/config.go +type HealthConfig struct { + // Test is the test to perform to check that the container is healthy. + // An empty slice means to inherit the default. + // The options are: + // {} : inherit healthcheck + // {"NONE"} : disable healthcheck + // {"CMD", args...} : exec arguments directly + // {"CMD-SHELL", command} : run command with system's default shell + Test []string `json:",omitempty"` + + // Zero means to inherit. Durations are expressed as integer nanoseconds. + Interval time.Duration `json:",omitempty"` // Interval is the time to wait between checks. + Timeout time.Duration `json:",omitempty"` // Timeout is the time to wait before considering the check to have hung. + + // Retries is the number of consecutive failures needed to consider a container as unhealthy. + // Zero means inherit. + Retries int `json:",omitempty"` +} + +// PortSet is a collection of structs indexed by Port +// github.com/docker/go-connections/nat/nat.go +type PortSet map[Port]struct{} + +// Port is a string containing port number and protocol in the format "80/tcp" +// github.com/docker/go-connections/nat/nat.go +type Port string + +// Config contains the configuration data about a container. +// It should hold only portable information about the container. +// Here, "portable" means "independent from the host we are running on". +// Non-portable information *should* appear in HostConfig. +// All fields added to this struct must be marked `omitempty` to keep getting +// predictable hashes from the old `v1Compatibility` configuration. +// github.com/docker/docker/api/types/container/config.go +type Config struct { + Hostname string // Hostname + Domainname string // Domainname + User string // User that will run the command(s) inside the container, also support user:group + AttachStdin bool // Attach the standard input, makes possible user interaction + AttachStdout bool // Attach the standard output + AttachStderr bool // Attach the standard error + ExposedPorts PortSet `json:",omitempty"` // List of exposed ports + Tty bool // Attach standard streams to a tty, including stdin if it is not closed. + OpenStdin bool // Open stdin + StdinOnce bool // If true, close stdin after the 1 attached client disconnects. + Env []string // List of environment variable to set in the container + Cmd strslice.StrSlice // Command to run when starting the container + Healthcheck *HealthConfig `json:",omitempty"` // Healthcheck describes how to check the container is healthy + ArgsEscaped bool `json:",omitempty"` // True if command is already escaped (Windows specific) + Image string // Name of the image as it was passed by the operator (e.g. could be symbolic) + Volumes map[string]struct{} // List of volumes (mounts) used for the container + WorkingDir string // Current directory (PWD) in the command will be launched + Entrypoint strslice.StrSlice // Entrypoint to run when starting the container + NetworkDisabled bool `json:",omitempty"` // Is network disabled + MacAddress string `json:",omitempty"` // Mac Address of the container + OnBuild []string // ONBUILD metadata that were defined on the image Dockerfile + Labels map[string]string // List of labels set to this container + StopSignal string `json:",omitempty"` // Signal to stop a container + StopTimeout *int `json:",omitempty"` // Timeout (in seconds) to stop a container + Shell strslice.StrSlice `json:",omitempty"` // Shell for shell-form of RUN, CMD, ENTRYPOINT +} + +// V1Compatibility - For non-top-level layers, create fake V1Compatibility +// strings that fit the format and don't collide with anything else, but +// don't result in runnable images on their own. +// github.com/docker/distribution/manifest/schema1/config_builder.go +type V1Compatibility struct { + ID string `json:"id"` + Parent string `json:"parent,omitempty"` + Comment string `json:"comment,omitempty"` + Created time.Time `json:"created"` + ContainerConfig struct { + Cmd []string + } `json:"container_config,omitempty"` + Author string `json:"author,omitempty"` + ThrowAway bool `json:"throwaway,omitempty"` +} + +// V1Image stores the V1 image configuration. +// github.com/docker/docker/image/image.go +type V1Image struct { + // ID is a unique 64 character identifier of the image + ID string `json:"id,omitempty"` + // Parent is the ID of the parent image + Parent string `json:"parent,omitempty"` + // Comment is the commit message that was set when committing the image + Comment string `json:"comment,omitempty"` + // Created is the timestamp at which the image was created + Created time.Time `json:"created"` + // Container is the id of the container used to commit + Container string `json:"container,omitempty"` + // ContainerConfig is the configuration of the container that is committed into the image + ContainerConfig Config `json:"container_config,omitempty"` + // DockerVersion specifies the version of Docker that was used to build the image + DockerVersion string `json:"docker_version,omitempty"` + // Author is the name of the author that was specified when committing the image + Author string `json:"author,omitempty"` + // Config is the configuration of the container received from the client + Config *Config `json:"config,omitempty"` + // Architecture is the hardware that the image is build and runs on + Architecture string `json:"architecture,omitempty"` + // OS is the operating system used to build and run the image + OS string `json:"os,omitempty"` + // Size is the total size of the image including all layers it is composed of + Size int64 `json:",omitempty"` +} + +// V2Image stores the image configuration +// github.com/docker/docker/image/image.go +type V2Image struct { + V1Image + Parent ID `json:"parent,omitempty"` + RootFS *V2S2RootFS `json:"rootfs,omitempty"` + History []V2S2History `json:"history,omitempty"` + OSVersion string `json:"os.version,omitempty"` + OSFeatures []string `json:"os.features,omitempty"` + + // rawJSON caches the immutable JSON associated with this image. + //rawJSON []byte + + // computedID is the ID computed from the hash of the image config. + // Not to be confused with the legacy V1 ID in V1Image. + //computedID ID +} + +// V2Versioned provides a struct with the manifest schemaVersion and mediaType. +// Incoming content with unknown schema version can be decoded against this +// struct to check the version. +// github.com/docker/distribution/manifest/versioned.go +type V2Versioned struct { + // SchemaVersion is the image manifest schema that this image follows + SchemaVersion int `json:"schemaVersion"` + + // MediaType is the media type of this schema. + MediaType string `json:"mediaType,omitempty"` +} + +// V2S1FSLayer is a container struct for BlobSums defined in an image manifest +// github.com/docker/distribution/manifest/schema1/manifest.go +type V2S1FSLayer struct { + // BlobSum is the tarsum of the referenced filesystem image layer + BlobSum digest.Digest `json:"blobSum"` +} + +// V2S1History stores unstructured v1 compatibility information +// github.com/docker/distribution/manifest/schema1/manifest.go +type V2S1History struct { + // V1Compatibility is the raw v1 compatibility information + V1Compatibility string `json:"v1Compatibility"` +} + +// V2S1Manifest provides the base accessible fields for working with V2 image +// format in the registry. +// github.com/docker/distribution/manifest/schema1/manifest.go +type V2S1Manifest struct { + V2Versioned + + // Name is the name of the image's repository + Name string `json:"name"` + + // Tag is the tag of the image specified by this manifest + Tag string `json:"tag"` + + // Architecture is the host architecture on which this image is intended to + // run + Architecture string `json:"architecture"` + + // FSLayers is a list of filesystem layer blobSums contained in this image + FSLayers []V2S1FSLayer `json:"fsLayers"` + + // History is a list of unstructured historical data for v1 compatibility + History []V2S1History `json:"history"` +} + +// V2S2Descriptor describes targeted content. Used in conjunction with a blob +// store, a descriptor can be used to fetch, store and target any kind of +// blob. The struct also describes the wire protocol format. Fields should +// only be added but never changed. +// github.com/docker/distribution/blobs.go +type V2S2Descriptor struct { + // MediaType describe the type of the content. All text based formats are + // encoded as utf-8. + MediaType string `json:"mediaType,omitempty"` + + // Size in bytes of content. + Size int64 `json:"size,omitempty"` + + // Digest uniquely identifies the content. A byte stream can be verified + // against against this digest. + Digest digest.Digest `json:"digest,omitempty"` + + // URLs contains the source URLs of this content. + URLs []string `json:"urls,omitempty"` + + // NOTE: Before adding a field here, please ensure that all + // other options have been exhausted. Much of the type relationships + // depend on the simplicity of this type. +} + +// V2S2Manifest defines a schema2 manifest. +// github.com/docker/distribution/manifest/schema2/manifest.go +type V2S2Manifest struct { + V2Versioned + + // Config references the image configuration as a blob. + Config V2S2Descriptor `json:"config"` + + // Layers lists descriptors for the layers referenced by the + // configuration. + Layers []V2S2Descriptor `json:"layers"` +} diff --git a/cmd/podman/exec.go b/cmd/podman/exec.go new file mode 100644 index 000000000..0b3b9504d --- /dev/null +++ b/cmd/podman/exec.go @@ -0,0 +1,86 @@ +package main + +import ( + "fmt" + "strings" + + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/urfave/cli" +) + +var ( + execFlags = []cli.Flag{ + cli.StringSliceFlag{ + Name: "env, e", + Usage: "Set environment variables", + }, + cli.BoolFlag{ + Name: "privileged", + Usage: "Give the process extended Linux capabilities inside the container. The default is false", + }, + cli.BoolFlag{ + Name: "tty, t", + Usage: "Allocate a pseudo-TTY. The default is false", + }, + cli.StringFlag{ + Name: "user, u", + Usage: "Sets the username or UID used and optionally the groupname or GID for the specified command", + }, + } + execDescription = ` + podman exec + + Run a command in a running container +` + + execCommand = cli.Command{ + Name: "exec", + Usage: "Run a process in a running container", + Description: execDescription, + Flags: execFlags, + Action: execCmd, + ArgsUsage: "CONTAINER-NAME", + } +) + +func execCmd(c *cli.Context) error { + var envs []string + args := c.Args() + if len(args) < 1 { + return errors.Errorf("you must provide one container name or id") + } + if len(args) < 2 { + return errors.Errorf("you must provide a command to exec") + } + cmd := args[1:] + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "error creating libpod runtime") + } + defer runtime.Shutdown(false) + + ctr, err := runtime.LookupContainer(args[0]) + if err != nil { + return errors.Wrapf(err, "unable to exec into %s", args[0]) + } + // Create a list of keys provided by the user + var userEnvKeys []string + for _, env := range c.StringSlice("env") { + splitEnv := strings.Split(env, "=") + userEnvKeys = append(userEnvKeys, splitEnv[0]) + } + + envs = append(envs, c.StringSlice("env")...) + + // if the default key isnt in the user-provided list, add the default + // key and value to the environment variables. this is needed to set + // PATH for example. + for k, v := range defaultEnvVariables { + if !libpod.StringInSlice(k, userEnvKeys) { + envs = append(envs, fmt.Sprintf("%s=%s", k, v)) + } + } + + return ctr.Exec(c.Bool("tty"), c.Bool("privileged"), envs, cmd, c.String("user")) +} diff --git a/cmd/podman/export.go b/cmd/podman/export.go new file mode 100644 index 000000000..9b498562e --- /dev/null +++ b/cmd/podman/export.go @@ -0,0 +1,65 @@ +package main + +import ( + "os" + + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "github.com/urfave/cli" +) + +var ( + exportFlags = []cli.Flag{ + cli.StringFlag{ + Name: "output, o", + Usage: "Write to a file, default is STDOUT", + Value: "/dev/stdout", + }, + } + exportDescription = "Exports container's filesystem contents as a tar archive" + + " and saves it on the local machine." + exportCommand = cli.Command{ + Name: "export", + Usage: "Export container's filesystem contents as a tar archive", + Description: exportDescription, + Flags: exportFlags, + Action: exportCmd, + ArgsUsage: "CONTAINER", + } +) + +// exportCmd saves a container to a tarball on disk +func exportCmd(c *cli.Context) error { + if err := validateFlags(c, exportFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + args := c.Args() + if len(args) == 0 { + return errors.Errorf("container id must be specified") + } + if len(args) > 1 { + return errors.Errorf("too many arguments given, need 1 at most.") + } + + output := c.String("output") + if output == "/dev/stdout" { + file := os.Stdout + if logrus.IsTerminal(file) { + return errors.Errorf("refusing to export to terminal. Use -o flag or redirect") + } + } + + ctr, err := runtime.LookupContainer(args[0]) + if err != nil { + return errors.Wrapf(err, "error looking up container %q", args[0]) + } + + return ctr.Export(output) +} diff --git a/cmd/podman/formats/formats.go b/cmd/podman/formats/formats.go new file mode 100644 index 000000000..4b6527b30 --- /dev/null +++ b/cmd/podman/formats/formats.go @@ -0,0 +1,143 @@ +package formats + +import ( + "bytes" + "encoding/json" + "fmt" + "os" + "strings" + "text/tabwriter" + "text/template" + + "github.com/ghodss/yaml" + "github.com/pkg/errors" +) + +const ( + // JSONString const to save on duplicate variable names + JSONString = "json" + // IDString const to save on duplicates for Go templates + IDString = "{{.ID}}" +) + +// Writer interface for outputs +type Writer interface { + Out() error +} + +// JSONStructArray for JSON output +type JSONStructArray struct { + Output []interface{} +} + +// StdoutTemplateArray for Go template output +type StdoutTemplateArray struct { + Output []interface{} + Template string + Fields map[string]string +} + +// JSONStruct for JSON output +type JSONStruct struct { + Output interface{} +} + +// StdoutTemplate for Go template output +type StdoutTemplate struct { + Output interface{} + Template string + Fields map[string]string +} + +// YAMLStruct for YAML output +type YAMLStruct struct { + Output interface{} +} + +// Out method for JSON Arrays +func (j JSONStructArray) Out() error { + data, err := json.MarshalIndent(j.Output, "", " ") + if err != nil { + return err + } + + // JSON returns a byte array with a literal null [110 117 108 108] in it + // if it is passed empty data. We used bytes.Compare to see if that is + // the case. + if diff := bytes.Compare(data, []byte("null")); diff == 0 { + data = []byte("[]") + } + + // If the we did get NULL back, we should spit out {} which is + // at least valid JSON for the consumer. + fmt.Printf("%s\n", data) + return nil +} + +// Out method for Go templates +func (t StdoutTemplateArray) Out() error { + w := tabwriter.NewWriter(os.Stdout, 0, 0, 3, ' ', 0) + if strings.HasPrefix(t.Template, "table") { + // replace any spaces with tabs in template so that tabwriter can align it + t.Template = strings.Replace(strings.TrimSpace(t.Template[5:]), " ", "\t", -1) + headerTmpl, err := template.New("header").Funcs(headerFunctions).Parse(t.Template) + if err != nil { + return errors.Wrapf(err, "Template parsing error") + } + err = headerTmpl.Execute(w, t.Fields) + if err != nil { + return err + } + fmt.Fprintln(w, "") + } + t.Template = strings.Replace(t.Template, " ", "\t", -1) + tmpl, err := template.New("image").Funcs(basicFunctions).Parse(t.Template) + if err != nil { + return errors.Wrapf(err, "Template parsing error") + } + for _, img := range t.Output { + basicTmpl := tmpl.Funcs(basicFunctions) + err = basicTmpl.Execute(w, img) + if err != nil { + return err + } + fmt.Fprintln(w, "") + } + return w.Flush() +} + +// Out method for JSON struct +func (j JSONStruct) Out() error { + data, err := json.MarshalIndent(j.Output, "", " ") + if err != nil { + return err + } + fmt.Printf("%s\n", data) + return nil +} + +//Out method for Go templates +func (t StdoutTemplate) Out() error { + tmpl, err := template.New("image").Parse(t.Template) + if err != nil { + return errors.Wrapf(err, "template parsing error") + } + err = tmpl.Execute(os.Stdout, t.Output) + if err != nil { + return err + } + fmt.Println() + return nil +} + +// Out method for YAML +func (y YAMLStruct) Out() error { + var buf []byte + var err error + buf, err = yaml.Marshal(y.Output) + if err != nil { + return err + } + fmt.Println(string(buf)) + return nil +} diff --git a/cmd/podman/formats/templates.go b/cmd/podman/formats/templates.go new file mode 100644 index 000000000..c2582552a --- /dev/null +++ b/cmd/podman/formats/templates.go @@ -0,0 +1,78 @@ +package formats + +import ( + "bytes" + "encoding/json" + "strings" + "text/template" +) + +// basicFunctions are the set of initial +// functions provided to every template. +var basicFunctions = template.FuncMap{ + "json": func(v interface{}) string { + buf := &bytes.Buffer{} + enc := json.NewEncoder(buf) + enc.SetEscapeHTML(false) + _ = enc.Encode(v) + // Remove the trailing new line added by the encoder + return strings.TrimSpace(buf.String()) + }, + "split": strings.Split, + "join": strings.Join, + "title": strings.Title, + "lower": strings.ToLower, + "upper": strings.ToUpper, + "pad": padWithSpace, + "truncate": truncateWithLength, +} + +// HeaderFunctions are used to created headers of a table. +// This is a replacement of basicFunctions for header generation +// because we want the header to remain intact. +// Some functions like `split` are irrelevant so not added. +var headerFunctions = template.FuncMap{ + "json": func(v string) string { + return v + }, + "title": func(v string) string { + return v + }, + "lower": func(v string) string { + return v + }, + "upper": func(v string) string { + return v + }, + "truncate": func(v string, l int) string { + return v + }, +} + +// Parse creates a new anonymous template with the basic functions +// and parses the given format. +func Parse(format string) (*template.Template, error) { + return NewParse("", format) +} + +// NewParse creates a new tagged template with the basic functions +// and parses the given format. +func NewParse(tag, format string) (*template.Template, error) { + return template.New(tag).Funcs(basicFunctions).Parse(format) +} + +// padWithSpace adds whitespace to the input if the input is non-empty +func padWithSpace(source string, prefix, suffix int) string { + if source == "" { + return source + } + return strings.Repeat(" ", prefix) + source + strings.Repeat(" ", suffix) +} + +// truncateWithLength truncates the source string up to the length provided by the input +func truncateWithLength(source string, length int) string { + if len(source) < length { + return source + } + return source[:length] +} diff --git a/cmd/podman/history.go b/cmd/podman/history.go new file mode 100644 index 000000000..f142f5fd4 --- /dev/null +++ b/cmd/podman/history.go @@ -0,0 +1,246 @@ +package main + +import ( + "reflect" + "strconv" + "strings" + "time" + + "github.com/containers/image/types" + units "github.com/docker/go-units" + "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/cmd/podman/formats" + "github.com/urfave/cli" +) + +const ( + createdByTruncLength = 45 + idTruncLength = 12 +) + +// historyTemplateParams stores info about each layer +type historyTemplateParams struct { + ID string + Created string + CreatedBy string + Size string + Comment string +} + +// historyJSONParams is only used when the JSON format is specified, +// and is better for data processing from JSON. +// historyJSONParams will be populated by data from v1.History and types.BlobInfo, +// the members of the struct are the sama data types as their sources. +type historyJSONParams struct { + ID string `json:"id"` + Created *time.Time `json:"created"` + CreatedBy string `json:"createdBy"` + Size int64 `json:"size"` + Comment string `json:"comment"` +} + +// historyOptions stores cli flag values +type historyOptions struct { + human bool + noTrunc bool + quiet bool + format string +} + +var ( + historyFlags = []cli.Flag{ + cli.BoolTFlag{ + Name: "human, H", + Usage: "Display sizes and dates in human readable format", + }, + cli.BoolFlag{ + Name: "no-trunc, notruncate", + Usage: "Do not truncate the output", + }, + cli.BoolFlag{ + Name: "quiet, q", + Usage: "Display the numeric IDs only", + }, + cli.StringFlag{ + Name: "format", + Usage: "Change the output to JSON or a Go template", + }, + } + + historyDescription = "Displays the history of an image. The information can be printed out in an easy to read, " + + "or user specified format, and can be truncated." + historyCommand = cli.Command{ + Name: "history", + Usage: "Show history of a specified image", + Description: historyDescription, + Flags: historyFlags, + Action: historyCmd, + ArgsUsage: "", + UseShortOptionHandling: true, + } +) + +func historyCmd(c *cli.Context) error { + if err := validateFlags(c, historyFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + format := genHistoryFormat(c.String("format"), c.Bool("quiet")) + + args := c.Args() + if len(args) == 0 { + return errors.Errorf("an image name must be specified") + } + if len(args) > 1 { + return errors.Errorf("podman history takes at most 1 argument") + } + imgName := args[0] + + opts := historyOptions{ + human: c.BoolT("human"), + noTrunc: c.Bool("no-trunc"), + quiet: c.Bool("quiet"), + format: format, + } + + history, layers, imageID, err := runtime.GetHistory(imgName) + if err != nil { + return errors.Wrapf(err, "error getting history of image %q", imgName) + } + + return generateHistoryOutput(history, layers, imageID, opts) +} + +func genHistoryFormat(format string, quiet bool) string { + if format != "" { + // "\t" from the command line is not being recognized as a tab + // replacing the string "\t" to a tab character if the user passes in "\t" + return strings.Replace(format, `\t`, "\t", -1) + } + if quiet { + return formats.IDString + } + return "table {{.ID}}\t{{.Created}}\t{{.CreatedBy}}\t{{.Size}}\t{{.Comment}}\t" +} + +// historyToGeneric makes an empty array of interfaces for output +func historyToGeneric(templParams []historyTemplateParams, JSONParams []historyJSONParams) (genericParams []interface{}) { + if len(templParams) > 0 { + for _, v := range templParams { + genericParams = append(genericParams, interface{}(v)) + } + return + } + for _, v := range JSONParams { + genericParams = append(genericParams, interface{}(v)) + } + return +} + +// generate the header based on the template provided +func (h *historyTemplateParams) headerMap() map[string]string { + v := reflect.Indirect(reflect.ValueOf(h)) + values := make(map[string]string) + for h := 0; h < v.NumField(); h++ { + key := v.Type().Field(h).Name + value := key + values[key] = strings.ToUpper(splitCamelCase(value)) + } + return values +} + +// getHistorytemplateOutput gets the modified history information to be printed in human readable format +func getHistoryTemplateOutput(history []v1.History, layers []types.BlobInfo, imageID string, opts historyOptions) (historyOutput []historyTemplateParams) { + var ( + outputSize string + createdTime string + createdBy string + count = 1 + ) + for i := len(history) - 1; i >= 0; i-- { + if i != len(history)-1 { + imageID = "" + } + if !opts.noTrunc && i == len(history)-1 { + imageID = imageID[:idTruncLength] + } + + var size int64 + if !history[i].EmptyLayer { + size = layers[len(layers)-count].Size + count++ + } + + if opts.human { + createdTime = units.HumanDuration(time.Since((*history[i].Created))) + " ago" + outputSize = units.HumanSize(float64(size)) + } else { + createdTime = (history[i].Created).Format(time.RFC3339) + outputSize = strconv.FormatInt(size, 10) + } + + createdBy = strings.Join(strings.Fields(history[i].CreatedBy), " ") + if !opts.noTrunc && len(createdBy) > createdByTruncLength { + createdBy = createdBy[:createdByTruncLength-3] + "..." + } + + params := historyTemplateParams{ + ID: imageID, + Created: createdTime, + CreatedBy: createdBy, + Size: outputSize, + Comment: history[i].Comment, + } + historyOutput = append(historyOutput, params) + } + return +} + +// getHistoryJSONOutput returns the history information in its raw form +func getHistoryJSONOutput(history []v1.History, layers []types.BlobInfo, imageID string) (historyOutput []historyJSONParams) { + count := 1 + for i := len(history) - 1; i >= 0; i-- { + var size int64 + if !history[i].EmptyLayer { + size = layers[len(layers)-count].Size + count++ + } + + params := historyJSONParams{ + ID: imageID, + Created: history[i].Created, + CreatedBy: history[i].CreatedBy, + Size: size, + Comment: history[i].Comment, + } + historyOutput = append(historyOutput, params) + } + return +} + +// generateHistoryOutput generates the history based on the format given +func generateHistoryOutput(history []v1.History, layers []types.BlobInfo, imageID string, opts historyOptions) error { + if len(history) == 0 { + return nil + } + + var out formats.Writer + + switch opts.format { + case formats.JSONString: + historyOutput := getHistoryJSONOutput(history, layers, imageID) + out = formats.JSONStructArray{Output: historyToGeneric([]historyTemplateParams{}, historyOutput)} + default: + historyOutput := getHistoryTemplateOutput(history, layers, imageID, opts) + out = formats.StdoutTemplateArray{Output: historyToGeneric(historyOutput, []historyJSONParams{}), Template: opts.format, Fields: historyOutput[0].headerMap()} + } + + return formats.Writer(out).Out() +} diff --git a/cmd/podman/images.go b/cmd/podman/images.go new file mode 100644 index 000000000..90dd8ae12 --- /dev/null +++ b/cmd/podman/images.go @@ -0,0 +1,337 @@ +package main + +import ( + "fmt" + "reflect" + "strings" + "time" + + "github.com/containers/storage" + "github.com/docker/go-units" + digest "github.com/opencontainers/go-digest" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/cmd/podman/formats" + "github.com/projectatomic/libpod/libpod" + "github.com/projectatomic/libpod/libpod/common" + "github.com/urfave/cli" +) + +type imagesTemplateParams struct { + Repository string + Tag string + ID string + Digest digest.Digest + Created string + Size string +} + +type imagesJSONParams struct { + ID string `json:"id"` + Name []string `json:"names"` + Digest digest.Digest `json:"digest"` + Created time.Time `json:"created"` + Size int64 `json:"size"` +} + +type imagesOptions struct { + quiet bool + noHeading bool + noTrunc bool + digests bool + format string +} + +var ( + imagesFlags = []cli.Flag{ + cli.BoolFlag{ + Name: "quiet, q", + Usage: "display only image IDs", + }, + cli.BoolFlag{ + Name: "noheading, n", + Usage: "do not print column headings", + }, + cli.BoolFlag{ + Name: "no-trunc, notruncate", + Usage: "do not truncate output", + }, + cli.BoolFlag{ + Name: "digests", + Usage: "show digests", + }, + cli.StringFlag{ + Name: "format", + Usage: "Change the output format to JSON or a Go template", + }, + cli.StringFlag{ + Name: "filter, f", + Usage: "filter output based on conditions provided (default [])", + }, + } + + imagesDescription = "lists locally stored images." + imagesCommand = cli.Command{ + Name: "images", + Usage: "list images in local storage", + Description: imagesDescription, + Flags: imagesFlags, + Action: imagesCmd, + ArgsUsage: "", + UseShortOptionHandling: true, + } +) + +func imagesCmd(c *cli.Context) error { + if err := validateFlags(c, imagesFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "Could not get runtime") + } + defer runtime.Shutdown(false) + + format := genImagesFormat(c.String("format"), c.Bool("quiet"), c.Bool("noheading"), c.Bool("digests")) + + opts := imagesOptions{ + quiet: c.Bool("quiet"), + noHeading: c.Bool("noheading"), + noTrunc: c.Bool("no-trunc"), + digests: c.Bool("digests"), + format: format, + } + + var imageInput string + if len(c.Args()) == 1 { + imageInput = c.Args().Get(0) + } + if len(c.Args()) > 1 { + return errors.New("'podman images' requires at most 1 argument") + } + + params, err := runtime.ParseImageFilter(imageInput, c.String("filter")) + if err != nil { + return errors.Wrapf(err, "error parsing filter") + } + + // generate the different filters + labelFilter := generateImagesFilter(params, "label") + beforeImageFilter := generateImagesFilter(params, "before-image") + sinceImageFilter := generateImagesFilter(params, "since-image") + danglingFilter := generateImagesFilter(params, "dangling") + referenceFilter := generateImagesFilter(params, "reference") + imageInputFilter := generateImagesFilter(params, "image-input") + + images, err := runtime.GetImages(params, labelFilter, beforeImageFilter, sinceImageFilter, danglingFilter, referenceFilter, imageInputFilter) + if err != nil { + return errors.Wrapf(err, "could not get list of images matching filter") + } + + return generateImagesOutput(runtime, images, opts) +} + +func genImagesFormat(format string, quiet, noHeading, digests bool) string { + if format != "" { + // "\t" from the command line is not being recognized as a tab + // replacing the string "\t" to a tab character if the user passes in "\t" + return strings.Replace(format, `\t`, "\t", -1) + } + if quiet { + return formats.IDString + } + format = "table {{.Repository}}\t{{.Tag}}\t" + if noHeading { + format = "{{.Repository}}\t{{.Tag}}\t" + } + if digests { + format += "{{.Digest}}\t" + } + format += "{{.ID}}\t{{.Created}}\t{{.Size}}\t" + return format +} + +// imagesToGeneric creates an empty array of interfaces for output +func imagesToGeneric(templParams []imagesTemplateParams, JSONParams []imagesJSONParams) (genericParams []interface{}) { + if len(templParams) > 0 { + for _, v := range templParams { + genericParams = append(genericParams, interface{}(v)) + } + return + } + for _, v := range JSONParams { + genericParams = append(genericParams, interface{}(v)) + } + return +} + +// generate the header based on the template provided +func (i *imagesTemplateParams) headerMap() map[string]string { + v := reflect.Indirect(reflect.ValueOf(i)) + values := make(map[string]string) + + for i := 0; i < v.NumField(); i++ { + key := v.Type().Field(i).Name + value := key + if value == "ID" { + value = "Image" + value + } + values[key] = strings.ToUpper(splitCamelCase(value)) + } + return values +} + +// getImagesTemplateOutput returns the images information to be printed in human readable format +func getImagesTemplateOutput(runtime *libpod.Runtime, images []*storage.Image, opts imagesOptions) (imagesOutput []imagesTemplateParams) { + var ( + lastID string + ) + for _, img := range images { + if opts.quiet && lastID == img.ID { + continue // quiet should not show the same ID multiple times + } + createdTime := img.Created + + imageID := "sha256:" + img.ID + if !opts.noTrunc { + imageID = img.ID[:idTruncLength] + } + + repository := "" + tag := "" + if len(img.Names) > 0 { + arr := strings.Split(img.Names[0], ":") + repository = arr[0] + if len(arr) == 2 { + tag = arr[1] + } + } + + imgData, _ := runtime.GetImageInspectInfo(*img) + if imgData != nil { + createdTime = *imgData.Created + } + + params := imagesTemplateParams{ + Repository: repository, + Tag: tag, + ID: imageID, + Digest: imgData.Digest, + Created: units.HumanDuration(time.Since((createdTime))) + " ago", + Size: units.HumanSizeWithPrecision(float64(imgData.Size), 3), + } + imagesOutput = append(imagesOutput, params) + } + return +} + +// getImagesJSONOutput returns the images information in its raw form +func getImagesJSONOutput(runtime *libpod.Runtime, images []*storage.Image) (imagesOutput []imagesJSONParams) { + for _, img := range images { + createdTime := img.Created + + imgData, _ := runtime.GetImageInspectInfo(*img) + if imgData != nil { + createdTime = *imgData.Created + } + + params := imagesJSONParams{ + ID: img.ID, + Name: img.Names, + Digest: imgData.Digest, + Created: createdTime, + Size: imgData.Size, + } + imagesOutput = append(imagesOutput, params) + } + return +} + +// generateImagesOutput generates the images based on the format provided +func generateImagesOutput(runtime *libpod.Runtime, images []*storage.Image, opts imagesOptions) error { + if len(images) == 0 { + return nil + } + + var out formats.Writer + + switch opts.format { + case formats.JSONString: + imagesOutput := getImagesJSONOutput(runtime, images) + out = formats.JSONStructArray{Output: imagesToGeneric([]imagesTemplateParams{}, imagesOutput)} + default: + imagesOutput := getImagesTemplateOutput(runtime, images, opts) + out = formats.StdoutTemplateArray{Output: imagesToGeneric(imagesOutput, []imagesJSONParams{}), Template: opts.format, Fields: imagesOutput[0].headerMap()} + + } + + return formats.Writer(out).Out() +} + +// generateImagesFilter returns an ImageFilter based on filterType +// to add more filters, define a new case and write what the ImageFilter function should do +func generateImagesFilter(params *libpod.ImageFilterParams, filterType string) libpod.ImageFilter { + switch filterType { + case "label": + return func(image *storage.Image, info *libpod.ImageData) bool { + if params == nil || params.Label == "" { + return true + } + + pair := strings.SplitN(params.Label, "=", 2) + if val, ok := info.Labels[pair[0]]; ok { + if len(pair) == 2 && val == pair[1] { + return true + } + if len(pair) == 1 { + return true + } + } + return false + } + case "before-image": + return func(image *storage.Image, info *libpod.ImageData) bool { + if params == nil || params.BeforeImage.IsZero() { + return true + } + return info.Created.Before(params.BeforeImage) + } + case "since-image": + return func(image *storage.Image, info *libpod.ImageData) bool { + if params == nil || params.SinceImage.IsZero() { + return true + } + return info.Created.After(params.SinceImage) + } + case "dangling": + return func(image *storage.Image, info *libpod.ImageData) bool { + if params == nil || params.Dangling == "" { + return true + } + if common.IsFalse(params.Dangling) && params.ImageName != "" { + return true + } + if common.IsTrue(params.Dangling) && params.ImageName == "" { + return true + } + return false + } + case "reference": + return func(image *storage.Image, info *libpod.ImageData) bool { + if params == nil || params.ReferencePattern == "" { + return true + } + return libpod.MatchesReference(params.ImageName, params.ReferencePattern) + } + case "image-input": + return func(image *storage.Image, info *libpod.ImageData) bool { + if params == nil || params.ImageInput == "" { + return true + } + return libpod.MatchesReference(params.ImageName, params.ImageInput) + } + default: + fmt.Println("invalid filter type", filterType) + return nil + } +} diff --git a/cmd/podman/import.go b/cmd/podman/import.go new file mode 100644 index 000000000..2e8702c3d --- /dev/null +++ b/cmd/podman/import.go @@ -0,0 +1,190 @@ +package main + +import ( + "fmt" + "io" + "io/ioutil" + "net/http" + "net/url" + "os" + "strings" + + "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/urfave/cli" +) + +var ( + importFlags = []cli.Flag{ + cli.StringSliceFlag{ + Name: "change, c", + Usage: "Apply the following possible instructions to the created image (default []): CMD | ENTRYPOINT | ENV | EXPOSE | LABEL | STOPSIGNAL | USER | VOLUME | WORKDIR", + }, + cli.StringFlag{ + Name: "message, m", + Usage: "Set commit message for imported image", + }, + } + importDescription = `Create a container image from the contents of the specified tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz). + Note remote tar balls can be specified, via web address. + Optionally tag the image. You can specify the Dockerfile instructions using the --change option. + ` + importCommand = cli.Command{ + Name: "import", + Usage: "Import a tarball to create a filesystem image", + Description: importDescription, + Flags: importFlags, + Action: importCmd, + ArgsUsage: "TARBALL [REFERENCE]", + } +) + +func importCmd(c *cli.Context) error { + if err := validateFlags(c, importFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + var opts libpod.CopyOptions + var source string + args := c.Args() + switch len(args) { + case 0: + return errors.Errorf("need to give the path to the tarball, or must specify a tarball of '-' for stdin") + case 1: + source = args[0] + case 2: + source = args[0] + opts.Reference = args[1] + default: + return errors.Errorf("too many arguments. Usage TARBALL [REFERENCE]") + } + + changes := v1.ImageConfig{} + if c.IsSet("change") { + changes, err = getImageConfig(c.StringSlice("change")) + if err != nil { + return errors.Wrapf(err, "error adding config changes to image %q", source) + } + } + + history := []v1.History{ + {Comment: c.String("message")}, + } + + config := v1.Image{ + Config: changes, + History: history, + } + + opts.ImageConfig = config + + // if source is a url, download it and save to a temp file + u, err := url.ParseRequestURI(source) + if err == nil && u.Scheme != "" { + file, err := downloadFromURL(source) + if err != nil { + return err + } + defer os.Remove(file) + source = file + } + + return runtime.ImportImage(source, opts) +} + +// donwloadFromURL downloads an image in the format "https:/example.com/myimage.tar" +// and tempoarily saves in it /var/tmp/importxyz, which is deleted after the image is imported +func downloadFromURL(source string) (string, error) { + fmt.Printf("Downloading from %q\n", source) + + outFile, err := ioutil.TempFile("/var/tmp", "import") + if err != nil { + return "", errors.Wrap(err, "error creating file") + } + defer outFile.Close() + + response, err := http.Get(source) + if err != nil { + return "", errors.Wrapf(err, "error downloading %q", source) + } + defer response.Body.Close() + + _, err = io.Copy(outFile, response.Body) + if err != nil { + return "", errors.Wrapf(err, "error saving %q to %q", source, outFile) + } + + return outFile.Name(), nil +} + +// getImageConfig converts the --change flag values in the format "CMD=/bin/bash USER=example" +// to a type v1.ImageConfig +func getImageConfig(changes []string) (v1.ImageConfig, error) { + // USER=value | EXPOSE=value | ENV=value | ENTRYPOINT=value | + // CMD=value | VOLUME=value | WORKDIR=value | LABEL=key=value | STOPSIGNAL=value + + var ( + user string + env []string + entrypoint []string + cmd []string + workingDir string + stopSignal string + ) + + exposedPorts := make(map[string]struct{}) + volumes := make(map[string]struct{}) + labels := make(map[string]string) + + for _, ch := range changes { + pair := strings.Split(ch, "=") + if len(pair) == 1 { + return v1.ImageConfig{}, errors.Errorf("no value given for instruction %q", ch) + } + switch pair[0] { + case "USER": + user = pair[1] + case "EXPOSE": + var st struct{} + exposedPorts[pair[1]] = st + case "ENV": + env = append(env, pair[1]) + case "ENTRYPOINT": + entrypoint = append(entrypoint, pair[1]) + case "CMD": + cmd = append(cmd, pair[1]) + case "VOLUME": + var st struct{} + volumes[pair[1]] = st + case "WORKDIR": + workingDir = pair[1] + case "LABEL": + if len(pair) == 3 { + labels[pair[1]] = pair[2] + } else { + labels[pair[1]] = "" + } + case "STOPSIGNAL": + stopSignal = pair[1] + } + } + + return v1.ImageConfig{ + User: user, + ExposedPorts: exposedPorts, + Env: env, + Entrypoint: entrypoint, + Cmd: cmd, + Volumes: volumes, + WorkingDir: workingDir, + Labels: labels, + StopSignal: stopSignal, + }, nil +} diff --git a/cmd/podman/info.go b/cmd/podman/info.go new file mode 100644 index 000000000..89f32a258 --- /dev/null +++ b/cmd/podman/info.go @@ -0,0 +1,84 @@ +package main + +import ( + "runtime" + + "github.com/pkg/errors" + "github.com/projectatomic/libpod/cmd/podman/formats" + "github.com/projectatomic/libpod/libpod" + "github.com/urfave/cli" +) + +var ( + infoDescription = "display system information" + infoCommand = cli.Command{ + Name: "info", + Usage: infoDescription, + Description: `Information display here pertain to the host, current storage stats, and build of podman. Useful for the user and when reporting issues.`, + Flags: infoFlags, + Action: infoCmd, + ArgsUsage: "", + } + infoFlags = []cli.Flag{ + cli.BoolFlag{ + Name: "debug, D", + Usage: "display additional debug information", + }, + cli.StringFlag{ + Name: "format", + Usage: "Change the output format to JSON or a Go template", + }, + } +) + +func infoCmd(c *cli.Context) error { + if err := validateFlags(c, infoFlags); err != nil { + return err + } + info := map[string]interface{}{} + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + infoArr, err := runtime.Info() + if err != nil { + return errors.Wrapf(err, "error getting info") + } + + if c.Bool("debug") { + debugInfo := debugInfo(c) + infoArr = append(infoArr, libpod.InfoData{Type: "debug", Data: debugInfo}) + } + + for _, currInfo := range infoArr { + info[currInfo.Type] = currInfo.Data + } + + var out formats.Writer + infoOutputFormat := c.String("format") + switch infoOutputFormat { + case formats.JSONString: + out = formats.JSONStruct{Output: info} + case "": + out = formats.YAMLStruct{Output: info} + default: + out = formats.StdoutTemplate{Output: info, Template: infoOutputFormat} + } + + formats.Writer(out).Out() + + return nil +} + +// top-level "debug" info +func debugInfo(c *cli.Context) map[string]interface{} { + info := map[string]interface{}{} + info["compiler"] = runtime.Compiler + info["go version"] = runtime.Version() + info["podman version"] = c.App.Version + info["git commit"] = gitCommit + return info +} diff --git a/cmd/podman/inspect.go b/cmd/podman/inspect.go new file mode 100644 index 000000000..7fd039b75 --- /dev/null +++ b/cmd/podman/inspect.go @@ -0,0 +1,364 @@ +package main + +import ( + "encoding/json" + + specs "github.com/opencontainers/runtime-spec/specs-go" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/cmd/podman/formats" + "github.com/projectatomic/libpod/libpod" + "github.com/sirupsen/logrus" + "github.com/urfave/cli" +) + +const ( + inspectTypeContainer = "container" + inspectTypeImage = "image" + inspectAll = "all" +) + +var ( + inspectFlags = []cli.Flag{ + cli.StringFlag{ + Name: "type, t", + Value: inspectAll, + Usage: "Return JSON for specified type, (e.g image, container or task)", + }, + cli.StringFlag{ + Name: "format, f", + Usage: "Change the output format to a Go template", + }, + cli.BoolFlag{ + Name: "size", + Usage: "Display total file size if the type is container", + }, + } + inspectDescription = "This displays the low-level information on containers and images identified by name or ID. By default, this will render all results in a JSON array. If the container and image have the same name, this will return container JSON for unspecified type." + inspectCommand = cli.Command{ + Name: "inspect", + Usage: "Displays the configuration of a container or image", + Description: inspectDescription, + Flags: inspectFlags, + Action: inspectCmd, + ArgsUsage: "CONTAINER-OR-IMAGE", + } +) + +func inspectCmd(c *cli.Context) error { + args := c.Args() + if len(args) == 0 { + return errors.Errorf("container or image name must be specified: podman inspect [options [...]] name") + } + if len(args) > 1 { + return errors.Errorf("too many arguments specified") + } + if err := validateFlags(c, inspectFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "error creating libpod runtime") + } + defer runtime.Shutdown(false) + + if c.String("type") != inspectTypeContainer && c.String("type") != inspectTypeImage && c.String("type") != inspectAll { + return errors.Errorf("the only recognized types are %q, %q, and %q", inspectTypeContainer, inspectTypeImage, inspectAll) + } + + name := args[0] + + outputFormat := c.String("format") + var data interface{} + switch c.String("type") { + case inspectTypeContainer: + ctr, err := runtime.LookupContainer(name) + if err != nil { + return errors.Wrapf(err, "error looking up container %q", name) + } + libpodInspectData, err := ctr.Inspect(c.Bool("size")) + if err != nil { + return errors.Wrapf(err, "error getting libpod container inspect data %q", ctr.ID) + } + data, err = getCtrInspectInfo(ctr, libpodInspectData) + if err != nil { + return errors.Wrapf(err, "error parsing container data %q", ctr.ID()) + } + case inspectTypeImage: + image, err := runtime.GetImage(name) + if err != nil { + return errors.Wrapf(err, "error getting image %q", name) + } + data, err = runtime.GetImageInspectInfo(*image) + if err != nil { + return errors.Wrapf(err, "error parsing image data %q", image.ID) + } + case inspectAll: + ctr, err := runtime.LookupContainer(name) + if err != nil { + image, err := runtime.GetImage(name) + if err != nil { + return errors.Wrapf(err, "error getting image %q", name) + } + data, err = runtime.GetImageInspectInfo(*image) + if err != nil { + return errors.Wrapf(err, "error parsing image data %q", image.ID) + } + } else { + libpodInspectData, err := ctr.Inspect(c.Bool("size")) + if err != nil { + return errors.Wrapf(err, "error getting libpod container inspect data %q", ctr.ID) + } + data, err = getCtrInspectInfo(ctr, libpodInspectData) + if err != nil { + return errors.Wrapf(err, "error parsing container data %q", ctr.ID) + } + } + } + + var out formats.Writer + if outputFormat != "" && outputFormat != formats.JSONString { + //template + out = formats.StdoutTemplate{Output: data, Template: outputFormat} + } else { + // default is json output + out = formats.JSONStruct{Output: data} + } + + formats.Writer(out).Out() + return nil +} + +func getCtrInspectInfo(ctr *libpod.Container, ctrInspectData *libpod.ContainerInspectData) (*ContainerData, error) { + config := ctr.Config() + spec := config.Spec + + cpus, mems, period, quota, realtimePeriod, realtimeRuntime, shares := getCPUInfo(spec) + blkioWeight, blkioWeightDevice, blkioReadBps, blkioWriteBps, blkioReadIOPS, blkioeWriteIOPS := getBLKIOInfo(spec) + memKernel, memReservation, memSwap, memSwappiness, memDisableOOMKiller := getMemoryInfo(spec) + pidsLimit := getPidsInfo(spec) + cgroup := getCgroup(spec) + + var createArtifact createConfig + artifact, err := ctr.GetArtifact("create-config") + if err == nil { + if err := json.Unmarshal(artifact, &createArtifact); err != nil { + return nil, err + } + } else { + logrus.Errorf("couldn't get some inspect information, error getting artifact %q: %v", ctr.ID(), err) + } + + data := &ContainerData{ + CtrInspectData: ctrInspectData, + HostConfig: &HostConfig{ + ConsoleSize: spec.Process.ConsoleSize, + OomScoreAdj: spec.Process.OOMScoreAdj, + CPUShares: shares, + BlkioWeight: blkioWeight, + BlkioWeightDevice: blkioWeightDevice, + BlkioDeviceReadBps: blkioReadBps, + BlkioDeviceWriteBps: blkioWriteBps, + BlkioDeviceReadIOps: blkioReadIOPS, + BlkioDeviceWriteIOps: blkioeWriteIOPS, + CPUPeriod: period, + CPUQuota: quota, + CPURealtimePeriod: realtimePeriod, + CPURealtimeRuntime: realtimeRuntime, + CPUSetCPUs: cpus, + CPUSetMems: mems, + Devices: spec.Linux.Devices, + KernelMemory: memKernel, + MemoryReservation: memReservation, + MemorySwap: memSwap, + MemorySwappiness: memSwappiness, + OomKillDisable: memDisableOOMKiller, + PidsLimit: pidsLimit, + Privileged: spec.Process.NoNewPrivileges, + ReadonlyRootfs: spec.Root.Readonly, + Runtime: ctr.RuntimeName(), + NetworkMode: string(createArtifact.NetMode), + IpcMode: string(createArtifact.IpcMode), + Cgroup: cgroup, + UTSMode: string(createArtifact.UtsMode), + UsernsMode: createArtifact.NsUser, + GroupAdd: spec.Process.User.AdditionalGids, + ContainerIDFile: createArtifact.CidFile, + AutoRemove: createArtifact.Rm, + CapAdd: createArtifact.CapAdd, + CapDrop: createArtifact.CapDrop, + DNS: createArtifact.DNSServers, + DNSOptions: createArtifact.DNSOpt, + DNSSearch: createArtifact.DNSSearch, + PidMode: string(createArtifact.PidMode), + CgroupParent: createArtifact.CgroupParent, + ShmSize: createArtifact.Resources.ShmSize, + Memory: createArtifact.Resources.Memory, + Ulimits: createArtifact.Resources.Ulimit, + SecurityOpt: createArtifact.SecurityOpts, + }, + Config: &CtrConfig{ + Hostname: spec.Hostname, + User: spec.Process.User, + Env: spec.Process.Env, + Image: config.RootfsImageName, + WorkingDir: spec.Process.Cwd, + Labels: config.Labels, + Annotations: spec.Annotations, + Tty: spec.Process.Terminal, + OpenStdin: config.Stdin, + StopSignal: config.StopSignal, + Cmd: config.Spec.Process.Args, + Entrypoint: createArtifact.Entrypoint, + }, + } + return data, nil +} + +func getCPUInfo(spec *specs.Spec) (string, string, *uint64, *int64, *uint64, *int64, *uint64) { + if spec.Linux.Resources == nil { + return "", "", nil, nil, nil, nil, nil + } + cpu := spec.Linux.Resources.CPU + if cpu == nil { + return "", "", nil, nil, nil, nil, nil + } + return cpu.Cpus, cpu.Mems, cpu.Period, cpu.Quota, cpu.RealtimePeriod, cpu.RealtimeRuntime, cpu.Shares +} + +func getBLKIOInfo(spec *specs.Spec) (*uint16, []specs.LinuxWeightDevice, []specs.LinuxThrottleDevice, []specs.LinuxThrottleDevice, []specs.LinuxThrottleDevice, []specs.LinuxThrottleDevice) { + if spec.Linux.Resources == nil { + return nil, nil, nil, nil, nil, nil + } + blkio := spec.Linux.Resources.BlockIO + if blkio == nil { + return nil, nil, nil, nil, nil, nil + } + return blkio.Weight, blkio.WeightDevice, blkio.ThrottleReadBpsDevice, blkio.ThrottleWriteBpsDevice, blkio.ThrottleReadIOPSDevice, blkio.ThrottleWriteIOPSDevice +} + +func getMemoryInfo(spec *specs.Spec) (*int64, *int64, *int64, *uint64, *bool) { + if spec.Linux.Resources == nil { + return nil, nil, nil, nil, nil + } + memory := spec.Linux.Resources.Memory + if memory == nil { + return nil, nil, nil, nil, nil + } + return memory.Kernel, memory.Reservation, memory.Swap, memory.Swappiness, memory.DisableOOMKiller +} + +func getPidsInfo(spec *specs.Spec) *int64 { + if spec.Linux.Resources == nil { + return nil + } + pids := spec.Linux.Resources.Pids + if pids == nil { + return nil + } + return &pids.Limit +} + +func getCgroup(spec *specs.Spec) string { + cgroup := "host" + for _, ns := range spec.Linux.Namespaces { + if ns.Type == specs.CgroupNamespace && ns.Path != "" { + cgroup = "container" + } + } + return cgroup +} + +// ContainerData holds the podman inspect data for a container +type ContainerData struct { + CtrInspectData *libpod.ContainerInspectData `json:"CtrInspectData"` + HostConfig *HostConfig `json:"HostConfig"` + Config *CtrConfig `json:"Config"` +} + +// LogConfig holds the log information for a container +type LogConfig struct { + Type string `json:"Type"` // TODO + Config map[string]string `json:"Config"` //idk type, TODO +} + +// HostConfig represents the host configuration for the container +type HostConfig struct { + ContainerIDFile string `json:"ContainerIDFile"` + LogConfig *LogConfig `json:"LogConfig"` //TODO + NetworkMode string `json:"NetworkMode"` + PortBindings map[string]struct{} `json:"PortBindings"` //TODO + AutoRemove bool `json:"AutoRemove"` + CapAdd []string `json:"CapAdd"` + CapDrop []string `json:"CapDrop"` + DNS []string `json:"DNS"` + DNSOptions []string `json:"DNSOptions"` + DNSSearch []string `json:"DNSSearch"` + ExtraHosts []string `json:"ExtraHosts"` + GroupAdd []uint32 `json:"GroupAdd"` + IpcMode string `json:"IpcMode"` + Cgroup string `json:"Cgroup"` + OomScoreAdj *int `json:"OomScoreAdj"` + PidMode string `json:"PidMode"` + Privileged bool `json:"Privileged"` + PublishAllPorts bool `json:"PublishAllPorts"` //TODO + ReadonlyRootfs bool `json:"ReadonlyRootfs"` + SecurityOpt []string `json:"SecurityOpt"` + UTSMode string `json:"UTSMode"` + UsernsMode string `json:"UsernsMode"` + ShmSize string `json:"ShmSize"` + Runtime string `json:"Runtime"` + ConsoleSize *specs.Box `json:"ConsoleSize"` + Isolation string `json:"Isolation"` //TODO + CPUShares *uint64 `json:"CPUSShares"` + Memory int64 `json:"Memory"` + NanoCPUs int `json:"NanoCPUs"` //check type, TODO + CgroupParent string `json:"CgroupParent"` + BlkioWeight *uint16 `json:"BlkioWeight"` + BlkioWeightDevice []specs.LinuxWeightDevice `json:"BlkioWeightDevice"` + BlkioDeviceReadBps []specs.LinuxThrottleDevice `json:"BlkioDeviceReadBps"` + BlkioDeviceWriteBps []specs.LinuxThrottleDevice `json:"BlkioDeviceWriteBps"` + BlkioDeviceReadIOps []specs.LinuxThrottleDevice `json:"BlkioDeviceReadIOps"` + BlkioDeviceWriteIOps []specs.LinuxThrottleDevice `json:"BlkioDeviceWriteIOps"` + CPUPeriod *uint64 `json:"CPUPeriod"` + CPUQuota *int64 `json:"CPUQuota"` + CPURealtimePeriod *uint64 `json:"CPURealtimePeriod"` + CPURealtimeRuntime *int64 `json:"CPURealtimeRuntime"` + CPUSetCPUs string `json:"CPUSetCPUs"` + CPUSetMems string `json:"CPUSetMems"` + Devices []specs.LinuxDevice `json:"Devices"` + DiskQuota int `json:"DiskQuota"` //check type, TODO + KernelMemory *int64 `json:"KernelMemory"` + MemoryReservation *int64 `json:"MemoryReservation"` + MemorySwap *int64 `json:"MemorySwap"` + MemorySwappiness *uint64 `json:"MemorySwappiness"` + OomKillDisable *bool `json:"OomKillDisable"` + PidsLimit *int64 `json:"PidsLimit"` + Ulimits []string `json:"Ulimits"` + CPUCount int `json:"CPUCount"` //check type, TODO + CPUPercent int `json:"CPUPercent"` //check type, TODO + IOMaximumIOps int `json:"IOMaximumIOps"` //check type, TODO + IOMaximumBandwidth int `json:"IOMaximumBandwidth"` //check type, TODO +} + +// CtrConfig holds information about the container configuration +type CtrConfig struct { + Hostname string `json:"Hostname"` + DomainName string `json:"Domainname"` //TODO + User specs.User `json:"User"` + AttachStdin bool `json:"AttachStdin"` //TODO + AttachStdout bool `json:"AttachStdout"` //TODO + AttachStderr bool `json:"AttachStderr"` //TODO + Tty bool `json:"Tty"` + OpenStdin bool `json:"OpenStdin"` + StdinOnce bool `json:"StdinOnce"` //TODO + Env []string `json:"Env"` + Cmd []string `json:"Cmd"` + Image string `json:"Image"` + Volumes map[string]struct{} `json:"Volumes"` + WorkingDir string `json:"WorkingDir"` + Entrypoint string `json:"Entrypoint"` + Labels map[string]string `json:"Labels"` + Annotations map[string]string `json:"Annotations"` + StopSignal uint `json:"StopSignal"` +} diff --git a/cmd/podman/kill.go b/cmd/podman/kill.go new file mode 100644 index 000000000..776c7ef20 --- /dev/null +++ b/cmd/podman/kill.go @@ -0,0 +1,80 @@ +package main + +import ( + "fmt" + "os" + "syscall" + + "github.com/docker/docker/pkg/signal" + "github.com/pkg/errors" + "github.com/urfave/cli" +) + +var ( + killFlags = []cli.Flag{ + cli.StringFlag{ + Name: "signal, s", + Usage: "Signal to send to the container", + Value: "KILL", + }, + } + killDescription = "The main process inside each container specified will be sent SIGKILL, or any signal specified with option --signal." + killCommand = cli.Command{ + Name: "kill", + Usage: "Kill one or more running containers with a specific signal", + Description: killDescription, + Flags: killFlags, + Action: killCmd, + ArgsUsage: "[CONTAINER_NAME_OR_ID]", + } +) + +// killCmd kills one or more containers with a signal +func killCmd(c *cli.Context) error { + args := c.Args() + if len(args) == 0 { + return errors.Errorf("specify one or more containers to kill") + } + if err := validateFlags(c, killFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + var killSignal uint = uint(syscall.SIGTERM) + if c.String("signal") != "" { + // Check if the signalString provided by the user is valid + // Invalid signals will return err + sysSignal, err := signal.ParseSignal(c.String("signal")) + if err != nil { + return err + } + killSignal = uint(sysSignal) + } + + var lastError error + for _, container := range c.Args() { + ctr, err := runtime.LookupContainer(container) + if err != nil { + if lastError != nil { + fmt.Fprintln(os.Stderr, lastError) + } + lastError = errors.Wrapf(err, "unable to find container %v", container) + continue + } + + if err := ctr.Kill(killSignal); err != nil { + if lastError != nil { + fmt.Fprintln(os.Stderr, lastError) + } + lastError = errors.Wrapf(err, "unable to find container %v", container) + } else { + fmt.Println(ctr.ID()) + } + } + return lastError +} diff --git a/cmd/podman/load.go b/cmd/podman/load.go new file mode 100644 index 000000000..2f3d9c56d --- /dev/null +++ b/cmd/podman/load.go @@ -0,0 +1,123 @@ +package main + +import ( + "fmt" + "io" + "io/ioutil" + "os" + + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/urfave/cli" +) + +var ( + loadFlags = []cli.Flag{ + cli.StringFlag{ + Name: "input, i", + Usage: "Read from archive file, default is STDIN", + Value: "/dev/stdin", + }, + cli.BoolFlag{ + Name: "quiet, q", + Usage: "Suppress the output", + }, + cli.StringFlag{ + Name: "signature-policy", + Usage: "`pathname` of signature policy file (not usually used)", + }, + } + loadDescription = "Loads the image from docker-archive stored on the local machine." + loadCommand = cli.Command{ + Name: "load", + Usage: "load an image from docker archive", + Description: loadDescription, + Flags: loadFlags, + Action: loadCmd, + ArgsUsage: "", + } +) + +// loadCmd gets the image/file to be loaded from the command line +// and calls loadImage to load the image to containers-storage +func loadCmd(c *cli.Context) error { + + args := c.Args() + var image string + if len(args) == 1 { + image = args[0] + } + if len(args) > 1 { + return errors.New("too many arguments. Requires exactly 1") + } + if err := validateFlags(c, loadFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + input := c.String("input") + + if input == "/dev/stdin" { + fi, err := os.Stdin.Stat() + if err != nil { + return err + } + // checking if loading from pipe + if !fi.Mode().IsRegular() { + outFile, err := ioutil.TempFile("/var/tmp", "podman") + if err != nil { + return errors.Errorf("error creating file %v", err) + } + defer outFile.Close() + defer os.Remove(outFile.Name()) + + inFile, err := os.OpenFile(input, 0, 0666) + if err != nil { + return errors.Errorf("error reading file %v", err) + } + defer inFile.Close() + + _, err = io.Copy(outFile, inFile) + if err != nil { + return errors.Errorf("error copying file %v", err) + } + + input = outFile.Name() + } + } + + var writer io.Writer + if !c.Bool("quiet") { + writer = os.Stdout + } + + options := libpod.CopyOptions{ + SignaturePolicyPath: c.String("signature-policy"), + Writer: writer, + } + + src := libpod.DockerArchive + ":" + input + imgName, err := runtime.PullImage(src, options) + if err != nil { + // generate full src name with specified image:tag + fullSrc := libpod.OCIArchive + ":" + input + if image != "" { + fullSrc = fullSrc + ":" + image + } + imgName, err = runtime.PullImage(fullSrc, options) + if err != nil { + src = libpod.DirTransport + ":" + input + imgName, err = runtime.PullImage(src, options) + if err != nil { + return errors.Wrapf(err, "error pulling %q", src) + } + } + } + fmt.Println("Loaded image: ", imgName) + return nil +} diff --git a/cmd/podman/login.go b/cmd/podman/login.go new file mode 100644 index 000000000..8984d069c --- /dev/null +++ b/cmd/podman/login.go @@ -0,0 +1,110 @@ +package main + +import ( + "bufio" + "context" + "fmt" + "os" + "strings" + + "github.com/containers/image/docker" + "github.com/containers/image/pkg/docker/config" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod/common" + "github.com/urfave/cli" + "golang.org/x/crypto/ssh/terminal" +) + +var ( + loginFlags = []cli.Flag{ + cli.StringFlag{ + Name: "password, p", + Usage: "Password for registry", + }, + cli.StringFlag{ + Name: "username, u", + Usage: "Username for registry", + }, + cli.StringFlag{ + Name: "authfile", + Usage: "Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json", + }, + } + loginDescription = "Login to a container registry on a specified server." + loginCommand = cli.Command{ + Name: "login", + Usage: "login to a container registry", + Description: loginDescription, + Flags: loginFlags, + Action: loginCmd, + ArgsUsage: "REGISTRY", + } +) + +// loginCmd uses the authentication package to store a user's authenticated credentials +// in an auth.json file for future use +func loginCmd(c *cli.Context) error { + args := c.Args() + if len(args) > 1 { + return errors.Errorf("too many arguments, login takes only 1 argument") + } + if len(args) == 0 { + return errors.Errorf("registry must be given") + } + var server string + if len(args) == 1 { + server = args[0] + } + + sc := common.GetSystemContext("", c.String("authfile"), false) + + // username of user logged in to server (if one exists) + userFromAuthFile := config.GetUserLoggedIn(sc, server) + username, password, err := getUserAndPass(c.String("username"), c.String("password"), userFromAuthFile) + if err != nil { + return errors.Wrapf(err, "error getting username and password") + } + + if err = docker.CheckAuth(context.TODO(), sc, username, password, server); err == nil { + if err := config.SetAuthentication(sc, server, username, password); err != nil { + return err + } + } + switch err { + case nil: + fmt.Println("Login Succeeded!") + return nil + case docker.ErrUnauthorizedForCredentials: + return errors.Errorf("error logging into %q: invalid username/password\n", server) + default: + return errors.Wrapf(err, "error authenticating creds for %q", server) + } +} + +// getUserAndPass gets the username and password from STDIN if not given +// using the -u and -p flags +func getUserAndPass(username, password, userFromAuthFile string) (string, string, error) { + var err error + reader := bufio.NewReader(os.Stdin) + if username == "" { + if userFromAuthFile != "" { + fmt.Printf("Username (%s): ", userFromAuthFile) + } else { + fmt.Print("Username: ") + } + username, err = reader.ReadString('\n') + if err != nil { + return "", "", errors.Wrapf(err, "error reading username") + } + } + if password == "" { + fmt.Print("Password: ") + pass, err := terminal.ReadPassword(0) + if err != nil { + return "", "", errors.Wrapf(err, "error reading password") + } + password = string(pass) + fmt.Println() + } + return strings.TrimSpace(username), password, err +} diff --git a/cmd/podman/logout.go b/cmd/podman/logout.go new file mode 100644 index 000000000..cae8ddfb2 --- /dev/null +++ b/cmd/podman/logout.go @@ -0,0 +1,69 @@ +package main + +import ( + "fmt" + + "github.com/containers/image/pkg/docker/config" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod/common" + "github.com/urfave/cli" +) + +var ( + logoutFlags = []cli.Flag{ + cli.StringFlag{ + Name: "authfile", + Usage: "Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json", + }, + cli.BoolFlag{ + Name: "all, a", + Usage: "Remove the cached credentials for all registries in the auth file", + }, + } + logoutDescription = "Remove the cached username and password for the registry." + logoutCommand = cli.Command{ + Name: "logout", + Usage: "logout of a container registry", + Description: logoutDescription, + Flags: logoutFlags, + Action: logoutCmd, + ArgsUsage: "REGISTRY", + } +) + +// logoutCmd uses the authentication package to remove the authenticated of a registry +// stored in the auth.json file +func logoutCmd(c *cli.Context) error { + args := c.Args() + if len(args) > 1 { + return errors.Errorf("too many arguments, logout takes only 1 argument") + } + if len(args) == 0 { + return errors.Errorf("registry must be given") + } + var server string + if len(args) == 1 { + server = args[0] + } + + sc := common.GetSystemContext("", c.String("authfile"), false) + + if c.Bool("all") { + if err := config.RemoveAllAuthentication(sc); err != nil { + return err + } + fmt.Println("Remove login credentials for all registries") + return nil + } + + err := config.RemoveAuthentication(sc, server) + switch err { + case nil: + fmt.Printf("Remove login credentials for %s\n", server) + return nil + case config.ErrNotLoggedIn: + return errors.Errorf("Not logged into %s\n", server) + default: + return errors.Wrapf(err, "error logging out of %q", server) + } +} diff --git a/cmd/podman/logs.go b/cmd/podman/logs.go new file mode 100644 index 000000000..8745d5d7f --- /dev/null +++ b/cmd/podman/logs.go @@ -0,0 +1,153 @@ +package main + +import ( + "fmt" + "strings" + "time" + + "github.com/hpcloud/tail" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/urfave/cli" +) + +type logOptions struct { + details bool + follow bool + sinceTime time.Time + tail uint64 +} + +var ( + logsFlags = []cli.Flag{ + cli.BoolFlag{ + Name: "details", + Usage: "Show extra details provided to the logs", + Hidden: true, + }, + cli.BoolFlag{ + Name: "follow, f", + Usage: "Follow log output. The default is false", + }, + cli.StringFlag{ + Name: "since", + Usage: "Show logs since TIMESTAMP", + }, + cli.Uint64Flag{ + Name: "tail", + Usage: "Output the specified number of LINES at the end of the logs. Defaults to 0, which prints all lines", + }, + } + logsDescription = "The podman logs command batch-retrieves whatever logs are present for a container at the time of execution. This does not guarantee execution" + + "order when combined with podman run (i.e. your run may not have generated any logs at the time you execute podman logs" + logsCommand = cli.Command{ + Name: "logs", + Usage: "Fetch the logs of a container", + Description: logsDescription, + Flags: logsFlags, + Action: logsCmd, + ArgsUsage: "CONTAINER", + } +) + +func logsCmd(c *cli.Context) error { + if err := validateFlags(c, logsFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + args := c.Args() + if len(args) != 1 { + return errors.Errorf("'podman logs' requires exactly one container name/ID") + } + + sinceTime := time.Time{} + if c.IsSet("since") { + // parse time, error out if something is wrong + since, err := time.Parse("2006-01-02T15:04:05.999999999-07:00", c.String("since")) + if err != nil { + return errors.Wrapf(err, "could not parse time: %q", c.String("since")) + } + sinceTime = since + } + + opts := logOptions{ + details: c.Bool("details"), + follow: c.Bool("follow"), + sinceTime: sinceTime, + tail: c.Uint64("tail"), + } + + ctr, err := runtime.LookupContainer(args[0]) + if err != nil { + return err + } + + logs := make(chan string) + go func() { + err = getLogs(ctr, logs, opts) + }() + printLogs(logs) + return err +} + +// getLogs returns the logs of a container from the log file +// log file is created when the container is started/ran +func getLogs(container *libpod.Container, logChan chan string, opts logOptions) error { + defer close(logChan) + + seekInfo := &tail.SeekInfo{Offset: 0, Whence: 0} + if opts.tail > 0 { + // seek to correct position in log files + seekInfo.Offset = int64(opts.tail) + seekInfo.Whence = 2 + } + + t, err := tail.TailFile(container.LogPath(), tail.Config{Follow: opts.follow, ReOpen: false, Location: seekInfo}) + for line := range t.Lines { + if since, err := logSinceTime(opts.sinceTime, line.Text); err != nil || !since { + continue + } + logMessage := line.Text[secondSpaceIndex(line.Text):] + logChan <- logMessage + } + return err +} + +func printLogs(logs chan string) { + for line := range logs { + fmt.Println(line) + } +} + +// returns true if the time stamps of the logs are equal to or after the +// timestamp comparing to +func logSinceTime(sinceTime time.Time, logStr string) (bool, error) { + timestamp := strings.Split(logStr, " ")[0] + logTime, err := time.Parse("2006-01-02T15:04:05.999999999-07:00", timestamp) + if err != nil { + return false, err + } + return logTime.After(sinceTime) || logTime.Equal(sinceTime), nil +} + +// secondSpaceIndex returns the index of the second space in a string +// In a line of the logs, the first two tokens are a timestamp and stdout/stderr, +// followed by the message itself. This allows us to get the index of the message +// and avoid sending the other information back to the caller of GetLogs() +func secondSpaceIndex(line string) int { + index := strings.Index(line, " ") + if index == -1 { + return 0 + } + index = strings.Index(line[index:], " ") + if index == -1 { + return 0 + } + return index +} diff --git a/cmd/podman/main.go b/cmd/podman/main.go new file mode 100644 index 000000000..cc6d26992 --- /dev/null +++ b/cmd/podman/main.go @@ -0,0 +1,161 @@ +package main + +import ( + "fmt" + "os" + "runtime/pprof" + + "github.com/containers/storage/pkg/reexec" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "github.com/urfave/cli" +) + +// This is populated by the Makefile from the VERSION file +// in the repository +var podmanVersion = "" + +func main() { + debug := false + cpuProfile := false + + if reexec.Init() { + return + } + + app := cli.NewApp() + app.Name = "podman" + app.Usage = "manage pods and images" + + var v string + if podmanVersion != "" { + v = podmanVersion + } + app.Version = v + + app.Commands = []cli.Command{ + attachCommand, + createCommand, + diffCommand, + execCommand, + exportCommand, + historyCommand, + imagesCommand, + importCommand, + infoCommand, + inspectCommand, + killCommand, + loadCommand, + loginCommand, + logoutCommand, + logsCommand, + mountCommand, + pauseCommand, + psCommand, + pullCommand, + pushCommand, + rmCommand, + rmiCommand, + runCommand, + saveCommand, + startCommand, + statsCommand, + stopCommand, + tagCommand, + topCommand, + umountCommand, + unpauseCommand, + versionCommand, + waitCommand, + } + app.Before = func(c *cli.Context) error { + logLevel := c.GlobalString("log-level") + if logLevel != "" { + level, err := logrus.ParseLevel(logLevel) + if err != nil { + return err + } + + logrus.SetLevel(level) + } + + if logLevel == "debug" { + debug = true + + } + if c.GlobalIsSet("cpu-profile") { + f, err := os.Create(c.GlobalString("cpu-profile")) + if err != nil { + return errors.Wrapf(err, "unable to create cpu profiling file %s", + c.GlobalString("cpu-profile")) + } + cpuProfile = true + pprof.StartCPUProfile(f) + } + return nil + } + app.After = func(*cli.Context) error { + // called by Run() when the command handler succeeds + shutdownStores() + if cpuProfile { + pprof.StopCPUProfile() + } + return nil + } + cli.OsExiter = func(code int) { + // called by Run() when the command fails, bypassing After() + shutdownStores() + os.Exit(code) + } + app.Flags = []cli.Flag{ + cli.StringFlag{ + Name: "cni-config-dir", + Usage: "path of the configuration directory for CNI networks", + }, + cli.StringFlag{ + Name: "config, c", + Usage: "path of a config file detailing container server configuration options", + }, + cli.StringFlag{ + Name: "conmon", + Usage: "path of the conmon binary", + }, + cli.StringFlag{ + Name: "cpu-profile", + Usage: "path for the cpu profiling results", + }, + cli.StringFlag{ + Name: "log-level", + Usage: "log messages above specified level: debug, info, warn, error (default), fatal or panic", + Value: "error", + }, + cli.StringFlag{ + Name: "root", + Usage: "path to the root directory in which data, including images, is stored", + }, + cli.StringFlag{ + Name: "runroot", + Usage: "path to the 'run directory' where all state information is stored", + }, + cli.StringFlag{ + Name: "runtime", + Usage: "path to the OCI-compatible binary used to run containers, default is /usr/bin/runc", + }, + cli.StringFlag{ + Name: "storage-driver, s", + Usage: "select which storage driver is used to manage storage of images and containers (default is overlay)", + }, + cli.StringSliceFlag{ + Name: "storage-opt", + Usage: "used to pass an option to the storage driver", + }, + } + if err := app.Run(os.Args); err != nil { + if debug { + logrus.Errorf(err.Error()) + } else { + fmt.Fprintln(os.Stderr, err.Error()) + } + cli.OsExiter(1) + } +} diff --git a/cmd/podman/mount.go b/cmd/podman/mount.go new file mode 100644 index 000000000..9db27fcda --- /dev/null +++ b/cmd/podman/mount.go @@ -0,0 +1,125 @@ +package main + +import ( + js "encoding/json" + "fmt" + + "github.com/pkg/errors" + of "github.com/projectatomic/libpod/cmd/podman/formats" + "github.com/urfave/cli" +) + +var ( + mountDescription = ` + podman mount + Lists all mounted containers mount points + + podman mount CONTAINER-NAME-OR-ID + Mounts the specified container and outputs the mountpoint +` + + mountFlags = []cli.Flag{ + cli.BoolFlag{ + Name: "notruncate", + Usage: "do not truncate output", + }, + cli.StringFlag{ + Name: "label", + Usage: "SELinux label for the mount point", + }, + cli.StringFlag{ + Name: "format", + Usage: "Change the output format to Go template", + }, + } + mountCommand = cli.Command{ + Name: "mount", + Usage: "Mount a working container's root filesystem", + Description: mountDescription, + Action: mountCmd, + ArgsUsage: "[CONTAINER-NAME-OR-ID]", + Flags: mountFlags, + } +) + +// jsonMountPoint stores info about each container +type jsonMountPoint struct { + ID string `json:"id"` + Names []string `json:"names"` + MountPoint string `json:"mountpoint"` +} + +func mountCmd(c *cli.Context) error { + if err := validateFlags(c, mountFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + formats := map[string]bool{ + "": true, + of.JSONString: true, + } + + args := c.Args() + json := c.String("format") == of.JSONString + if !formats[c.String("format")] { + return errors.Errorf("%q is not a supported format", c.String("format")) + } + + if len(args) > 1 { + return errors.Errorf("too many arguments specified") + } + + if len(args) == 1 { + if json { + return errors.Wrapf(err, "json option can not be used with a container id") + } + ctr, err := runtime.LookupContainer(args[0]) + if err != nil { + return errors.Wrapf(err, "error looking up container %q", args[0]) + } + mountPoint, err := ctr.Mount(c.String("label")) + if err != nil { + return errors.Wrapf(err, "error mounting container %q", ctr.ID()) + } + fmt.Printf("%s\n", mountPoint) + } else { + jsonMountPoints := []jsonMountPoint{} + containers, err2 := runtime.GetContainers() + if err2 != nil { + return errors.Wrapf(err2, "error reading list of all containers") + } + for _, container := range containers { + mountPoint, err := container.MountPoint() + if err != nil { + return errors.Wrapf(err, "error getting mountpoint for %q", container.ID()) + } + if mountPoint == "" { + continue + } + if json { + jsonMountPoints = append(jsonMountPoints, jsonMountPoint{ID: container.ID(), Names: []string{container.Name()}, MountPoint: mountPoint}) + continue + } + + if c.Bool("notruncate") { + fmt.Printf("%-64s %s\n", container.ID(), mountPoint) + } else { + fmt.Printf("%-12.12s %s\n", container.ID(), mountPoint) + } + } + if json { + data, err := js.MarshalIndent(jsonMountPoints, "", " ") + if err != nil { + return err + } + fmt.Printf("%s\n", data) + } + } + return nil +} diff --git a/cmd/podman/parse.go b/cmd/podman/parse.go new file mode 100644 index 000000000..53d49c36c --- /dev/null +++ b/cmd/podman/parse.go @@ -0,0 +1,863 @@ +//nolint +// most of these validate and parse functions have been taken from projectatomic/docker +// and modified for cri-o +package main + +import ( + "bufio" + "bytes" + "encoding/json" + "fmt" + "io/ioutil" + "net" + "os" + "os/user" + "path" + "regexp" + "strconv" + "strings" + + units "github.com/docker/go-units" + specs "github.com/opencontainers/runtime-spec/specs-go" + "github.com/pkg/errors" + pb "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime" +) + +// Note: for flags that are in the form , use the RAMInBytes function +// from the units package in docker/go-units/size.go + +var ( + whiteSpaces = " \t" + alphaRegexp = regexp.MustCompile(`[a-zA-Z]`) + domainRegexp = regexp.MustCompile(`^(:?(:?[a-zA-Z0-9]|(:?[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]))(:?\.(:?[a-zA-Z0-9]|(:?[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])))*)\.?\s*$`) +) + +// validateExtraHost validates that the specified string is a valid extrahost and returns it. +// ExtraHost is in the form of name:ip where the ip has to be a valid ip (ipv4 or ipv6). +// for add-host flag +func validateExtraHost(val string) (string, error) { //nolint + // allow for IPv6 addresses in extra hosts by only splitting on first ":" + arr := strings.SplitN(val, ":", 2) + if len(arr) != 2 || len(arr[0]) == 0 { + return "", fmt.Errorf("bad format for add-host: %q", val) + } + if _, err := validateIPAddress(arr[1]); err != nil { + return "", fmt.Errorf("invalid IP address in add-host: %q", arr[1]) + } + return val, nil +} + +// validateIPAddress validates an Ip address. +// for dns, ip, and ip6 flags also +func validateIPAddress(val string) (string, error) { + var ip = net.ParseIP(strings.TrimSpace(val)) + if ip != nil { + return ip.String(), nil + } + return "", fmt.Errorf("%s is not an ip address", val) +} + +// validateAttach validates that the specified string is a valid attach option. +// for attach flag +func validateAttach(val string) (string, error) { //nolint + s := strings.ToLower(val) + for _, str := range []string{"stdin", "stdout", "stderr"} { + if s == str { + return s, nil + } + } + return val, fmt.Errorf("valid streams are STDIN, STDOUT and STDERR") +} + +// validate the blkioWeight falls in the range of 10 to 1000 +// for blkio-weight flag +func validateBlkioWeight(val int64) (int64, error) { //nolint + if val >= 10 && val <= 1000 { + return val, nil + } + return -1, errors.Errorf("invalid blkio weight %q, should be between 10 and 1000", val) +} + +// weightDevice is a structure that holds device:weight pair +type weightDevice struct { + path string + weight uint16 +} + +func (w *weightDevice) String() string { + return fmt.Sprintf("%s:%d", w.path, w.weight) +} + +// validateweightDevice validates that the specified string has a valid device-weight format +// for blkio-weight-device flag +func validateweightDevice(val string) (*weightDevice, error) { + split := strings.SplitN(val, ":", 2) + if len(split) != 2 { + return nil, fmt.Errorf("bad format: %s", val) + } + if !strings.HasPrefix(split[0], "/dev/") { + return nil, fmt.Errorf("bad format for device path: %s", val) + } + weight, err := strconv.ParseUint(split[1], 10, 0) + if err != nil { + return nil, fmt.Errorf("invalid weight for device: %s", val) + } + if weight > 0 && (weight < 10 || weight > 1000) { + return nil, fmt.Errorf("invalid weight for device: %s", val) + } + + return &weightDevice{ + path: split[0], + weight: uint16(weight), + }, nil +} + +// parseDevice parses a device mapping string to a container.DeviceMapping struct +// for device flag +func parseDevice(device string) (*pb.Device, error) { //nolint + _, err := validateDevice(device) + if err != nil { + return nil, errors.Wrapf(err, "device string not valid %q", device) + } + + src := "" + dst := "" + permissions := "rwm" + arr := strings.Split(device, ":") + switch len(arr) { + case 3: + permissions = arr[2] + fallthrough + case 2: + if validDeviceMode(arr[1]) { + permissions = arr[1] + } else { + dst = arr[1] + } + fallthrough + case 1: + src = arr[0] + default: + return nil, fmt.Errorf("invalid device specification: %s", device) + } + + if dst == "" { + dst = src + } + + deviceMapping := &pb.Device{ + ContainerPath: dst, + HostPath: src, + Permissions: permissions, + } + return deviceMapping, nil +} + +// validDeviceMode checks if the mode for device is valid or not. +// Valid mode is a composition of r (read), w (write), and m (mknod). +func validDeviceMode(mode string) bool { + var legalDeviceMode = map[rune]bool{ + 'r': true, + 'w': true, + 'm': true, + } + if mode == "" { + return false + } + for _, c := range mode { + if !legalDeviceMode[c] { + return false + } + legalDeviceMode[c] = false + } + return true +} + +// validateDevice validates a path for devices +// It will make sure 'val' is in the form: +// [host-dir:]container-path[:mode] +// It also validates the device mode. +func validateDevice(val string) (string, error) { + return validatePath(val, validDeviceMode) +} + +func validatePath(val string, validator func(string) bool) (string, error) { + var containerPath string + var mode string + + if strings.Count(val, ":") > 2 { + return val, fmt.Errorf("bad format for path: %s", val) + } + + split := strings.SplitN(val, ":", 3) + if split[0] == "" { + return val, fmt.Errorf("bad format for path: %s", val) + } + switch len(split) { + case 1: + containerPath = split[0] + val = path.Clean(containerPath) + case 2: + if isValid := validator(split[1]); isValid { + containerPath = split[0] + mode = split[1] + val = fmt.Sprintf("%s:%s", path.Clean(containerPath), mode) + } else { + containerPath = split[1] + val = fmt.Sprintf("%s:%s", split[0], path.Clean(containerPath)) + } + case 3: + containerPath = split[1] + mode = split[2] + if isValid := validator(split[2]); !isValid { + return val, fmt.Errorf("bad mode specified: %s", mode) + } + val = fmt.Sprintf("%s:%s:%s", split[0], containerPath, mode) + } + + if !path.IsAbs(containerPath) { + return val, fmt.Errorf("%s is not an absolute path", containerPath) + } + return val, nil +} + +// throttleDevice is a structure that holds device:rate_per_second pair +type throttleDevice struct { + path string + rate uint64 +} + +func (t *throttleDevice) String() string { + return fmt.Sprintf("%s:%d", t.path, t.rate) +} + +// validateBpsDevice validates that the specified string has a valid device-rate format +// for device-read-bps and device-write-bps flags +func validateBpsDevice(val string) (*throttleDevice, error) { + split := strings.SplitN(val, ":", 2) + if len(split) != 2 { + return nil, fmt.Errorf("bad format: %s", val) + } + if !strings.HasPrefix(split[0], "/dev/") { + return nil, fmt.Errorf("bad format for device path: %s", val) + } + rate, err := units.RAMInBytes(split[1]) + if err != nil { + return nil, fmt.Errorf("invalid rate for device: %s. The correct format is :[]. Number must be a positive integer. Unit is optional and can be kb, mb, or gb", val) + } + if rate < 0 { + return nil, fmt.Errorf("invalid rate for device: %s. The correct format is :[]. Number must be a positive integer. Unit is optional and can be kb, mb, or gb", val) + } + + return &throttleDevice{ + path: split[0], + rate: uint64(rate), + }, nil +} + +// validateIOpsDevice validates that the specified string has a valid device-rate format +// for device-write-iops and device-read-iops flags +func validateIOpsDevice(val string) (*throttleDevice, error) { //nolint + split := strings.SplitN(val, ":", 2) + if len(split) != 2 { + return nil, fmt.Errorf("bad format: %s", val) + } + if !strings.HasPrefix(split[0], "/dev/") { + return nil, fmt.Errorf("bad format for device path: %s", val) + } + rate, err := strconv.ParseUint(split[1], 10, 64) + if err != nil { + return nil, fmt.Errorf("invalid rate for device: %s. The correct format is :. Number must be a positive integer", val) + } + if rate < 0 { + return nil, fmt.Errorf("invalid rate for device: %s. The correct format is :. Number must be a positive integer", val) + } + + return &throttleDevice{ + path: split[0], + rate: uint64(rate), + }, nil +} + +// validateDNSSearch validates domain for resolvconf search configuration. +// A zero length domain is represented by a dot (.). +// for dns-search flag +func validateDNSSearch(val string) (string, error) { //nolint + if val = strings.Trim(val, " "); val == "." { + return val, nil + } + return validateDomain(val) +} + +func validateDomain(val string) (string, error) { + if alphaRegexp.FindString(val) == "" { + return "", fmt.Errorf("%s is not a valid domain", val) + } + ns := domainRegexp.FindSubmatch([]byte(val)) + if len(ns) > 0 && len(ns[1]) < 255 { + return string(ns[1]), nil + } + return "", fmt.Errorf("%s is not a valid domain", val) +} + +// validateEnv validates an environment variable and returns it. +// If no value is specified, it returns the current value using os.Getenv. +// for env flag +func validateEnv(val string) (string, error) { //nolint + arr := strings.Split(val, "=") + if len(arr) > 1 { + return val, nil + } + if !doesEnvExist(val) { + return val, nil + } + return fmt.Sprintf("%s=%s", val, os.Getenv(val)), nil +} + +func doesEnvExist(name string) bool { + for _, entry := range os.Environ() { + parts := strings.SplitN(entry, "=", 2) + if parts[0] == name { + return true + } + } + return false +} + +// reads a file of line terminated key=value pairs, and overrides any keys +// present in the file with additional pairs specified in the override parameter +// for env-file and labels-file flags +func readKVStrings(env map[string]string, files []string, override []string) error { + for _, ef := range files { + if err := parseEnvFile(env, ef); err != nil { + return err + } + } + for _, line := range override { + if err := parseEnv(env, line); err != nil { + return err + } + } + return nil +} + +func parseEnv(env map[string]string, line string) error { + data := strings.SplitN(line, "=", 2) + + // trim the front of a variable, but nothing else + name := strings.TrimLeft(data[0], whiteSpaces) + if strings.ContainsAny(name, whiteSpaces) { + return errors.Errorf("name %q has white spaces, poorly formatted name", name) + } + + if len(data) > 1 { + env[name] = data[1] + } else { + // if only a pass-through variable is given, clean it up. + val, exists := os.LookupEnv(name) + if !exists { + return errors.Errorf("environment variable %q does not exist", name) + } + env[name] = val + } + return nil +} + +// parseEnvFile reads a file with environment variables enumerated by lines +func parseEnvFile(env map[string]string, filename string) error { + fh, err := os.Open(filename) + if err != nil { + return err + } + defer fh.Close() + + scanner := bufio.NewScanner(fh) + for scanner.Scan() { + // trim the line from all leading whitespace first + line := strings.TrimLeft(scanner.Text(), whiteSpaces) + // line is not empty, and not starting with '#' + if len(line) > 0 && !strings.HasPrefix(line, "#") { + if err := parseEnv(env, line); err != nil { + return err + } + } + } + return scanner.Err() +} + +// NsIpc represents the container ipc stack. +// for ipc flag +type NsIpc string + +// IsPrivate indicates whether the container uses its private ipc stack. +func (n NsIpc) IsPrivate() bool { + return !(n.IsHost() || n.IsContainer()) +} + +// IsHost indicates whether the container uses the host's ipc stack. +func (n NsIpc) IsHost() bool { + return n == "host" +} + +// IsContainer indicates whether the container uses a container's ipc stack. +func (n NsIpc) IsContainer() bool { + parts := strings.SplitN(string(n), ":", 2) + return len(parts) > 1 && parts[0] == "container" +} + +// Valid indicates whether the ipc stack is valid. +func (n NsIpc) Valid() bool { + parts := strings.Split(string(n), ":") + switch mode := parts[0]; mode { + case "", "host": + case "container": + if len(parts) != 2 || parts[1] == "" { + return false + } + default: + return false + } + return true +} + +// Container returns the name of the container ipc stack is going to be used. +func (n NsIpc) Container() string { + parts := strings.SplitN(string(n), ":", 2) + if len(parts) > 1 { + return parts[1] + } + return "" +} + +// validateLabel validates that the specified string is a valid label, and returns it. +// Labels are in the form on key=value. +// for label flag +func validateLabel(val string) (string, error) { //nolint + if strings.Count(val, "=") < 1 { + return "", fmt.Errorf("bad attribute format: %s", val) + } + return val, nil +} + +// validateMACAddress validates a MAC address. +// for mac-address flag +func validateMACAddress(val string) (string, error) { //nolint + _, err := net.ParseMAC(strings.TrimSpace(val)) + if err != nil { + return "", err + } + return val, nil +} + +// parseLoggingOpts validates the logDriver and logDriverOpts +// for log-opt and log-driver flags +func parseLoggingOpts(logDriver string, logDriverOpt []string) (map[string]string, error) { //nolint + logOptsMap := convertKVStringsToMap(logDriverOpt) + if logDriver == "none" && len(logDriverOpt) > 0 { + return map[string]string{}, errors.Errorf("invalid logging opts for driver %s", logDriver) + } + return logOptsMap, nil +} + +// NsPid represents the pid namespace of the container. +//for pid flag +type NsPid string + +// IsPrivate indicates whether the container uses its own new pid namespace. +func (n NsPid) IsPrivate() bool { + return !(n.IsHost() || n.IsContainer()) +} + +// IsHost indicates whether the container uses the host's pid namespace. +func (n NsPid) IsHost() bool { + return n == "host" +} + +// IsContainer indicates whether the container uses a container's pid namespace. +func (n NsPid) IsContainer() bool { + parts := strings.SplitN(string(n), ":", 2) + return len(parts) > 1 && parts[0] == "container" +} + +// Valid indicates whether the pid namespace is valid. +func (n NsPid) Valid() bool { + parts := strings.Split(string(n), ":") + switch mode := parts[0]; mode { + case "", "host": + case "container": + if len(parts) != 2 || parts[1] == "" { + return false + } + default: + return false + } + return true +} + +// Container returns the name of the container whose pid namespace is going to be used. +func (n NsPid) Container() string { + parts := strings.SplitN(string(n), ":", 2) + if len(parts) > 1 { + return parts[1] + } + return "" +} + +// parsePortSpecs receives port specs in the format of ip:public:private/proto and parses +// these in to the internal types +// for publish, publish-all, and expose flags +func parsePortSpecs(ports []string) ([]*pb.PortMapping, error) { //nolint + var portMappings []*pb.PortMapping + for _, rawPort := range ports { + portMapping, err := parsePortSpec(rawPort) + if err != nil { + return nil, err + } + + portMappings = append(portMappings, portMapping...) + } + return portMappings, nil +} + +func validateProto(proto string) bool { + for _, availableProto := range []string{"tcp", "udp"} { + if availableProto == proto { + return true + } + } + return false +} + +// parsePortSpec parses a port specification string into a slice of PortMappings +func parsePortSpec(rawPort string) ([]*pb.PortMapping, error) { + var proto string + rawIP, hostPort, containerPort := splitParts(rawPort) + proto, containerPort = splitProtoPort(containerPort) + + // Strip [] from IPV6 addresses + ip, _, err := net.SplitHostPort(rawIP + ":") + if err != nil { + return nil, fmt.Errorf("Invalid ip address %v: %s", rawIP, err) + } + if ip != "" && net.ParseIP(ip) == nil { + return nil, fmt.Errorf("Invalid ip address: %s", ip) + } + if containerPort == "" { + return nil, fmt.Errorf("No port specified: %s", rawPort) + } + + startPort, endPort, err := parsePortRange(containerPort) + if err != nil { + return nil, fmt.Errorf("Invalid containerPort: %s", containerPort) + } + + var startHostPort, endHostPort uint64 = 0, 0 + if len(hostPort) > 0 { + startHostPort, endHostPort, err = parsePortRange(hostPort) + if err != nil { + return nil, fmt.Errorf("Invalid hostPort: %s", hostPort) + } + } + + if hostPort != "" && (endPort-startPort) != (endHostPort-startHostPort) { + // Allow host port range iff containerPort is not a range. + // In this case, use the host port range as the dynamic + // host port range to allocate into. + if endPort != startPort { + return nil, fmt.Errorf("Invalid ranges specified for container and host Ports: %s and %s", containerPort, hostPort) + } + } + + if !validateProto(strings.ToLower(proto)) { + return nil, fmt.Errorf("invalid proto: %s", proto) + } + + protocol := pb.Protocol_TCP + if strings.ToLower(proto) == "udp" { + protocol = pb.Protocol_UDP + } + + var ports []*pb.PortMapping + for i := uint64(0); i <= (endPort - startPort); i++ { + containerPort = strconv.FormatUint(startPort+i, 10) + if len(hostPort) > 0 { + hostPort = strconv.FormatUint(startHostPort+i, 10) + } + // Set hostPort to a range only if there is a single container port + // and a dynamic host port. + if startPort == endPort && startHostPort != endHostPort { + hostPort = fmt.Sprintf("%s-%s", hostPort, strconv.FormatUint(endHostPort, 10)) + } + + ctrPort, err := strconv.ParseInt(containerPort, 10, 32) + if err != nil { + return nil, err + } + hPort, err := strconv.ParseInt(hostPort, 10, 32) + if err != nil { + return nil, err + } + + port := &pb.PortMapping{ + Protocol: protocol, + ContainerPort: int32(ctrPort), + HostPort: int32(hPort), + HostIp: ip, + } + + ports = append(ports, port) + } + return ports, nil +} + +// parsePortRange parses and validates the specified string as a port-range (8000-9000) +func parsePortRange(ports string) (uint64, uint64, error) { + if ports == "" { + return 0, 0, fmt.Errorf("empty string specified for ports") + } + if !strings.Contains(ports, "-") { + start, err := strconv.ParseUint(ports, 10, 16) + end := start + return start, end, err + } + + parts := strings.Split(ports, "-") + start, err := strconv.ParseUint(parts[0], 10, 16) + if err != nil { + return 0, 0, err + } + end, err := strconv.ParseUint(parts[1], 10, 16) + if err != nil { + return 0, 0, err + } + if end < start { + return 0, 0, fmt.Errorf("Invalid range specified for the Port: %s", ports) + } + return start, end, nil +} + +// splitParts separates the different parts of rawPort +func splitParts(rawport string) (string, string, string) { + parts := strings.Split(rawport, ":") + n := len(parts) + containerport := parts[n-1] + + switch n { + case 1: + return "", "", containerport + case 2: + return "", parts[0], containerport + case 3: + return parts[0], parts[1], containerport + default: + return strings.Join(parts[:n-2], ":"), parts[n-2], containerport + } +} + +// splitProtoPort splits a port in the format of port/proto +func splitProtoPort(rawPort string) (string, string) { + parts := strings.Split(rawPort, "/") + l := len(parts) + if len(rawPort) == 0 || l == 0 || len(parts[0]) == 0 { + return "", "" + } + if l == 1 { + return "tcp", rawPort + } + if len(parts[1]) == 0 { + return "tcp", parts[0] + } + return parts[1], parts[0] +} + +// takes a local seccomp file and reads its file contents +// for security-opt flag +func parseSecurityOpts(securityOpts []string) ([]string, error) { //nolint + for key, opt := range securityOpts { + con := strings.SplitN(opt, "=", 2) + if len(con) == 1 && con[0] != "no-new-privileges" { + if strings.Index(opt, ":") != -1 { + con = strings.SplitN(opt, ":", 2) + } else { + return securityOpts, fmt.Errorf("Invalid --security-opt: %q", opt) + } + } + if con[0] == "seccomp" && con[1] != "unconfined" { + f, err := ioutil.ReadFile(con[1]) + if err != nil { + return securityOpts, fmt.Errorf("opening seccomp profile (%s) failed: %v", con[1], err) + } + b := bytes.NewBuffer(nil) + if err := json.Compact(b, f); err != nil { + return securityOpts, fmt.Errorf("compacting json for seccomp profile (%s) failed: %v", con[1], err) + } + securityOpts[key] = fmt.Sprintf("seccomp=%s", b.Bytes()) + } + } + + return securityOpts, nil +} + +// parses storage options per container into a map +// for storage-opt flag +func parseStorageOpts(storageOpts []string) (map[string]string, error) { //nolint + m := make(map[string]string) + for _, option := range storageOpts { + if strings.Contains(option, "=") { + opt := strings.SplitN(option, "=", 2) + m[opt[0]] = opt[1] + } else { + return nil, errors.Errorf("invalid storage option %q", option) + } + } + return m, nil +} + +// parseUser parses the the uid and gid in the format [:] +// for user flag +// FIXME: Issue from https://github.com/projectatomic/buildah/issues/66 +func parseUser(rootdir, userspec string) (specs.User, error) { //nolint + var gid64 uint64 + var gerr error = user.UnknownGroupError("error looking up group") + + spec := strings.SplitN(userspec, ":", 2) + userspec = spec[0] + groupspec := "" + if userspec == "" { + return specs.User{}, nil + } + if len(spec) > 1 { + groupspec = spec[1] + } + + uid64, uerr := strconv.ParseUint(userspec, 10, 32) + if uerr == nil && groupspec == "" { + // We parsed the user name as a number, and there's no group + // component, so we need to look up the user's primary GID. + var name string + name, gid64, gerr = lookupGroupForUIDInContainer(rootdir, uid64) + if gerr == nil { + userspec = name + } else { + if userrec, err := user.LookupId(userspec); err == nil { + gid64, gerr = strconv.ParseUint(userrec.Gid, 10, 32) + userspec = userrec.Name + } + } + } + if uerr != nil { + uid64, gid64, uerr = lookupUserInContainer(rootdir, userspec) + gerr = uerr + } + if uerr != nil { + if userrec, err := user.Lookup(userspec); err == nil { + uid64, uerr = strconv.ParseUint(userrec.Uid, 10, 32) + gid64, gerr = strconv.ParseUint(userrec.Gid, 10, 32) + } + } + + if groupspec != "" { + gid64, gerr = strconv.ParseUint(groupspec, 10, 32) + if gerr != nil { + gid64, gerr = lookupGroupInContainer(rootdir, groupspec) + } + if gerr != nil { + if group, err := user.LookupGroup(groupspec); err == nil { + gid64, gerr = strconv.ParseUint(group.Gid, 10, 32) + } + } + } + + if uerr == nil && gerr == nil { + u := specs.User{ + UID: uint32(uid64), + GID: uint32(gid64), + Username: userspec, + } + return u, nil + } + + err := errors.Wrapf(uerr, "error determining run uid") + if uerr == nil { + err = errors.Wrapf(gerr, "error determining run gid") + } + return specs.User{}, err +} + +// convertKVStringsToMap converts ["key=value"] to {"key":"value"} +func convertKVStringsToMap(values []string) map[string]string { + result := make(map[string]string, len(values)) + for _, value := range values { + kv := strings.SplitN(value, "=", 2) + if len(kv) == 1 { + result[kv[0]] = "" + } else { + result[kv[0]] = kv[1] + } + } + + return result +} + +// NsUser represents userns mode in the container. +// for userns flag +type NsUser string + +// IsHost indicates whether the container uses the host's userns. +func (n NsUser) IsHost() bool { + return n == "host" +} + +// IsPrivate indicates whether the container uses the a private userns. +func (n NsUser) IsPrivate() bool { + return !(n.IsHost()) +} + +// Valid indicates whether the userns is valid. +func (n NsUser) Valid() bool { + parts := strings.Split(string(n), ":") + switch mode := parts[0]; mode { + case "", "host": + default: + return false + } + return true +} + +// NsUts represents the UTS namespace of the container. +// for uts flag +type NsUts string + +// IsPrivate indicates whether the container uses its private UTS namespace. +func (n NsUts) IsPrivate() bool { + return !(n.IsHost()) +} + +// IsHost indicates whether the container uses the host's UTS namespace. +func (n NsUts) IsHost() bool { + return n == "host" +} + +// Valid indicates whether the UTS namespace is valid. +func (n NsUts) Valid() bool { + parts := strings.Split(string(n), ":") + switch mode := parts[0]; mode { + case "", "host": + default: + return false + } + return true +} + +// Takes a stringslice and converts to a uint32slice +func stringSlicetoUint32Slice(inputSlice []string) ([]uint32, error) { + var outputSlice []uint32 + for _, v := range inputSlice { + u, err := strconv.ParseUint(v, 10, 32) + if err != nil { + return outputSlice, err + } + outputSlice = append(outputSlice, uint32(u)) + } + return outputSlice, nil +} diff --git a/cmd/podman/pause.go b/cmd/podman/pause.go new file mode 100644 index 000000000..cd581b08f --- /dev/null +++ b/cmd/podman/pause.go @@ -0,0 +1,58 @@ +package main + +import ( + "fmt" + "os" + + "github.com/pkg/errors" + "github.com/urfave/cli" +) + +var ( + pauseDescription = ` + podman pause + + Pauses one or more running containers. The container name or ID can be used. +` + pauseCommand = cli.Command{ + Name: "pause", + Usage: "Pauses all the processes in one or more containers", + Description: pauseDescription, + Action: pauseCmd, + ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", + } +) + +func pauseCmd(c *cli.Context) error { + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + args := c.Args() + if len(args) < 1 { + return errors.Errorf("you must provide at least one container name or id") + } + + var lastError error + for _, arg := range args { + ctr, err := runtime.LookupContainer(arg) + if err != nil { + if lastError != nil { + fmt.Fprintln(os.Stderr, lastError) + } + lastError = errors.Wrapf(err, "error looking up container %q", arg) + continue + } + if err = ctr.Pause(); err != nil { + if lastError != nil { + fmt.Fprintln(os.Stderr, lastError) + } + lastError = errors.Wrapf(err, "failed to pause container %v", ctr.ID()) + } else { + fmt.Println(ctr.ID()) + } + } + return lastError +} diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go new file mode 100644 index 000000000..c674c9d1e --- /dev/null +++ b/cmd/podman/ps.go @@ -0,0 +1,606 @@ +package main + +import ( + "fmt" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + + "github.com/docker/go-units" + specs "github.com/opencontainers/runtime-spec/specs-go" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/cmd/podman/formats" + "github.com/projectatomic/libpod/libpod" + "github.com/urfave/cli" + "k8s.io/apimachinery/pkg/fields" +) + +type psOptions struct { + all bool + filter string + format string + last int + latest bool + noTrunc bool + quiet bool + size bool + label string + namespace bool +} + +type psTemplateParams struct { + ID string + Image string + Command string + CreatedAt string + RunningFor string + Status string + Ports string + Size string + Names string + Labels string + Mounts string + PID int + Cgroup string + IPC string + MNT string + NET string + PIDNS string + User string + UTS string +} + +// psJSONParams is only used when the JSON format is specified, +// and is better for data processing from JSON. +// psJSONParams will be populated by data from libpod.Container, +// the members of the struct are the sama data types as their sources. +type psJSONParams struct { + ID string `json:"id"` + Image string `json:"image"` + ImageID string `json:"image_id"` + Command string `json:"command"` + CreatedAt time.Time `json:"createdAt"` + RunningFor time.Duration `json:"runningFor"` + Status string `json:"status"` + Ports map[string]struct{} `json:"ports"` + Size uint `json:"size"` + Names string `json:"names"` + Labels fields.Set `json:"labels"` + Mounts []specs.Mount `json:"mounts"` + ContainerRunning bool `json:"ctrRunning"` + Namespaces *namespace `json:"namespace,omitempty"` +} + +type namespace struct { + PID string `json:"pid,omitempty"` + Cgroup string `json:"cgroup,omitempty"` + IPC string `json:"ipc,omitempty"` + MNT string `json:"mnt,omitempty"` + NET string `json:"net,omitempty"` + PIDNS string `json:"pidns,omitempty"` + User string `json:"user,omitempty"` + UTS string `json:"uts,omitempty"` +} + +var ( + psFlags = []cli.Flag{ + cli.BoolFlag{ + Name: "all, a", + Usage: "Show all the containers, default is only running containers", + }, + cli.StringFlag{ + Name: "filter, f", + Usage: "Filter output based on conditions given", + }, + cli.StringFlag{ + Name: "format", + Usage: "Pretty-print containers to JSON or using a Go template", + }, + cli.IntFlag{ + Name: "last, n", + Usage: "Print the n last created containers (all states)", + Value: -1, + }, + cli.BoolFlag{ + Name: "latest, l", + Usage: "Show the latest container created (all states)", + }, + cli.BoolFlag{ + Name: "no-trunc", + Usage: "Display the extended information", + }, + cli.BoolFlag{ + Name: "quiet, q", + Usage: "Print the numeric IDs of the containers only", + }, + cli.BoolFlag{ + Name: "size, s", + Usage: "Display the total file sizes", + }, + cli.BoolFlag{ + Name: "namespace, ns", + Usage: "Display namespace information", + }, + } + psDescription = "Prints out information about the containers" + psCommand = cli.Command{ + Name: "ps", + Usage: "List containers", + Description: psDescription, + Flags: psFlags, + Action: psCmd, + ArgsUsage: "", + UseShortOptionHandling: true, + } +) + +func psCmd(c *cli.Context) error { + if err := validateFlags(c, psFlags); err != nil { + return err + } + + if err := checkFlagsPassed(c); err != nil { + return errors.Wrapf(err, "error with flags passed") + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "error creating libpod runtime") + } + + defer runtime.Shutdown(false) + + if len(c.Args()) > 0 { + return errors.Errorf("too many arguments, ps takes no arguments") + } + + format := genPsFormat(c.String("format"), c.Bool("quiet"), c.Bool("size"), c.Bool("namespace")) + + opts := psOptions{ + all: c.Bool("all"), + filter: c.String("filter"), + format: format, + last: c.Int("last"), + latest: c.Bool("latest"), + noTrunc: c.Bool("no-trunc"), + quiet: c.Bool("quiet"), + size: c.Bool("size"), + namespace: c.Bool("namespace"), + } + + var filterFuncs []libpod.ContainerFilter + // When we are dealing with latest or last=n, we need to + // get all containers. + if !opts.all && !opts.latest && opts.last < 1 { + // only get running containers + filterFuncs = append(filterFuncs, func(c *libpod.Container) bool { + state, _ := c.State() + return state == libpod.ContainerStateRunning + }) + } + + if opts.filter != "" { + filters := strings.Split(opts.filter, ",") + for _, f := range filters { + filterSplit := strings.Split(f, "=") + if len(filterSplit) < 2 { + return errors.Errorf("filter input must be in the form of filter=value: %s is invalid", f) + } + generatedFunc, err := generateContainerFilterFuncs(filterSplit[0], filterSplit[1], runtime) + if err != nil { + return errors.Wrapf(err, "invalid filter") + } + filterFuncs = append(filterFuncs, generatedFunc) + } + } + + containers, err := runtime.GetContainers(filterFuncs...) + var outputContainers []*libpod.Container + if opts.latest && len(containers) > 0 { + outputContainers = append(outputContainers, containers[0]) + } else if opts.last > 0 && opts.last <= len(containers) { + outputContainers = append(outputContainers, containers[:opts.last]...) + } else { + outputContainers = containers + } + + return generatePsOutput(outputContainers, opts) +} + +// checkFlagsPassed checks if mutually exclusive flags are passed together +func checkFlagsPassed(c *cli.Context) error { + // latest, and last are mutually exclusive. + if c.Int("last") >= 0 && c.Bool("latest") { + return errors.Errorf("last and latest are mutually exclusive") + } + // quiet, size, namespace, and format with Go template are mutually exclusive + flags := 0 + if c.Bool("quiet") { + flags++ + } + if c.Bool("size") { + flags++ + } + if c.Bool("namespace") { + flags++ + } + if c.IsSet("format") && c.String("format") != formats.JSONString { + flags++ + } + if flags > 1 { + return errors.Errorf("quiet, size, namespace, and format with Go template are mutually exclusive") + } + return nil +} + +func generateContainerFilterFuncs(filter, filterValue string, runtime *libpod.Runtime) (func(container *libpod.Container) bool, error) { + switch filter { + case "id": + return func(c *libpod.Container) bool { + return c.ID() == filterValue + }, nil + case "label": + return func(c *libpod.Container) bool { + for _, label := range c.Labels() { + if label == filterValue { + return true + } + } + return false + }, nil + case "name": + return func(c *libpod.Container) bool { + return c.Name() == filterValue + }, nil + case "exited": + exitCode, err := strconv.ParseInt(filterValue, 10, 32) + if err != nil { + return nil, errors.Wrapf(err, "exited code out of range %q", filterValue) + } + return func(c *libpod.Container) bool { + ec, err := c.ExitCode() + if ec == int32(exitCode) && err == nil { + return true + } + return false + }, nil + case "status": + if !libpod.StringInSlice(filterValue, []string{"created", "restarting", "running", "paused", "exited", "unknown"}) { + return nil, errors.Errorf("%s is not a valid status", filterValue) + } + return func(c *libpod.Container) bool { + status, err := c.State() + if err != nil { + return false + } + return status.String() == filterValue + }, nil + case "ancestor": + // This needs to refine to match docker + // - ancestor=([:tag]|| ⟨image@digest⟩) - containers created from an image or a descendant. + return func(c *libpod.Container) bool { + containerConfig := c.Config() + if containerConfig.RootfsImageID == filterValue || containerConfig.RootfsImageName == filterValue { + return true + } + return false + }, nil + case "before": + ctr, err := runtime.LookupContainer(filterValue) + if err != nil { + return nil, errors.Errorf("unable to find container by name or id of %s", filterValue) + } + containerConfig := ctr.Config() + createTime := containerConfig.CreatedTime + return func(c *libpod.Container) bool { + cc := c.Config() + return createTime.After(cc.CreatedTime) + }, nil + case "since": + ctr, err := runtime.LookupContainer(filterValue) + if err != nil { + return nil, errors.Errorf("unable to find container by name or id of %s", filterValue) + } + containerConfig := ctr.Config() + createTime := containerConfig.CreatedTime + return func(c *libpod.Container) bool { + cc := c.Config() + return createTime.Before(cc.CreatedTime) + }, nil + case "volume": + //- volume=(|) + return func(c *libpod.Container) bool { + containerConfig := c.Config() + //TODO We need to still lookup against volumes too + return containerConfig.MountLabel == filterValue + }, nil + } + return nil, errors.Errorf("%s is an invalid filter", filter) +} + +// generate the template based on conditions given +func genPsFormat(format string, quiet, size, namespace bool) string { + if format != "" { + // "\t" from the command line is not being recognized as a tab + // replacing the string "\t" to a tab character if the user passes in "\t" + return strings.Replace(format, `\t`, "\t", -1) + } + if quiet { + return formats.IDString + } + if namespace { + return "table {{.ID}}\t{{.Names}}\t{{.PID}}\t{{.Cgroup}}\t{{.IPC}}\t{{.MNT}}\t{{.NET}}\t{{.PIDNS}}\t{{.User}}\t{{.UTS}}\t" + } + format = "table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}\t{{.Ports}}\t{{.Names}}\t" + if size { + format += "{{.Size}}\t" + } + return format +} + +func psToGeneric(templParams []psTemplateParams, JSONParams []psJSONParams) (genericParams []interface{}) { + if len(templParams) > 0 { + for _, v := range templParams { + genericParams = append(genericParams, interface{}(v)) + } + return + } + for _, v := range JSONParams { + genericParams = append(genericParams, interface{}(v)) + } + return +} + +// generate the accurate header based on template given +func (p *psTemplateParams) headerMap() map[string]string { + v := reflect.Indirect(reflect.ValueOf(p)) + values := make(map[string]string) + + for i := 0; i < v.NumField(); i++ { + key := v.Type().Field(i).Name + value := key + if value == "ID" { + value = "Container" + value + } + values[key] = strings.ToUpper(splitCamelCase(value)) + } + return values +} + +// getTemplateOutput returns the modified container information +func getTemplateOutput(containers []*libpod.Container, opts psOptions) ([]psTemplateParams, error) { + var psOutput []psTemplateParams + var status string + for _, ctr := range containers { + ctrID := ctr.ID() + conConfig := ctr.Config() + conState, err := ctr.State() + if err != nil { + return psOutput, errors.Wrapf(err, "unable to obtain container state") + } + exitCode, err := ctr.ExitCode() + if err != nil { + return psOutput, errors.Wrapf(err, "unable to obtain container exit code") + } + pid, err := ctr.PID() + if err != nil { + return psOutput, errors.Wrapf(err, "unable to obtain container pid") + } + runningFor := units.HumanDuration(time.Since(conConfig.CreatedTime)) + createdAt := runningFor + " ago" + imageName := conConfig.RootfsImageName + + // TODO We currently dont have the ability to get many of + // these data items. Uncomment as progress is made + + //command := getStrFromSquareBrackets(ctr.ImageCreatedBy) + command := strings.Join(ctr.Spec().Process.Args, " ") + //mounts := getMounts(ctr.Mounts, opts.noTrunc) + //ports := getPorts(ctr.Config.ExposedPorts) + //size := units.HumanSize(float64(ctr.SizeRootFs)) + labels := formatLabels(ctr.Labels()) + ns := getNamespaces(pid) + + switch conState { + case libpod.ContainerStateStopped: + status = fmt.Sprintf("Exited (%d) %s ago", exitCode, runningFor) + case libpod.ContainerStateRunning: + status = "Up " + runningFor + " ago" + case libpod.ContainerStatePaused: + status = "Paused" + case libpod.ContainerStateCreated: + status = "Created" + default: + status = "Dead" + } + + if !opts.noTrunc { + ctrID = ctr.ID()[:idTruncLength] + imageName = conConfig.RootfsImageName + } + + // TODO We currently dont have the ability to get many of + // these data items. Uncomment as progress is made + + params := psTemplateParams{ + ID: ctrID, + Image: imageName, + Command: command, + CreatedAt: createdAt, + RunningFor: runningFor, + Status: status, + //Ports: ports, + //Size: size, + Names: ctr.Name(), + Labels: labels, + //Mounts: mounts, + PID: pid, + Cgroup: ns.Cgroup, + IPC: ns.IPC, + MNT: ns.MNT, + NET: ns.NET, + PIDNS: ns.PID, + User: ns.User, + UTS: ns.UTS, + } + psOutput = append(psOutput, params) + } + return psOutput, nil +} + +func getNamespaces(pid int) *namespace { + ctrPID := strconv.Itoa(pid) + cgroup, _ := getNamespaceInfo(filepath.Join("/proc", ctrPID, "ns", "cgroup")) + ipc, _ := getNamespaceInfo(filepath.Join("/proc", ctrPID, "ns", "ipc")) + mnt, _ := getNamespaceInfo(filepath.Join("/proc", ctrPID, "ns", "mnt")) + net, _ := getNamespaceInfo(filepath.Join("/proc", ctrPID, "ns", "net")) + pidns, _ := getNamespaceInfo(filepath.Join("/proc", ctrPID, "ns", "pid")) + user, _ := getNamespaceInfo(filepath.Join("/proc", ctrPID, "ns", "user")) + uts, _ := getNamespaceInfo(filepath.Join("/proc", ctrPID, "ns", "uts")) + + return &namespace{ + PID: ctrPID, + Cgroup: cgroup, + IPC: ipc, + MNT: mnt, + NET: net, + PIDNS: pidns, + User: user, + UTS: uts, + } +} + +func getNamespaceInfo(path string) (string, error) { + val, err := os.Readlink(path) + if err != nil { + return "", errors.Wrapf(err, "error getting info from %q", path) + } + return getStrFromSquareBrackets(val), nil +} + +// getJSONOutput returns the container info in its raw form +func getJSONOutput(containers []*libpod.Container, nSpace bool) ([]psJSONParams, error) { + var psOutput []psJSONParams + var ns *namespace + for _, ctr := range containers { + pid, err := ctr.PID() + if err != nil { + return psOutput, errors.Wrapf(err, "unable to obtain container pid") + } + if nSpace { + ns = getNamespaces(pid) + } + cc := ctr.Config() + conState, err := ctr.State() + if err != nil { + return psOutput, errors.Wrapf(err, "unable to obtain container state for JSON output") + } + params := psJSONParams{ + // TODO When we have ability to obtain the commented out data, we need + // TODO to add it + ID: ctr.ID(), + Image: cc.RootfsImageName, + ImageID: cc.RootfsImageID, + //Command: getStrFromSquareBrackets(ctr.ImageCreatedBy), + Command: strings.Join(ctr.Spec().Process.Args, " "), + CreatedAt: cc.CreatedTime, + RunningFor: time.Since(cc.CreatedTime), + Status: conState.String(), + //Ports: cc.Spec.Linux.Resources.Network. + //Size: ctr.SizeRootFs, + Names: cc.Name, + Labels: cc.Labels, + Mounts: cc.Spec.Mounts, + ContainerRunning: conState == libpod.ContainerStateRunning, + Namespaces: ns, + } + psOutput = append(psOutput, params) + } + return psOutput, nil +} + +func generatePsOutput(containers []*libpod.Container, opts psOptions) error { + if len(containers) == 0 && opts.format != formats.JSONString { + return nil + } + var out formats.Writer + + switch opts.format { + case formats.JSONString: + psOutput, err := getJSONOutput(containers, opts.namespace) + if err != nil { + return errors.Wrapf(err, "unable to create JSON for output") + } + out = formats.JSONStructArray{Output: psToGeneric([]psTemplateParams{}, psOutput)} + default: + psOutput, err := getTemplateOutput(containers, opts) + if err != nil { + return errors.Wrapf(err, "unable to create output") + } + out = formats.StdoutTemplateArray{Output: psToGeneric(psOutput, []psJSONParams{}), Template: opts.format, Fields: psOutput[0].headerMap()} + } + + return formats.Writer(out).Out() +} + +// getStrFromSquareBrackets gets the string inside [] from a string +func getStrFromSquareBrackets(cmd string) string { + reg, err := regexp.Compile(".*\\[|\\].*") + if err != nil { + return "" + } + arr := strings.Split(reg.ReplaceAllLiteralString(cmd, ""), ",") + return strings.Join(arr, ",") +} + +// getLabels converts the labels to a string of the form "key=value, key2=value2" +func formatLabels(labels map[string]string) string { + var arr []string + if len(labels) > 0 { + for key, val := range labels { + temp := key + "=" + val + arr = append(arr, temp) + } + return strings.Join(arr, ",") + } + return "" +} + +/* +// getMounts converts the volumes mounted to a string of the form "mount1, mount2" +// it truncates it if noTrunc is false +func getMounts(mounts []specs.Mount, noTrunc bool) string { + var arr []string + if len(mounts) == 0 { + return "" + } + for _, mount := range mounts { + if noTrunc { + arr = append(arr, mount.Source) + continue + } + tempArr := strings.SplitAfter(mount.Source, "/") + if len(tempArr) >= 3 { + arr = append(arr, strings.Join(tempArr[:3], "")) + } else { + arr = append(arr, mount.Source) + } + } + return strings.Join(arr, ",") +} +// getPorts converts the ports used to a string of the from "port1, port2" +func getPorts(ports map[string]struct{}) string { + var arr []string + if len(ports) == 0 { + return "" + } + for key := range ports { + arr = append(arr, key) + } + return strings.Join(arr, ",") +} +*/ diff --git a/cmd/podman/pull.go b/cmd/podman/pull.go new file mode 100644 index 000000000..5726b20f1 --- /dev/null +++ b/cmd/podman/pull.go @@ -0,0 +1,120 @@ +package main + +import ( + "fmt" + "io" + "os" + + "golang.org/x/crypto/ssh/terminal" + + "github.com/containers/image/types" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/projectatomic/libpod/libpod/common" + "github.com/sirupsen/logrus" + "github.com/urfave/cli" +) + +var ( + pullFlags = []cli.Flag{ + cli.StringFlag{ + Name: "authfile", + Usage: "Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json", + }, + cli.StringFlag{ + Name: "cert-dir", + Usage: "`pathname` of a directory containing TLS certificates and keys", + }, + cli.StringFlag{ + Name: "creds", + Usage: "`credentials` (USERNAME:PASSWORD) to use for authenticating to a registry", + }, + cli.BoolFlag{ + Name: "quiet, q", + Usage: "Suppress output information when pulling images", + }, + cli.StringFlag{ + Name: "signature-policy", + Usage: "`pathname` of signature policy file (not usually used)", + }, + cli.BoolTFlag{ + Name: "tls-verify", + Usage: "require HTTPS and verify certificates when contacting registries (default: true)", + }, + } + + pullDescription = "Pulls an image from a registry and stores it locally.\n" + + "An image can be pulled using its tag or digest. If a tag is not\n" + + "specified, the image with the 'latest' tag (if it exists) is pulled." + pullCommand = cli.Command{ + Name: "pull", + Usage: "pull an image from a registry", + Description: pullDescription, + Flags: pullFlags, + Action: pullCmd, + ArgsUsage: "", + } +) + +// pullCmd gets the data from the command line and calls pullImage +// to copy an image from a registry to a local machine +func pullCmd(c *cli.Context) error { + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + args := c.Args() + if len(args) == 0 { + logrus.Errorf("an image name must be specified") + return nil + } + if len(args) > 1 { + logrus.Errorf("too many arguments. Requires exactly 1") + return nil + } + if err := validateFlags(c, pullFlags); err != nil { + return err + } + image := args[0] + + var registryCreds *types.DockerAuthConfig + if c.String("creds") != "" { + creds, err := common.ParseRegistryCreds(c.String("creds")) + if err != nil { + if err == common.ErrNoPassword { + fmt.Print("Password: ") + password, err := terminal.ReadPassword(0) + if err != nil { + return errors.Wrapf(err, "could not read password from terminal") + } + creds.Password = string(password) + } else { + return err + } + } + registryCreds = creds + } + + var writer io.Writer + if !c.Bool("quiet") { + writer = os.Stdout + } + + options := libpod.CopyOptions{ + SignaturePolicyPath: c.String("signature-policy"), + AuthFile: c.String("authfile"), + DockerRegistryOptions: common.DockerRegistryOptions{ + DockerRegistryCreds: registryCreds, + DockerCertPath: c.String("cert-dir"), + DockerInsecureSkipTLSVerify: !c.BoolT("tls-verify"), + }, + Writer: writer, + } + + if _, err := runtime.PullImage(image, options); err != nil { + return errors.Wrapf(err, "error pulling image %q", image) + } + return nil +} diff --git a/cmd/podman/push.go b/cmd/podman/push.go new file mode 100644 index 000000000..69d6e6629 --- /dev/null +++ b/cmd/podman/push.go @@ -0,0 +1,167 @@ +package main + +import ( + "fmt" + "io" + "os" + "strings" + + "github.com/containers/image/manifest" + "github.com/containers/image/types" + "github.com/containers/storage/pkg/archive" + imgspecv1 "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/projectatomic/libpod/libpod/common" + "github.com/urfave/cli" + "golang.org/x/crypto/ssh/terminal" +) + +var ( + pushFlags = []cli.Flag{ + cli.StringFlag{ + Name: "signature-policy", + Usage: "`pathname` of signature policy file (not usually used)", + Hidden: true, + }, + cli.StringFlag{ + Name: "creds", + Usage: "`credentials` (USERNAME:PASSWORD) to use for authenticating to a registry", + }, + cli.StringFlag{ + Name: "cert-dir", + Usage: "`pathname` of a directory containing TLS certificates and keys", + }, + cli.BoolFlag{ + Name: "compress", + Usage: "compress tarball image layers when pushing to a directory using the 'dir' transport. (default is same compression type as source)", + }, + cli.StringFlag{ + Name: "format, f", + Usage: "manifest type (oci, v2s1, or v2s2) to use when pushing an image using the 'dir:' transport (default is manifest type of source)", + }, + cli.BoolTFlag{ + Name: "tls-verify", + Usage: "require HTTPS and verify certificates when contacting registries (default: true)", + }, + cli.BoolFlag{ + Name: "remove-signatures", + Usage: "discard any pre-existing signatures in the image", + }, + cli.StringFlag{ + Name: "sign-by", + Usage: "add a signature at the destination using the specified key", + }, + cli.BoolFlag{ + Name: "quiet, q", + Usage: "don't output progress information when pushing images", + }, + cli.StringFlag{ + Name: "authfile", + Usage: "Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json", + }, + } + pushDescription = fmt.Sprintf(` + Pushes an image to a specified location. + The Image "DESTINATION" uses a "transport":"details" format. + See podman-push(1) section "DESTINATION" for the expected format`) + + pushCommand = cli.Command{ + Name: "push", + Usage: "push an image to a specified destination", + Description: pushDescription, + Flags: pushFlags, + Action: pushCmd, + ArgsUsage: "IMAGE DESTINATION", + } +) + +func pushCmd(c *cli.Context) error { + var registryCreds *types.DockerAuthConfig + + args := c.Args() + if len(args) < 2 { + return errors.New("podman push requires exactly 2 arguments") + } + if err := validateFlags(c, pushFlags); err != nil { + return err + } + srcName := args[0] + destName := args[1] + + // --compress and --format can only be used for the "dir" transport + splitArg := strings.SplitN(destName, ":", 2) + if c.IsSet("compress") || c.IsSet("format") { + if splitArg[0] != libpod.DirTransport { + return errors.Errorf("--compress and --format can be set only when pushing to a directory using the 'dir' transport") + } + } + + registryCredsString := c.String("creds") + certPath := c.String("cert-dir") + skipVerify := !c.BoolT("tls-verify") + removeSignatures := c.Bool("remove-signatures") + signBy := c.String("sign-by") + + if registryCredsString != "" { + creds, err := common.ParseRegistryCreds(registryCredsString) + if err != nil { + if err == common.ErrNoPassword { + fmt.Print("Password: ") + password, err := terminal.ReadPassword(0) + if err != nil { + return errors.Wrapf(err, "could not read password from terminal") + } + creds.Password = string(password) + } else { + return err + } + } + registryCreds = creds + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not create runtime") + } + defer runtime.Shutdown(false) + + var writer io.Writer + if !c.Bool("quiet") { + writer = os.Stdout + } + + var manifestType string + if c.IsSet("format") { + switch c.String("format") { + case "oci": + manifestType = imgspecv1.MediaTypeImageManifest + case "v2s1": + manifestType = manifest.DockerV2Schema1SignedMediaType + case "v2s2", "docker": + manifestType = manifest.DockerV2Schema2MediaType + default: + return fmt.Errorf("unknown format %q. Choose on of the supported formats: 'oci', 'v2s1', or 'v2s2'", c.String("format")) + } + } + + options := libpod.CopyOptions{ + Compression: archive.Uncompressed, + SignaturePolicyPath: c.String("signature-policy"), + DockerRegistryOptions: common.DockerRegistryOptions{ + DockerRegistryCreds: registryCreds, + DockerCertPath: certPath, + DockerInsecureSkipTLSVerify: skipVerify, + }, + SigningOptions: common.SigningOptions{ + RemoveSignatures: removeSignatures, + SignBy: signBy, + }, + AuthFile: c.String("authfile"), + Writer: writer, + ManifestMIMEType: manifestType, + ForceCompress: c.Bool("compress"), + } + + return runtime.PushImage(srcName, destName, options) +} diff --git a/cmd/podman/rm.go b/cmd/podman/rm.go new file mode 100644 index 000000000..dcb8fac57 --- /dev/null +++ b/cmd/podman/rm.go @@ -0,0 +1,90 @@ +package main + +import ( + "fmt" + "os" + + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/urfave/cli" +) + +var ( + rmFlags = []cli.Flag{ + cli.BoolFlag{ + Name: "force, f", + Usage: "Force removal of a running container. The default is false", + }, + cli.BoolFlag{ + Name: "all, a", + Usage: "Remove all containers", + }, + } + rmDescription = "Remove one or more containers" + rmCommand = cli.Command{ + Name: "rm", + Usage: fmt.Sprintf(`podman rm will remove one or more containers from the host. The container name or ID can be used. + This does not remove images. Running containers will not be removed without the -f option.`), + Description: rmDescription, + Flags: rmFlags, + Action: rmCmd, + ArgsUsage: "", + UseShortOptionHandling: true, + } +) + +// saveCmd saves the image to either docker-archive or oci +func rmCmd(c *cli.Context) error { + if err := validateFlags(c, rmFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + args := c.Args() + if len(args) == 0 && !c.Bool("all") { + return errors.Errorf("specify one or more containers to remove") + } + + var delContainers []*libpod.Container + var lastError error + if c.Bool("all") { + delContainers, err = runtime.GetContainers() + if err != nil { + return errors.Wrapf(err, "unable to get container list") + } + } else { + for _, i := range args { + container, err := runtime.LookupContainer(i) + if err != nil { + fmt.Fprintln(os.Stderr, err) + lastError = errors.Wrapf(err, "unable to find container %s", i) + continue + } + delContainers = append(delContainers, container) + } + } + for _, container := range delContainers { + if err != nil { + if lastError != nil { + fmt.Fprintln(os.Stderr, lastError) + } + lastError = errors.Wrapf(err, "failed to find container %s", container.ID()) + continue + } + err = runtime.RemoveContainer(container, c.Bool("force")) + if err != nil { + if lastError != nil { + fmt.Fprintln(os.Stderr, lastError) + } + lastError = errors.Wrapf(err, "failed to delete container %v", container.ID()) + } else { + fmt.Println(container.ID()) + } + } + return lastError +} diff --git a/cmd/podman/rmi.go b/cmd/podman/rmi.go new file mode 100644 index 000000000..1b4cb7390 --- /dev/null +++ b/cmd/podman/rmi.go @@ -0,0 +1,75 @@ +package main + +import ( + "fmt" + + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/urfave/cli" +) + +var ( + rmiDescription = "removes one or more locally stored images." + rmiFlags = []cli.Flag{ + cli.BoolFlag{ + Name: "all, a", + Usage: "remove all images", + }, + cli.BoolFlag{ + Name: "force, f", + Usage: "force removal of the image", + }, + } + rmiCommand = cli.Command{ + Name: "rmi", + Usage: "removes one or more images from local storage", + Description: rmiDescription, + Action: rmiCmd, + ArgsUsage: "IMAGE-NAME-OR-ID [...]", + Flags: rmiFlags, + UseShortOptionHandling: true, + } +) + +func rmiCmd(c *cli.Context) error { + if err := validateFlags(c, rmiFlags); err != nil { + return err + } + removeAll := c.Bool("all") + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + args := c.Args() + if len(args) == 0 && !removeAll { + return errors.Errorf("image name or ID must be specified") + } + if len(args) > 0 && removeAll { + return errors.Errorf("when using the --all switch, you may not pass any images names or IDs") + } + imagesToDelete := args[:] + if removeAll { + localImages, err := runtime.GetImages(&libpod.ImageFilterParams{}) + if err != nil { + return errors.Wrapf(err, "unable to query local images") + } + for _, image := range localImages { + imagesToDelete = append(imagesToDelete, image.ID) + } + } + + for _, arg := range imagesToDelete { + image, err := runtime.GetImage(arg) + if err != nil { + return errors.Wrapf(err, "could not get image %q", arg) + } + id, err := runtime.RemoveImage(image, c.Bool("force")) + if err != nil { + return errors.Wrapf(err, "error removing image %q", id) + } + fmt.Printf("%s\n", id) + } + return nil +} diff --git a/cmd/podman/run.go b/cmd/podman/run.go new file mode 100644 index 000000000..6142983ad --- /dev/null +++ b/cmd/podman/run.go @@ -0,0 +1,146 @@ +package main + +import ( + "fmt" + "sync" + + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/sirupsen/logrus" + "github.com/urfave/cli" +) + +var runDescription = "Runs a command in a new container from the given image" + +var runCommand = cli.Command{ + Name: "run", + Usage: "run a command in a new container", + Description: runDescription, + Flags: createFlags, + Action: runCmd, + ArgsUsage: "IMAGE [COMMAND [ARG...]]", + SkipArgReorder: true, + UseShortOptionHandling: true, +} + +func runCmd(c *cli.Context) error { + var imageName string + if err := validateFlags(c, createFlags); err != nil { + return err + } + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "error creating libpod runtime") + } + defer runtime.Shutdown(false) + + createConfig, err := parseCreateOpts(c, runtime) + if err != nil { + return err + } + + createImage := runtime.NewImage(createConfig.Image) + createImage.LocalName, _ = createImage.GetLocalImageName() + if createImage.LocalName == "" { + // The image wasnt found by the user input'd name or its fqname + // Pull the image + fmt.Printf("Trying to pull %s...", createImage.PullName) + createImage.Pull() + } + + runtimeSpec, err := createConfigToOCISpec(createConfig) + if err != nil { + return err + } + logrus.Debug("spec is ", runtimeSpec) + + if createImage.LocalName != "" { + nameIsID, err := runtime.IsImageID(createImage.LocalName) + if err != nil { + return err + } + if nameIsID { + // If the input from the user is an ID, then we need to get the image + // name for cstorage + createImage.LocalName, err = createImage.GetNameByID() + if err != nil { + return err + } + } + imageName = createImage.LocalName + } else { + imageName, err = createImage.GetFQName() + } + if err != nil { + return err + } + logrus.Debug("imageName is ", imageName) + + imageID, err := createImage.GetImageID() + if err != nil { + return err + } + logrus.Debug("imageID is ", imageID) + + options, err := createConfig.GetContainerCreateOptions() + if err != nil { + return errors.Wrapf(err, "unable to parse new container options") + } + + // Gather up the options for NewContainer which consist of With... funcs + options = append(options, libpod.WithRootFSFromImage(imageID, imageName, false)) + options = append(options, libpod.WithSELinuxLabels(createConfig.ProcessLabel, createConfig.MountLabel)) + options = append(options, libpod.WithShmDir(createConfig.ShmDir)) + ctr, err := runtime.NewContainer(runtimeSpec, options...) + if err != nil { + return err + } + + logrus.Debug("new container created ", ctr.ID()) + if err := ctr.Init(); err != nil { + return err + } + logrus.Debugf("container storage created for %q", ctr.ID()) + + if c.String("cidfile") != "" { + libpod.WriteFile(ctr.ID(), c.String("cidfile")) + return nil + } + + // Create a bool channel to track that the console socket attach + // is successful. + attached := make(chan bool) + // Create a waitgroup so we can sync and wait for all goroutines + // to finish before exiting main + var wg sync.WaitGroup + + if !createConfig.Detach { + // We increment the wg counter because we need to do the attach + wg.Add(1) + // Attach to the running container + go func() { + logrus.Debugf("trying to attach to the container %s", ctr.ID()) + defer wg.Done() + if err := ctr.Attach(false, c.String("detach-keys"), attached); err != nil { + logrus.Errorf("unable to attach to container %s: %q", ctr.ID(), err) + } + }() + if !<-attached { + return errors.Errorf("unable to attach to container %s", ctr.ID()) + } + } + // Start the container + if err := ctr.Start(); err != nil { + return errors.Wrapf(err, "unable to start container %q", ctr.ID()) + } + if createConfig.Detach { + fmt.Printf("%s\n", ctr.ID()) + return nil + } + wg.Wait() + + if createConfig.Rm { + return runtime.RemoveContainer(ctr, true) + } + return ctr.CleanupStorage() +} diff --git a/cmd/podman/save.go b/cmd/podman/save.go new file mode 100644 index 000000000..85a8c7930 --- /dev/null +++ b/cmd/podman/save.go @@ -0,0 +1,129 @@ +package main + +import ( + "io" + "os" + "strings" + + "github.com/containers/image/manifest" + imgspecv1 "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/sirupsen/logrus" + "github.com/urfave/cli" +) + +const ( + ociManifestDir = "oci-dir" + v2s2ManifestDir = "docker-dir" +) + +var ( + saveFlags = []cli.Flag{ + cli.BoolFlag{ + Name: "compress", + Usage: "compress tarball image layers when saving to a directory using the 'dir' transport. (default is same compression type as source)", + }, + cli.StringFlag{ + Name: "output, o", + Usage: "Write to a file, default is STDOUT", + Value: "/dev/stdout", + }, + cli.BoolFlag{ + Name: "quiet, q", + Usage: "Suppress the output", + }, + cli.StringFlag{ + Name: "format", + Usage: "Save image to oci-archive, oci-dir (directory with oci manifest type), docker-dir (directory with v2s2 manifest type)", + }, + } + saveDescription = ` + Save an image to docker-archive or oci-archive on the local machine. + Default is docker-archive` + + saveCommand = cli.Command{ + Name: "save", + Usage: "Save image to an archive", + Description: saveDescription, + Flags: saveFlags, + Action: saveCmd, + ArgsUsage: "", + } +) + +// saveCmd saves the image to either docker-archive or oci +func saveCmd(c *cli.Context) error { + args := c.Args() + if len(args) == 0 { + return errors.Errorf("need at least 1 argument") + } + if err := validateFlags(c, saveFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not create runtime") + } + defer runtime.Shutdown(false) + + if c.IsSet("compress") && (c.String("format") != ociManifestDir && c.String("format") != v2s2ManifestDir && c.String("format") == "") { + return errors.Errorf("--compress can only be set when --format is either 'oci-dir' or 'docker-dir'") + } + + var writer io.Writer + if !c.Bool("quiet") { + writer = os.Stdout + } + + output := c.String("output") + if output == "/dev/stdout" { + fi := os.Stdout + if logrus.IsTerminal(fi) { + return errors.Errorf("refusing to save to terminal. Use -o flag or redirect") + } + } + + var dst, manifestType string + switch c.String("format") { + case libpod.OCIArchive: + dst = libpod.OCIArchive + ":" + output + case "oci-dir": + dst = libpod.DirTransport + ":" + output + manifestType = imgspecv1.MediaTypeImageManifest + case "docker-dir": + dst = libpod.DirTransport + ":" + output + manifestType = manifest.DockerV2Schema2MediaType + case libpod.DockerArchive: + fallthrough + case "": + dst = libpod.DockerArchive + ":" + output + default: + return errors.Errorf("unknown format option %q", c.String("format")) + } + + saveOpts := libpod.CopyOptions{ + SignaturePolicyPath: "", + Writer: writer, + ManifestMIMEType: manifestType, + ForceCompress: c.Bool("compress"), + } + + // only one image is supported for now + // future pull requests will fix this + for _, image := range args { + dest := dst + // need dest to be in the format transport:path:reference for the following transports + if strings.Contains(dst, libpod.OCIArchive) || strings.Contains(dst, libpod.DockerArchive) { + dest = dst + ":" + image + } + if err := runtime.PushImage(image, dest, saveOpts); err != nil { + if err2 := os.Remove(output); err2 != nil { + logrus.Errorf("error deleting %q: %v", output, err) + } + return errors.Wrapf(err, "unable to save %q", image) + } + } + return nil +} diff --git a/cmd/podman/spec.go b/cmd/podman/spec.go new file mode 100644 index 000000000..adfdf7347 --- /dev/null +++ b/cmd/podman/spec.go @@ -0,0 +1,561 @@ +package main + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "strings" + + "github.com/cri-o/ocicni/pkg/ocicni" + "github.com/docker/docker/daemon/caps" + "github.com/docker/docker/pkg/mount" + "github.com/docker/go-units" + spec "github.com/opencontainers/runtime-spec/specs-go" + "github.com/opencontainers/runtime-tools/generate" + "github.com/opencontainers/selinux/go-selinux/label" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + ann "github.com/projectatomic/libpod/pkg/annotations" + "github.com/sirupsen/logrus" + "golang.org/x/sys/unix" +) + +func blockAccessToKernelFilesystems(config *createConfig, g *generate.Generator) { + if !config.Privileged { + for _, mp := range []string{ + "/proc/kcore", + "/proc/latency_stats", + "/proc/timer_list", + "/proc/timer_stats", + "/proc/sched_debug", + "/proc/scsi", + "/sys/firmware", + } { + g.AddLinuxMaskedPaths(mp) + } + + for _, rp := range []string{ + "/proc/asound", + "/proc/bus", + "/proc/fs", + "/proc/irq", + "/proc/sys", + "/proc/sysrq-trigger", + } { + g.AddLinuxReadonlyPaths(rp) + } + } +} + +func addPidNS(config *createConfig, g *generate.Generator) error { + pidMode := config.PidMode + if pidMode.IsHost() { + return g.RemoveLinuxNamespace(libpod.PIDNamespace) + } + if pidMode.IsContainer() { + ctr, err := config.Runtime.LookupContainer(pidMode.Container()) + if err != nil { + return errors.Wrapf(err, "container %q not found", pidMode.Container()) + } + pid, err := ctr.PID() + if err != nil { + return errors.Wrapf(err, "Failed to get pid of container %q", pidMode.Container()) + } + pidNsPath := fmt.Sprintf("/proc/%d/ns/pid", pid) + if err := g.AddOrReplaceLinuxNamespace(libpod.PIDNamespace, pidNsPath); err != nil { + return err + } + } + return nil +} + +func addNetNS(config *createConfig, g *generate.Generator) error { + netMode := config.NetMode + if netMode.IsHost() { + return g.RemoveLinuxNamespace(libpod.NetNamespace) + } + if netMode.IsNone() { + return libpod.ErrNotImplemented + } + if netMode.IsBridge() { + return libpod.ErrNotImplemented + } + if netMode.IsContainer() { + ctr, err := config.Runtime.LookupContainer(netMode.ConnectedContainer()) + if err != nil { + return errors.Wrapf(err, "container %q not found", netMode.ConnectedContainer()) + } + pid, err := ctr.PID() + if err != nil { + return errors.Wrapf(err, "Failed to get pid of container %q", netMode.ConnectedContainer()) + } + nsPath := fmt.Sprintf("/proc/%d/ns/net", pid) + if err := g.AddOrReplaceLinuxNamespace(libpod.NetNamespace, nsPath); err != nil { + return err + } + } + return nil +} + +func addUTSNS(config *createConfig, g *generate.Generator) error { + utsMode := config.UtsMode + if utsMode.IsHost() { + return g.RemoveLinuxNamespace(libpod.UTSNamespace) + } + return nil +} + +func addIpcNS(config *createConfig, g *generate.Generator) error { + ipcMode := config.IpcMode + if ipcMode.IsHost() { + return g.RemoveLinuxNamespace(libpod.IPCNamespace) + } + if ipcMode.IsContainer() { + ctr, err := config.Runtime.LookupContainer(ipcMode.Container()) + if err != nil { + return errors.Wrapf(err, "container %q not found", ipcMode.Container()) + } + pid, err := ctr.PID() + if err != nil { + return errors.Wrapf(err, "Failed to get pid of container %q", ipcMode.Container()) + } + nsPath := fmt.Sprintf("/proc/%d/ns/ipc", pid) + if err := g.AddOrReplaceLinuxNamespace(libpod.IPCNamespace, nsPath); err != nil { + return err + } + } + + return nil +} + +func addRlimits(config *createConfig, g *generate.Generator) error { + var ( + ul *units.Ulimit + err error + ) + + for _, u := range config.Resources.Ulimit { + if ul, err = units.ParseUlimit(u); err != nil { + return errors.Wrapf(err, "ulimit option %q requires name=SOFT:HARD, failed to be parsed", u) + } + + g.AddProcessRlimits("RLIMIT_"+strings.ToUpper(ul.Name), uint64(ul.Soft), uint64(ul.Hard)) + } + return nil +} + +func setupCapabilities(config *createConfig, configSpec *spec.Spec) error { + var err error + var caplist []string + if config.Privileged { + caplist = caps.GetAllCapabilities() + } else { + caplist, err = caps.TweakCapabilities(configSpec.Process.Capabilities.Bounding, config.CapAdd, config.CapDrop) + if err != nil { + return err + } + } + + configSpec.Process.Capabilities.Bounding = caplist + configSpec.Process.Capabilities.Permitted = caplist + configSpec.Process.Capabilities.Inheritable = caplist + configSpec.Process.Capabilities.Effective = caplist + return nil +} + +// Parses information needed to create a container into an OCI runtime spec +func createConfigToOCISpec(config *createConfig) (*spec.Spec, error) { + g := generate.New() + g.AddCgroupsMount("ro") + g.SetProcessCwd(config.WorkDir) + g.SetProcessArgs(config.Command) + g.SetProcessTerminal(config.Tty) + // User and Group must go together + g.SetProcessUID(config.User) + g.SetProcessGID(config.Group) + for _, gid := range config.GroupAdd { + g.AddProcessAdditionalGid(gid) + } + for key, val := range config.GetAnnotations() { + g.AddAnnotation(key, val) + } + g.SetRootReadonly(config.ReadOnlyRootfs) + g.SetHostname(config.Hostname) + if config.Hostname != "" { + g.AddProcessEnv("HOSTNAME", config.Hostname) + } + + for _, sysctl := range config.Sysctl { + s := strings.SplitN(sysctl, "=", 2) + g.AddLinuxSysctl(s[0], s[1]) + } + + // RESOURCES - MEMORY + if config.Resources.Memory != 0 { + g.SetLinuxResourcesMemoryLimit(config.Resources.Memory) + } + if config.Resources.MemoryReservation != 0 { + g.SetLinuxResourcesMemoryReservation(config.Resources.MemoryReservation) + } + if config.Resources.MemorySwap != 0 { + g.SetLinuxResourcesMemorySwap(config.Resources.MemorySwap) + } + if config.Resources.KernelMemory != 0 { + g.SetLinuxResourcesMemoryKernel(config.Resources.KernelMemory) + } + if config.Resources.MemorySwappiness != -1 { + g.SetLinuxResourcesMemorySwappiness(uint64(config.Resources.MemorySwappiness)) + } + g.SetLinuxResourcesMemoryDisableOOMKiller(config.Resources.DisableOomKiller) + g.SetProcessOOMScoreAdj(config.Resources.OomScoreAdj) + + // RESOURCES - CPU + + if config.Resources.CPUShares != 0 { + g.SetLinuxResourcesCPUShares(config.Resources.CPUShares) + } + if config.Resources.CPUQuota != 0 { + g.SetLinuxResourcesCPUQuota(config.Resources.CPUQuota) + } + if config.Resources.CPUPeriod != 0 { + g.SetLinuxResourcesCPUPeriod(config.Resources.CPUPeriod) + } + if config.Resources.CPURtRuntime != 0 { + g.SetLinuxResourcesCPURealtimeRuntime(config.Resources.CPURtRuntime) + } + if config.Resources.CPURtPeriod != 0 { + g.SetLinuxResourcesCPURealtimePeriod(config.Resources.CPURtPeriod) + } + if config.Resources.CPUs != "" { + g.SetLinuxResourcesCPUCpus(config.Resources.CPUs) + } + if config.Resources.CPUsetMems != "" { + g.SetLinuxResourcesCPUMems(config.Resources.CPUsetMems) + } + + // SECURITY OPTS + g.SetProcessNoNewPrivileges(config.NoNewPrivileges) + g.SetProcessApparmorProfile(config.ApparmorProfile) + g.SetProcessSelinuxLabel(config.ProcessLabel) + g.SetLinuxMountLabel(config.MountLabel) + blockAccessToKernelFilesystems(config, &g) + + // RESOURCES - PIDS + if config.Resources.PidsLimit != 0 { + g.SetLinuxResourcesPidsLimit(config.Resources.PidsLimit) + } + + for _, i := range config.Tmpfs { + options := []string{"rw", "noexec", "nosuid", "nodev", "size=65536k"} + spliti := strings.SplitN(i, ":", 2) + if len(spliti) > 1 { + if _, _, err := mount.ParseTmpfsOptions(spliti[1]); err != nil { + return nil, err + } + options = strings.Split(spliti[1], ",") + } + // Default options if nothing passed + g.AddTmpfsMount(spliti[0], options) + } + + for name, val := range config.Env { + g.AddProcessEnv(name, val) + } + + if err := addRlimits(config, &g); err != nil { + return nil, err + } + + if err := addPidNS(config, &g); err != nil { + return nil, err + } + + if err := addNetNS(config, &g); err != nil { + return nil, err + } + + if err := addUTSNS(config, &g); err != nil { + return nil, err + } + + if err := addIpcNS(config, &g); err != nil { + return nil, err + } + configSpec := g.Spec() + + if config.SeccompProfilePath != "" && config.SeccompProfilePath != "unconfined" { + seccompProfile, err := ioutil.ReadFile(config.SeccompProfilePath) + if err != nil { + return nil, errors.Wrapf(err, "opening seccomp profile (%s) failed", config.SeccompProfilePath) + } + var seccompConfig spec.LinuxSeccomp + if err := json.Unmarshal(seccompProfile, &seccompConfig); err != nil { + return nil, errors.Wrapf(err, "decoding seccomp profile (%s) failed", config.SeccompProfilePath) + } + configSpec.Linux.Seccomp = &seccompConfig + } + + // BIND MOUNTS + mounts, err := config.GetVolumeMounts() + if err != nil { + return nil, errors.Wrapf(err, "error getting volume mounts") + } + configSpec.Mounts = append(configSpec.Mounts, mounts...) + for _, mount := range configSpec.Mounts { + for _, opt := range mount.Options { + switch opt { + case "private", "rprivate", "slave", "rslave", "shared", "rshared": + if err := g.SetLinuxRootPropagation(opt); err != nil { + return nil, errors.Wrapf(err, "error setting root propagation for %q", mount.Destination) + } + } + } + } + + // HANDLE CAPABILITIES + if err := setupCapabilities(config, configSpec); err != nil { + return nil, err + } + + /* + Hooks: &configSpec.Hooks{}, + //Annotations + Resources: &configSpec.LinuxResources{ + Devices: config.GetDefaultDevices(), + BlockIO: &blkio, + //HugepageLimits: + Network: &configSpec.LinuxNetwork{ + // ClassID *uint32 + // Priorites []LinuxInterfacePriority + }, + }, + //CgroupsPath: + //Namespaces: []LinuxNamespace + //Devices + // DefaultAction: + // Architectures + // Syscalls: + }, + // RootfsPropagation + // MaskedPaths + // ReadonlyPaths: + // IntelRdt + }, + } + */ + return configSpec, nil +} + +func (c *createConfig) CreateBlockIO() (spec.LinuxBlockIO, error) { + bio := spec.LinuxBlockIO{} + bio.Weight = &c.Resources.BlkioWeight + if len(c.Resources.BlkioWeightDevice) > 0 { + var lwds []spec.LinuxWeightDevice + for _, i := range c.Resources.BlkioWeightDevice { + wd, err := validateweightDevice(i) + if err != nil { + return bio, errors.Wrapf(err, "invalid values for blkio-weight-device") + } + wdStat := getStatFromPath(wd.path) + lwd := spec.LinuxWeightDevice{ + Weight: &wd.weight, + } + lwd.Major = int64(unix.Major(wdStat.Rdev)) + lwd.Minor = int64(unix.Minor(wdStat.Rdev)) + lwds = append(lwds, lwd) + } + } + if len(c.Resources.DeviceReadBps) > 0 { + readBps, err := makeThrottleArray(c.Resources.DeviceReadBps) + if err != nil { + return bio, err + } + bio.ThrottleReadBpsDevice = readBps + } + if len(c.Resources.DeviceWriteBps) > 0 { + writeBpds, err := makeThrottleArray(c.Resources.DeviceWriteBps) + if err != nil { + return bio, err + } + bio.ThrottleWriteBpsDevice = writeBpds + } + if len(c.Resources.DeviceReadIOps) > 0 { + readIOps, err := makeThrottleArray(c.Resources.DeviceReadIOps) + if err != nil { + return bio, err + } + bio.ThrottleReadIOPSDevice = readIOps + } + if len(c.Resources.DeviceWriteIOps) > 0 { + writeIOps, err := makeThrottleArray(c.Resources.DeviceWriteIOps) + if err != nil { + return bio, err + } + bio.ThrottleWriteIOPSDevice = writeIOps + } + + return bio, nil +} + +// GetAnnotations returns the all the annotations for the container +func (c *createConfig) GetAnnotations() map[string]string { + a := getDefaultAnnotations() + // TODO - Which annotations do we want added by default + // TODO - This should be added to the DB long term + if c.Tty { + a["io.kubernetes.cri-o.TTY"] = "true" + } + return a +} + +func getDefaultAnnotations() map[string]string { + var annotations map[string]string + annotations = make(map[string]string) + annotations[ann.Annotations] = "" + annotations[ann.ContainerID] = "" + annotations[ann.ContainerName] = "" + annotations[ann.ContainerType] = "" + annotations[ann.Created] = "" + annotations[ann.HostName] = "" + annotations[ann.IP] = "" + annotations[ann.Image] = "" + annotations[ann.ImageName] = "" + annotations[ann.ImageRef] = "" + annotations[ann.KubeName] = "" + annotations[ann.Labels] = "" + annotations[ann.LogPath] = "" + annotations[ann.Metadata] = "" + annotations[ann.Name] = "" + annotations[ann.PrivilegedRuntime] = "" + annotations[ann.ResolvPath] = "" + annotations[ann.HostnamePath] = "" + annotations[ann.SandboxID] = "" + annotations[ann.SandboxName] = "" + annotations[ann.ShmPath] = "" + annotations[ann.MountPoint] = "" + annotations[ann.TrustedSandbox] = "" + annotations[ann.TTY] = "false" + annotations[ann.Stdin] = "" + annotations[ann.StdinOnce] = "" + annotations[ann.Volumes] = "" + + return annotations +} + +//GetVolumeMounts takes user provided input for bind mounts and creates Mount structs +func (c *createConfig) GetVolumeMounts() ([]spec.Mount, error) { + var m []spec.Mount + var options []string + for _, i := range c.Volumes { + // We need to handle SELinux options better here, specifically :Z + spliti := strings.Split(i, ":") + if len(spliti) > 2 { + options = strings.Split(spliti[2], ",") + } + options = append(options, "rbind") + var foundrw, foundro, foundz, foundZ bool + var rootProp string + for _, opt := range options { + switch opt { + case "rw": + foundrw = true + case "ro": + foundro = true + case "z": + foundz = true + case "Z": + foundZ = true + case "private", "rprivate", "slave", "rslave", "shared", "rshared": + rootProp = opt + } + } + if !foundrw && !foundro { + options = append(options, "rw") + } + if foundz { + if err := label.Relabel(spliti[0], c.MountLabel, true); err != nil { + return nil, errors.Wrapf(err, "relabel failed %q", spliti[0]) + } + } + if foundZ { + if err := label.Relabel(spliti[0], c.MountLabel, false); err != nil { + return nil, errors.Wrapf(err, "relabel failed %q", spliti[0]) + } + } + if rootProp == "" { + options = append(options, "rprivate") + } + + m = append(m, spec.Mount{ + Destination: spliti[1], + Type: string(TypeBind), + Source: spliti[0], + Options: options, + }) + } + return m, nil +} + +//GetTmpfsMounts takes user provided input for Tmpfs mounts and creates Mount structs +func (c *createConfig) GetTmpfsMounts() []spec.Mount { + var m []spec.Mount + for _, i := range c.Tmpfs { + // Default options if nothing passed + options := []string{"rw", "noexec", "nosuid", "nodev", "size=65536k"} + spliti := strings.Split(i, ":") + destPath := spliti[0] + if len(spliti) > 1 { + options = strings.Split(spliti[1], ",") + } + m = append(m, spec.Mount{ + Destination: destPath, + Type: string(TypeTmpfs), + Options: options, + Source: string(TypeTmpfs), + }) + } + return m +} + +func (c *createConfig) GetContainerCreateOptions() ([]libpod.CtrCreateOption, error) { + var options []libpod.CtrCreateOption + + // Uncomment after talking to mheon about unimplemented funcs + // options = append(options, libpod.WithLabels(c.labels)) + + if c.Interactive { + options = append(options, libpod.WithStdin()) + } + if c.Name != "" { + logrus.Debugf("appending name %s", c.Name) + options = append(options, libpod.WithName(c.Name)) + } + // TODO parse ports into libpod format and include + // TODO should not happen if --net=host + options = append(options, libpod.WithNetNS([]ocicni.PortMapping{})) + + return options, nil +} + +func getStatFromPath(path string) unix.Stat_t { + s := unix.Stat_t{} + _ = unix.Stat(path, &s) + return s +} + +func makeThrottleArray(throttleInput []string) ([]spec.LinuxThrottleDevice, error) { + var ltds []spec.LinuxThrottleDevice + for _, i := range throttleInput { + t, err := validateBpsDevice(i) + if err != nil { + return []spec.LinuxThrottleDevice{}, err + } + ltd := spec.LinuxThrottleDevice{} + ltd.Rate = t.rate + ltdStat := getStatFromPath(t.path) + ltd.Major = int64(unix.Major(ltdStat.Rdev)) + ltd.Minor = int64(unix.Major(ltdStat.Rdev)) + ltds = append(ltds, ltd) + } + return ltds, nil +} diff --git a/cmd/podman/spec_test.go b/cmd/podman/spec_test.go new file mode 100644 index 000000000..01e1a4ad3 --- /dev/null +++ b/cmd/podman/spec_test.go @@ -0,0 +1,39 @@ +package main + +import ( + "reflect" + "testing" + + spec "github.com/opencontainers/runtime-spec/specs-go" + "github.com/stretchr/testify/assert" +) + +func TestCreateConfig_GetVolumeMounts(t *testing.T) { + data := spec.Mount{ + Destination: "/foobar", + Type: "bind", + Source: "foobar", + Options: []string{"ro", "rbind", "rprivate"}, + } + config := createConfig{ + Volumes: []string{"foobar:/foobar:ro"}, + } + specMount, err := config.GetVolumeMounts() + assert.NoError(t, err) + assert.True(t, reflect.DeepEqual(data, specMount[0])) +} + +func TestCreateConfig_GetTmpfsMounts(t *testing.T) { + data := spec.Mount{ + Destination: "/homer", + Type: "tmpfs", + Source: "tmpfs", + Options: []string{"rw", "size=787448k", "mode=1777"}, + } + config := createConfig{ + Tmpfs: []string{"/homer:rw,size=787448k,mode=1777"}, + } + tmpfsMount := config.GetTmpfsMounts() + assert.True(t, reflect.DeepEqual(data, tmpfsMount[0])) + +} diff --git a/cmd/podman/start.go b/cmd/podman/start.go new file mode 100644 index 000000000..33bc354bb --- /dev/null +++ b/cmd/podman/start.go @@ -0,0 +1,131 @@ +package main + +import ( + "fmt" + "os" + "strconv" + "sync" + + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/sirupsen/logrus" + "github.com/urfave/cli" +) + +var ( + startFlags = []cli.Flag{ + cli.BoolFlag{ + Name: "attach, a", + Usage: "Attach container's STDOUT and STDERR", + }, + cli.StringFlag{ + Name: "detach-keys", + Usage: "Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl- where is one of: a-z, @, ^, [, , or _.", + }, + cli.BoolFlag{ + Name: "interactive, i", + Usage: "Keep STDIN open even if not attached", + }, + } + startDescription = ` + podman start + + Starts one or more containers. The container name or ID can be used. +` + + startCommand = cli.Command{ + Name: "start", + Usage: "Start one or more containers", + Description: startDescription, + Flags: startFlags, + Action: startCmd, + ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", + UseShortOptionHandling: true, + } +) + +func startCmd(c *cli.Context) error { + args := c.Args() + if len(args) < 1 { + return errors.Errorf("you must provide at least one container name or id") + } + + attach := c.Bool("attach") + + if len(args) > 1 && attach { + return errors.Errorf("you cannot start and attach multiple containers at once") + } + + if err := validateFlags(c, startFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "error creating libpod runtime") + } + defer runtime.Shutdown(false) + + var lastError error + for _, container := range args { + // Create a bool channel to track that the console socket attach + // is successful. + attached := make(chan bool) + // Create a waitgroup so we can sync and wait for all goroutines + // to finish before exiting main + var wg sync.WaitGroup + + ctr, err := runtime.LookupContainer(container) + if err != nil { + if lastError != nil { + fmt.Fprintln(os.Stderr, lastError) + } + lastError = errors.Wrapf(err, "unable to find container %s", container) + continue + } + + if err := ctr.Init(); err != nil && errors.Cause(err) != libpod.ErrCtrExists { + return err + } + + // We can only be interactive if both the config and the command-line say so + if c.Bool("interactive") && !ctr.Config().Stdin { + return errors.Errorf("the container was not created with the interactive option") + } + noStdIn := c.Bool("interactive") + tty, err := strconv.ParseBool(ctr.Spec().Annotations["io.kubernetes.cri-o.TTY"]) + if err != nil { + return errors.Wrapf(err, "unable to parse annotations in %s", ctr.ID()) + } + // We only get a terminal session if both a tty was specified in the spec and + // -a on the command-line was given. + if attach && tty { + // We increment the wg counter because we need to do the attach + wg.Add(1) + // Attach to the running container + go func() { + logrus.Debugf("trying to attach to the container %s", ctr.ID()) + defer wg.Done() + if err := ctr.Attach(noStdIn, c.String("detach-keys"), attached); err != nil { + logrus.Errorf("unable to attach to container %s: %q", ctr.ID(), err) + } + }() + if !<-attached { + return errors.Errorf("unable to attach to container %s", ctr.ID()) + } + } + err = ctr.Start() + if err != nil { + if lastError != nil { + fmt.Fprintln(os.Stderr, lastError) + } + lastError = errors.Wrapf(err, "unable to start %s", container) + continue + } + if !attach { + fmt.Println(ctr.ID()) + } + wg.Wait() + } + return lastError +} diff --git a/cmd/podman/stats.go b/cmd/podman/stats.go new file mode 100644 index 000000000..cf54a8bfe --- /dev/null +++ b/cmd/podman/stats.go @@ -0,0 +1,226 @@ +package main + +import ( + "fmt" + "reflect" + "strings" + "time" + + tm "github.com/buger/goterm" + "github.com/docker/go-units" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/cmd/podman/formats" + "github.com/projectatomic/libpod/libpod" + "github.com/urfave/cli" +) + +type statsOutputParams struct { + Container string `json:"name"` + ID string `json:"id"` + CPUPerc string `json:"cpu_percent"` + MemUsage string `json:"mem_usage"` + MemPerc string `json:"mem_percent"` + NetIO string `json:"netio"` + BlockIO string `json:"blocki"` + PIDS uint64 `json:"pids"` +} + +var ( + statsFlags = []cli.Flag{ + cli.BoolFlag{ + Name: "all, a", + Usage: "show all containers. Only running containers are shown by default. The default is false", + }, + cli.BoolFlag{ + Name: "no-stream", + Usage: "disable streaming stats and only pull the first result, default setting is false", + }, + cli.StringFlag{ + Name: "format", + Usage: "pretty-print container statistics using a Go template", + }, + cli.BoolFlag{ + Name: "no-reset", + Usage: "disable resetting the screen between intervals", + }, + } + + statsDescription = "display a live stream of one or more containers' resource usage statistics" + statsCommand = cli.Command{ + Name: "stats", + Usage: "Display percentage of CPU, memory, network I/O, block I/O and PIDs for one or more containers", + Description: statsDescription, + Flags: statsFlags, + Action: statsCmd, + ArgsUsage: "", + } +) + +func statsCmd(c *cli.Context) error { + if err := validateFlags(c, statsFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + times := -1 + if c.Bool("no-stream") { + times = 1 + } + + var format string + var ctrs []*libpod.Container + var containerFunc func() ([]*libpod.Container, error) + all := c.Bool("all") + + if c.IsSet("format") { + format = c.String("format") + } else { + format = genStatsFormat() + } + + if len(c.Args()) > 0 { + containerFunc = func() ([]*libpod.Container, error) { return runtime.GetContainersByList(c.Args()) } + } else if all { + containerFunc = runtime.GetAllContainers + } else { + containerFunc = runtime.GetRunningContainers + } + + ctrs, err = containerFunc() + if err != nil { + return errors.Wrapf(err, "unable to get list of containers") + } + + containerStats := map[string]*libpod.ContainerStats{} + for _, ctr := range ctrs { + initialStats, err := ctr.GetContainerStats(&libpod.ContainerStats{}) + if err != nil { + return err + } + containerStats[ctr.ID()] = initialStats + } + step := 1 + if times == -1 { + times = 1 + step = 0 + } + for i := 0; i < times; i += step { + reportStats := []*libpod.ContainerStats{} + for _, ctr := range ctrs { + id := ctr.ID() + if _, ok := containerStats[ctr.ID()]; !ok { + initialStats, err := ctr.GetContainerStats(&libpod.ContainerStats{}) + if err != nil { + return err + } + containerStats[id] = initialStats + } + stats, err := ctr.GetContainerStats(containerStats[id]) + if err != nil { + return err + } + // replace the previous measurement with the current one + containerStats[id] = stats + reportStats = append(reportStats, stats) + } + ctrs, err = containerFunc() + if err != nil { + return err + } + if strings.ToLower(format) != formats.JSONString && !c.Bool("no-reset") { + tm.Clear() + tm.MoveCursor(1, 1) + tm.Flush() + } + outputStats(reportStats, format) + time.Sleep(time.Second) + } + return nil +} + +func outputStats(stats []*libpod.ContainerStats, format string) error { + var out formats.Writer + var outputStats []statsOutputParams + for _, s := range stats { + outputStats = append(outputStats, getStatsOutputParams(s)) + } + if len(outputStats) == 0 { + return nil + } + if strings.ToLower(format) == formats.JSONString { + out = formats.JSONStructArray{Output: statsToGeneric(outputStats, []statsOutputParams{})} + } else { + out = formats.StdoutTemplateArray{Output: statsToGeneric(outputStats, []statsOutputParams{}), Template: format, Fields: outputStats[0].headerMap()} + } + return formats.Writer(out).Out() +} + +func genStatsFormat() (format string) { + return "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}\t{{.PIDS}}" +} + +// imagesToGeneric creates an empty array of interfaces for output +func statsToGeneric(templParams []statsOutputParams, JSONParams []statsOutputParams) (genericParams []interface{}) { + if len(templParams) > 0 { + for _, v := range templParams { + genericParams = append(genericParams, interface{}(v)) + } + return + } + for _, v := range JSONParams { + genericParams = append(genericParams, interface{}(v)) + } + return +} + +// generate the header based on the template provided +func (i *statsOutputParams) headerMap() map[string]string { + v := reflect.Indirect(reflect.ValueOf(i)) + values := make(map[string]string) + + for i := 0; i < v.NumField(); i++ { + key := v.Type().Field(i).Name + value := key + switch value { + case "CPUPerc": + value = "CPU%" + case "MemUsage": + value = "MemUsage/Limit" + case "MemPerc": + value = "Mem%" + } + values[key] = strings.ToUpper(splitCamelCase(value)) + } + return values +} + +func combineHumanValues(a, b uint64) string { + return fmt.Sprintf("%s / %s", units.HumanSize(float64(a)), units.HumanSize(float64(b))) +} + +func floatToPercentString(f float64) string { + strippedFloat, err := libpod.RemoveScientificNotationFromFloat(f) + if err != nil { + // If things go bazinga, return a safe value + return "0.00 %" + } + return fmt.Sprintf("%.2f", strippedFloat) + "%" +} + +func getStatsOutputParams(stats *libpod.ContainerStats) statsOutputParams { + return statsOutputParams{ + Container: stats.ContainerID[:12], + ID: stats.ContainerID, + CPUPerc: floatToPercentString(stats.CPU), + MemUsage: combineHumanValues(stats.MemUsage, stats.MemLimit), + MemPerc: floatToPercentString(stats.MemPerc), + NetIO: combineHumanValues(stats.NetInput, stats.NetOutput), + BlockIO: combineHumanValues(stats.BlockInput, stats.BlockOutput), + PIDS: stats.PIDs, + } +} diff --git a/cmd/podman/stop.go b/cmd/podman/stop.go new file mode 100644 index 000000000..3b1ffbba5 --- /dev/null +++ b/cmd/podman/stop.go @@ -0,0 +1,104 @@ +package main + +import ( + "fmt" + "os" + + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/sirupsen/logrus" + "github.com/urfave/cli" +) + +var ( + defaultTimeout int64 = 10 + stopFlags = []cli.Flag{ + cli.Int64Flag{ + Name: "timeout, t", + Usage: "Seconds to wait for stop before killing the container", + Value: defaultTimeout, + }, + cli.BoolFlag{ + Name: "all, a", + Usage: "stop all running containers", + }, + } + stopDescription = ` + podman stop + + Stops one or more running containers. The container name or ID can be used. + A timeout to forcibly stop the container can also be set but defaults to 10 + seconds otherwise. +` + + stopCommand = cli.Command{ + Name: "stop", + Usage: "Stop one or more containers", + Description: stopDescription, + Flags: stopFlags, + Action: stopCmd, + ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", + } +) + +func stopCmd(c *cli.Context) error { + args := c.Args() + stopTimeout := c.Int64("timeout") + if c.Bool("all") && len(args) > 0 { + return errors.Errorf("no arguments are needed with -a") + } + if len(args) < 1 && !c.Bool("all") { + return errors.Errorf("you must provide at least one container name or id") + } + if err := validateFlags(c, stopFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + logrus.Debugf("Stopping containers with timeout %d", stopTimeout) + + var filterFuncs []libpod.ContainerFilter + var containers []*libpod.Container + var lastError error + + if c.Bool("all") { + // only get running containers + filterFuncs = append(filterFuncs, func(c *libpod.Container) bool { + state, _ := c.State() + return state == libpod.ContainerStateRunning + }) + containers, err = runtime.GetContainers(filterFuncs...) + if err != nil { + return errors.Wrapf(err, "unable to get running containers") + } + } else { + for _, i := range args { + container, err := runtime.LookupContainer(i) + if err != nil { + if lastError != nil { + fmt.Fprintln(os.Stderr, lastError) + } + lastError = errors.Wrapf(err, "unable to find container %s", i) + continue + } + containers = append(containers, container) + } + } + + for _, ctr := range containers { + if err := ctr.Stop(stopTimeout); err != nil { + if lastError != nil { + fmt.Fprintln(os.Stderr, lastError) + } + lastError = errors.Wrapf(err, "failed to stop container %v", ctr.ID()) + } else { + fmt.Println(ctr.ID()) + } + } + return lastError +} diff --git a/cmd/podman/tag.go b/cmd/podman/tag.go new file mode 100644 index 000000000..f29c8c182 --- /dev/null +++ b/cmd/podman/tag.go @@ -0,0 +1,77 @@ +package main + +import ( + "github.com/containers/image/docker/reference" + "github.com/containers/storage" + "github.com/pkg/errors" + "github.com/projectatomic/libpod/libpod" + "github.com/urfave/cli" +) + +var ( + tagDescription = "Adds one or more additional names to locally-stored image" + tagCommand = cli.Command{ + Name: "tag", + Usage: "Add an additional name to a local image", + Description: tagDescription, + Action: tagCmd, + ArgsUsage: "IMAGE-NAME [IMAGE-NAME ...]", + } +) + +func tagCmd(c *cli.Context) error { + args := c.Args() + if len(args) < 2 { + return errors.Errorf("image name and at least one new name must be specified") + } + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not create runtime") + } + defer runtime.Shutdown(false) + + img, err := runtime.GetImage(args[0]) + if err != nil { + return err + } + if img == nil { + return errors.New("null image") + } + err = addImageNames(runtime, img, args[1:]) + if err != nil { + return errors.Wrapf(err, "error adding names %v to image %q", args[1:], args[0]) + } + return nil +} + +func addImageNames(runtime *libpod.Runtime, image *storage.Image, addNames []string) error { + // Add tags to the names if applicable + names, err := expandedTags(addNames) + if err != nil { + return err + } + for _, name := range names { + if err := runtime.TagImage(image, name); err != nil { + return errors.Wrapf(err, "error adding name (%v) to image %q", name, image.ID) + } + } + return nil +} + +func expandedTags(tags []string) ([]string, error) { + expandedNames := []string{} + for _, tag := range tags { + var labelName string + name, err := reference.Parse(tag) + if err != nil { + return nil, errors.Wrapf(err, "error parsing tag %q", name) + } + if _, ok := name.(reference.NamedTagged); ok { + labelName = name.String() + } else { + labelName = name.String() + ":latest" + } + expandedNames = append(expandedNames, labelName) + } + return expandedNames, nil +} diff --git a/cmd/podman/top.go b/cmd/podman/top.go new file mode 100644 index 000000000..796b31c1d --- /dev/null +++ b/cmd/podman/top.go @@ -0,0 +1,258 @@ +package main + +import ( + "encoding/json" + "fmt" + "strings" + + "github.com/pkg/errors" + "github.com/projectatomic/libpod/cmd/podman/formats" + "github.com/projectatomic/libpod/libpod" + "github.com/urfave/cli" +) + +var ( + topFlags = []cli.Flag{ + cli.StringFlag{ + Name: "format", + Usage: "Change the output to JSON", + }, + } + topDescription = ` + podman top + + Display the running processes of the container. +` + + topCommand = cli.Command{ + Name: "top", + Usage: "Display the running processes of a container", + Description: topDescription, + Flags: topFlags, + Action: topCmd, + ArgsUsage: "CONTAINER-NAME", + SkipArgReorder: true, + } +) + +func topCmd(c *cli.Context) error { + doJSON := false + if c.IsSet("format") { + if strings.ToUpper(c.String("format")) == "JSON" { + doJSON = true + } else { + return errors.Errorf("only 'json' is supported for a format option") + } + } + args := c.Args() + var psArgs []string + psOpts := []string{"-o", "uid,pid,ppid,c,stime,tname,time,cmd"} + if len(args) < 1 { + return errors.Errorf("you must provide the name or id of a running container") + } + if err := validateFlags(c, topFlags); err != nil { + return err + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "error creating libpod runtime") + } + defer runtime.Shutdown(false) + if len(args) > 1 { + psOpts = args[1:] + } + + container, err := runtime.LookupContainer(args[0]) + if err != nil { + return errors.Wrapf(err, "unable to lookup %s", args[0]) + } + conStat, err := container.State() + if err != nil { + return errors.Wrapf(err, "unable to look up state for %s", args[0]) + } + if conStat != libpod.ContainerStateRunning { + return errors.Errorf("top can only be used on running containers") + } + + psArgs = append(psArgs, psOpts...) + + results, err := container.GetContainerPidInformation(psArgs) + if err != nil { + return err + } + headers := getHeaders(results[0]) + format := genTopFormat(headers) + var out formats.Writer + psParams, err := psDataToPSParams(results[1:], headers) + if err != nil { + return errors.Wrap(err, "unable to convert ps data to proper structure") + } + if doJSON { + out = formats.JSONStructArray{Output: topToGeneric(psParams)} + } else { + out = formats.StdoutTemplateArray{Output: topToGeneric(psParams), Template: format, Fields: createTopHeaderMap(headers)} + } + formats.Writer(out).Out() + return nil +} + +func getHeaders(s string) []string { + var headers []string + tmpHeaders := strings.Fields(s) + for _, header := range tmpHeaders { + headers = append(headers, strings.Replace(header, "%", "", -1)) + } + return headers +} + +func genTopFormat(headers []string) string { + format := "table " + for _, header := range headers { + format = fmt.Sprintf("%s{{.%s}}\t", format, header) + } + return format +} + +// imagesToGeneric creates an empty array of interfaces for output +func topToGeneric(templParams []PSParams) (genericParams []interface{}) { + for _, v := range templParams { + genericParams = append(genericParams, interface{}(v)) + } + return +} + +// generate the header based on the template provided +func createTopHeaderMap(v []string) map[string]string { + values := make(map[string]string) + for _, key := range v { + value := key + if value == "CPU" { + value = "%CPU" + } else if value == "MEM" { + value = "%MEM" + } + values[key] = strings.ToUpper(splitCamelCase(value)) + } + return values +} + +// PSDataToParams converts a string array of data and its headers to an +// arra if PSParams +func psDataToPSParams(data []string, headers []string) ([]PSParams, error) { + var params []PSParams + for _, line := range data { + tmpMap := make(map[string]string) + tmpArray := strings.Fields(line) + if len(tmpArray) == 0 { + continue + } + for index, v := range tmpArray { + header := headers[index] + tmpMap[header] = v + } + jsonData, _ := json.Marshal(tmpMap) + var r PSParams + err := json.Unmarshal(jsonData, &r) + if err != nil { + return []PSParams{}, err + } + params = append(params, r) + } + return params, nil +} + +//PSParams is a list of options that the command line ps recognizes +type PSParams struct { + CPU string + MEM string + COMMAND string + BLOCKED string + START string + TIME string + C string + CAUGHT string + CGROUP string + CLSCLS string + CLS string + CMD string + CP string + DRS string + EGID string + EGROUP string + EIP string + ESP string + ELAPSED string + EUIDE string + USER string + F string + FGID string + FGROUP string + FUID string + FUSER string + GID string + GROUP string + IGNORED string + IPCNS string + LABEL string + STARTED string + SESSION string + LWP string + MACHINE string + MAJFLT string + MINFLT string + MNTNS string + NETNS string + NI string + NLWP string + OWNER string + PENDING string + PGID string + PGRP string + PID string + PIDNS string + POL string + PPID string + PRI string + PSR string + RGID string + RGROUP string + RSS string + RSZ string + RTPRIO string + RUID string + RUSER string + S string + SCH string + SEAT string + SESS string + P string + SGID string + SGROUP string + SID string + SIZE string + SLICE string + SPID string + STACKP string + STIME string + SUID string + SUPGID string + SUPGRP string + SUSER string + SVGID string + SZ string + TGID string + THCNT string + TID string + TTY string + TPGID string + TRS string + TT string + UID string + UNIT string + USERNS string + UTSNS string + UUNIT string + VSZ string + WCHAN string +} diff --git a/cmd/podman/umount.go b/cmd/podman/umount.go new file mode 100644 index 000000000..4b6aba99e --- /dev/null +++ b/cmd/podman/umount.go @@ -0,0 +1,40 @@ +package main + +import ( + "github.com/pkg/errors" + "github.com/urfave/cli" +) + +var ( + umountCommand = cli.Command{ + Name: "umount", + Aliases: []string{"unmount"}, + Usage: "Unmount a working container's root filesystem", + Description: "Unmounts a working container's root filesystem", + Action: umountCmd, + ArgsUsage: "CONTAINER-NAME-OR-ID", + } +) + +func umountCmd(c *cli.Context) error { + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + args := c.Args() + if len(args) == 0 { + return errors.Errorf("container ID must be specified") + } + if len(args) > 1 { + return errors.Errorf("too many arguments specified") + } + + ctr, err := runtime.LookupContainer(args[0]) + if err != nil { + return errors.Wrapf(err, "error looking up container %q", args[0]) + } + + return ctr.Unmount() +} diff --git a/cmd/podman/unpause.go b/cmd/podman/unpause.go new file mode 100644 index 000000000..a7ef65f85 --- /dev/null +++ b/cmd/podman/unpause.go @@ -0,0 +1,58 @@ +package main + +import ( + "fmt" + "os" + + "github.com/pkg/errors" + "github.com/urfave/cli" +) + +var ( + unpauseDescription = ` + podman unpause + + Unpauses one or more running containers. The container name or ID can be used. +` + unpauseCommand = cli.Command{ + Name: "unpause", + Usage: "Unpause the processes in one or more containers", + Description: unpauseDescription, + Action: unpauseCmd, + ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", + } +) + +func unpauseCmd(c *cli.Context) error { + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "could not get runtime") + } + defer runtime.Shutdown(false) + + args := c.Args() + if len(args) < 1 { + return errors.Errorf("you must provide at least one container name or id") + } + + var lastError error + for _, arg := range args { + ctr, err := runtime.LookupContainer(arg) + if err != nil { + if lastError != nil { + fmt.Fprintln(os.Stderr, lastError) + } + lastError = errors.Wrapf(err, "error looking up container %q", arg) + continue + } + if err = ctr.Unpause(); err != nil { + if lastError != nil { + fmt.Fprintln(os.Stderr, lastError) + } + lastError = errors.Wrapf(err, "failed to unpause container %v", ctr.ID()) + } else { + fmt.Println(ctr.ID()) + } + } + return lastError +} diff --git a/cmd/podman/user.go b/cmd/podman/user.go new file mode 100644 index 000000000..3e2e308c5 --- /dev/null +++ b/cmd/podman/user.go @@ -0,0 +1,121 @@ +package main + +// #include +// #include +// #include +// #include +// #include +// #include +// typedef FILE * pFILE; +import "C" + +import ( + "fmt" + "os/user" + "path/filepath" + "sync" + "syscall" + "unsafe" + + "github.com/pkg/errors" +) + +func fopenContainerFile(rootdir, filename string) (C.pFILE, error) { + var st, lst syscall.Stat_t + + ctrfile := filepath.Join(rootdir, filename) + cctrfile := C.CString(ctrfile) + defer C.free(unsafe.Pointer(cctrfile)) + mode := C.CString("r") + defer C.free(unsafe.Pointer(mode)) + f, err := C.fopen(cctrfile, mode) + if f == nil || err != nil { + return nil, errors.Wrapf(err, "error opening %q", ctrfile) + } + if err = syscall.Fstat(int(C.fileno(f)), &st); err != nil { + return nil, errors.Wrapf(err, "fstat(%q)", ctrfile) + } + if err = syscall.Lstat(ctrfile, &lst); err != nil { + return nil, errors.Wrapf(err, "lstat(%q)", ctrfile) + } + if st.Dev != lst.Dev || st.Ino != lst.Ino { + return nil, errors.Errorf("%q is not a regular file", ctrfile) + } + return f, nil +} + +var ( + lookupUser, lookupGroup sync.Mutex +) + +func lookupUserInContainer(rootdir, username string) (uint64, uint64, error) { + name := C.CString(username) + defer C.free(unsafe.Pointer(name)) + + f, err := fopenContainerFile(rootdir, "/etc/passwd") + if err != nil { + return 0, 0, err + } + defer C.fclose(f) + + lookupUser.Lock() + defer lookupUser.Unlock() + + pwd := C.fgetpwent(f) + for pwd != nil { + if C.strcmp(pwd.pw_name, name) != 0 { + pwd = C.fgetpwent(f) + continue + } + return uint64(pwd.pw_uid), uint64(pwd.pw_gid), nil + } + + return 0, 0, user.UnknownUserError(fmt.Sprintf("error looking up user %q", username)) +} + +func lookupGroupForUIDInContainer(rootdir string, userid uint64) (string, uint64, error) { + f, err := fopenContainerFile(rootdir, "/etc/passwd") + if err != nil { + return "", 0, err + } + defer C.fclose(f) + + lookupUser.Lock() + defer lookupUser.Unlock() + + pwd := C.fgetpwent(f) + for pwd != nil { + if uint64(pwd.pw_uid) != userid { + pwd = C.fgetpwent(f) + continue + } + return C.GoString(pwd.pw_name), uint64(pwd.pw_gid), nil + } + + return "", 0, user.UnknownUserError(fmt.Sprintf("error looking up user with UID %d", userid)) +} + +func lookupGroupInContainer(rootdir, groupname string) (uint64, error) { + name := C.CString(groupname) + defer C.free(unsafe.Pointer(name)) + + f, err := fopenContainerFile(rootdir, "/etc/group") + if err != nil { + return 0, err + } + defer C.fclose(f) + + lookupGroup.Lock() + defer lookupGroup.Unlock() + + grp := C.fgetgrent(f) + for grp != nil { + if C.strcmp(grp.gr_name, name) != 0 { + grp = C.fgetgrent(f) + continue + } + return uint64(grp.gr_gid), nil + } + + return 0, user.UnknownGroupError(fmt.Sprintf("error looking up group %q", groupname)) +} diff --git a/cmd/podman/version.go b/cmd/podman/version.go new file mode 100644 index 000000000..be9b406e7 --- /dev/null +++ b/cmd/podman/version.go @@ -0,0 +1,48 @@ +package main + +import ( + "fmt" + "runtime" + "strconv" + "time" + + "github.com/urfave/cli" +) + +// Overwritten at build time +var ( + // gitCommit is the commit that the binary is being built from. + // It will be populated by the Makefile. + gitCommit string + // buildInfo is the time at which the binary was built + // It will be populated by the Makefile. + buildInfo string +) + +// versionCmd gets and prints version info for version command +func versionCmd(c *cli.Context) error { + fmt.Println("Version: ", c.App.Version) + fmt.Println("Go Version: ", runtime.Version()) + if gitCommit != "" { + fmt.Println("Git Commit: ", gitCommit) + } + if buildInfo != "" { + // Converts unix time from string to int64 + buildTime, err := strconv.ParseInt(buildInfo, 10, 64) + if err != nil { + return err + } + // Prints out the build time in readable format + fmt.Println("Built: ", time.Unix(buildTime, 0).Format(time.ANSIC)) + } + fmt.Println("OS/Arch: ", runtime.GOOS+"/"+runtime.GOARCH) + + return nil +} + +// Cli command to print out the full version of podman +var versionCommand = cli.Command{ + Name: "version", + Usage: "Display the PODMAN Version Information", + Action: versionCmd, +} diff --git a/cmd/podman/wait.go b/cmd/podman/wait.go new file mode 100644 index 000000000..27cfecac9 --- /dev/null +++ b/cmd/podman/wait.go @@ -0,0 +1,61 @@ +package main + +import ( + "fmt" + "os" + + "github.com/pkg/errors" + "github.com/urfave/cli" +) + +var ( + waitDescription = ` + podman wait + + Block until one or more containers stop and then print their exit codes +` + + waitCommand = cli.Command{ + Name: "wait", + Usage: "Block on one or more containers", + Description: waitDescription, + Action: waitCmd, + ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", + } +) + +func waitCmd(c *cli.Context) error { + args := c.Args() + if len(args) < 1 { + return errors.Errorf("you must provide at least one container name or id") + } + + runtime, err := getRuntime(c) + if err != nil { + return errors.Wrapf(err, "error creating libpod runtime") + } + defer runtime.Shutdown(false) + + if err != nil { + return errors.Wrapf(err, "could not get config") + } + + var lastError error + for _, container := range c.Args() { + ctr, err := runtime.LookupContainer(container) + if err != nil { + return errors.Wrapf(err, "unable to find container %s", container) + } + returnCode, err := ctr.Wait() + if err != nil { + if lastError != nil { + fmt.Fprintln(os.Stderr, lastError) + } + lastError = errors.Wrapf(err, "failed to wait for the container %v", container) + } else { + fmt.Println(returnCode) + } + } + + return lastError +} diff --git a/completions/bash/kpod b/completions/bash/kpod deleted file mode 100644 index f5caeceb3..000000000 --- a/completions/bash/kpod +++ /dev/null @@ -1,1546 +0,0 @@ -#! /bin/bash - -: ${PROG:=$(basename ${BASH_SOURCE})} - -__kpod_previous_extglob_setting=$(shopt -p extglob) -shopt -s extglob - -__kpod_q() { - kpod ${host:+-H "$host"} ${config:+--config "$config"} 2>/dev/null "$@" -} - -# __kpod_containers returns a list of containers. Additional options to -# `kpod ps` may be specified in order to filter the list, e.g. -# `__kpod_containers --filter status=running` -# By default, only names are returned. -# Set KPOD_COMPLETION_SHOW_CONTAINER_IDS=yes to also complete IDs. -# An optional first option `--id|--name` may be used to limit the -# output to the IDs or names of matching items. This setting takes -# precedence over the environment setting. -__kpod_containers() { - local format - if [ "$1" = "--id" ] ; then - format='{{.ID}}' - shift - elif [ "$1" = "--name" ] ; then - format='{{.Names}}' - shift - elif [ "${KPOD_COMPLETION_SHOW_CONTAINER_IDS}" = yes ] ; then - format='{{.ID}} {{.Names}}' - else - format='{{.Names}}' - fi - __kpod_q ps --format "$format" "$@" -} - -# __kpod_complete_containers applies completion of containers based on the current -# value of `$cur` or the value of the optional first option `--cur`, if given. -# Additional filters may be appended, see `__kpod_containers`. -__kpod_complete_containers() { - local current="$cur" - if [ "$1" = "--cur" ] ; then - current="$2" - shift 2 - fi - COMPREPLY=( $(compgen -W "$(__kpod_containers "$@")" -- "$current") ) -} - -__kpod_complete_containers_all() { - __kpod_complete_containers "$@" --all -} - -__kpod_complete_containers_running() { - __kpod_complete_containers "$@" --filter status=running -} - -__kpod_complete_containers_stopped() { - __kpod_complete_containers "$@" --filter status=exited -} - -__kpod_complete_containers_unpauseable() { - __kpod_complete_containers "$@" --filter status=paused -} - -__kpod_complete_container_names() { - local containers=( $(__kpod_q ps -aq --no-trunc) ) - local names=( $(__kpod_q inspect --format '{{.Name}}' "${containers[@]}") ) - names=( "${names[@]#/}" ) # trim off the leading "/" from the container names - COMPREPLY=( $(compgen -W "${names[*]}" -- "$cur") ) -} - -__kpod_complete_container_ids() { - local containers=( $(__kpod_q ps -aq) ) - COMPREPLY=( $(compgen -W "${containers[*]}" -- "$cur") ) -} - -__kpod_images() { - local images_args="" - - case "$KPOD_COMPLETION_SHOW_IMAGE_IDS" in - all) - images_args="--no-trunc -a" - ;; - non-intermediate) - images_args="--no-trunc" - ;; - esac - - local repo_print_command - if [ "${KPOD_COMPLETION_SHOW_TAGS:-yes}" = "yes" ]; then - repo_print_command='print $1; print $1":"$2' - else - repo_print_command='print $1' - fi - - local awk_script - case "$KPOD_COMPLETION_SHOW_IMAGE_IDS" in - all|non-intermediate) - awk_script='NR>1 { print $3; if ($1 != "") { '"$repo_print_command"' } }' - ;; - none|*) - awk_script='NR>1 && $1 != "" { '"$repo_print_command"' }' - ;; - esac - - __kpod_q images $images_args | awk "$awk_script" | grep -v '$' -} - -__kpod_complete_images() { - COMPREPLY=( $(compgen -W "$(__kpod_images)" -- "$cur") ) - __ltrim_colon_completions "$cur" -} - -__kpod_complete_image_repos() { - local repos="$(__kpod_q images | awk 'NR>1 && $1 != "" { print $1 }')" - COMPREPLY=( $(compgen -W "$repos" -- "$cur") ) -} - -__kpod_complete_image_repos_and_tags() { - local reposAndTags="$(__kpod_q images | awk 'NR>1 && $1 != "" { print $1; print $1":"$2 }')" - COMPREPLY=( $(compgen -W "$reposAndTags" -- "$cur") ) - __ltrim_colon_completions "$cur" -} - -# __kpod_networks returns a list of all networks. Additional options to -# `kpod network ls` may be specified in order to filter the list, e.g. -# `__kpod_networks --filter type=custom` -# By default, only names are returned. -# Set KPOD_COMPLETION_SHOW_NETWORK_IDS=yes to also complete IDs. -# An optional first option `--id|--name` may be used to limit the -# output to the IDs or names of matching items. This setting takes -# precedence over the environment setting. -__kpod_networks() { - local format - if [ "$1" = "--id" ] ; then - format='{{.ID}}' - shift - elif [ "$1" = "--name" ] ; then - format='{{.Name}}' - shift - elif [ "${KPOD_COMPLETION_SHOW_NETWORK_IDS}" = yes ] ; then - format='{{.ID}} {{.Name}}' - else - format='{{.Name}}' - fi - __kpod_q network ls --format "$format" "$@" -} - -# __kpod_complete_networks applies completion of networks based on the current -# value of `$cur` or the value of the optional first option `--cur`, if given. -# Additional filters may be appended, see `__kpod_networks`. -__kpod_complete_networks() { - local current="$cur" - if [ "$1" = "--cur" ] ; then - current="$2" - shift 2 - fi - COMPREPLY=( $(compgen -W "$(__kpod_networks "$@")" -- "$current") ) -} - -__kpod_complete_containers_in_network() { - local containers=$(__kpod_q network inspect -f '{{range $i, $c := .Containers}}{{$i}} {{$c.Name}} {{end}}' "$1") - COMPREPLY=( $(compgen -W "$containers" -- "$cur") ) -} - -__kpod_runtimes() { - __kpod_q info | sed -n 's/^Runtimes: \(.*\)/\1/p' -} - -__kpod_complete_runtimes() { - COMPREPLY=( $(compgen -W "$(__kpod_runtimes)" -- "$cur") ) -} - -# __kpod_services returns a list of all services. Additional options to -# `kpod service ls` may be specified in order to filter the list, e.g. -# `__kpod_services --filter name=xxx` -# By default, only node names are returned. -# Set KPOD_COMPLETION_SHOW_SERVICE_IDS=yes to also complete IDs. -# An optional first option `--id|--name` may be used to limit the -# output to the IDs or names of matching items. This setting takes -# precedence over the environment setting. -__kpod_services() { - local fields='$2' # default: service name only - [ "${KPOD_COMPLETION_SHOW_SERVICE_IDS}" = yes ] && fields='$1,$2' # ID & name - - if [ "$1" = "--id" ] ; then - fields='$1' # IDs only - shift - elif [ "$1" = "--name" ] ; then - fields='$2' # names only - shift - fi - __kpod_q service ls "$@" | awk "NR>1 {print $fields}" -} - -# __kpod_complete_services applies completion of services based on the current -# value of `$cur` or the value of the optional first option `--cur`, if given. -# Additional filters may be appended, see `__kpod_services`. -__kpod_complete_services() { - local current="$cur" - if [ "$1" = "--cur" ] ; then - current="$2" - shift 2 - fi - COMPREPLY=( $(compgen -W "$(__kpod_services "$@")" -- "$current") ) -} - -# __kpod_append_to_completions appends the word passed as an argument to every -# word in `$COMPREPLY`. -# Normally you do this with `compgen -S` while generating the completions. -# This function allows you to append a suffix later. It allows you to use -# the __kpod_complete_XXX functions in cases where you need a suffix. -__kpod_append_to_completions() { - COMPREPLY=( ${COMPREPLY[@]/%/"$1"} ) -} - -# __kpod_is_experimental tests whether the currently configured Kpod daemon -# runs in experimental mode. If so, the function exits with 0 (true). -# Otherwise, or if the result cannot be determined, the exit value is 1 (false). -__kpod_is_experimental() { - [ "$(__kpod_q version -f '{{.Server.Experimental}}')" = "true" ] -} - -# __kpod_pos_first_nonflag finds the position of the first word that is neither -# option nor an option's argument. If there are options that require arguments, -# you should pass a glob describing those options, e.g. "--option1|-o|--option2" -# Use this function to restrict completions to exact positions after the argument list. -__kpod_pos_first_nonflag() { - local argument_flags=$1 - - local counter=$((${subcommand_pos:-${command_pos}} + 1)) - while [ $counter -le $cword ]; do - if [ -n "$argument_flags" ] && eval "case '${words[$counter]}' in $argument_flags) true ;; *) false ;; esac"; then - (( counter++ )) - # eat "=" in case of --option=arg syntax - [ "${words[$counter]}" = "=" ] && (( counter++ )) - else - case "${words[$counter]}" in - -*) - ;; - *) - break - ;; - esac - fi - - # Bash splits words at "=", retaining "=" as a word, examples: - # "--debug=false" => 3 words, "--log-opt syslog-facility=daemon" => 4 words - while [ "${words[$counter + 1]}" = "=" ] ; do - counter=$(( counter + 2)) - done - - (( counter++ )) - done - - echo $counter -} - -# __kpod_map_key_of_current_option returns `key` if we are currently completing the -# value of a map option (`key=value`) which matches the extglob given as an argument. -# This function is needed for key-specific completions. -__kpod_map_key_of_current_option() { - local glob="$1" - - local key glob_pos - if [ "$cur" = "=" ] ; then # key= case - key="$prev" - glob_pos=$((cword - 2)) - elif [[ $cur == *=* ]] ; then # key=value case (OSX) - key=${cur%=*} - glob_pos=$((cword - 1)) - elif [ "$prev" = "=" ] ; then - key=${words[$cword - 2]} # key=value case - glob_pos=$((cword - 3)) - else - return - fi - - [ "${words[$glob_pos]}" = "=" ] && ((glob_pos--)) # --option=key=value syntax - - [[ ${words[$glob_pos]} == @($glob) ]] && echo "$key" -} - -# __kpod_value_of_option returns the value of the first option matching `option_glob`. -# Valid values for `option_glob` are option names like `--log-level` and globs like -# `--log-level|-l` -# Only positions between the command and the current word are considered. -__kpod_value_of_option() { - local option_extglob=$(__kpod_to_extglob "$1") - - local counter=$((command_pos + 1)) - while [ $counter -lt $cword ]; do - case ${words[$counter]} in - $option_extglob ) - echo ${words[$counter + 1]} - break - ;; - esac - (( counter++ )) - done -} - -# __kpod_to_alternatives transforms a multiline list of strings into a single line -# string with the words separated by `|`. -# This is used to prepare arguments to __kpod_pos_first_nonflag(). -__kpod_to_alternatives() { - local parts=( $1 ) - local IFS='|' - echo "${parts[*]}" -} - -# __kpod_to_extglob transforms a multiline list of options into an extglob pattern -# suitable for use in case statements. -__kpod_to_extglob() { - local extglob=$( __kpod_to_alternatives "$1" ) - echo "@($extglob)" -} - -# __kpod_subcommands processes subcommands -# Locates the first occurrence of any of the subcommands contained in the -# first argument. In case of a match, calls the corresponding completion -# function and returns 0. -# If no match is found, 1 is returned. The calling function can then -# continue processing its completion. -# -# TODO if the preceding command has options that accept arguments and an -# argument is equal ot one of the subcommands, this is falsely detected as -# a match. -__kpod_subcommands() { - local subcommands="$1" - - local counter=$(($command_pos + 1)) - while [ $counter -lt $cword ]; do - case "${words[$counter]}" in - $(__kpod_to_extglob "$subcommands") ) - subcommand_pos=$counter - local subcommand=${words[$counter]} - local completions_func=_kpod_${command}_${subcommand} - declare -F $completions_func >/dev/null && $completions_func - return 0 - ;; - esac - (( counter++ )) - done - return 1 -} - -# __kpod_nospace suppresses trailing whitespace -__kpod_nospace() { - # compopt is not available in ancient bash versions - type compopt &>/dev/null && compopt -o nospace -} - -__kpod_complete_resolved_hostname() { - command -v host >/dev/null 2>&1 || return - COMPREPLY=( $(host 2>/dev/null "${cur%:}" | awk '/has address/ {print $4}') ) -} - -__kpod_local_interfaces() { - command -v ip >/dev/null 2>&1 || return - ip addr show scope global 2>/dev/null | sed -n 's| \+inet \([0-9.]\+\).* \([^ ]\+\)|\1 \2|p' -} - -__kpod_complete_local_interfaces() { - local additional_interface - if [ "$1" = "--add" ] ; then - additional_interface="$2" - fi - - COMPREPLY=( $( compgen -W "$(__kpod_local_interfaces) $additional_interface" -- "$cur" ) ) -} - -__kpod_complete_capabilities() { - # The list of capabilities is defined in types.go, ALL was added manually. - COMPREPLY=( $( compgen -W " - ALL - AUDIT_CONTROL - AUDIT_WRITE - AUDIT_READ - BLOCK_SUSPEND - CHOWN - DAC_OVERRIDE - DAC_READ_SEARCH - FOWNER - FSETID - IPC_LOCK - IPC_OWNER - KILL - LEASE - LINUX_IMMUTABLE - MAC_ADMIN - MAC_OVERRIDE - MKNOD - NET_ADMIN - NET_BIND_SERVICE - NET_BROADCAST - NET_RAW - SETFCAP - SETGID - SETPCAP - SETUID - SYS_ADMIN - SYS_BOOT - SYS_CHROOT - SYSLOG - SYS_MODULE - SYS_NICE - SYS_PACCT - SYS_PTRACE - SYS_RAWIO - SYS_RESOURCE - SYS_TIME - SYS_TTY_CONFIG - WAKE_ALARM - " -- "$cur" ) ) -} - -__kpod_complete_detach-keys() { - case "$prev" in - --detach-keys) - case "$cur" in - *,) - COMPREPLY=( $( compgen -W "${cur}ctrl-" -- "$cur" ) ) - ;; - *) - COMPREPLY=( $( compgen -W "ctrl-" -- "$cur" ) ) - ;; - esac - - __kpod_nospace - return - ;; - esac - return 1 -} - -__kpod_complete_log_drivers() { - COMPREPLY=( $( compgen -W " - awslogs - etwlogs - fluentd - gcplogs - gelf - journald - json-file - logentries - none - splunk - syslog - " -- "$cur" ) ) -} - -__kpod_complete_log_options() { - # see docs/reference/logging/index.md - local awslogs_options="awslogs-region awslogs-group awslogs-stream" - local fluentd_options="env fluentd-address fluentd-async-connect fluentd-buffer-limit fluentd-retry-wait fluentd-max-retries labels tag" - local gcplogs_options="env gcp-log-cmd gcp-project labels" - local gelf_options="env gelf-address gelf-compression-level gelf-compression-type labels tag" - local journald_options="env labels tag" - local json_file_options="env labels max-file max-size" - local logentries_options="logentries-token" - local syslog_options="env labels syslog-address syslog-facility syslog-format syslog-tls-ca-cert syslog-tls-cert syslog-tls-key syslog-tls-skip-verify tag" - local splunk_options="env labels splunk-caname splunk-capath splunk-format splunk-gzip splunk-gzip-level splunk-index splunk-insecureskipverify splunk-source splunk-sourcetype splunk-token splunk-url splunk-verify-connection tag" - - local all_options="$fluentd_options $gcplogs_options $gelf_options $journald_options $logentries_options $json_file_options $syslog_options $splunk_options" - - case $(__kpod_value_of_option --log-driver) in - '') - COMPREPLY=( $( compgen -W "$all_options" -S = -- "$cur" ) ) - ;; - awslogs) - COMPREPLY=( $( compgen -W "$awslogs_options" -S = -- "$cur" ) ) - ;; - fluentd) - COMPREPLY=( $( compgen -W "$fluentd_options" -S = -- "$cur" ) ) - ;; - gcplogs) - COMPREPLY=( $( compgen -W "$gcplogs_options" -S = -- "$cur" ) ) - ;; - gelf) - COMPREPLY=( $( compgen -W "$gelf_options" -S = -- "$cur" ) ) - ;; - journald) - COMPREPLY=( $( compgen -W "$journald_options" -S = -- "$cur" ) ) - ;; - json-file) - COMPREPLY=( $( compgen -W "$json_file_options" -S = -- "$cur" ) ) - ;; - logentries) - COMPREPLY=( $( compgen -W "$logentries_options" -S = -- "$cur" ) ) - ;; - syslog) - COMPREPLY=( $( compgen -W "$syslog_options" -S = -- "$cur" ) ) - ;; - splunk) - COMPREPLY=( $( compgen -W "$splunk_options" -S = -- "$cur" ) ) - ;; - *) - return - ;; - esac - - __kpod_nospace -} - -__kpod_complete_log_driver_options() { - local key=$(__kpod_map_key_of_current_option '--log-opt') - case "$key" in - fluentd-async-connect) - COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) ) - return - ;; - gelf-address) - COMPREPLY=( $( compgen -W "udp" -S "://" -- "${cur##*=}" ) ) - __kpod_nospace - return - ;; - gelf-compression-level) - COMPREPLY=( $( compgen -W "1 2 3 4 5 6 7 8 9" -- "${cur##*=}" ) ) - return - ;; - gelf-compression-type) - COMPREPLY=( $( compgen -W "gzip none zlib" -- "${cur##*=}" ) ) - return - ;; - syslog-address) - COMPREPLY=( $( compgen -W "tcp:// tcp+tls:// udp:// unix://" -- "${cur##*=}" ) ) - __kpod_nospace - __ltrim_colon_completions "${cur}" - return - ;; - syslog-facility) - COMPREPLY=( $( compgen -W " - auth - authpriv - cron - daemon - ftp - kern - local0 - local1 - local2 - local3 - local4 - local5 - local6 - local7 - lpr - mail - news - syslog - user - uucp - " -- "${cur##*=}" ) ) - return - ;; - syslog-format) - COMPREPLY=( $( compgen -W "rfc3164 rfc5424 rfc5424micro" -- "${cur##*=}" ) ) - return - ;; - syslog-tls-ca-cert|syslog-tls-cert|syslog-tls-key) - _filedir - return - ;; - syslog-tls-skip-verify) - COMPREPLY=( $( compgen -W "true" -- "${cur##*=}" ) ) - return - ;; - splunk-url) - COMPREPLY=( $( compgen -W "http:// https://" -- "${cur##*=}" ) ) - __kpod_nospace - __ltrim_colon_completions "${cur}" - return - ;; - splunk-gzip|splunk-insecureskipverify|splunk-verify-connection) - COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) ) - return - ;; - splunk-format) - COMPREPLY=( $( compgen -W "inline json raw" -- "${cur##*=}" ) ) - return - ;; - esac - return 1 -} - -__kpod_complete_log_levels() { - COMPREPLY=( $( compgen -W "debug info warn error fatal" -- "$cur" ) ) -} - -# __kpod_complete_signals returns a subset of the available signals that is most likely -# relevant in the context of kpod containers -__kpod_complete_signals() { - local signals=( - SIGCONT - SIGHUP - SIGINT - SIGKILL - SIGQUIT - SIGSTOP - SIGTERM - SIGUSR1 - SIGUSR2 - ) - COMPREPLY=( $( compgen -W "${signals[*]} ${signals[*]#SIG}" -- "$( echo $cur | tr '[:lower:]' '[:upper:]')" ) ) -} - -__kpod_complete_user_group() { - if [[ $cur == *:* ]] ; then - COMPREPLY=( $(compgen -g -- "${cur#*:}") ) - else - COMPREPLY=( $(compgen -u -S : -- "$cur") ) - __kpod_nospace - fi -} - -__kpod_list_images() { - COMPREPLY=($(compgen -W "$(kpod images -q)" -- $cur)) -} - -__kpod_list_containers() { - COMPREPLY=($(compgen -W "$(kpod ps -aq)" -- $cur)) -} - -__kpod_images() { - local images_args="" - - case "$KPOD_COMPLETION_SHOW_IMAGE_IDS" in - all) - images_args="--no-trunc -a" - ;; - non-intermediate) - images_args="--no-trunc" - ;; - esac - - local repo_print_command - if [ "${KPOD_COMPLETION_SHOW_TAGS:-yes}" = "yes" ]; then - repo_print_command='print $1; print $1":"$2' - else - repo_print_command='print $1' - fi - - local awk_script - case "$KPOD_COMPLETION_SHOW_IMAGE_IDS" in - all|non-intermediate) - awk_script='NR>1 { print $3; if ($1 != "") { '"$repo_print_command"' } }' - ;; - none|*) - awk_script='NR>1 && $1 != "" { '"$repo_print_command"' }' - ;; - esac - - __kpod_q images $images_args | awk "$awk_script" | grep -v '$' -} - -_kpod_attach() { - local options_with_args=" - --detach-keys - " - local boolean_options=" - --help - -h - --no-stdin" - _complete_ "$options_with_args" "$boolean_options" -} - -_kpod_diff() { - local options_with_args=" - --format - " - local boolean_options=" - " - _complete_ "$options_with_args" "$boolean_options" - - case "$cur" in - -*) - COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) - ;; - *) - __kpod_list_images - ;; - esac -} - -_kpod_exec() { - local options_with_args=" - -e - --env - --user - -u - " - local boolean_options=" - --privileged - --tty - -t - " - _complete_ "$options_with_args" "$boolean_options" - -} -_kpod_export() { - local options_with_args=" - --output - -o - " - local boolean_options=" - " - _complete_ "$options_with_args" "$boolean_options" - - case "$cur" in - -*) - COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) - ;; - *) - __kpod_list_images - ;; - esac -} - -_kpod_history() { - local options_with_args=" - --format - " - local boolean_options=" - --human -H - --no-trunc - --quiet -q - " - _complete_ "$options_with_args" "$boolean_options" - - case "$cur" in - -*) - COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) - ;; - *) - __kpod_list_images - ;; - esac -} - - -_kpod_import() { - local options_with_args=" - --change - -c - --message - -m - " - local boolean_options=" - --help - -h - " - _complete_ "$options_with_args" "$boolean_options" - - case "$cur" in - -*) - COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) - ;; - *) - __kpod_list_images - ;; - esac -} - -_kpod_info() { - local boolean_options=" - --help - -h - --debug - " - local options_with_args=" - --format - " - - local all_options="$options_with_args $boolean_options" - - case "$cur" in - -*) - COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) - ;; - *) - __kpod_list_images - ;; - esac -} - -_kpod_images() { - local boolean_options=" - --help - -h - --quiet - -q - --noheading - -n - --no-trunc - --digests - --filter - -f - " - local options_with_args=" - --format - " - - local all_options="$options_with_args $boolean_options" - - case "$cur" in - -*) - COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) - ;; - esac -} - -_kpod_inspect() { - local boolean_options=" - --help - -h - " - local options_with_args=" - --format - -f - --type - -t - --size - " - - local all_options="$options_with_args $boolean_options" - - case "$cur" in - -*) - COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) - ;; - esac -} -_kpod_kill() { - local options_with_args=" - --signal -s - " - local boolean_options=" - --help - -h" - _complete_ "$options_with_args" "$boolean_options" -} - -_kpod_logs() { - local options_with_args=" - --since - --tail - " - local boolean_options=" - --follow - -f - " - _complete_ "$options_with_args" "$boolean_options" - - case "$cur" in - -*) - COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) - ;; - *) - __kpod_list_containers - ;; - esac -} - -_kpod_pull() { - local options_with_args=" - --authfile - --creds - --cert-dir - --signature-policy - " - local boolean_options=" - --all-tags -a - --quiet - -q - --tls-verify - " - _complete_ "$options_with_args" "$boolean_options" -} - -_kpod_unmount() { - _kpod_umount $@ -} - -_kpod_umount() { - local boolean_options=" - --help - -h - " - local options_with_args=" - " - - local all_options="$options_with_args $boolean_options" - - case "$cur" in - -*) - COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) - ;; - esac -} - -_kpod_mount() { - local boolean_options=" - --help - -h - --notruncate - " - - local options_with_args=" - --label - --format - " - - local all_options="$options_with_args $boolean_options" - - case "$cur" in - -*) - COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) - ;; - esac -} - -_kpod_push() { - local boolean_options=" - --compress - --quiet - -q - --remove-signatures - --tls-verify - " - - local options_with_args=" - --authfile - --format - --cert-dir - --creds - --sign-by - --signature-policy - " - - local all_options="$options_with_args $boolean_options" - - case "$cur" in - -*) - COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) - ;; - esac -} - -_kpod_container_run() { - local options_with_args=" - --add-host - --attach -a - --blkio-weight - --blkio-weight-device - --cap-add - --cap-drop - --cgroup-parent - --cidfile - --cpu-period - --cpu-quota - --cpu-rt-period - --cpu-rt-runtime - --cpuset-cpus - --cpus - --cpuset-mems - --cpu-shares -c - --device - --device-read-bps - --device-read-iops - --device-write-bps - --device-write-iops - --dns - --dns-option - --dns-search - --entrypoint - --env -e - --env-file - --expose - --group-add - --hostname -h - --init-path - --ip - --ip6 - --ipc - --kernel-memory - --label-file - --label -l - --link-local-ip - --log-driver - --log-opt - --mac-address - --memory -m - --memory-swap - --memory-swappiness - --memory-reservation - --name - --network - --network-alias - --oom-score-adj - --pid - --pids-limit - --publish -p - --runtime - --security-opt - --shm-size - --stop-signal - --stop-timeout - --storage-opt - --tmpfs - --sysctl - --ulimit - --user -u - --userns - --uts - --volumes-from - --volume -v - --workdir -w - " - - local boolean_options=" - --disable-content-trust=false - --help - --init - --interactive -i - --oom-kill-disable - --privileged - --publish-all -P - --read-only - --tty -t - " - - if [ "$command" = "run" -o "$subcommand" = "run" ] ; then - options_with_args="$options_with_args - --detach-keys - --health-cmd - --health-interval - --health-retries - --health-timeout - " - boolean_options="$boolean_options - --detach -d - --no-healthcheck - --rm - --sig-proxy=false - " - __kpod_complete_detach-keys && return - fi - - local all_options="$options_with_args $boolean_options" - - - __kpod_complete_log_driver_options && return - - local key=$(__kpod_map_key_of_current_option '--security-opt') - case "$key" in - label) - [[ $cur == *: ]] && return - COMPREPLY=( $( compgen -W "user: role: type: level: disable" -- "${cur##*=}") ) - if [ "${COMPREPLY[*]}" != "disable" ] ; then - __kpod_nospace - fi - return - ;; - seccomp) - local cur=${cur##*=} - _filedir - COMPREPLY+=( $( compgen -W "unconfined" -- "$cur" ) ) - return - ;; - esac - - case "$prev" in - --add-host) - case "$cur" in - *:) - __kpod_complete_resolved_hostname - return - ;; - esac - ;; - --attach|-a) - COMPREPLY=( $( compgen -W 'stdin stdout stderr' -- "$cur" ) ) - return - ;; - --cap-add|--cap-drop) - __kpod_complete_capabilities - return - ;; - --cidfile|--env-file|--init-path|--label-file) - _filedir - return - ;; - --device|--tmpfs|--volume|-v) - case "$cur" in - *:*) - # TODO somehow do _filedir for stuff inside the image, if it's already specified (which is also somewhat difficult to determine) - ;; - '') - COMPREPLY=( $( compgen -W '/' -- "$cur" ) ) - __kpod_nospace - ;; - /*) - _filedir - __kpod_nospace - ;; - esac - return - ;; - --env|-e) - # we do not append a "=" here because "-e VARNAME" is legal systax, too - COMPREPLY=( $( compgen -e -- "$cur" ) ) - __kpod_nospace - return - ;; - --ipc) - case "$cur" in - *:*) - cur="${cur#*:}" - __kpod_complete_containers_running - ;; - *) - COMPREPLY=( $( compgen -W 'host container:' -- "$cur" ) ) - if [ "$COMPREPLY" = "container:" ]; then - __kpod_nospace - fi - ;; - esac - return - ;; - --log-driver) - __kpod_complete_log_drivers - return - ;; - --log-opt) - __kpod_complete_log_options - return - ;; - --network) - case "$cur" in - container:*) - __kpod_complete_containers_all --cur "${cur#*:}" - ;; - *) - COMPREPLY=( $( compgen -W "$(__kpod_plugins_bundled --type Network) $(__kpod_networks) container:" -- "$cur") ) - if [ "${COMPREPLY[*]}" = "container:" ] ; then - __kpod_nospace - fi - ;; - esac - return - ;; - --pid) - case "$cur" in - *:*) - __kpod_complete_containers_running --cur "${cur#*:}" - ;; - *) - COMPREPLY=( $( compgen -W 'host container:' -- "$cur" ) ) - if [ "$COMPREPLY" = "container:" ]; then - __kpod_nospace - fi - ;; - esac - return - ;; - --runtime) - __kpod_complete_runtimes - return - ;; - --security-opt) - COMPREPLY=( $( compgen -W "apparmor= label= no-new-privileges seccomp=" -- "$cur") ) - if [ "${COMPREPLY[*]}" != "no-new-privileges" ] ; then - __kpod_nospace - fi - return - ;; - --storage-opt) - COMPREPLY=( $( compgen -W "size" -S = -- "$cur") ) - __kpod_nospace - return - ;; - --user|-u) - __kpod_complete_user_group - return - ;; - --userns) - COMPREPLY=( $( compgen -W "host" -- "$cur" ) ) - return - ;; - --volumes-from) - __kpod_complete_containers_all - return - ;; - $(__kpod_to_extglob "$options_with_args") ) - return - ;; - esac - - case "$cur" in - -*) - COMPREPLY=( $( compgen -W "$all_options" -- "$cur" ) ) - ;; - *) - local counter=$( __kpod_pos_first_nonflag $( __kpod_to_alternatives "$options_with_args" ) ) - if [ $cword -eq $counter ]; then - __kpod_complete_images - fi - ;; - esac -} - -_kpod_create() { - _kpod_container_run -} - -_kpod_run() { - _kpod_container_run -} - -_kpod_rm() { - local boolean_options=" - --all - -a - --force - -f - " - - local options_with_args=" - " - - local all_options="$options_with_args $boolean_options" - - case "$cur" in - -*) - COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) - ;; - *) - __kpod_list_containers - ;; - esac -} - -_kpod_rmi() { - local boolean_options=" - --help - -h - --force - -f - -a - --all - " - - case "$cur" in - -*) - COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) - ;; - *) - __kpod_list_images - ;; - esac -} - -_kpod_stats() { - local boolean_options=" - --help - --all - -a - --no-stream - --format - --no-reset - " - - case "$cur" in - -*) - COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) - ;; - *) - __kpod_list_containers - ;; - esac -} - -kpod_tag() { - local options_with_args=" - " - local boolean_options=" - " - _complete_ "$options_with_args" "$boolean_options" -} - -kpod_top() { - local options_with_args=" - " - local boolean_options=" - " - _complete_ "$options_with_args" "$boolean_options" -} - -_kpod_version() { - local options_with_args=" - " - local boolean_options=" - " - _complete_ "$options_with_args" "$boolean_options" -} - -_kpod_save() { - local options_with_args=" - --output -o - --format - " - local boolean_options=" - --compress - --quiet -q - " - _complete_ "$options_with_args" "$boolean_options" -} - -_kpod_export() { - local options_with_args=" - --output -o - " - local boolean_options=" - " - _complete_ "$options_with_args" "$boolean_options" -} - -_kpod_pause() { - local options_with_args=" - --help -h - " - local boolean_options="" - _complete_ "$options_with_args" "$boolean_options" -} - -_kpod_ps() { - local options_with_args=" - --filter -f - --format - --last -n - " - local boolean_options=" - --all -a - --latest -l - --no-trunc - --quiet -q - --size -s - --namespace --ns - " - _complete_ "$options_with_args" "$boolean_options" -} - -_kpod_start() { - local options_with_args=" - --detach-keys - " - - local boolean_options=" - -h - --help - -a - --attach - -i - --interactive" - _complete_ "$options_with_args" "$boolean_options" -} -_kpod_stop() { - local options_with_args=" - --timeout -t - " - local boolean_options=" - --all - -a" - _complete_ "$options_with_args" "$boolean_options" -} - -_kpod_unpause() { - local options_with_args=" - --help -h - " - local boolean_options="" - _complete_ "$options_with_args" "$boolean_options" -} - -_kpod_wait() { - local options_with_args="" - local boolean_options="--help -h" - _complete_ "$options_with_args" "$boolean_options" -} - -_complete_() { - local options_with_args=$1 - local boolean_options="$2 -h --help" - - case "$prev" in - $options_with_args) - return - ;; - esac - - case "$cur" in - -*) - COMPREPLY=( $( compgen -W "$boolean_options $options_with_args" -- "$cur" ) ) - ;; - esac -} - -_kpod_load() { - local options_with_args=" - --input -i - --signature-policy - " - local boolean_options=" - --quiet -q - " - _complete_ "$options_with_args" "$boolean_options" -} - -_kpod_login() { - local options_with_args=" - --username - -u - --password - -p - --authfile - " - local boolean_options=" - --help - -h - " - _complete_ "$options_with_args" "$boolean_options" -} - -_kpod_logout() { - local options_with_args=" - --authfile - " - local boolean_options=" - --all - -a - --help - -h - " - _complete_ "$options_with_args" "$boolean_options" -} - -_kpod_kpod() { - local options_with_args=" - --config -c - --cpu-profile - --root - --runroot - --storage-driver - --storage-opt - --log-level - " - local boolean_options=" - --help -h - --version -v - " - commands=" - attach - create - diff - exec - export - history - images - import - info - inspect - kill - load - login - logout - logs - mount - pause - ps - pull - push - rename - rm - rmi - run - save - start - stats - stop - tag - umount - unmount - unpause - version - wait - " - - case "$prev" in - $main_options_with_args_glob ) - return - ;; - esac - - case "$cur" in - -*) - COMPREPLY=( $( compgen -W "$boolean_options $options_with_args" -- "$cur" ) ) - ;; - *) - COMPREPLY=( $( compgen -W "${commands[*]} help" -- "$cur" ) ) - ;; - esac -} - -_cli_bash_autocomplete() { - local cur opts base - - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - COMPREPLY=() - local cur prev words cword - - _get_comp_words_by_ref -n : cur prev words cword - - local command=${PROG} cpos=0 - local counter=1 - counter=1 - while [ $counter -lt $cword ]; do - case "!${words[$counter]}" in - *) - command=$(echo "${words[$counter]}" | sed 's/-/_/g') - cpos=$counter - (( cpos++ )) - break - ;; - esac - (( counter++ )) - done - - local completions_func=_kpod_${command} - declare -F $completions_func >/dev/null && $completions_func - - eval "$previous_extglob_setting" - return 0 -} - -complete -F _cli_bash_autocomplete $PROG diff --git a/completions/bash/podman b/completions/bash/podman new file mode 100644 index 000000000..9a5351ade --- /dev/null +++ b/completions/bash/podman @@ -0,0 +1,1539 @@ +#! /bin/bash + +: ${PROG:=$(basename ${BASH_SOURCE})} + +__podman_previous_extglob_setting=$(shopt -p extglob) +shopt -s extglob + +__podman_q() { + podman ${host:+-H "$host"} ${config:+--config "$config"} 2>/dev/null "$@" +} + +# __podman_containers returns a list of containers. Additional options to +# `podman ps` may be specified in order to filter the list, e.g. +# `__podman_containers --filter status=running` +# By default, only names are returned. +# Set PODMAN_COMPLETION_SHOW_CONTAINER_IDS=yes to also complete IDs. +# An optional first option `--id|--name` may be used to limit the +# output to the IDs or names of matching items. This setting takes +# precedence over the environment setting. +__podman_containers() { + local format + if [ "$1" = "--id" ] ; then + format='{{.ID}}' + shift + elif [ "$1" = "--name" ] ; then + format='{{.Names}}' + shift + elif [ "${PODMAN_COMPLETION_SHOW_CONTAINER_IDS}" = yes ] ; then + format='{{.ID}} {{.Names}}' + else + format='{{.Names}}' + fi + __podman_q ps --format "$format" "$@" +} + +# __podman_complete_containers applies completion of containers based on the current +# value of `$cur` or the value of the optional first option `--cur`, if given. +# Additional filters may be appended, see `__podman_containers`. +__podman_complete_containers() { + local current="$cur" + if [ "$1" = "--cur" ] ; then + current="$2" + shift 2 + fi + COMPREPLY=( $(compgen -W "$(__podman_containers "$@")" -- "$current") ) +} + +__podman_complete_containers_all() { + __podman_complete_containers "$@" --all +} + +__podman_complete_containers_running() { + __podman_complete_containers "$@" --filter status=running +} + +__podman_complete_containers_stopped() { + __podman_complete_containers "$@" --filter status=exited +} + +__podman_complete_containers_unpauseable() { + __podman_complete_containers "$@" --filter status=paused +} + +__podman_complete_container_names() { + local containers=( $(__podman_q ps -aq --no-trunc) ) + local names=( $(__podman_q inspect --format '{{.Name}}' "${containers[@]}") ) + names=( "${names[@]#/}" ) # trim off the leading "/" from the container names + COMPREPLY=( $(compgen -W "${names[*]}" -- "$cur") ) +} + +__podman_complete_container_ids() { + local containers=( $(__podman_q ps -aq) ) + COMPREPLY=( $(compgen -W "${containers[*]}" -- "$cur") ) +} + +__podman_images() { + local images_args="" + + case "$PODMAN_COMPLETION_SHOW_IMAGE_IDS" in + all) + images_args="--no-trunc -a" + ;; + non-intermediate) + images_args="--no-trunc" + ;; + esac + + local repo_print_command + if [ "${PODMAN_COMPLETION_SHOW_TAGS:-yes}" = "yes" ]; then + repo_print_command='print $1; print $1":"$2' + else + repo_print_command='print $1' + fi + + local awk_script + case "$PODMAN_COMPLETION_SHOW_IMAGE_IDS" in + all|non-intermediate) + awk_script='NR>1 { print $3; if ($1 != "") { '"$repo_print_command"' } }' + ;; + none|*) + awk_script='NR>1 && $1 != "" { '"$repo_print_command"' }' + ;; + esac + + __podman_q images $images_args | awk "$awk_script" | grep -v '$' +} + +__podman_complete_images() { + COMPREPLY=( $(compgen -W "$(__podman_images)" -- "$cur") ) + __ltrim_colon_completions "$cur" +} + +__podman_complete_image_repos() { + local repos="$(__podman_q images | awk 'NR>1 && $1 != "" { print $1 }')" + COMPREPLY=( $(compgen -W "$repos" -- "$cur") ) +} + +__podman_complete_image_repos_and_tags() { + local reposAndTags="$(__podman_q images | awk 'NR>1 && $1 != "" { print $1; print $1":"$2 }')" + COMPREPLY=( $(compgen -W "$reposAndTags" -- "$cur") ) + __ltrim_colon_completions "$cur" +} + +# __podman_networks returns a list of all networks. Additional options to +# `podman network ls` may be specified in order to filter the list, e.g. +# `__podman_networks --filter type=custom` +# By default, only names are returned. +# Set PODMAN_COMPLETION_SHOW_NETWORK_IDS=yes to also complete IDs. +# An optional first option `--id|--name` may be used to limit the +# output to the IDs or names of matching items. This setting takes +# precedence over the environment setting. +__podman_networks() { + local format + if [ "$1" = "--id" ] ; then + format='{{.ID}}' + shift + elif [ "$1" = "--name" ] ; then + format='{{.Name}}' + shift + elif [ "${PODMAN_COMPLETION_SHOW_NETWORK_IDS}" = yes ] ; then + format='{{.ID}} {{.Name}}' + else + format='{{.Name}}' + fi + __podman_q network ls --format "$format" "$@" +} + +# __podman_complete_networks applies completion of networks based on the current +# value of `$cur` or the value of the optional first option `--cur`, if given. +# Additional filters may be appended, see `__podman_networks`. +__podman_complete_networks() { + local current="$cur" + if [ "$1" = "--cur" ] ; then + current="$2" + shift 2 + fi + COMPREPLY=( $(compgen -W "$(__podman_networks "$@")" -- "$current") ) +} + +__podman_complete_containers_in_network() { + local containers=$(__podman_q network inspect -f '{{range $i, $c := .Containers}}{{$i}} {{$c.Name}} {{end}}' "$1") + COMPREPLY=( $(compgen -W "$containers" -- "$cur") ) +} + +__podman_runtimes() { + __podman_q info | sed -n 's/^Runtimes: \(.*\)/\1/p' +} + +__podman_complete_runtimes() { + COMPREPLY=( $(compgen -W "$(__podman_runtimes)" -- "$cur") ) +} + +# __podman_services returns a list of all services. Additional options to +# `podman service ls` may be specified in order to filter the list, e.g. +# `__podman_services --filter name=xxx` +# By default, only node names are returned. +# Set PODMAN_COMPLETION_SHOW_SERVICE_IDS=yes to also complete IDs. +# An optional first option `--id|--name` may be used to limit the +# output to the IDs or names of matching items. This setting takes +# precedence over the environment setting. +__podman_services() { + local fields='$2' # default: service name only + [ "${PODMAN_COMPLETION_SHOW_SERVICE_IDS}" = yes ] && fields='$1,$2' # ID & name + + if [ "$1" = "--id" ] ; then + fields='$1' # IDs only + shift + elif [ "$1" = "--name" ] ; then + fields='$2' # names only + shift + fi + __podman_q service ls "$@" | awk "NR>1 {print $fields}" +} + +# __podman_complete_services applies completion of services based on the current +# value of `$cur` or the value of the optional first option `--cur`, if given. +# Additional filters may be appended, see `__podman_services`. +__podman_complete_services() { + local current="$cur" + if [ "$1" = "--cur" ] ; then + current="$2" + shift 2 + fi + COMPREPLY=( $(compgen -W "$(__podman_services "$@")" -- "$current") ) +} + +# __podman_append_to_completions appends the word passed as an argument to every +# word in `$COMPREPLY`. +# Normally you do this with `compgen -S` while generating the completions. +# This function allows you to append a suffix later. It allows you to use +# the __podman_complete_XXX functions in cases where you need a suffix. +__podman_append_to_completions() { + COMPREPLY=( ${COMPREPLY[@]/%/"$1"} ) +} + +# __podman_pos_first_nonflag finds the position of the first word that is neither +# option nor an option's argument. If there are options that require arguments, +# you should pass a glob describing those options, e.g. "--option1|-o|--option2" +# Use this function to restrict completions to exact positions after the argument list. +__podman_pos_first_nonflag() { + local argument_flags=$1 + + local counter=$((${subcommand_pos:-${command_pos}} + 1)) + while [ $counter -le $cword ]; do + if [ -n "$argument_flags" ] && eval "case '${words[$counter]}' in $argument_flags) true ;; *) false ;; esac"; then + (( counter++ )) + # eat "=" in case of --option=arg syntax + [ "${words[$counter]}" = "=" ] && (( counter++ )) + else + case "${words[$counter]}" in + -*) + ;; + *) + break + ;; + esac + fi + + # Bash splits words at "=", retaining "=" as a word, examples: + # "--debug=false" => 3 words, "--log-opt syslog-facility=daemon" => 4 words + while [ "${words[$counter + 1]}" = "=" ] ; do + counter=$(( counter + 2)) + done + + (( counter++ )) + done + + echo $counter +} + +# __podman_map_key_of_current_option returns `key` if we are currently completing the +# value of a map option (`key=value`) which matches the extglob given as an argument. +# This function is needed for key-specific completions. +__podman_map_key_of_current_option() { + local glob="$1" + + local key glob_pos + if [ "$cur" = "=" ] ; then # key= case + key="$prev" + glob_pos=$((cword - 2)) + elif [[ $cur == *=* ]] ; then # key=value case (OSX) + key=${cur%=*} + glob_pos=$((cword - 1)) + elif [ "$prev" = "=" ] ; then + key=${words[$cword - 2]} # key=value case + glob_pos=$((cword - 3)) + else + return + fi + + [ "${words[$glob_pos]}" = "=" ] && ((glob_pos--)) # --option=key=value syntax + + [[ ${words[$glob_pos]} == @($glob) ]] && echo "$key" +} + +# __podman_value_of_option returns the value of the first option matching `option_glob`. +# Valid values for `option_glob` are option names like `--log-level` and globs like +# `--log-level|-l` +# Only positions between the command and the current word are considered. +__podman_value_of_option() { + local option_extglob=$(__podman_to_extglob "$1") + + local counter=$((command_pos + 1)) + while [ $counter -lt $cword ]; do + case ${words[$counter]} in + $option_extglob ) + echo ${words[$counter + 1]} + break + ;; + esac + (( counter++ )) + done +} + +# __podman_to_alternatives transforms a multiline list of strings into a single line +# string with the words separated by `|`. +# This is used to prepare arguments to __podman_pos_first_nonflag(). +__podman_to_alternatives() { + local parts=( $1 ) + local IFS='|' + echo "${parts[*]}" +} + +# __podman_to_extglob transforms a multiline list of options into an extglob pattern +# suitable for use in case statements. +__podman_to_extglob() { + local extglob=$( __podman_to_alternatives "$1" ) + echo "@($extglob)" +} + +# __podman_subcommands processes subcommands +# Locates the first occurrence of any of the subcommands contained in the +# first argument. In case of a match, calls the corresponding completion +# function and returns 0. +# If no match is found, 1 is returned. The calling function can then +# continue processing its completion. +# +# TODO if the preceding command has options that accept arguments and an +# argument is equal ot one of the subcommands, this is falsely detected as +# a match. +__podman_subcommands() { + local subcommands="$1" + + local counter=$(($command_pos + 1)) + while [ $counter -lt $cword ]; do + case "${words[$counter]}" in + $(__podman_to_extglob "$subcommands") ) + subcommand_pos=$counter + local subcommand=${words[$counter]} + local completions_func=_podman_${command}_${subcommand} + declare -F $completions_func >/dev/null && $completions_func + return 0 + ;; + esac + (( counter++ )) + done + return 1 +} + +# __podman_nospace suppresses trailing whitespace +__podman_nospace() { + # compopt is not available in ancient bash versions + type compopt &>/dev/null && compopt -o nospace +} + +__podman_complete_resolved_hostname() { + command -v host >/dev/null 2>&1 || return + COMPREPLY=( $(host 2>/dev/null "${cur%:}" | awk '/has address/ {print $4}') ) +} + +__podman_local_interfaces() { + command -v ip >/dev/null 2>&1 || return + ip addr show scope global 2>/dev/null | sed -n 's| \+inet \([0-9.]\+\).* \([^ ]\+\)|\1 \2|p' +} + +__podman_complete_local_interfaces() { + local additional_interface + if [ "$1" = "--add" ] ; then + additional_interface="$2" + fi + + COMPREPLY=( $( compgen -W "$(__podman_local_interfaces) $additional_interface" -- "$cur" ) ) +} + +__podman_complete_capabilities() { + # The list of capabilities is defined in types.go, ALL was added manually. + COMPREPLY=( $( compgen -W " + ALL + AUDIT_CONTROL + AUDIT_WRITE + AUDIT_READ + BLOCK_SUSPEND + CHOWN + DAC_OVERRIDE + DAC_READ_SEARCH + FOWNER + FSETID + IPC_LOCK + IPC_OWNER + KILL + LEASE + LINUX_IMMUTABLE + MAC_ADMIN + MAC_OVERRIDE + MKNOD + NET_ADMIN + NET_BIND_SERVICE + NET_BROADCAST + NET_RAW + SETFCAP + SETGID + SETPCAP + SETUID + SYS_ADMIN + SYS_BOOT + SYS_CHROOT + SYSLOG + SYS_MODULE + SYS_NICE + SYS_PACCT + SYS_PTRACE + SYS_RAWIO + SYS_RESOURCE + SYS_TIME + SYS_TTY_CONFIG + WAKE_ALARM + " -- "$cur" ) ) +} + +__podman_complete_detach-keys() { + case "$prev" in + --detach-keys) + case "$cur" in + *,) + COMPREPLY=( $( compgen -W "${cur}ctrl-" -- "$cur" ) ) + ;; + *) + COMPREPLY=( $( compgen -W "ctrl-" -- "$cur" ) ) + ;; + esac + + __podman_nospace + return + ;; + esac + return 1 +} + +__podman_complete_log_drivers() { + COMPREPLY=( $( compgen -W " + awslogs + etwlogs + fluentd + gcplogs + gelf + journald + json-file + logentries + none + splunk + syslog + " -- "$cur" ) ) +} + +__podman_complete_log_options() { + # see docs/reference/logging/index.md + local awslogs_options="awslogs-region awslogs-group awslogs-stream" + local fluentd_options="env fluentd-address fluentd-async-connect fluentd-buffer-limit fluentd-retry-wait fluentd-max-retries labels tag" + local gcplogs_options="env gcp-log-cmd gcp-project labels" + local gelf_options="env gelf-address gelf-compression-level gelf-compression-type labels tag" + local journald_options="env labels tag" + local json_file_options="env labels max-file max-size" + local logentries_options="logentries-token" + local syslog_options="env labels syslog-address syslog-facility syslog-format syslog-tls-ca-cert syslog-tls-cert syslog-tls-key syslog-tls-skip-verify tag" + local splunk_options="env labels splunk-caname splunk-capath splunk-format splunk-gzip splunk-gzip-level splunk-index splunk-insecureskipverify splunk-source splunk-sourcetype splunk-token splunk-url splunk-verify-connection tag" + + local all_options="$fluentd_options $gcplogs_options $gelf_options $journald_options $logentries_options $json_file_options $syslog_options $splunk_options" + + case $(__podman_value_of_option --log-driver) in + '') + COMPREPLY=( $( compgen -W "$all_options" -S = -- "$cur" ) ) + ;; + awslogs) + COMPREPLY=( $( compgen -W "$awslogs_options" -S = -- "$cur" ) ) + ;; + fluentd) + COMPREPLY=( $( compgen -W "$fluentd_options" -S = -- "$cur" ) ) + ;; + gcplogs) + COMPREPLY=( $( compgen -W "$gcplogs_options" -S = -- "$cur" ) ) + ;; + gelf) + COMPREPLY=( $( compgen -W "$gelf_options" -S = -- "$cur" ) ) + ;; + journald) + COMPREPLY=( $( compgen -W "$journald_options" -S = -- "$cur" ) ) + ;; + json-file) + COMPREPLY=( $( compgen -W "$json_file_options" -S = -- "$cur" ) ) + ;; + logentries) + COMPREPLY=( $( compgen -W "$logentries_options" -S = -- "$cur" ) ) + ;; + syslog) + COMPREPLY=( $( compgen -W "$syslog_options" -S = -- "$cur" ) ) + ;; + splunk) + COMPREPLY=( $( compgen -W "$splunk_options" -S = -- "$cur" ) ) + ;; + *) + return + ;; + esac + + __podman_nospace +} + +__podman_complete_log_driver_options() { + local key=$(__podman_map_key_of_current_option '--log-opt') + case "$key" in + fluentd-async-connect) + COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) ) + return + ;; + gelf-address) + COMPREPLY=( $( compgen -W "udp" -S "://" -- "${cur##*=}" ) ) + __podman_nospace + return + ;; + gelf-compression-level) + COMPREPLY=( $( compgen -W "1 2 3 4 5 6 7 8 9" -- "${cur##*=}" ) ) + return + ;; + gelf-compression-type) + COMPREPLY=( $( compgen -W "gzip none zlib" -- "${cur##*=}" ) ) + return + ;; + syslog-address) + COMPREPLY=( $( compgen -W "tcp:// tcp+tls:// udp:// unix://" -- "${cur##*=}" ) ) + __podman_nospace + __ltrim_colon_completions "${cur}" + return + ;; + syslog-facility) + COMPREPLY=( $( compgen -W " + auth + authpriv + cron + daemon + ftp + kern + local0 + local1 + local2 + local3 + local4 + local5 + local6 + local7 + lpr + mail + news + syslog + user + uucp + " -- "${cur##*=}" ) ) + return + ;; + syslog-format) + COMPREPLY=( $( compgen -W "rfc3164 rfc5424 rfc5424micro" -- "${cur##*=}" ) ) + return + ;; + syslog-tls-ca-cert|syslog-tls-cert|syslog-tls-key) + _filedir + return + ;; + syslog-tls-skip-verify) + COMPREPLY=( $( compgen -W "true" -- "${cur##*=}" ) ) + return + ;; + splunk-url) + COMPREPLY=( $( compgen -W "http:// https://" -- "${cur##*=}" ) ) + __podman_nospace + __ltrim_colon_completions "${cur}" + return + ;; + splunk-gzip|splunk-insecureskipverify|splunk-verify-connection) + COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) ) + return + ;; + splunk-format) + COMPREPLY=( $( compgen -W "inline json raw" -- "${cur##*=}" ) ) + return + ;; + esac + return 1 +} + +__podman_complete_log_levels() { + COMPREPLY=( $( compgen -W "debug info warn error fatal" -- "$cur" ) ) +} + +# __podman_complete_signals returns a subset of the available signals that is most likely +# relevant in the context of podman containers +__podman_complete_signals() { + local signals=( + SIGCONT + SIGHUP + SIGINT + SIGKILL + SIGQUIT + SIGSTOP + SIGTERM + SIGUSR1 + SIGUSR2 + ) + COMPREPLY=( $( compgen -W "${signals[*]} ${signals[*]#SIG}" -- "$( echo $cur | tr '[:lower:]' '[:upper:]')" ) ) +} + +__podman_complete_user_group() { + if [[ $cur == *:* ]] ; then + COMPREPLY=( $(compgen -g -- "${cur#*:}") ) + else + COMPREPLY=( $(compgen -u -S : -- "$cur") ) + __podman_nospace + fi +} + +__podman_list_images() { + COMPREPLY=($(compgen -W "$(podman images -q)" -- $cur)) +} + +__podman_list_containers() { + COMPREPLY=($(compgen -W "$(podman ps -aq)" -- $cur)) +} + +__podman_images() { + local images_args="" + + case "$PODMAN_COMPLETION_SHOW_IMAGE_IDS" in + all) + images_args="--no-trunc -a" + ;; + non-intermediate) + images_args="--no-trunc" + ;; + esac + + local repo_print_command + if [ "${PODMAN_COMPLETION_SHOW_TAGS:-yes}" = "yes" ]; then + repo_print_command='print $1; print $1":"$2' + else + repo_print_command='print $1' + fi + + local awk_script + case "$PODMAN_COMPLETION_SHOW_IMAGE_IDS" in + all|non-intermediate) + awk_script='NR>1 { print $3; if ($1 != "") { '"$repo_print_command"' } }' + ;; + none|*) + awk_script='NR>1 && $1 != "" { '"$repo_print_command"' }' + ;; + esac + + __podman_q images $images_args | awk "$awk_script" | grep -v '$' +} + +_podman_attach() { + local options_with_args=" + --detach-keys + " + local boolean_options=" + --help + -h + --no-stdin" + _complete_ "$options_with_args" "$boolean_options" +} + +_podman_diff() { + local options_with_args=" + --format + " + local boolean_options=" + " + _complete_ "$options_with_args" "$boolean_options" + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + *) + __podman_list_images + ;; + esac +} + +_podman_exec() { + local options_with_args=" + -e + --env + --user + -u + " + local boolean_options=" + --privileged + --tty + -t + " + _complete_ "$options_with_args" "$boolean_options" + +} +_podman_export() { + local options_with_args=" + --output + -o + " + local boolean_options=" + " + _complete_ "$options_with_args" "$boolean_options" + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + *) + __podman_list_images + ;; + esac +} + +_podman_history() { + local options_with_args=" + --format + " + local boolean_options=" + --human -H + --no-trunc + --quiet -q + " + _complete_ "$options_with_args" "$boolean_options" + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + *) + __podman_list_images + ;; + esac +} + + +_podman_import() { + local options_with_args=" + --change + -c + --message + -m + " + local boolean_options=" + --help + -h + " + _complete_ "$options_with_args" "$boolean_options" + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + *) + __podman_list_images + ;; + esac +} + +_podman_info() { + local boolean_options=" + --help + -h + --debug + " + local options_with_args=" + --format + " + + local all_options="$options_with_args $boolean_options" + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + *) + __podman_list_images + ;; + esac +} + +_podman_images() { + local boolean_options=" + --help + -h + --quiet + -q + --noheading + -n + --no-trunc + --digests + --filter + -f + " + local options_with_args=" + --format + " + + local all_options="$options_with_args $boolean_options" + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + esac +} + +_podman_inspect() { + local boolean_options=" + --help + -h + " + local options_with_args=" + --format + -f + --type + -t + --size + " + + local all_options="$options_with_args $boolean_options" + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + esac +} +_podman_kill() { + local options_with_args=" + --signal -s + " + local boolean_options=" + --help + -h" + _complete_ "$options_with_args" "$boolean_options" +} + +_podman_logs() { + local options_with_args=" + --since + --tail + " + local boolean_options=" + --follow + -f + " + _complete_ "$options_with_args" "$boolean_options" + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + *) + __podman_list_containers + ;; + esac +} + +_podman_pull() { + local options_with_args=" + --authfile + --creds + --cert-dir + --signature-policy + " + local boolean_options=" + --all-tags -a + --quiet + -q + --tls-verify + " + _complete_ "$options_with_args" "$boolean_options" +} + +_podman_unmount() { + _podman_umount $@ +} + +_podman_umount() { + local boolean_options=" + --help + -h + " + local options_with_args=" + " + + local all_options="$options_with_args $boolean_options" + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + esac +} + +_podman_mount() { + local boolean_options=" + --help + -h + --notruncate + " + + local options_with_args=" + --label + --format + " + + local all_options="$options_with_args $boolean_options" + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + esac +} + +_podman_push() { + local boolean_options=" + --compress + --quiet + -q + --remove-signatures + --tls-verify + " + + local options_with_args=" + --authfile + --format + --cert-dir + --creds + --sign-by + --signature-policy + " + + local all_options="$options_with_args $boolean_options" + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + esac +} + +_podman_container_run() { + local options_with_args=" + --add-host + --attach -a + --blkio-weight + --blkio-weight-device + --cap-add + --cap-drop + --cgroup-parent + --cidfile + --cpu-period + --cpu-quota + --cpu-rt-period + --cpu-rt-runtime + --cpuset-cpus + --cpus + --cpuset-mems + --cpu-shares -c + --device + --device-read-bps + --device-read-iops + --device-write-bps + --device-write-iops + --dns + --dns-option + --dns-search + --entrypoint + --env -e + --env-file + --expose + --group-add + --hostname -h + --init-path + --ip + --ip6 + --ipc + --kernel-memory + --label-file + --label -l + --link-local-ip + --log-driver + --log-opt + --mac-address + --memory -m + --memory-swap + --memory-swappiness + --memory-reservation + --name + --network + --network-alias + --oom-score-adj + --pid + --pids-limit + --publish -p + --runtime + --security-opt + --shm-size + --stop-signal + --stop-timeout + --storage-opt + --tmpfs + --sysctl + --ulimit + --user -u + --userns + --uts + --volumes-from + --volume -v + --workdir -w + " + + local boolean_options=" + --disable-content-trust=false + --help + --init + --interactive -i + --oom-kill-disable + --privileged + --publish-all -P + --read-only + --tty -t + " + + if [ "$command" = "run" -o "$subcommand" = "run" ] ; then + options_with_args="$options_with_args + --detach-keys + --health-cmd + --health-interval + --health-retries + --health-timeout + " + boolean_options="$boolean_options + --detach -d + --no-healthcheck + --rm + --sig-proxy=false + " + __podman_complete_detach-keys && return + fi + + local all_options="$options_with_args $boolean_options" + + + __podman_complete_log_driver_options && return + + local key=$(__podman_map_key_of_current_option '--security-opt') + case "$key" in + label) + [[ $cur == *: ]] && return + COMPREPLY=( $( compgen -W "user: role: type: level: disable" -- "${cur##*=}") ) + if [ "${COMPREPLY[*]}" != "disable" ] ; then + __podman_nospace + fi + return + ;; + seccomp) + local cur=${cur##*=} + _filedir + COMPREPLY+=( $( compgen -W "unconfined" -- "$cur" ) ) + return + ;; + esac + + case "$prev" in + --add-host) + case "$cur" in + *:) + __podman_complete_resolved_hostname + return + ;; + esac + ;; + --attach|-a) + COMPREPLY=( $( compgen -W 'stdin stdout stderr' -- "$cur" ) ) + return + ;; + --cap-add|--cap-drop) + __podman_complete_capabilities + return + ;; + --cidfile|--env-file|--init-path|--label-file) + _filedir + return + ;; + --device|--tmpfs|--volume|-v) + case "$cur" in + *:*) + # TODO somehow do _filedir for stuff inside the image, if it's already specified (which is also somewhat difficult to determine) + ;; + '') + COMPREPLY=( $( compgen -W '/' -- "$cur" ) ) + __podman_nospace + ;; + /*) + _filedir + __podman_nospace + ;; + esac + return + ;; + --env|-e) + # we do not append a "=" here because "-e VARNAME" is legal systax, too + COMPREPLY=( $( compgen -e -- "$cur" ) ) + __podman_nospace + return + ;; + --ipc) + case "$cur" in + *:*) + cur="${cur#*:}" + __podman_complete_containers_running + ;; + *) + COMPREPLY=( $( compgen -W 'host container:' -- "$cur" ) ) + if [ "$COMPREPLY" = "container:" ]; then + __podman_nospace + fi + ;; + esac + return + ;; + --log-driver) + __podman_complete_log_drivers + return + ;; + --log-opt) + __podman_complete_log_options + return + ;; + --network) + case "$cur" in + container:*) + __podman_complete_containers_all --cur "${cur#*:}" + ;; + *) + COMPREPLY=( $( compgen -W "$(__podman_plugins_bundled --type Network) $(__podman_networks) container:" -- "$cur") ) + if [ "${COMPREPLY[*]}" = "container:" ] ; then + __podman_nospace + fi + ;; + esac + return + ;; + --pid) + case "$cur" in + *:*) + __podman_complete_containers_running --cur "${cur#*:}" + ;; + *) + COMPREPLY=( $( compgen -W 'host container:' -- "$cur" ) ) + if [ "$COMPREPLY" = "container:" ]; then + __podman_nospace + fi + ;; + esac + return + ;; + --runtime) + __podman_complete_runtimes + return + ;; + --security-opt) + COMPREPLY=( $( compgen -W "apparmor= label= no-new-privileges seccomp=" -- "$cur") ) + if [ "${COMPREPLY[*]}" != "no-new-privileges" ] ; then + __podman_nospace + fi + return + ;; + --storage-opt) + COMPREPLY=( $( compgen -W "size" -S = -- "$cur") ) + __podman_nospace + return + ;; + --user|-u) + __podman_complete_user_group + return + ;; + --userns) + COMPREPLY=( $( compgen -W "host" -- "$cur" ) ) + return + ;; + --volumes-from) + __podman_complete_containers_all + return + ;; + $(__podman_to_extglob "$options_with_args") ) + return + ;; + esac + + case "$cur" in + -*) + COMPREPLY=( $( compgen -W "$all_options" -- "$cur" ) ) + ;; + *) + local counter=$( __podman_pos_first_nonflag $( __podman_to_alternatives "$options_with_args" ) ) + if [ $cword -eq $counter ]; then + __podman_complete_images + fi + ;; + esac +} + +_podman_create() { + _podman_container_run +} + +_podman_run() { + _podman_container_run +} + +_podman_rm() { + local boolean_options=" + --all + -a + --force + -f + " + + local options_with_args=" + " + + local all_options="$options_with_args $boolean_options" + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + *) + __podman_list_containers + ;; + esac +} + +_podman_rmi() { + local boolean_options=" + --help + -h + --force + -f + -a + --all + " + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + *) + __podman_list_images + ;; + esac +} + +_podman_stats() { + local boolean_options=" + --help + --all + -a + --no-stream + --format + --no-reset + " + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + *) + __podman_list_containers + ;; + esac +} + +podman_tag() { + local options_with_args=" + " + local boolean_options=" + " + _complete_ "$options_with_args" "$boolean_options" +} + +podman_top() { + local options_with_args=" + " + local boolean_options=" + " + _complete_ "$options_with_args" "$boolean_options" +} + +_podman_version() { + local options_with_args=" + " + local boolean_options=" + " + _complete_ "$options_with_args" "$boolean_options" +} + +_podman_save() { + local options_with_args=" + --output -o + --format + " + local boolean_options=" + --compress + --quiet -q + " + _complete_ "$options_with_args" "$boolean_options" +} + +_podman_export() { + local options_with_args=" + --output -o + " + local boolean_options=" + " + _complete_ "$options_with_args" "$boolean_options" +} + +_podman_pause() { + local options_with_args=" + --help -h + " + local boolean_options="" + _complete_ "$options_with_args" "$boolean_options" +} + +_podman_ps() { + local options_with_args=" + --filter -f + --format + --last -n + " + local boolean_options=" + --all -a + --latest -l + --no-trunc + --quiet -q + --size -s + --namespace --ns + " + _complete_ "$options_with_args" "$boolean_options" +} + +_podman_start() { + local options_with_args=" + --detach-keys + " + + local boolean_options=" + -h + --help + -a + --attach + -i + --interactive" + _complete_ "$options_with_args" "$boolean_options" +} +_podman_stop() { + local options_with_args=" + --timeout -t + " + local boolean_options=" + --all + -a" + _complete_ "$options_with_args" "$boolean_options" +} + +_podman_unpause() { + local options_with_args=" + --help -h + " + local boolean_options="" + _complete_ "$options_with_args" "$boolean_options" +} + +_podman_wait() { + local options_with_args="" + local boolean_options="--help -h" + _complete_ "$options_with_args" "$boolean_options" +} + +_complete_() { + local options_with_args=$1 + local boolean_options="$2 -h --help" + + case "$prev" in + $options_with_args) + return + ;; + esac + + case "$cur" in + -*) + COMPREPLY=( $( compgen -W "$boolean_options $options_with_args" -- "$cur" ) ) + ;; + esac +} + +_podman_load() { + local options_with_args=" + --input -i + --signature-policy + " + local boolean_options=" + --quiet -q + " + _complete_ "$options_with_args" "$boolean_options" +} + +_podman_login() { + local options_with_args=" + --username + -u + --password + -p + --authfile + " + local boolean_options=" + --help + -h + " + _complete_ "$options_with_args" "$boolean_options" +} + +_podman_logout() { + local options_with_args=" + --authfile + " + local boolean_options=" + --all + -a + --help + -h + " + _complete_ "$options_with_args" "$boolean_options" +} + +_podman_podman() { + local options_with_args=" + --config -c + --cpu-profile + --root + --runroot + --storage-driver + --storage-opt + --log-level + " + local boolean_options=" + --help -h + --version -v + " + commands=" + attach + create + diff + exec + export + history + images + import + info + inspect + kill + load + login + logout + logs + mount + pause + ps + pull + push + rename + rm + rmi + run + save + start + stats + stop + tag + umount + unmount + unpause + version + wait + " + + case "$prev" in + $main_options_with_args_glob ) + return + ;; + esac + + case "$cur" in + -*) + COMPREPLY=( $( compgen -W "$boolean_options $options_with_args" -- "$cur" ) ) + ;; + *) + COMPREPLY=( $( compgen -W "${commands[*]} help" -- "$cur" ) ) + ;; + esac +} + +_cli_bash_autocomplete() { + local cur opts base + + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + COMPREPLY=() + local cur prev words cword + + _get_comp_words_by_ref -n : cur prev words cword + + local command=${PROG} cpos=0 + local counter=1 + counter=1 + while [ $counter -lt $cword ]; do + case "!${words[$counter]}" in + *) + command=$(echo "${words[$counter]}" | sed 's/-/_/g') + cpos=$counter + (( cpos++ )) + break + ;; + esac + (( counter++ )) + done + + local completions_func=_podman_${command} + declare -F $completions_func >/dev/null && $completions_func + + eval "$previous_extglob_setting" + return 0 +} + +complete -F _cli_bash_autocomplete $PROG diff --git a/docs/kpod-attach.1.md b/docs/kpod-attach.1.md deleted file mode 100644 index 0710cd06f..000000000 --- a/docs/kpod-attach.1.md +++ /dev/null @@ -1,40 +0,0 @@ -% kpod(1) kpod-attach - See the output of pid 1 of a container or enter the container -% Dan Walsh -# kpod-attach "1" "December 2017" "kpod" - -## NAME -kpod-attach - Attach to a running container - -## SYNOPSIS -**kpod attach [OPTIONS] CONTAINER** - -## DESCRIPTION -The attach command allows you to attach to a running container using the container's ID -or name, either to view its ongoing output or to control it interactively. - -You can detach from the container (and leave it running) using a configurable key sequence. The default -sequence is CTRL-p CTRL-q. You configure the key sequence using the --detach-keys option - -## OPTIONS -**--detach-keys** -Override the key sequence for detaching a container. Format is a single character [a-Z] or -ctrl- where is one of: a-z, @, ^, [, , or _. - -**--no-stdin** -Do not attach STDIN. The default is false. - -## EXAMPLES ## - -``` -kpod attach foobar -[root@localhost /]# -``` -``` -kpod attach 1234 -[root@localhost /]# -``` -``` -kpod attach --no-stdin foobar -``` -## SEE ALSO -kpod(1), kpod-exec(1), kpod-run(1) diff --git a/docs/kpod-cp.1.md b/docs/kpod-cp.1.md deleted file mode 100644 index 1d33372b6..000000000 --- a/docs/kpod-cp.1.md +++ /dev/null @@ -1,46 +0,0 @@ -% kpod(1) kpod-cp - Copy content between container's file system and the host -% Dan Walsh -# kpod-cp "1" "August 2017" "kpod" - -## NAME -kpod-cp - Copy files/folders between a container and the local filesystem. - -## Description -We chose not to implement the `cp` feature in `kpod` even though the upstream Docker -project has it. We have a much stronger capability. Using standard kpod-mount -and kpod-umount, we can take advantage of the entire linux tool chain, rather -then just cp. - -If a user wants to copy contents out of a container or into a container, they -can execute a few simple commands. - -You can copy from the container's file system to the local machine or the -reverse, from the local filesystem to the container. - -If you want to copy the /etc/foobar directory out of a container and onto /tmp -on the host, you could execute the following commands: - - mnt=$(kpod mount CONTAINERID) - cp -R ${mnt}/etc/foobar /tmp - kpod umount CONTAINERID - -If you want to untar a tar ball into a container, you can execute these commands: - - mnt=$(kpod mount CONTAINERID) - tar xf content.tgz -C ${mnt} - kpod umount CONTAINERID - -One last example, if you want to install a package into a container that -does not have dnf installed, you could execute something like: - - mnt=$(kpod mount CONTAINERID) - dnf install --installroot=${mnt} httpd - chroot ${mnt} rm -rf /var/log/dnf /var/cache/dnf - kpod umount CONTAINERID - -This shows that using `kpod mount` and `kpod umount` you can use all of the -standard linux tools for moving files into and out of containers, not just -the cp command. - -## SEE ALSO -kpod(1), kpod-mount(1), kpod-umount(1) diff --git a/docs/kpod-create.1.md b/docs/kpod-create.1.md deleted file mode 100644 index f6a0e6722..000000000 --- a/docs/kpod-create.1.md +++ /dev/null @@ -1,566 +0,0 @@ -% kpod(1) kpod-create - Create a new container -% Dan Walsh -kpod-create - Create a new container - -# SYNOPSIS -**kpod create** [*options* [...]] IMAGE [COMMAND] [ARG...] - -# DESCRIPTION - -Creates a writeable container layer over the specified image and prepares it for -running the specified command. The container ID is then printed to STDOUT. This -is similar to **kpod run -d** except the container is never started. You can -then use the **kpod start ** command to start the container at -any point. - -The initial status of the container created with **kpod create** is 'created'. - -# OPTIONS -**--add-host**=[] - Add a custom host-to-IP mapping (host:ip) - - Add a line to /etc/hosts. The format is hostname:ip. The **--add-host** -option can be set multiple times. - -**-a**, **--attach**=[] - Attach to STDIN, STDOUT or STDERR. - - In foreground mode (the default when **-d** -is not specified), **kpod run** can start the process in the container -and attach the console to the process's standard input, output, and standard -error. It can even pretend to be a TTY (this is what most commandline -executables expect) and pass along signals. The **-a** option can be set for -each of stdin, stdout, and stderr. - -**--blkio-weight**=*0* - Block IO weight (relative weight) accepts a weight value between 10 and 1000. - -**--blkio-weight-device**=[] - Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`). - -**--cap-add**=[] - Add Linux capabilities - -**--cap-drop**=[] - Drop Linux capabilities - -**--cgroup-parent**="" - Path to cgroups under which the cgroup for the container will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist. - -**--cidfile**="" - Write the container ID to the file - -**--cpu-count**=*0* - Limit the number of CPUs available for execution by the container. - - On Windows Server containers, this is approximated as a percentage of total CPU usage. - - On Windows Server containers, the processor resource controls are mutually exclusive, the order of precedence is CPUCount first, then CPUShares, and CPUPercent last. - -**--cpu-period**=*0* - Limit the CPU CFS (Completely Fair Scheduler) period - - Limit the container's CPU usage. This flag tell the kernel to restrict the container's CPU usage to the period you specify. - -**--cpu-quota**=*0* - Limit the CPU CFS (Completely Fair Scheduler) quota - - Limit the container's CPU usage. By default, containers run with the full -CPU resource. This flag tell the kernel to restrict the container's CPU usage -to the quota you specify. - -**--cpu-rt-period**=0 - Limit the CPU real-time period in microseconds - - Limit the container's Real Time CPU usage. This flag tell the kernel to restrict the container's Real Time CPU usage to the period you specify. - -**--cpu-rt-runtime**=0 - Limit the CPU real-time runtime in microseconds - - Limit the containers Real Time CPU usage. This flag tells the kernel to limit the amount of time in a given CPU period Real Time tasks may consume. Ex: - Period of 1,000,000us and Runtime of 950,000us means that this container could consume 95% of available CPU and leave the remaining 5% to normal priority tasks. - - The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup. - -**--cpu-shares**=*0* - CPU shares (relative weight) - - By default, all containers get the same proportion of CPU cycles. This proportion -can be modified by changing the container's CPU share weighting relative -to the weighting of all other running containers. - -To modify the proportion from the default of 1024, use the **--cpu-shares** -flag to set the weighting to 2 or higher. - -The proportion will only apply when CPU-intensive processes are running. -When tasks in one container are idle, other containers can use the -left-over CPU time. The actual amount of CPU time will vary depending on -the number of containers running on the system. - -For example, consider three containers, one has a cpu-share of 1024 and -two others have a cpu-share setting of 512. When processes in all three -containers attempt to use 100% of CPU, the first container would receive -50% of the total CPU time. If you add a fourth container with a cpu-share -of 1024, the first container only gets 33% of the CPU. The remaining containers -receive 16.5%, 16.5% and 33% of the CPU. - -On a multi-core system, the shares of CPU time are distributed over all CPU -cores. Even if a container is limited to less than 100% of CPU time, it can -use 100% of each individual CPU core. - -For example, consider a system with more than three cores. If you start one -container **{C0}** with **-c=512** running one process, and another container -**{C1}** with **-c=1024** running two processes, this can result in the following -division of CPU shares: - - PID container CPU CPU share - 100 {C0} 0 100% of CPU0 - 101 {C1} 1 100% of CPU1 - 102 {C1} 2 100% of CPU2 - -**--cpus**=0.0 - Number of CPUs. The default is *0.0* which means no limit. - -**--cpuset-cpus**="" - CPUs in which to allow execution (0-3, 0,1) - -**--cpuset-mems**="" - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. - - If you have four memory nodes on your system (0-3), use `--cpuset-mems=0,1` -then processes in your container will only use memory from the first -two memory nodes. - -**-d**, **--detach**=*true*|*false* - Detached mode: run the container in the background and print the new container ID. The default is *false*. - - At any time you can run **kpod ps** in -the other shell to view a list of the running containers. You can reattach to a -detached container with **kpod attach**. If you choose to run a container in -the detached mode, then you cannot use the **-rm** option. - - When attached in the tty mode, you can detach from the container (and leave it -running) using a configurable key sequence. The default sequence is `CTRL-p CTRL-q`. -You configure the key sequence using the **--detach-keys** option or a configuration file. -See **config-json(5)** for documentation on using a configuration file. - -**--detach-keys**="" - Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. - -**--device**=[] - Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm) - -**--device-read-bps**=[] - Limit read rate (bytes per second) from a device (e.g. --device-read-bps=/dev/sda:1mb) - -**--device-read-iops**=[] - Limit read rate (IO per second) from a device (e.g. --device-read-iops=/dev/sda:1000) - -**--device-write-bps**=[] - Limit write rate (bytes per second) to a device (e.g. --device-write-bps=/dev/sda:1mb) - -**--device-write-iops**=[] - Limit write rate (IO per second) to a device (e.g. --device-write-iops=/dev/sda:1000) - -**--dns**=[] - Set custom DNS servers - - This option can be used to override the DNS -configuration passed to the container. Typically this is necessary when the -host DNS configuration is invalid for the container (e.g., 127.0.0.1). When this -is the case the **--dns** flags is necessary for every run. - -**--dns-option**=[] - Set custom DNS options - -**--dns-search**=[] - Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain) - -**--entrypoint**="" - Overwrite the default ENTRYPOINT of the image - - This option allows you to overwrite the default entrypoint of the image. - The ENTRYPOINT of an image is similar to a COMMAND -because it specifies what executable to run when the container starts, but it is -(purposely) more difficult to override. The ENTRYPOINT gives a container its -default nature or behavior, so that when you set an ENTRYPOINT you can run the -container as if it were that binary, complete with default options, and you can -pass in more options via the COMMAND. But, sometimes an operator may want to run -something else inside the container, so you can override the default ENTRYPOINT -at runtime by using a **--entrypoint** and a string to specify the new -ENTRYPOINT. - -**-e**, **--env**=[] - Set environment variables - - This option allows you to specify arbitrary -environment variables that are available for the process that will be launched -inside of the container. - -**--env-file**=[] - Read in a line delimited file of environment variables - -**--expose**=[] - Expose a port, or a range of ports (e.g. --expose=3300-3310) to set up port redirection - on the host system. - -**--group-add**=[] - Add additional groups to run as - -**--hostname**="" - Container host name - - Sets the container host name that is available inside the container. - -**--help** - Print usage statement - -**-i**, **--interactive**=*true*|*false* - Keep STDIN open even if not attached. The default is *false*. - -**--ip**="" - Sets the container's interface IPv4 address (e.g. 172.23.0.9) - - It can only be used in conjunction with **--network** for user-defined networks - -**--ip6**="" - Sets the container's interface IPv6 address (e.g. 2001:db8::1b99) - - It can only be used in conjunction with **--network** for user-defined networks - -**--ipc**="" - Default is to create a private IPC namespace (POSIX SysV IPC) for the container - 'container:': reuses another container shared memory, semaphores and message queues - 'host': use the host shared memory,semaphores and message queues inside the container. Note: the host mode gives the container full access to local shared memory and is therefore considered insecure. - -**--kernel-memory**="" - Kernel memory limit (format: `[]`, where unit = b, k, m or g) - - Constrains the kernel memory available to a container. If a limit of 0 -is specified (not using `--kernel-memory`), the container's kernel memory -is not limited. If you specify a limit, it may be rounded up to a multiple -of the operating system's page size and the value can be very large, -millions of trillions. - -**-l**, **--label**=[] - Add metadata to a container (e.g., --label com.example.key=value) - -**--label-file**=[] - Read in a line delimited file of labels - -**--link-local-ip**=[] - Add one or more link-local IPv4/IPv6 addresses to the container's interface - -**--log-driver**="*json-file*|*syslog*|*journald*|*gelf*|*fluentd*|*awslogs*|*splunk*|*etwlogs*|*gcplogs*|*none*" - Logging driver for the container. Default is defined by daemon `--log-driver` flag. - **Warning**: the `kpod logs` command works only for the `json-file` and - `journald` logging drivers. - -**--log-opt**=[] - Logging driver specific options. - -**--mac-address**="" - Container MAC address (e.g. 92:d0:c6:0a:29:33) - - Remember that the MAC address in an Ethernet network must be unique. -The IPv6 link-local address will be based on the device's MAC address -according to RFC4862. - -**-m**, **--memory**="" - Memory limit (format: [], where unit = b, k, m or g) - - Allows you to constrain the memory available to a container. If the host -supports swap memory, then the **-m** memory setting can be larger than physical -RAM. If a limit of 0 is specified (not using **-m**), the container's memory is -not limited. The actual limit may be rounded up to a multiple of the operating -system's page size (the value would be very large, that's millions of trillions). - -**--memory-reservation**="" - Memory soft limit (format: [], where unit = b, k, m or g) - - After setting memory reservation, when the system detects memory contention -or low memory, containers are forced to restrict their consumption to their -reservation. So you should always set the value below **--memory**, otherwise the -hard limit will take precedence. By default, memory reservation will be the same -as memory limit. - -**--memory-swap**="LIMIT" - A limit value equal to memory plus swap. Must be used with the **-m** -(**--memory**) flag. The swap `LIMIT` should always be larger than **-m** -(**--memory**) value. By default, the swap `LIMIT` will be set to double -the value of --memory. - - The format of `LIMIT` is `[]`. Unit can be `b` (bytes), -`k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you don't specify a -unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap. - -**--memory-swappiness**="" - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. - -**--name**="" - Assign a name to the container - - The operator can identify a container in three ways: - UUID long identifier (“f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778”) - UUID short identifier (“f78375b1c487”) - Name (“jonah”) - - kpod generates a UUID for each container, and if a name is not assigned -to the container with **--name** then the daemon will also generate a random -string name. The name is useful any place you need to identify a container. -This works for both background and foreground containers. - -**--network**="*bridge*" - Set the Network mode for the container - 'bridge': create a network stack on the default bridge - 'none': no networking - 'container:': reuse another container's network stack - 'host': use the kpod host network stack. Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure. - '|': connect to a user-defined network - -**--network-alias**=[] - Add network-scoped alias for the container - -**--oom-kill-disable**=*true*|*false* - Whether to disable OOM Killer for the container or not. - -**--oom-score-adj**="" - Tune the host's OOM preferences for containers (accepts -1000 to 1000) - -**--pid**="" - Set the PID mode for the container - Default is to create a private PID namespace for the container - 'container:': join another container's PID namespace - 'host': use the host's PID namespace for the container. Note: the host mode gives the container full access to local PID and is therefore considered insecure. - -**--pids-limit**="" - Tune the container's pids limit. Set `-1` to have unlimited pids for the container. - -**--pod**="" - Run container in an existing pod - -**--privileged**=*true*|*false* - Give extended privileges to this container. The default is *false*. - - By default, kpod containers are -“unprivileged” (=false) and cannot, for example, modify parts of the kernel. -This is because by default a container is not allowed to access any devices. -A “privileged” container is given access to all devices. - - When the operator executes **kpod run --privileged**, kpod enables access -to all devices on the host as well as set turn off most of the security messurs -protecting the host from the container. - -**-p**, **--publish**=[] - Publish a container's port, or range of ports, to the host - - Format: `ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort` -Both hostPort and containerPort can be specified as a range of ports. -When specifying ranges for both, the number of container ports in the range must match the number of host ports in the range. -(e.g., `kpod run -p 1234-1236:1222-1224 --name thisWorks -t busybox` -but not `kpod run -p 1230-1236:1230-1240 --name RangeContainerPortsBiggerThanRangeHostPorts -t busybox`) -With ip: `kpod run -p 127.0.0.1:$HOSTPORT:$CONTAINERPORT --name CONTAINER -t someimage` -Use `kpod port` to see the actual mapping: `kpod port CONTAINER $CONTAINERPORT` - -**-P**, **--publish-all**=*true*|*false* - Publish all exposed ports to random ports on the host interfaces. The default is *false*. - - When set to true publish all exposed ports to the host interfaces. The -default is false. If the operator uses -P (or -p) then kpod will make the -exposed port accessible on the host and the ports will be available to any -client that can reach the host. When using -P, kpod will bind any exposed -port to a random port on the host within an *ephemeral port range* defined by -`/proc/sys/net/ipv4/ip_local_port_range`. To find the mapping between the host -ports and the exposed ports, use `kpod port`. - -**--read-only**=*true*|*false* - Mount the container's root filesystem as read only. - - By default a container will have its root filesystem writable allowing processes -to write files anywhere. By specifying the `--read-only` flag the container will have -its root filesystem mounted as read only prohibiting any writes. - -**--rm**=*true*|*false* - Automatically remove the container when it exits. The default is *false*. - `--rm` flag can work together with `-d`, and auto-removal will be done on daemon side. Note that it's -incompatible with any restart policy other than `none`. - -**--security-opt**=[] - Security Options - - - "label=user:USER" : Set the label user for the container - "label=role:ROLE" : Set the label role for the container - "label=type:TYPE" : Set the label type for the container - "label=level:LEVEL" : Set the label level for the container - "label=disable" : Turn off label confinement for the container - "no-new-privileges" : Disable container processes from gaining additional privileges - - "seccomp=unconfined" : Turn off seccomp confinement for the container - "seccomp=profile.json : White listed syscalls seccomp Json file to be used as a seccomp filter - - "apparmor=unconfined" : Turn off apparmor confinement for the container - "apparmor=your-profile" : Set the apparmor confinement profile for the container - -**--shm-size**="" - Size of `/dev/shm`. The format is ``. `number` must be greater than `0`. - Unit is optional and can be `b` (bytes), `k` (kilobytes), `m`(megabytes), or `g` (gigabytes). - If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses `64m`. - -**--sig-proxy**=*true*|*false* - Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied. The default is *true*. - -**--stop-signal**=*SIGTERM* - Signal to stop a container. Default is SIGTERM. - -**--stop-timeout**=*10* - Timeout (in seconds) to stop a container. Default is 10. - -**--storage-opt**=[] - Storage driver options per container - - $ kpod create -it --storage-opt size=120G fedora /bin/bash - - This (size) will allow to set the container rootfs size to 120G at creation time. - This option is only available for the `devicemapper`, `btrfs`, `overlay2` and `zfs` graph drivers. - For the `devicemapper`, `btrfs` and `zfs` storage drivers, user cannot pass a size less than the Default BaseFS Size. - For the `overlay2` storage driver, the size option is only available if the backing fs is `xfs` and mounted with the `pquota` mount option. - Under these conditions, user can pass any size less then the backing fs size. - -**--sysctl**=SYSCTL - Configure namespaced kernel parameters at runtime - - IPC Namespace - current sysctls allowed: - - kernel.msgmax, kernel.msgmnb, kernel.msgmni, kernel.sem, kernel.shmall, kernel.shmmax, kernel.shmmni, kernel.shm_rmid_forced - Sysctls beginning with fs.mqueue.* - - Note: if you use the --ipc=host option these sysctls will not be allowed. - - Network Namespace - current sysctls allowed: - Sysctls beginning with net.* - - Note: if you use the --network=host option these sysctls will not be allowed. - -**--tmpfs**=[] Create a tmpfs mount - - Mount a temporary filesystem (`tmpfs`) mount into a container, for example: - - $ kpod run -d --tmpfs /tmp:rw,size=787448k,mode=1777 my_image - - This command mounts a `tmpfs` at `/tmp` within the container. The supported mount -options are the same as the Linux default `mount` flags. If you do not specify -any options, the systems uses the following options: -`rw,noexec,nosuid,nodev,size=65536k`. - -**-t**, **--tty**=*true*|*false* - Allocate a pseudo-TTY. The default is *false*. - - When set to true kpod will allocate a pseudo-tty and attach to the standard -input of the container. This can be used, for example, to run a throwaway -interactive shell. The default is false. - -Note: The **-t** option is incompatible with a redirection of the kpod client -standard input. - -**--ulimit**=[] - Ulimit options - -**-u**, **--user**="" - Sets the username or UID used and optionally the groupname or GID for the specified command. - - The followings examples are all valid: - --user [user | user:group | uid | uid:gid | user:gid | uid:group ] - - Without this argument the command will be run as root in the container. - -**--userns**="" - Set the usernamespace mode for the container when `userns-remap` option is enabled. - **host**: use the host usernamespace and enable all privileged options (e.g., `pid=host` or `--privileged`). - -**--uts**=*host* - Set the UTS mode for the container - **host**: use the host's UTS namespace inside the container. - Note: the host mode gives the container access to changing the host's hostname and is therefore considered insecure. - -**-v**|**--volume**[=*[HOST-DIR:CONTAINER-DIR[:OPTIONS]]*] - Create a bind mount. If you specify, ` -v /HOST-DIR:/CONTAINER-DIR`, kpod - bind mounts `/HOST-DIR` in the host to `/CONTAINER-DIR` in the kpod - container. The `OPTIONS` are a comma delimited list and can be: - - * [rw|ro] - * [z|Z] - * [`[r]shared`|`[r]slave`|`[r]private`] - -The `CONTAINER-DIR` must be an absolute path such as `/src/docs`. The `HOST-DIR` -must be an absolute path as well. kpod bind-mounts the `HOST-DIR` to the -path you specify. For example, if you supply the `/foo` value, kpod creates a bind-mount. - -You can specify multiple **-v** options to mount one or more mounts to a -container. - -You can add `:ro` or `:rw` suffix to a volume to mount it read-only or -read-write mode, respectively. By default, the volumes are mounted read-write. -See examples. - -Labeling systems like SELinux require that proper labels are placed on volume -content mounted into a container. Without a label, the security system might -prevent the processes running inside the container from using the content. By -default, kpod does not change the labels set by the OS. - -To change a label in the container context, you can add either of two suffixes -`:z` or `:Z` to the volume mount. These suffixes tell kpod to relabel file -objects on the shared volumes. The `z` option tells kpod that two containers -share the volume content. As a result, kpod labels the content with a shared -content label. Shared volume labels allow all containers to read/write content. -The `Z` option tells kpod to label the content with a private unshared label. -Only the current container can use a private volume. - -By default bind mounted volumes are `private`. That means any mounts done -inside container will not be visible on host and vice-a-versa. One can change -this behavior by specifying a volume mount propagation property. Making a -volume `shared` mounts done under that volume inside container will be -visible on host and vice-a-versa. Making a volume `slave` enables only one -way mount propagation and that is mounts done on host under that volume -will be visible inside container but not the other way around. - -To control mount propagation property of volume one can use `:[r]shared`, -`:[r]slave` or `:[r]private` propagation flag. Propagation property can -be specified only for bind mounted volumes and not for internal volumes or -named volumes. For mount propagation to work source mount point (mount point -where source dir is mounted on) has to have right propagation properties. For -shared volumes, source mount point has to be shared. And for slave volumes, -source mount has to be either shared or slave. - -Use `df ` to figure out the source mount and then use -`findmnt -o TARGET,PROPAGATION ` to figure out propagation -properties of source mount. If `findmnt` utility is not available, then one -can look at mount entry for source mount point in `/proc/self/mountinfo`. Look -at `optional fields` and see if any propagaion properties are specified. -`shared:X` means mount is `shared`, `master:X` means mount is `slave` and if -nothing is there that means mount is `private`. - -To change propagation properties of a mount point use `mount` command. For -example, if one wants to bind mount source directory `/foo` one can do -`mount --bind /foo /foo` and `mount --make-private --make-shared /foo`. This -will convert /foo into a `shared` mount point. Alternatively one can directly -change propagation properties of source mount. Say `/` is source mount for -`/foo`, then use `mount --make-shared /` to convert `/` into a `shared` mount. - -To disable automatic copying of data from the container path to the volume, use -the `nocopy` flag. The `nocopy` flag can be set on bind mounts and named volumes. - -**-w**, **--workdir**="" - Working directory inside the container - - The default working directory for running binaries within a container is the root directory (/). -The image developer can set a different default with the WORKDIR instruction. The operator -can override the working directory by using the **-w** option. - -# EXAMPLES - -# HISTORY -August 2014, updated by Sven Dowideit -September 2014, updated by Sven Dowideit -November 2014, updated by Sven Dowideit -October 2017, converted from Docker documentation to kpod by Dan Walsh for kpod diff --git a/docs/kpod-diff.1.md b/docs/kpod-diff.1.md deleted file mode 100644 index 1916780c8..000000000 --- a/docs/kpod-diff.1.md +++ /dev/null @@ -1,45 +0,0 @@ -% kpod(1) kpod-diff - Inspect changes on a container or image's filesystem -% Dan Walsh -# kpod-diff "1" "August 2017" "kpod" - -## NAME -kpod diff - Inspect changes on a container or image's filesystem - -## SYNOPSIS -**kpod** **diff** [*options* [...]] NAME - -## DESCRIPTION -Displays changes on a container or image's filesystem. The container or image will be compared to its parent layer - -## OPTIONS - -**--format** - -Alter the output into a different format. The only valid format for diff is `json`. - - -## EXAMPLE - -kpod diff redis:alpine -C /usr -C /usr/local -C /usr/local/bin -A /usr/local/bin/docker-entrypoint.sh - -kpod diff --format json redis:alpine -{ - "changed": [ - "/usr", - "/usr/local", - "/usr/local/bin" - ], - "added": [ - "/usr/local/bin/docker-entrypoint.sh" - ] -} - -## SEE ALSO -kpod(1) - -## HISTORY -August 2017, Originally compiled by Ryan Cole diff --git a/docs/kpod-exec.1.md b/docs/kpod-exec.1.md deleted file mode 100644 index 1de5da39b..000000000 --- a/docs/kpod-exec.1.md +++ /dev/null @@ -1,43 +0,0 @@ -% kpod(1) kpod-exec - Execute a command in a running container -% Brent Baude -# kpod-exec "1" "December 2017" "kpod" - -## NAME -kpod-exec - Execute a command in a running container - -## SYNOPSIS -**kpod exec** -**CONTAINER** -[COMMAND] [ARG...] -[**--help**|**-h**] - -## DESCRIPTION -**kpod exec** executes a command in a running container. - -## OPTIONS -**--env, e** -You may specify arbitrary environment variables that are available for the -command to be executed. - -**--interactive, -i** -Not supported. All exec commands are interactive by default. - -**--privileged** -Give the process extended Linux capabilities when running the command in container. - -**--tty, -t** -Allocate a pseudo-TTY. - -**--user, -u** -Sets the username or UID used and optionally the groupname or GID for the specified command. -The following examples are all valid: ---user [user | user:group | uid | uid:gid | user:gid | uid:group ] - -## EXAMPLES - - -## SEE ALSO -kpod(1), kpod-run(1) - -## HISTORY -December 2017, Originally compiled by Brent Baude diff --git a/docs/kpod-export.1.md b/docs/kpod-export.1.md deleted file mode 100644 index c344f1367..000000000 --- a/docs/kpod-export.1.md +++ /dev/null @@ -1,44 +0,0 @@ -% kpod(1) kpod-export - Simple tool to export a container's filesystem as a tarball -% Urvashi Mohnani -# kpod-export "1" "July 2017" "kpod" - -## NAME -kpod-export - Export container's filesystem contents as a tar archive - -## SYNOPSIS -**kpod export** -**CONTAINER** -[**--output**|**-o**] -[**--help**|**-h**] - -## DESCRIPTION -**kpod export** exports the filesystem of a container and saves it as a tarball -on the local machine. **kpod export** writes to STDOUT by default and can be -redirected to a file using the **output flag**. - -**kpod [GLOBAL OPTIONS]** - -**kpod export [GLOBAL OPTIONS]** - -**kpod export [OPTIONS] CONTAINER** - -## OPTIONS - -**--output, -o** -Write to a file, default is STDOUT - -## EXAMPLES - -``` -# kpod export -o redis-container.tar 883504668ec465463bc0fe7e63d53154ac3b696ea8d7b233748918664ea90e57 -``` - -``` -# kpod export > redis-container.tar 883504668ec465463bc0fe7e63d53154ac3b696ea8d7b233748918664ea90e57 -``` - -## SEE ALSO -kpod(1), kpod-import(1), crio(8), crio.conf(5) - -## HISTORY -August 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/kpod-history.1.md b/docs/kpod-history.1.md deleted file mode 100644 index bc8f1699d..000000000 --- a/docs/kpod-history.1.md +++ /dev/null @@ -1,106 +0,0 @@ -% kpod(1) kpod-history - Simple tool to view the history of an image -% Urvashi Mohnani -% kpod-history "1" "JULY 2017" "kpod" - -## NAME -kpod-history - Shows the history of an image - -## SYNOPSIS -**kpod history** -**IMAGE[:TAG|DIGEST]** -[**--human**|**-H**] -[**--no-trunc**] -[**--quiet**|**-q**] -[**--format**] -[**--help**|**-h**] - -## DESCRIPTION -**kpod history** displays the history of an image by printing out information -about each layer used in the image. The information printed out for each layer -include Created (time and date), Created By, Size, and Comment. The output can -be truncated or not using the **--no-trunc** flag. If the **--human** flag is -set, the time of creation and size are printed out in a human readable format. -The **--quiet** flag displays the ID of the image only when set and the **--format** -flag is used to print the information using the Go template provided by the user. - -Valid placeholders for the Go template are listed below: - -| **Placeholder** | **Description** | -| --------------- | ----------------------------------------------------------------------------- | -| .ID | Image ID | -| .Created | if **--human**, time elapsed since creation, otherwise time stamp of creation | -| .CreatedBy | Command used to create the layer | -| .Size | Size of layer on disk | -| .Comment | Comment for the layer | - -**kpod [GLOBAL OPTIONS]** - -**kpod history [GLOBAL OPTIONS]** - -**kpod history [OPTIONS] IMAGE[:TAG|DIGEST]** - -## OPTIONS - -**--human, -H** - Display sizes and dates in human readable format - -**--no-trunc** - Do not truncate the output - -**--quiet, -q** - Print the numeric IDs only - -**--format** - Alter the output for a format like 'json' or a Go template. - - -## EXAMPLES - -``` -# kpod history debian -ID CREATED CREATED BY SIZE COMMENT -b676ca55e4f2c 9 weeks ago /bin/sh -c #(nop) CMD ["bash"] 0 B - 9 weeks ago /bin/sh -c #(nop) ADD file:ebba725fb97cea4... 45.14 MB -``` - -``` -# kpod history --no-trunc=true --human=false debian -ID CREATED CREATED BY SIZE COMMENT -b676ca55e4f2c 2017-07-24T16:52:55Z /bin/sh -c #(nop) CMD ["bash"] 0 - 2017-07-24T16:52:54Z /bin/sh -c #(nop) ADD file:ebba725fb97cea4... 45142935 -``` - -``` -# kpod history --format "{{.ID}} {{.Created}}" debian -b676ca55e4f2c 9 weeks ago - 9 weeks ago -``` - -``` -# kpod history --format json debian -[ - { - "id": "b676ca55e4f2c0ce53d0636438c5372d3efeb5ae99b676fa5a5d1581bad46060", - "created": "2017-07-24T16:52:55.195062314Z", - "createdBy": "/bin/sh -c #(nop) CMD [\"bash\"]", - "size": 0, - "comment": "" - }, - { - "id": "b676ca55e4f2c0ce53d0636438c5372d3efeb5ae99b676fa5a5d1581bad46060", - "created": "2017-07-24T16:52:54.898893387Z", - "createdBy": "/bin/sh -c #(nop) ADD file:ebba725fb97cea45d0b1b35ccc8144e766fcfc9a78530465c23b0c4674b14042 in / ", - "size": 45142935, - "comment": "" - } -] -``` - -## history -Show the history of an image - -## SEE ALSO -kpod(1), crio(8), crio.conf(5) - -## HISTORY -July 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/kpod-images.1.md b/docs/kpod-images.1.md deleted file mode 100644 index b852e047b..000000000 --- a/docs/kpod-images.1.md +++ /dev/null @@ -1,125 +0,0 @@ -% kpod(1) kpod-images - List images in local storage -% Dan Walsh -# kpod-images "1" "March 2017" "kpod" - -## NAME -kpod images - List images in local storage - -## SYNOPSIS -**kpod** **images** [*options* [...]] - -## DESCRIPTION -Displays locally stored images, their names, and their IDs. - -## OPTIONS - -**--digests** - -Show image digests - -**--filter, -f=[]** - -Filter output based on conditions provided (default []) - -**--format** - -Change the default output format. This can be of a supported type like 'json' -or a Go template. - -**--noheading, -n** - -Omit the table headings from the listing of images. - -**--no-trunc, --notruncate** - -Do not truncate output. - -**--quiet, -q** - -Lists only the image IDs. - - -## EXAMPLE - -``` -# kpod images -REPOSITORY TAG IMAGE ID CREATED SIZE -docker.io/kubernetes/pause latest e3d42bcaf643 3 years ago 251kB - ebb91b73692b 4 weeks ago 27.2MB -docker.io/library/ubuntu latest 4526339ae51c 6 weeks ago 126MB -``` - -``` -# kpod images --quiet -e3d42bcaf643 -ebb91b73692b -4526339ae51c -``` - -``` -# kpod images --noheading -docker.io/kubernetes/pause latest e3d42bcaf643 3 years ago 251kB - ebb91b73692b 4 weeks ago 27.2MB -docker.io/library/ubuntu latest 4526339ae51c 6 weeks ago 126MB -``` - -``` -# kpod images --no-trunc -REPOSITORY TAG IMAGE ID CREATED SIZE -docker.io/kubernetes/pause latest sha256:e3d42bcaf643097dd1bb0385658ae8cbe100a80f773555c44690d22c25d16b27 3 years ago 251kB - sha256:ebb91b73692bd27890685846412ae338d13552165eacf7fcd5f139bfa9c2d6d9 4 weeks ago 27.2MB -docker.io/library/ubuntu latest sha256:4526339ae51c3cdc97956a7a961c193c39dfc6bd9733b0d762a36c6881b5583a 6 weeks ago 126MB -``` - -``` -# kpod images --format "table {{.ID}} {{.Repository}} {{.Tag}}" -IMAGE ID REPOSITORY TAG -e3d42bcaf643 docker.io/kubernetes/pause latest -ebb91b73692b -4526339ae51c docker.io/library/ubuntu latest -``` - -``` -# kpod images --filter dangling=true -REPOSITORY TAG IMAGE ID CREATED SIZE - ebb91b73692b 4 weeks ago 27.2MB -``` - -``` -# kpod images --format json -[ - { - "id": "e3d42bcaf643097dd1bb0385658ae8cbe100a80f773555c44690d22c25d16b27", - "names": [ - "docker.io/kubernetes/pause:latest" - ], - "digest": "sha256:0aecf73ff86844324847883f2e916d3f6984c5fae3c2f23e91d66f549fe7d423", - "created": "2014-07-19T07:02:32.267701596Z", - "size": 250665 - }, - { - "id": "ebb91b73692bd27890685846412ae338d13552165eacf7fcd5f139bfa9c2d6d9", - "names": [ - "\u003cnone\u003e" - ], - "digest": "sha256:ba7e4091d27e8114a205003ca6a768905c3395d961624a2c78873d9526461032", - "created": "2017-10-26T03:07:22.796184288Z", - "size": 27170520 - }, - { - "id": "4526339ae51c3cdc97956a7a961c193c39dfc6bd9733b0d762a36c6881b5583a", - "names": [ - "docker.io/library/ubuntu:latest" - ], - "digest": "sha256:193f7734ddd68e0fb24ba9af8c2b673aecb0227b026871f8e932dab45add7753", - "created": "2017-10-10T20:59:05.10196344Z", - "size": 126085200 - } -] -``` - -## SEE ALSO -kpod(1) - -## HISTORY -March 2017, Originally compiled by Dan Walsh diff --git a/docs/kpod-import.1.md b/docs/kpod-import.1.md deleted file mode 100644 index cfcfb6fb2..000000000 --- a/docs/kpod-import.1.md +++ /dev/null @@ -1,88 +0,0 @@ -% kpod(1) kpod-import - Simple tool to import a tarball as an image -% Urvashi Mohnani -# kpod-import "1" "November 2017" "kpod" - -## NAME -kpod-import - import a tarball and save it as a filesystem image - -## SYNOPSIS -**kpod import** -**TARBALL** -[**--change**|**-c**] -[**--message**|**-m**] -[**--help**|**-h**] - -## DESCRIPTION -**kpod import** imports a tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) -and saves it as a filesystem image. Remote tarballs can be specified using a URL. -Various image instructions can be configured with the **--change** flag and -a commit message can be set using the **--message** flag. - -**kpod [GLOBAL OPTIONS]** - -**kpod import [GLOBAL OPTIONS]** - -**kpod import [OPTIONS] CONTAINER** - -## OPTIONS - -**--change, -c** -Apply the following possible instructions to the created image: -**CMD** | **ENTRYPOINT** | **ENV** | **EXPOSE** | **LABEL** | **STOPSIGNAL** | **USER** | **VOLUME** | **WORKDIR** -Can be set multiple times - -**--message, -m** -Set commit message for imported image - -## EXAMPLES - -``` -# kpod import --change CMD=/bin/bash --change ENTRYPOINT=/bin/sh --change LABEL=blue=image ctr.tar image-imported -Getting image source signatures -Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86 - 25.80 MB / 25.80 MB [======================================================] 0s -Copying config sha256:c16a6d30f3782288ec4e7521c754acc29d37155629cb39149756f486dae2d4cd - 448 B / 448 B [============================================================] 0s -Writing manifest to image destination -Storing signatures -``` - -``` -# cat ctr.tar | kpod import --message "importing the ctr.tar tarball" - image-imported -Getting image source signatures -Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86 - 25.80 MB / 25.80 MB [======================================================] 0s -Copying config sha256:af376cdda5c0ac1d9592bf56567253d203f8de6a8edf356c683a645d75221540 - 376 B / 376 B [============================================================] 0s -Writing manifest to image destination -Storing signatures -``` - -``` -# cat ctr.tar | kpod import - -Getting image source signatures -Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86 - 25.80 MB / 25.80 MB [======================================================] 0s -Copying config sha256:d61387b4d5edf65edee5353e2340783703074ffeaaac529cde97a8357eea7645 - 378 B / 378 B [============================================================] 0s -Writing manifest to image destination -Storing signatures -``` - -``` -kpod import http://example.com/ctr.tar url-image -Downloading from "http://example.com/ctr.tar" -Getting image source signatures -Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86 - 25.80 MB / 25.80 MB [======================================================] 0s -Copying config sha256:5813fe8a3b18696089fd09957a12e88bda43dc1745b5240879ffffe93240d29a - 419 B / 419 B [============================================================] 0s -Writing manifest to image destination -Storing signatures -``` - -## SEE ALSO -kpod(1), kpod-export(1), crio(8), crio.conf(5) - -## HISTORY -November 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/kpod-info.1.md b/docs/kpod-info.1.md deleted file mode 100644 index 99deae9b1..000000000 --- a/docs/kpod-info.1.md +++ /dev/null @@ -1,36 +0,0 @@ -% kpod(1) kpod-version - Simple tool to view version information -% Vincent Batts -% kpod-version "1" "JULY 2017" "kpod" - -## NAME -kpod-info - Display system information - - -## SYNOPSIS -**kpod** **info** [*options* [...]] - - -## DESCRIPTION - -Information display here pertain to the host, current storage stats, and build of kpod. Useful for the user and when reporting issues. - - -## OPTIONS - -**--debug, -D** - -Show additional information - -**--format** - -Change output format to "json" or a Go template. - - -## EXAMPLE - -`kpod info` - -`kpod info --debug --format json| jq .host.kernel` - -## SEE ALSO -crio(8), crio.conf(5) diff --git a/docs/kpod-inspect.1.md b/docs/kpod-inspect.1.md deleted file mode 100644 index d3927cd37..000000000 --- a/docs/kpod-inspect.1.md +++ /dev/null @@ -1,82 +0,0 @@ -% kpod(1) kpod-inspect - Display a container or image's configuration -% Dan Walsh -# kpod-inspect "1" "July 2017" "kpod" - -## NAME -kpod inspect - Display a container or image's configuration - -## SYNOPSIS -**kpod** **inspect** [*options* [...]] name - -## DESCRIPTION -This displays the low-level information on containers and images identified by name or ID. By default, this will render all results in a JSON array. If the container and image have the same name, this will return container JSON for unspecified type. If a format is specified, the given template will be executed for each result. - -## OPTIONS - -**--type, t="TYPE"** - -Return data on items of the specified type. Type can be 'container', 'image' or 'all' (default: all) - -**--format, -f="FORMAT"** - -Format the output using the given Go template - -**--size** - -Display the total file size if the type is a container - - -## EXAMPLE - -``` -# kpod inspect fedora -{ - "Id": "422dc563ca3260ad9ef5c47a1c246f5065d7f177ce51f4dd208efd82967ff182", - "Digest": "sha256:1b9bfb4e634dc1e5c19d0fa1eb2e5a28a5c2b498e3d3e4ac742bd7f5dae08611", - "RepoTags": [ - "docker.io/library/fedora:latest" - ], - "RepoDigests": [ - "docker.io/library/fedora@sha256:1b9bfb4e634dc1e5c19d0fa1eb2e5a28a5c2b498e3d3e4ac742bd7f5dae08611" - ], - "Parent": "", - "Comment": "", - "Created": "2017-11-14T21:07:08.475840838Z", - "Config": { - "Env": [ - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", - "DISTTAG=f27container", - "FGC=f27", - "FBR=f27" - ] - }, - "Version": "17.06.2-ce", - "Author": "[Adam Miller \u003cmaxamillion@fedoraproject.org\u003e] [Patrick Uiterwijk \u003cpatrick@puiterwijk.org\u003e]", - "Architecture": "amd64", - "Os": "linux", - "Size": 251722732, - "VirtualSize": 514895140, - "GraphDriver": { - "Name": "overlay", - "Data": { - "MergedDir": "/var/lib/containers/storage/overlay/d32459d9ce237564fb93573b85cbc707600d43fbe5e46e8eeef22cad914bb516/merged", - "UpperDir": "/var/lib/containers/storage/overlay/d32459d9ce237564fb93573b85cbc707600d43fbe5e46e8eeef22cad914bb516/diff", - "WorkDir": "/var/lib/containers/storage/overlay/d32459d9ce237564fb93573b85cbc707600d43fbe5e46e8eeef22cad914bb516/work" - } - }, - "RootFS": { - "Type": "layers", - "Layers": [ - "sha256:d32459d9ce237564fb93573b85cbc707600d43fbe5e46e8eeef22cad914bb516" - ] - }, - "Labels": null, - "Annotations": {} -} -``` - -## SEE ALSO -kpod(1) - -## HISTORY -July 2017, Originally compiled by Dan Walsh diff --git a/docs/kpod-kill.1.md b/docs/kpod-kill.1.md deleted file mode 100644 index 91247d282..000000000 --- a/docs/kpod-kill.1.md +++ /dev/null @@ -1,33 +0,0 @@ -% kpod(1) kpod-kill- Kill one or more containers with a signal -% Brent Baude -# kpod-kill"1" "September 2017" "kpod" - -## NAME -kpod kill - Kills one or more containers with a signal - -## SYNOPSIS -**kpod kill [OPTIONS] CONTAINER [...]** - -## DESCRIPTION -The main process inside each container specified will be sent SIGKILL, or any signal specified with option --signal. - -## OPTIONS - -**--signal, s** - -Signal to send to the container. For more information on Linux signals, refer to *man signal(7)*. - - -## EXAMPLE - -kpod kill mywebserver - -kpod kill 860a4b23 - -kpod kill --signal TERM 860a4b23 - -## SEE ALSO -kpod(1), kpod-stop(1) - -## HISTORY -September 2017, Originally compiled by Brent Baude diff --git a/docs/kpod-load.1.md b/docs/kpod-load.1.md deleted file mode 100644 index bb13b5f02..000000000 --- a/docs/kpod-load.1.md +++ /dev/null @@ -1,78 +0,0 @@ -% kpod(1) kpod-load - Simple tool to load an image from an archive to containers-storage -% Urvashi Mohnani -# kpod-load "1" "July 2017" "kpod" - -## NAME -kpod-load - Load an image from docker archive - -## SYNOPSIS -**kpod load** -**NAME[:TAG|@DIGEST]** -[**--input**|**-i**] -[**--quiet**|**-q**] -[**--help**|**-h**] - -## DESCRIPTION -**kpod load** copies an image from either **docker-archive** or **oci-archive** stored -on the local machine. **kpod load** reads from stdin by default or a file if the **input** flag is set. -The **quiet** flag suppresses the output when set. - -**kpod [GLOBAL OPTIONS]** - -**kpod load [GLOBAL OPTIONS]** - -**kpod load [OPTIONS] NAME[:TAG|@DIGEST]** - -## OPTIONS - -**--input, -i** -Read from archive file, default is STDIN - -**--quiet, -q** -Suppress the output - -**--signature-policy="PATHNAME"** - -Pathname of a signature policy file to use. It is not recommended that this -option be used, as the default behavior of using the system-wide default policy -(frequently */etc/containers/policy.json*) is most often preferred - -## EXAMPLES - -``` -# kpod load --quiet -i fedora.tar -``` - -``` -# kpod load -q --signature-policy /etc/containers/policy.json -i fedora.tar -``` - -``` -# kpod load < fedora.tar -Getting image source signatures -Copying blob sha256:5bef08742407efd622d243692b79ba0055383bbce12900324f75e56f589aedb0 - 0 B / 4.03 MB [---------------------------------------------------------------] -Copying config sha256:7328f6f8b41890597575cbaadc884e7386ae0acc53b747401ebce5cf0d624560 - 0 B / 1.48 KB [---------------------------------------------------------------] -Writing manifest to image destination -Storing signatures -Loaded image: registry.fedoraproject.org/fedora:latest -``` - -``` -# cat fedora.tar | kpod load -Getting image source signatures -Copying blob sha256:5bef08742407efd622d243692b79ba0055383bbce12900324f75e56f589aedb0 - 0 B / 4.03 MB [---------------------------------------------------------------] -Copying config sha256:7328f6f8b41890597575cbaadc884e7386ae0acc53b747401ebce5cf0d624560 - 0 B / 1.48 KB [---------------------------------------------------------------] -Writing manifest to image destination -Storing signatures -Loaded image: registry.fedoraproject.org/fedora:latest -``` - -## SEE ALSO -kpod(1), kpod-save(1), crio(8), crio.conf(5) - -## HISTORY -July 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/kpod-login.1.md b/docs/kpod-login.1.md deleted file mode 100644 index 05b3097c8..000000000 --- a/docs/kpod-login.1.md +++ /dev/null @@ -1,65 +0,0 @@ -% kpod(1) kpod-login - Simple tool to login to a registry server -% Urvashi Mohnani -# kpod-login "1" "August 2017" "kpod" - -## NAME -kpod-login - Login to a container registry - -## SYNOPSIS -**kpod login** -[**--help**|**-h**] -[**--authfile**] -[**--user**|**-u**] -[**--password**|**-p**] -**REGISTRY** - -## DESCRIPTION -**kpod login** logs into a specified registry server with the correct username -and password. **kpod login** reads in the username and password from STDIN. -The username and password can also be set using the **username** and **password** flags. -The path of the authentication file can be specified by the user by setting the **authfile** -flag. The default path used is **${XDG\_RUNTIME_DIR}/containers/auth.json**. - -**kpod [GLOBAL OPTIONS]** - -**kpod login [GLOBAL OPTIONS]** - -**kpod login [OPTIONS] REGISTRY [GLOBAL OPTIONS]** - -## OPTIONS - -**--password, -p** -Password for registry - -**--username, -u** -Username for registry - -**--authfile** -Path of the authentication file. Default is ${XDG_\RUNTIME\_DIR}/containers/auth.json - -## EXAMPLES - -``` -# kpod login docker.io -Username: umohnani -Password: -Login Succeeded! -``` - -``` -# kpod login -u testuser -p testpassword localhost:5000 -Login Succeeded! -``` - -``` -# kpod login --authfile authdir/myauths.json docker.io -Username: umohnani -Password: -Login Succeeded! -``` - -## SEE ALSO -kpod(1), kpod-logout(1), crio(8), crio.conf(5) - -## HISTORY -August 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/kpod-logout.1.md b/docs/kpod-logout.1.md deleted file mode 100644 index 5f119a18a..000000000 --- a/docs/kpod-logout.1.md +++ /dev/null @@ -1,56 +0,0 @@ -% kpod(1) kpod-logout - Simple tool to logout of a registry server -% Urvashi Mohnani -# kpod-logout "1" "August 2017" "kpod" - -## NAME -kpod-logout - Logout of a container registry - -## SYNOPSIS -**kpod logout** -[**--help**|**-h**] -[**--authfile**] -[**--all**|**-a**] -**REGISTRY** - -## DESCRIPTION -**kpod logout** logs out of a specified registry server by deleting the cached credentials -stored in the **auth.json** file. The path of the authentication file can be overrriden by the user by setting the **authfile** flag. -The default path used is **${XDG\_RUNTIME_DIR}/containers/auth.json**. -All the cached credentials can be removed by setting the **all** flag. - -**kpod [GLOBAL OPTIONS]** - -**kpod logout [GLOBAL OPTIONS]** - -**kpod logout [OPTIONS] REGISTRY [GLOBAL OPTIONS]** - -## OPTIONS - -**--authfile** -Path of the authentication file. Default is ${XDG_\RUNTIME\_DIR}/containers/auth.json - -**--all, -a** -Remove the cached credentials for all registries in the auth file - -## EXAMPLES - -``` -# kpod logout docker.io -Remove login credentials for https://registry-1.docker.io/v2/ -``` - -``` -# kpod logout --authfile authdir/myauths.json docker.io -Remove login credentials for https://registry-1.docker.io/v2/ -``` - -``` -# kpod logout --all -Remove login credentials for all registries -``` - -## SEE ALSO -kpod(1), kpod-login(1), crio(8), crio.conf(5) - -## HISTORY -August 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/kpod-logs.1.md b/docs/kpod-logs.1.md deleted file mode 100644 index 25d108edd..000000000 --- a/docs/kpod-logs.1.md +++ /dev/null @@ -1,61 +0,0 @@ -% kpod(1) kpod-logs - Fetch the logs of a container -% Ryan Cole -# kpod-logs "1" "March 2017" "kpod" - -## NAME -kpod logs - Fetch the logs of a container - -## SYNOPSIS -**kpod** **logs** [*options* [...]] container - -## DESCRIPTION -The kpod logs command batch-retrieves whatever logs are present for a container at the time of execution. This does not guarantee execution order when combined with kpod run (i.e. your run may not have generated any logs at the time you execute kpod logs - -## OPTIONS - -**--follow, -f** - -Follow log output. Default is false - -**--since=TIMESTAMP** - -Show logs since TIMESTAMP - -**--tail=LINES** - -Ouput the specified number of LINES at the end of the logs. LINES must be a positive integer. Defaults to 0, which prints all lines - -## EXAMPLE - -kpod logs b3f2436bdb978c1d33b1387afb5d7ba7e3243ed2ce908db431ac0069da86cb45 - -2017/08/07 10:16:21 Seeked /var/log/crio/pods/eb296bd56fab164d4d3cc46e5776b54414af3bf543d138746b25832c816b933b/c49f49788da14f776b7aa93fb97a2a71f9912f4e5a3e30397fca7dfe0ee0367b.log - &{Offset:0 Whence:0} -1:C 07 Aug 14:10:09.055 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo -1:C 07 Aug 14:10:09.055 # Redis version=4.0.1, bits=64, commit=00000000, modified=0, pid=1, just started -1:C 07 Aug 14:10:09.055 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf -1:M 07 Aug 14:10:09.055 # You requested maxclients of 10000 requiring at least 10032 max file descriptors. -1:M 07 Aug 14:10:09.055 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted. -1:M 07 Aug 14:10:09.055 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'. -1:M 07 Aug 14:10:09.056 * Running mode=standalone, port=6379. -1:M 07 Aug 14:10:09.056 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. -1:M 07 Aug 14:10:09.056 # Server initialized - - -kpod logs --tail 2 b3f2436bdb97 - -1:M 07 Aug 14:10:09.056 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. -1:M 07 Aug 14:10:09.056 # Server initialized - -kpod logs 224c375f27cd --since 2017-08-07T10:10:09.055837383-04:00 myserver - -1:M 07 Aug 14:10:09.055 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted. -1:M 07 Aug 14:10:09.055 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'. -1:M 07 Aug 14:10:09.056 * Running mode=standalone, port=6379. -1:M 07 Aug 14:10:09.056 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. -1:M 07 Aug 14:10:09.056 # Server initialized - -## SEE ALSO -kpod(1) - -## HISTORY -August 2017, Originally compiled by Ryan Cole diff --git a/docs/kpod-mount.1.md b/docs/kpod-mount.1.md deleted file mode 100644 index 25ccd937a..000000000 --- a/docs/kpod-mount.1.md +++ /dev/null @@ -1,50 +0,0 @@ -% kpod(1) kpod-mount - Mount a working container's root filesystem. -% Dan Walsh -# kpod-mount "1" "July 2017" "kpod" - -## NAME -kpod mount - Mount a working container's root filesystem - -## SYNOPSIS -**kpod** **mount** - -**kpod** **mount** **containerID** - -## DESCRIPTION -Mounts the specified container's root file system in a location which can be -accessed from the host, and returns its location. - -If you execute the command without any arguments, the tool will list all of the -currently mounted containers. - -## RETURN VALUE -The location of the mounted file system. On error an empty string and errno is -returned. - -## OPTIONS - -**--format** - Print the mounted containers in specified format (json) - -**--notruncate** - -Do not truncate IDs in output. - -**--label** - -SELinux label for the mount point - -## EXAMPLE - -kpod mount c831414b10a3 - -/var/lib/containers/storage/overlay/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged - -kpod mount - -c831414b10a3 /var/lib/containers/storage/overlay/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged - -a7060253093b /var/lib/containers/storage/overlay/0ff7d7ca68bed1ace424f9df154d2dd7b5a125c19d887f17653cbcd5b6e30ba1/merged - -## SEE ALSO -kpod(1), kpod-umount(1), mount(8) diff --git a/docs/kpod-pause.1.md b/docs/kpod-pause.1.md deleted file mode 100644 index 4a1eee92e..000000000 --- a/docs/kpod-pause.1.md +++ /dev/null @@ -1,24 +0,0 @@ -% kpod(1) kpod-pause - Pause one or more containers -% Dan Walsh -# kpod-pause "1" "September 2017" "kpod" - -## NAME -kpod pause - Pause one or more containers - -## SYNOPSIS -**kpod pause [OPTIONS] CONTAINER [...]** - -## DESCRIPTION -Pauses all the processes in one or more containers. You may use container IDs or names as input. - -## EXAMPLE - -kpod pause mywebserver - -kpod pause 860a4b23 - -## SEE ALSO -kpod(1), kpod-unpause(1) - -## HISTORY -September 2017, Originally compiled by Dan Walsh diff --git a/docs/kpod-ps.1.md b/docs/kpod-ps.1.md deleted file mode 100644 index e42855311..000000000 --- a/docs/kpod-ps.1.md +++ /dev/null @@ -1,131 +0,0 @@ -% kpod(1) kpod-ps - Simple tool to list containers -% Urvashi Mohnani -% kpod-ps "1" "AUGUST 2017" "kpod" - -## NAME -kpod-ps - Prints out information about containers - -## SYNOPSIS -**kpod ps** -[**--all**|**-a**] -[**--no-trunc**] -[**--quiet**|**-q**] -[**--fromat**] -[**--help**|**-h**] - -## DESCRIPTION -**kpod ps** lists the running containers on the system. Use the **--all** flag to view -all the containers information. By default it lists: - - * container id - * the name of the image the container is using - * the COMMAND the container is executing - * the time the container was created - * the status of the container - * port mappings the container is using - * alternative names for the container - -**kpod [GLOBAL OPTIONS]** - -**kpod ps [GLOBAL OPTIONS]** - -**kpod ps [OPTIONS]** - -## OPTIONS - -**--all, -a** - Show all the containers, default is only running containers - -**--no-trunc** - Display the extended information - -**--quiet, -q** - Print the numeric IDs of the containers only - -**--format** - Pretty-print containers to JSON or using a Go template - -Valid placeholders for the Go template are listed below: - -| **Placeholder** | **Description** | -| --------------- | ------------------------------------------------ | -| .ID | Container ID | -| .Image | Image ID/Name | -| .Command | Quoted command used | -| .CreatedAt | Creation time for container | -| .RunningFor | Time elapsed since container was started | -| .Status | Status of container | -| .Ports | Exposed ports | -| .Size | Size of container | -| .Names | Name of container | -| .Labels | All the labels assigned to the container | -| .Mounts | Volumes mounted in the container | - - -**--size, -s** - Display the total file size - -**--last, -n** - Print the n last created containers (all states) - -**--latest, -l** - show the latest container created (all states) - -**--namespace, --ns** - Display namespace information - -**--filter, -f** - Filter output based on conditions given - -Valid filters are listed below: - -| **Filter** | **Description** | -| --------------- | ------------------------------------------------------------------- | -| id | [ID] Container's ID | -| name | [Name] Container's name | -| label | [Key] or [Key=Value] Label assigned to a container | -| exited | [Int] Container's exit code | -| status | [Status] Container's status, e.g *running*, *stopped* | -| ancestor | [ImageName] Image or descendant used to create container | -| before | [ID] or [Name] Containers created before this container | -| since | [ID] or [Name] Containers created since this container | -| volume | [VolumeName] or [MountpointDestination] Volume mounted in container | - -## EXAMPLES - -``` -sudo kpod ps -a -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -02f65160e14ca redis:alpine "redis-server" 19 hours ago Exited (-1) 19 hours ago 6379/tcp k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0 -69ed779d8ef9f redis:alpine "redis-server" 25 hours ago Created 6379/tcp k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1 -``` - -``` -sudo kpod ps -a -s -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE -02f65160e14ca redis:alpine "redis-server" 20 hours ago Exited (-1) 20 hours ago 6379/tcp k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0 27.49 MB -69ed779d8ef9f redis:alpine "redis-server" 25 hours ago Created 6379/tcp k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1 27.49 MB -``` - -``` -sudo kpod ps -a --format "{{.ID}} {{.Image}} {{.Labels}} {{.Mounts}}" -02f65160e14ca redis:alpine tier=backend proc,tmpfs,devpts,shm,mqueue,sysfs,cgroup,/var/run/,/var/run/ -69ed779d8ef9f redis:alpine batch=no,type=small proc,tmpfs,devpts,shm,mqueue,sysfs,cgroup,/var/run/,/var/run/ -``` - -``` -sudo kpod ps --ns -a -CONTAINER ID NAMES PID CGROUP IPC MNT NET PIDNS USER UTS -3557d882a82e3 k8s_container2_podsandbox1_redhat.test.crio_redhat-test-crio_1 29910 4026531835 4026532585 4026532593 4026532508 4026532595 4026531837 4026532594 -09564cdae0bec k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1 29851 4026531835 4026532585 4026532590 4026532508 4026532592 4026531837 4026532591 -a31ebbee9cee7 k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0 29717 4026531835 4026532585 4026532587 4026532508 4026532589 4026531837 4026532588 -``` - -## ps -Print a list of containers - -## SEE ALSO -kpod(1), crio(8), crio.conf(5) - -## HISTORY -August 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/kpod-pull.1.md b/docs/kpod-pull.1.md deleted file mode 100644 index f9933b6c6..000000000 --- a/docs/kpod-pull.1.md +++ /dev/null @@ -1,136 +0,0 @@ -% kpod(1) kpod-pull - Simple tool to pull an image from a registry -% Urvashi Mohnani -# kpod-pull "1" "July 2017" "kpod" - -## NAME -kpod-pull - Pull an image from a registry - -## SYNOPSIS -**kpod pull** -**NAME[:TAG|@DIGEST]** -[**--help**|**-h**] - -## DESCRIPTION -Copies an image from a registry onto the local machine. **kpod pull** pulls an -image from Docker Hub if a registry is not specified in the command line argument. -If an image tag is not specified, **kpod pull** defaults to the image with the -**latest** tag (if it exists) and pulls it. **kpod pull** can also pull an image -using its digest **kpod pull [image]@[digest]**. **kpod pull** can be used to pull -images from archives and local storage using different transports. - -## imageID -Image stored in local container/storage - -## SOURCE - - The SOURCE is a location to get container images - The Image "SOURCE" uses a "transport":"details" format. - - Multiple transports are supported: - - **dir:**_path_ - An existing local directory _path_ storing the manifest, layer tarballs and signatures as individual files. This is a non-standardized format, primarily useful for debugging or noninvasive container inspection. - - **docker://**_docker-reference_ - An image in a registry implementing the "Docker Registry HTTP API V2". By default, uses the authorization state in `$XDG_RUNTIME_DIR/containers/auth.json`, which is set using `(kpod login)`. If the authorization state is not found there, `$HOME/.docker/config.json` is checked, which is set using `(docker login)`. - - **docker-archive:**_path_[**:**_docker-reference_] - An image is stored in the `docker save` formatted file. _docker-reference_ is only used when creating such a file, and it must not contain a digest. - - **docker-daemon:**_docker-reference_ - An image _docker-reference_ stored in the docker daemon internal storage. _docker-reference_ must contain either a tag or a digest. Alternatively, when reading images, the format can also be docker-daemon:algo:digest (an image ID). - - **oci-archive:**_path_**:**_tag_ - An image _tag_ in a directory compliant with "Open Container Image Layout Specification" at _path_. - - **ostree:**_image_[**@**_/absolute/repo/path_] - An image in local OSTree repository. _/absolute/repo/path_ defaults to _/ostree/repo_. - -**kpod [GLOBAL OPTIONS]** - -**kpod pull [GLOBAL OPTIONS]** - -**kpod pull NAME[:TAG|@DIGEST]** - -## OPTIONS - -**--authfile** - -Path of the authentication file. Default is ${XDG_RUNTIME\_DIR}/containers/auth.json, which is set using `kpod login`. -If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`. - -**--cert-dir** - -Pathname of a directory containing TLS certificates and keys - -**--creds** - -Credentials (USERNAME:PASSWORD) to use for authenticating to a registry - -**--quiet, -q** - -Suppress output information when pulling images - -**--signature-policy="PATHNAME"** - -Pathname of a signature policy file to use. It is not recommended that this -option be used, as the default behavior of using the system-wide default policy -(frequently */etc/containers/policy.json*) is most often preferred - -**--tls-verify** - -Require HTTPS and verify certificates when contacting registries (default: true) - -## EXAMPLES - -``` -# kpod pull --signature-policy /etc/containers/policy.json alpine:latest -Trying to pull registry.access.redhat.com/alpine:latest... Failed -Trying to pull registry.fedoraproject.org/alpine:latest... Failed -Trying to pull docker.io/library/alpine:latest...Getting image source signatures -Copying blob sha256:88286f41530e93dffd4b964e1db22ce4939fffa4a4c665dab8591fbab03d4926 - 1.90 MB / 1.90 MB [========================================================] 0s -Copying config sha256:76da55c8019d7a47c347c0dceb7a6591144d232a7dd616242a367b8bed18ecbc - 1.48 KB / 1.48 KB [========================================================] 0s -Writing manifest to image destination -Storing signatures -``` - -``` -# kpod pull --authfile temp-auths/myauths.json docker://docker.io/umohnani/finaltest -Trying to pull docker.io/umohnani/finaltest:latest...Getting image source signatures -Copying blob sha256:6d987f6f42797d81a318c40d442369ba3dc124883a0964d40b0c8f4f7561d913 - 1.90 MB / 1.90 MB [========================================================] 0s -Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156 - 1.41 KB / 1.41 KB [========================================================] 0s -Writing manifest to image destination -Storing signatures -``` - -``` -# kpod pull --creds testuser:testpassword docker.io/umohnani/finaltest -Trying to pull docker.io/umohnani/finaltest:latest...Getting image source signatures -Copying blob sha256:6d987f6f42797d81a318c40d442369ba3dc124883a0964d40b0c8f4f7561d913 - 1.90 MB / 1.90 MB [========================================================] 0s -Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156 - 1.41 KB / 1.41 KB [========================================================] 0s -Writing manifest to image destination -Storing signatures -``` - -``` -# kpod pull --tls-verify=false --cert-dir image/certs docker.io/umohnani/finaltest -Trying to pull docker.io/umohnani/finaltest:latest...Getting image source signatures -Copying blob sha256:6d987f6f42797d81a318c40d442369ba3dc124883a0964d40b0c8f4f7561d913 - 1.90 MB / 1.90 MB [========================================================] 0s -Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156 - 1.41 KB / 1.41 KB [========================================================] 0s -Writing manifest to image destination -Storing signatures -``` - -## SEE ALSO -kpod(1), kpod-push(1), crio(8), crio.conf(5), docker-login(1) - -## HISTORY -July 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/kpod-push.1.md b/docs/kpod-push.1.md deleted file mode 100644 index 211a5f517..000000000 --- a/docs/kpod-push.1.md +++ /dev/null @@ -1,141 +0,0 @@ -% kpod(1) kpod-push - Push an image from local storage to elsewhere -% Dan Walsh -# kpod-push "1" "June 2017" "kpod" - -## NAME -kpod push - Push an image from local storage to elsewhere - -## SYNOPSIS -**kpod** **push** [*options* [...]] **imageID** [**destination**] - -## DESCRIPTION -Pushes an image from local storage to a specified destination. -Push is mainly used to push images to registries, however **kpod push** -can be used to save images to tarballs and directories using the following -transports: **dir:**, **docker-archive:**, **docker-daemon:**, **oci-archive:**, and **ostree:**. - -## imageID -Image stored in local container/storage - -## DESTINATION - - The DESTINATION is a location to store container images - The Image "DESTINATION" uses a "transport":"details" format. - If a transport is not given, kpod push will attempt to push - to a registry. - - Multiple transports are supported: - - **dir:**_path_ - An existing local directory _path_ storing the manifest, layer tarballs and signatures as individual files. This is a non-standardized format, primarily useful for debugging or noninvasive container inspection. - - **docker://**_docker-reference_ - An image in a registry implementing the "Docker Registry HTTP API V2". By default, uses the authorization state in `$XDG_RUNTIME_DIR/containers/auth.json`, which is set using `(kpod login)`. If the authorization state is not found there, `$HOME/.docker/config.json` is checked, which is set using `(docker login)`. - - **docker-archive:**_path_[**:**_docker-reference_] - An image is stored in the `docker save` formatted file. _docker-reference_ is only used when creating such a file, and it must not contain a digest. - - **docker-daemon:**_docker-reference_ - An image _docker-reference_ stored in the docker daemon internal storage. _docker-reference_ must contain either a tag or a digest. Alternatively, when reading images, the format can also be docker-daemon:algo:digest (an image ID). - - **oci-archive:**_path_**:**_tag_ - An image _tag_ in a directory compliant with "Open Container Image Layout Specification" at _path_. - - **ostree:**_image_[**@**_/absolute/repo/path_] - An image in local OSTree repository. _/absolute/repo/path_ defaults to _/ostree/repo_. - -## OPTIONS - -**--authfile** - -Path of the authentication file. Default is ${XDG_RUNTIME\_DIR}/containers/auth.json, which is set using `kpod login`. -If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`. - -**--creds="CREDENTIALS"** - -Credentials (USERNAME:PASSWORD) to use for authenticating to a registry - -**cert-dir="PATHNAME"** - -Pathname of a directory containing TLS certificates and keys - -**--compress** - -Compress tarball image layers when pushing to a directory using the 'dir' transport. (default is same compression type, compressed or uncompressed, as source) -Note: This flag can only be set when using the **dir** transport - -**--format, -f** - -Manifest Type (oci, v2s1, or v2s2) to use when pushing an image to a directory using the 'dir:' transport (default is manifest type of source) -Note: This flag can only be set when using the **dir** transport - -**--quiet, -q** - -When writing the output image, suppress progress output - -**--remove-signatures** - -Discard any pre-existing signatures in the image - -**--signature-policy="PATHNAME"** - -Pathname of a signature policy file to use. It is not recommended that this -option be used, as the default behavior of using the system-wide default policy -(frequently */etc/containers/policy.json*) is most often preferred - -**--sign-by="KEY"** - -Add a signature at the destination using the specified key - -**--tls-verify** - -Require HTTPS and verify certificates when contacting registries (default: true) - -## EXAMPLE - -This example extracts the imageID image to a local directory in docker format. - - `# kpod push imageID dir:/path/to/image` - -This example extracts the imageID image to a local directory in oci format. - - `# kpod push imageID oci-archive:/path/to/layout:image:tag` - -This example extracts the imageID image to a container registry named registry.example.com - - `# kpod push imageID docker://registry.example.com/repository:tag` - -This example extracts the imageID image and puts into the local docker container store - - `# kpod push imageID docker-daemon:image:tag` - -This example pushes the alpine image to umohnani/alpine on dockerhub and reads the creds from -the path given to --authfile - -``` -# kpod push --authfile temp-auths/myauths.json alpine docker://docker.io/umohnani/alpine -Getting image source signatures -Copying blob sha256:5bef08742407efd622d243692b79ba0055383bbce12900324f75e56f589aedb0 - 4.03 MB / 4.03 MB [========================================================] 1s -Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156 - 1.41 KB / 1.41 KB [========================================================] 1s -Writing manifest to image destination -Storing signatures -``` - -This example pushes the rhel7 image to rhel7-dir with the "oci" manifest type -``` -# kpod push --format oci registry.access.redhat.com/rhel7 dir:rhel7-dir -Getting image source signatures -Copying blob sha256:9cadd93b16ff2a0c51ac967ea2abfadfac50cfa3af8b5bf983d89b8f8647f3e4 - 71.41 MB / 71.41 MB [======================================================] 9s -Copying blob sha256:4aa565ad8b7a87248163ce7dba1dd3894821aac97e846b932ff6b8ef9a8a508a - 1.21 KB / 1.21 KB [========================================================] 0s -Copying config sha256:f1b09a81455c351eaa484b61aacd048ab613c08e4c5d1da80c4c46301b03cf3b - 3.01 KB / 3.01 KB [========================================================] 0s -Writing manifest to image destination -Storing signatures -``` - -## SEE ALSO -kpod(1), kpod-pull(1), crio(8), crio.conf(5), docker-login(1) diff --git a/docs/kpod-rm.1.md b/docs/kpod-rm.1.md deleted file mode 100644 index 77753f1fe..000000000 --- a/docs/kpod-rm.1.md +++ /dev/null @@ -1,38 +0,0 @@ -% kpod(1) kpod-rm - Remove one or more containers -% Ryan Cole -# kpod-rm "1" "August 2017" "kpod" - -## NAME -kpod rm - Remove one or more containers - -## SYNOPSIS -**kpod** **rm** [*options* [...]] container - -## DESCRIPTION -kpod rm will remove one or more containers from the host. The container name or ID can be used. This does not remove images. Running containers will not be removed without the -f option - -## OPTIONS - -**--force, f** - -Force the removal of a running container - -**--all, a** - -Remove all containers. Can be used in conjunction with -f as well. - -## EXAMPLE - -kpod rm mywebserver - -kpod rm mywebserver myflaskserver 860a4b23 - -kpod rm -f 860a4b23 - -kpod rm -f -a - -## SEE ALSO -kpod(1), kpod-rmi(1) - -## HISTORY -August 2017, Originally compiled by Ryan Cole diff --git a/docs/kpod-rmi.1.md b/docs/kpod-rmi.1.md deleted file mode 100644 index 2674c7ac2..000000000 --- a/docs/kpod-rmi.1.md +++ /dev/null @@ -1,37 +0,0 @@ -% kpod(1) kpod-rmi - Removes one or more images -% Dan Walsh -# kpod-rmi "1" "March 2017" "kpod" - -## NAME -kpod rmi - Removes one or more images - -## SYNOPSIS -**kpod** **rmi** **imageID [...]** - -## DESCRIPTION -Removes one or more locally stored images. - -## OPTIONS - -**-all**, **-a** - -Remove all of the locally storage images -**--force, -f** - -Executing this command will stop all containers that are using the image and remove them from the system - -## EXAMPLE - -kpod rmi imageID - -kpod rmi --force imageID - -kpod rmi imageID1 imageID2 imageID3 - -kpod rmi -a -f - -## SEE ALSO -kpod(1) - -## HISTORY -March 2017, Originally compiled by Dan Walsh diff --git a/docs/kpod-run.1.md b/docs/kpod-run.1.md deleted file mode 100644 index 478afe408..000000000 --- a/docs/kpod-run.1.md +++ /dev/null @@ -1,799 +0,0 @@ -% kpod(1) kpod-run - Run a command in a container -% Dan Walsh -kpod-run - Run a command in a new container - -# SYNOPSIS -**kpod run** [*options* [...]] IMAGE [COMMAND] [ARG...] - -# DESCRIPTION - -Run a process in a new container. **kpod run** starts a process with its own -file system, its own networking, and its own isolated process tree. The IMAGE -which starts the process may define defaults related to the process that will be -run in the container, the networking to expose, and more, but **kpod run** -gives final control to the operator or administrator who starts the container -from the image. For that reason **kpod run** has more options than any other -kpod command. - -If the IMAGE is not already loaded then **kpod run** will pull the IMAGE, and -all image dependencies, from the repository in the same way running **kpod -pull** IMAGE, before it starts the container from that image. - -# OPTIONS -**--add-host**=[] - Add a custom host-to-IP mapping (host:ip) - - Add a line to /etc/hosts. The format is hostname:ip. The **--add-host** -option can be set multiple times. - -**-a**, **--attach**=[] - Attach to STDIN, STDOUT or STDERR. - - In foreground mode (the default when **-d** -is not specified), **kpod run** can start the process in the container -and attach the console to the process's standard input, output, and standard -error. It can even pretend to be a TTY (this is what most commandline -executables expect) and pass along signals. The **-a** option can be set for -each of stdin, stdout, and stderr. - -**--blkio-weight**=*0* - Block IO weight (relative weight) accepts a weight value between 10 and 1000. - -**--blkio-weight-device**=[] - Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`). - -**--cap-add**=[] - Add Linux capabilities - -**--cap-drop**=[] - Drop Linux capabilities - -**--cgroup-parent**="" - Path to cgroups under which the cgroup for the container will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist. - -**--cidfile**="" - Write the container ID to the file - -**--cpu-count**=*0* - Limit the number of CPUs available for execution by the container. - - On Windows Server containers, this is approximated as a percentage of total CPU usage. - - On Windows Server containers, the processor resource controls are mutually exclusive, the order of precedence is CPUCount first, then CPUShares, and CPUPercent last. - -**--cpu-period**=*0* - Limit the CPU CFS (Completely Fair Scheduler) period - - Limit the container's CPU usage. This flag tell the kernel to restrict the container's CPU usage to the period you specify. - -**--cpu-quota**=*0* - Limit the CPU CFS (Completely Fair Scheduler) quota - - Limit the container's CPU usage. By default, containers run with the full -CPU resource. This flag tell the kernel to restrict the container's CPU usage -to the quota you specify. - -**--cpu-rt-period**=0 - Limit the CPU real-time period in microseconds - - Limit the container's Real Time CPU usage. This flag tell the kernel to restrict the container's Real Time CPU usage to the period you specify. - -**--cpu-rt-runtime**=0 - Limit the CPU real-time runtime in microseconds - - Limit the containers Real Time CPU usage. This flag tells the kernel to limit the amount of time in a given CPU period Real Time tasks may consume. Ex: - Period of 1,000,000us and Runtime of 950,000us means that this container could consume 95% of available CPU and leave the remaining 5% to normal priority tasks. - - The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup. - -**--cpu-shares**=*0* - CPU shares (relative weight) - - By default, all containers get the same proportion of CPU cycles. This proportion -can be modified by changing the container's CPU share weighting relative -to the weighting of all other running containers. - -To modify the proportion from the default of 1024, use the **--cpu-shares** -flag to set the weighting to 2 or higher. - -The proportion will only apply when CPU-intensive processes are running. -When tasks in one container are idle, other containers can use the -left-over CPU time. The actual amount of CPU time will vary depending on -the number of containers running on the system. - -For example, consider three containers, one has a cpu-share of 1024 and -two others have a cpu-share setting of 512. When processes in all three -containers attempt to use 100% of CPU, the first container would receive -50% of the total CPU time. If you add a fourth container with a cpu-share -of 1024, the first container only gets 33% of the CPU. The remaining containers -receive 16.5%, 16.5% and 33% of the CPU. - -On a multi-core system, the shares of CPU time are distributed over all CPU -cores. Even if a container is limited to less than 100% of CPU time, it can -use 100% of each individual CPU core. - -For example, consider a system with more than three cores. If you start one -container **{C0}** with **-c=512** running one process, and another container -**{C1}** with **-c=1024** running two processes, this can result in the following -division of CPU shares: - - PID container CPU CPU share - 100 {C0} 0 100% of CPU0 - 101 {C1} 1 100% of CPU1 - 102 {C1} 2 100% of CPU2 - -**--cpus**=0.0 - Number of CPUs. The default is *0.0* which means no limit. - -**--cpuset-cpus**="" - CPUs in which to allow execution (0-3, 0,1) - -**--cpuset-mems**="" - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. - - If you have four memory nodes on your system (0-3), use `--cpuset-mems=0,1` -then processes in your container will only use memory from the first -two memory nodes. - -**-d**, **--detach**=*true*|*false* - Detached mode: run the container in the background and print the new container ID. The default is *false*. - - At any time you can run **kpod ps** in -the other shell to view a list of the running containers. You can reattach to a -detached container with **kpod attach**. If you choose to run a container in -the detached mode, then you cannot use the **-rm** option. - - When attached in the tty mode, you can detach from the container (and leave it -running) using a configurable key sequence. The default sequence is `CTRL-p CTRL-q`. -You configure the key sequence using the **--detach-keys** option or a configuration file. -See **config-json(5)** for documentation on using a configuration file. - -**--detach-keys**="" - Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. - -**--device**=[] - Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm) - -**--device-read-bps**=[] - Limit read rate (bytes per second) from a device (e.g. --device-read-bps=/dev/sda:1mb) - -**--device-read-iops**=[] - Limit read rate (IO per second) from a device (e.g. --device-read-iops=/dev/sda:1000) - -**--device-write-bps**=[] - Limit write rate (bytes per second) to a device (e.g. --device-write-bps=/dev/sda:1mb) - -**--device-write-iops**=[] - Limit write rate (IO per second) to a device (e.g. --device-write-iops=/dev/sda:1000) - -**--dns**=[] - Set custom DNS servers - - This option can be used to override the DNS -configuration passed to the container. Typically this is necessary when the -host DNS configuration is invalid for the container (e.g., 127.0.0.1). When this -is the case the **--dns** flags is necessary for every run. - -**--dns-option**=[] - Set custom DNS options - -**--dns-search**=[] - Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain) - -**--entrypoint**="" - Overwrite the default ENTRYPOINT of the image - - This option allows you to overwrite the default entrypoint of the image. - The ENTRYPOINT of an image is similar to a COMMAND -because it specifies what executable to run when the container starts, but it is -(purposely) more difficult to override. The ENTRYPOINT gives a container its -default nature or behavior, so that when you set an ENTRYPOINT you can run the -container as if it were that binary, complete with default options, and you can -pass in more options via the COMMAND. But, sometimes an operator may want to run -something else inside the container, so you can override the default ENTRYPOINT -at runtime by using a **--entrypoint** and a string to specify the new -ENTRYPOINT. - -**-e**, **--env**=[] - Set environment variables - - This option allows you to specify arbitrary -environment variables that are available for the process that will be launched -inside of the container. - -**--env-file**=[] - Read in a line delimited file of environment variables - -**--expose**=[] - Expose a port, or a range of ports (e.g. --expose=3300-3310) to set up port redirection - on the host system. - -**--group-add**=[] - Add additional groups to run as - -**--hostname**="" - Container host name - - Sets the container host name that is available inside the container. - -**--help** - Print usage statement - -**-i**, **--interactive**=*true*|*false* - Keep STDIN open even if not attached. The default is *false*. - - When set to true, keep stdin open even if not attached. The default is false. - -**--ip**="" - Sets the container's interface IPv4 address (e.g. 172.23.0.9) - - It can only be used in conjunction with **--network** for user-defined networks - -**--ip6**="" - Sets the container's interface IPv6 address (e.g. 2001:db8::1b99) - - It can only be used in conjunction with **--network** for user-defined networks - -**--ipc**="" - Default is to create a private IPC namespace (POSIX SysV IPC) for the container - 'container:': reuses another container shared memory, semaphores and message queues - 'host': use the host shared memory,semaphores and message queues inside the container. Note: the host mode gives the container full access to local shared memory and is therefore considered insecure. - -**--kernel-memory**="" - Kernel memory limit (format: `[]`, where unit = b, k, m or g) - - Constrains the kernel memory available to a container. If a limit of 0 -is specified (not using `--kernel-memory`), the container's kernel memory -is not limited. If you specify a limit, it may be rounded up to a multiple -of the operating system's page size and the value can be very large, -millions of trillions. - -**-l**, **--label**=[] - Add metadata to a container (e.g., --label com.example.key=value) - -**--label-file**=[] - Read in a line delimited file of labels - -**--link-local-ip**=[] - Add one or more link-local IPv4/IPv6 addresses to the container's interface - -**--log-driver**="*json-file*|*syslog*|*journald*|*gelf*|*fluentd*|*awslogs*|*splunk*|*etwlogs*|*gcplogs*|*none*" - Logging driver for the container. Default is defined by daemon `--log-driver` flag. - **Warning**: the `kpod logs` command works only for the `json-file` and - `journald` logging drivers. - -**--log-opt**=[] - Logging driver specific options. - -**--mac-address**="" - Container MAC address (e.g. 92:d0:c6:0a:29:33) - - Remember that the MAC address in an Ethernet network must be unique. -The IPv6 link-local address will be based on the device's MAC address -according to RFC4862. - -**-m**, **--memory**="" - Memory limit (format: [], where unit = b, k, m or g) - - Allows you to constrain the memory available to a container. If the host -supports swap memory, then the **-m** memory setting can be larger than physical -RAM. If a limit of 0 is specified (not using **-m**), the container's memory is -not limited. The actual limit may be rounded up to a multiple of the operating -system's page size (the value would be very large, that's millions of trillions). - -**--memory-reservation**="" - Memory soft limit (format: [], where unit = b, k, m or g) - - After setting memory reservation, when the system detects memory contention -or low memory, containers are forced to restrict their consumption to their -reservation. So you should always set the value below **--memory**, otherwise the -hard limit will take precedence. By default, memory reservation will be the same -as memory limit. - -**--memory-swap**="LIMIT" - A limit value equal to memory plus swap. Must be used with the **-m** -(**--memory**) flag. The swap `LIMIT` should always be larger than **-m** -(**--memory**) value. By default, the swap `LIMIT` will be set to double -the value of --memory. - - The format of `LIMIT` is `[]`. Unit can be `b` (bytes), -`k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you don't specify a -unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap. - -**--memory-swappiness**="" - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. - -**--name**="" - Assign a name to the container - - The operator can identify a container in three ways: - UUID long identifier (“f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778”) - UUID short identifier (“f78375b1c487”) - Name (“jonah”) - - kpod generates a UUID for each container, and if a name is not assigned -to the container with **--name** then the daemon will also generate a random -string name. The name is useful any place you need to identify a container. -This works for both background and foreground containers. - -**--network**="*bridge*" - Set the Network mode for the container - 'bridge': create a network stack on the default bridge - 'none': no networking - 'container:': reuse another container's network stack - 'host': use the kpod host network stack. Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure. - '|': connect to a user-defined network - -**--network-alias**=[] - Add network-scoped alias for the container - -**--oom-kill-disable**=*true*|*false* - Whether to disable OOM Killer for the container or not. - -**--oom-score-adj**="" - Tune the host's OOM preferences for containers (accepts -1000 to 1000) - -**--pid**="" - Set the PID mode for the container - Default is to create a private PID namespace for the container - 'container:': join another container's PID namespace - 'host': use the host's PID namespace for the container. Note: the host mode gives the container full access to local PID and is therefore considered insecure. - -**--pids-limit**="" - Tune the container's pids limit. Set `-1` to have unlimited pids for the container. - -**--pod**="" - Run container in an existing pod - -**--privileged**=*true*|*false* - Give extended privileges to this container. The default is *false*. - - By default, kpod containers are -“unprivileged” (=false) and cannot, for example, modify parts of the kernel. -This is because by default a container is not allowed to access any devices. -A “privileged” container is given access to all devices. - - When the operator executes **kpod run --privileged**, kpod enables access -to all devices on the host as well as set turn off most of the security messurs -protecting the host from the container. - -**-p**, **--publish**=[] - Publish a container's port, or range of ports, to the host - - Format: `ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort` -Both hostPort and containerPort can be specified as a range of ports. -When specifying ranges for both, the number of container ports in the range must match the number of host ports in the range. -(e.g., `kpod run -p 1234-1236:1222-1224 --name thisWorks -t busybox` -but not `kpod run -p 1230-1236:1230-1240 --name RangeContainerPortsBiggerThanRangeHostPorts -t busybox`) -With ip: `kpod run -p 127.0.0.1:$HOSTPORT:$CONTAINERPORT --name CONTAINER -t someimage` -Use `kpod port` to see the actual mapping: `kpod port CONTAINER $CONTAINERPORT` - -**-P**, **--publish-all**=*true*|*false* - Publish all exposed ports to random ports on the host interfaces. The default is *false*. - - When set to true publish all exposed ports to the host interfaces. The -default is false. If the operator uses -P (or -p) then kpod will make the -exposed port accessible on the host and the ports will be available to any -client that can reach the host. When using -P, kpod will bind any exposed -port to a random port on the host within an *ephemeral port range* defined by -`/proc/sys/net/ipv4/ip_local_port_range`. To find the mapping between the host -ports and the exposed ports, use `kpod port`. - -**--read-only**=*true*|*false* - Mount the container's root filesystem as read only. - - By default a container will have its root filesystem writable allowing processes -to write files anywhere. By specifying the `--read-only` flag the container will have -its root filesystem mounted as read only prohibiting any writes. - -**--rm**=*true*|*false* - Automatically remove the container when it exits. The default is *false*. - `--rm` flag can work together with `-d`, and auto-removal will be done on daemon side. Note that it's -incompatible with any restart policy other than `none`. - -**--security-opt**=[] - Security Options - - "label=user:USER" : Set the label user for the container - "label=role:ROLE" : Set the label role for the container - "label=type:TYPE" : Set the label type for the container - "label=level:LEVEL" : Set the label level for the container - "label=disable" : Turn off label confinement for the container - "no-new-privileges" : Disable container processes from gaining additional privileges - - "seccomp=unconfined" : Turn off seccomp confinement for the container - "seccomp=profile.json : White listed syscalls seccomp Json file to be used as a seccomp filter - - "apparmor=unconfined" : Turn off apparmor confinement for the container - "apparmor=your-profile" : Set the apparmor confinement profile for the container - -**--shm-size**="" - Size of `/dev/shm`. The format is ``. `number` must be greater than `0`. - Unit is optional and can be `b` (bytes), `k` (kilobytes), `m`(megabytes), or `g` (gigabytes). - If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses `64m`. - -**--sig-proxy**=*true*|*false* - Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied. The default is *true*. - -**--stop-signal**=*SIGTERM* - Signal to stop a container. Default is SIGTERM. - -**--stop-timeout**=*10* - Timeout (in seconds) to stop a container. Default is 10. - -**--storage-opt**=[] - Storage driver options per container - - $ kpod run -it --storage-opt size=120G fedora /bin/bash - - This (size) will allow to set the container rootfs size to 120G at creation time. - This option is only available for the `devicemapper`, `btrfs`, `overlay2` and `zfs` graph drivers. - For the `devicemapper`, `btrfs` and `zfs` storage drivers, user cannot pass a size less than the Default BaseFS Size. - For the `overlay2` storage driver, the size option is only available if the backing fs is `xfs` and mounted with the `pquota` mount option. - Under these conditions, user can pass any size less then the backing fs size. - -**--sysctl**=SYSCTL - Configure namespaced kernel parameters at runtime - - IPC Namespace - current sysctls allowed: - - kernel.msgmax, kernel.msgmnb, kernel.msgmni, kernel.sem, kernel.shmall, kernel.shmmax, kernel.shmmni, kernel.shm_rmid_forced - Sysctls beginning with fs.mqueue.* - - Note: if you use the `--ipc=host` option these sysctls will not be allowed. - - Network Namespace - current sysctls allowed: - Sysctls beginning with net.* - - Note: if you use the `--network=host` option these sysctls will not be allowed. - -**--tmpfs**=[] Create a tmpfs mount - - Mount a temporary filesystem (`tmpfs`) mount into a container, for example: - - $ kpod run -d --tmpfs /tmp:rw,size=787448k,mode=1777 my_image - - This command mounts a `tmpfs` at `/tmp` within the container. The supported mount -options are the same as the Linux default `mount` flags. If you do not specify -any options, the systems uses the following options: -`rw,noexec,nosuid,nodev,size=65536k`. - -**-t**, **--tty**=*true*|*false* - Allocate a pseudo-TTY. The default is *false*. - - When set to true kpod will allocate a pseudo-tty and attach to the standard -input of the container. This can be used, for example, to run a throwaway -interactive shell. The default is false. - -Note: The **-t** option is incompatible with a redirection of the kpod client -standard input. - -**--ulimit**=[] - Ulimit options - -**-u**, **--user**="" - Sets the username or UID used and optionally the groupname or GID for the specified command. - - The followings examples are all valid: - --user [user | user:group | uid | uid:gid | user:gid | uid:group ] - - Without this argument the command will be run as root in the container. - -**--userns**="" - Set the usernamespace mode for the container when `userns-remap` option is enabled. - **host**: use the host usernamespace and enable all privileged options (e.g., `pid=host` or `--privileged`). - -**--uts**=*host* - Set the UTS mode for the container - **host**: use the host's UTS namespace inside the container. - Note: the host mode gives the container access to changing the host's hostname and is therefore considered insecure. - -**-v**|**--volume**[=*[HOST-DIR:CONTAINER-DIR[:OPTIONS]]*] - Create a bind mount. If you specify, ` -v /HOST-DIR:/CONTAINER-DIR`, kpod - bind mounts `/HOST-DIR` in the host to `/CONTAINER-DIR` in the kpod - container. The `OPTIONS` are a comma delimited list and can be: - - * [rw|ro] - * [z|Z] - * [`[r]shared`|`[r]slave`|`[r]private`] - -The `CONTAINER-DIR` must be an absolute path such as `/src/docs`. The `HOST-DIR` -must be an absolute path as well. kpod bind-mounts the `HOST-DIR` to the -path you specify. For example, if you supply the `/foo` value, kpod creates a bind-mount. - -You can specify multiple **-v** options to mount one or more mounts to a -container. - -You can add `:ro` or `:rw` suffix to a volume to mount it read-only or -read-write mode, respectively. By default, the volumes are mounted read-write. -See examples. - -Labeling systems like SELinux require that proper labels are placed on volume -content mounted into a container. Without a label, the security system might -prevent the processes running inside the container from using the content. By -default, kpod does not change the labels set by the OS. - -To change a label in the container context, you can add either of two suffixes -`:z` or `:Z` to the volume mount. These suffixes tell kpod to relabel file -objects on the shared volumes. The `z` option tells kpod that two containers -share the volume content. As a result, kpod labels the content with a shared -content label. Shared volume labels allow all containers to read/write content. -The `Z` option tells kpod to label the content with a private unshared label. -Only the current container can use a private volume. - -By default bind mounted volumes are `private`. That means any mounts done -inside container will not be visible on host and vice-a-versa. One can change -this behavior by specifying a volume mount propagation property. Making a -volume `shared` mounts done under that volume inside container will be -visible on host and vice-a-versa. Making a volume `slave` enables only one -way mount propagation and that is mounts done on host under that volume -will be visible inside container but not the other way around. - -To control mount propagation property of volume one can use `:[r]shared`, -`:[r]slave` or `:[r]private` propagation flag. Propagation property can -be specified only for bind mounted volumes and not for internal volumes or -named volumes. For mount propagation to work source mount point (mount point -where source dir is mounted on) has to have right propagation properties. For -shared volumes, source mount point has to be shared. And for slave volumes, -source mount has to be either shared or slave. - -Use `df ` to figure out the source mount and then use -`findmnt -o TARGET,PROPAGATION ` to figure out propagation -properties of source mount. If `findmnt` utility is not available, then one -can look at mount entry for source mount point in `/proc/self/mountinfo`. Look -at `optional fields` and see if any propagaion properties are specified. -`shared:X` means mount is `shared`, `master:X` means mount is `slave` and if -nothing is there that means mount is `private`. - -To change propagation properties of a mount point use `mount` command. For -example, if one wants to bind mount source directory `/foo` one can do -`mount --bind /foo /foo` and `mount --make-private --make-shared /foo`. This -will convert /foo into a `shared` mount point. Alternatively one can directly -change propagation properties of source mount. Say `/` is source mount for -`/foo`, then use `mount --make-shared /` to convert `/` into a `shared` mount. - -To disable automatic copying of data from the container path to the volume, use -the `nocopy` flag. The `nocopy` flag can be set on bind mounts and named volumes. - -**-w**, **--workdir**="" - Working directory inside the container - - The default working directory for running binaries within a container is the root directory (/). -The image developer can set a different default with the WORKDIR instruction. The operator -can override the working directory by using the **-w** option. - -# Exit Status - -The exit code from `kpod run` gives information about why the container -failed to run or why it exited. When `kpod run` exits with a non-zero code, -the exit codes follow the `chroot` standard, see below: - -**_125_** if the error is with kpod **_itself_** - - $ kpod run --foo busybox; echo $? - # flag provided but not defined: --foo - See 'kpod run --help'. - 125 - -**_126_** if the **_contained command_** cannot be invoked - - $ kpod run busybox /etc; echo $? - # exec: "/etc": permission denied - kpod: Error response from daemon: Contained command could not be invoked - 126 - -**_127_** if the **_contained command_** cannot be found - - $ kpod run busybox foo; echo $? - # exec: "foo": executable file not found in $PATH - kpod: Error response from daemon: Contained command not found or does not exist - 127 - -**_Exit code_** of **_contained command_** otherwise - - $ kpod run busybox /bin/sh -c 'exit 3' - # 3 - -# EXAMPLES - -## Running container in read-only mode - -During container image development, containers often need to write to the image -content. Installing packages into /usr, for example. In production, -applications seldom need to write to the image. Container applications write -to volumes if they need to write to file systems at all. Applications can be -made more secure by running them in read-only mode using the - -read-only switch. -This protects the containers image from modification. Read only containers may -still need to write temporary data. The best way to handle this is to mount -tmpfs directories on /run and /tmp. - - # kpod run --read-only --tmpfs /run --tmpfs /tmp -i -t fedora /bin/bash - -## Exposing log messages from the container to the host's log - -If you want messages that are logged in your container to show up in the host's -syslog/journal then you should bind mount the /dev/log directory as follows. - - # kpod run -v /dev/log:/dev/log -i -t fedora /bin/bash - -From inside the container you can test this by sending a message to the log. - - (bash)# logger "Hello from my container" - -Then exit and check the journal. - - # exit - - # journalctl -b | grep Hello - -This should list the message sent to logger. - -## Attaching to one or more from STDIN, STDOUT, STDERR - -If you do not specify -a then kpod will attach everything (stdin,stdout,stderr) -. You can specify to which of the three standard streams (stdin, stdout, stderr) -you'd like to connect instead, as in: - - # kpod run -a stdin -a stdout -i -t fedora /bin/bash - -## Sharing IPC between containers - -Using shm_server.c available here: https://www.cs.cf.ac.uk/Dave/C/node27.html - -Testing `--ipc=host` mode: - -Host shows a shared memory segment with 7 pids attached, happens to be from httpd: - -``` - $ sudo ipcs -m - - ------ Shared Memory Segments -------- - key shmid owner perms bytes nattch status - 0x01128e25 0 root 600 1000 7 -``` - -Now run a regular container, and it correctly does NOT see the shared memory segment from the host: - -``` - $ kpod run -it shm ipcs -m - - ------ Shared Memory Segments -------- - key shmid owner perms bytes nattch status -``` - -Run a container with the new `--ipc=host` option, and it now sees the shared memory segment from the host httpd: - - ``` - $ kpod run -it --ipc=host shm ipcs -m - - ------ Shared Memory Segments -------- - key shmid owner perms bytes nattch status - 0x01128e25 0 root 600 1000 7 -``` -Testing `--ipc=container:CONTAINERID` mode: - -Start a container with a program to create a shared memory segment: -``` - $ kpod run -it shm bash - $ sudo shm/shm_server & - $ sudo ipcs -m - - ------ Shared Memory Segments -------- - key shmid owner perms bytes nattch status - 0x0000162e 0 root 666 27 1 -``` -Create a 2nd container correctly shows no shared memory segment from 1st container: -``` - $ kpod run shm ipcs -m - - ------ Shared Memory Segments -------- - key shmid owner perms bytes nattch status -``` - -Create a 3rd container using the new --ipc=container:CONTAINERID option, now it shows the shared memory segment from the first: - -``` - $ kpod run -it --ipc=container:ed735b2264ac shm ipcs -m - $ sudo ipcs -m - - ------ Shared Memory Segments -------- - key shmid owner perms bytes nattch status - 0x0000162e 0 root 666 27 1 -``` - -## Mapping Ports for External Usage - -The exposed port of an application can be mapped to a host port using the **-p** -flag. For example, an httpd port 80 can be mapped to the host port 8080 using the -following: - - # kpod run -p 8080:80 -d -i -t fedora/httpd - -## Mounting External Volumes - -To mount a host directory as a container volume, specify the absolute path to -the directory and the absolute path for the container directory separated by a -colon: - - # kpod run -v /var/db:/data1 -i -t fedora bash - -When using SELinux, be aware that the host has no knowledge of container SELinux -policy. Therefore, in the above example, if SELinux policy is enforced, the -`/var/db` directory is not writable to the container. A "Permission Denied" -message will occur and an avc: message in the host's syslog. - - -To work around this, at time of writing this man page, the following command -needs to be run in order for the proper SELinux policy type label to be attached -to the host directory: - - # chcon -Rt svirt_sandbox_file_t /var/db - - -Now, writing to the /data1 volume in the container will be allowed and the -changes will also be reflected on the host in /var/db. - -## Using alternative security labeling - -You can override the default labeling scheme for each container by specifying -the `--security-opt` flag. For example, you can specify the MCS/MLS level, a -requirement for MLS systems. Specifying the level in the following command -allows you to share the same content between containers. - - # kpod run --security-opt label=level:s0:c100,c200 -i -t fedora bash - -An MLS example might be: - - # kpod run --security-opt label=level:TopSecret -i -t rhel7 bash - -To disable the security labeling for this container versus running with the -`--permissive` flag, use the following command: - - # kpod run --security-opt label=disable -i -t fedora bash - -If you want a tighter security policy on the processes within a container, -you can specify an alternate type for the container. You could run a container -that is only allowed to listen on Apache ports by executing the following -command: - - # kpod run --security-opt label=type:svirt_apache_t -i -t centos bash - -Note: - -You would have to write policy defining a `svirt_apache_t` type. - -## Setting device weight - -If you want to set `/dev/sda` device weight to `200`, you can specify the device -weight by `--blkio-weight-device` flag. Use the following command: - - # kpod run -it --blkio-weight-device "/dev/sda:200" ubuntu - -``` -$ kpod run -d busybox top -``` - -## Setting Namespaced Kernel Parameters (Sysctls) - -The `--sysctl` sets namespaced kernel parameters (sysctls) in the -container. For example, to turn on IP forwarding in the containers -network namespace, run this command: - - $ kpod run --sysctl net.ipv4.ip_forward=1 someimage - -Note: - -Not all sysctls are namespaced. kpod does not support changing sysctls -inside of a container that also modify the host system. As the kernel -evolves we expect to see more sysctls become namespaced. - -See the definition of the `--sysctl` option above for the current list of -supported sysctls. - -# HISTORY -April 2014, Originally compiled by William Henry (whenry at redhat dot com) -based on docker.com source material and internal work. -June 2014, updated by Sven Dowideit -July 2014, updated by Sven Dowideit -November 2015, updated by Sally O'Malley -October 2017, converted from Docker documentation to kpod by Dan Walsh for kpod diff --git a/docs/kpod-save.1.md b/docs/kpod-save.1.md deleted file mode 100644 index ece4bea5e..000000000 --- a/docs/kpod-save.1.md +++ /dev/null @@ -1,97 +0,0 @@ -% kpod(1) kpod-save - Simple tool to save an image to an archive -% Urvashi Mohnani -# kpod-save "1" "July 2017" "kpod" - -## NAME -kpod-save - Save an image to docker-archive or oci-archive - -## SYNOPSIS -**kpod save** -**NAME[:TAG]** -[**--quiet**|**-q**] -[**--format**] -[**--output**|**-o**] -[**--help**|**-h**] - -## DESCRIPTION -**kpod save** saves an image to either **docker-archive**, **oci-archive**, **oci-dir** (directory -with oci manifest type), or **docker-dir** (directory with v2s2 manifest type) on the local machine, -default is **docker-archive**. **kpod save** writes to STDOUT by default and can be redirected to a -file using the **output** flag. The **quiet** flag suppresses the output when set. - -**kpod [GLOBAL OPTIONS]** - -**kpod save [GLOBAL OPTIONS]** - -**kpod save [OPTIONS] NAME[:TAG]** - -## OPTIONS - -**--compress** - -Compress tarball image layers when pushing to a directory using the 'dir' transport. (default is same compression type, compressed or uncompressed, as source) -Note: This flag can only be set when using the **dir** transport i.e --format=oci-dir or --format-docker-dir - -**--output, -o** -Write to a file, default is STDOUT - -**--format** -Save image to **oci-archive**, **oci-dir** (directory with oci manifest type), or **docker-dir** (directory with v2s2 manifest type) -``` ---format oci-archive ---format oci-dir ---format docker-dir -``` - -**--quiet, -q** -Suppress the output - -## EXAMPLES - -``` -# kpod save --quiet -o alpine.tar alpine:2.6 -``` - -``` -# kpod save > alpine-all.tar alpine -``` - -``` -# kpod save -o oci-alpine.tar --format oci-archive alpine -``` - -``` -# kpod save --compress --format oci-dir -o alp-dir alpine -Getting image source signatures -Copying blob sha256:2fdfe1cd78c20d05774f0919be19bc1a3e4729bce219968e4188e7e0f1af679d - 1.97 MB / 1.97 MB [========================================================] 0s -Copying config sha256:501d1a8f0487e93128df34ea349795bc324d5e0c0d5112e08386a9dfaff620be - 584 B / 584 B [============================================================] 0s -Writing manifest to image destination -Storing signatures -``` - -``` -# kpod save --format docker-dir -o ubuntu-dir ubuntu -Getting image source signatures -Copying blob sha256:660c48dd555dcbfdfe19c80a30f557ac57a15f595250e67bfad1e5663c1725bb - 45.55 MB / 45.55 MB [======================================================] 8s -Copying blob sha256:4c7380416e7816a5ab1f840482c9c3ca8de58c6f3ee7f95e55ad299abbfe599f - 846 B / 846 B [============================================================] 0s -Copying blob sha256:421e436b5f80d876128b74139531693be9b4e59e4f1081c9a3c379c95094e375 - 620 B / 620 B [============================================================] 0s -Copying blob sha256:e4ce6c3651b3a090bb43688f512f687ea6e3e533132bcbc4a83fb97e7046cea3 - 849 B / 849 B [============================================================] 0s -Copying blob sha256:be588e74bd348ce48bb7161350f4b9d783c331f37a853a80b0b4abc0a33c569e - 169 B / 169 B [============================================================] 0s -Copying config sha256:20c44cd7596ff4807aef84273c99588d22749e2a7e15a7545ac96347baa65eda - 3.53 KB / 3.53 KB [========================================================] 0s -Writing manifest to image destination -Storing signatures -``` - -## SEE ALSO -kpod(1), kpod-load(1), crio(8), crio.conf(5) - -## HISTORY -July 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/kpod-start.1.md b/docs/kpod-start.1.md deleted file mode 100644 index d1c52a118..000000000 --- a/docs/kpod-start.1.md +++ /dev/null @@ -1,45 +0,0 @@ -% kpod(1) kpod-start - Stop one or more containers -% Brent Baude -# kpod-start "1" "November 2017" "kpod" - -## NAME -kpod start - Start one or more containers - -## SYNOPSIS -**kpod start [OPTIONS] CONTAINER [...]** - -## DESCRIPTION -Start one or more containers. You may use container IDs or names as input. The *attach* and *interactive* -options cannot be used to override the *--tty** and *--interactive* options from when the container -was created. - -## OPTIONS - -**--attach, -a** - -Attach container's STDOUT and STDERR. The default is false. This option cannot be used when -starting multiple containers. - -**--detach-keys** - -Override the key sequence for detaching a container. Format is a single character [a-Z] or -ctrl- where is one of: a-z, @, ^, [, , or _. - -**--interactive, -i** - -Attach container's STDIN. The default is false. - - -## EXAMPLE - -kpod start mywebserver - -kpod start 860a4b23 5421ab4 - -kpod start -i -a 860a4b23 - -## SEE ALSO -kpod(1), kpod-create(1) - -## HISTORY -November 2018, Originally compiled by Brent Baude diff --git a/docs/kpod-stats.1.md b/docs/kpod-stats.1.md deleted file mode 100644 index 2b73616a0..000000000 --- a/docs/kpod-stats.1.md +++ /dev/null @@ -1,77 +0,0 @@ -% kpod(1) kpod-stats - Display a live stream of 1 or more containers' resource usage statistics -% Ryan Cole -# kpod-stats "1" "July 2017" "kpod" - -## NAME -kpod-stats - Display a live stream of 1 or more containers' resource usage statistics - -## SYNOPSIS -**kpod** **stats** [*options* [...]] [container] - -## DESCRIPTION -Display a live stream of one or more containers' resource usage statistics - -## OPTIONS - -**--all, -a** - -Show all containers. Only running containers are shown by default - -**--no-reset** - -Do not clear the terminal/screen in between reporting intervals - -**--no-stream** - -Disable streaming stats and only pull the first result, default setting is false - -**--format="TEMPLATE"** - -Pretty-print images using a Go template - - -## EXAMPLE - -``` -# kpod stats -a --no-stream - -CONTAINER CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS -132ade621b5d 0.00% 1.618MB / 33.08GB 0.00% 0B / 0B 0B / 0B 0 -940e00a40a77 0.00% 1.544MB / 33.08GB 0.00% 0B / 0B 0B / 0B 0 -72a1dfb44ca7 0.00% 1.528MB / 33.08GB 0.00% 0B / 0B 0B / 0B 0 -f5a62a71b07b 0.00% 5.669MB / 33.08GB 0.02% 0B / 0B 0B / 0B 3 -31eab2cf93f4 0.00% 16.42MB / 33.08GB 0.05% 0B / 0B 22.43MB / 0B 0 - -# -``` - -``` -# kpod stats --no-stream 31eab2cf93f4 -CONTAINER CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS -31eab2cf93f4 0.00% 16.42MB / 33.08GB 0.05% 0B / 0B 22.43MB / 0B 0 - -# -``` -``` -# kpod stats --no-stream --format=json 31eab2cf93f4 -[ - { - "name": "31eab2cf93f4", - "id": "31eab2cf93f413af64a3f13d8d78393238658465d75e527333a8577f251162ec", - "cpu_percent": "0.00%", - "mem_usage": "16.42MB / 33.08GB", - "mem_percent": "0.05%", - "netio": "0B / 0B", - "blocki": "22.43MB / 0B", - "pids": 0 - } -] -# -``` - - -## SEE ALSO -kpod(1) - -## HISTORY -July 2017, Originally compiled by Ryan Cole diff --git a/docs/kpod-stop.1.md b/docs/kpod-stop.1.md deleted file mode 100644 index f45e6c078..000000000 --- a/docs/kpod-stop.1.md +++ /dev/null @@ -1,43 +0,0 @@ -% kpod(1) kpod-stop - Stop one or more containers -% Brent Baude -# kpod-stop "1" "September 2017" "kpod" - -## NAME -kpod stop - Stop one or more containers - -## SYNOPSIS -**kpod stop [OPTIONS] CONTAINER [...]** - -## DESCRIPTION -Stops one or more containers. You may use container IDs or names as input. The **--timeout** switch -allows you to specify the number of seconds to wait before forcibly stopping the container after the stop command -is issued to the container. The default is 10 seconds. - -## OPTIONS - -**--timeout, t** - -Timeout to wait before forcibly stopping the container - -**--all, -a** - -Stop all running containers. This does not include paused containers. - - -## EXAMPLE - -kpod stop mywebserver - -kpod stop 860a4b23 - -kpod stop mywebserver 860a4b23 - -kpod stop --timeout 2 860a4b23 - -kpod stop -a - -## SEE ALSO -kpod(1), kpod-rm(1) - -## HISTORY -September 2018, Originally compiled by Brent Baude diff --git a/docs/kpod-tag.1.md b/docs/kpod-tag.1.md deleted file mode 100644 index b92b2eb16..000000000 --- a/docs/kpod-tag.1.md +++ /dev/null @@ -1,34 +0,0 @@ -% kpod(1) kpod-tag - Add tags to an image -% Ryan Cole -# kpod-tag "1" "July 2017" "kpod" - -## NAME -kpod tag - Add an additional name to a local image - -## SYNOPSIS -**kpod tag** -[**--help**|**-h**] - -## DESCRIPTION -Assigns a new alias to an image in a registry. An alias refers to the entire image name, including the optional **TAG** after the ':' - -**kpod [GLOBAL OPTIONS]** - -**kpod [GLOBAL OPTIONS] tag [OPTIONS]** - -## GLOBAL OPTIONS - -**--help, -h** - Print usage statement - -## EXAMPLES - - kpod tag 0e3bbc2 fedora:latest - - kpod tag httpd myregistryhost:5000/fedora/httpd:v2 - -## SEE ALSO -kpod(1), crio(8), crio.conf(5) - -## HISTORY -July 2017, Originally compiled by Ryan Cole diff --git a/docs/kpod-top.1.md b/docs/kpod-top.1.md deleted file mode 100644 index e19b7342c..000000000 --- a/docs/kpod-top.1.md +++ /dev/null @@ -1,59 +0,0 @@ -% kpod(1) kpod-top - display the running processes of a container -% Brent Baude - -## NAME -kpod top - Display the running processes of a container - -## SYNOPSIS -**kpod top** -[**--help**|**-h**] - -## DESCRIPTION -Display the running process of the container. ps-OPTION can be any of the options you would pass to a Linux ps command - -**kpod [GLOBAL OPTIONS] top [OPTIONS]** - -## OPTIONS - -**--help, -h** - Print usage statement - -**--format** - Display the output in an alternate format. The only supported format is **JSON**. - -## EXAMPLES - -``` -# kpod top f5a62a71b07 - UID PID PPID %CPU STIME TT TIME CMD - 0 18715 18705 0.0 10:35 pts/0 00:00:00 /bin/bash - 0 18741 18715 0.0 10:35 pts/0 00:00:00 vi -# -``` - -``` -#kpod --log-level=debug top f5a62a71b07 -o fuser,f,comm,label -FUSER F COMMAND LABEL -root 4 bash system_u:system_r:container_t:s0:c429,c1016 -root 0 vi system_u:system_r:container_t:s0:c429,c1016 -# -``` -``` -# kpod top --format=json f5a62a71b07b -o %cpu,%mem,command,blocked -[ - { - "CPU": "0.0", - "MEM": "0.0", - "COMMAND": "vi", - "BLOCKED": "0000000000000000", - "START": "", - "TIME": "", - "C": "", - "CAUGHT": "", - ... -``` -## SEE ALSO -kpod(1), ps(1) - -## HISTORY -December 2017, Originally compiled by Brent Baude diff --git a/docs/kpod-umount.1.md b/docs/kpod-umount.1.md deleted file mode 100644 index 2ee03356d..000000000 --- a/docs/kpod-umount.1.md +++ /dev/null @@ -1,19 +0,0 @@ -% kpod(1) kpod-umount - Unmount a working container's root filesystem. -% Dan Walsh -# kpod-umount "1" "July 2017" "kpod" - -## NAME -kpod umount - Unmount a working container's root file system - -## SYNOPSIS -**kpod** **umount** **containerID** - -## DESCRIPTION -Unmounts the specified container's root file system. - -## EXAMPLE - -kpod umount containerID - -## SEE ALSO -kpod(1), kpod-mount(1) diff --git a/docs/kpod-unpause.1.md b/docs/kpod-unpause.1.md deleted file mode 100644 index 52a810025..000000000 --- a/docs/kpod-unpause.1.md +++ /dev/null @@ -1,24 +0,0 @@ -% kpod(1) kpod-unpause - Unpause one or more containers -% Dan Walsh -# kpod-unpause "1" "September 2017" "kpod" - -## NAME -kpod unpause - Unpause one or more containers - -## SYNOPSIS -**kpod unpause [OPTIONS] CONTAINER [...]** - -## DESCRIPTION -Unpauses the processes in one or more containers. You may use container IDs or names as input. - -## EXAMPLE - -kpod unpause mywebserver - -kpod unpause 860a4b23 - -## SEE ALSO -kpod(1), kpod-pause(1) - -## HISTORY -September 2017, Originally compiled by Dan Walsh diff --git a/docs/kpod-version.1.md b/docs/kpod-version.1.md deleted file mode 100644 index cdc2c9251..000000000 --- a/docs/kpod-version.1.md +++ /dev/null @@ -1,24 +0,0 @@ -% kpod(1) kpod-version - Simple tool to view version information -% Urvashi Mohnani -# kpod-version "1" "July 2017" "kpod" - -## NAME -kpod-version - Display the KPOD Version Information - -## SYNOPSIS -**kpod version** -[**--help**|**-h**] - -## DESCRIPTION -Shows the the following information: Version, Go Version, Git Commit, Build Time, -OS, and Architecture. - -**kpod [GLOBAL OPTIONS]** - -**kpod version** - -## SEE ALSO -kpod(1), crio(8), crio.conf(5) - -## HISTORY -July 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/kpod-wait.1.md b/docs/kpod-wait.1.md deleted file mode 100644 index 290cdedfc..000000000 --- a/docs/kpod-wait.1.md +++ /dev/null @@ -1,36 +0,0 @@ -% kpod(1) kpod-wait - Waits on a container -% Brent Baude -# kpod-wait "1" "September 2017" "kpod" - -## NAME -kpod wait - Waits on one or more containers to stop and prints exit code - -## SYNOPSIS -**kpod wait** -[**--help**|**-h**] - -## DESCRIPTION -Waits on one or more containers to stop. The container can be referred to by its -name or ID. In the case of multiple containers, kpod will wait on each consecutively. -After the container stops, the container's return code is printed. - -**kpod [GLOBAL OPTIONS] wait ** - -## GLOBAL OPTIONS - -**--help, -h** - Print usage statement - -## EXAMPLES - - kpod wait mywebserver - - kpod wait 860a4b23 - - kpod wait mywebserver myftpserver - -## SEE ALSO -kpod(1), crio(8), crio.conf(5) - -## HISTORY -September 2017, Originally compiled by Brent Baude diff --git a/docs/kpod.1.md b/docs/kpod.1.md deleted file mode 100644 index 02f97739e..000000000 --- a/docs/kpod.1.md +++ /dev/null @@ -1,158 +0,0 @@ -% kpod(1) kpod - Simple management tool for pods and images -% Dan Walsh -# kpod "1" "September 2016" "kpod" -## NAME -kpod - Simple management tool for containers and images - -## SYNOPSIS -**kpod** [*options*] COMMAND - -# DESCRIPTION -kpod is a simple client only tool to help with debugging issues when daemons -such as CRI runtime and the kubelet are not responding or failing. A shared API -layer could be created to share code between the daemon and kpod. kpod does not -require any daemon running. kpod utilizes the same underlying components that -crio uses i.e. containers/image, container/storage, oci-runtime-tool/generate, -runc or any other OCI compatible runtime. kpod shares state with crio and so -has the capability to debug pods/images created by crio. - -**kpod [GLOBAL OPTIONS]** - -## GLOBAL OPTIONS - -**--help, -h** - Print usage statement - -**--config value, -c**=**"config.file"** - Path of a config file detailing container server configuration options - -**--cpu-profile** - Path to where the cpu performance results should be written - -**--log-level** - log messages above specified level: debug, info, warn, error (default), fatal or panic - -**--root**=**value** - Path to the root directory in which data, including images, is stored - -**--runroot**=**value** - Path to the 'run directory' where all state information is stored - -**--runtime**=**value** - Path to the OCI compatible binary used to run containers - -**--storage-driver, -s**=**value** - Select which storage driver is used to manage storage of images and containers (default is overlay) - -**--storage-opt**=**value** - Used to pass an option to the storage driver - -**--version, -v** - Print the version - -## COMMANDS - -### attach -Attach to a running container - -### create -create a new container - -### diff -Inspect changes on a container or image's filesystem - -## exec -Execute a command in a running container. - -### export -Export container's filesystem contents as a tar archive - -### history -Shows the history of an image - -### images -List images in local storage - -### info -Displays system information - -### inspect -Display a container or image's configuration - -### kill -Kill the main process in one or more containers - -### load -Load an image from docker archive - -### login -Login to a container registry - -### logout -Logout of a container registry - -### logs -Display the logs of a container - -### mount -Mount a working container's root filesystem - -### pause -Pause one or more containers - -### ps -Prints out information about containers - -### pull -Pull an image from a registry - -### push -Push an image from local storage to elsewhere - -### rename -Rename a container - -### rm -Remove one or more containers - -### rmi -Removes one or more locally stored images - -### run -Run a command in a new container - -### save -Save an image to docker-archive or oci - -## start -Starts one or more containers - -### stats -Display a live stream of one or more containers' resource usage statistics - -### stop -Stops one or more running containers. - -### tag -Add an additional name to a local image - -### top -Display the running processes of a container - -### umount -Unmount a working container's root file system - -### unpause -Unpause one or more containers - -### version -Display the version information - -### wait -Wait on one or more containers to stop and print their exit codes - -## SEE ALSO -crio(8), crio.conf(5) - -## HISTORY -Dec 2016, Originally compiled by Dan Walsh diff --git a/docs/podman-attach.1.md b/docs/podman-attach.1.md new file mode 100644 index 000000000..ddb59e553 --- /dev/null +++ b/docs/podman-attach.1.md @@ -0,0 +1,40 @@ +% podman(1) podman-attach - See the output of pid 1 of a container or enter the container +% Dan Walsh +# podman-attach "1" "December 2017" "podman" + +## NAME +podman-attach - Attach to a running container + +## SYNOPSIS +**podman attach [OPTIONS] CONTAINER** + +## DESCRIPTION +The attach command allows you to attach to a running container using the container's ID +or name, either to view its ongoing output or to control it interactively. + +You can detach from the container (and leave it running) using a configurable key sequence. The default +sequence is CTRL-p CTRL-q. You configure the key sequence using the --detach-keys option + +## OPTIONS +**--detach-keys** +Override the key sequence for detaching a container. Format is a single character [a-Z] or +ctrl- where is one of: a-z, @, ^, [, , or _. + +**--no-stdin** +Do not attach STDIN. The default is false. + +## EXAMPLES ## + +``` +podman attach foobar +[root@localhost /]# +``` +``` +podman attach 1234 +[root@localhost /]# +``` +``` +podman attach --no-stdin foobar +``` +## SEE ALSO +podman(1), podman-exec(1), podman-run(1) diff --git a/docs/podman-cp.1.md b/docs/podman-cp.1.md new file mode 100644 index 000000000..0c23d6f10 --- /dev/null +++ b/docs/podman-cp.1.md @@ -0,0 +1,46 @@ +% podman(1) podman-cp - Copy content between container's file system and the host +% Dan Walsh +# podman-cp "1" "August 2017" "podman" + +## NAME +podman-cp - Copy files/folders between a container and the local filesystem. + +## Description +We chose not to implement the `cp` feature in `podman` even though the upstream Docker +project has it. We have a much stronger capability. Using standard podman-mount +and podman-umount, we can take advantage of the entire linux tool chain, rather +then just cp. + +If a user wants to copy contents out of a container or into a container, they +can execute a few simple commands. + +You can copy from the container's file system to the local machine or the +reverse, from the local filesystem to the container. + +If you want to copy the /etc/foobar directory out of a container and onto /tmp +on the host, you could execute the following commands: + + mnt=$(podman mount CONTAINERID) + cp -R ${mnt}/etc/foobar /tmp + podman umount CONTAINERID + +If you want to untar a tar ball into a container, you can execute these commands: + + mnt=$(podman mount CONTAINERID) + tar xf content.tgz -C ${mnt} + podman umount CONTAINERID + +One last example, if you want to install a package into a container that +does not have dnf installed, you could execute something like: + + mnt=$(podman mount CONTAINERID) + dnf install --installroot=${mnt} httpd + chroot ${mnt} rm -rf /var/log/dnf /var/cache/dnf + podman umount CONTAINERID + +This shows that using `podman mount` and `podman umount` you can use all of the +standard linux tools for moving files into and out of containers, not just +the cp command. + +## SEE ALSO +podman(1), podman-mount(1), podman-umount(1) diff --git a/docs/podman-create.1.md b/docs/podman-create.1.md new file mode 100644 index 000000000..9deeb8149 --- /dev/null +++ b/docs/podman-create.1.md @@ -0,0 +1,566 @@ +% podman(1) podman-create - Create a new container +% Dan Walsh +podman-create - Create a new container + +# SYNOPSIS +**podman create** [*options* [...]] IMAGE [COMMAND] [ARG...] + +# DESCRIPTION + +Creates a writeable container layer over the specified image and prepares it for +running the specified command. The container ID is then printed to STDOUT. This +is similar to **podman run -d** except the container is never started. You can +then use the **podman start ** command to start the container at +any point. + +The initial status of the container created with **podman create** is 'created'. + +# OPTIONS +**--add-host**=[] + Add a custom host-to-IP mapping (host:ip) + + Add a line to /etc/hosts. The format is hostname:ip. The **--add-host** +option can be set multiple times. + +**-a**, **--attach**=[] + Attach to STDIN, STDOUT or STDERR. + + In foreground mode (the default when **-d** +is not specified), **podman run** can start the process in the container +and attach the console to the process's standard input, output, and standard +error. It can even pretend to be a TTY (this is what most commandline +executables expect) and pass along signals. The **-a** option can be set for +each of stdin, stdout, and stderr. + +**--blkio-weight**=*0* + Block IO weight (relative weight) accepts a weight value between 10 and 1000. + +**--blkio-weight-device**=[] + Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`). + +**--cap-add**=[] + Add Linux capabilities + +**--cap-drop**=[] + Drop Linux capabilities + +**--cgroup-parent**="" + Path to cgroups under which the cgroup for the container will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist. + +**--cidfile**="" + Write the container ID to the file + +**--cpu-count**=*0* + Limit the number of CPUs available for execution by the container. + + On Windows Server containers, this is approximated as a percentage of total CPU usage. + + On Windows Server containers, the processor resource controls are mutually exclusive, the order of precedence is CPUCount first, then CPUShares, and CPUPercent last. + +**--cpu-period**=*0* + Limit the CPU CFS (Completely Fair Scheduler) period + + Limit the container's CPU usage. This flag tell the kernel to restrict the container's CPU usage to the period you specify. + +**--cpu-quota**=*0* + Limit the CPU CFS (Completely Fair Scheduler) quota + + Limit the container's CPU usage. By default, containers run with the full +CPU resource. This flag tell the kernel to restrict the container's CPU usage +to the quota you specify. + +**--cpu-rt-period**=0 + Limit the CPU real-time period in microseconds + + Limit the container's Real Time CPU usage. This flag tell the kernel to restrict the container's Real Time CPU usage to the period you specify. + +**--cpu-rt-runtime**=0 + Limit the CPU real-time runtime in microseconds + + Limit the containers Real Time CPU usage. This flag tells the kernel to limit the amount of time in a given CPU period Real Time tasks may consume. Ex: + Period of 1,000,000us and Runtime of 950,000us means that this container could consume 95% of available CPU and leave the remaining 5% to normal priority tasks. + + The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup. + +**--cpu-shares**=*0* + CPU shares (relative weight) + + By default, all containers get the same proportion of CPU cycles. This proportion +can be modified by changing the container's CPU share weighting relative +to the weighting of all other running containers. + +To modify the proportion from the default of 1024, use the **--cpu-shares** +flag to set the weighting to 2 or higher. + +The proportion will only apply when CPU-intensive processes are running. +When tasks in one container are idle, other containers can use the +left-over CPU time. The actual amount of CPU time will vary depending on +the number of containers running on the system. + +For example, consider three containers, one has a cpu-share of 1024 and +two others have a cpu-share setting of 512. When processes in all three +containers attempt to use 100% of CPU, the first container would receive +50% of the total CPU time. If you add a fourth container with a cpu-share +of 1024, the first container only gets 33% of the CPU. The remaining containers +receive 16.5%, 16.5% and 33% of the CPU. + +On a multi-core system, the shares of CPU time are distributed over all CPU +cores. Even if a container is limited to less than 100% of CPU time, it can +use 100% of each individual CPU core. + +For example, consider a system with more than three cores. If you start one +container **{C0}** with **-c=512** running one process, and another container +**{C1}** with **-c=1024** running two processes, this can result in the following +division of CPU shares: + + PID container CPU CPU share + 100 {C0} 0 100% of CPU0 + 101 {C1} 1 100% of CPU1 + 102 {C1} 2 100% of CPU2 + +**--cpus**=0.0 + Number of CPUs. The default is *0.0* which means no limit. + +**--cpuset-cpus**="" + CPUs in which to allow execution (0-3, 0,1) + +**--cpuset-mems**="" + Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + + If you have four memory nodes on your system (0-3), use `--cpuset-mems=0,1` +then processes in your container will only use memory from the first +two memory nodes. + +**-d**, **--detach**=*true*|*false* + Detached mode: run the container in the background and print the new container ID. The default is *false*. + + At any time you can run **podman ps** in +the other shell to view a list of the running containers. You can reattach to a +detached container with **podman attach**. If you choose to run a container in +the detached mode, then you cannot use the **-rm** option. + + When attached in the tty mode, you can detach from the container (and leave it +running) using a configurable key sequence. The default sequence is `CTRL-p CTRL-q`. +You configure the key sequence using the **--detach-keys** option or a configuration file. +See **config-json(5)** for documentation on using a configuration file. + +**--detach-keys**="" + Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + +**--device**=[] + Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm) + +**--device-read-bps**=[] + Limit read rate (bytes per second) from a device (e.g. --device-read-bps=/dev/sda:1mb) + +**--device-read-iops**=[] + Limit read rate (IO per second) from a device (e.g. --device-read-iops=/dev/sda:1000) + +**--device-write-bps**=[] + Limit write rate (bytes per second) to a device (e.g. --device-write-bps=/dev/sda:1mb) + +**--device-write-iops**=[] + Limit write rate (IO per second) to a device (e.g. --device-write-iops=/dev/sda:1000) + +**--dns**=[] + Set custom DNS servers + + This option can be used to override the DNS +configuration passed to the container. Typically this is necessary when the +host DNS configuration is invalid for the container (e.g., 127.0.0.1). When this +is the case the **--dns** flags is necessary for every run. + +**--dns-option**=[] + Set custom DNS options + +**--dns-search**=[] + Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain) + +**--entrypoint**="" + Overwrite the default ENTRYPOINT of the image + + This option allows you to overwrite the default entrypoint of the image. + The ENTRYPOINT of an image is similar to a COMMAND +because it specifies what executable to run when the container starts, but it is +(purposely) more difficult to override. The ENTRYPOINT gives a container its +default nature or behavior, so that when you set an ENTRYPOINT you can run the +container as if it were that binary, complete with default options, and you can +pass in more options via the COMMAND. But, sometimes an operator may want to run +something else inside the container, so you can override the default ENTRYPOINT +at runtime by using a **--entrypoint** and a string to specify the new +ENTRYPOINT. + +**-e**, **--env**=[] + Set environment variables + + This option allows you to specify arbitrary +environment variables that are available for the process that will be launched +inside of the container. + +**--env-file**=[] + Read in a line delimited file of environment variables + +**--expose**=[] + Expose a port, or a range of ports (e.g. --expose=3300-3310) to set up port redirection + on the host system. + +**--group-add**=[] + Add additional groups to run as + +**--hostname**="" + Container host name + + Sets the container host name that is available inside the container. + +**--help** + Print usage statement + +**-i**, **--interactive**=*true*|*false* + Keep STDIN open even if not attached. The default is *false*. + +**--ip**="" + Sets the container's interface IPv4 address (e.g. 172.23.0.9) + + It can only be used in conjunction with **--network** for user-defined networks + +**--ip6**="" + Sets the container's interface IPv6 address (e.g. 2001:db8::1b99) + + It can only be used in conjunction with **--network** for user-defined networks + +**--ipc**="" + Default is to create a private IPC namespace (POSIX SysV IPC) for the container + 'container:': reuses another container shared memory, semaphores and message queues + 'host': use the host shared memory,semaphores and message queues inside the container. Note: the host mode gives the container full access to local shared memory and is therefore considered insecure. + +**--kernel-memory**="" + Kernel memory limit (format: `[]`, where unit = b, k, m or g) + + Constrains the kernel memory available to a container. If a limit of 0 +is specified (not using `--kernel-memory`), the container's kernel memory +is not limited. If you specify a limit, it may be rounded up to a multiple +of the operating system's page size and the value can be very large, +millions of trillions. + +**-l**, **--label**=[] + Add metadata to a container (e.g., --label com.example.key=value) + +**--label-file**=[] + Read in a line delimited file of labels + +**--link-local-ip**=[] + Add one or more link-local IPv4/IPv6 addresses to the container's interface + +**--log-driver**="*json-file*|*syslog*|*journald*|*gelf*|*fluentd*|*awslogs*|*splunk*|*etwlogs*|*gcplogs*|*none*" + Logging driver for the container. Default is defined by daemon `--log-driver` flag. + **Warning**: the `podman logs` command works only for the `json-file` and + `journald` logging drivers. + +**--log-opt**=[] + Logging driver specific options. + +**--mac-address**="" + Container MAC address (e.g. 92:d0:c6:0a:29:33) + + Remember that the MAC address in an Ethernet network must be unique. +The IPv6 link-local address will be based on the device's MAC address +according to RFC4862. + +**-m**, **--memory**="" + Memory limit (format: [], where unit = b, k, m or g) + + Allows you to constrain the memory available to a container. If the host +supports swap memory, then the **-m** memory setting can be larger than physical +RAM. If a limit of 0 is specified (not using **-m**), the container's memory is +not limited. The actual limit may be rounded up to a multiple of the operating +system's page size (the value would be very large, that's millions of trillions). + +**--memory-reservation**="" + Memory soft limit (format: [], where unit = b, k, m or g) + + After setting memory reservation, when the system detects memory contention +or low memory, containers are forced to restrict their consumption to their +reservation. So you should always set the value below **--memory**, otherwise the +hard limit will take precedence. By default, memory reservation will be the same +as memory limit. + +**--memory-swap**="LIMIT" + A limit value equal to memory plus swap. Must be used with the **-m** +(**--memory**) flag. The swap `LIMIT` should always be larger than **-m** +(**--memory**) value. By default, the swap `LIMIT` will be set to double +the value of --memory. + + The format of `LIMIT` is `[]`. Unit can be `b` (bytes), +`k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you don't specify a +unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap. + +**--memory-swappiness**="" + Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + +**--name**="" + Assign a name to the container + + The operator can identify a container in three ways: + UUID long identifier (“f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778”) + UUID short identifier (“f78375b1c487”) + Name (“jonah”) + + podman generates a UUID for each container, and if a name is not assigned +to the container with **--name** then the daemon will also generate a random +string name. The name is useful any place you need to identify a container. +This works for both background and foreground containers. + +**--network**="*bridge*" + Set the Network mode for the container + 'bridge': create a network stack on the default bridge + 'none': no networking + 'container:': reuse another container's network stack + 'host': use the podman host network stack. Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure. + '|': connect to a user-defined network + +**--network-alias**=[] + Add network-scoped alias for the container + +**--oom-kill-disable**=*true*|*false* + Whether to disable OOM Killer for the container or not. + +**--oom-score-adj**="" + Tune the host's OOM preferences for containers (accepts -1000 to 1000) + +**--pid**="" + Set the PID mode for the container + Default is to create a private PID namespace for the container + 'container:': join another container's PID namespace + 'host': use the host's PID namespace for the container. Note: the host mode gives the container full access to local PID and is therefore considered insecure. + +**--pids-limit**="" + Tune the container's pids limit. Set `-1` to have unlimited pids for the container. + +**--pod**="" + Run container in an existing pod + +**--privileged**=*true*|*false* + Give extended privileges to this container. The default is *false*. + + By default, podman containers are +“unprivileged” (=false) and cannot, for example, modify parts of the kernel. +This is because by default a container is not allowed to access any devices. +A “privileged” container is given access to all devices. + + When the operator executes **podman run --privileged**, podman enables access +to all devices on the host as well as set turn off most of the security messurs +protecting the host from the container. + +**-p**, **--publish**=[] + Publish a container's port, or range of ports, to the host + + Format: `ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort` +Both hostPort and containerPort can be specified as a range of ports. +When specifying ranges for both, the number of container ports in the range must match the number of host ports in the range. +(e.g., `podman run -p 1234-1236:1222-1224 --name thisWorks -t busybox` +but not `podman run -p 1230-1236:1230-1240 --name RangeContainerPortsBiggerThanRangeHostPorts -t busybox`) +With ip: `podman run -p 127.0.0.1:$HOSTPORT:$CONTAINERPORT --name CONTAINER -t someimage` +Use `podman port` to see the actual mapping: `podman port CONTAINER $CONTAINERPORT` + +**-P**, **--publish-all**=*true*|*false* + Publish all exposed ports to random ports on the host interfaces. The default is *false*. + + When set to true publish all exposed ports to the host interfaces. The +default is false. If the operator uses -P (or -p) then podman will make the +exposed port accessible on the host and the ports will be available to any +client that can reach the host. When using -P, podman will bind any exposed +port to a random port on the host within an *ephemeral port range* defined by +`/proc/sys/net/ipv4/ip_local_port_range`. To find the mapping between the host +ports and the exposed ports, use `podman port`. + +**--read-only**=*true*|*false* + Mount the container's root filesystem as read only. + + By default a container will have its root filesystem writable allowing processes +to write files anywhere. By specifying the `--read-only` flag the container will have +its root filesystem mounted as read only prohibiting any writes. + +**--rm**=*true*|*false* + Automatically remove the container when it exits. The default is *false*. + `--rm` flag can work together with `-d`, and auto-removal will be done on daemon side. Note that it's +incompatible with any restart policy other than `none`. + +**--security-opt**=[] + Security Options + + + "label=user:USER" : Set the label user for the container + "label=role:ROLE" : Set the label role for the container + "label=type:TYPE" : Set the label type for the container + "label=level:LEVEL" : Set the label level for the container + "label=disable" : Turn off label confinement for the container + "no-new-privileges" : Disable container processes from gaining additional privileges + + "seccomp=unconfined" : Turn off seccomp confinement for the container + "seccomp=profile.json : White listed syscalls seccomp Json file to be used as a seccomp filter + + "apparmor=unconfined" : Turn off apparmor confinement for the container + "apparmor=your-profile" : Set the apparmor confinement profile for the container + +**--shm-size**="" + Size of `/dev/shm`. The format is ``. `number` must be greater than `0`. + Unit is optional and can be `b` (bytes), `k` (kilobytes), `m`(megabytes), or `g` (gigabytes). + If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses `64m`. + +**--sig-proxy**=*true*|*false* + Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied. The default is *true*. + +**--stop-signal**=*SIGTERM* + Signal to stop a container. Default is SIGTERM. + +**--stop-timeout**=*10* + Timeout (in seconds) to stop a container. Default is 10. + +**--storage-opt**=[] + Storage driver options per container + + $ podman create -it --storage-opt size=120G fedora /bin/bash + + This (size) will allow to set the container rootfs size to 120G at creation time. + This option is only available for the `devicemapper`, `btrfs`, `overlay2` and `zfs` graph drivers. + For the `devicemapper`, `btrfs` and `zfs` storage drivers, user cannot pass a size less than the Default BaseFS Size. + For the `overlay2` storage driver, the size option is only available if the backing fs is `xfs` and mounted with the `pquota` mount option. + Under these conditions, user can pass any size less then the backing fs size. + +**--sysctl**=SYSCTL + Configure namespaced kernel parameters at runtime + + IPC Namespace - current sysctls allowed: + + kernel.msgmax, kernel.msgmnb, kernel.msgmni, kernel.sem, kernel.shmall, kernel.shmmax, kernel.shmmni, kernel.shm_rmid_forced + Sysctls beginning with fs.mqueue.* + + Note: if you use the --ipc=host option these sysctls will not be allowed. + + Network Namespace - current sysctls allowed: + Sysctls beginning with net.* + + Note: if you use the --network=host option these sysctls will not be allowed. + +**--tmpfs**=[] Create a tmpfs mount + + Mount a temporary filesystem (`tmpfs`) mount into a container, for example: + + $ podman run -d --tmpfs /tmp:rw,size=787448k,mode=1777 my_image + + This command mounts a `tmpfs` at `/tmp` within the container. The supported mount +options are the same as the Linux default `mount` flags. If you do not specify +any options, the systems uses the following options: +`rw,noexec,nosuid,nodev,size=65536k`. + +**-t**, **--tty**=*true*|*false* + Allocate a pseudo-TTY. The default is *false*. + + When set to true podman will allocate a pseudo-tty and attach to the standard +input of the container. This can be used, for example, to run a throwaway +interactive shell. The default is false. + +Note: The **-t** option is incompatible with a redirection of the podman client +standard input. + +**--ulimit**=[] + Ulimit options + +**-u**, **--user**="" + Sets the username or UID used and optionally the groupname or GID for the specified command. + + The followings examples are all valid: + --user [user | user:group | uid | uid:gid | user:gid | uid:group ] + + Without this argument the command will be run as root in the container. + +**--userns**="" + Set the usernamespace mode for the container when `userns-remap` option is enabled. + **host**: use the host usernamespace and enable all privileged options (e.g., `pid=host` or `--privileged`). + +**--uts**=*host* + Set the UTS mode for the container + **host**: use the host's UTS namespace inside the container. + Note: the host mode gives the container access to changing the host's hostname and is therefore considered insecure. + +**-v**|**--volume**[=*[HOST-DIR:CONTAINER-DIR[:OPTIONS]]*] + Create a bind mount. If you specify, ` -v /HOST-DIR:/CONTAINER-DIR`, podman + bind mounts `/HOST-DIR` in the host to `/CONTAINER-DIR` in the podman + container. The `OPTIONS` are a comma delimited list and can be: + + * [rw|ro] + * [z|Z] + * [`[r]shared`|`[r]slave`|`[r]private`] + +The `CONTAINER-DIR` must be an absolute path such as `/src/docs`. The `HOST-DIR` +must be an absolute path as well. podman bind-mounts the `HOST-DIR` to the +path you specify. For example, if you supply the `/foo` value, podman creates a bind-mount. + +You can specify multiple **-v** options to mount one or more mounts to a +container. + +You can add `:ro` or `:rw` suffix to a volume to mount it read-only or +read-write mode, respectively. By default, the volumes are mounted read-write. +See examples. + +Labeling systems like SELinux require that proper labels are placed on volume +content mounted into a container. Without a label, the security system might +prevent the processes running inside the container from using the content. By +default, podman does not change the labels set by the OS. + +To change a label in the container context, you can add either of two suffixes +`:z` or `:Z` to the volume mount. These suffixes tell podman to relabel file +objects on the shared volumes. The `z` option tells podman that two containers +share the volume content. As a result, podman labels the content with a shared +content label. Shared volume labels allow all containers to read/write content. +The `Z` option tells podman to label the content with a private unshared label. +Only the current container can use a private volume. + +By default bind mounted volumes are `private`. That means any mounts done +inside container will not be visible on host and vice-a-versa. One can change +this behavior by specifying a volume mount propagation property. Making a +volume `shared` mounts done under that volume inside container will be +visible on host and vice-a-versa. Making a volume `slave` enables only one +way mount propagation and that is mounts done on host under that volume +will be visible inside container but not the other way around. + +To control mount propagation property of volume one can use `:[r]shared`, +`:[r]slave` or `:[r]private` propagation flag. Propagation property can +be specified only for bind mounted volumes and not for internal volumes or +named volumes. For mount propagation to work source mount point (mount point +where source dir is mounted on) has to have right propagation properties. For +shared volumes, source mount point has to be shared. And for slave volumes, +source mount has to be either shared or slave. + +Use `df ` to figure out the source mount and then use +`findmnt -o TARGET,PROPAGATION ` to figure out propagation +properties of source mount. If `findmnt` utility is not available, then one +can look at mount entry for source mount point in `/proc/self/mountinfo`. Look +at `optional fields` and see if any propagaion properties are specified. +`shared:X` means mount is `shared`, `master:X` means mount is `slave` and if +nothing is there that means mount is `private`. + +To change propagation properties of a mount point use `mount` command. For +example, if one wants to bind mount source directory `/foo` one can do +`mount --bind /foo /foo` and `mount --make-private --make-shared /foo`. This +will convert /foo into a `shared` mount point. Alternatively one can directly +change propagation properties of source mount. Say `/` is source mount for +`/foo`, then use `mount --make-shared /` to convert `/` into a `shared` mount. + +To disable automatic copying of data from the container path to the volume, use +the `nocopy` flag. The `nocopy` flag can be set on bind mounts and named volumes. + +**-w**, **--workdir**="" + Working directory inside the container + + The default working directory for running binaries within a container is the root directory (/). +The image developer can set a different default with the WORKDIR instruction. The operator +can override the working directory by using the **-w** option. + +# EXAMPLES + +# HISTORY +August 2014, updated by Sven Dowideit +September 2014, updated by Sven Dowideit +November 2014, updated by Sven Dowideit +October 2017, converted from Docker documentation to podman by Dan Walsh for podman diff --git a/docs/podman-diff.1.md b/docs/podman-diff.1.md new file mode 100644 index 000000000..1ba5951db --- /dev/null +++ b/docs/podman-diff.1.md @@ -0,0 +1,45 @@ +% podman(1) podman-diff - Inspect changes on a container or image's filesystem +% Dan Walsh +# podman-diff "1" "August 2017" "podman" + +## NAME +podman diff - Inspect changes on a container or image's filesystem + +## SYNOPSIS +**podman** **diff** [*options* [...]] NAME + +## DESCRIPTION +Displays changes on a container or image's filesystem. The container or image will be compared to its parent layer + +## OPTIONS + +**--format** + +Alter the output into a different format. The only valid format for diff is `json`. + + +## EXAMPLE + +podman diff redis:alpine +C /usr +C /usr/local +C /usr/local/bin +A /usr/local/bin/docker-entrypoint.sh + +podman diff --format json redis:alpine +{ + "changed": [ + "/usr", + "/usr/local", + "/usr/local/bin" + ], + "added": [ + "/usr/local/bin/docker-entrypoint.sh" + ] +} + +## SEE ALSO +podman(1) + +## HISTORY +August 2017, Originally compiled by Ryan Cole diff --git a/docs/podman-exec.1.md b/docs/podman-exec.1.md new file mode 100644 index 000000000..aa8d36a96 --- /dev/null +++ b/docs/podman-exec.1.md @@ -0,0 +1,43 @@ +% podman(1) podman-exec - Execute a command in a running container +% Brent Baude +# podman-exec "1" "December 2017" "podman" + +## NAME +podman-exec - Execute a command in a running container + +## SYNOPSIS +**podman exec** +**CONTAINER** +[COMMAND] [ARG...] +[**--help**|**-h**] + +## DESCRIPTION +**podman exec** executes a command in a running container. + +## OPTIONS +**--env, e** +You may specify arbitrary environment variables that are available for the +command to be executed. + +**--interactive, -i** +Not supported. All exec commands are interactive by default. + +**--privileged** +Give the process extended Linux capabilities when running the command in container. + +**--tty, -t** +Allocate a pseudo-TTY. + +**--user, -u** +Sets the username or UID used and optionally the groupname or GID for the specified command. +The following examples are all valid: +--user [user | user:group | uid | uid:gid | user:gid | uid:group ] + +## EXAMPLES + + +## SEE ALSO +podman(1), podman-run(1) + +## HISTORY +December 2017, Originally compiled by Brent Baude diff --git a/docs/podman-export.1.md b/docs/podman-export.1.md new file mode 100644 index 000000000..5652c245b --- /dev/null +++ b/docs/podman-export.1.md @@ -0,0 +1,44 @@ +% podman(1) podman-export - Simple tool to export a container's filesystem as a tarball +% Urvashi Mohnani +# podman-export "1" "July 2017" "podman" + +## NAME +podman-export - Export container's filesystem contents as a tar archive + +## SYNOPSIS +**podman export** +**CONTAINER** +[**--output**|**-o**] +[**--help**|**-h**] + +## DESCRIPTION +**podman export** exports the filesystem of a container and saves it as a tarball +on the local machine. **podman export** writes to STDOUT by default and can be +redirected to a file using the **output flag**. + +**podman [GLOBAL OPTIONS]** + +**podman export [GLOBAL OPTIONS]** + +**podman export [OPTIONS] CONTAINER** + +## OPTIONS + +**--output, -o** +Write to a file, default is STDOUT + +## EXAMPLES + +``` +# podman export -o redis-container.tar 883504668ec465463bc0fe7e63d53154ac3b696ea8d7b233748918664ea90e57 +``` + +``` +# podman export > redis-container.tar 883504668ec465463bc0fe7e63d53154ac3b696ea8d7b233748918664ea90e57 +``` + +## SEE ALSO +podman(1), podman-import(1), crio(8), crio.conf(5) + +## HISTORY +August 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/podman-history.1.md b/docs/podman-history.1.md new file mode 100644 index 000000000..f4a089b3c --- /dev/null +++ b/docs/podman-history.1.md @@ -0,0 +1,106 @@ +% podman(1) podman-history - Simple tool to view the history of an image +% Urvashi Mohnani +% podman-history "1" "JULY 2017" "podman" + +## NAME +podman-history - Shows the history of an image + +## SYNOPSIS +**podman history** +**IMAGE[:TAG|DIGEST]** +[**--human**|**-H**] +[**--no-trunc**] +[**--quiet**|**-q**] +[**--format**] +[**--help**|**-h**] + +## DESCRIPTION +**podman history** displays the history of an image by printing out information +about each layer used in the image. The information printed out for each layer +include Created (time and date), Created By, Size, and Comment. The output can +be truncated or not using the **--no-trunc** flag. If the **--human** flag is +set, the time of creation and size are printed out in a human readable format. +The **--quiet** flag displays the ID of the image only when set and the **--format** +flag is used to print the information using the Go template provided by the user. + +Valid placeholders for the Go template are listed below: + +| **Placeholder** | **Description** | +| --------------- | ----------------------------------------------------------------------------- | +| .ID | Image ID | +| .Created | if **--human**, time elapsed since creation, otherwise time stamp of creation | +| .CreatedBy | Command used to create the layer | +| .Size | Size of layer on disk | +| .Comment | Comment for the layer | + +**podman [GLOBAL OPTIONS]** + +**podman history [GLOBAL OPTIONS]** + +**podman history [OPTIONS] IMAGE[:TAG|DIGEST]** + +## OPTIONS + +**--human, -H** + Display sizes and dates in human readable format + +**--no-trunc** + Do not truncate the output + +**--quiet, -q** + Print the numeric IDs only + +**--format** + Alter the output for a format like 'json' or a Go template. + + +## EXAMPLES + +``` +# podman history debian +ID CREATED CREATED BY SIZE COMMENT +b676ca55e4f2c 9 weeks ago /bin/sh -c #(nop) CMD ["bash"] 0 B + 9 weeks ago /bin/sh -c #(nop) ADD file:ebba725fb97cea4... 45.14 MB +``` + +``` +# podman history --no-trunc=true --human=false debian +ID CREATED CREATED BY SIZE COMMENT +b676ca55e4f2c 2017-07-24T16:52:55Z /bin/sh -c #(nop) CMD ["bash"] 0 + 2017-07-24T16:52:54Z /bin/sh -c #(nop) ADD file:ebba725fb97cea4... 45142935 +``` + +``` +# podman history --format "{{.ID}} {{.Created}}" debian +b676ca55e4f2c 9 weeks ago + 9 weeks ago +``` + +``` +# podman history --format json debian +[ + { + "id": "b676ca55e4f2c0ce53d0636438c5372d3efeb5ae99b676fa5a5d1581bad46060", + "created": "2017-07-24T16:52:55.195062314Z", + "createdBy": "/bin/sh -c #(nop) CMD [\"bash\"]", + "size": 0, + "comment": "" + }, + { + "id": "b676ca55e4f2c0ce53d0636438c5372d3efeb5ae99b676fa5a5d1581bad46060", + "created": "2017-07-24T16:52:54.898893387Z", + "createdBy": "/bin/sh -c #(nop) ADD file:ebba725fb97cea45d0b1b35ccc8144e766fcfc9a78530465c23b0c4674b14042 in / ", + "size": 45142935, + "comment": "" + } +] +``` + +## history +Show the history of an image + +## SEE ALSO +podman(1), crio(8), crio.conf(5) + +## HISTORY +July 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/podman-images.1.md b/docs/podman-images.1.md new file mode 100644 index 000000000..cb0c52bef --- /dev/null +++ b/docs/podman-images.1.md @@ -0,0 +1,125 @@ +% podman(1) podman-images - List images in local storage +% Dan Walsh +# podman-images "1" "March 2017" "podman" + +## NAME +podman images - List images in local storage + +## SYNOPSIS +**podman** **images** [*options* [...]] + +## DESCRIPTION +Displays locally stored images, their names, and their IDs. + +## OPTIONS + +**--digests** + +Show image digests + +**--filter, -f=[]** + +Filter output based on conditions provided (default []) + +**--format** + +Change the default output format. This can be of a supported type like 'json' +or a Go template. + +**--noheading, -n** + +Omit the table headings from the listing of images. + +**--no-trunc, --notruncate** + +Do not truncate output. + +**--quiet, -q** + +Lists only the image IDs. + + +## EXAMPLE + +``` +# podman images +REPOSITORY TAG IMAGE ID CREATED SIZE +docker.io/kubernetes/pause latest e3d42bcaf643 3 years ago 251kB + ebb91b73692b 4 weeks ago 27.2MB +docker.io/library/ubuntu latest 4526339ae51c 6 weeks ago 126MB +``` + +``` +# podman images --quiet +e3d42bcaf643 +ebb91b73692b +4526339ae51c +``` + +``` +# podman images --noheading +docker.io/kubernetes/pause latest e3d42bcaf643 3 years ago 251kB + ebb91b73692b 4 weeks ago 27.2MB +docker.io/library/ubuntu latest 4526339ae51c 6 weeks ago 126MB +``` + +``` +# podman images --no-trunc +REPOSITORY TAG IMAGE ID CREATED SIZE +docker.io/kubernetes/pause latest sha256:e3d42bcaf643097dd1bb0385658ae8cbe100a80f773555c44690d22c25d16b27 3 years ago 251kB + sha256:ebb91b73692bd27890685846412ae338d13552165eacf7fcd5f139bfa9c2d6d9 4 weeks ago 27.2MB +docker.io/library/ubuntu latest sha256:4526339ae51c3cdc97956a7a961c193c39dfc6bd9733b0d762a36c6881b5583a 6 weeks ago 126MB +``` + +``` +# podman images --format "table {{.ID}} {{.Repository}} {{.Tag}}" +IMAGE ID REPOSITORY TAG +e3d42bcaf643 docker.io/kubernetes/pause latest +ebb91b73692b +4526339ae51c docker.io/library/ubuntu latest +``` + +``` +# podman images --filter dangling=true +REPOSITORY TAG IMAGE ID CREATED SIZE + ebb91b73692b 4 weeks ago 27.2MB +``` + +``` +# podman images --format json +[ + { + "id": "e3d42bcaf643097dd1bb0385658ae8cbe100a80f773555c44690d22c25d16b27", + "names": [ + "docker.io/kubernetes/pause:latest" + ], + "digest": "sha256:0aecf73ff86844324847883f2e916d3f6984c5fae3c2f23e91d66f549fe7d423", + "created": "2014-07-19T07:02:32.267701596Z", + "size": 250665 + }, + { + "id": "ebb91b73692bd27890685846412ae338d13552165eacf7fcd5f139bfa9c2d6d9", + "names": [ + "\u003cnone\u003e" + ], + "digest": "sha256:ba7e4091d27e8114a205003ca6a768905c3395d961624a2c78873d9526461032", + "created": "2017-10-26T03:07:22.796184288Z", + "size": 27170520 + }, + { + "id": "4526339ae51c3cdc97956a7a961c193c39dfc6bd9733b0d762a36c6881b5583a", + "names": [ + "docker.io/library/ubuntu:latest" + ], + "digest": "sha256:193f7734ddd68e0fb24ba9af8c2b673aecb0227b026871f8e932dab45add7753", + "created": "2017-10-10T20:59:05.10196344Z", + "size": 126085200 + } +] +``` + +## SEE ALSO +podman(1) + +## HISTORY +March 2017, Originally compiled by Dan Walsh diff --git a/docs/podman-import.1.md b/docs/podman-import.1.md new file mode 100644 index 000000000..f90b82a89 --- /dev/null +++ b/docs/podman-import.1.md @@ -0,0 +1,88 @@ +% podman(1) podman-import - Simple tool to import a tarball as an image +% Urvashi Mohnani +# podman-import "1" "November 2017" "podman" + +## NAME +podman-import - import a tarball and save it as a filesystem image + +## SYNOPSIS +**podman import** +**TARBALL** +[**--change**|**-c**] +[**--message**|**-m**] +[**--help**|**-h**] + +## DESCRIPTION +**podman import** imports a tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) +and saves it as a filesystem image. Remote tarballs can be specified using a URL. +Various image instructions can be configured with the **--change** flag and +a commit message can be set using the **--message** flag. + +**podman [GLOBAL OPTIONS]** + +**podman import [GLOBAL OPTIONS]** + +**podman import [OPTIONS] CONTAINER** + +## OPTIONS + +**--change, -c** +Apply the following possible instructions to the created image: +**CMD** | **ENTRYPOINT** | **ENV** | **EXPOSE** | **LABEL** | **STOPSIGNAL** | **USER** | **VOLUME** | **WORKDIR** +Can be set multiple times + +**--message, -m** +Set commit message for imported image + +## EXAMPLES + +``` +# podman import --change CMD=/bin/bash --change ENTRYPOINT=/bin/sh --change LABEL=blue=image ctr.tar image-imported +Getting image source signatures +Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86 + 25.80 MB / 25.80 MB [======================================================] 0s +Copying config sha256:c16a6d30f3782288ec4e7521c754acc29d37155629cb39149756f486dae2d4cd + 448 B / 448 B [============================================================] 0s +Writing manifest to image destination +Storing signatures +``` + +``` +# cat ctr.tar | podman import --message "importing the ctr.tar tarball" - image-imported +Getting image source signatures +Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86 + 25.80 MB / 25.80 MB [======================================================] 0s +Copying config sha256:af376cdda5c0ac1d9592bf56567253d203f8de6a8edf356c683a645d75221540 + 376 B / 376 B [============================================================] 0s +Writing manifest to image destination +Storing signatures +``` + +``` +# cat ctr.tar | podman import - +Getting image source signatures +Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86 + 25.80 MB / 25.80 MB [======================================================] 0s +Copying config sha256:d61387b4d5edf65edee5353e2340783703074ffeaaac529cde97a8357eea7645 + 378 B / 378 B [============================================================] 0s +Writing manifest to image destination +Storing signatures +``` + +``` +podman import http://example.com/ctr.tar url-image +Downloading from "http://example.com/ctr.tar" +Getting image source signatures +Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86 + 25.80 MB / 25.80 MB [======================================================] 0s +Copying config sha256:5813fe8a3b18696089fd09957a12e88bda43dc1745b5240879ffffe93240d29a + 419 B / 419 B [============================================================] 0s +Writing manifest to image destination +Storing signatures +``` + +## SEE ALSO +podman(1), podman-export(1), crio(8), crio.conf(5) + +## HISTORY +November 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/podman-info.1.md b/docs/podman-info.1.md new file mode 100644 index 000000000..09c46d7f9 --- /dev/null +++ b/docs/podman-info.1.md @@ -0,0 +1,36 @@ +% podman(1) podman-version - Simple tool to view version information +% Vincent Batts +% podman-version "1" "JULY 2017" "podman" + +## NAME +podman-info - Display system information + + +## SYNOPSIS +**podman** **info** [*options* [...]] + + +## DESCRIPTION + +Information display here pertain to the host, current storage stats, and build of podman. Useful for the user and when reporting issues. + + +## OPTIONS + +**--debug, -D** + +Show additional information + +**--format** + +Change output format to "json" or a Go template. + + +## EXAMPLE + +`podman info` + +`podman info --debug --format json| jq .host.kernel` + +## SEE ALSO +crio(8), crio.conf(5) diff --git a/docs/podman-inspect.1.md b/docs/podman-inspect.1.md new file mode 100644 index 000000000..c2edf896d --- /dev/null +++ b/docs/podman-inspect.1.md @@ -0,0 +1,82 @@ +% podman(1) podman-inspect - Display a container or image's configuration +% Dan Walsh +# podman-inspect "1" "July 2017" "podman" + +## NAME +podman inspect - Display a container or image's configuration + +## SYNOPSIS +**podman** **inspect** [*options* [...]] name + +## DESCRIPTION +This displays the low-level information on containers and images identified by name or ID. By default, this will render all results in a JSON array. If the container and image have the same name, this will return container JSON for unspecified type. If a format is specified, the given template will be executed for each result. + +## OPTIONS + +**--type, t="TYPE"** + +Return data on items of the specified type. Type can be 'container', 'image' or 'all' (default: all) + +**--format, -f="FORMAT"** + +Format the output using the given Go template + +**--size** + +Display the total file size if the type is a container + + +## EXAMPLE + +``` +# podman inspect fedora +{ + "Id": "422dc563ca3260ad9ef5c47a1c246f5065d7f177ce51f4dd208efd82967ff182", + "Digest": "sha256:1b9bfb4e634dc1e5c19d0fa1eb2e5a28a5c2b498e3d3e4ac742bd7f5dae08611", + "RepoTags": [ + "docker.io/library/fedora:latest" + ], + "RepoDigests": [ + "docker.io/library/fedora@sha256:1b9bfb4e634dc1e5c19d0fa1eb2e5a28a5c2b498e3d3e4ac742bd7f5dae08611" + ], + "Parent": "", + "Comment": "", + "Created": "2017-11-14T21:07:08.475840838Z", + "Config": { + "Env": [ + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", + "DISTTAG=f27container", + "FGC=f27", + "FBR=f27" + ] + }, + "Version": "17.06.2-ce", + "Author": "[Adam Miller \u003cmaxamillion@fedoraproject.org\u003e] [Patrick Uiterwijk \u003cpatrick@puiterwijk.org\u003e]", + "Architecture": "amd64", + "Os": "linux", + "Size": 251722732, + "VirtualSize": 514895140, + "GraphDriver": { + "Name": "overlay", + "Data": { + "MergedDir": "/var/lib/containers/storage/overlay/d32459d9ce237564fb93573b85cbc707600d43fbe5e46e8eeef22cad914bb516/merged", + "UpperDir": "/var/lib/containers/storage/overlay/d32459d9ce237564fb93573b85cbc707600d43fbe5e46e8eeef22cad914bb516/diff", + "WorkDir": "/var/lib/containers/storage/overlay/d32459d9ce237564fb93573b85cbc707600d43fbe5e46e8eeef22cad914bb516/work" + } + }, + "RootFS": { + "Type": "layers", + "Layers": [ + "sha256:d32459d9ce237564fb93573b85cbc707600d43fbe5e46e8eeef22cad914bb516" + ] + }, + "Labels": null, + "Annotations": {} +} +``` + +## SEE ALSO +podman(1) + +## HISTORY +July 2017, Originally compiled by Dan Walsh diff --git a/docs/podman-kill.1.md b/docs/podman-kill.1.md new file mode 100644 index 000000000..e254f2af3 --- /dev/null +++ b/docs/podman-kill.1.md @@ -0,0 +1,33 @@ +% podman(1) podman-kill- Kill one or more containers with a signal +% Brent Baude +# podman-kill"1" "September 2017" "podman" + +## NAME +podman kill - Kills one or more containers with a signal + +## SYNOPSIS +**podman kill [OPTIONS] CONTAINER [...]** + +## DESCRIPTION +The main process inside each container specified will be sent SIGKILL, or any signal specified with option --signal. + +## OPTIONS + +**--signal, s** + +Signal to send to the container. For more information on Linux signals, refer to *man signal(7)*. + + +## EXAMPLE + +podman kill mywebserver + +podman kill 860a4b23 + +podman kill --signal TERM 860a4b23 + +## SEE ALSO +podman(1), podman-stop(1) + +## HISTORY +September 2017, Originally compiled by Brent Baude diff --git a/docs/podman-load.1.md b/docs/podman-load.1.md new file mode 100644 index 000000000..80210d547 --- /dev/null +++ b/docs/podman-load.1.md @@ -0,0 +1,78 @@ +% podman(1) podman-load - Simple tool to load an image from an archive to containers-storage +% Urvashi Mohnani +# podman-load "1" "July 2017" "podman" + +## NAME +podman-load - Load an image from docker archive + +## SYNOPSIS +**podman load** +**NAME[:TAG|@DIGEST]** +[**--input**|**-i**] +[**--quiet**|**-q**] +[**--help**|**-h**] + +## DESCRIPTION +**podman load** copies an image from either **docker-archive** or **oci-archive** stored +on the local machine. **podman load** reads from stdin by default or a file if the **input** flag is set. +The **quiet** flag suppresses the output when set. + +**podman [GLOBAL OPTIONS]** + +**podman load [GLOBAL OPTIONS]** + +**podman load [OPTIONS] NAME[:TAG|@DIGEST]** + +## OPTIONS + +**--input, -i** +Read from archive file, default is STDIN + +**--quiet, -q** +Suppress the output + +**--signature-policy="PATHNAME"** + +Pathname of a signature policy file to use. It is not recommended that this +option be used, as the default behavior of using the system-wide default policy +(frequently */etc/containers/policy.json*) is most often preferred + +## EXAMPLES + +``` +# podman load --quiet -i fedora.tar +``` + +``` +# podman load -q --signature-policy /etc/containers/policy.json -i fedora.tar +``` + +``` +# podman load < fedora.tar +Getting image source signatures +Copying blob sha256:5bef08742407efd622d243692b79ba0055383bbce12900324f75e56f589aedb0 + 0 B / 4.03 MB [---------------------------------------------------------------] +Copying config sha256:7328f6f8b41890597575cbaadc884e7386ae0acc53b747401ebce5cf0d624560 + 0 B / 1.48 KB [---------------------------------------------------------------] +Writing manifest to image destination +Storing signatures +Loaded image: registry.fedoraproject.org/fedora:latest +``` + +``` +# cat fedora.tar | podman load +Getting image source signatures +Copying blob sha256:5bef08742407efd622d243692b79ba0055383bbce12900324f75e56f589aedb0 + 0 B / 4.03 MB [---------------------------------------------------------------] +Copying config sha256:7328f6f8b41890597575cbaadc884e7386ae0acc53b747401ebce5cf0d624560 + 0 B / 1.48 KB [---------------------------------------------------------------] +Writing manifest to image destination +Storing signatures +Loaded image: registry.fedoraproject.org/fedora:latest +``` + +## SEE ALSO +podman(1), podman-save(1), crio(8), crio.conf(5) + +## HISTORY +July 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/podman-login.1.md b/docs/podman-login.1.md new file mode 100644 index 000000000..8d8e688c1 --- /dev/null +++ b/docs/podman-login.1.md @@ -0,0 +1,65 @@ +% podman(1) podman-login - Simple tool to login to a registry server +% Urvashi Mohnani +# podman-login "1" "August 2017" "podman" + +## NAME +podman-login - Login to a container registry + +## SYNOPSIS +**podman login** +[**--help**|**-h**] +[**--authfile**] +[**--user**|**-u**] +[**--password**|**-p**] +**REGISTRY** + +## DESCRIPTION +**podman login** logs into a specified registry server with the correct username +and password. **podman login** reads in the username and password from STDIN. +The username and password can also be set using the **username** and **password** flags. +The path of the authentication file can be specified by the user by setting the **authfile** +flag. The default path used is **${XDG\_RUNTIME_DIR}/containers/auth.json**. + +**podman [GLOBAL OPTIONS]** + +**podman login [GLOBAL OPTIONS]** + +**podman login [OPTIONS] REGISTRY [GLOBAL OPTIONS]** + +## OPTIONS + +**--password, -p** +Password for registry + +**--username, -u** +Username for registry + +**--authfile** +Path of the authentication file. Default is ${XDG_\RUNTIME\_DIR}/containers/auth.json + +## EXAMPLES + +``` +# podman login docker.io +Username: umohnani +Password: +Login Succeeded! +``` + +``` +# podman login -u testuser -p testpassword localhost:5000 +Login Succeeded! +``` + +``` +# podman login --authfile authdir/myauths.json docker.io +Username: umohnani +Password: +Login Succeeded! +``` + +## SEE ALSO +podman(1), podman-logout(1), crio(8), crio.conf(5) + +## HISTORY +August 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/podman-logout.1.md b/docs/podman-logout.1.md new file mode 100644 index 000000000..7fa6c728d --- /dev/null +++ b/docs/podman-logout.1.md @@ -0,0 +1,56 @@ +% podman(1) podman-logout - Simple tool to logout of a registry server +% Urvashi Mohnani +# podman-logout "1" "August 2017" "podman" + +## NAME +podman-logout - Logout of a container registry + +## SYNOPSIS +**podman logout** +[**--help**|**-h**] +[**--authfile**] +[**--all**|**-a**] +**REGISTRY** + +## DESCRIPTION +**podman logout** logs out of a specified registry server by deleting the cached credentials +stored in the **auth.json** file. The path of the authentication file can be overrriden by the user by setting the **authfile** flag. +The default path used is **${XDG\_RUNTIME_DIR}/containers/auth.json**. +All the cached credentials can be removed by setting the **all** flag. + +**podman [GLOBAL OPTIONS]** + +**podman logout [GLOBAL OPTIONS]** + +**podman logout [OPTIONS] REGISTRY [GLOBAL OPTIONS]** + +## OPTIONS + +**--authfile** +Path of the authentication file. Default is ${XDG_\RUNTIME\_DIR}/containers/auth.json + +**--all, -a** +Remove the cached credentials for all registries in the auth file + +## EXAMPLES + +``` +# podman logout docker.io +Remove login credentials for https://registry-1.docker.io/v2/ +``` + +``` +# podman logout --authfile authdir/myauths.json docker.io +Remove login credentials for https://registry-1.docker.io/v2/ +``` + +``` +# podman logout --all +Remove login credentials for all registries +``` + +## SEE ALSO +podman(1), podman-login(1), crio(8), crio.conf(5) + +## HISTORY +August 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/podman-logs.1.md b/docs/podman-logs.1.md new file mode 100644 index 000000000..8b8c755b9 --- /dev/null +++ b/docs/podman-logs.1.md @@ -0,0 +1,61 @@ +% podman(1) podman-logs - Fetch the logs of a container +% Ryan Cole +# podman-logs "1" "March 2017" "podman" + +## NAME +podman logs - Fetch the logs of a container + +## SYNOPSIS +**podman** **logs** [*options* [...]] container + +## DESCRIPTION +The podman logs command batch-retrieves whatever logs are present for a container at the time of execution. This does not guarantee execution order when combined with podman run (i.e. your run may not have generated any logs at the time you execute podman logs + +## OPTIONS + +**--follow, -f** + +Follow log output. Default is false + +**--since=TIMESTAMP** + +Show logs since TIMESTAMP + +**--tail=LINES** + +Ouput the specified number of LINES at the end of the logs. LINES must be a positive integer. Defaults to 0, which prints all lines + +## EXAMPLE + +podman logs b3f2436bdb978c1d33b1387afb5d7ba7e3243ed2ce908db431ac0069da86cb45 + +2017/08/07 10:16:21 Seeked /var/log/crio/pods/eb296bd56fab164d4d3cc46e5776b54414af3bf543d138746b25832c816b933b/c49f49788da14f776b7aa93fb97a2a71f9912f4e5a3e30397fca7dfe0ee0367b.log - &{Offset:0 Whence:0} +1:C 07 Aug 14:10:09.055 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo +1:C 07 Aug 14:10:09.055 # Redis version=4.0.1, bits=64, commit=00000000, modified=0, pid=1, just started +1:C 07 Aug 14:10:09.055 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf +1:M 07 Aug 14:10:09.055 # You requested maxclients of 10000 requiring at least 10032 max file descriptors. +1:M 07 Aug 14:10:09.055 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted. +1:M 07 Aug 14:10:09.055 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'. +1:M 07 Aug 14:10:09.056 * Running mode=standalone, port=6379. +1:M 07 Aug 14:10:09.056 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. +1:M 07 Aug 14:10:09.056 # Server initialized + + +podman logs --tail 2 b3f2436bdb97 + +1:M 07 Aug 14:10:09.056 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. +1:M 07 Aug 14:10:09.056 # Server initialized + +podman logs 224c375f27cd --since 2017-08-07T10:10:09.055837383-04:00 myserver + +1:M 07 Aug 14:10:09.055 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted. +1:M 07 Aug 14:10:09.055 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'. +1:M 07 Aug 14:10:09.056 * Running mode=standalone, port=6379. +1:M 07 Aug 14:10:09.056 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. +1:M 07 Aug 14:10:09.056 # Server initialized + +## SEE ALSO +podman(1) + +## HISTORY +August 2017, Originally compiled by Ryan Cole diff --git a/docs/podman-mount.1.md b/docs/podman-mount.1.md new file mode 100644 index 000000000..b0ebd05fb --- /dev/null +++ b/docs/podman-mount.1.md @@ -0,0 +1,50 @@ +% podman(1) podman-mount - Mount a working container's root filesystem. +% Dan Walsh +# podman-mount "1" "July 2017" "podman" + +## NAME +podman mount - Mount a working container's root filesystem + +## SYNOPSIS +**podman** **mount** + +**podman** **mount** **containerID** + +## DESCRIPTION +Mounts the specified container's root file system in a location which can be +accessed from the host, and returns its location. + +If you execute the command without any arguments, the tool will list all of the +currently mounted containers. + +## RETURN VALUE +The location of the mounted file system. On error an empty string and errno is +returned. + +## OPTIONS + +**--format** + Print the mounted containers in specified format (json) + +**--notruncate** + +Do not truncate IDs in output. + +**--label** + +SELinux label for the mount point + +## EXAMPLE + +podman mount c831414b10a3 + +/var/lib/containers/storage/overlay/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged + +podman mount + +c831414b10a3 /var/lib/containers/storage/overlay/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged + +a7060253093b /var/lib/containers/storage/overlay/0ff7d7ca68bed1ace424f9df154d2dd7b5a125c19d887f17653cbcd5b6e30ba1/merged + +## SEE ALSO +podman(1), podman-umount(1), mount(8) diff --git a/docs/podman-pause.1.md b/docs/podman-pause.1.md new file mode 100644 index 000000000..274c95320 --- /dev/null +++ b/docs/podman-pause.1.md @@ -0,0 +1,24 @@ +% podman(1) podman-pause - Pause one or more containers +% Dan Walsh +# podman-pause "1" "September 2017" "podman" + +## NAME +podman pause - Pause one or more containers + +## SYNOPSIS +**podman pause [OPTIONS] CONTAINER [...]** + +## DESCRIPTION +Pauses all the processes in one or more containers. You may use container IDs or names as input. + +## EXAMPLE + +podman pause mywebserver + +podman pause 860a4b23 + +## SEE ALSO +podman(1), podman-unpause(1) + +## HISTORY +September 2017, Originally compiled by Dan Walsh diff --git a/docs/podman-ps.1.md b/docs/podman-ps.1.md new file mode 100644 index 000000000..493a11465 --- /dev/null +++ b/docs/podman-ps.1.md @@ -0,0 +1,131 @@ +% podman(1) podman-ps - Simple tool to list containers +% Urvashi Mohnani +% podman-ps "1" "AUGUST 2017" "podman" + +## NAME +podman-ps - Prints out information about containers + +## SYNOPSIS +**podman ps** +[**--all**|**-a**] +[**--no-trunc**] +[**--quiet**|**-q**] +[**--fromat**] +[**--help**|**-h**] + +## DESCRIPTION +**podman ps** lists the running containers on the system. Use the **--all** flag to view +all the containers information. By default it lists: + + * container id + * the name of the image the container is using + * the COMMAND the container is executing + * the time the container was created + * the status of the container + * port mappings the container is using + * alternative names for the container + +**podman [GLOBAL OPTIONS]** + +**podman ps [GLOBAL OPTIONS]** + +**podman ps [OPTIONS]** + +## OPTIONS + +**--all, -a** + Show all the containers, default is only running containers + +**--no-trunc** + Display the extended information + +**--quiet, -q** + Print the numeric IDs of the containers only + +**--format** + Pretty-print containers to JSON or using a Go template + +Valid placeholders for the Go template are listed below: + +| **Placeholder** | **Description** | +| --------------- | ------------------------------------------------ | +| .ID | Container ID | +| .Image | Image ID/Name | +| .Command | Quoted command used | +| .CreatedAt | Creation time for container | +| .RunningFor | Time elapsed since container was started | +| .Status | Status of container | +| .Ports | Exposed ports | +| .Size | Size of container | +| .Names | Name of container | +| .Labels | All the labels assigned to the container | +| .Mounts | Volumes mounted in the container | + + +**--size, -s** + Display the total file size + +**--last, -n** + Print the n last created containers (all states) + +**--latest, -l** + show the latest container created (all states) + +**--namespace, --ns** + Display namespace information + +**--filter, -f** + Filter output based on conditions given + +Valid filters are listed below: + +| **Filter** | **Description** | +| --------------- | ------------------------------------------------------------------- | +| id | [ID] Container's ID | +| name | [Name] Container's name | +| label | [Key] or [Key=Value] Label assigned to a container | +| exited | [Int] Container's exit code | +| status | [Status] Container's status, e.g *running*, *stopped* | +| ancestor | [ImageName] Image or descendant used to create container | +| before | [ID] or [Name] Containers created before this container | +| since | [ID] or [Name] Containers created since this container | +| volume | [VolumeName] or [MountpointDestination] Volume mounted in container | + +## EXAMPLES + +``` +sudo podman ps -a +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +02f65160e14ca redis:alpine "redis-server" 19 hours ago Exited (-1) 19 hours ago 6379/tcp k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0 +69ed779d8ef9f redis:alpine "redis-server" 25 hours ago Created 6379/tcp k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1 +``` + +``` +sudo podman ps -a -s +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE +02f65160e14ca redis:alpine "redis-server" 20 hours ago Exited (-1) 20 hours ago 6379/tcp k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0 27.49 MB +69ed779d8ef9f redis:alpine "redis-server" 25 hours ago Created 6379/tcp k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1 27.49 MB +``` + +``` +sudo podman ps -a --format "{{.ID}} {{.Image}} {{.Labels}} {{.Mounts}}" +02f65160e14ca redis:alpine tier=backend proc,tmpfs,devpts,shm,mqueue,sysfs,cgroup,/var/run/,/var/run/ +69ed779d8ef9f redis:alpine batch=no,type=small proc,tmpfs,devpts,shm,mqueue,sysfs,cgroup,/var/run/,/var/run/ +``` + +``` +sudo podman ps --ns -a +CONTAINER ID NAMES PID CGROUP IPC MNT NET PIDNS USER UTS +3557d882a82e3 k8s_container2_podsandbox1_redhat.test.crio_redhat-test-crio_1 29910 4026531835 4026532585 4026532593 4026532508 4026532595 4026531837 4026532594 +09564cdae0bec k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1 29851 4026531835 4026532585 4026532590 4026532508 4026532592 4026531837 4026532591 +a31ebbee9cee7 k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0 29717 4026531835 4026532585 4026532587 4026532508 4026532589 4026531837 4026532588 +``` + +## ps +Print a list of containers + +## SEE ALSO +podman(1), crio(8), crio.conf(5) + +## HISTORY +August 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/podman-pull.1.md b/docs/podman-pull.1.md new file mode 100644 index 000000000..ccb2248fb --- /dev/null +++ b/docs/podman-pull.1.md @@ -0,0 +1,136 @@ +% podman(1) podman-pull - Simple tool to pull an image from a registry +% Urvashi Mohnani +# podman-pull "1" "July 2017" "podman" + +## NAME +podman-pull - Pull an image from a registry + +## SYNOPSIS +**podman pull** +**NAME[:TAG|@DIGEST]** +[**--help**|**-h**] + +## DESCRIPTION +Copies an image from a registry onto the local machine. **podman pull** pulls an +image from Docker Hub if a registry is not specified in the command line argument. +If an image tag is not specified, **podman pull** defaults to the image with the +**latest** tag (if it exists) and pulls it. **podman pull** can also pull an image +using its digest **podman pull [image]@[digest]**. **podman pull** can be used to pull +images from archives and local storage using different transports. + +## imageID +Image stored in local container/storage + +## SOURCE + + The SOURCE is a location to get container images + The Image "SOURCE" uses a "transport":"details" format. + + Multiple transports are supported: + + **dir:**_path_ + An existing local directory _path_ storing the manifest, layer tarballs and signatures as individual files. This is a non-standardized format, primarily useful for debugging or noninvasive container inspection. + + **docker://**_docker-reference_ + An image in a registry implementing the "Docker Registry HTTP API V2". By default, uses the authorization state in `$XDG_RUNTIME_DIR/containers/auth.json`, which is set using `(podman login)`. If the authorization state is not found there, `$HOME/.docker/config.json` is checked, which is set using `(docker login)`. + + **docker-archive:**_path_[**:**_docker-reference_] + An image is stored in the `docker save` formatted file. _docker-reference_ is only used when creating such a file, and it must not contain a digest. + + **docker-daemon:**_docker-reference_ + An image _docker-reference_ stored in the docker daemon internal storage. _docker-reference_ must contain either a tag or a digest. Alternatively, when reading images, the format can also be docker-daemon:algo:digest (an image ID). + + **oci-archive:**_path_**:**_tag_ + An image _tag_ in a directory compliant with "Open Container Image Layout Specification" at _path_. + + **ostree:**_image_[**@**_/absolute/repo/path_] + An image in local OSTree repository. _/absolute/repo/path_ defaults to _/ostree/repo_. + +**podman [GLOBAL OPTIONS]** + +**podman pull [GLOBAL OPTIONS]** + +**podman pull NAME[:TAG|@DIGEST]** + +## OPTIONS + +**--authfile** + +Path of the authentication file. Default is ${XDG_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`. +If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`. + +**--cert-dir** + +Pathname of a directory containing TLS certificates and keys + +**--creds** + +Credentials (USERNAME:PASSWORD) to use for authenticating to a registry + +**--quiet, -q** + +Suppress output information when pulling images + +**--signature-policy="PATHNAME"** + +Pathname of a signature policy file to use. It is not recommended that this +option be used, as the default behavior of using the system-wide default policy +(frequently */etc/containers/policy.json*) is most often preferred + +**--tls-verify** + +Require HTTPS and verify certificates when contacting registries (default: true) + +## EXAMPLES + +``` +# podman pull --signature-policy /etc/containers/policy.json alpine:latest +Trying to pull registry.access.redhat.com/alpine:latest... Failed +Trying to pull registry.fedoraproject.org/alpine:latest... Failed +Trying to pull docker.io/library/alpine:latest...Getting image source signatures +Copying blob sha256:88286f41530e93dffd4b964e1db22ce4939fffa4a4c665dab8591fbab03d4926 + 1.90 MB / 1.90 MB [========================================================] 0s +Copying config sha256:76da55c8019d7a47c347c0dceb7a6591144d232a7dd616242a367b8bed18ecbc + 1.48 KB / 1.48 KB [========================================================] 0s +Writing manifest to image destination +Storing signatures +``` + +``` +# podman pull --authfile temp-auths/myauths.json docker://docker.io/umohnani/finaltest +Trying to pull docker.io/umohnani/finaltest:latest...Getting image source signatures +Copying blob sha256:6d987f6f42797d81a318c40d442369ba3dc124883a0964d40b0c8f4f7561d913 + 1.90 MB / 1.90 MB [========================================================] 0s +Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156 + 1.41 KB / 1.41 KB [========================================================] 0s +Writing manifest to image destination +Storing signatures +``` + +``` +# podman pull --creds testuser:testpassword docker.io/umohnani/finaltest +Trying to pull docker.io/umohnani/finaltest:latest...Getting image source signatures +Copying blob sha256:6d987f6f42797d81a318c40d442369ba3dc124883a0964d40b0c8f4f7561d913 + 1.90 MB / 1.90 MB [========================================================] 0s +Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156 + 1.41 KB / 1.41 KB [========================================================] 0s +Writing manifest to image destination +Storing signatures +``` + +``` +# podman pull --tls-verify=false --cert-dir image/certs docker.io/umohnani/finaltest +Trying to pull docker.io/umohnani/finaltest:latest...Getting image source signatures +Copying blob sha256:6d987f6f42797d81a318c40d442369ba3dc124883a0964d40b0c8f4f7561d913 + 1.90 MB / 1.90 MB [========================================================] 0s +Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156 + 1.41 KB / 1.41 KB [========================================================] 0s +Writing manifest to image destination +Storing signatures +``` + +## SEE ALSO +podman(1), podman-push(1), crio(8), crio.conf(5), docker-login(1) + +## HISTORY +July 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/podman-push.1.md b/docs/podman-push.1.md new file mode 100644 index 000000000..63c75ea36 --- /dev/null +++ b/docs/podman-push.1.md @@ -0,0 +1,141 @@ +% podman(1) podman-push - Push an image from local storage to elsewhere +% Dan Walsh +# podman-push "1" "June 2017" "podman" + +## NAME +podman push - Push an image from local storage to elsewhere + +## SYNOPSIS +**podman** **push** [*options* [...]] **imageID** [**destination**] + +## DESCRIPTION +Pushes an image from local storage to a specified destination. +Push is mainly used to push images to registries, however **podman push** +can be used to save images to tarballs and directories using the following +transports: **dir:**, **docker-archive:**, **docker-daemon:**, **oci-archive:**, and **ostree:**. + +## imageID +Image stored in local container/storage + +## DESTINATION + + The DESTINATION is a location to store container images + The Image "DESTINATION" uses a "transport":"details" format. + If a transport is not given, podman push will attempt to push + to a registry. + + Multiple transports are supported: + + **dir:**_path_ + An existing local directory _path_ storing the manifest, layer tarballs and signatures as individual files. This is a non-standardized format, primarily useful for debugging or noninvasive container inspection. + + **docker://**_docker-reference_ + An image in a registry implementing the "Docker Registry HTTP API V2". By default, uses the authorization state in `$XDG_RUNTIME_DIR/containers/auth.json`, which is set using `(podman login)`. If the authorization state is not found there, `$HOME/.docker/config.json` is checked, which is set using `(docker login)`. + + **docker-archive:**_path_[**:**_docker-reference_] + An image is stored in the `docker save` formatted file. _docker-reference_ is only used when creating such a file, and it must not contain a digest. + + **docker-daemon:**_docker-reference_ + An image _docker-reference_ stored in the docker daemon internal storage. _docker-reference_ must contain either a tag or a digest. Alternatively, when reading images, the format can also be docker-daemon:algo:digest (an image ID). + + **oci-archive:**_path_**:**_tag_ + An image _tag_ in a directory compliant with "Open Container Image Layout Specification" at _path_. + + **ostree:**_image_[**@**_/absolute/repo/path_] + An image in local OSTree repository. _/absolute/repo/path_ defaults to _/ostree/repo_. + +## OPTIONS + +**--authfile** + +Path of the authentication file. Default is ${XDG_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`. +If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`. + +**--creds="CREDENTIALS"** + +Credentials (USERNAME:PASSWORD) to use for authenticating to a registry + +**cert-dir="PATHNAME"** + +Pathname of a directory containing TLS certificates and keys + +**--compress** + +Compress tarball image layers when pushing to a directory using the 'dir' transport. (default is same compression type, compressed or uncompressed, as source) +Note: This flag can only be set when using the **dir** transport + +**--format, -f** + +Manifest Type (oci, v2s1, or v2s2) to use when pushing an image to a directory using the 'dir:' transport (default is manifest type of source) +Note: This flag can only be set when using the **dir** transport + +**--quiet, -q** + +When writing the output image, suppress progress output + +**--remove-signatures** + +Discard any pre-existing signatures in the image + +**--signature-policy="PATHNAME"** + +Pathname of a signature policy file to use. It is not recommended that this +option be used, as the default behavior of using the system-wide default policy +(frequently */etc/containers/policy.json*) is most often preferred + +**--sign-by="KEY"** + +Add a signature at the destination using the specified key + +**--tls-verify** + +Require HTTPS and verify certificates when contacting registries (default: true) + +## EXAMPLE + +This example extracts the imageID image to a local directory in docker format. + + `# podman push imageID dir:/path/to/image` + +This example extracts the imageID image to a local directory in oci format. + + `# podman push imageID oci-archive:/path/to/layout:image:tag` + +This example extracts the imageID image to a container registry named registry.example.com + + `# podman push imageID docker://registry.example.com/repository:tag` + +This example extracts the imageID image and puts into the local docker container store + + `# podman push imageID docker-daemon:image:tag` + +This example pushes the alpine image to umohnani/alpine on dockerhub and reads the creds from +the path given to --authfile + +``` +# podman push --authfile temp-auths/myauths.json alpine docker://docker.io/umohnani/alpine +Getting image source signatures +Copying blob sha256:5bef08742407efd622d243692b79ba0055383bbce12900324f75e56f589aedb0 + 4.03 MB / 4.03 MB [========================================================] 1s +Copying config sha256:ad4686094d8f0186ec8249fc4917b71faa2c1030d7b5a025c29f26e19d95c156 + 1.41 KB / 1.41 KB [========================================================] 1s +Writing manifest to image destination +Storing signatures +``` + +This example pushes the rhel7 image to rhel7-dir with the "oci" manifest type +``` +# podman push --format oci registry.access.redhat.com/rhel7 dir:rhel7-dir +Getting image source signatures +Copying blob sha256:9cadd93b16ff2a0c51ac967ea2abfadfac50cfa3af8b5bf983d89b8f8647f3e4 + 71.41 MB / 71.41 MB [======================================================] 9s +Copying blob sha256:4aa565ad8b7a87248163ce7dba1dd3894821aac97e846b932ff6b8ef9a8a508a + 1.21 KB / 1.21 KB [========================================================] 0s +Copying config sha256:f1b09a81455c351eaa484b61aacd048ab613c08e4c5d1da80c4c46301b03cf3b + 3.01 KB / 3.01 KB [========================================================] 0s +Writing manifest to image destination +Storing signatures +``` + +## SEE ALSO +podman(1), podman-pull(1), crio(8), crio.conf(5), docker-login(1) diff --git a/docs/podman-rm.1.md b/docs/podman-rm.1.md new file mode 100644 index 000000000..0d86dae1c --- /dev/null +++ b/docs/podman-rm.1.md @@ -0,0 +1,38 @@ +% podman(1) podman-rm - Remove one or more containers +% Ryan Cole +# podman-rm "1" "August 2017" "podman" + +## NAME +podman rm - Remove one or more containers + +## SYNOPSIS +**podman** **rm** [*options* [...]] container + +## DESCRIPTION +podman rm will remove one or more containers from the host. The container name or ID can be used. This does not remove images. Running containers will not be removed without the -f option + +## OPTIONS + +**--force, f** + +Force the removal of a running container + +**--all, a** + +Remove all containers. Can be used in conjunction with -f as well. + +## EXAMPLE + +podman rm mywebserver + +podman rm mywebserver myflaskserver 860a4b23 + +podman rm -f 860a4b23 + +podman rm -f -a + +## SEE ALSO +podman(1), podman-rmi(1) + +## HISTORY +August 2017, Originally compiled by Ryan Cole diff --git a/docs/podman-rmi.1.md b/docs/podman-rmi.1.md new file mode 100644 index 000000000..9ef3cb963 --- /dev/null +++ b/docs/podman-rmi.1.md @@ -0,0 +1,37 @@ +% podman(1) podman-rmi - Removes one or more images +% Dan Walsh +# podman-rmi "1" "March 2017" "podman" + +## NAME +podman rmi - Removes one or more images + +## SYNOPSIS +**podman** **rmi** **imageID [...]** + +## DESCRIPTION +Removes one or more locally stored images. + +## OPTIONS + +**-all**, **-a** + +Remove all of the locally storage images +**--force, -f** + +Executing this command will stop all containers that are using the image and remove them from the system + +## EXAMPLE + +podman rmi imageID + +podman rmi --force imageID + +podman rmi imageID1 imageID2 imageID3 + +podman rmi -a -f + +## SEE ALSO +podman(1) + +## HISTORY +March 2017, Originally compiled by Dan Walsh diff --git a/docs/podman-run.1.md b/docs/podman-run.1.md new file mode 100644 index 000000000..36efc2a2e --- /dev/null +++ b/docs/podman-run.1.md @@ -0,0 +1,799 @@ +% podman(1) podman-run - Run a command in a container +% Dan Walsh +podman-run - Run a command in a new container + +# SYNOPSIS +**podman run** [*options* [...]] IMAGE [COMMAND] [ARG...] + +# DESCRIPTION + +Run a process in a new container. **podman run** starts a process with its own +file system, its own networking, and its own isolated process tree. The IMAGE +which starts the process may define defaults related to the process that will be +run in the container, the networking to expose, and more, but **podman run** +gives final control to the operator or administrator who starts the container +from the image. For that reason **podman run** has more options than any other +podman command. + +If the IMAGE is not already loaded then **podman run** will pull the IMAGE, and +all image dependencies, from the repository in the same way running **podman +pull** IMAGE, before it starts the container from that image. + +# OPTIONS +**--add-host**=[] + Add a custom host-to-IP mapping (host:ip) + + Add a line to /etc/hosts. The format is hostname:ip. The **--add-host** +option can be set multiple times. + +**-a**, **--attach**=[] + Attach to STDIN, STDOUT or STDERR. + + In foreground mode (the default when **-d** +is not specified), **podman run** can start the process in the container +and attach the console to the process's standard input, output, and standard +error. It can even pretend to be a TTY (this is what most commandline +executables expect) and pass along signals. The **-a** option can be set for +each of stdin, stdout, and stderr. + +**--blkio-weight**=*0* + Block IO weight (relative weight) accepts a weight value between 10 and 1000. + +**--blkio-weight-device**=[] + Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`). + +**--cap-add**=[] + Add Linux capabilities + +**--cap-drop**=[] + Drop Linux capabilities + +**--cgroup-parent**="" + Path to cgroups under which the cgroup for the container will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist. + +**--cidfile**="" + Write the container ID to the file + +**--cpu-count**=*0* + Limit the number of CPUs available for execution by the container. + + On Windows Server containers, this is approximated as a percentage of total CPU usage. + + On Windows Server containers, the processor resource controls are mutually exclusive, the order of precedence is CPUCount first, then CPUShares, and CPUPercent last. + +**--cpu-period**=*0* + Limit the CPU CFS (Completely Fair Scheduler) period + + Limit the container's CPU usage. This flag tell the kernel to restrict the container's CPU usage to the period you specify. + +**--cpu-quota**=*0* + Limit the CPU CFS (Completely Fair Scheduler) quota + + Limit the container's CPU usage. By default, containers run with the full +CPU resource. This flag tell the kernel to restrict the container's CPU usage +to the quota you specify. + +**--cpu-rt-period**=0 + Limit the CPU real-time period in microseconds + + Limit the container's Real Time CPU usage. This flag tell the kernel to restrict the container's Real Time CPU usage to the period you specify. + +**--cpu-rt-runtime**=0 + Limit the CPU real-time runtime in microseconds + + Limit the containers Real Time CPU usage. This flag tells the kernel to limit the amount of time in a given CPU period Real Time tasks may consume. Ex: + Period of 1,000,000us and Runtime of 950,000us means that this container could consume 95% of available CPU and leave the remaining 5% to normal priority tasks. + + The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup. + +**--cpu-shares**=*0* + CPU shares (relative weight) + + By default, all containers get the same proportion of CPU cycles. This proportion +can be modified by changing the container's CPU share weighting relative +to the weighting of all other running containers. + +To modify the proportion from the default of 1024, use the **--cpu-shares** +flag to set the weighting to 2 or higher. + +The proportion will only apply when CPU-intensive processes are running. +When tasks in one container are idle, other containers can use the +left-over CPU time. The actual amount of CPU time will vary depending on +the number of containers running on the system. + +For example, consider three containers, one has a cpu-share of 1024 and +two others have a cpu-share setting of 512. When processes in all three +containers attempt to use 100% of CPU, the first container would receive +50% of the total CPU time. If you add a fourth container with a cpu-share +of 1024, the first container only gets 33% of the CPU. The remaining containers +receive 16.5%, 16.5% and 33% of the CPU. + +On a multi-core system, the shares of CPU time are distributed over all CPU +cores. Even if a container is limited to less than 100% of CPU time, it can +use 100% of each individual CPU core. + +For example, consider a system with more than three cores. If you start one +container **{C0}** with **-c=512** running one process, and another container +**{C1}** with **-c=1024** running two processes, this can result in the following +division of CPU shares: + + PID container CPU CPU share + 100 {C0} 0 100% of CPU0 + 101 {C1} 1 100% of CPU1 + 102 {C1} 2 100% of CPU2 + +**--cpus**=0.0 + Number of CPUs. The default is *0.0* which means no limit. + +**--cpuset-cpus**="" + CPUs in which to allow execution (0-3, 0,1) + +**--cpuset-mems**="" + Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + + If you have four memory nodes on your system (0-3), use `--cpuset-mems=0,1` +then processes in your container will only use memory from the first +two memory nodes. + +**-d**, **--detach**=*true*|*false* + Detached mode: run the container in the background and print the new container ID. The default is *false*. + + At any time you can run **podman ps** in +the other shell to view a list of the running containers. You can reattach to a +detached container with **podman attach**. If you choose to run a container in +the detached mode, then you cannot use the **-rm** option. + + When attached in the tty mode, you can detach from the container (and leave it +running) using a configurable key sequence. The default sequence is `CTRL-p CTRL-q`. +You configure the key sequence using the **--detach-keys** option or a configuration file. +See **config-json(5)** for documentation on using a configuration file. + +**--detach-keys**="" + Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + +**--device**=[] + Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm) + +**--device-read-bps**=[] + Limit read rate (bytes per second) from a device (e.g. --device-read-bps=/dev/sda:1mb) + +**--device-read-iops**=[] + Limit read rate (IO per second) from a device (e.g. --device-read-iops=/dev/sda:1000) + +**--device-write-bps**=[] + Limit write rate (bytes per second) to a device (e.g. --device-write-bps=/dev/sda:1mb) + +**--device-write-iops**=[] + Limit write rate (IO per second) to a device (e.g. --device-write-iops=/dev/sda:1000) + +**--dns**=[] + Set custom DNS servers + + This option can be used to override the DNS +configuration passed to the container. Typically this is necessary when the +host DNS configuration is invalid for the container (e.g., 127.0.0.1). When this +is the case the **--dns** flags is necessary for every run. + +**--dns-option**=[] + Set custom DNS options + +**--dns-search**=[] + Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain) + +**--entrypoint**="" + Overwrite the default ENTRYPOINT of the image + + This option allows you to overwrite the default entrypoint of the image. + The ENTRYPOINT of an image is similar to a COMMAND +because it specifies what executable to run when the container starts, but it is +(purposely) more difficult to override. The ENTRYPOINT gives a container its +default nature or behavior, so that when you set an ENTRYPOINT you can run the +container as if it were that binary, complete with default options, and you can +pass in more options via the COMMAND. But, sometimes an operator may want to run +something else inside the container, so you can override the default ENTRYPOINT +at runtime by using a **--entrypoint** and a string to specify the new +ENTRYPOINT. + +**-e**, **--env**=[] + Set environment variables + + This option allows you to specify arbitrary +environment variables that are available for the process that will be launched +inside of the container. + +**--env-file**=[] + Read in a line delimited file of environment variables + +**--expose**=[] + Expose a port, or a range of ports (e.g. --expose=3300-3310) to set up port redirection + on the host system. + +**--group-add**=[] + Add additional groups to run as + +**--hostname**="" + Container host name + + Sets the container host name that is available inside the container. + +**--help** + Print usage statement + +**-i**, **--interactive**=*true*|*false* + Keep STDIN open even if not attached. The default is *false*. + + When set to true, keep stdin open even if not attached. The default is false. + +**--ip**="" + Sets the container's interface IPv4 address (e.g. 172.23.0.9) + + It can only be used in conjunction with **--network** for user-defined networks + +**--ip6**="" + Sets the container's interface IPv6 address (e.g. 2001:db8::1b99) + + It can only be used in conjunction with **--network** for user-defined networks + +**--ipc**="" + Default is to create a private IPC namespace (POSIX SysV IPC) for the container + 'container:': reuses another container shared memory, semaphores and message queues + 'host': use the host shared memory,semaphores and message queues inside the container. Note: the host mode gives the container full access to local shared memory and is therefore considered insecure. + +**--kernel-memory**="" + Kernel memory limit (format: `[]`, where unit = b, k, m or g) + + Constrains the kernel memory available to a container. If a limit of 0 +is specified (not using `--kernel-memory`), the container's kernel memory +is not limited. If you specify a limit, it may be rounded up to a multiple +of the operating system's page size and the value can be very large, +millions of trillions. + +**-l**, **--label**=[] + Add metadata to a container (e.g., --label com.example.key=value) + +**--label-file**=[] + Read in a line delimited file of labels + +**--link-local-ip**=[] + Add one or more link-local IPv4/IPv6 addresses to the container's interface + +**--log-driver**="*json-file*|*syslog*|*journald*|*gelf*|*fluentd*|*awslogs*|*splunk*|*etwlogs*|*gcplogs*|*none*" + Logging driver for the container. Default is defined by daemon `--log-driver` flag. + **Warning**: the `podman logs` command works only for the `json-file` and + `journald` logging drivers. + +**--log-opt**=[] + Logging driver specific options. + +**--mac-address**="" + Container MAC address (e.g. 92:d0:c6:0a:29:33) + + Remember that the MAC address in an Ethernet network must be unique. +The IPv6 link-local address will be based on the device's MAC address +according to RFC4862. + +**-m**, **--memory**="" + Memory limit (format: [], where unit = b, k, m or g) + + Allows you to constrain the memory available to a container. If the host +supports swap memory, then the **-m** memory setting can be larger than physical +RAM. If a limit of 0 is specified (not using **-m**), the container's memory is +not limited. The actual limit may be rounded up to a multiple of the operating +system's page size (the value would be very large, that's millions of trillions). + +**--memory-reservation**="" + Memory soft limit (format: [], where unit = b, k, m or g) + + After setting memory reservation, when the system detects memory contention +or low memory, containers are forced to restrict their consumption to their +reservation. So you should always set the value below **--memory**, otherwise the +hard limit will take precedence. By default, memory reservation will be the same +as memory limit. + +**--memory-swap**="LIMIT" + A limit value equal to memory plus swap. Must be used with the **-m** +(**--memory**) flag. The swap `LIMIT` should always be larger than **-m** +(**--memory**) value. By default, the swap `LIMIT` will be set to double +the value of --memory. + + The format of `LIMIT` is `[]`. Unit can be `b` (bytes), +`k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you don't specify a +unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap. + +**--memory-swappiness**="" + Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + +**--name**="" + Assign a name to the container + + The operator can identify a container in three ways: + UUID long identifier (“f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778”) + UUID short identifier (“f78375b1c487”) + Name (“jonah”) + + podman generates a UUID for each container, and if a name is not assigned +to the container with **--name** then the daemon will also generate a random +string name. The name is useful any place you need to identify a container. +This works for both background and foreground containers. + +**--network**="*bridge*" + Set the Network mode for the container + 'bridge': create a network stack on the default bridge + 'none': no networking + 'container:': reuse another container's network stack + 'host': use the podman host network stack. Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure. + '|': connect to a user-defined network + +**--network-alias**=[] + Add network-scoped alias for the container + +**--oom-kill-disable**=*true*|*false* + Whether to disable OOM Killer for the container or not. + +**--oom-score-adj**="" + Tune the host's OOM preferences for containers (accepts -1000 to 1000) + +**--pid**="" + Set the PID mode for the container + Default is to create a private PID namespace for the container + 'container:': join another container's PID namespace + 'host': use the host's PID namespace for the container. Note: the host mode gives the container full access to local PID and is therefore considered insecure. + +**--pids-limit**="" + Tune the container's pids limit. Set `-1` to have unlimited pids for the container. + +**--pod**="" + Run container in an existing pod + +**--privileged**=*true*|*false* + Give extended privileges to this container. The default is *false*. + + By default, podman containers are +“unprivileged” (=false) and cannot, for example, modify parts of the kernel. +This is because by default a container is not allowed to access any devices. +A “privileged” container is given access to all devices. + + When the operator executes **podman run --privileged**, podman enables access +to all devices on the host as well as set turn off most of the security messurs +protecting the host from the container. + +**-p**, **--publish**=[] + Publish a container's port, or range of ports, to the host + + Format: `ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort` +Both hostPort and containerPort can be specified as a range of ports. +When specifying ranges for both, the number of container ports in the range must match the number of host ports in the range. +(e.g., `podman run -p 1234-1236:1222-1224 --name thisWorks -t busybox` +but not `podman run -p 1230-1236:1230-1240 --name RangeContainerPortsBiggerThanRangeHostPorts -t busybox`) +With ip: `podman run -p 127.0.0.1:$HOSTPORT:$CONTAINERPORT --name CONTAINER -t someimage` +Use `podman port` to see the actual mapping: `podman port CONTAINER $CONTAINERPORT` + +**-P**, **--publish-all**=*true*|*false* + Publish all exposed ports to random ports on the host interfaces. The default is *false*. + + When set to true publish all exposed ports to the host interfaces. The +default is false. If the operator uses -P (or -p) then podman will make the +exposed port accessible on the host and the ports will be available to any +client that can reach the host. When using -P, podman will bind any exposed +port to a random port on the host within an *ephemeral port range* defined by +`/proc/sys/net/ipv4/ip_local_port_range`. To find the mapping between the host +ports and the exposed ports, use `podman port`. + +**--read-only**=*true*|*false* + Mount the container's root filesystem as read only. + + By default a container will have its root filesystem writable allowing processes +to write files anywhere. By specifying the `--read-only` flag the container will have +its root filesystem mounted as read only prohibiting any writes. + +**--rm**=*true*|*false* + Automatically remove the container when it exits. The default is *false*. + `--rm` flag can work together with `-d`, and auto-removal will be done on daemon side. Note that it's +incompatible with any restart policy other than `none`. + +**--security-opt**=[] + Security Options + + "label=user:USER" : Set the label user for the container + "label=role:ROLE" : Set the label role for the container + "label=type:TYPE" : Set the label type for the container + "label=level:LEVEL" : Set the label level for the container + "label=disable" : Turn off label confinement for the container + "no-new-privileges" : Disable container processes from gaining additional privileges + + "seccomp=unconfined" : Turn off seccomp confinement for the container + "seccomp=profile.json : White listed syscalls seccomp Json file to be used as a seccomp filter + + "apparmor=unconfined" : Turn off apparmor confinement for the container + "apparmor=your-profile" : Set the apparmor confinement profile for the container + +**--shm-size**="" + Size of `/dev/shm`. The format is ``. `number` must be greater than `0`. + Unit is optional and can be `b` (bytes), `k` (kilobytes), `m`(megabytes), or `g` (gigabytes). + If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses `64m`. + +**--sig-proxy**=*true*|*false* + Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied. The default is *true*. + +**--stop-signal**=*SIGTERM* + Signal to stop a container. Default is SIGTERM. + +**--stop-timeout**=*10* + Timeout (in seconds) to stop a container. Default is 10. + +**--storage-opt**=[] + Storage driver options per container + + $ podman run -it --storage-opt size=120G fedora /bin/bash + + This (size) will allow to set the container rootfs size to 120G at creation time. + This option is only available for the `devicemapper`, `btrfs`, `overlay2` and `zfs` graph drivers. + For the `devicemapper`, `btrfs` and `zfs` storage drivers, user cannot pass a size less than the Default BaseFS Size. + For the `overlay2` storage driver, the size option is only available if the backing fs is `xfs` and mounted with the `pquota` mount option. + Under these conditions, user can pass any size less then the backing fs size. + +**--sysctl**=SYSCTL + Configure namespaced kernel parameters at runtime + + IPC Namespace - current sysctls allowed: + + kernel.msgmax, kernel.msgmnb, kernel.msgmni, kernel.sem, kernel.shmall, kernel.shmmax, kernel.shmmni, kernel.shm_rmid_forced + Sysctls beginning with fs.mqueue.* + + Note: if you use the `--ipc=host` option these sysctls will not be allowed. + + Network Namespace - current sysctls allowed: + Sysctls beginning with net.* + + Note: if you use the `--network=host` option these sysctls will not be allowed. + +**--tmpfs**=[] Create a tmpfs mount + + Mount a temporary filesystem (`tmpfs`) mount into a container, for example: + + $ podman run -d --tmpfs /tmp:rw,size=787448k,mode=1777 my_image + + This command mounts a `tmpfs` at `/tmp` within the container. The supported mount +options are the same as the Linux default `mount` flags. If you do not specify +any options, the systems uses the following options: +`rw,noexec,nosuid,nodev,size=65536k`. + +**-t**, **--tty**=*true*|*false* + Allocate a pseudo-TTY. The default is *false*. + + When set to true podman will allocate a pseudo-tty and attach to the standard +input of the container. This can be used, for example, to run a throwaway +interactive shell. The default is false. + +Note: The **-t** option is incompatible with a redirection of the podman client +standard input. + +**--ulimit**=[] + Ulimit options + +**-u**, **--user**="" + Sets the username or UID used and optionally the groupname or GID for the specified command. + + The followings examples are all valid: + --user [user | user:group | uid | uid:gid | user:gid | uid:group ] + + Without this argument the command will be run as root in the container. + +**--userns**="" + Set the usernamespace mode for the container when `userns-remap` option is enabled. + **host**: use the host usernamespace and enable all privileged options (e.g., `pid=host` or `--privileged`). + +**--uts**=*host* + Set the UTS mode for the container + **host**: use the host's UTS namespace inside the container. + Note: the host mode gives the container access to changing the host's hostname and is therefore considered insecure. + +**-v**|**--volume**[=*[HOST-DIR:CONTAINER-DIR[:OPTIONS]]*] + Create a bind mount. If you specify, ` -v /HOST-DIR:/CONTAINER-DIR`, podman + bind mounts `/HOST-DIR` in the host to `/CONTAINER-DIR` in the podman + container. The `OPTIONS` are a comma delimited list and can be: + + * [rw|ro] + * [z|Z] + * [`[r]shared`|`[r]slave`|`[r]private`] + +The `CONTAINER-DIR` must be an absolute path such as `/src/docs`. The `HOST-DIR` +must be an absolute path as well. podman bind-mounts the `HOST-DIR` to the +path you specify. For example, if you supply the `/foo` value, podman creates a bind-mount. + +You can specify multiple **-v** options to mount one or more mounts to a +container. + +You can add `:ro` or `:rw` suffix to a volume to mount it read-only or +read-write mode, respectively. By default, the volumes are mounted read-write. +See examples. + +Labeling systems like SELinux require that proper labels are placed on volume +content mounted into a container. Without a label, the security system might +prevent the processes running inside the container from using the content. By +default, podman does not change the labels set by the OS. + +To change a label in the container context, you can add either of two suffixes +`:z` or `:Z` to the volume mount. These suffixes tell podman to relabel file +objects on the shared volumes. The `z` option tells podman that two containers +share the volume content. As a result, podman labels the content with a shared +content label. Shared volume labels allow all containers to read/write content. +The `Z` option tells podman to label the content with a private unshared label. +Only the current container can use a private volume. + +By default bind mounted volumes are `private`. That means any mounts done +inside container will not be visible on host and vice-a-versa. One can change +this behavior by specifying a volume mount propagation property. Making a +volume `shared` mounts done under that volume inside container will be +visible on host and vice-a-versa. Making a volume `slave` enables only one +way mount propagation and that is mounts done on host under that volume +will be visible inside container but not the other way around. + +To control mount propagation property of volume one can use `:[r]shared`, +`:[r]slave` or `:[r]private` propagation flag. Propagation property can +be specified only for bind mounted volumes and not for internal volumes or +named volumes. For mount propagation to work source mount point (mount point +where source dir is mounted on) has to have right propagation properties. For +shared volumes, source mount point has to be shared. And for slave volumes, +source mount has to be either shared or slave. + +Use `df ` to figure out the source mount and then use +`findmnt -o TARGET,PROPAGATION ` to figure out propagation +properties of source mount. If `findmnt` utility is not available, then one +can look at mount entry for source mount point in `/proc/self/mountinfo`. Look +at `optional fields` and see if any propagaion properties are specified. +`shared:X` means mount is `shared`, `master:X` means mount is `slave` and if +nothing is there that means mount is `private`. + +To change propagation properties of a mount point use `mount` command. For +example, if one wants to bind mount source directory `/foo` one can do +`mount --bind /foo /foo` and `mount --make-private --make-shared /foo`. This +will convert /foo into a `shared` mount point. Alternatively one can directly +change propagation properties of source mount. Say `/` is source mount for +`/foo`, then use `mount --make-shared /` to convert `/` into a `shared` mount. + +To disable automatic copying of data from the container path to the volume, use +the `nocopy` flag. The `nocopy` flag can be set on bind mounts and named volumes. + +**-w**, **--workdir**="" + Working directory inside the container + + The default working directory for running binaries within a container is the root directory (/). +The image developer can set a different default with the WORKDIR instruction. The operator +can override the working directory by using the **-w** option. + +# Exit Status + +The exit code from `podman run` gives information about why the container +failed to run or why it exited. When `podman run` exits with a non-zero code, +the exit codes follow the `chroot` standard, see below: + +**_125_** if the error is with podman **_itself_** + + $ podman run --foo busybox; echo $? + # flag provided but not defined: --foo + See 'podman run --help'. + 125 + +**_126_** if the **_contained command_** cannot be invoked + + $ podman run busybox /etc; echo $? + # exec: "/etc": permission denied + podman: Error response from daemon: Contained command could not be invoked + 126 + +**_127_** if the **_contained command_** cannot be found + + $ podman run busybox foo; echo $? + # exec: "foo": executable file not found in $PATH + podman: Error response from daemon: Contained command not found or does not exist + 127 + +**_Exit code_** of **_contained command_** otherwise + + $ podman run busybox /bin/sh -c 'exit 3' + # 3 + +# EXAMPLES + +## Running container in read-only mode + +During container image development, containers often need to write to the image +content. Installing packages into /usr, for example. In production, +applications seldom need to write to the image. Container applications write +to volumes if they need to write to file systems at all. Applications can be +made more secure by running them in read-only mode using the - -read-only switch. +This protects the containers image from modification. Read only containers may +still need to write temporary data. The best way to handle this is to mount +tmpfs directories on /run and /tmp. + + # podman run --read-only --tmpfs /run --tmpfs /tmp -i -t fedora /bin/bash + +## Exposing log messages from the container to the host's log + +If you want messages that are logged in your container to show up in the host's +syslog/journal then you should bind mount the /dev/log directory as follows. + + # podman run -v /dev/log:/dev/log -i -t fedora /bin/bash + +From inside the container you can test this by sending a message to the log. + + (bash)# logger "Hello from my container" + +Then exit and check the journal. + + # exit + + # journalctl -b | grep Hello + +This should list the message sent to logger. + +## Attaching to one or more from STDIN, STDOUT, STDERR + +If you do not specify -a then podman will attach everything (stdin,stdout,stderr) +. You can specify to which of the three standard streams (stdin, stdout, stderr) +you'd like to connect instead, as in: + + # podman run -a stdin -a stdout -i -t fedora /bin/bash + +## Sharing IPC between containers + +Using shm_server.c available here: https://www.cs.cf.ac.uk/Dave/C/node27.html + +Testing `--ipc=host` mode: + +Host shows a shared memory segment with 7 pids attached, happens to be from httpd: + +``` + $ sudo ipcs -m + + ------ Shared Memory Segments -------- + key shmid owner perms bytes nattch status + 0x01128e25 0 root 600 1000 7 +``` + +Now run a regular container, and it correctly does NOT see the shared memory segment from the host: + +``` + $ podman run -it shm ipcs -m + + ------ Shared Memory Segments -------- + key shmid owner perms bytes nattch status +``` + +Run a container with the new `--ipc=host` option, and it now sees the shared memory segment from the host httpd: + + ``` + $ podman run -it --ipc=host shm ipcs -m + + ------ Shared Memory Segments -------- + key shmid owner perms bytes nattch status + 0x01128e25 0 root 600 1000 7 +``` +Testing `--ipc=container:CONTAINERID` mode: + +Start a container with a program to create a shared memory segment: +``` + $ podman run -it shm bash + $ sudo shm/shm_server & + $ sudo ipcs -m + + ------ Shared Memory Segments -------- + key shmid owner perms bytes nattch status + 0x0000162e 0 root 666 27 1 +``` +Create a 2nd container correctly shows no shared memory segment from 1st container: +``` + $ podman run shm ipcs -m + + ------ Shared Memory Segments -------- + key shmid owner perms bytes nattch status +``` + +Create a 3rd container using the new --ipc=container:CONTAINERID option, now it shows the shared memory segment from the first: + +``` + $ podman run -it --ipc=container:ed735b2264ac shm ipcs -m + $ sudo ipcs -m + + ------ Shared Memory Segments -------- + key shmid owner perms bytes nattch status + 0x0000162e 0 root 666 27 1 +``` + +## Mapping Ports for External Usage + +The exposed port of an application can be mapped to a host port using the **-p** +flag. For example, an httpd port 80 can be mapped to the host port 8080 using the +following: + + # podman run -p 8080:80 -d -i -t fedora/httpd + +## Mounting External Volumes + +To mount a host directory as a container volume, specify the absolute path to +the directory and the absolute path for the container directory separated by a +colon: + + # podman run -v /var/db:/data1 -i -t fedora bash + +When using SELinux, be aware that the host has no knowledge of container SELinux +policy. Therefore, in the above example, if SELinux policy is enforced, the +`/var/db` directory is not writable to the container. A "Permission Denied" +message will occur and an avc: message in the host's syslog. + + +To work around this, at time of writing this man page, the following command +needs to be run in order for the proper SELinux policy type label to be attached +to the host directory: + + # chcon -Rt svirt_sandbox_file_t /var/db + + +Now, writing to the /data1 volume in the container will be allowed and the +changes will also be reflected on the host in /var/db. + +## Using alternative security labeling + +You can override the default labeling scheme for each container by specifying +the `--security-opt` flag. For example, you can specify the MCS/MLS level, a +requirement for MLS systems. Specifying the level in the following command +allows you to share the same content between containers. + + # podman run --security-opt label=level:s0:c100,c200 -i -t fedora bash + +An MLS example might be: + + # podman run --security-opt label=level:TopSecret -i -t rhel7 bash + +To disable the security labeling for this container versus running with the +`--permissive` flag, use the following command: + + # podman run --security-opt label=disable -i -t fedora bash + +If you want a tighter security policy on the processes within a container, +you can specify an alternate type for the container. You could run a container +that is only allowed to listen on Apache ports by executing the following +command: + + # podman run --security-opt label=type:svirt_apache_t -i -t centos bash + +Note: + +You would have to write policy defining a `svirt_apache_t` type. + +## Setting device weight + +If you want to set `/dev/sda` device weight to `200`, you can specify the device +weight by `--blkio-weight-device` flag. Use the following command: + + # podman run -it --blkio-weight-device "/dev/sda:200" ubuntu + +``` +$ podman run -d busybox top +``` + +## Setting Namespaced Kernel Parameters (Sysctls) + +The `--sysctl` sets namespaced kernel parameters (sysctls) in the +container. For example, to turn on IP forwarding in the containers +network namespace, run this command: + + $ podman run --sysctl net.ipv4.ip_forward=1 someimage + +Note: + +Not all sysctls are namespaced. podman does not support changing sysctls +inside of a container that also modify the host system. As the kernel +evolves we expect to see more sysctls become namespaced. + +See the definition of the `--sysctl` option above for the current list of +supported sysctls. + +# HISTORY +April 2014, Originally compiled by William Henry (whenry at redhat dot com) +based on docker.com source material and internal work. +June 2014, updated by Sven Dowideit +July 2014, updated by Sven Dowideit +November 2015, updated by Sally O'Malley +October 2017, converted from Docker documentation to podman by Dan Walsh for podman diff --git a/docs/podman-save.1.md b/docs/podman-save.1.md new file mode 100644 index 000000000..e55ea1c9b --- /dev/null +++ b/docs/podman-save.1.md @@ -0,0 +1,97 @@ +% podman(1) podman-save - Simple tool to save an image to an archive +% Urvashi Mohnani +# podman-save "1" "July 2017" "podman" + +## NAME +podman-save - Save an image to docker-archive or oci-archive + +## SYNOPSIS +**podman save** +**NAME[:TAG]** +[**--quiet**|**-q**] +[**--format**] +[**--output**|**-o**] +[**--help**|**-h**] + +## DESCRIPTION +**podman save** saves an image to either **docker-archive**, **oci-archive**, **oci-dir** (directory +with oci manifest type), or **docker-dir** (directory with v2s2 manifest type) on the local machine, +default is **docker-archive**. **podman save** writes to STDOUT by default and can be redirected to a +file using the **output** flag. The **quiet** flag suppresses the output when set. + +**podman [GLOBAL OPTIONS]** + +**podman save [GLOBAL OPTIONS]** + +**podman save [OPTIONS] NAME[:TAG]** + +## OPTIONS + +**--compress** + +Compress tarball image layers when pushing to a directory using the 'dir' transport. (default is same compression type, compressed or uncompressed, as source) +Note: This flag can only be set when using the **dir** transport i.e --format=oci-dir or --format-docker-dir + +**--output, -o** +Write to a file, default is STDOUT + +**--format** +Save image to **oci-archive**, **oci-dir** (directory with oci manifest type), or **docker-dir** (directory with v2s2 manifest type) +``` +--format oci-archive +--format oci-dir +--format docker-dir +``` + +**--quiet, -q** +Suppress the output + +## EXAMPLES + +``` +# podman save --quiet -o alpine.tar alpine:2.6 +``` + +``` +# podman save > alpine-all.tar alpine +``` + +``` +# podman save -o oci-alpine.tar --format oci-archive alpine +``` + +``` +# podman save --compress --format oci-dir -o alp-dir alpine +Getting image source signatures +Copying blob sha256:2fdfe1cd78c20d05774f0919be19bc1a3e4729bce219968e4188e7e0f1af679d + 1.97 MB / 1.97 MB [========================================================] 0s +Copying config sha256:501d1a8f0487e93128df34ea349795bc324d5e0c0d5112e08386a9dfaff620be + 584 B / 584 B [============================================================] 0s +Writing manifest to image destination +Storing signatures +``` + +``` +# podman save --format docker-dir -o ubuntu-dir ubuntu +Getting image source signatures +Copying blob sha256:660c48dd555dcbfdfe19c80a30f557ac57a15f595250e67bfad1e5663c1725bb + 45.55 MB / 45.55 MB [======================================================] 8s +Copying blob sha256:4c7380416e7816a5ab1f840482c9c3ca8de58c6f3ee7f95e55ad299abbfe599f + 846 B / 846 B [============================================================] 0s +Copying blob sha256:421e436b5f80d876128b74139531693be9b4e59e4f1081c9a3c379c95094e375 + 620 B / 620 B [============================================================] 0s +Copying blob sha256:e4ce6c3651b3a090bb43688f512f687ea6e3e533132bcbc4a83fb97e7046cea3 + 849 B / 849 B [============================================================] 0s +Copying blob sha256:be588e74bd348ce48bb7161350f4b9d783c331f37a853a80b0b4abc0a33c569e + 169 B / 169 B [============================================================] 0s +Copying config sha256:20c44cd7596ff4807aef84273c99588d22749e2a7e15a7545ac96347baa65eda + 3.53 KB / 3.53 KB [========================================================] 0s +Writing manifest to image destination +Storing signatures +``` + +## SEE ALSO +podman(1), podman-load(1), crio(8), crio.conf(5) + +## HISTORY +July 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/podman-start.1.md b/docs/podman-start.1.md new file mode 100644 index 000000000..a6791127a --- /dev/null +++ b/docs/podman-start.1.md @@ -0,0 +1,45 @@ +% podman(1) podman-start - Stop one or more containers +% Brent Baude +# podman-start "1" "November 2017" "podman" + +## NAME +podman start - Start one or more containers + +## SYNOPSIS +**podman start [OPTIONS] CONTAINER [...]** + +## DESCRIPTION +Start one or more containers. You may use container IDs or names as input. The *attach* and *interactive* +options cannot be used to override the *--tty** and *--interactive* options from when the container +was created. + +## OPTIONS + +**--attach, -a** + +Attach container's STDOUT and STDERR. The default is false. This option cannot be used when +starting multiple containers. + +**--detach-keys** + +Override the key sequence for detaching a container. Format is a single character [a-Z] or +ctrl- where is one of: a-z, @, ^, [, , or _. + +**--interactive, -i** + +Attach container's STDIN. The default is false. + + +## EXAMPLE + +podman start mywebserver + +podman start 860a4b23 5421ab4 + +podman start -i -a 860a4b23 + +## SEE ALSO +podman(1), podman-create(1) + +## HISTORY +November 2018, Originally compiled by Brent Baude diff --git a/docs/podman-stats.1.md b/docs/podman-stats.1.md new file mode 100644 index 000000000..80d061cb2 --- /dev/null +++ b/docs/podman-stats.1.md @@ -0,0 +1,77 @@ +% podman(1) podman-stats - Display a live stream of 1 or more containers' resource usage statistics +% Ryan Cole +# podman-stats "1" "July 2017" "podman" + +## NAME +podman-stats - Display a live stream of 1 or more containers' resource usage statistics + +## SYNOPSIS +**podman** **stats** [*options* [...]] [container] + +## DESCRIPTION +Display a live stream of one or more containers' resource usage statistics + +## OPTIONS + +**--all, -a** + +Show all containers. Only running containers are shown by default + +**--no-reset** + +Do not clear the terminal/screen in between reporting intervals + +**--no-stream** + +Disable streaming stats and only pull the first result, default setting is false + +**--format="TEMPLATE"** + +Pretty-print images using a Go template + + +## EXAMPLE + +``` +# podman stats -a --no-stream + +CONTAINER CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS +132ade621b5d 0.00% 1.618MB / 33.08GB 0.00% 0B / 0B 0B / 0B 0 +940e00a40a77 0.00% 1.544MB / 33.08GB 0.00% 0B / 0B 0B / 0B 0 +72a1dfb44ca7 0.00% 1.528MB / 33.08GB 0.00% 0B / 0B 0B / 0B 0 +f5a62a71b07b 0.00% 5.669MB / 33.08GB 0.02% 0B / 0B 0B / 0B 3 +31eab2cf93f4 0.00% 16.42MB / 33.08GB 0.05% 0B / 0B 22.43MB / 0B 0 + +# +``` + +``` +# podman stats --no-stream 31eab2cf93f4 +CONTAINER CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS +31eab2cf93f4 0.00% 16.42MB / 33.08GB 0.05% 0B / 0B 22.43MB / 0B 0 + +# +``` +``` +# podman stats --no-stream --format=json 31eab2cf93f4 +[ + { + "name": "31eab2cf93f4", + "id": "31eab2cf93f413af64a3f13d8d78393238658465d75e527333a8577f251162ec", + "cpu_percent": "0.00%", + "mem_usage": "16.42MB / 33.08GB", + "mem_percent": "0.05%", + "netio": "0B / 0B", + "blocki": "22.43MB / 0B", + "pids": 0 + } +] +# +``` + + +## SEE ALSO +podman(1) + +## HISTORY +July 2017, Originally compiled by Ryan Cole diff --git a/docs/podman-stop.1.md b/docs/podman-stop.1.md new file mode 100644 index 000000000..ad15b9117 --- /dev/null +++ b/docs/podman-stop.1.md @@ -0,0 +1,43 @@ +% podman(1) podman-stop - Stop one or more containers +% Brent Baude +# podman-stop "1" "September 2017" "podman" + +## NAME +podman stop - Stop one or more containers + +## SYNOPSIS +**podman stop [OPTIONS] CONTAINER [...]** + +## DESCRIPTION +Stops one or more containers. You may use container IDs or names as input. The **--timeout** switch +allows you to specify the number of seconds to wait before forcibly stopping the container after the stop command +is issued to the container. The default is 10 seconds. + +## OPTIONS + +**--timeout, t** + +Timeout to wait before forcibly stopping the container + +**--all, -a** + +Stop all running containers. This does not include paused containers. + + +## EXAMPLE + +podman stop mywebserver + +podman stop 860a4b23 + +podman stop mywebserver 860a4b23 + +podman stop --timeout 2 860a4b23 + +podman stop -a + +## SEE ALSO +podman(1), podman-rm(1) + +## HISTORY +September 2018, Originally compiled by Brent Baude diff --git a/docs/podman-tag.1.md b/docs/podman-tag.1.md new file mode 100644 index 000000000..0728f1997 --- /dev/null +++ b/docs/podman-tag.1.md @@ -0,0 +1,34 @@ +% podman(1) podman-tag - Add tags to an image +% Ryan Cole +# podman-tag "1" "July 2017" "podman" + +## NAME +podman tag - Add an additional name to a local image + +## SYNOPSIS +**podman tag** +[**--help**|**-h**] + +## DESCRIPTION +Assigns a new alias to an image in a registry. An alias refers to the entire image name, including the optional **TAG** after the ':' + +**podman [GLOBAL OPTIONS]** + +**podman [GLOBAL OPTIONS] tag [OPTIONS]** + +## GLOBAL OPTIONS + +**--help, -h** + Print usage statement + +## EXAMPLES + + podman tag 0e3bbc2 fedora:latest + + podman tag httpd myregistryhost:5000/fedora/httpd:v2 + +## SEE ALSO +podman(1), crio(8), crio.conf(5) + +## HISTORY +July 2017, Originally compiled by Ryan Cole diff --git a/docs/podman-top.1.md b/docs/podman-top.1.md new file mode 100644 index 000000000..1067cdc52 --- /dev/null +++ b/docs/podman-top.1.md @@ -0,0 +1,59 @@ +% podman(1) podman-top - display the running processes of a container +% Brent Baude + +## NAME +podman top - Display the running processes of a container + +## SYNOPSIS +**podman top** +[**--help**|**-h**] + +## DESCRIPTION +Display the running process of the container. ps-OPTION can be any of the options you would pass to a Linux ps command + +**podman [GLOBAL OPTIONS] top [OPTIONS]** + +## OPTIONS + +**--help, -h** + Print usage statement + +**--format** + Display the output in an alternate format. The only supported format is **JSON**. + +## EXAMPLES + +``` +# podman top f5a62a71b07 + UID PID PPID %CPU STIME TT TIME CMD + 0 18715 18705 0.0 10:35 pts/0 00:00:00 /bin/bash + 0 18741 18715 0.0 10:35 pts/0 00:00:00 vi +# +``` + +``` +#podman --log-level=debug top f5a62a71b07 -o fuser,f,comm,label +FUSER F COMMAND LABEL +root 4 bash system_u:system_r:container_t:s0:c429,c1016 +root 0 vi system_u:system_r:container_t:s0:c429,c1016 +# +``` +``` +# podman top --format=json f5a62a71b07b -o %cpu,%mem,command,blocked +[ + { + "CPU": "0.0", + "MEM": "0.0", + "COMMAND": "vi", + "BLOCKED": "0000000000000000", + "START": "", + "TIME": "", + "C": "", + "CAUGHT": "", + ... +``` +## SEE ALSO +podman(1), ps(1) + +## HISTORY +December 2017, Originally compiled by Brent Baude diff --git a/docs/podman-umount.1.md b/docs/podman-umount.1.md new file mode 100644 index 000000000..5d3d04dab --- /dev/null +++ b/docs/podman-umount.1.md @@ -0,0 +1,19 @@ +% podman(1) podman-umount - Unmount a working container's root filesystem. +% Dan Walsh +# podman-umount "1" "July 2017" "podman" + +## NAME +podman umount - Unmount a working container's root file system + +## SYNOPSIS +**podman** **umount** **containerID** + +## DESCRIPTION +Unmounts the specified container's root file system. + +## EXAMPLE + +podman umount containerID + +## SEE ALSO +podman(1), podman-mount(1) diff --git a/docs/podman-unpause.1.md b/docs/podman-unpause.1.md new file mode 100644 index 000000000..26ece3a1f --- /dev/null +++ b/docs/podman-unpause.1.md @@ -0,0 +1,24 @@ +% podman(1) podman-unpause - Unpause one or more containers +% Dan Walsh +# podman-unpause "1" "September 2017" "podman" + +## NAME +podman unpause - Unpause one or more containers + +## SYNOPSIS +**podman unpause [OPTIONS] CONTAINER [...]** + +## DESCRIPTION +Unpauses the processes in one or more containers. You may use container IDs or names as input. + +## EXAMPLE + +podman unpause mywebserver + +podman unpause 860a4b23 + +## SEE ALSO +podman(1), podman-pause(1) + +## HISTORY +September 2017, Originally compiled by Dan Walsh diff --git a/docs/podman-version.1.md b/docs/podman-version.1.md new file mode 100644 index 000000000..e6dba33fc --- /dev/null +++ b/docs/podman-version.1.md @@ -0,0 +1,24 @@ +% podman(1) podman-version - Simple tool to view version information +% Urvashi Mohnani +# podman-version "1" "July 2017" "podman" + +## NAME +podman-version - Display the PODMAN Version Information + +## SYNOPSIS +**podman version** +[**--help**|**-h**] + +## DESCRIPTION +Shows the the following information: Version, Go Version, Git Commit, Build Time, +OS, and Architecture. + +**podman [GLOBAL OPTIONS]** + +**podman version** + +## SEE ALSO +podman(1), crio(8), crio.conf(5) + +## HISTORY +July 2017, Originally compiled by Urvashi Mohnani diff --git a/docs/podman-wait.1.md b/docs/podman-wait.1.md new file mode 100644 index 000000000..5bdefbd5f --- /dev/null +++ b/docs/podman-wait.1.md @@ -0,0 +1,36 @@ +% podman(1) podman-wait - Waits on a container +% Brent Baude +# podman-wait "1" "September 2017" "podman" + +## NAME +podman wait - Waits on one or more containers to stop and prints exit code + +## SYNOPSIS +**podman wait** +[**--help**|**-h**] + +## DESCRIPTION +Waits on one or more containers to stop. The container can be referred to by its +name or ID. In the case of multiple containers, podman will wait on each consecutively. +After the container stops, the container's return code is printed. + +**podman [GLOBAL OPTIONS] wait ** + +## GLOBAL OPTIONS + +**--help, -h** + Print usage statement + +## EXAMPLES + + podman wait mywebserver + + podman wait 860a4b23 + + podman wait mywebserver myftpserver + +## SEE ALSO +podman(1), crio(8), crio.conf(5) + +## HISTORY +September 2017, Originally compiled by Brent Baude diff --git a/docs/podman.1.md b/docs/podman.1.md new file mode 100644 index 000000000..be35c506d --- /dev/null +++ b/docs/podman.1.md @@ -0,0 +1,158 @@ +% podman(1) podman - Simple management tool for pods and images +% Dan Walsh +# podman "1" "September 2016" "podman" +## NAME +podman - Simple management tool for containers and images + +## SYNOPSIS +**podman** [*options*] COMMAND + +# DESCRIPTION +podman is a simple client only tool to help with debugging issues when daemons +such as CRI runtime and the kubelet are not responding or failing. A shared API +layer could be created to share code between the daemon and podman. podman does not +require any daemon running. podman utilizes the same underlying components that +crio uses i.e. containers/image, container/storage, oci-runtime-tool/generate, +runc or any other OCI compatible runtime. podman shares state with crio and so +has the capability to debug pods/images created by crio. + +**podman [GLOBAL OPTIONS]** + +## GLOBAL OPTIONS + +**--help, -h** + Print usage statement + +**--config value, -c**=**"config.file"** + Path of a config file detailing container server configuration options + +**--cpu-profile** + Path to where the cpu performance results should be written + +**--log-level** + log messages above specified level: debug, info, warn, error (default), fatal or panic + +**--root**=**value** + Path to the root directory in which data, including images, is stored + +**--runroot**=**value** + Path to the 'run directory' where all state information is stored + +**--runtime**=**value** + Path to the OCI compatible binary used to run containers + +**--storage-driver, -s**=**value** + Select which storage driver is used to manage storage of images and containers (default is overlay) + +**--storage-opt**=**value** + Used to pass an option to the storage driver + +**--version, -v** + Print the version + +## COMMANDS + +### attach +Attach to a running container + +### create +create a new container + +### diff +Inspect changes on a container or image's filesystem + +## exec +Execute a command in a running container. + +### export +Export container's filesystem contents as a tar archive + +### history +Shows the history of an image + +### images +List images in local storage + +### info +Displays system information + +### inspect +Display a container or image's configuration + +### kill +Kill the main process in one or more containers + +### load +Load an image from docker archive + +### login +Login to a container registry + +### logout +Logout of a container registry + +### logs +Display the logs of a container + +### mount +Mount a working container's root filesystem + +### pause +Pause one or more containers + +### ps +Prints out information about containers + +### pull +Pull an image from a registry + +### push +Push an image from local storage to elsewhere + +### rename +Rename a container + +### rm +Remove one or more containers + +### rmi +Removes one or more locally stored images + +### run +Run a command in a new container + +### save +Save an image to docker-archive or oci + +## start +Starts one or more containers + +### stats +Display a live stream of one or more containers' resource usage statistics + +### stop +Stops one or more running containers. + +### tag +Add an additional name to a local image + +### top +Display the running processes of a container + +### umount +Unmount a working container's root file system + +### unpause +Unpause one or more containers + +### version +Display the version information + +### wait +Wait on one or more containers to stop and print their exit codes + +## SEE ALSO +crio(8), crio.conf(5) + +## HISTORY +Dec 2016, Originally compiled by Dan Walsh diff --git a/hooks.md b/hooks.md index 809dbdc2e..67c2f2619 100644 --- a/hooks.md +++ b/hooks.md @@ -33,7 +33,7 @@ The post-stop hooks MUST be called after the container is deleted but before the ## CRI-O configuration files for automatically enabling Hooks -The way you enable the hooks above is by editing the OCI Specification to add your hook before running the oci runtime, like runc. But this is what `CRI-O` and `Kpod create` do for you, so we wanted a way for developers to drop configuration files onto the system, so that their hooks would be able to be plugged in. +The way you enable the hooks above is by editing the OCI Specification to add your hook before running the oci runtime, like runc. But this is what `CRI-O` and `podman create` do for you, so we wanted a way for developers to drop configuration files onto the system, so that their hooks would be able to be plugged in. One problem with hooks is that the runtime actually stalls execution of the container before running the hooks and stalls completion of the container, until all hooks complete. This can cause some performance issues. Also a lot of hooks just check if certain configuration is set and then exit early, without doing anything. For example the [oci-systemd-hook](https://github.com/projectatomic/oci-systemd-hook) only executes if the command is `init` or `systemd`, otherwise it just exits. This means if we automatically enable all hooks, every container will have to execute oci-systemd-hook, even if they don't run systemd inside of the container. Also since there are three stages, prestart, poststart, poststop each hook gets executed three times. diff --git a/install.md b/install.md index 1c260ce4c..498731c20 100644 --- a/install.md +++ b/install.md @@ -4,7 +4,7 @@ #### runc installed -The latest version of `runc` is expected to be installed on the system. It is picked up as the default runtime by kpod. +The latest version of `runc` is expected to be installed on the system. It is picked up as the default runtime by podman. #### Setup CNI networking @@ -83,7 +83,7 @@ apt-get install -y \ ### Get Source Code -As with other Go projects, KPOD must be cloned into a directory structure like: +As with other Go projects, PODMAN must be cloned into a directory structure like: ``` GOPATH @@ -117,7 +117,7 @@ make sudo make install ``` -Otherwise, if you do not want to build `kpod` with seccomp support you can add `BUILDTAGS=""` when running make. +Otherwise, if you do not want to build `podman` with seccomp support you can add `BUILDTAGS=""` when running make. ```bash make BUILDTAGS="" @@ -126,7 +126,7 @@ sudo make install #### Build Tags -`kpod` supports optional build tags for compiling support of various features. +`podman` supports optional build tags for compiling support of various features. To add build tags to the make option the `BUILDTAGS` variable must be set. ```bash diff --git a/kpod-images.json b/kpod-images.json deleted file mode 100644 index a87f1d5b8..000000000 --- a/kpod-images.json +++ /dev/null @@ -1,18446 +0,0 @@ -{ - "version": 1, - "width": 211, - "height": 52, - "duration": 66890.973605, - "command": null, - "title": null, - "env": { - "TERM": "xterm-256color", - "SHELL": "/usr/bin/zsh" - }, - "stdout": [ - [ - 0.127359, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.026267, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001269, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 8.9e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.3e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000195, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m " - ], - [ - 2.3e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 3.5e-05, - "\u001b[?1h\u001b=" - ], - [ - 3.6e-05, - "\u001b[?2004h" - ], - [ - 0.431984, - "s" - ], - [ - 0.085317, - "\bsu" - ], - [ - 0.129126, - "d" - ], - [ - 0.088005, - "o" - ], - [ - 0.135671, - " " - ], - [ - 0.08011, - "k" - ], - [ - 0.080023, - "p" - ], - [ - 0.120208, - "o" - ], - [ - 0.063327, - "d" - ], - [ - 0.136258, - " " - ], - [ - 0.120298, - "i" - ], - [ - 0.07945, - "m" - ], - [ - 0.048586, - "a" - ], - [ - 0.111702, - "g" - ], - [ - 0.120452, - "e" - ], - [ - 0.055606, - "s" - ], - [ - 0.55923, - " " - ], - [ - 0.144712, - "-" - ], - [ - 0.152054, - "-" - ], - [ - 0.176129, - "n" - ], - [ - 0.100308, - "o" - ], - [ - 0.207951, - "-" - ], - [ - 0.140053, - "t" - ], - [ - 0.143338, - "r" - ], - [ - 0.076824, - "u" - ], - [ - 0.187154, - "n" - ], - [ - 0.107836, - "c" - ], - [ - 0.11269, - "\u001b[?1l\u001b>" - ], - [ - 0.000169, - "\u001b[?2004l\r\r\n" - ], - [ - 0.0058, - "\u001b]2;sudo kpod images --no-trunc\u0007\u001b]1;kpod\u0007" - ], - [ - 0.930864, - "[sudo] password for ryan: " - ], - [ - 2.238114, - "\r\n" - ], - [ - 1.996034, - "Sorry, try again.\r\n" - ], - [ - 0.916497, - "[sudo] password for ryan: " - ], - [ - 2.392113, - "\r\n" - ], - [ - 0.093899, - "\u001b[34mINFO\u001b[0m[0000] [graphdriver] using prior storage driver \"overlay\" \r\n" - ], - [ - 0.00085, - "IMAGE ID IMAGE NAME CREATED AT SIZE\r\n" - ], - [ - 0.000894, - "3edb693215a22336c352ba66d101fafda7e2ecbad1ecf2137e1c495e461d8f23 docker.io/kubernetes/pause:latest Jul 19, 2014 07:02 241 KB\r\n" - ], - [ - 0.000324, - "1adfcf922a991e2d59a98dd2b5adc813b590261737d77c3ec7ae23e4f927d6bb docker.io/library/fedora:latest Jul 20, 2017 17:07 219.9 MB\r\n" - ], - [ - 0.000358, - "524b9482e987a953b81321580372c07c3c765ce7c336445797428658384c6812 docker.io/library/redis:latest Jul 24, 2017 18:37 101 MB\r\n" - ], - [ - 0.000352, - "9518288ded9bd43a055a4022d84c440b3ac16981f943bb099b60e0984e9e23d2 docker.io/library/redis:alpine Jul 24, 2017 18:39 26.22 MB\r\n" - ], - [ - 0.003194, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.024028, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m9s\u001b[39m\r\n" - ], - [ - 0.001135, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000102, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 1.8e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000176, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m " - ], - [ - 4.3e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D\u001b[?1h\u001b=" - ], - [ - 4.8e-05, - "\u001b[?2004h" - ], - [ - 1.658662, - "s" - ], - [ - 0.071652, - "\bsu" - ], - [ - 0.15257, - "d" - ], - [ - 0.143602, - "o" - ], - [ - 0.160358, - " " - ], - [ - 0.119704, - "k" - ], - [ - 0.104527, - "p" - ], - [ - 0.087276, - "o" - ], - [ - 0.096382, - "d" - ], - [ - 0.088303, - " " - ], - [ - 0.08811, - "i" - ], - [ - 0.0717, - "m" - ], - [ - 0.079483, - "a" - ], - [ - 0.103857, - "g" - ], - [ - 0.080719, - "e" - ], - [ - 0.056202, - "s" - ], - [ - 0.111434, - " " - ], - [ - 0.152746, - "-" - ], - [ - 0.111237, - "q" - ], - [ - 0.144032, - "\u001b[?1l\u001b>" - ], - [ - 0.000167, - "\u001b[?2004l\r\r\n" - ], - [ - 0.004109, - "\u001b]2;sudo kpod images -q\u0007\u001b]1;kpod\u0007" - ], - [ - 0.094407, - "\u001b[34mINFO\u001b[0m[0000] [graphdriver] using prior storage driver \"overlay\" \r\n" - ], - [ - 0.001695, - "3edb693215a22336c352ba66d101fafda7e2ecbad1ecf2137e1c495e461d8f23\r\n" - ], - [ - 0.000296, - "1adfcf922a991e2d59a98dd2b5adc813b590261737d77c3ec7ae23e4f927d6bb\r\n" - ], - [ - 0.000377, - "524b9482e987a953b81321580372c07c3c765ce7c336445797428658384c6812\r\n" - ], - [ - 0.000392, - "9518288ded9bd43a055a4022d84c440b3ac16981f943bb099b60e0984e9e23d2\r\n" - ], - [ - 0.002686, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.024178, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001405, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000211, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 5.2e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000251, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 4.9e-05, - "\u001b[?1h\u001b=" - ], - [ - 7.2e-05, - "\u001b[?2004h" - ], - [ - 0.566345, - "s" - ], - [ - 0.119935, - "\bsu" - ], - [ - 0.142907, - "d" - ], - [ - 0.104809, - "o" - ], - [ - 0.223809, - " " - ], - [ - 0.144031, - "k" - ], - [ - 0.127885, - "p" - ], - [ - 0.104093, - "o" - ], - [ - 0.136222, - "d" - ], - [ - 0.111758, - " " - ], - [ - 0.088148, - "i" - ], - [ - 0.079691, - "m" - ], - [ - 0.09608, - "a" - ], - [ - 0.111767, - "g" - ], - [ - 0.096631, - "e" - ], - [ - 0.063607, - "s" - ], - [ - 0.120256, - " " - ], - [ - 0.223186, - "-" - ], - [ - 0.16889, - "-" - ], - [ - 0.151472, - "d" - ], - [ - 0.120605, - "i" - ], - [ - 0.11131, - "g" - ], - [ - 0.096141, - "e" - ], - [ - 0.120451, - "s" - ], - [ - 0.095792, - "t" - ], - [ - 0.120047, - "s" - ], - [ - 0.272206, - " " - ], - [ - 0.1516, - "r" - ], - [ - 0.056258, - "e" - ], - [ - 0.175241, - "d" - ], - [ - 0.144489, - "i" - ], - [ - 0.136449, - "s" - ], - [ - 0.159879, - "\u001b[?1l\u001b>" - ], - [ - 0.000108, - "\u001b[?2004l\r\r\n" - ], - [ - 0.004344, - "\u001b]2;sudo kpod images --digests redis\u0007\u001b]1;kpod\u0007" - ], - [ - 0.090151, - "\u001b[34mINFO\u001b[0m[0000] [graphdriver] using prior storage driver \"overlay\" \r\n" - ], - [ - 0.000807, - "IMAGE ID IMAGE NAME DIGEST CREATED AT SIZE\r\n" - ], - [ - 0.000758, - "524b9482e987 docker.io/library/redis:latest sha256:b839545984cee95685e514aeb441a8b0624818559d89910aa31ad645c904210f Jul 24, 2017 18:37 101 MB\r\n" - ], - [ - 0.000371, - "9518288ded9b docker.io/library/redis:alpine sha256:e633cded055a94202e4ccccb8125b7f383cd6ee56527ab890db643383a2647dd Jul 24, 2017 18:39 26.22 MB\r\n" - ], - [ - 0.00292, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.023228, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001399, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000108, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 5.3e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000122, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 2.7e-05, - "\u001b[?1h\u001b=" - ], - [ - 4.6e-05, - "\u001b[?2004h" - ], - [ - 0.987423, - "s" - ], - [ - 0.11214, - "\bsu" - ], - [ - 0.12844, - "d" - ], - [ - 0.079782, - "o" - ], - [ - 0.183347, - " " - ], - [ - 0.096053, - "k" - ], - [ - 0.103724, - "p" - ], - [ - 0.095897, - "o" - ], - [ - 0.128513, - "d" - ], - [ - 0.119949, - " " - ], - [ - 0.096107, - "i" - ], - [ - 0.087565, - "m" - ], - [ - 0.080849, - "a" - ], - [ - 0.095739, - "g" - ], - [ - 0.096047, - "e" - ], - [ - 0.055373, - "s" - ], - [ - 0.160498, - " " - ], - [ - 0.168065, - "-" - ], - [ - 0.135891, - "-" - ], - [ - 0.160099, - "f" - ], - [ - 0.144124, - "i" - ], - [ - 0.312147, - "l" - ], - [ - 0.183726, - "t" - ], - [ - 0.183798, - "e" - ], - [ - 0.104556, - "r" - ], - [ - 1.071509, - " " - ], - [ - 0.208609, - "\"" - ], - [ - 0.25584, - "s" - ], - [ - 0.191556, - "i" - ], - [ - 0.119659, - "n" - ], - [ - 0.536775, - "c" - ], - [ - 0.09534, - "e" - ], - [ - 0.54414, - "=" - ], - [ - 0.144045, - "f" - ], - [ - 0.06374, - "e" - ], - [ - 0.184989, - "d" - ], - [ - 0.135526, - "o" - ], - [ - 0.136149, - "r" - ], - [ - 0.080286, - "a" - ], - [ - 0.454973, - ":" - ], - [ - 0.624879, - "l" - ], - [ - 0.096184, - "a" - ], - [ - 0.111656, - "t" - ], - [ - 0.120147, - "e" - ], - [ - 0.08794, - "s" - ], - [ - 0.06356, - "t" - ], - [ - 0.288506, - "\"" - ], - [ - 0.543802, - " " - ], - [ - 0.200564, - "-" - ], - [ - 0.142861, - "-" - ], - [ - 0.128436, - "f" - ], - [ - 0.112036, - "o" - ], - [ - 0.151167, - "r" - ], - [ - 0.128503, - "m" - ], - [ - 0.120291, - "a" - ], - [ - 0.088635, - "t" - ], - [ - 0.143602, - " " - ], - [ - 0.256717, - "\"" - ], - [ - 1.46299, - "t" - ], - [ - 0.107784, - "a" - ], - [ - 0.156707, - "b" - ], - [ - 0.123646, - "l" - ], - [ - 0.223815, - "e" - ], - [ - 0.22418, - " " - ], - [ - 0.304259, - "{" - ], - [ - 0.20813, - "{" - ], - [ - 0.599583, - "." - ], - [ - 0.335909, - "I" - ], - [ - 0.268363, - "D" - ], - [ - 0.591353, - "\b \b" - ], - [ - 0.119781, - "\b \b" - ], - [ - 0.156399, - "\b \b" - ], - [ - 0.376287, - " " - ], - [ - 0.095973, - "t" - ], - [ - 0.151826, - "r" - ], - [ - 0.039602, - "u" - ], - [ - 0.192491, - "n" - ], - [ - 0.088154, - "c" - ], - [ - 0.147825, - "a" - ], - [ - 0.123835, - "t" - ], - [ - 0.104099, - "e" - ], - [ - 0.135647, - " " - ], - [ - 0.216888, - "." - ], - [ - 0.303994, - "I" - ], - [ - 0.191778, - "D" - ], - [ - 0.574958, - " " - ], - [ - 0.19329, - "8" - ], - [ - 0.439791, - "}" - ], - [ - 0.143884, - "}" - ], - [ - 0.143784, - " " - ], - [ - 0.256871, - "{" - ], - [ - 0.151265, - "{" - ], - [ - 0.671939, - "." - ], - [ - 0.880114, - "\b \b" - ], - [ - 0.759869, - " " - ], - [ - 0.167976, - "." - ], - [ - 0.344489, - "N" - ], - [ - 0.191508, - "a" - ], - [ - 0.095324, - "m" - ], - [ - 0.223992, - "e" - ], - [ - 0.128763, - " " - ], - [ - 0.15222, - "|" - ], - [ - 0.255382, - " " - ], - [ - 0.144061, - "p" - ], - [ - 0.128167, - "r" - ], - [ - 0.096088, - "i" - ], - [ - 0.071635, - "n" - ], - [ - 0.120055, - "t" - ], - [ - 0.264652, - "f" - ], - [ - 0.151244, - " " - ], - [ - 0.192646, - "\\" - ], - [ - 0.26379, - "\"" - ], - [ - 1.311952, - "%" - ], - [ - 4.68053, - "-" - ], - [ - 1.015928, - "t" - ], - [ - 0.551856, - "\b \b" - ], - [ - 1.032351, - "6" - ], - [ - 0.111812, - "4" - ], - [ - 0.295612, - "s" - ], - [ - 0.719816, - "\\" - ], - [ - 0.248899, - "\"" - ], - [ - 0.599051, - " " - ], - [ - 0.311681, - "}" - ], - [ - 0.137392, - "}" - ], - [ - 0.894842, - " " - ], - [ - 0.224545, - "{" - ], - [ - 0.127645, - "{" - ], - [ - 0.224058, - "." - ], - [ - 0.184217, - "C" - ], - [ - 0.248132, - "r" - ], - [ - 0.079278, - "e" - ], - [ - 0.104455, - "a" - ], - [ - 0.087831, - "t" - ], - [ - 0.064342, - "e" - ], - [ - 0.19221, - "d" - ], - [ - 0.199615, - "A" - ], - [ - 0.464438, - "t" - ], - [ - 0.367064, - "}" - ], - [ - 0.15281, - "}" - ], - [ - 0.559881, - "\"" - ], - [ - 0.448076, - "\u001b[?1l\u001b>" - ], - [ - 0.000334, - "\u001b[?2004l\r\r\n" - ], - [ - 0.005051, - "\u001b]2;sudo kpod images --filter \"since=fedora:latest\" --format \u0007" - ], - [ - 9.2e-05, - "\u001b]1;kpod\u0007" - ], - [ - 0.092964, - "\u001b[34mINFO\u001b[0m[0000] [graphdriver] using prior storage driver \"overlay\" \r\n" - ], - [ - 0.003089, - "template: image:1: function \"truncate\" not defined\r\nTemplate parsing error\r\nmain.outputUsingTemplate\r\n\t/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/cmd/kpod/images.go:178\r\nmain.outputImages\r\n\t/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/cmd/kpod/images.go:165\r\nmain.imagesCmd\r\n\t/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/cmd/kpod/images.go:120\r\ngithub.com/kubernetes-incubator/cri-o/vendor/github.com/urfave/cli.HandleAction\r\n\t/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/vendor/github.com/urfave/cli/app.go:485\r\ngithub.com/kubernetes-incubator/cri-o/vendor/github.com/urfave/cli.Command.Run\r\n\t/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/vendor/github.com/urfave/cli/command.go:193\r\ngithub.com/kubernetes-incubator/cri-o/vendor/github.com/urfave/cli.(*App).Run\r\n\t/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/vendor/github.com/urfave/cli/app.go:250\r\nmain.main\r\n\t" - ], - [ - 2.8e-05, - "/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/cmd/kpod/main.go:61\r\nruntime.main\r\n\t/usr/lib/golang/src/runtime/proc.go:185\r\nruntime.goexit\r\n\t/usr/lib/golang/src/runtime/asm_amd64.s:2197\r\n" - ], - [ - 0.002932, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.026506, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.000971, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000117, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.00031, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[31m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 4.6e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.9e-05, - "\u001b[?2004h" - ], - [ - 5.719975, - "sudo kpod images --filter \"since=fedora:latest\" --format \"table {{ truncate .ID 8}} {{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\"" - ], - [ - 0.111141, - "\b" - ], - [ - 0.500452, - "\b" - ], - [ - 0.030822, - "\b" - ], - [ - 0.031199, - "\b" - ], - [ - 0.030859, - "\b" - ], - [ - 0.030714, - "\b" - ], - [ - 0.029362, - "\b" - ], - [ - 0.031473, - "\b" - ], - [ - 0.030015, - "\b" - ], - [ - 0.030409, - "\b" - ], - [ - 0.030238, - "\b" - ], - [ - 0.031711, - "\b" - ], - [ - 0.029911, - "\b" - ], - [ - 0.031066, - "\b" - ], - [ - 0.029076, - "\b" - ], - [ - 0.03054, - "\b" - ], - [ - 0.031011, - "\b" - ], - [ - 0.031156, - "\b" - ], - [ - 0.030493, - "\b" - ], - [ - 0.029937, - "\b" - ], - [ - 0.030608, - "\b" - ], - [ - 0.030465, - "\b" - ], - [ - 0.030741, - "\b" - ], - [ - 0.030923, - "\b" - ], - [ - 0.029979, - "\b" - ], - [ - 0.0302, - "\b" - ], - [ - 0.031404, - "\b" - ], - [ - 0.030985, - "\b" - ], - [ - 0.030991, - "\b" - ], - [ - 0.030493, - "\b" - ], - [ - 0.031775, - "\b" - ], - [ - 0.030463, - "\b" - ], - [ - 0.03012, - "\b" - ], - [ - 0.030377, - "\b" - ], - [ - 0.030266, - "\b" - ], - [ - 0.031003, - "\b" - ], - [ - 0.029286, - "\b" - ], - [ - 0.031623, - "\b" - ], - [ - 0.029799, - "\b" - ], - [ - 0.029213, - "\b" - ], - [ - 0.03082, - "\b" - ], - [ - 0.030044, - "\b" - ], - [ - 0.030151, - "\b" - ], - [ - 0.030665, - "\b" - ], - [ - 0.030377, - "\b" - ], - [ - 0.030146, - "\b" - ], - [ - 0.093081, - "\b" - ], - [ - 0.191739, - "\b" - ], - [ - 0.144119, - "\b" - ], - [ - 0.327779, - "\b}} {{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[50D" - ], - [ - 0.176138, - "\b}} {{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[50D" - ], - [ - 0.39199, - "\b" - ], - [ - 0.223786, - "\b" - ], - [ - 0.144097, - "\b" - ], - [ - 0.279236, - "\u001b[1C" - ], - [ - 0.501129, - "\u001b[1C" - ], - [ - 0.029576, - "\u001b[1C" - ], - [ - 0.029751, - "\u001b[1C" - ], - [ - 0.032205, - "\u001b[1C" - ], - [ - 0.02899, - "\u001b[1C" - ], - [ - 0.515239, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.499546, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.030618, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.031062, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.030453, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.03064, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.029812, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.030975, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.030209, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.03139, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.030639, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.031502, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.030081, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.029882, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.030344, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.031029, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.030391, - "\u001b[1C .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.121577, - "\u001b[1C .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.167127, - "\b{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\" \u001b[47D" - ], - [ - 0.248096, - "\u001b[?1l\u001b>" - ], - [ - 0.000222, - "\u001b[?2004l\r\r\n" - ], - [ - 0.003167, - "\u001b]2;sudo kpod images --filter \"since=fedora:latest\" --format \u0007\u001b]1;kpod\u0007" - ], - [ - 0.095477, - "\u001b[34mINFO\u001b[0m[0000] [graphdriver] using prior storage driver \"overlay\" \r\n" - ], - [ - 0.003009, - "tabledocker.io/library/redis:latest Jul 24, 2017 18:37\r\n" - ], - [ - 0.000421, - "tabledocker.io/library/redis:alpine Jul 24, 2017 18:39\r\n" - ], - [ - 0.003381, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.023509, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001093, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 5.4e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.3e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000102, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 5.2e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.1e-05, - "\u001b[?2004h" - ], - [ - 0.493915, - "sudo kpod images --filter \"since=fedora:latest\" --format \"table{{ .Name | printf \\\"%-64s\\\" }} {{.CreatedAt}}\"" - ], - [ - 4.023647, - "\u001b[?2004l\r\r\n" - ], - [ - 0.000724, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.033033, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001493, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.00011, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 5.3e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 7.4e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[31m❯\u001b[39m " - ], - [ - 6.4e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D\u001b[?1h\u001b=" - ], - [ - 4.6e-05, - "\u001b[?2004h" - ], - [ - 2.477293, - "r" - ], - [ - 0.095704, - "\brm" - ], - [ - 0.159753, - " " - ], - [ - 0.216552, - "k" - ], - [ - 0.168314, - "\u0007" - ], - [ - 0.000157, - "\r\r\n" - ], - [ - 7.6e-05, - "\u001b[J\u001b[38;5;40mkpod\u001b[0m* \u001b[Jkpod-images.json \u001b[Jkubernetes.md \u001b[J\u001b[A\u001b[0m\u001b[27m\u001b[24m\u001b[39m\r\u001b[2Crm k\u001b[K\u001b[204C\u001b[90m\u001b[39m\u001b[39m\u001b[204D" - ], - [ - 0.679935, - "p" - ], - [ - 0.233955, - "\r\r\n\u001b[J\u001b[A\u001b[7Cod" - ], - [ - 0.493364, - "i" - ], - [ - 0.2874, - "\b \b" - ], - [ - 0.208224, - "-" - ], - [ - 0.208753, - "i" - ], - [ - 0.079436, - "m" - ], - [ - 0.137168, - "ages.json\u001b[1m \u001b[0m" - ], - [ - 0.598602, - "\b\u001b[0m \b" - ], - [ - 0.000266, - "\u001b[?1l\u001b>\u001b[?2004l\r\r\n\u001b[J" - ], - [ - 0.004718, - "\u001b]2;rm kpod-images.json\u0007\u001b]1;rm\u0007" - ], - [ - 0.002042, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.028039, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.000994, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000103, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 1.4e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 6.4e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 5.8e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.6e-05, - "\u001b[?2004h" - ], - [ - 0.779169, - "g" - ], - [ - 0.136128, - "\bgi" - ], - [ - 0.048534, - "t" - ], - [ - 0.104105, - " " - ], - [ - 0.079724, - "s" - ], - [ - 0.104241, - "t" - ], - [ - 0.079697, - "a" - ], - [ - 0.11214, - "t" - ], - [ - 0.119676, - "u" - ], - [ - 0.208639, - "s" - ], - [ - 0.191009, - "\u001b[?1l\u001b>" - ], - [ - 3.6e-05, - "\u001b[?2004l" - ], - [ - 2.7e-05, - "\r\r\n" - ], - [ - 0.00253, - "\u001b]2;git status\u0007\u001b]1;git\u0007" - ], - [ - 0.017282, - "On branch kpod-format-table\r\nnothing to commit, working tree clean\r\n" - ], - [ - 0.000574, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.036636, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001716, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 9.3e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 3.6e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 8.1e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m " - ], - [ - 4.9e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 4.6e-05, - "\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.75012, - "s" - ], - [ - 0.599165, - "\b \b" - ], - [ - 0.19198, - "m" - ], - [ - 0.064457, - "\bma" - ], - [ - 0.127947, - "k" - ], - [ - 0.136116, - "e" - ], - [ - 0.07172, - " " - ], - [ - 0.096215, - "k" - ], - [ - 0.071462, - "p" - ], - [ - 0.080589, - "o" - ], - [ - 0.10344, - "d" - ], - [ - 0.152208, - "\u001b[?1l\u001b>" - ], - [ - 5.1e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.003042, - "\u001b]2;make kpod\u0007\u001b]1;make\u0007" - ], - [ - 6.729784, - "make: 'kpod' is up to date.\r\n" - ], - [ - 0.000291, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.026264, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m7s\u001b[39m\r\n" - ], - [ - 0.001087, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 7.6e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 1.9e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 7.5e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 0.000122, - "\u001b[?1h\u001b=" - ], - [ - 2.8e-05, - "\u001b[?2004h" - ], - [ - 13.163278, - "s" - ], - [ - 0.168391, - "\bsu" - ], - [ - 0.127831, - "d" - ], - [ - 0.10395, - "o" - ], - [ - 0.223816, - " " - ], - [ - 0.12801, - "k" - ], - [ - 0.615488, - "\b \b" - ], - [ - 0.176737, - "m" - ], - [ - 0.040224, - "a" - ], - [ - 0.216001, - "k" - ], - [ - 0.120125, - "e" - ], - [ - 0.095559, - " " - ], - [ - 0.176055, - "i" - ], - [ - 0.087364, - "n" - ], - [ - 0.064466, - "s" - ], - [ - 0.096026, - "t" - ], - [ - 0.128305, - "a" - ], - [ - 0.159057, - "l" - ], - [ - 0.152629, - "l" - ], - [ - 1.088301, - "\u001b[?1l\u001b>" - ], - [ - 0.000115, - "\u001b[?2004l\r\r\n" - ], - [ - 0.008092, - "\u001b]2;sudo make install\u0007\u001b]1;make\u0007" - ], - [ - 0.035813, - "mkdir -p \"/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/_output/src/github.com/kubernetes-incubator\"\r\n" - ], - [ - 0.003636, - "ln -s \"/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\" \"/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/_output/src/github.com/kubernetes-incubator\"\r\n" - ], - [ - 0.001734, - "touch \"/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/_output/.gopathok\"\r\n" - ], - [ - 0.001583, - "install -D -m 755 crio /usr/local/bin/crio\r\n" - ], - [ - 0.053752, - "install -D -m 755 crioctl /usr/local/bin/crioctl\r\n" - ], - [ - 0.032266, - "install -D -m 755 kpod /usr/local/bin/kpod\r\n" - ], - [ - 0.046161, - "install -D -m 755 conmon/conmon /usr/local/libexec/crio/conmon\r\n" - ], - [ - 0.003465, - "install -D -m 755 pause/pause /usr/local/libexec/crio/pause\r\n" - ], - [ - 0.004506, - "install -d -m 755 /usr/local/share/man/man1\r\n" - ], - [ - 0.000924, - "install -d -m 755 /usr/local/share/man/man5\r\n" - ], - [ - 0.000709, - "install -d -m 755 /usr/local/share/man/man8\r\n" - ], - [ - 0.000731, - "install -m 644 docs/kpod-diff.1 docs/kpod-push.1 docs/kpod-cp.1 docs/kpod.1 docs/kpod-export.1 docs/kpod-load.1 docs/kpod-logs.1 docs/kpod-images.1 docs/kpod-umount.1 docs/kpod-save.1 docs/kpod-mount.1 docs/kpod-info.1 docs/kpod-inspect.1 docs/kpod-history.1 docs/kpod-pull.1 docs/kpod-rmi.1 docs/kpod-version.1 docs/kpod-tag.1 -t /usr/local/share/man/man1\r\n" - ], - [ - 0.014923, - "install -m 644 docs/crio.conf.5 -t /usr/local/share/man/man5\r\n" - ], - [ - 0.006695, - "install -m 644 docs/crio.8 -t /usr/local/share/man/man8\r\n" - ], - [ - 0.005468, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.030073, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.00096, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 8.4e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.4e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 8.2e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m " - ], - [ - 2.2e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 3.6e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.5e-05, - "\u001b[?2004h" - ], - [ - 1.588728, - "s" - ], - [ - 0.158798, - "\bsu" - ], - [ - 0.12764, - "d" - ], - [ - 0.088209, - "o" - ], - [ - 0.160458, - " " - ], - [ - 0.152138, - "." - ], - [ - 0.200633, - "/" - ], - [ - 0.343621, - "\b \b" - ], - [ - 0.142987, - "\b \b" - ], - [ - 0.336517, - "k" - ], - [ - 0.192818, - "p" - ], - [ - 0.079464, - "o" - ], - [ - 0.167625, - "d" - ], - [ - 0.160306, - " " - ], - [ - 0.49613, - "i" - ], - [ - 0.120488, - "m" - ], - [ - 0.247645, - "a" - ], - [ - 0.160515, - "g" - ], - [ - 0.087028, - "e" - ], - [ - 0.072479, - "s" - ], - [ - 0.08742, - " " - ], - [ - 0.120873, - "-" - ], - [ - 0.127862, - "-" - ], - [ - 0.119898, - "f" - ], - [ - 0.12007, - "o" - ], - [ - 0.127375, - "r" - ], - [ - 0.111896, - "m" - ], - [ - 0.088551, - "a" - ], - [ - 0.119081, - "t" - ], - [ - 0.144899, - " " - ], - [ - 0.40945, - "{" - ], - [ - 0.598946, - "\b \b" - ], - [ - 0.497455, - "\"" - ], - [ - 0.498444, - "t" - ], - [ - 0.107574, - "a" - ], - [ - 0.143907, - "b" - ], - [ - 0.136371, - "l" - ], - [ - 0.119485, - "e" - ], - [ - 0.080146, - " " - ], - [ - 0.336807, - "{" - ], - [ - 0.231791, - "{" - ], - [ - 0.271322, - "." - ], - [ - 0.319863, - "I" - ], - [ - 0.160571, - "D" - ], - [ - 0.415578, - "}" - ], - [ - 0.424342, - "}" - ], - [ - 0.264361, - "\"" - ], - [ - 0.431581, - "\u001b[?1l\u001b>" - ], - [ - 6.9e-05, - "\u001b[?2004l" - ], - [ - 5.4e-05, - "\r\r\n" - ], - [ - 0.004691, - "\u001b]2;sudo kpod images --format \"table {{.ID}}\"\u0007\u001b]1;kpod\u0007" - ], - [ - 0.096877, - "IMAGE ID \r\n3edb693215a22336c352ba66d101fafda7e2ecbad1ecf2137e1c495e461d8f23\r\n1adfcf922a991e2d59a98dd2b5adc813b590261737d77c3ec7ae23e4f927d6bb\r\n524b9482e987a953b81321580372c07c3c765ce7c336445797428658384c6812\r\n9518288ded9bd43a055a4022d84c440b3ac16981f943bb099b60e0984e9e23d2\r\n" - ], - [ - 0.003109, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.024093, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001338, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.00015, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.2e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000103, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 5.9e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.6e-05, - "\u001b[?2004h" - ], - [ - 5.653254, - "w" - ], - [ - 0.123493, - "\bwh" - ], - [ - 0.080798, - "i" - ], - [ - 0.127546, - "c" - ], - [ - 0.112514, - "h" - ], - [ - 0.079037, - " " - ], - [ - 0.129196, - "k" - ], - [ - 0.135422, - "p" - ], - [ - 0.076117, - "o" - ], - [ - 0.116658, - "d" - ], - [ - 0.144849, - "\u001b[?1l\u001b>\u001b[?2004l\r\r\n" - ], - [ - 0.002681, - "\u001b]2;( alias; declare -f; ) | /usr/bin/which --tty-only --read-alias --show-tilde\u0007\u001b]1;which\u0007" - ], - [ - 0.004242, - "/usr/local/bin/kpod\r\n" - ], - [ - 0.000126, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.026103, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.002394, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000493, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000187, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 7.9e-05, - "\u001b[?1h\u001b=" - ], - [ - 6.2e-05, - "\u001b[?2004h" - ], - [ - 86.650128, - "m" - ], - [ - 0.161011, - "\bma" - ], - [ - 0.655411, - "k" - ], - [ - 0.103692, - "e" - ], - [ - 0.063223, - " " - ], - [ - 0.09703, - "k" - ], - [ - 0.119343, - "p" - ], - [ - 0.049093, - "o" - ], - [ - 0.303802, - "d" - ], - [ - 0.144347, - "\u001b[?1l\u001b>" - ], - [ - 4.4e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.004019, - "\u001b]2;make kpod\u0007\u001b]1;make\u0007" - ], - [ - 6.725858, - "go build -ldflags '-X main.gitCommit=99495909 -X main.buildInfo=1502916060' -tags \"selinux seccomp \" -o kpod github.com/kubernetes-incubator/cri-o/cmd/kpod\r\n" - ], - [ - 4.213403, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.018496, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table* \u001b[39m \u001b[33m11s\u001b[39m\r\n" - ], - [ - 0.001197, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000111, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000112, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 5.6e-05, - "\u001b[?1h\u001b=" - ], - [ - 8e-05, - "\u001b[?2004h" - ], - [ - 0.768399, - "s" - ], - [ - 0.111451, - "\bsu" - ], - [ - 0.096019, - "d" - ], - [ - 0.103589, - "o" - ], - [ - 0.104726, - " " - ], - [ - 0.079095, - "k" - ], - [ - 0.177292, - "p" - ], - [ - 0.358902, - "\b \b" - ], - [ - 0.12001, - "\b \b" - ], - [ - 0.167745, - "m" - ], - [ - 0.096101, - "a" - ], - [ - 0.096699, - "k" - ], - [ - 0.088325, - "e" - ], - [ - 0.087158, - " " - ], - [ - 0.064768, - "i" - ], - [ - 0.071949, - "n" - ], - [ - 0.048283, - "s" - ], - [ - 0.095575, - "t" - ], - [ - 0.080741, - "a" - ], - [ - 0.135503, - "l" - ], - [ - 0.111733, - "l" - ], - [ - 0.135263, - "\u001b[?1l\u001b>" - ], - [ - 0.000111, - "\u001b[?2004l\r\r\n" - ], - [ - 0.001633, - "\u001b]2;sudo make install\u0007\u001b]1;make\u0007" - ], - [ - 3.04395, - "install -D -m 755 crio /usr/local/bin/crio\r\n" - ], - [ - 0.05693, - "install -D -m 755 crioctl /usr/local/bin/crioctl\r\n" - ], - [ - 0.033176, - "install -D -m 755 kpod /usr/local/bin/kpod\r\n" - ], - [ - 0.04205, - "install -D -m 755 conmon/conmon /usr/local/libexec/crio/conmon\r\n" - ], - [ - 0.002903, - "install -D -m 755 pause/pause /usr/local/libexec/crio/pause\r\n" - ], - [ - 0.004348, - "install -d -m 755 /usr/local/share/man/man1\r\n" - ], - [ - 0.000355, - "install -d -m 755 /usr/local/share/man/man5\r\n" - ], - [ - 0.000615, - "install -d -m 755 /usr/local/share/man/man8\r\n" - ], - [ - 0.000636, - "install -m 644 docs/kpod-diff.1 docs/kpod-push.1 docs/kpod-cp.1 docs/kpod.1 docs/kpod-export.1 docs/kpod-load.1 docs/kpod-logs.1 docs/kpod-images.1 docs/kpod-umount.1 docs/kpod-save.1 docs/kpod-mount.1 docs/kpod-info.1 docs/kpod-inspect.1 docs/kpod-history.1 docs/kpod-pull.1 docs/kpod-rmi.1 docs/kpod-version.1 docs/kpod-tag.1 -t /usr/local/share/man/man1\r\n" - ], - [ - 0.011201, - "install -m 644 docs/crio.conf.5 -t /usr/local/share/man/man5\r\n" - ], - [ - 0.004078, - "install -m 644 docs/crio.8 -t /usr/local/share/man/man8\r\n" - ], - [ - 0.00848, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.020721, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table* \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001114, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 9.5e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.1e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000165, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 388.817771, - "v" - ], - [ - 0.052535, - "\bvi" - ], - [ - 0.099467, - " " - ], - [ - 0.312442, - "m" - ], - [ - 0.159718, - "c" - ], - [ - 0.207542, - "\b \b" - ], - [ - 0.111893, - "\b \b" - ], - [ - 0.088207, - "c" - ], - [ - 0.120601, - "m" - ], - [ - 0.122793, - "d\u001b[1m/\u001b[0m" - ], - [ - 0.06091, - "\b\u001b[0m/k" - ], - [ - 0.12778, - "pod\u001b[1m/\u001b[0m" - ], - [ - 0.339925, - "\b\u001b[0m/r" - ], - [ - 0.124315, - "m" - ], - [ - 0.119998, - "i.go\u001b[1m \u001b[0m" - ], - [ - 0.071475, - "\b\u001b[0m i" - ], - [ - 0.511445, - "\b \b" - ], - [ - 0.145079, - "\b" - ], - [ - 0.195924, - "\u001b[?1l\u001b>" - ], - [ - 0.000365, - "\u001b[?2004l\r\r\n" - ], - [ - 0.008801, - "\u001b]2;vim cmd/kpod/rmi.go\u0007\u001b]1;vi\u0007" - ], - [ - 0.134848, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000609, - "\u001b[1;52r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[52;1H\"cmd/kpod/rmi.go\"" - ], - [ - 0.000144, - " 123L, 3096C" - ], - [ - 0.008903, - "\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[1;1H\u001b[>c" - ], - [ - 0.001667, - "\u001b[1;1H\u001b[96m\u001b[47m 1 \u001b[m\u001b[93m\u001b[107m\u001b[32mpackage\u001b[m\u001b[93m\u001b[107m main\r\n\u001b[96m\u001b[47m 2 \r\n 3 \u001b[m\u001b[93m\u001b[107m\u001b[32mimport\u001b[m\u001b[93m\u001b[107m (\r\n\u001b[96m\u001b[47m 4 \u001b[m\u001b[93m\u001b[107m \u001b[36m\"fmt\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 5 \r\n 6 \u001b[m\u001b[93m\u001b[107m \u001b[36m\"github.com/containers/storage\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 7 \u001b[m\u001b[93m\u001b[107m libkpodimage \u001b[36m\"github.com/kubernetes-incubator/cri-o/libkpod/image\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 8 \u001b[m\u001b[93m\u001b[107m \u001b[36m\"github.com/pkg/errors\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 9 \u001b[m\u001b[93m\u001b[107m \u001b[36m\"github.com/urfave/cli\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 10 \u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 11 \r\n 12 \u001b[m\u001b[93m\u001b[107m\u001b[32mvar\u001b[m\u001b[93m\u001b[107m (\r\n\u001b[96m\u001b[47m 13 \u001b[m\u001b[93m\u001b[107m rmiDescription = \u001b[36m\"removes one or more locally stored images.\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 14 \u001b[m\u001b[93m\u001b[107m rmiFlags\u001b[7C= []cli.Flag{\r\n\u001b[96m\u001b[47m 15 \u001b[m\u001b[93m\u001b[107m\u001b[8Ccli.BoolFlag{\r\n\u001b[96m\u001b[47m 16 \u001b[m\u001b[93m\u001b[107m\u001b[12CName: \u001b[36m\"force, f\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 17 \u001b[m\u001b[93m\u001b[107m\u001b[12CUsage: \u001b[36m\"force removal of the image\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[" - ], - [ - 2e-05, - "96m\u001b[47m 18 \u001b[m\u001b[93m\u001b[107m\u001b[8C},\r\n\u001b[96m\u001b[47m 19 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 20 \u001b[m\u001b[93m\u001b[107m rmiCommand = cli.Command{\r\n\u001b[96m\u001b[47m 21 \u001b[m\u001b[93m\u001b[107m\u001b[8CName:\u001b[8C\u001b[36m\"rmi\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 22 \u001b[m\u001b[93m\u001b[107m\u001b[8CUsage:\u001b[7C\u001b[36m\"removes one or more images from local storage\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 23 \u001b[m\u001b[93m\u001b[107m\u001b[8CDescription: rmiDescription,\r\n\u001b[96m\u001b[47m 24 \u001b[m\u001b[93m\u001b[107m\u001b[8CAction: rmiCmd,\r\n\u001b[96m\u001b[47m 25 \u001b[m\u001b[93m\u001b[107m\u001b[8CArgsUsage: \u001b[36m\"IMAGE-NAME-OR-ID [...]\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 26 \u001b[m\u001b[93m\u001b[107m\u001b[8CFlags:\u001b[7CrmiFlags,\r\n\u001b[96m\u001b[47m 27 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 28 \u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 29 \r\n 30 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m rmiCmd(c *cli.Context) \u001b[33merror\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 31 \r\n 32 \u001b[m\u001b[93m\u001b[107m force := \u001b[36mfalse\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 33 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m c.IsSet(\u001b[36m\"force\"\u001b[m\u001b[93m\u001b[107m) {\r\n\u001b[96m\u001b[47m 34 \u001b[m\u001b[93m\u001b[107m\u001b[8Cforce = c.Bool(\u001b[36m\"force\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 35 \u001b[m\u001b[93m" - ], - [ - 0.028983, - "\u001b[107m }\r\n\u001b[96m\u001b[47m 36 \r\n 37 \u001b[m\u001b[93m\u001b[107m args := c.Args()\r\n\u001b[96m\u001b[47m 38 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(args) == \u001b[36m0\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 39 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Errorf(\u001b[36m\"image name or ID must be specified\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 40 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 41 \r\n 42 \u001b[m\u001b[93m\u001b[107m config, err := getConfig(c)\r\n\u001b[96m\u001b[47m 43 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 44 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"Could not get config\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 45 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 46 \u001b[m\u001b[93m\u001b[107m store, err := getStore(config)\r\n\u001b[96m\u001b[47m 47 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 48 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\r\n\u001b[96m\u001b[47m 49 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 50 \u001b[m\u001b[93m\u001b[107m\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m" - ], - [ - 2.8e-05, - "\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H kpod-format-table \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;32H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mrmi.go \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[51;50H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                             \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m   1%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m  1\u001b[m\u001b[93m" - ], - [ - 0.009152, - "\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1  \u001b[1;5H\u001b[?12l\u001b[?25h\u001bP+q436f\u001b\\\u001bP+q6b75\u001b\\\u001bP+q6b64\u001b\\\u001bP+q6b72\u001b\\\u001bP+q6b6c\u001b\\\u001bP+q2332\u001b\\\u001bP+q2334\u001b\\\u001bP+q2569\u001b\\\u001bP+q2a37\u001b\\\u001bP+q6b31\u001b\\" - ], - [ - 0.418144, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[K\u001b[52;1H/\u001b[?2004h" - ], - [ - 6.9e-05, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.594911, - "m\u001b[?25l" - ], - [ - 0.011367, - "\u001b[1;13H\u001b[7m\u001b[91mm\u001b[27m\u001b[m\u001b[93m\u001b[107m\u001b[51;2H\u001b[1m\u001b[38;5;22m\u001b[48;5;148mCOMMND \u001b[m\u001b[93m\u001b[107m\u001b[200C\u001b[38;5;22m\u001b[48;5;252m9\r\n\u001b[m\u001b[93m\u001b[107m/m\u001b[?12l\u001b[?25h" - ], - [ - 0.22557, - "u\u001b[?25l" - ], - [ - 0.014952, - "\u001b[1;13Hm\u001b[39;52H\u001b[7m\u001b[91mmu\u001b[27m\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  32%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m39\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:48\r\n\u001b[m\u001b[93m\u001b[107m/mu\u001b[?12l\u001b[?25h" - ], - [ - 0.081033, - "s\u001b[?25l" - ], - [ - 0.011335, - "\u001b[39;54H\u001b[7m\u001b[91ms\u001b[52;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.076678, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mt\u001b[?25l" - ], - [ - 0.012142, - "\u001b[39;55H\u001b[7m\u001b[91mt\u001b[52;6H\u001b[?12l\u001b[?25h" - ], - [ - 0.180332, - "\u001b[?25l" - ], - [ - 0.008175, - "\u001b[39;56H \u001b[52;7H\u001b[?12l\u001b[?25h" - ], - [ - 0.087385, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mf\u001b[?25l" - ], - [ - 0.011478, - "\u001b[1;50r\u001b[1;1H\u001b[19M\u001b[1;52r\u001b[20;52H\u001b[36mmust \u001b[m\u001b[93m\u001b[107m\u001b[32;1H\u001b[96m\u001b[47m 51 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, id := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m args {\r\n\u001b[96m\u001b[47m 52 \u001b[m\u001b[93m\u001b[107m\u001b[8Cimage, err := libkpodimage.FindImage(store, id)\r\n\u001b[96m\u001b[47m 53 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 54 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"could not get image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 55 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 56 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m image != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 57 \u001b[m\u001b[93m\u001b[107m\u001b[12CctrIDs, err := runningContainers(image, store)\r\n\u001b[96m\u001b[47m 58 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 59 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"error getting running containers for image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 60 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[96m\u001b[47m 61" - ], - [ - 2.8e-05, - " \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(ctrIDs) > \u001b[36m0\u001b[m\u001b[93m\u001b[107m && \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(image.Names) <= \u001b[36m1\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 62 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mif\u001b[m\u001b[93m\u001b[107m force {\r\n\u001b[96m\u001b[47m 63 \u001b[m\u001b[93m\u001b[107m\u001b[20CremoveContainers(ctrIDs, store)\r\n\u001b[96m\u001b[47m 64 \u001b[m\u001b[93m\u001b[107m\u001b[16C} \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 65 \u001b[m\u001b[93m\u001b[107m\u001b[20C\u001b[32mfor\u001b[m\u001b[93m\u001b[107m ctrID := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m ctrIDs {\r\n\u001b[96m\u001b[47m 66 \u001b[m\u001b[93m\u001b[107m\u001b[24C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m fmt.Errorf(\u001b[36m\"Could not remove image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m (\u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[91mmust f\u001b[27m\u001b[m\u001b[93m\u001b[107m\u001b[36morce) - container \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m is using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\r\n\u001b[96m\u001b[47m 67 \u001b[m\u001b[93m\u001b[107m\u001b[20C}\r\n\u001b[96m\u001b[47m 68 \u001b[m\u001b[93m\u001b[107m\u001b[16C}\r\n\u001b[96m\u001b[47m 69 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  54%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:71\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[K\u001b[52;1H/" - ], - [ - 2.2e-05, - "must f\u001b[?12l\u001b[?25h" - ], - [ - 0.084161, - "o\u001b[?25l" - ], - [ - 0.012305, - "\u001b[47;81H\u001b[7m\u001b[91mo\u001b[52;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.116387, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mr\u001b[?25l" - ], - [ - 0.011734, - "\u001b[47;82H\u001b[7m\u001b[91mr\u001b[52;10H\u001b[?12l\u001b[?25h" - ], - [ - 0.255362, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mc\u001b[?25l" - ], - [ - 0.011191, - "\u001b[47;83H\u001b[7m\u001b[91mc\u001b[52;11H\u001b[?12l\u001b[?25h" - ], - [ - 0.0573, - "\u001b[27m\u001b[m\u001b[93m\u001b[107me\u001b[?25l" - ], - [ - 0.013394, - "\u001b[47;84H\u001b[7m\u001b[91me\u001b[52;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.202815, - "\r\u001b[?25l" - ], - [ - 0.008924, - "\u001b[27m\u001b[m\u001b[93m\u001b[107m\u001b[47;75H\u001b[7m\u001b[33mmust force\u001b[m\u001b[93m\u001b[107m\u001b[51;2H\u001b[1m\u001b[38;5;22m\u001b[48;5;148mNORMAL \u001b[47;75H\u001b[?12l\u001b[?25h" - ], - [ - 1.635195, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[45;51H\u001b[1m\u001b[31m\u001b[106m{\u001b[47;25H}\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m 70 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[96m// If the user supplied an ID, we cannot delete the image if it is referred to by multiple tags\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[K\u001b[51;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:2\u001b[47;25H\u001b[?12l\u001b[?25h" - ], - [ - 0.536079, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[45;51H{\u001b[47;25H}\u001b[51;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:7\u001b[46;75H\u001b[?12l\u001b[?25h" - ], - [ - 0.422312, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[45;51H\u001b[1m\u001b[31m\u001b[106m{\u001b[47;25H}\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  53%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:47\u001b[45;51H\u001b[?12l\u001b[?25h" - ], - [ - 7.590339, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m{\u001b[47;25H}\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  54%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:71\u001b[46;75H\u001b[?12l\u001b[?25h" - ], - [ - 0.524344, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[45;51H\u001b[1m\u001b[31m\u001b[106m{\u001b[47;25H}\u001b[m\u001b[93m\u001b[107m\u001b[51;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:2\u001b[47;25H\u001b[?12l\u001b[?25h" - ], - [ - 0.384796, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[43;28H\u001b[1m\u001b[31m\u001b[106m{\u001b[m\u001b[93m\u001b[107m\u001b[44;51H{\u001b[46;25H}\u001b[47;21H\u001b[1m\u001b[31m\u001b[106m}\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m 71 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m libkpodimage.MatchesID(image.ID, id) {\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  55%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:17\u001b[47;21H\u001b[?12l\u001b[?25h" - ], - [ - 1.34616, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[43;28H{\u001b[44;51H\u001b[1m\u001b[31m\u001b[106m{\u001b[46;25H}\u001b[m\u001b[93m\u001b[107m\u001b[47;21H}\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  54%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:21\u001b[46;25H\u001b[?12l\u001b[?25h" - ], - [ - 6.08698, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[44;51H{\u001b[46;25H}\u001b[51;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:7\u001b[45;75H\u001b[?12l\u001b[?25h" - ], - [ - 0.759914, - "\u001b[51;210H2\u001b[45;76H" - ], - [ - 0.494462, - "\u001b[51;210H3\u001b[45;77H" - ], - [ - 0.033092, - "\u001b[51;210H4\u001b[45;78H" - ], - [ - 0.027331, - "\u001b[51;210H5\u001b[45;79H" - ], - [ - 0.032653, - "\u001b[51;210H6\u001b[45;80H" - ], - [ - 0.028729, - "\u001b[51;210H7\u001b[45;81H" - ], - [ - 0.034268, - "\u001b[51;210H8\u001b[45;82H" - ], - [ - 0.022711, - "\u001b[51;210H9\u001b[45;83H" - ], - [ - 0.033818, - "\u001b[51;209H80\u001b[45;84H" - ], - [ - 0.033041, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[45;74H\u001b[1m\u001b[31m\u001b[106m(\u001b[10C)\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;252m1\u001b[45;85H\u001b[?12l\u001b[?25h" - ], - [ - 0.029548, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[45;74H\u001b[36m(\u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[33mm\u001b[m\u001b[93m\u001b[107m\u001b[9C\u001b[36m) \u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;252m2\u001b[45;86H\u001b[?12l\u001b[?25h" - ], - [ - 0.02919, - "\u001b[51;210H3\u001b[45;87H" - ], - [ - 0.030088, - "\u001b[51;210H4\u001b[45;88H" - ], - [ - 0.032142, - "\u001b[51;210H5\u001b[45;89H" - ], - [ - 0.03027, - "\u001b[51;210H6\u001b[45;90H" - ], - [ - 0.030009, - "\u001b[51;210H7\u001b[45;91H" - ], - [ - 0.031925, - "\u001b[51;210H8\u001b[45;92H" - ], - [ - 0.027725, - "\u001b[51;210H9\u001b[45;93H" - ], - [ - 0.031953, - "\u001b[51;209H90\u001b[45;94H" - ], - [ - 0.029383, - "\u001b[51;210H1\u001b[45;95H" - ], - [ - 0.030754, - "\u001b[51;210H2\u001b[45;96H" - ], - [ - 0.03042, - "\u001b[51;210H3\u001b[45;97H" - ], - [ - 0.030576, - "\u001b[51;210H4\u001b[45;98H" - ], - [ - 0.031217, - "\u001b[51;210H5\u001b[45;99H" - ], - [ - 0.031561, - "\u001b[51;210H6\u001b[45;100H" - ], - [ - 0.136981, - "\u001b[51;210H7\u001b[45;101H" - ], - [ - 8.584841, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[44;51H\u001b[1m\u001b[31m\u001b[106m{\u001b[46;25H}\u001b[m\u001b[93m\u001b[107m\u001b[51;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:21\u001b[46;25H\u001b[?12l\u001b[?25h" - ], - [ - 0.501453, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[43;28H\u001b[1m\u001b[31m\u001b[106m{\u001b[m\u001b[93m\u001b[107m\u001b[44;51H{\u001b[46;25H}\u001b[47;21H\u001b[1m\u001b[31m\u001b[106m}\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  55%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:17\u001b[47;21H\u001b[?12l\u001b[?25h" - ], - [ - 0.032681, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[39;61H\u001b[1m\u001b[31m\u001b[106m{\u001b[m\u001b[93m\u001b[107m\u001b[42;28H{\u001b[46;21H}\u001b[47;17H\u001b[1m\u001b[31m\u001b[106m}\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m 72 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(image.Names) > \u001b[36m1\u001b[m\u001b[93m\u001b[107m && !force {\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  56%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m9\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:13\u001b[47;17H\u001b[?12l\u001b[?25h" - ], - [ - 0.026312, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[38;61H{\u001b[46;17H}\u001b[50;1H\u001b[96m\u001b[47m 73 \u001b[m\u001b[93m\u001b[107m\u001b[20C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m fmt.Errorf(\u001b[36m\"unable to delete \u001b[m\u001b[93m\u001b[107m\u001b[31m%s\u001b[m\u001b[93m\u001b[107m\u001b[36m (\u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[33mmust force\u001b[m\u001b[93m\u001b[107m\u001b[36m) - image is referred to in multiple tags\"\u001b[m\u001b[93m\u001b[107m, image.ID)\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  57%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m70\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:97\u001b[47;101H\u001b[?12l\u001b[?25h" - ], - [ - 0.027588, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[50;1H\u001b[96m\u001b[47m 74 \u001b[m\u001b[93m\u001b[107m\u001b[16C}\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  58%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:53\u001b[47;57H\u001b[?12l\u001b[?25h" - ], - [ - 0.034204, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[47;55H\u001b[1m\u001b[31m\u001b[106m{\u001b[49;21H}\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 75 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[96m// If it is forced, we have to untag the image so that it can be deleted\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  59%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:51\u001b[47;55H\u001b[?12l\u001b[?25h" - ], - [ - 0.025136, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[46;55H{\u001b[48;21H}\r\n\r\n\u001b[96m\u001b[47m 76 \u001b[m\u001b[93m\u001b[107m\u001b[16Cimage.Names = image.Names[:\u001b[36m0\u001b[m\u001b[93m\u001b[107m]\u001b[51;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:97\u001b[47;101H\u001b[?12l\u001b[?25h" - ], - [ - 0.037748, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[45;55H\u001b[1m\u001b[31m\u001b[106m{\u001b[47;21H}\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m 77 \u001b[m\u001b[93m\u001b[107m\u001b[12C} \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  60%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[47;21H\u001b[?12l\u001b[?25h" - ], - [ - 0.029845, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[44;55H{\u001b[46;21H}\u001b[50;1H\u001b[96m\u001b[47m 78 \u001b[m\u001b[93m\u001b[107m\u001b[16Cname, err2 := libkpodimage.UntagImage(store, image, id)\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  61%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:88\u001b[47;92H\u001b[?12l\u001b[?25h" - ], - [ - 0.029474, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[47;46H\u001b[1m\u001b[31m\u001b[106m[\u001b[2C]\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m 79 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err2 != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  62%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:45\u001b[47;49H\u001b[?12l\u001b[?25h" - ], - [ - 0.027846, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[46;46H[:\u001b[1C]\u001b[50;1H\u001b[96m\u001b[47m 80 \u001b[m\u001b[93m\u001b[107m\u001b[20C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  63%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:20\u001b[47;24H\u001b[?12l\u001b[?25h" - ], - [ - 0.028156, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[47;58H\u001b[1m\u001b[31m\u001b[106m(\u001b[16C)\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m 81 \u001b[m\u001b[93m\u001b[107m\u001b[16C}\u001b[51;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:71\u001b[47;75H\u001b[?12l\u001b[?25h" - ], - [ - 0.036773, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[46;58H(s\u001b[15C)\u001b[47;36H\u001b[1m\u001b[31m\u001b[106m{\u001b[49;21H}\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 82 \u001b[m\u001b[93m\u001b[107m\u001b[16Cfmt.Printf(\u001b[36m\"untagged: \u001b[m\u001b[93m\u001b[107m\u001b[31m%s\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, name)\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  64%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m9\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:32\u001b[47;36H\u001b[?12l\u001b[?25h" - ], - [ - 0.029719, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[46;36H{\u001b[48;21H}\r\n\r\n\u001b[96m\u001b[47m 83 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  65%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m80\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:30\u001b[47;34H\u001b[?12l\u001b[?25h" - ], - [ - 0.032707, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[45;36H\u001b[1m\u001b[31m\u001b[106m{\u001b[47;21H}\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m 84 \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  66%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:17\u001b[47;21H\u001b[?12l\u001b[?25h" - ], - [ - 0.026852, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[44;36H{\u001b[46;21H}\u001b[47;31H\u001b[1m\u001b[31m\u001b[106m(\u001b[20C)\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m 85 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(image.Names) > \u001b[36m0\u001b[m\u001b[93m\u001b[107m {\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  67%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:48\u001b[47;52H\u001b[?12l\u001b[?25h" - ], - [ - 0.026473, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[41;24H\u001b[1m\u001b[31m\u001b[106m{\u001b[m\u001b[93m\u001b[107m\u001b[46;31H(\u001b[36m\"\u001b[m\u001b[93m\u001b[107m\u001b[19C)\u001b[47;17H\u001b[1m\u001b[31m\u001b[106m}\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m 86 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mcontinue\u001b[m\u001b[93m\u001b[107m\u001b[51;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:13\u001b[47;17H\u001b[?12l\u001b[?25h" - ], - [ - 0.032368, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[40;24H{\u001b[46;17H}\u001b[50;1H\u001b[96m\u001b[47m 87 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  68%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1 \u001b[47;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.03189, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[47;41H\u001b[1m\u001b[31m\u001b[106m{\u001b[49;17H}\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 88 \u001b[m\u001b[93m\u001b[107m\u001b[12Cid, err := libkpodimage.RemoveImage(image, store)\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  69%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:37\u001b[47;41H\u001b[?12l\u001b[?25h" - ], - [ - 0.036978, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[46;41H{\u001b[48;17H}\r\n\r\n\u001b[96m\u001b[47m 89 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  70%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:24\u001b[47;28H\u001b[?12l\u001b[?25h" - ], - [ - 0.031976, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[45;41H\u001b[1m\u001b[31m\u001b[106m{\u001b[47;17H}\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m 90 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  71%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:13\u001b[47;17H\u001b[?12l\u001b[?25h" - ], - [ - 0.034896, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[44;41H{\u001b[46;17H}\u001b[47;52H\u001b[1m\u001b[31m\u001b[106m(\u001b[12C)\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m 91 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  72%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:61\u001b[47;65H\u001b[?12l\u001b[?25h" - ], - [ - 0.017603, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[46;52H(i\u001b[11C)\u001b[47;31H\u001b[1m\u001b[31m\u001b[106m{\u001b[49;17H}\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 92 \u001b[m\u001b[93m\u001b[107m\u001b[12Cfmt.Printf(\u001b[36m\"\u001b[m\u001b[93m\u001b[107m\u001b[31m%s\\n\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, id)\u001b[51;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m9\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:27\u001b[47;31H\u001b[?12l\u001b[?25h" - ], - [ - 0.040503, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[46;31H{\u001b[48;17H}\r\n\r\n\u001b[96m\u001b[47m 93 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  73%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m90\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:26\u001b[47;30H\u001b[?12l\u001b[?25h" - ], - [ - 0.028582, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[45;31H\u001b[1m\u001b[31m\u001b[106m{\u001b[47;17H}\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m 94 \u001b[m\u001b[93m\u001b[107m }\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  74%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:13\u001b[47;17H\u001b[?12l\u001b[?25h" - ], - [ - 0.031483, - "\u001b[?25l\u001b[1;50r\u001b[m\u001b[93m\u001b[107m\u001b[50;1H\r\n\u001b[1;52r\u001b[44;31H{\u001b[46;17H}\u001b[47;27H\u001b[1m\u001b[31m\u001b[106m(\u001b[10C)\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m 95 \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  75%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:34\u001b[47;38H\u001b[?12l\u001b[?25h" - ], - [ - 0.161023, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[44;31H\u001b[1m\u001b[31m\u001b[106m{\u001b[46;17H}\u001b[m\u001b[93m\u001b[107m\u001b[47;27H(\u001b[36m\"\u001b[m\u001b[93m\u001b[107m\u001b[9C)\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  74%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:13\u001b[46;17H\u001b[?12l\u001b[?25h" - ], - [ - 0.499146, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[44;31H{\u001b[46;17H}\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  73%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m0\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:26\u001b[45;30H\u001b[?12l\u001b[?25h" - ], - [ - 0.027118, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[44;31H\u001b[1m\u001b[31m\u001b[106m{\u001b[46;17H}\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  72%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m89\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:27\u001b[44;31H\u001b[?12l\u001b[?25h" - ], - [ - 0.033789, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[43;52H\u001b[1m\u001b[31m\u001b[106m(\u001b[12C)\u001b[m\u001b[93m\u001b[107m\u001b[44;31H{\u001b[46;17H}\u001b[51;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:61\u001b[43;65H\u001b[?12l\u001b[?25h" - ], - [ - 0.026661, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[40;41H\u001b[1m\u001b[31m\u001b[106m{\u001b[42;17H}\u001b[m\u001b[93m\u001b[107m\u001b[43;52H(i\u001b[11C)\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  71%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:13\u001b[42;17H\u001b[?12l\u001b[?25h" - ], - [ - 0.032548, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[40;41H{\u001b[42;17H}\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  70%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:24\u001b[41;28H\u001b[?12l\u001b[?25h" - ], - [ - 0.029278, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[40;41H\u001b[1m\u001b[31m\u001b[106m{\u001b[42;17H}\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  69%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:37\u001b[40;41H\u001b[?12l\u001b[?25h" - ], - [ - 0.026258, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m{\u001b[42;17H}\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  68%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1 \u001b[39;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.034793, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[32;24H\u001b[1m\u001b[31m\u001b[106m{\u001b[38;17H}\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  67%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:13\u001b[38;17H\u001b[?12l\u001b[?25h" - ], - [ - 0.032971, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[32;24H{\u001b[37;31H\u001b[1m\u001b[31m\u001b[106m(\u001b[20C)\u001b[m\u001b[93m\u001b[107m\u001b[38;17H}\u001b[51;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:48\u001b[37;52H\u001b[?12l\u001b[?25h" - ], - [ - 0.029998, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[34;36H\u001b[1m\u001b[31m\u001b[106m{\u001b[36;21H}\u001b[m\u001b[93m\u001b[107m\u001b[37;31H(\u001b[36m\"\u001b[m\u001b[93m\u001b[107m\u001b[19C)\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  66%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:17\u001b[36;21H\u001b[?12l\u001b[?25h" - ], - [ - 0.030022, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[34;36H{\u001b[36;21H}\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  65%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m0\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:30\u001b[35;34H\u001b[?12l\u001b[?25h" - ], - [ - 0.031828, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[34;36H\u001b[1m\u001b[31m\u001b[106m{\u001b[36;21H}\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  64%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m79\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:32\u001b[34;36H\u001b[?12l\u001b[?25h" - ], - [ - 0.027492, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[33;58H\u001b[1m\u001b[31m\u001b[106m(\u001b[16C)\u001b[m\u001b[93m\u001b[107m\u001b[34;36H{\u001b[36;21H}\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  63%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:71\u001b[33;75H\u001b[?12l\u001b[?25h" - ], - [ - 0.032435, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[32;24H\u001b[1m\u001b[31m\u001b[106m{\u001b[m\u001b[93m\u001b[107m\u001b[33;58H(s\u001b[15C)\u001b[38;17H\u001b[1m\u001b[31m\u001b[106m}\u001b[m\u001b[93m\u001b[107m\u001b[51;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:20\u001b[32;24H\u001b[?12l\u001b[?25h" - ], - [ - 0.031073, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[31;46H\u001b[1m\u001b[31m\u001b[106m[\u001b[2C]\u001b[m\u001b[93m\u001b[107m\u001b[32;24H{\u001b[38;17H}\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  62%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:45\u001b[31;49H\u001b[?12l\u001b[?25h" - ], - [ - 0.025565, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\b\b[:\u001b[1C]\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  61%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:88\u001b[30;92H\u001b[?12l\u001b[?25h" - ], - [ - 0.034775, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[27;55H\u001b[1m\u001b[31m\u001b[106m{\u001b[29;21H}\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  60%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:17\u001b[29;21H\u001b[?12l\u001b[?25h" - ], - [ - 0.031444, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[27;55H{\u001b[29;21H}\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  59%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9\u001b[28;101H\u001b[?12l\u001b[?25h" - ], - [ - 0.027046, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[27;55H\u001b[1m\u001b[31m\u001b[106m{\u001b[29;21H}\u001b[m\u001b[93m\u001b[107m\u001b[51;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:51\u001b[27;55H\u001b[?12l\u001b[?25h" - ], - [ - 0.034344, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[26;57H\u001b[1m\u001b[31m\u001b[106m{\u001b[m\u001b[93m\u001b[107m\u001b[27;55H{\u001b[29;21H}\u001b[32;17H\u001b[1m\u001b[31m\u001b[106m}\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  58%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:53\u001b[26;57H\u001b[?12l\u001b[?25h" - ], - [ - 0.032004, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m{\u001b[32;17H} \u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  57%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m0\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:97\u001b[25;101H\u001b[?12l\u001b[?25h" - ], - [ - 0.031757, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[16;61H\u001b[1m\u001b[31m\u001b[106m{\u001b[24;17H}\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  56%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m69\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:13\u001b[24;17H\u001b[?12l\u001b[?25h" - ], - [ - 0.027946, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[16;61H{\u001b[19;28H\u001b[1m\u001b[31m\u001b[106m{\u001b[23;21H}\u001b[m\u001b[93m\u001b[107m\u001b[24;17H}\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  55%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:17\u001b[23;21H\u001b[?12l\u001b[?25h" - ], - [ - 0.032109, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[19;28H{\u001b[20;51H\u001b[1m\u001b[31m\u001b[106m{\u001b[22;25H}\u001b[m\u001b[93m\u001b[107m\u001b[23;21H}\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  54%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:21\u001b[22;25H\u001b[?12l\u001b[?25h" - ], - [ - 0.185364, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[20;51H{\u001b[22;25H}\u001b[51;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:97\u001b[21;101H\u001b[?12l\u001b[?25h" - ], - [ - 12.251553, - "\u001b[51;210H8\u001b[21;102H" - ], - [ - 0.640334, - "\u001b[51;210H9\u001b[21;103H" - ], - [ - 0.179298, - "\u001b[m\u001b[93m\u001b[107m\u001b[51;175H\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;181H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;189H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;194H\u001b[38;5;107m\u001b[48;5;240m \u001b[1C54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;201H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;203H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:100\u001b[21;104H" - ], - [ - 0.807758, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[34m-- INSERT --" - ], - [ - 0.042962, - "\u001b[m\u001b[93m\u001b[107m\u001b[51;1H\u001b[1m\u001b[38;5;23m\u001b[48;5;231m INSERT \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;231m\u001b[48;5;31m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m\u001b[51;12H kpod-format-table \u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;31m\u001b[51;32H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;31mrmi.go \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[m\u001b[93m\u001b[107m\u001b[51;49H\u001b[38;5;31m\u001b[48;5;24m\u001b[51;50H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;24m                                                                                                                            \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;181H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;189H\u001b[38;5;117m\u001b[48;5;24m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;194H\u001b[38;5;186m\u001b[4" - ], - [ - 2.9e-05, - "8;5;31m  54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[51;201H\u001b[38;5;24m\u001b[48;5;117m \u001b[51;203H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;117m:100 \u001b[21;104H\u001b[?12l\u001b[?25h" - ], - [ - 0.145919, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;142H\u001b[K\u001b[51;48H\u001b[1m\u001b[38;5;220m\u001b[48;5;31m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[51;52H \u001b[m\u001b[93m\u001b[107m\u001b[122C\u001b[38;5;231m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;182H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;190H\u001b[38;5;117m\u001b[48;5;24m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;196H\u001b[38;5;186m\u001b[48;5;31m 54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;24m\u001b[48;5;117m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m6\b 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:99\u001b[21;103H\u001b[?12l\u001b[?25h" - ], - [ - 0.48937, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;141H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[21;102H\u001b[?12l\u001b[?25h" - ], - [ - 0.027128, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36musing its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;140H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[21;101H\u001b[?12l\u001b[?25h" - ], - [ - 0.02875, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\b\u001b[36m% using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;139H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[21;100H\u001b[?12l\u001b[?25h" - ], - [ - 0.031194, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;138H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[21;99H\u001b[?12l\u001b[?25h" - ], - [ - 0.02624, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36musing its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;137H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[21;98H\u001b[?12l\u001b[?25h" - ], - [ - 0.032683, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;136H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[21;97H\u001b[?12l\u001b[?25h" - ], - [ - 0.029086, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;135H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[21;96H\u001b[?12l\u001b[?25h" - ], - [ - 0.030766, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;134H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[21;95H\u001b[?12l\u001b[?25h" - ], - [ - 0.036114, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;133H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m0\u001b[21;94H\u001b[?12l\u001b[?25h" - ], - [ - 0.119662, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;132H\u001b[K\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m89\u001b[21;93H\u001b[?12l\u001b[?25h" - ], - [ - 0.150503, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;131H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[21;92H\u001b[?12l\u001b[?25h" - ], - [ - 0.162647, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;130H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[21;91H\u001b[?12l\u001b[?25h" - ], - [ - 0.143355, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;129H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[21;90H\u001b[?12l\u001b[?25h" - ], - [ - 0.152961, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[21;128H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[21;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.214499, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mo using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[21;90H\u001b[?12l\u001b[?25h" - ], - [ - 0.118991, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mn using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[21;91H\u001b[?12l\u001b[?25h" - ], - [ - 0.211947, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36me using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[21;92H\u001b[?12l\u001b[?25h" - ], - [ - 0.109298, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m9\u001b[21;93H\u001b[?12l\u001b[?25h" - ], - [ - 0.165278, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mo using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m90\u001b[21;94H\u001b[?12l\u001b[?25h" - ], - [ - 0.123492, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mr using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[21;95H\u001b[?12l\u001b[?25h" - ], - [ - 0.096682, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[21;96H\u001b[?12l\u001b[?25h" - ], - [ - 0.08435, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mm using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[21;97H\u001b[?12l\u001b[?25h" - ], - [ - 0.130601, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mo using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[21;98H\u001b[?12l\u001b[?25h" - ], - [ - 0.052001, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mr using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[21;99H\u001b[?12l\u001b[?25h" - ], - [ - 0.075667, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36me using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[21;100H\u001b[?12l\u001b[?25h" - ], - [ - 0.06988, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[21;101H\u001b[?12l\u001b[?25h" - ], - [ - 0.107312, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mc using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[21;102H\u001b[?12l\u001b[?25h" - ], - [ - 0.052857, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mo using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m9\u001b[21;103H\u001b[?12l\u001b[?25h" - ], - [ - 0.080952, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mn using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;175H\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;181H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;189H\u001b[38;5;117m\u001b[48;5;24m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;194H\u001b[38;5;186m\u001b[48;5;31m \u001b[1C54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[51;201H\u001b[38;5;24m\u001b[48;5;117m \u001b[51;203H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:100\u001b[21;104H\u001b[?12l\u001b[?25h" - ], - [ - 0.106035, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mt using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[21;105H\u001b[?12l\u001b[?25h" - ], - [ - 0.069849, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36ma using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[21;106H\u001b[?12l\u001b[?25h" - ], - [ - 0.080188, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mi using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[21;107H\u001b[?12l\u001b[?25h" - ], - [ - 0.053983, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mn using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[21;108H\u001b[?12l\u001b[?25h" - ], - [ - 0.083169, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36me using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[21;109H\u001b[?12l\u001b[?25h" - ], - [ - 0.064025, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mr using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[21;110H\u001b[?12l\u001b[?25h" - ], - [ - 0.114373, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36ms using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[21;111H\u001b[?12l\u001b[?25h" - ], - [ - 0.140141, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[21;112H\u001b[?12l\u001b[?25h" - ], - [ - 0.178511, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36ma using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m9\u001b[21;113H\u001b[?12l\u001b[?25h" - ], - [ - 0.078589, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mr using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m10\u001b[21;114H\u001b[?12l\u001b[?25h" - ], - [ - 0.088307, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36me using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[21;115H\u001b[?12l\u001b[?25h" - ], - [ - 0.270773, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[K" - ], - [ - 0.007389, - "\u001b[51;1H\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;31m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H kpod-format-table \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;32H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mrmi.go\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[m\u001b[93m\u001b[107m\u001b[51;51H\u001b[38;5;240m\u001b[48;5;236m\u001b[51;52H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                          \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;181H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;189H\u001b[38;5;247m\u001b[48;5;236m" - ], - [ - 3.4e-05, - " go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;194H\u001b[38;5;107m\u001b[48;5;240m  54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;201H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;203H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;252m:110 \u001b[21;114H\u001b[?12l\u001b[?25h" - ], - [ - 0.232519, - "\u001b[?25l\u001b[52;1H\u001b[m\u001b[93m\u001b[107m:\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.143782, - "w\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.064041, - "q\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.737175, - "\r\u001b[?25l\u001b[?2004l" - ], - [ - 0.022609, - "\"cmd/kpod/rmi.go\"" - ], - [ - 0.010737, - " 123L, 3107C written" - ], - [ - 0.01326, - "\r\r\r\n\u001b[39;49m\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.002223, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.022486, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table* \u001b[39m \u001b[33m54s\u001b[39m\r\n" - ], - [ - 0.001213, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 8.7e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.3e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000306, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.1e-05, - "\u001b[?1h\u001b=" - ], - [ - 2e-05, - "\u001b[?2004h" - ], - [ - 4.650947, - "s" - ], - [ - 0.114659, - "\bsu" - ], - [ - 0.136564, - "d" - ], - [ - 0.088137, - "o" - ], - [ - 0.111636, - " " - ], - [ - 0.12095, - "m" - ], - [ - 0.271219, - "\b \b" - ], - [ - 0.500424, - "\b" - ], - [ - 0.030636, - "\b \b" - ], - [ - 0.03127, - "\b \b" - ], - [ - 0.031598, - "\b\bs \b" - ], - [ - 0.029362, - "\b \b" - ], - [ - 0.153403, - "m" - ], - [ - 0.127382, - "\bma" - ], - [ - 0.14863, - "k" - ], - [ - 0.131117, - "e" - ], - [ - 0.088373, - " " - ], - [ - 0.064223, - "k" - ], - [ - 0.087523, - "p" - ], - [ - 0.096297, - "o" - ], - [ - 0.119679, - "d" - ], - [ - 0.112054, - "\u001b[?1l\u001b>" - ], - [ - 0.000159, - "\u001b[?2004l\r\r\n" - ], - [ - 0.00324, - "\u001b]2;make kpod\u0007\u001b]1;make\u0007" - ], - [ - 6.788264, - "go build -ldflags '-X main.gitCommit=99495909 -X main.buildInfo=1502916531' -tags \"selinux seccomp \" -o kpod github.com/kubernetes-incubator/cri-o/cmd/kpod\r\n" - ], - [ - 4.283762, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.017721, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table* \u001b[39m \u001b[33m11s\u001b[39m\r\n" - ], - [ - 0.001236, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000128, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.00018, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 3.3e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 8e-05, - "\u001b[?1h\u001b=" - ], - [ - 3.1e-05, - "\u001b[?2004h" - ], - [ - 168.290484, - "\r\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 2.584789, - "g" - ], - [ - 0.198102, - "\bgi" - ], - [ - 0.19998, - "t" - ], - [ - 0.600599, - "\b \b" - ], - [ - 0.127993, - "\b\bg \b" - ], - [ - 0.175966, - "\b \b" - ], - [ - 0.216044, - "s" - ], - [ - 0.112522, - "\bsu" - ], - [ - 0.135935, - "d" - ], - [ - 0.079322, - "o" - ], - [ - 0.14454, - " " - ], - [ - 0.079601, - "m" - ], - [ - 0.128569, - "a" - ], - [ - 0.08771, - "k" - ], - [ - 0.09614, - "e" - ], - [ - 0.095448, - " " - ], - [ - 0.056775, - "i" - ], - [ - 0.063421, - "n" - ], - [ - 0.072685, - "s" - ], - [ - 0.111636, - "t" - ], - [ - 0.080215, - "a" - ], - [ - 0.119661, - "l" - ], - [ - 0.135786, - "l" - ], - [ - 0.296278, - "\u001b[?1l\u001b>" - ], - [ - 8.3e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.00983, - "\u001b]2;sudo make install\u0007\u001b]1;make\u0007" - ], - [ - 0.947581, - "[sudo] password for ryan: " - ], - [ - 2.602557, - "\r\n" - ], - [ - 2.991429, - "install -D -m 755 crio /usr/local/bin/crio\r\n" - ], - [ - 0.053259, - "install -D -m 755 crioctl /usr/local/bin/crioctl\r\n" - ], - [ - 0.030024, - "install -D -m 755 kpod /usr/local/bin/kpod\r\n" - ], - [ - 0.041823, - "install -D -m 755 conmon/conmon /usr/local/libexec/crio/conmon\r\n" - ], - [ - 0.002995, - "install -D -m 755 pause/pause /usr/local/libexec/crio/pause\r\n" - ], - [ - 0.005043, - "install -d -m 755 /usr/local/share/man/man1\r\n" - ], - [ - 0.001982, - "install -d -m 755 /usr/local/share/man/man5\r\n" - ], - [ - 0.000749, - "install -d -m 755 /usr/local/share/man/man8\r\n" - ], - [ - 0.000879, - "install -m 644 docs/kpod-diff.1 docs/kpod-push.1 docs/kpod-cp.1 docs/kpod.1 docs/kpod-export.1 docs/kpod-load.1 docs/kpod-logs.1 docs/kpod-images.1 docs/kpod-umount.1 docs/kpod-save.1 docs/kpod-mount.1 docs/kpod-info.1 docs/kpod-inspect.1 docs/kpod-history.1 docs/kpod-pull.1 docs/kpod-rmi.1 docs/kpod-version.1 docs/kpod-tag.1 -t /usr/local/share/man/man1\r\n" - ], - [ - 0.011056, - "install -m 644 docs/crio.conf.5 -t /usr/local/share/man/man5\r\n" - ], - [ - 0.002986, - "install -m 644 docs/crio.8 -t /usr/local/share/man/man8\r\n" - ], - [ - 0.004783, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.019387, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table* \u001b[39m \u001b[33m7s\u001b[39m\r\n" - ], - [ - 0.002291, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 9.3e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.1e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 8.8e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 4.6e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.6e-05, - "\u001b[?2004h" - ], - [ - 15.331424, - "g" - ], - [ - 0.398976, - "\b \b" - ], - [ - 0.536701, - "v" - ], - [ - 0.160554, - "\bvi" - ], - [ - 0.127435, - " " - ], - [ - 1.040078, - "\b" - ], - [ - 0.144093, - "\b\bv \b" - ], - [ - 0.167843, - "\b \b" - ], - [ - 0.448464, - "g" - ], - [ - 0.087315, - "\bgi" - ], - [ - 0.104665, - "t" - ], - [ - 0.119248, - " " - ], - [ - 0.176373, - "r" - ], - [ - 0.151944, - "e" - ], - [ - 0.080321, - "s" - ], - [ - 0.175774, - "e" - ], - [ - 0.120008, - "t" - ], - [ - 0.168118, - " " - ], - [ - 0.647723, - "c" - ], - [ - 0.11246, - "m" - ], - [ - 0.353225, - "\u0007" - ], - [ - 0.0001, - "k" - ], - [ - 0.225653, - "\u0007" - ], - [ - 0.388813, - "\b \b" - ], - [ - 0.152155, - "d" - ], - [ - 0.225421, - "\u0007" - ], - [ - 0.142048, - "m" - ], - [ - 0.448625, - "\b \b" - ], - [ - 0.248141, - "/" - ], - [ - 0.303478, - "m" - ], - [ - 0.415244, - "\b \b" - ], - [ - 0.501387, - "\b \b" - ], - [ - 0.030592, - "\b \b" - ], - [ - 0.031729, - "\b \b" - ], - [ - 0.276247, - "\b \b" - ], - [ - 0.296245, - "H" - ], - [ - 0.111636, - "E" - ], - [ - 0.128194, - "A" - ], - [ - 0.160328, - "D" - ], - [ - 0.216523, - " " - ], - [ - 0.160304, - "m" - ], - [ - 0.159999, - "e" - ], - [ - 0.22375, - "\b \b" - ], - [ - 0.159675, - "\b \b" - ], - [ - 0.088274, - "c" - ], - [ - 0.111635, - "m" - ], - [ - 0.178731, - "\u0007" - ], - [ - 0.05329, - "k" - ], - [ - 0.196815, - "\u0007" - ], - [ - 0.282938, - "\b \b" - ], - [ - 0.136923, - "d" - ], - [ - 0.239219, - "/" - ], - [ - 0.368537, - "c" - ], - [ - 0.319505, - "\b \b" - ], - [ - 0.232433, - "k" - ], - [ - 0.504033, - "p" - ], - [ - 0.176414, - "o" - ], - [ - 0.126785, - "d" - ], - [ - 0.864534, - "/" - ], - [ - 0.155176, - "r" - ], - [ - 0.109177, - "m" - ], - [ - 0.119347, - "i" - ], - [ - 0.24468, - "." - ], - [ - 0.195895, - "g" - ], - [ - 0.087415, - "o" - ], - [ - 1.588076, - "\u001b[?1l\u001b>" - ], - [ - 0.000131, - "\u001b[?2004l\r\r\n" - ], - [ - 0.003239, - "\u001b]2;git reset HEAD cmd/kpod/rmi.go\u0007\u001b]1;git\u0007" - ], - [ - 0.005443, - "Unstaged changes after reset:\r\nM\tcmd/kpod/images.go\r\n" - ], - [ - 0.000165, - "M\tcmd/kpod/rmi.go\r\n" - ], - [ - 0.010191, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.023696, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table* \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001223, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000118, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.3e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000101, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.6e-05, - "\u001b[?1h\u001b=" - ], - [ - 3.3e-05, - "\u001b[?2004h" - ], - [ - 117.912011, - "v" - ], - [ - 0.072168, - "\bvi" - ], - [ - 0.13525, - " " - ], - [ - 0.224662, - "m" - ], - [ - 0.447667, - "\b \b" - ], - [ - 0.119783, - "c" - ], - [ - 0.096089, - "m" - ], - [ - 0.146517, - "d\u001b[1m/\u001b[0m" - ], - [ - 0.10283, - "\b\u001b[0m/k" - ], - [ - 0.110527, - "pod\u001b[1m/\u001b[0m" - ], - [ - 0.48823, - "\b\u001b[0m/r" - ], - [ - 0.176379, - "m" - ], - [ - 0.10899, - "i.go\u001b[1m \u001b[0m" - ], - [ - 0.387068, - "\b\u001b[0m \b" - ], - [ - 0.000493, - "\u001b[?1l\u001b>\u001b[?2004l\r\r\n" - ], - [ - 0.004413, - "\u001b]2;vim cmd/kpod/rmi.go\u0007\u001b]1;vi\u0007" - ], - [ - 0.139925, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000574, - "\u001b[1;54r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[54;1H\"cmd/kpod/rmi.go\"" - ], - [ - 0.000165, - " 123L, 3107C" - ], - [ - 0.009214, - "\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[1;1H\u001b[>c" - ], - [ - 0.003104, - "\u001b[1;1H\u001b[96m\u001b[47m 18 \u001b[m\u001b[93m\u001b[107m\u001b[8C},\r\n\u001b[96m\u001b[47m 19 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 20 \u001b[m\u001b[93m\u001b[107m rmiCommand = cli.Command{\r\n\u001b[96m\u001b[47m 21 \u001b[m\u001b[93m\u001b[107m\u001b[8CName:\u001b[8C\u001b[36m\"rmi\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 22 \u001b[m\u001b[93m\u001b[107m\u001b[8CUsage:\u001b[7C\u001b[36m\"removes one or more images from local storage\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 23 \u001b[m\u001b[93m\u001b[107m\u001b[8CDescription: rmiDescription,\r\n\u001b[96m\u001b[47m 24 \u001b[m\u001b[93m\u001b[107m\u001b[8CAction: rmiCmd,\r\n\u001b[96m\u001b[47m 25 \u001b[m\u001b[93m\u001b[107m\u001b[8CArgsUsage: \u001b[36m\"IMAGE-NAME-OR-ID [...]\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 26 \u001b[m\u001b[93m\u001b[107m\u001b[8CFlags:\u001b[7CrmiFlags,\r\n\u001b[96m\u001b[47m 27 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 28 \u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 29 \r\n 30 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m rmiCmd(c *cli.Context) \u001b[33merror\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 31 \r\n 32 \u001b[m\u001b[93m\u001b[107m force := \u001b[36mfalse\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 33 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m c.IsSet(\u001b[36m\"force\"\u001b[m\u001b[93m\u001b[107m) {\r\n\u001b[96m\u001b[47m 34 \u001b[m\u001b[93m\u001b[107m\u001b[8Cforce = c.Bool(\u001b[36m\"force\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 35 \u001b[m\u001b[93m\u001b[107m " - ], - [ - 1.9e-05, - "}\r\n\u001b[96m\u001b[47m 36 \r\n 37 \u001b[m\u001b[93m\u001b[107m args := c.Args()\r\n\u001b[96m\u001b[47m 38 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(args) == \u001b[36m0\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 39 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Errorf(\u001b[36m\"image name or ID must be specified\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 40 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 41 \r\n 42 \u001b[m\u001b[93m\u001b[107m config, err := getConfig(c)\r\n\u001b[96m\u001b[47m 43 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 44 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"Could not get config\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 45 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 46 \u001b[m\u001b[93m\u001b[107m store, err := getStore(config)\r\n\u001b[96m\u001b[47m 47 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 48 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\r\n\u001b[96m\u001b[47m 49 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 50 \r\n 51 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, id := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m args {\r\n\u001b[96m\u001b[47m 52 " - ], - [ - 0.032096, - "\u001b[m\u001b[93m\u001b[107m\u001b[8Cimage, err := libkpodimage.FindImage(store, id)\r\n\u001b[96m\u001b[47m 53 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 54 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"could not get image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 55 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 56 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m image != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 57 \u001b[m\u001b[93m\u001b[107m\u001b[12CctrIDs, err := runningContainers(image, store)\r\n\u001b[96m\u001b[47m 58 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 59 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"error getting running containers for image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 60 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[96m\u001b[47m 61 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(ctrIDs) > \u001b[36m0\u001b[m\u001b[93m\u001b[107m && \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(image.Names) <= \u001b[36m1\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 62" - ], - [ - 9.1e-05, - " \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mif\u001b[m\u001b[93m\u001b[107m force {\r\n\u001b[96m\u001b[47m 63 \u001b[m\u001b[93m\u001b[107m\u001b[20CremoveContainers(ctrIDs, store)\r\n\u001b[96m\u001b[47m 64 \u001b[m\u001b[93m\u001b[107m\u001b[16C} \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 65 \u001b[m\u001b[93m\u001b[107m\u001b[20C\u001b[32mfor\u001b[m\u001b[93m\u001b[107m ctrID := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m ctrIDs {\r\n\u001b[96m\u001b[47m 66 \u001b[m\u001b[93m\u001b[107m\u001b[24C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m fmt.Errorf(\u001b[36m\"Could not remove image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m (\u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[33mmust force\u001b[m\u001b[93m\u001b[107m\u001b[36m) - one or more containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\r\n\u001b[96m\u001b[47m 67 \u001b[m\u001b[93m\u001b[107m\u001b[20C}\r\n\u001b[96m\u001b[47m 68 \u001b[m\u001b[93m\u001b[107m\u001b[16C}\r\n\u001b[96m\u001b[47m 69 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[53;12H kpod-format-table \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[53;32H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mrmi.go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;220m\u001b[48;5;240m M \u001b[m\u001b[93m" - ], - [ - 0.00914, - "\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[53;52H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                           \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:25 \u001b[49;29H\u001b[?12l\u001b[?25h\u001bP+q436f\u001b\\\u001bP+q6b75\u001b\\\u001bP+q6b64\u001b\\\u001bP+q6b72\u001b\\\u001bP+q6b6c\u001b\\\u001bP+q2332\u001b\\\u001bP+q2334\u001b\\\u001bP+q2569\u001b\\\u001bP+q2a37\u001b\\\u001bP+q6b31\u001b\\" - ], - [ - 1.315626, - "\u001b[?25l\u001b[53;210H6\u001b[49;30H\u001b[?12l\u001b[?25h" - ], - [ - 0.490663, - "\u001b[53;210H7\u001b[49;31H" - ], - [ - 0.024219, - "\u001b[53;210H8\u001b[49;32H" - ], - [ - 0.030955, - "\u001b[53;210H9\u001b[49;33H" - ], - [ - 0.03195, - "\u001b[53;209H30\u001b[49;34H" - ], - [ - 0.028457, - "\u001b[53;210H1\u001b[49;35H" - ], - [ - 0.030479, - "\u001b[53;210H2\u001b[49;36H" - ], - [ - 0.031626, - "\u001b[53;210H3\u001b[49;37H" - ], - [ - 0.032067, - "\u001b[53;210H4\u001b[49;38H" - ], - [ - 0.026593, - "\u001b[53;210H5\u001b[49;39H" - ], - [ - 0.033566, - "\u001b[53;210H6\u001b[49;40H" - ], - [ - 0.027309, - "\u001b[53;210H7\u001b[49;41H" - ], - [ - 0.03294, - "\u001b[53;210H8\u001b[49;42H" - ], - [ - 0.030662, - "\u001b[53;210H9\u001b[49;43H" - ], - [ - 0.031394, - "\u001b[53;209H40\u001b[49;44H" - ], - [ - 0.032204, - "\u001b[53;210H1\u001b[49;45H" - ], - [ - 0.033628, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mf\u001b[1m\u001b[31m\u001b[106m(\u001b[106C)\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;252m2\u001b[49;46H\u001b[?12l\u001b[?25h" - ], - [ - 0.026953, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m(\u001b[36m\"\u001b[m\u001b[93m\u001b[107m\u001b[105C)\u001b[53;210H\u001b[38;5;22m\u001b[48;5;252m3\u001b[49;47H\u001b[?12l\u001b[?25h" - ], - [ - 0.031767, - "\u001b[53;210H4\u001b[49;48H" - ], - [ - 0.026243, - "\u001b[53;210H5\u001b[49;49H" - ], - [ - 0.032594, - "\u001b[53;210H6\u001b[49;50H" - ], - [ - 0.02764, - "\u001b[53;210H7\u001b[49;51H" - ], - [ - 0.034964, - "\u001b[53;210H8\u001b[49;52H" - ], - [ - 0.026422, - "\u001b[53;210H9\u001b[49;53H" - ], - [ - 0.032607, - "\u001b[53;209H50\u001b[49;54H" - ], - [ - 0.028623, - "\u001b[53;210H1\u001b[49;55H" - ], - [ - 0.028244, - "\u001b[53;210H2\u001b[49;56H" - ], - [ - 0.033991, - "\u001b[53;210H3\u001b[49;57H" - ], - [ - 0.032985, - "\u001b[53;210H4\u001b[49;58H" - ], - [ - 0.027615, - "\u001b[53;210H5\u001b[49;59H" - ], - [ - 0.028609, - "\u001b[53;210H6\u001b[49;60H" - ], - [ - 0.02978, - "\u001b[53;210H7\u001b[49;61H" - ], - [ - 0.030592, - "\u001b[53;210H8\u001b[49;62H" - ], - [ - 0.030011, - "\u001b[53;210H9\u001b[49;63H" - ], - [ - 0.031518, - "\u001b[53;209H60\u001b[49;64H" - ], - [ - 0.030297, - "\u001b[53;210H1\u001b[49;65H" - ], - [ - 0.029334, - "\u001b[53;210H2\u001b[49;66H" - ], - [ - 0.031119, - "\u001b[53;210H3\u001b[49;67H" - ], - [ - 0.027634, - "\u001b[53;210H4\u001b[49;68H" - ], - [ - 0.031088, - "\u001b[53;210H5\u001b[49;69H" - ], - [ - 0.03047, - "\u001b[53;210H6\u001b[49;70H" - ], - [ - 0.03291, - "\u001b[53;210H7\u001b[49;71H" - ], - [ - 0.029259, - "\u001b[53;210H8\u001b[49;72H" - ], - [ - 0.034775, - "\u001b[53;210H9\u001b[49;73H" - ], - [ - 0.026392, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[1m\u001b[31m\u001b[106m(\u001b[10C)\u001b[m\u001b[93m\u001b[107m\u001b[53;209H\u001b[38;5;22m\u001b[48;5;252m70\u001b[49;74H\u001b[?12l\u001b[?25h" - ], - [ - 0.031136, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36m(\u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[33mm\u001b[m\u001b[93m\u001b[107m\u001b[9C\u001b[36m) \u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;252m1\u001b[49;75H\u001b[?12l\u001b[?25h" - ], - [ - 0.02956, - "\u001b[53;210H2\u001b[49;76H" - ], - [ - 0.029258, - "\u001b[53;210H3\u001b[49;77H" - ], - [ - 0.032617, - "\u001b[53;210H4\u001b[49;78H" - ], - [ - 0.02963, - "\u001b[53;210H5\u001b[49;79H" - ], - [ - 0.027516, - "\u001b[53;210H6\u001b[49;80H" - ], - [ - 0.031034, - "\u001b[53;210H7\u001b[49;81H" - ], - [ - 0.0348, - "\u001b[53;210H8\u001b[49;82H" - ], - [ - 0.026686, - "\u001b[53;210H9\u001b[49;83H" - ], - [ - 0.031977, - "\u001b[53;209H80\u001b[49;84H" - ], - [ - 0.032521, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[49;74H\u001b[1m\u001b[31m\u001b[106m(\u001b[10C)\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;252m1\u001b[49;85H\u001b[?12l\u001b[?25h" - ], - [ - 0.027602, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[49;74H\u001b[36m(\u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[33mm\u001b[m\u001b[93m\u001b[107m\u001b[9C\u001b[36m) \u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;252m2\u001b[49;86H\u001b[?12l\u001b[?25h" - ], - [ - 0.144764, - "\u001b[53;210H3\u001b[49;87H" - ], - [ - 0.167503, - "\u001b[53;210H4\u001b[49;88H" - ], - [ - 0.165071, - "\u001b[53;210H5\u001b[49;89H" - ], - [ - 0.254279, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mne or more containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[49;153H\u001b[K\u001b[53;50H\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[53;54H \u001b[49;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.501147, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36me or more containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[49;152H\u001b[K\u001b[49;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.019148, - "\u001b[?25l\u001b[36m or more containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[49;151H\u001b[K\u001b[49;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.032617, - "\u001b[?25l\u001b[36mor more containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[49;150H\u001b[K\u001b[49;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.031692, - "\u001b[?25l\u001b[36mr more containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[49;149H\u001b[K\u001b[49;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.030868, - "\u001b[?25l\u001b[36m more containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[49;148H\u001b[K\u001b[49;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.03056, - "\u001b[?25l\u001b[36mmore containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[49;147H\u001b[K\u001b[49;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.03168, - "\u001b[?25l\u001b[36more containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[49;146H\u001b[K\u001b[49;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.027805, - "\u001b[?25l\u001b[36mre containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[49;145H\u001b[K\u001b[49;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.031902, - "\u001b[?25l\u001b[36me containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[49;144H\u001b[K\u001b[49;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.283191, - "\u001b[?25l\u001b[36m containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[49;143H\u001b[K\u001b[49;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.178515, - "\u001b[?25l\u001b[36mcontainers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[49;142H\u001b[K\u001b[49;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.38466, - "\u001b[53;210H\u001b[38;5;22m\u001b[48;5;252m6\u001b[49;90H" - ], - [ - 0.501961, - "\u001b[53;210H7\u001b[49;91H" - ], - [ - 0.025949, - "\u001b[53;210H8\u001b[49;92H" - ], - [ - 0.029349, - "\u001b[53;210H9\u001b[49;93H" - ], - [ - 0.031181, - "\u001b[53;209H90\u001b[49;94H" - ], - [ - 0.030544, - "\u001b[53;210H1\u001b[49;95H" - ], - [ - 0.030634, - "\u001b[53;210H2\u001b[49;96H" - ], - [ - 0.030484, - "\u001b[53;210H3\u001b[49;97H" - ], - [ - 0.033104, - "\u001b[53;210H4\u001b[49;98H" - ], - [ - 0.024166, - "\u001b[53;210H5\u001b[49;99H" - ], - [ - 0.032752, - "\u001b[53;210H6\u001b[49;100H" - ], - [ - 0.030921, - "\u001b[53;210H7\u001b[49;101H" - ], - [ - 0.517314, - "\u001b[53;210H6\u001b[49;100H" - ], - [ - 3.312677, - "\u001b[53;210H7\u001b[49;101H" - ], - [ - 0.50269, - "\u001b[53;210H8\u001b[49;102H" - ], - [ - 0.030313, - "\u001b[53;210H9\u001b[49;103H" - ], - [ - 0.024339, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;175H\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;181H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;189H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;194H\u001b[38;5;107m\u001b[48;5;240m \u001b[1C54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[53;201H\u001b[38;5;235m\u001b[48;5;252m \u001b[53;203H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:100\u001b[49;104H" - ], - [ - 0.033592, - "\u001b[53;210H1\u001b[49;105H" - ], - [ - 0.031721, - "\u001b[53;210H2\u001b[49;106H" - ], - [ - 0.02682, - "\u001b[53;210H3\u001b[49;107H" - ], - [ - 0.03135, - "\u001b[53;210H4\u001b[49;108H" - ], - [ - 0.029141, - "\u001b[53;210H5\u001b[49;109H" - ], - [ - 0.03261, - "\u001b[53;210H6\u001b[49;110H" - ], - [ - 0.028367, - "\u001b[53;210H7\u001b[49;111H" - ], - [ - 0.028863, - "\u001b[53;210H8\u001b[49;112H" - ], - [ - 0.032551, - "\u001b[53;210H9\u001b[49;113H" - ], - [ - 0.02896, - "\u001b[53;209H10\u001b[49;114H" - ], - [ - 0.029171, - "\u001b[53;210H1\u001b[49;115H" - ], - [ - 0.032167, - "\u001b[53;210H2\u001b[49;116H" - ], - [ - 0.029809, - "\u001b[53;210H3\u001b[49;117H" - ], - [ - 0.025445, - "\u001b[53;210H4\u001b[49;118H" - ], - [ - 0.020289, - "\u001b[53;210H3\u001b[49;117H" - ], - [ - 0.501457, - "\u001b[53;210H2\u001b[49;116H" - ], - [ - 0.033753, - "\u001b[53;210H1\u001b[49;115H" - ], - [ - 0.030371, - "\u001b[53;210H0\u001b[49;114H" - ], - [ - 0.026993, - "\u001b[53;209H09\u001b[49;113H" - ], - [ - 0.030967, - "\u001b[53;210H8\u001b[49;112H" - ], - [ - 0.026829, - "\u001b[53;210H7\u001b[49;111H" - ], - [ - 0.032439, - "\u001b[53;210H6\u001b[49;110H" - ], - [ - 0.03057, - "\u001b[53;210H5\u001b[49;109H" - ], - [ - 0.031109, - "\u001b[53;210H4\u001b[49;108H" - ], - [ - 0.032679, - "\u001b[53;210H3\u001b[49;107H" - ], - [ - 0.033994, - "\u001b[53;210H2\u001b[49;106H" - ], - [ - 0.025439, - "\u001b[53;210H1\u001b[49;105H" - ], - [ - 0.032603, - "\u001b[53;210H0\u001b[49;104H" - ], - [ - 0.028393, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;175H\u001b[38;5;231m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;196H\u001b[38;5;107m\u001b[48;5;240m 54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\b 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:99\u001b[49;103H" - ], - [ - 0.136603, - "\u001b[53;210H8\u001b[49;102H" - ], - [ - 0.1836, - "\u001b[53;210H7\u001b[49;101H" - ], - [ - 0.185079, - "\u001b[53;210H6\u001b[49;100H" - ], - [ - 0.383613, - "\u001b[53;210H5\u001b[49;99H" - ], - [ - 0.161001, - "\u001b[53;210H4\u001b[49;98H" - ], - [ - 0.669446, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36m are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[49;141H\u001b[K\u001b[49;98H\u001b[?12l\u001b[?25h" - ], - [ - 0.586565, - "\u001b[?25l\u001b[54;1H\u001b[34m-- INSERT --\u001b[m\u001b[93m\u001b[107m\u001b[54;13H\u001b[K" - ], - [ - 0.043535, - "\u001b[53;1H\u001b[1m\u001b[38;5;23m\u001b[48;5;231m INSERT \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[m\u001b[93m\u001b[107m\u001b[53;9H\u001b[38;5;231m\u001b[48;5;31m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m\u001b[53;12H kpod-format-table \u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;31m\u001b[53;32H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;31mrmi.go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;220m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;220m\u001b[48;5;31m M\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;31m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[m\u001b[93m\u001b[107m\u001b[53;53H\u001b[38;5;31m\u001b[48;5;24m\u001b[53;54H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;24m                                                                                                                         \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[" - ], - [ - 2.9e-05, - "38;5;117m\u001b[48;5;24m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;186m\u001b[48;5;31m  54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;24m\u001b[48;5;117m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;117m:94 \u001b[49;98H\u001b[?12l\u001b[?25h" - ], - [ - 0.189046, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[49;99H\u001b[?12l\u001b[?25h" - ], - [ - 1.150929, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m are using its reference image\u001b[36m\", id, ctrID)\u001b[50;5H }\u001b[51;5H }\u001b[52;5H }\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[49;100H\u001b[?12l\u001b[?25h" - ], - [ - 0.222856, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m% are using its reference image\u001b[36m\", id, ctrID)\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[49;101H\u001b[?12l\u001b[?25h" - ], - [ - 0.508774, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mq are using its reference image\u001b[36m\", id, ctrID)\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[49;102H\u001b[?12l\u001b[?25h" - ], - [ - 0.429575, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36m\" are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[50;5H }\u001b[51;5H }\u001b[52;5H }\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m9\u001b[49;103H\u001b[?12l\u001b[?25h" - ], - [ - 0.293573, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[53;175H\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;181H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;189H\u001b[38;5;117m\u001b[48;5;24m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;194H\u001b[38;5;186m\u001b[48;5;31m \u001b[1C54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[53;201H\u001b[38;5;24m\u001b[48;5;117m \u001b[53;203H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:100\u001b[49;104H\u001b[?12l\u001b[?25h" - ], - [ - 1.664414, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[54;1H\u001b[K" - ], - [ - 0.007242, - "\u001b[53;1H\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;31m\u001b[m\u001b[93m\u001b[107m\u001b[53;9H\u001b[38;5;148m\u001b[48;5;240m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[53;12H kpod-format-table \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[53;32H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mrmi.go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;220m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;220m\u001b[48;5;240m M\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[m\u001b[93m\u001b[107m\u001b[53;53H\u001b[38;5;240m\u001b[48;5;236m\u001b[53;54H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                         \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[10" - ], - [ - 3.7e-05, - "7m\u001b[53;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m6\u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:99 \u001b[49;103H\u001b[?12l\u001b[?25h" - ], - [ - 0.497524, - "\u001b[?25l\u001b[54;1H\u001b[m\u001b[93m\u001b[107m:\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.127272, - "q\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.320956, - "!\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 1.072551, - "\r" - ], - [ - 0.015046, - "\u001b[?25l\u001b[?2004l\u001b[54;1H\u001b[K\u001b[54;1H\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.002419, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.020555, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table* \u001b[39m \u001b[33m22s\u001b[39m\r\n" - ], - [ - 0.001416, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 7.6e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 3.1e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000124, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 4.1e-05, - "\u001b[?1h\u001b=" - ], - [ - 3.2e-05, - "\u001b[?2004h" - ], - [ - 1.279799, - "g" - ], - [ - 0.167996, - "\bgi" - ], - [ - 0.128101, - "t" - ], - [ - 0.21601, - " " - ], - [ - 0.416115, - "s" - ], - [ - 0.11937, - "t" - ], - [ - 0.160387, - "a" - ], - [ - 0.128023, - "t" - ], - [ - 0.168159, - "u" - ], - [ - 0.127468, - "s" - ], - [ - 0.136345, - "\u001b[?1l\u001b>" - ], - [ - 0.000192, - "\u001b[?2004l\r\r\n" - ], - [ - 0.004674, - "\u001b]2;git status\u0007\u001b]1;git\u0007" - ], - [ - 0.017951, - "On branch kpod-format-table\r\nChanges not staged for commit:\r\n (use \"git add ...\" to update what will be committed)\r\n (use \"git checkout -- ...\" to discard changes in working directory)\r\n\r\n" - ], - [ - 3.6e-05, - "\t\u001b[31mmodified: cmd/kpod/images.go\u001b[m\r\n\t\u001b[31mmodified: cmd/kpod/rmi.go\u001b[m\r\n\r\nno changes added to commit (use \"git add\" and/or \"git commit -a\")\r\n" - ], - [ - 0.000309, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.024514, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table* \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001388, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000102, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 1.7e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 7.7e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 7.1e-05, - "\u001b[?1h\u001b=" - ], - [ - 3.3e-05, - "\u001b[?2004h" - ], - [ - 10.906, - "e" - ], - [ - 0.233197, - "\bex" - ], - [ - 0.342482, - "\b\be \b" - ], - [ - 0.189249, - "\b \b" - ], - [ - 56220.893544, - "\u001b[?1l\u001b>" - ], - [ - 4.1e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.001035, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.020391, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table* \u001b[39m \u001b[33m56232s\u001b[39m\r\n" - ], - [ - 0.000897, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000111, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.9e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000461, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m " - ], - [ - 1.5e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 5.1e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.9e-05, - "\u001b[?2004h" - ], - [ - 5.901847, - "g" - ], - [ - 0.160227, - "\bgi" - ], - [ - 0.104667, - "t" - ], - [ - 0.055222, - " " - ], - [ - 0.127953, - "d" - ], - [ - 0.11279, - "i" - ], - [ - 0.078928, - "f" - ], - [ - 0.153039, - "f" - ], - [ - 0.1441, - "\u001b[?1l\u001b>" - ], - [ - 0.000244, - "\u001b[?2004l\r\r\n" - ], - [ - 0.005357, - "\u001b]2;git diff\u0007\u001b]1;git\u0007" - ], - [ - 0.005163, - "\u001b[?1049h\u001b[?1h\u001b=\r" - ], - [ - 0.003303, - "\u001b[1mdiff --git a/cmd/kpod/images.go b/cmd/kpod/images.go\u001b[m\u001b[m\r\n\u001b[1mindex 593c2b27..d6f2bda1 100644\u001b[m\u001b[m\r\n\u001b[1m--- a/cmd/kpod/images.go\u001b[m\u001b[m\r\n\u001b[1m+++ b/cmd/kpod/images.go\u001b[m\u001b[m\r\n\u001b[36m@@ -120,7 +120,7 @@\u001b[m \u001b[mfunc genImagesFormat(quiet, truncate, digests bool) (format string) {\u001b[m\u001b[m\r\n format += \"{{ .Name | printf \\\"%-56s\\\" }} \"\u001b[m\u001b[m\r\n \u001b[m\u001b[m\r\n if digests {\u001b[m\u001b[m\r\n\u001b[31m- format += \"{{ .DIGEST | printf \\\"%-71s \\\"}} \"\u001b[m\u001b[m\r\n\u001b[32m+\u001b[m \u001b[32mformat += \"{{ .Digest | printf \\\"%-71s \\\"}} \"\u001b[m\u001b[m\r\n }\u001b[m\u001b[m\r\n \u001b[m\u001b[m\r\n format += \"{{ .CreatedAt | printf \\\"%-22s\\\" }} {{.Size}}\"\u001b[m\u001b[m\r\n\u001b[1mdiff --git a/cmd/kpod/rmi.go b/cmd/kpod/rmi.go\u001b[m\u001b[m\r\n\u001b[1mindex c7752fc1..a8da7da6 100644\u001b[m\u001b[m\r\n\u001b[1m--- a/cmd/kpod/rmi.go\u001b[m\u001b[m\r\n\u001b[1m+++ b/cmd/kpod/rmi.go\u001b[m\u001b[m\r\n\u001b[36m@@ -63,7 +63,7 @@\u001b[m \u001b[mfunc rmiCmd(c *cli.Context) error {\u001b[m\u001b[m\r\n removeContainers(ctrIDs, store)\u001b[m\u001b[m\r\n } else {\u001b[m\u001b[m\r\n " - ], - [ - 2.9e-05, - " " - ], - [ - 0.000128, - " for ctrID := range ctrIDs {\u001b[m\u001b[m\r\n\u001b[31m- return fmt.Errorf(\"Could not remove image %q (must force) - container %q is using its reference image\", id, ctrID)\u001b[m\u001b[m\r\n\u001b[32m+\u001b[m \u001b[32mreturn fmt.Errorf(\"Could not remove image %q (must force) - one or more containers are using its reference image\", id, ctrID)\u001b[m\u001b[m\r\n }\u001b[m\u001b[m\r\n }\u001b[m\u001b[m\r\n }\u001b[m\u001b[m\r\n" - ], - [ - 2.2e-05, - "\u001b[7m(END)\u001b[27m\u001b[K" - ], - [ - 3.085748, - "\r\u001b[K\u001b[?1l\u001b>\u001b[?1049l" - ], - [ - 0.001753, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.026198, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table* \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.00165, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000111, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 1.8e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 9e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.8e-05, - "\u001b[?1h\u001b=" - ], - [ - 4.6e-05, - "\u001b[?2004h" - ], - [ - 0.198452, - "g" - ], - [ - 0.095541, - "\bgi" - ], - [ - 0.120141, - "t" - ], - [ - 0.087239, - " " - ], - [ - 0.295807, - "r" - ], - [ - 0.124741, - "e" - ], - [ - 0.107908, - "s" - ], - [ - 0.136109, - "e" - ], - [ - 0.099662, - "t" - ], - [ - 0.123811, - " " - ], - [ - 0.112331, - "-" - ], - [ - 0.143709, - "-" - ], - [ - 0.220177, - "h" - ], - [ - 0.084927, - "a" - ], - [ - 0.050956, - "r" - ], - [ - 0.116765, - "d" - ], - [ - 0.042884, - " " - ], - [ - 0.239721, - "H" - ], - [ - 0.068192, - "E" - ], - [ - 0.148337, - "A" - ], - [ - 0.280701, - "D\u001b[1m \u001b[0m" - ], - [ - 0.689919, - "\b\u001b[0m \b\u001b[?1l\u001b>\u001b[?2004l\r\r\n" - ], - [ - 0.004057, - "\u001b]2;git reset --hard HEAD\u0007\u001b]1;git\u0007" - ], - [ - 0.023549, - "HEAD is now at 99495909 Make kpod images use text/template by default\r\n" - ], - [ - 0.000466, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.027615, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001079, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 9.4e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 1.6e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 8.1e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.7e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.3e-05, - "\u001b[?2004h" - ], - [ - 0.377121, - "v" - ], - [ - 0.083308, - "\bvi" - ], - [ - 0.079468, - " " - ], - [ - 0.080413, - "c" - ], - [ - 0.088276, - "m" - ], - [ - 0.144748, - "d\u001b[1m/\u001b[0m" - ], - [ - 0.074972, - "\b\u001b[0m/k" - ], - [ - 0.152342, - "pod\u001b[1m/\u001b[0m" - ], - [ - 0.396108, - "\b\u001b[0m/i" - ], - [ - 0.079857, - "m" - ], - [ - 0.074579, - "ages.go\u001b[1m \u001b[0m" - ], - [ - 0.548619, - "\b\u001b[0m \b" - ], - [ - 0.000101, - "\u001b[?1l\u001b>" - ], - [ - 0.000148, - "\u001b[?2004l\r\r\n" - ], - [ - 0.001987, - "\u001b]2;vim cmd/kpod/images.go\u0007\u001b]1;vi\u0007" - ], - [ - 0.161796, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000788, - "\u001b[1;54r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[54;1H\"cmd/kpod/images.go\"" - ], - [ - 7.9e-05, - " 203L, 4796C" - ], - [ - 0.011442, - "\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[1;1H\u001b[>c" - ], - [ - 0.008169, - "\u001b[1;1H\u001b[96m\u001b[47m152 \u001b[m\u001b[93m\u001b[107m\u001b[12CName: name,\r\n\u001b[96m\u001b[47m153 \u001b[m\u001b[93m\u001b[107m\u001b[12CDigest: imageDigest,\r\n\u001b[96m\u001b[47m154 \u001b[m\u001b[93m\u001b[107m\u001b[12CCreatedAt: createdTime.Format(\u001b[36m\"Jan 2, 2006 15:04\"\u001b[m\u001b[93m\u001b[107m),\r\n\u001b[96m\u001b[47m155 \u001b[m\u001b[93m\u001b[107m\u001b[12CSize: libkpodimage.FormattedSize(size),\r\n\u001b[96m\u001b[47m156 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m157 \u001b[m\u001b[93m\u001b[107m\u001b[8CimageOutput = \u001b[32mappend\u001b[m\u001b[93m\u001b[107m(imageOutput, params)\r\n\u001b[96m\u001b[47m158 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m159 \r\n160 \u001b[m\u001b[93m\u001b[107m \u001b[32mvar\u001b[m\u001b[93m\u001b[107m out formats.Writer\r\n\u001b[96m\u001b[47m161 \r\n162 \u001b[m\u001b[93m\u001b[107m \u001b[32mswitch\u001b[m\u001b[93m\u001b[107m outputFormat {\r\n\u001b[96m\u001b[47m163 \u001b[m\u001b[93m\u001b[107m \u001b[32mcase\u001b[m\u001b[93m\u001b[107m \u001b[36m\"json\"\u001b[m\u001b[93m\u001b[107m:\r\n\u001b[96m\u001b[47m164 \u001b[m\u001b[93m\u001b[107m\u001b[8Cout = formats.JSONstruct{Output: toGeneric(imageOutput)}\r\n\u001b[96m\u001b[47m165 \u001b[m\u001b[93m\u001b[107m \u001b[32mdefault\u001b[m\u001b[93m\u001b[107m:\r\n\u001b[96m\u001b[47m166 \u001b[m\u001b[93m\u001b[107m\u001b[8Cout = formats.StdoutTemplate{Output: toGeneric(imageOutput), Template: outputFormat, Fields: imageOutput[\u001b[36m0\u001b[m\u001b[93m\u001b[107m].header" - ], - [ - 3.1e-05, - "Map()}\r\n\u001b[96m\u001b[47m167 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m168 \r\n169 \u001b[m\u001b[93m\u001b[107m formats.Writer(out).Out()\r\n\u001b[96m\u001b[47m170 \r\n171 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m172 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m173 \r\n174 \u001b[m\u001b[93m\u001b[107m\u001b[32mtype\u001b[m\u001b[93m\u001b[107m imageOutputParams \u001b[32mstruct\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m175 \u001b[m\u001b[93m\u001b[107m ID\u001b[8C\u001b[33mstring\u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[36m`json:\"id\"`\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m176 \u001b[m\u001b[93m\u001b[107m Name \u001b[33mstring\u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[36m`json:\"names\"`\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m177 \u001b[m\u001b[93m\u001b[107m Digest digest.Digest \u001b[36m`json:\"digest\"`\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m178 \u001b[m\u001b[93m\u001b[107m CreatedAt \u001b[33mstring\u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[36m`json:\"created\"`\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m179 \u001b[m\u001b[93m\u001b[107m Size \u001b[33mstring\u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[36m`json:\"size\"`\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m180 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m181 \r\n182 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m toGeneric(params []imageOutputParams) []\u001b[32minterface\u001b[m\u001b[93m\u001b[107m{} {\r\n" - ], - [ - 0.034447, - "\u001b[96m\u001b[47m183 \u001b[m\u001b[93m\u001b[107m genericParams := \u001b[32mmake\u001b[m\u001b[93m\u001b[107m([]\u001b[32minterface\u001b[m\u001b[93m\u001b[107m{}, \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(params))\r\n\u001b[96m\u001b[47m184 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m i, v := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m params {\r\n\u001b[96m\u001b[47m185 \u001b[m\u001b[93m\u001b[107m\u001b[8CgenericParams[i] = \u001b[32minterface\u001b[m\u001b[93m\u001b[107m{}(v)\r\n\u001b[96m\u001b[47m186 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m187 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m genericParams\r\n\u001b[96m\u001b[47m188 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m189 \r\n190 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (i *imageOutputParams) headerMap() \u001b[33mmap\u001b[m\u001b[93m\u001b[107m[\u001b[33mstring\u001b[m\u001b[93m\u001b[107m]\u001b[33mstring\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m191 \u001b[m\u001b[93m\u001b[107m v := reflect.Indirect(reflect.ValueOf(i))\r\n\u001b[96m\u001b[47m192 \u001b[m\u001b[93m\u001b[107m values := \u001b[32mmake\u001b[m\u001b[93m\u001b[107m(\u001b[33mmap\u001b[m\u001b[93m\u001b[107m[\u001b[33mstring\u001b[m\u001b[93m\u001b[107m]\u001b[33mstring\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m193 \r\n194 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m i := \u001b[36m0\u001b[m\u001b[93m\u001b[107m; i < v.NumField(); i++ {\r\n\u001b[96m\u001b[47m195 \u001b[m\u001b[93m\u001b[107m\u001b[8Ckey := v.Type().Field(i).Na" - ], - [ - 5.7e-05, - "me\r\n\u001b[96m\u001b[47m196 \u001b[m\u001b[93m\u001b[107m\u001b[8Cvalue := key\r\n\u001b[96m\u001b[47m197 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m value == \u001b[36m\"ID\"\u001b[m\u001b[93m\u001b[107m || value == \u001b[36m\"Name\"\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m198 \u001b[m\u001b[93m\u001b[107m\u001b[12Cvalue = \u001b[36m\"Image\"\u001b[m\u001b[93m\u001b[107m + value\r\n\u001b[96m\u001b[47m199 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m200 \u001b[m\u001b[93m\u001b[107m\u001b[8Cvalues[key] = fmt.Sprintf(\u001b[36m\"\u001b[m\u001b[93m\u001b[107m\u001b[31m%s\u001b[m\u001b[93m\u001b[107m\u001b[36m \"\u001b[m\u001b[93m\u001b[107m, strings.ToUpper(splitCamelCase(value)))\r\n\u001b[96m\u001b[47m201 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m202 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m values\r\n\u001b[96m\u001b[47m203 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[53;12H kpod-format-table \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[53;32H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mimages.go \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[53;53H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m               " - ], - [ - 0.01263, - "                                                                                                           \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  87%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m177\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5  \u001b[26;9H\u001b[?12l\u001b[?25h" - ], - [ - 2.3e-05, - "\u001bP+q436f\u001b\\\u001bP+q6b75\u001b\\\u001bP+q6b64\u001b\\\u001bP+q6b72\u001b\\\u001bP+q6b6c\u001b\\\u001bP+q2332\u001b\\\u001bP+q2334\u001b\\\u001bP+q2569\u001b\\\u001bP+q2a37\u001b\\\u001bP+q6b31\u001b\\" - ], - [ - 0.07219, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[54;1H\u001b[K\u001b[54;1H/" - ], - [ - 6.3e-05, - "\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.376099, - "D" - ], - [ - 8.8e-05, - "\u001b[?25l" - ], - [ - 0.008132, - "\u001b[26;26H\u001b[7m\u001b[91mD\u001b[27m\u001b[m\u001b[93m\u001b[107m\u001b[53;2H\u001b[1m\u001b[38;5;22m\u001b[48;5;148mCOMMND \u001b[m\u001b[93m\u001b[107m\u001b[200C\u001b[38;5;22m\u001b[48;5;252m22\r\n\u001b[m\u001b[93m\u001b[107m/D" - ], - [ - 6.3e-05, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.127597, - "I" - ], - [ - 6e-05, - "\u001b[?25l" - ], - [ - 0.001462, - "\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[1;1H\u001b[96m\u001b[47m 98 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 99 \u001b[m\u001b[93m\u001b[107m } \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m100 \u001b[m\u001b[93m\u001b[107m\u001b[8Cparams = \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m101 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m102 \r\n103 \u001b[m\u001b[93m\u001b[107m imageList, err := libkpodimage.GetImagesMatchingFilter(store, params, name)\r\n\u001b[96m\u001b[47m104 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m105 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"could not get list of images matching filter\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m106 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m107 \r\n108 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m outputImages(store, imageList, truncate, digests, quiet, outputFormat, noheading)\r\n\u001b[96m\u001b[47m109 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m110 \r\n111 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m genImagesFormat(quiet, truncate, digests \u001b[33mbool\u001b[m\u001b[93m\u001b[107m) (format \u001b[33mstring\u001b[m\u001b[93m\u001b[107m) {\r\n\u001b[96m\u001b[47m112 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m quiet {\r\n\u001b[96m\u001b[" - ], - [ - 1.7e-05, - "47m113 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36m\"{{.ID}}\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m114 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m115 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m truncate {\r\n\u001b[96m\u001b[47m116 \u001b[m\u001b[93m\u001b[107m\u001b[8Cformat = \u001b[36m\"table {{ .ID | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-20.12s\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m }} \"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m117 \u001b[m\u001b[93m\u001b[107m } \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m118 \u001b[m\u001b[93m\u001b[107m\u001b[8Cformat = \u001b[36m\"table {{ .ID | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-64s\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m }} \"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m119 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m120 \u001b[m\u001b[93m\u001b[107m format += \u001b[36m\"{{ .Name | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-56s\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m }} \"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m121 \r\n122 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m digests {\r\n\u001b[96m\u001b[47m123 \u001b[m\u001b[93m\u001b[107m\u001b[8Cformat += \u001b[36m\"{{ .\u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[91mDI\u001b[27m\u001b[m\u001b[93m\u001b[107m\u001b[36mGEST | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m}} \"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m124 \u001b[m\u001b[93m\u001b[107m }\r\n" - ], - [ - 0.006692, - "\u001b[96m\u001b[47m125 \r\n126 \u001b[m\u001b[93m\u001b[107m format += \u001b[36m\"{{ .CreatedAt | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-22s\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m }} {{.Size}}\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m127 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m128 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m129 \r\n130 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m outputImages(store storage.Store, images []storage.Image, truncate, digests, quiet \u001b[33mbool\u001b[m\u001b[93m\u001b[107m, outputFormat \u001b[33mstring\u001b[m\u001b[93m\u001b[107m, noheading \u001b[33mbool\u001b[m\u001b[93m\u001b[107m) \u001b[33merror\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m131 \u001b[m\u001b[93m\u001b[107m imageOutput := []imageOutputParams{}\r\n\u001b[96m\u001b[47m132 \r\n133 \u001b[m\u001b[93m\u001b[107m lastID := \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m134 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, img := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m images {\r\n\u001b[96m\u001b[47m135 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m quiet && lastID == img.ID {\r\n\u001b[96m\u001b[47m136 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mcontinue\u001b[m\u001b[93m\u001b[107m \u001b[96m// quiet should not show the same ID multiple times\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m137 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m138 \u001b[m\u001b[" - ], - [ - 3e-05, - "93m\u001b[107m\u001b[8CcreatedTime := img.Created\r\n\u001b[96m\u001b[47m139 \r\n140 \u001b[m\u001b[93m\u001b[107m\u001b[8Cname := \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m141 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(img.Names) > \u001b[36m0\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m142 \u001b[m\u001b[93m\u001b[107m\u001b[12Cname = img.Names[\u001b[36m0\u001b[m\u001b[93m\u001b[107m]\r\n\u001b[96m\u001b[47m143 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m144 \r\n145 \u001b[m\u001b[93m\u001b[107m\u001b[8Cinfo, imageDigest, size, _ := libkpodimage.InfoAndDigestAndSize(store, img)\r\n\u001b[96m\u001b[47m146 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m info != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m147 \u001b[m\u001b[93m\u001b[107m\u001b[12CcreatedTime = info.Created\r\n\u001b[96m\u001b[47m148 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m149 \u001b[m\u001b[93m\u001b[107m\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m COMMND \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[53;12H kpod-format-table \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[53;32H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mimages.go \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[53;53H" - ], - [ - 6.1e-05, - " \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                          \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  61%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m123\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:24 \u001b[m\u001b[93m\u001b[107m\u001b[54;1H/DI\u001b[?12l\u001b[?25h" - ], - [ - 0.104778, - "G\u001b[?25l" - ], - [ - 0.004039, - "\u001b[26;30H\u001b[7m\u001b[91mG\u001b[54;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.202824, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mE\u001b[?25l" - ], - [ - 0.005173, - "\u001b[26;31H\u001b[7m\u001b[91mE\u001b[54;6H\u001b[?12l\u001b[?25h" - ], - [ - 0.122869, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mS\u001b[?25l" - ], - [ - 0.005278, - "\u001b[26;32H\u001b[7m\u001b[91mS\u001b[54;7H\u001b[?12l\u001b[?25h" - ], - [ - 0.090915, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mT\u001b[?25l" - ], - [ - 0.005887, - "\u001b[26;33H\u001b[7m\u001b[91mT\u001b[54;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.154865, - "\r\u001b[?25l\u001b[27m\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[31msearch hit BOTTOM, continuing at TOP" - ], - [ - 0.001958, - "\u001b[m\u001b[93m\u001b[107m\u001b[26;28H\u001b[7m\u001b[33mDIGEST" - ], - [ - 0.0027, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;2H\u001b[1m\u001b[38;5;22m\u001b[48;5;148mNORMAL \u001b[26;28H\u001b[?12l\u001b[?25h" - ], - [ - 0.713596, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;252m5\u001b[26;29H" - ], - [ - 0.44085, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36mDGEST | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m}} \"\u001b[m\u001b[93m\u001b[107m\u001b[26;57H\u001b[K\u001b[53;51H\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[53;55H \u001b[26;29H\u001b[?12l\u001b[?25h" - ], - [ - 0.166708, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mEST | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m}} \"\u001b[m\u001b[93m\u001b[107m\u001b[26;56H\u001b[K\u001b[26;29H\u001b[?12l\u001b[?25h" - ], - [ - 0.169515, - "\u001b[?25l\u001b[36mST | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m}} \"\u001b[m\u001b[93m\u001b[107m\u001b[26;55H\u001b[K\u001b[26;29H\u001b[?12l\u001b[?25h" - ], - [ - 0.174197, - "\u001b[?25l\u001b[36mT | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m}} \"\u001b[m\u001b[93m\u001b[107m\u001b[26;54H\u001b[K\u001b[26;29H\u001b[?12l\u001b[?25h" - ], - [ - 0.401145, - "\u001b[?25l\u001b[36m | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m}} \"\u001b[m\u001b[93m\u001b[107m\u001b[26;53H\u001b[K\u001b[26;29H\u001b[?12l\u001b[?25h" - ], - [ - 0.176906, - "\u001b[?25l\u001b[54;1H\u001b[34m--\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[31ma\u001b[m\u001b[93m\u001b[107m\b\u001b[34m INSERT\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[31mt\u001b[m\u001b[93m\u001b[107m\b\u001b[34m --\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[31mO\u001b[m\u001b[93m\u001b[107m\u001b[54;13H\u001b[K" - ], - [ - 0.042519, - "\u001b[53;1H\u001b[1m\u001b[38;5;23m\u001b[48;5;231m INSERT \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[m\u001b[93m\u001b[107m\u001b[53;9H\u001b[38;5;231m\u001b[48;5;31m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m\u001b[53;12H kpod-format-table \u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;31m\u001b[53;32H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;31mimages.go\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[38;5;220m\u001b[48;5;31m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[m\u001b[93m\u001b[107m\u001b[53;54H\u001b[38;5;31m\u001b[48;5;24m\u001b[53;55H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;24m                                                                                                                        \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[38;5;117m\u001b[48;5;24m go\u001b[m\u001b[93m\u001b[" - ], - [ - 3.8e-05, - "107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;186m\u001b[48;5;31m  61%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;24m\u001b[48;5;117m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m123\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;117m:25 \u001b[26;29H\u001b[?12l\u001b[?25h" - ], - [ - 0.163842, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mg | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m} \"\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[26;30H\u001b[?12l\u001b[?25h" - ], - [ - 0.172451, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36me | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m} \"\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[26;31H\u001b[?12l\u001b[?25h" - ], - [ - 0.331326, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m}} \"\u001b[m\u001b[93m\u001b[107m\u001b[26;54H\u001b[K\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[26;30H\u001b[?12l\u001b[?25h" - ], - [ - 0.13664, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m}} \"\u001b[m\u001b[93m\u001b[107m\u001b[26;53H\u001b[K\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[26;29H\u001b[?12l\u001b[?25h" - ], - [ - 0.177579, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mi | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m} \"\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[26;30H\u001b[?12l\u001b[?25h" - ], - [ - 0.174307, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mg | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m} \"\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[26;31H\u001b[?12l\u001b[?25h" - ], - [ - 0.131684, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36me | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m} \"\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[26;32H\u001b[?12l\u001b[?25h" - ], - [ - 0.086181, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36ms | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m} \"\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m9\u001b[26;33H\u001b[?12l\u001b[?25h" - ], - [ - 0.037497, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mt | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m} \"\u001b[m\u001b[93m\u001b[107m\u001b[53;209H\u001b[38;5;22m\u001b[48;5;117m30\u001b[26;34H\u001b[?12l\u001b[?25h" - ], - [ - 0.329898, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[54;1H\u001b[K" - ], - [ - 0.005721, - "\u001b[53;1H\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;31m\u001b[m\u001b[93m\u001b[107m\u001b[53;9H\u001b[38;5;148m\u001b[48;5;240m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[53;12H kpod-format-table \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[53;32H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mimages.go\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[m\u001b[93m\u001b[107m\u001b[53;54H\u001b[38;5;240m\u001b[48;5;236m\u001b[53;55H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                        \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[38;5;247m\u001b[48;5;236m" - ], - [ - 2.8e-05, - " go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  61%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m123\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;252m:29 \u001b[26;33H\u001b[?12l\u001b[?25h" - ], - [ - 0.282806, - "\u001b[?25l\u001b[54;1H\u001b[m\u001b[93m\u001b[107m:\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.320108, - "w" - ], - [ - 0.00016, - "\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.09557, - "q\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.080523, - "\r\u001b[?25l\u001b[?2004l" - ], - [ - 0.015569, - "\"cmd/kpod/images.go\"" - ], - [ - 0.005889, - " 203L, 4796C written" - ], - [ - 0.015946, - "\r\r\r\n\u001b[39;49m\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.003478, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.034812, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table* \u001b[39m \u001b[33m7s\u001b[39m\r\n" - ], - [ - 0.00239, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 9.2e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.3e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000169, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D\u001b[?1h\u001b=" - ], - [ - 3.6e-05, - "\u001b[?2004h" - ], - [ - 0.906176, - "g" - ], - [ - 0.11065, - "\bgi" - ], - [ - 0.064415, - "t" - ], - [ - 0.143259, - " " - ], - [ - 0.080894, - "c" - ], - [ - 0.048032, - "o" - ], - [ - 0.103375, - "m" - ], - [ - 0.337522, - "i" - ], - [ - 0.287202, - "\b \b" - ], - [ - 0.191689, - "m" - ], - [ - 0.127496, - "i" - ], - [ - 0.096447, - "t" - ], - [ - 0.055022, - " " - ], - [ - 0.128991, - "-" - ], - [ - 0.136055, - "a" - ], - [ - 0.119988, - " " - ], - [ - 0.135881, - "-" - ], - [ - 0.159957, - "-" - ], - [ - 0.120583, - "a" - ], - [ - 0.087513, - "m" - ], - [ - 0.111928, - "e" - ], - [ - 0.104033, - "n" - ], - [ - 0.088352, - "d" - ], - [ - 0.127489, - "\u001b[?1l\u001b>" - ], - [ - 0.0001, - "\u001b[?2004l\r\r\n" - ], - [ - 0.002622, - "\u001b]2;git commit -a --amend\u0007\u001b]1;git\u0007" - ], - [ - 0.026245, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000861, - "\u001b[1;54r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[H\u001b[2J\u001b[?25l\u001b[54;1H\"~/Development/Go/src/github.com/kubernetes-incubator/cri-o/.git/COMMIT_EDITMSG\"" - ], - [ - 0.000158, - " 15L, 455C" - ], - [ - 0.00016, - "\u001b[1;1HMake kpod images use text/template by default\r\n\r\nSigned-off-by: Ryan Cole \r\n\r\n# Please enter the commit message for your changes. Lines starting\r\n# with '#' will be ignored, and an empty message aborts the commit.\r\n#\r\n# Date: Tue Aug 15 22:23:40 2017 -0400\r\n#\r\n# On branch kpod-format-table\r\n# Changes to be committed:\r\n#\u001b[7Cmodified: cmd/kpod/formats/formats.go\r\n#\u001b[7Cmodified: cmd/kpod/formats/templates.go\r\n#\u001b[7Cmodified: cmd/kpod/images.go\r\n#\r\n\u001b[94m~ \u001b[17;1H~ \u001b[18;1H~ " - ], - [ - 2e-05, - " \u001b[19;1H~ \u001b[20;1H~ \u001b[21;1H~ \u001b[22;1H~ \u001b[23;1H~ " - ], - [ - 5.1e-05, - " \u001b[24;1H~ \u001b[25;1H~ \u001b[26;1H~ \u001b[27;1H~ " - ], - [ - 1.5e-05, - " \u001b[28;1H~ \u001b[29;1H~ \u001b[30;1H~ \u001b[31;1H~ \u001b[32;1H~ " - ], - [ - 5e-05, - " \u001b[33;1H~ \u001b[34;1H~ \u001b[35;1H~ \u001b[36;1H~ \u001b[37;1H~ " - ], - [ - 1.5e-05, - " \u001b[38;1H~ \u001b[39;1H~ \u001b[40;1H~ \u001b[41;1H~ " - ], - [ - 7.1e-05, - " \u001b[42;1H~ \u001b[43;1H~ \u001b[44;1H~ \u001b[45;1H~ \u001b[46;1H~ " - ], - [ - 1.6e-05, - " \u001b[47;1H~ \u001b[48;1H~ \u001b[49;1H~ \u001b[50;1H~ \u001b[51;1H~ " - ], - [ - 1.6e-05, - " \u001b[52;1H~ \u001b[53;1H~ \u001b[1;1H\u001b[?12l\u001b[?25h" - ], - [ - 0.297423, - "\u001b[?25l\u001b[m\u001b[54;1H\u001b[K\u001b[54;1H:\u001b[?2004h" - ], - [ - 0.000258, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.143378, - "w" - ], - [ - 0.072145, - "q" - ], - [ - 0.095864, - "\r\u001b[?25l\u001b[?2004l" - ], - [ - 6e-05, - "\".git/COMMIT_EDITMSG\"" - ], - [ - 0.0116, - " 15L, 455C written\r\r\r\n\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.002475, - "[kpod-format-table ba07bfb9] Make kpod images use text/template by default\r\n Date: Tue Aug 15 22:23:40 2017 -0400\r\n" - ], - [ - 0.000465, - " 3 files changed, 36 insertions(+), 61 deletions(-)\r\n" - ], - [ - 0.000403, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.026137, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001205, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000102, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000115, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 2.9e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 7.6e-05, - "\u001b[?1h\u001b=" - ], - [ - 2e-05, - "\u001b[?2004h" - ], - [ - 14.9661, - "g" - ], - [ - 0.136155, - "\bgi" - ], - [ - 0.079381, - "t" - ], - [ - 0.080921, - " " - ], - [ - 0.047606, - "p" - ], - [ - 0.09957, - "u" - ], - [ - 0.13683, - "s" - ], - [ - 0.083539, - "h" - ], - [ - 0.111539, - " " - ], - [ - 0.11253, - "-" - ], - [ - 0.159311, - "f" - ], - [ - 0.132344, - " " - ], - [ - 0.132514, - "o" - ], - [ - 0.144066, - "r" - ], - [ - 0.143563, - "i" - ], - [ - 0.155326, - "g" - ], - [ - 0.128262, - "i" - ], - [ - 0.112524, - "n" - ], - [ - 0.035327, - " " - ], - [ - 0.184803, - "k" - ], - [ - 0.120956, - "pod-" - ], - [ - 0.139448, - "f" - ], - [ - 0.127973, - "o" - ], - [ - 0.134993, - "rmat-table\u001b[1m \u001b[0m" - ], - [ - 0.600821, - "\b\u001b[0m \b\u001b[?1l\u001b>\u001b[?2004l\r\r\n" - ], - [ - 0.002119, - "\u001b]2;git push -f origin kpod-format-table\u0007\u001b]1;git\u0007" - ], - [ - 1.180562, - "Counting objects: 8, done.\r\n" - ], - [ - 0.000119, - "Delta compression using up to 4 threads.\r\n" - ], - [ - 4.1e-05, - "Compressing objects: 12% (1/8) \r" - ], - [ - 9.2e-05, - "Compressing objects: 25% (2/8) \r" - ], - [ - 7.4e-05, - "Compressing objects: 37% (3/8) \r" - ], - [ - 0.000131, - "Compressing objects: 50% (4/8) \r" - ], - [ - 1.4e-05, - "Compressing objects: 62% (5/8) \r" - ], - [ - 3.3e-05, - "Compressing objects: 75% (6/8) \r" - ], - [ - 2.2e-05, - "Compressing objects: 87% (7/8) \r" - ], - [ - 3.6e-05, - "Compressing objects: 100% (8/8) \r" - ], - [ - 4e-05, - "Compressing objects: 100% (8/8), done.\r\n" - ], - [ - 0.000193, - "Writing objects: 12% (1/8) \r" - ], - [ - 4.3e-05, - "Writing objects: 25% (2/8) \r" - ], - [ - 4.2e-05, - "Writing objects: 37% (3/8) \r" - ], - [ - 4.4e-05, - "Writing objects: 50% (4/8) \r" - ], - [ - 6.2e-05, - "Writing objects: 62% (5/8) \r" - ], - [ - 4e-05, - "Writing objects: 75% (6/8) \r" - ], - [ - 3.9e-05, - "Writing objects: 87% (7/8) \r" - ], - [ - 7.2e-05, - "Writing objects: 100% (8/8) \r" - ], - [ - 2.3e-05, - "Writing objects: 100% (8/8), 1.02 KiB | 1.02 MiB/s, done.\r\nTotal 8 (delta 6), reused 0 (delta 0)\r\n" - ], - [ - 0.089402, - "remote: Resolving deltas: 0% (0/6) \u001b[K\r" - ], - [ - 0.036283, - "remote: Resolving deltas: 16% (1/6) \u001b[K\rremote: Resolving deltas: 33% (2/6) \u001b[K\rremote: Resolving deltas: 50% (3/6) \u001b[K\rremote: Resolving deltas: 66% (4/6) \u001b[K\rremote: Resolving deltas: 83% (5/6) \u001b[K\rremote: Resolving deltas: 100% (6/6) \u001b[K\rremote: Resolving deltas: 100% (6/6), completed with 6 local objects.\u001b[K\r\n" - ], - [ - 1.955619, - "To github.com:14rcole/cri-o\r\n + 99495909...ba07bfb9 kpod-format-table -> kpod-format-table (forced update" - ], - [ - 7.3e-05, - ")\r\n" - ], - [ - 0.001606, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.029351, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-format-table \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001026, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 8.9e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.1e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000163, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.6e-05, - "\u001b[?1h\u001b=" - ], - [ - 2e-05, - "\u001b[?2004h" - ], - [ - 330.270968, - "v" - ], - [ - 0.119343, - "\bvi" - ], - [ - 0.103605, - " " - ], - [ - 0.088799, - "t" - ], - [ - 0.080179, - "e" - ], - [ - 0.198952, - "st\u001b[1m/\u001b[0m" - ], - [ - 0.353296, - "\b\u001b[0m \b" - ], - [ - 0.499203, - "\b \b" - ], - [ - 0.02974, - "\b \b" - ], - [ - 0.031437, - "\b \b" - ], - [ - 0.029177, - "\b \b" - ], - [ - 0.030945, - "\b" - ], - [ - 0.029122, - "\b\bv \b" - ], - [ - 0.029942, - "\b \b" - ], - [ - 0.136039, - "g" - ], - [ - 0.071775, - "\bgi" - ], - [ - 0.112776, - "t" - ], - [ - 0.063244, - " " - ], - [ - 0.144384, - "c" - ], - [ - 0.055871, - "h" - ], - [ - 0.144103, - "e" - ], - [ - 0.080216, - "c" - ], - [ - 0.07079, - "k" - ], - [ - 0.112014, - "o" - ], - [ - 0.064547, - "u" - ], - [ - 0.080139, - "t" - ], - [ - 0.095908, - " " - ], - [ - 0.104077, - "k" - ], - [ - 0.138478, - "pod-" - ], - [ - 0.117535, - "s" - ], - [ - 0.128338, - "t" - ], - [ - 0.259432, - "a" - ], - [ - 0.522987, - "\u0007" - ], - [ - 0.000167, - "\r\r\n" - ], - [ - 8.2e-05, - "\u001b[J\u001b[0mkpod-start \u001b[Jkpod-stats\u001b[J\u001b[A\u001b[0m\u001b[27m\u001b[24m\u001b[39m\r\u001b[2Cgit checkout kpod-sta\u001b[K\u001b[187C\u001b[90m\u001b[39m\u001b[39m\u001b[187D" - ], - [ - 0.225726, - "t" - ], - [ - 0.239644, - "s\u001b[1m \u001b[0m" - ], - [ - 0.327637, - "\b\u001b[0m \b" - ], - [ - 0.000136, - "\u001b[?1l\u001b>" - ], - [ - 0.000445, - "\u001b[?2004l\r\r\n\u001b[J" - ], - [ - 0.004978, - "\u001b]2;git checkout kpod-stats\u0007\u001b]1;git\u0007" - ], - [ - 0.041451, - "Switched to branch 'kpod-stats'\r\n" - ], - [ - 6.6e-05, - "Your branch is up-to-date with 'origin/kpod-stats'.\r\n" - ], - [ - 0.000587, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.035434, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001297, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 7.4e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.1e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000329, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.6e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.2e-05, - "\u001b[?2004h" - ], - [ - 2.822658, - "v" - ], - [ - 0.107877, - "\bvi" - ], - [ - 0.28439, - " " - ], - [ - 0.083967, - "l" - ], - [ - 0.064538, - "i" - ], - [ - 0.100026, - "b" - ], - [ - 0.167219, - "kpod\u001b[1m/\u001b[0m" - ], - [ - 0.572222, - "\b\u001b[0m/c" - ], - [ - 0.09244, - "o" - ], - [ - 0.118682, - "\u0007" - ], - [ - 0.000448, - "\r\r\n" - ], - [ - 0.000186, - "\u001b[J\u001b[38;5;33mcommon\u001b[0m/ \u001b[Jconfig.go \u001b[Jcontainer_data.go \u001b[Jcontainer.go \u001b[Jcontainer_server.go\u001b[J\u001b[A\u001b[0m\u001b[27m\u001b[24m\u001b[39m\r\u001b[2Cvi libkpod/co\u001b[K\u001b[195C\u001b[90m\u001b[39m\u001b[39m\u001b[195D" - ], - [ - 0.632962, - "t" - ], - [ - 0.209392, - "\u0007\r\r\n\u001b[J\u001b[A\u001b[16C" - ], - [ - 0.694432, - "\b \b" - ], - [ - 0.159374, - "n" - ], - [ - 0.086549, - "\u0007" - ], - [ - 0.000211, - "\r\r\n\u001b[J" - ], - [ - 9.9e-05, - "\u001b[J\u001b[0mconfig.go \u001b[Jcontainer_data.go \u001b[Jcontainer.go \u001b[Jcontainer_server.go\u001b[J\u001b[A\u001b[0m\u001b[27m\u001b[24m\u001b[39m\r\u001b[2Cvi libkpod/con\u001b[K\u001b[194C\u001b[90m\u001b[39m\u001b[39m\u001b[194D" - ], - [ - 0.481713, - "t" - ], - [ - 0.111125, - "a" - ], - [ - 0.180888, - "\r\r\n\u001b[J\u001b[A\u001b[18Ciner" - ], - [ - 0.492502, - "_" - ], - [ - 0.206735, - "s" - ], - [ - 0.024184, - "e" - ], - [ - 0.325519, - "rver.go\u001b[1m \u001b[0m" - ], - [ - 0.3706, - "\b\u001b[0m \b" - ], - [ - 0.0002, - "\u001b[?1l\u001b>\u001b[?2004l\r\r\n\u001b[J" - ], - [ - 0.00447, - "\u001b]2;vim libkpod/container_server.go\u0007\u001b]1;vi\u0007" - ], - [ - 0.135276, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000662, - "\u001b[1;54r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[54;1H\"libkpod/container_server.go\"" - ], - [ - 0.00017, - " 684L, 20532C" - ], - [ - 0.008173, - "\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[1;1H\u001b[>c" - ], - [ - 0.025784, - "\u001b[1;1H\u001b[96m\u001b[47m586 \u001b[m\u001b[93m\u001b[107m \u001b[32mdefer\u001b[m\u001b[93m\u001b[107m c.stateLock.Unlock()\r\n\u001b[96m\u001b[47m587 \u001b[m\u001b[93m\u001b[107m sbID := ctr.Sandbox()\r\n\u001b[96m\u001b[47m588 \u001b[m\u001b[93m\u001b[107m sb := c.state.sandboxes[sbID]\r\n\u001b[96m\u001b[47m589 \u001b[m\u001b[93m\u001b[107m sb.RemoveContainer(ctr)\r\n\u001b[96m\u001b[47m590 \u001b[m\u001b[93m\u001b[107m c.state.containers.Delete(ctr.ID())\r\n\u001b[96m\u001b[47m591 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m592 \r\n593 \u001b[m\u001b[93m\u001b[107m\u001b[96m// listContainers returns a list of all containers stored by the server state\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m594 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) listContainers() []*oci.Container {\r\n\u001b[96m\u001b[47m595 \u001b[m\u001b[93m\u001b[107m c.stateLock.Lock()\r\n\u001b[96m\u001b[47m596 \u001b[m\u001b[93m\u001b[107m \u001b[32mdefer\u001b[m\u001b[93m\u001b[107m c.stateLock.Unlock()\r\n\u001b[96m\u001b[47m597 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m c.state.containers.List()\r\n\u001b[96m\u001b[47m598 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m599 \r\n600 \u001b[m\u001b[93m\u001b[107m\u001b[96m// ListContainers returns a list of all containers stored by the server state that match the given filter function\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b" - ], - [ - 2.9e-05, - "[47m601 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) ListContainers(filters ...\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m(*oci.Container) \u001b[33mbool\u001b[m\u001b[93m\u001b[107m) ([]*oci.Container, \u001b[33merror\u001b[m\u001b[93m\u001b[107m) {\r\n\u001b[96m\u001b[47m602 \u001b[m\u001b[93m\u001b[107m containers := c.listContainers()\r\n\u001b[96m\u001b[47m603 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(filters) == \u001b[36m0\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m604 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m containers, \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m605 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m606 \u001b[m\u001b[93m\u001b[107m filteredContainers := \u001b[32mmake\u001b[m\u001b[93m\u001b[107m([]*oci.Container, \u001b[36m0\u001b[m\u001b[93m\u001b[107m, \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(containers))\r\n\u001b[96m\u001b[47m607 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, container := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m containers {\r\n\u001b[96m\u001b[47m608 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, filter := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m filters {\r\n\u001b[96m\u001b[47m609 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m filter(container) \u001b[1m\u001b[31m\u001b[106m{\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m610 \u001b[m" - ], - [ - 0.027894, - "\u001b[93m\u001b[107m\u001b[16CfilteredContainers = \u001b[32mappend\u001b[m\u001b[93m\u001b[107m(filteredContainers, container)\r\n\u001b[96m\u001b[47m611 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[1m\u001b[31m\u001b[106m}\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m612 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m613 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m614 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m filteredContainers, \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m615 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m616 \r\n617 \u001b[m\u001b[93m\u001b[107m\u001b[96m// AddSandbox adds a sandbox to the sandbox state store\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m618 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) AddSandbox(sb *sandbox.Sandbox) {\r\n\u001b[96m\u001b[47m619 \u001b[m\u001b[93m\u001b[107m c.stateLock.Lock()\r\n\u001b[96m\u001b[47m620 \u001b[m\u001b[93m\u001b[107m \u001b[32mdefer\u001b[m\u001b[93m\u001b[107m c.stateLock.Unlock()\r\n\u001b[96m\u001b[47m621 \u001b[m\u001b[93m\u001b[107m c.state.sandboxes[sb.ID()] = sb\r\n\u001b[96m\u001b[47m622 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m623 \r\n624 \u001b[m\u001b[93m\u001b[107m\u001b[96m// GetSandbox returns a sandbox by its ID\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m625 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) GetSandbox(id \u001b[33mstring\u001b[m\u001b[93m\u001b[107m) *sandb" - ], - [ - 2.9e-05, - "ox.Sandbox {\r\n\u001b[96m\u001b[47m626 \u001b[m\u001b[93m\u001b[107m c.stateLock.Lock()\r\n\u001b[96m\u001b[47m627 \u001b[m\u001b[93m\u001b[107m \u001b[32mdefer\u001b[m\u001b[93m\u001b[107m c.stateLock.Unlock()\r\n\u001b[96m\u001b[47m628 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m c.state.sandboxes[id]\r\n\u001b[96m\u001b[47m629 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m630 \r\n631 \u001b[m\u001b[93m\u001b[107m\u001b[96m// GetSandboxContainer returns a sandbox's infra container\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m632 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) GetSandboxContainer(id \u001b[33mstring\u001b[m\u001b[93m\u001b[107m) *oci.Container {\r\n\u001b[96m\u001b[47m633 \u001b[m\u001b[93m\u001b[107m c.stateLock.Lock()\r\n\u001b[96m\u001b[47m634 \u001b[m\u001b[93m\u001b[107m \u001b[32mdefer\u001b[m\u001b[93m\u001b[107m c.stateLock.Unlock()\r\n\u001b[96m\u001b[47m635 \u001b[m\u001b[93m\u001b[107m sb, ok := c.state.sandboxes[id]\r\n\u001b[96m\u001b[47m636 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m !ok {\r\n\u001b[96m\u001b[47m637 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[53;12H kpod-stats \u001b[m\u001b[93m\u001b[107m" - ], - [ - 0.00922, - "\u001b[38;5;245m\u001b[48;5;240m\u001b[53;25H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mlibkpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mcontainer_server.go \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[53;55H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                        \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  89%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m611\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:13 \u001b[26;17H\u001b[?12l\u001b[?25h" - ], - [ - 2e-05, - "\u001bP+q436f\u001b\\\u001bP+q6b75\u001b\\\u001bP+q6b64\u001b\\\u001bP+q6b72\u001b\\\u001bP+q6b6c\u001b\\\u001bP+q2332\u001b\\\u001bP+q2334\u001b\\\u001bP+q2569\u001b\\\u001bP+q2a37\u001b\\\u001bP+q6b31\u001b\\" - ], - [ - 3.500046, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[54;1H\u001b[K\u001b[54;1H/\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.32149, - "L\u001b[?25l" - ], - [ - 0.014673, - "\u001b[34;16H\u001b[7m\u001b[91mL\u001b[27m\u001b[m\u001b[93m\u001b[107m\u001b[53;2H\u001b[1m\u001b[38;5;22m\u001b[48;5;148mCOMMND \u001b[m\u001b[93m\u001b[107m\u001b[186C\u001b[38;5;247m\u001b[48;5;240m  90%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m9\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:12\r\n\u001b[m\u001b[93m\u001b[107m/L\u001b[?12l\u001b[?25h" - ], - [ - 0.16782, - "i\u001b[?25l" - ], - [ - 0.004265, - "\u001b[1;1H\u001b[96m\u001b[47m609\u001b[m\u001b[93m\u001b[107m\u001b[5C \u001b[32mif\u001b[m\u001b[93m\u001b[107m filter(container) \u001b[1m\u001b[31m\u001b[106m{\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m610\u001b[m\u001b[93m\u001b[107m\u001b[5C filteredContainers = \u001b[32mappend\u001b[m\u001b[93m\u001b[107m(filteredContainers, container)\r\n\u001b[96m\u001b[47m611\u001b[m\u001b[93m\u001b[107m\u001b[5C \u001b[1m\u001b[31m\u001b[106m}\u001b[m\u001b[93m\u001b[107m\u001b[3;18H\u001b[K\u001b[4;1H\u001b[96m\u001b[47m612\u001b[m\u001b[93m\u001b[107m\u001b[5C }\u001b[4;14H\u001b[K\u001b[5;1H\u001b[96m\u001b[47m613\u001b[m\u001b[93m\u001b[107m\u001b[5C}\u001b[5;10H\u001b[K\u001b[6;1H\u001b[96m\u001b[47m614\u001b[m\u001b[93m\u001b[107m\u001b[1C \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m filteredContainers, \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m615\u001b[m\u001b[93m\u001b[107m\u001b[1C}\r\n\u001b[96m\u001b[47m616\u001b[m\u001b[93m\u001b[107m\u001b[8;5H\u001b[K\u001b[9;1H\u001b[96m\u001b[47m617\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[96m// AddSandbox adds a sandbox to the sandbox state store\u001b[m\u001b[93m\u001b[107m\u001b[9;60H\u001b[K\u001b[10;1H\u001b[96m\u001b[47m618\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) AddSandbox(sb *sandbox.Sandbox) {\r\n\u001b[96m\u001b[47m619\u001b[m\u001b[93m\u001b[107m\u001b[5Cc.stateLock.Lock()\u001b[11;27H\u001b[K\u001b[12;1H\u001b[96m\u001b[47m620\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[32mdefe\u001b[m\u001b[93m\u001b[107m\u001b[1C c.stateLock.Unlock()\u001b[12;35H\u001b[K\u001b[13;1H\u001b[96m\u001b[47m621\u001b[m\u001b[93m\u001b" - ], - [ - 5.4e-05, - "[107m\u001b[1C c.state.sandboxes[sb.ID()] = sb\r\n\u001b[96m\u001b[47m622\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[15;2H\u001b[96m\u001b[47m23\u001b[m\u001b[93m\u001b[107m\u001b[15;5H\u001b[K\u001b[16;2H\u001b[96m\u001b[47m24\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[96m// GetSandbox returns a sandbox by its ID\u001b[m\u001b[93m\u001b[107m\u001b[16;46H\u001b[K\u001b[17;2H\u001b[96m\u001b[47m25\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) GetSandbox(id \u001b[33mstring\u001b[m\u001b[93m\u001b[107m) *sandbox.Sandbox {\u001b[18;2H\u001b[96m\u001b[47m26\u001b[m\u001b[93m\u001b[107m\u001b[5Cc.stateLock.Lock()\u001b[18;28H\u001b[K\u001b[19;2H\u001b[96m\u001b[47m27\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[32mdefe\u001b[m\u001b[93m\u001b[107m\u001b[1C c.stateLock.Unlock()\u001b[20;2H\u001b[96m\u001b[47m28\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m c.state.sandboxes[id]\u001b[21;2H\u001b[96m\u001b[47m29\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[21;9H\u001b[K\u001b[22;2H\u001b[96m\u001b[47m30\u001b[m\u001b[93m\u001b[107m\u001b[22;9H\u001b[K\u001b[23;2H\u001b[96m\u001b[47m31\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[96m// GetSandboxContainer returns a sandbox's infra container\u001b[m\u001b[93m\u001b[107m\u001b[24;2H\u001b[96m\u001b[47m32\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) GetSandboxContainer(id \u001b[33mstring\u001b[m\u001b[93m\u001b[107m) *oci.Container {\u001b[25;2H\u001b[96m\u001b[47m33\u001b[m\u001b[93m\u001b[107m\u001b[5Cc.stateLock.Lock()" - ], - [ - 0.003162, - "\u001b[25;27H\u001b[K\u001b[26;2H\u001b[96m\u001b[47m34\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[32mdefer\u001b[m\u001b[93m\u001b[107m c.stateLock.Unlock()\u001b[27;2H\u001b[96m\u001b[47m35\u001b[m\u001b[93m\u001b[107m\u001b[5Csb, ok := c.state.sandboxes[id]\u001b[28;2H\u001b[96m\u001b[47m36\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[32mif\u001b[m\u001b[93m\u001b[107m !ok {\u001b[29;2H\u001b[96m\u001b[47m37\u001b[m\u001b[93m\u001b[107m\u001b[5C \u001b[1C\u001b[32meturn\u001b[m\u001b[93m\u001b[107m \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\u001b[29;23H\u001b[K\u001b[30;2H\u001b[96m\u001b[47m38\u001b[m\u001b[93m\u001b[107m\u001b[1C }\u001b[31;2H\u001b[96m\u001b[47m39\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m sb.InfraContainer()\u001b[32;2H\u001b[96m\u001b[47m40\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[32;6H\u001b[K\u001b[33;2H\u001b[96m\u001b[47m41\u001b[m\u001b[93m\u001b[107m\u001b[33;5H\u001b[K\u001b[34;2H\u001b[96m\u001b[47m42\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[96m// HasSandbox checks if a sandbox exists in the state\u001b[m\u001b[93m\u001b[107m\u001b[35;2H\u001b[96m\u001b[47m43\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) HasSandbox(id \u001b[33mstring\u001b[m\u001b[93m\u001b[107m) \u001b[33mbool\u001b[m\u001b[93m\u001b[107m {\u001b[36;2H\u001b[96m\u001b[47m44\u001b[m\u001b[93m\u001b[107m\u001b[12CLock.Lock()\u001b[36;27H\u001b[K\u001b[37;2H\u001b[96m\u001b[47m45\u001b[m\u001b[93m\u001b[107m\u001b[1C \u001b[32mdefer\u001b[m\u001b[93m\u001b[107m c.stateLock.Unlock()\u001b[38;2H\u001b[96m\u001b[47m46\u001b[m\u001b[93m\u001b[107m\u001b[5C_, ok := c.state.sandboxes[id]\u001b[39;2H\u001b[96" - ], - [ - 6.1e-05, - "m\u001b[47m47\u001b[m\u001b[93m\u001b[107m\u001b[1C \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m ok\u001b[39;18H\u001b[K\u001b[40;2H\u001b[96m\u001b[47m48\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[40;6H\u001b[K\u001b[41;2H\u001b[96m\u001b[47m49\u001b[m\u001b[93m\u001b[107m\u001b[41;9H\u001b[K\u001b[42;2H\u001b[96m\u001b[47m50\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[96m// RemoveSandbox removes a sandbox from the state store\u001b[m\u001b[93m\u001b[107m\u001b[43;2H\u001b[96m\u001b[47m51\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) RemoveSandbox(id \u001b[33mstring\u001b[m\u001b[93m\u001b[107m) {\u001b[44;2H\u001b[96m\u001b[47m52\u001b[m\u001b[93m\u001b[107m\u001b[1C c.stateLock.Lock()\u001b[45;2H\u001b[96m\u001b[47m53\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[32mdefer\u001b[m\u001b[93m\u001b[107m c.stateLock.Unlock()\u001b[46;2H\u001b[96m\u001b[47m54\u001b[m\u001b[93m\u001b[107m\u001b[1C \u001b[32mdelete\u001b[m\u001b[93m\u001b[107m(c.state.sandboxes, id)\u001b[46;38H\u001b[K\u001b[47;2H\u001b[96m\u001b[47m55\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[47;6H\u001b[K\u001b[48;2H\u001b[96m\u001b[47m56\u001b[m\u001b[93m\u001b[107m\u001b[48;9H\u001b[K\u001b[49;2H\u001b[96m\u001b[47m57\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[96m// \u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[91mLi\u001b[27m\u001b[m\u001b[93m\u001b[107m\u001b[96mstSandboxes lists all sandboxes in the state store\u001b[m\u001b[93m\u001b[107m\u001b[50;2H\u001b[96m\u001b[47m58\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) ListSandboxes() []*sandbox.Sandbox {" - ], - [ - 0.008005, - "\u001b[51;2H\u001b[96m\u001b[47m59\u001b[m\u001b[93m\u001b[107m\u001b[5Cc.stateLock.Lock()\u001b[52;2H\u001b[96m\u001b[47m60\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[32mdefe\u001b[m\u001b[93m\u001b[107m\u001b[1C c.stateLock.Unlock()\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  96%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m57\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:4 \r\n\u001b[m\u001b[93m\u001b[107m/Li\u001b[?12l\u001b[?25h" - ], - [ - 0.064191, - "s\u001b[?25l" - ], - [ - 0.009148, - "\u001b[49;10H\u001b[7m\u001b[91ms\u001b[54;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.063177, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mt\u001b[?25l" - ], - [ - 0.011092, - "\u001b[49;11H\u001b[7m\u001b[91mt\u001b[54;6H\u001b[?12l\u001b[?25h" - ], - [ - 0.22857, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mC\u001b[?25l" - ], - [ - 0.012394, - "\u001b[1;52r\u001b[1;1H\u001b[23L\u001b[1;54r\u001b[1;1H\u001b[96m\u001b[47m586 \u001b[m\u001b[93m\u001b[107m \u001b[32mdefer\u001b[m\u001b[93m\u001b[107m c.stateLock.Unlock()\r\n\u001b[96m\u001b[47m587 \u001b[m\u001b[93m\u001b[107m sbID := ctr.Sandbox()\r\n\u001b[96m\u001b[47m588 \u001b[m\u001b[93m\u001b[107m sb := c.state.sandboxes[sbID]\r\n\u001b[96m\u001b[47m589 \u001b[m\u001b[93m\u001b[107m sb.RemoveContainer(ctr)\r\n\u001b[96m\u001b[47m590 \u001b[m\u001b[93m\u001b[107m c.state.containers.Delete(ctr.ID())\r\n\u001b[96m\u001b[47m591 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m592 \r\n593 \u001b[m\u001b[93m\u001b[107m\u001b[96m// listContainers returns a list of all containers stored by the server state\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m594 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) listContainers() []*oci.Container {\r\n\u001b[96m\u001b[47m595 \u001b[m\u001b[93m\u001b[107m c.stateLock.Lock()\r\n\u001b[96m\u001b[47m596 \u001b[m\u001b[93m\u001b[107m \u001b[32mdefer\u001b[m\u001b[93m\u001b[107m c.stateLock.Unlock()\r\n\u001b[96m\u001b[47m597 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m c.state.containers.List()\r\n\u001b[96m\u001b[47m598 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m599 \r\n600 \u001b[m\u001b[93m\u001b[107m\u001b[96m// \u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[91mListC\u001b[27m\u001b[m\u001b[93m\u001b[107m\u001b[96montainers returns a list of all containers stored by the" - ], - [ - 3.7e-05, - " server state that match the given filter function\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m601 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) ListContainers(filters ...\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m(*oci.Container) \u001b[33mbool\u001b[m\u001b[93m\u001b[107m) ([]*oci.Container, \u001b[33merror\u001b[m\u001b[93m\u001b[107m) {\r\n\u001b[96m\u001b[47m602 \u001b[m\u001b[93m\u001b[107m containers := c.listContainers()\r\n\u001b[96m\u001b[47m603 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(filters) == \u001b[36m0\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m604 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m containers, \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m605 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m606 \u001b[m\u001b[93m\u001b[107m filteredContainers := \u001b[32mmake\u001b[m\u001b[93m\u001b[107m([]*oci.Container, \u001b[36m0\u001b[m\u001b[93m\u001b[107m, \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(containers))\r\n\u001b[96m\u001b[47m607 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, container := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m containers {\r\n\u001b[96m\u001b[47m608 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, filter := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m filters {\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  88%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m" - ], - [ - 1.8e-05, - "\u001b[48;5;252m00\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[m\u001b[93m\u001b[107m\u001b[54;1H\u001b[K\u001b[54;1H/ListC\u001b[?12l\u001b[?25h" - ], - [ - 0.108051, - "o\u001b[?25l" - ], - [ - 0.010669, - "\u001b[15;13H\u001b[7m\u001b[91mo\u001b[54;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.076559, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mn\u001b[?25l" - ], - [ - 0.010612, - "\u001b[15;14H\u001b[7m\u001b[91mn\u001b[54;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.109997, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mt\u001b[?25l" - ], - [ - 0.011985, - "\u001b[15;15H\u001b[7m\u001b[91mt\u001b[54;10H\u001b[?12l\u001b[?25h" - ], - [ - 0.059787, - "\u001b[27m\u001b[m\u001b[93m\u001b[107ma\u001b[?25l" - ], - [ - 0.01275, - "\u001b[15;16H\u001b[7m\u001b[91ma\u001b[54;11H\u001b[?12l\u001b[?25h" - ], - [ - 0.075246, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mi\u001b[?25l" - ], - [ - 0.008912, - "\u001b[15;17H\u001b[7m\u001b[91mi\u001b[54;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.063432, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mn\u001b[?25l" - ], - [ - 0.01195, - "\u001b[15;18H\u001b[7m\u001b[91mn\u001b[54;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.075708, - "\u001b[27m\u001b[m\u001b[93m\u001b[107me\u001b[?25l" - ], - [ - 0.012727, - "\u001b[15;19H\u001b[7m\u001b[91me\u001b[54;14H\u001b[?12l\u001b[?25h" - ], - [ - 0.035347, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mr\u001b[?25l" - ], - [ - 0.012424, - "\u001b[15;20H\u001b[7m\u001b[91mr\u001b[54;15H\u001b[?12l\u001b[?25h" - ], - [ - 0.124381, - "\u001b[27m\u001b[m\u001b[93m\u001b[107ms\u001b[?25l" - ], - [ - 0.010815, - "\u001b[15;21H\u001b[7m\u001b[91ms\u001b[54;16H\u001b[?12l\u001b[?25h" - ], - [ - 0.180264, - "\r" - ], - [ - 5.1e-05, - "\u001b[?25l" - ], - [ - 0.00018, - "\u001b[27m\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[31msearch hit BOTTOM, continuing at TOP" - ], - [ - 0.005654, - "\u001b[m\u001b[93m\u001b[107m\u001b[15;8H\u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107m\u001b[16;31H\u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107m\u001b[24;38H{\u001b[26;17H}" - ], - [ - 0.00472, - "\u001b[53;2H\u001b[1m\u001b[38;5;22m\u001b[48;5;148mNORMAL \u001b[15;8H\u001b[?12l\u001b[?25h" - ], - [ - 1.144572, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;209H\u001b[38;5;22m\u001b[48;5;252m5\u001b[15;9H" - ], - [ - 0.50187, - "\u001b[53;209H6\u001b[15;10H" - ], - [ - 0.032501, - "\u001b[53;209H7\u001b[15;11H" - ], - [ - 0.027726, - "\u001b[53;209H8\u001b[15;12H" - ], - [ - 0.031165, - "\u001b[53;209H9\u001b[15;13H" - ], - [ - 0.027591, - "\u001b[53;209H10\u001b[15;14H" - ], - [ - 0.033383, - "\u001b[53;210H1\u001b[15;15H" - ], - [ - 0.031794, - "\u001b[53;210H2\u001b[15;16H" - ], - [ - 0.029702, - "\u001b[53;210H3\u001b[15;17H" - ], - [ - 0.031021, - "\u001b[53;210H4\u001b[15;18H" - ], - [ - 0.028265, - "\u001b[53;210H5\u001b[15;19H" - ], - [ - 0.030334, - "\u001b[53;210H6\u001b[15;20H" - ], - [ - 0.033667, - "\u001b[53;210H7\u001b[15;21H" - ], - [ - 0.029757, - "\u001b[53;210H8\u001b[15;22H" - ], - [ - 0.028472, - "\u001b[53;210H9\u001b[15;23H" - ], - [ - 0.029385, - "\u001b[53;209H20\u001b[15;24H" - ], - [ - 0.030816, - "\u001b[53;210H1\u001b[15;25H" - ], - [ - 0.030044, - "\u001b[53;210H2\u001b[15;26H" - ], - [ - 0.028015, - "\u001b[53;210H3\u001b[15;27H" - ], - [ - 0.031825, - "\u001b[53;210H4\u001b[15;28H" - ], - [ - 0.029947, - "\u001b[53;210H5\u001b[15;29H" - ], - [ - 0.027564, - "\u001b[53;210H6\u001b[15;30H" - ], - [ - 0.03206, - "\u001b[53;210H7\u001b[15;31H" - ], - [ - 0.032422, - "\u001b[53;210H8\u001b[15;32H" - ], - [ - 0.030352, - "\u001b[53;210H9\u001b[15;33H" - ], - [ - 0.030131, - "\u001b[53;209H30\u001b[15;34H" - ], - [ - 0.031966, - "\u001b[53;210H1\u001b[15;35H" - ], - [ - 0.028785, - "\u001b[53;210H2\u001b[15;36H" - ], - [ - 0.030353, - "\u001b[53;210H3\u001b[15;37H" - ], - [ - 0.0284, - "\u001b[53;210H4\u001b[15;38H" - ], - [ - 0.032354, - "\u001b[53;210H5\u001b[15;39H" - ], - [ - 0.031925, - "\u001b[53;210H6\u001b[15;40H" - ], - [ - 0.027402, - "\u001b[53;210H7\u001b[15;41H" - ], - [ - 0.028353, - "\u001b[53;210H8\u001b[15;42H" - ], - [ - 0.033363, - "\u001b[53;210H9\u001b[15;43H" - ], - [ - 0.030492, - "\u001b[53;209H40\u001b[15;44H" - ], - [ - 0.029102, - "\u001b[53;210H1\u001b[15;45H" - ], - [ - 0.028712, - "\u001b[53;210H2\u001b[15;46H" - ], - [ - 0.031899, - "\u001b[53;210H3\u001b[15;47H" - ], - [ - 0.028425, - "\u001b[53;210H4\u001b[15;48H" - ], - [ - 0.031288, - "\u001b[53;210H5\u001b[15;49H" - ], - [ - 0.030582, - "\u001b[53;210H6\u001b[15;50H" - ], - [ - 0.030863, - "\u001b[53;210H7\u001b[15;51H" - ], - [ - 0.029856, - "\u001b[53;210H8\u001b[15;52H" - ], - [ - 0.03183, - "\u001b[53;210H9\u001b[15;53H" - ], - [ - 0.027287, - "\u001b[53;209H50\u001b[15;54H" - ], - [ - 0.030571, - "\u001b[53;210H1\u001b[15;55H" - ], - [ - 0.027721, - "\u001b[53;210H2\u001b[15;56H" - ], - [ - 0.034507, - "\u001b[53;210H3\u001b[15;57H" - ], - [ - 0.026321, - "\u001b[53;210H4\u001b[15;58H" - ], - [ - 0.033001, - "\u001b[53;210H5\u001b[15;59H" - ], - [ - 0.03007, - "\u001b[53;210H6\u001b[15;60H" - ], - [ - 0.031121, - "\u001b[53;210H7\u001b[15;61H" - ], - [ - 0.028288, - "\u001b[53;210H8\u001b[15;62H" - ], - [ - 0.032991, - "\u001b[53;210H9\u001b[15;63H" - ], - [ - 0.030687, - "\u001b[53;209H60\u001b[15;64H" - ], - [ - 0.031504, - "\u001b[53;210H1\u001b[15;65H" - ], - [ - 0.03011, - "\u001b[53;210H2\u001b[15;66H" - ], - [ - 0.029317, - "\u001b[53;210H3\u001b[15;67H" - ], - [ - 0.034275, - "\u001b[53;210H4\u001b[15;68H" - ], - [ - 0.59524, - "\u001b[53;210H5\u001b[15;69H" - ], - [ - 0.497159, - "\u001b[53;210H6\u001b[15;70H" - ], - [ - 0.033269, - "\u001b[53;210H7\u001b[15;71H" - ], - [ - 0.030617, - "\u001b[53;210H8\u001b[15;72H" - ], - [ - 0.028412, - "\u001b[53;210H9\u001b[15;73H" - ], - [ - 0.030755, - "\u001b[53;209H70\u001b[15;74H" - ], - [ - 0.031182, - "\u001b[53;210H1\u001b[15;75H" - ], - [ - 0.030179, - "\u001b[53;210H2\u001b[15;76H" - ], - [ - 0.469875, - "\u001b[53;210H3\u001b[15;77H" - ], - [ - 0.197619, - "\u001b[53;210H4\u001b[15;78H" - ], - [ - 0.324244, - "\u001b[53;210H3\u001b[15;77H" - ], - [ - 0.746299, - "\u001b[53;210H4\u001b[15;78H" - ], - [ - 0.177222, - "\u001b[53;210H5\u001b[15;79H" - ], - [ - 0.16103, - "\u001b[53;210H6\u001b[15;80H" - ], - [ - 0.178906, - "\u001b[53;210H7\u001b[15;81H" - ], - [ - 0.176875, - "\u001b[53;210H8\u001b[15;82H" - ], - [ - 0.168167, - "\u001b[53;210H9\u001b[15;83H" - ], - [ - 0.945125, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[54;1H\u001b[34m--\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[31ma\u001b[m\u001b[93m\u001b[107m\b\u001b[34m INSERT\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[31mt\u001b[m\u001b[93m\u001b[107m\b\u001b[34m --\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[31mO\u001b[m\u001b[93m\u001b[107m\u001b[54;13H\u001b[K" - ], - [ - 0.044251, - "\u001b[53;1H\u001b[1m\u001b[38;5;23m\u001b[48;5;231m INSERT \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[m\u001b[93m\u001b[107m\u001b[53;9H\u001b[38;5;231m\u001b[48;5;31m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m\u001b[53;12H kpod-stats \u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;31m\u001b[53;25H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31mlibkpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;31mcontainer_server.go \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[m\u001b[93m\u001b[107m\u001b[53;54H\u001b[38;5;31m\u001b[48;5;24m\u001b[53;55H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;24m                                                                                                                        \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[38;5;117m\u001b[48;5;24m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;144m\u001b[48;5;31m  88%\u001b[m" - ], - [ - 5.4e-05, - "\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;24m\u001b[48;5;117m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m600\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;117m:79 \u001b[15;83H\u001b[?12l\u001b[?25h" - ], - [ - 0.275463, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[96mthat match the given filter function\u001b[m\u001b[93m\u001b[107m\u001b[15;118H\u001b[K\u001b[53;53H\u001b[1m\u001b[38;5;220m\u001b[48;5;31m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[53;57H \u001b[m\u001b[93m\u001b[107m\u001b[152C\u001b[38;5;22m\u001b[48;5;117m8\u001b[15;82H\u001b[?12l\u001b[?25h" - ], - [ - 0.268424, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[15;82H\u001b[K\u001b[16;5Hthat match the given filter function\u001b[16;41H\u001b[K\u001b[17;5H\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) \u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107m(filters ...\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m(*oci.Container) \u001b[33mbool\u001b[m\u001b[93m\u001b[107m) ([]*oci.Container, \u001b[33merror\u001b[m\u001b[93m\u001b[107m) {\u001b[18;9Hcontainers := c.listContainers()\u001b[19;9H\u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(filters) == \u001b[36m0\u001b[m\u001b[93m\u001b[107m {\u001b[19;32H\u001b[K\u001b[20;9H \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m containers, \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\u001b[21;9H}\u001b[21;10H\u001b[K\u001b[22;9HfilteredContainers := \u001b[32mmake\u001b[m\u001b[93m\u001b[107m([]*oci.Container, \u001b[36m0\u001b[m\u001b[93m\u001b[107m, \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(containers))\u001b[23;9H\u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, container := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m containers {\u001b[24;13H\u001b[32mfor\u001b[m\u001b[93m\u001b[107m _,\u001b[7C := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m filters {\u001b[25;17H\u001b[32mif\u001b[m\u001b[93m\u001b[107m filter(container) {\u001b[25;40H\u001b[K\u001b[26;17H filteredContainers = \u001b[32mappend\u001b[m\u001b[93m\u001b[107m(filteredContainers, container)\u001b[27;13H }\u001b[28;9H }\u001b[29;9H}\u001b[29;10H\u001b[K\u001b[30;5H \u001b[32mreturn" - ], - [ - 5.2e-05, - "\u001b[m\u001b[93m\u001b[107m filteredContainers, \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\u001b[31;5H}\u001b[32;5H\u001b[K\u001b[33;5H\u001b[96m// AddSandbox adds a sandbox to the sandbox state store\u001b[m\u001b[93m\u001b[107m\u001b[33;60H\u001b[K\u001b[34;5H\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) AddSandbox(sb *sandbox.Sandbox) {\u001b[35;9Hc.stateLock.Lock()\u001b[35;27H\u001b[K\u001b[36;9H\u001b[32mdefer\u001b[m\u001b[93m\u001b[107m c.stateLock.Unlock()\u001b[36;36H\u001b[K\u001b[37;5H c.state.sandboxes[sb.ID()] = sb\u001b[38;5H}\u001b[39;5H\u001b[K\u001b[40;5H\u001b[96m// GetSandbox returns a sandbox by its ID\u001b[m\u001b[93m\u001b[107m\u001b[40;46H\u001b[K\u001b[41;5H\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) GetSandbox(id \u001b[33mstring\u001b[m\u001b[93m\u001b[107m) *sandbox.Sandbox {\u001b[42;9Hc.stateLock.Lock()\u001b[42;27H\u001b[K\u001b[43;9H\u001b[32mdefe\u001b[m\u001b[93m\u001b[107m\u001b[1C c.stateLock.Unlock()\u001b[43;35H\u001b[K\u001b[44;5H \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m c.state.sandboxes[id]\u001b[45;5H}\u001b[46;5H\u001b[K\u001b[47;5H\u001b[96m// GetSandboxContainer returns a sandbox's infra container\u001b[m\u001b[93m\u001b[107m\u001b[47;63H\u001b[K\u001b[48;5H\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (c *ContainerServer) GetSandboxContainer(id \u001b[33mstring\u001b[m\u001b[93m\u001b[107m) *oci.Container {\u001b[49;9Hc.stateLock.Lock()" - ], - [ - 0.005517, - "\u001b[49;27H\u001b[K\u001b[50;9H\u001b[32mdefer\u001b[m\u001b[93m\u001b[107m c.stateLock.Unlock()\u001b[50;35H\u001b[K\u001b[51;9Hsb, ok := c.state.sandboxes[id]\u001b[52;9H\u001b[32mif\u001b[m\u001b[93m\u001b[107m !ok {\u001b[52;17H\u001b[K\u001b[53;207H\u001b[1m\u001b[38;5;24m\u001b[48;5;117m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:1 \u001b[16;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.829866, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m/that match the given filter function\u001b[53;209H\u001b[38;5;22m\u001b[48;5;117m2\u001b[16;6H\u001b[?12l\u001b[?25h" - ], - [ - 0.150054, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[96m//that match the given filter function\u001b[m\u001b[93m\u001b[107m\u001b[53;209H\u001b[38;5;22m\u001b[48;5;117m3\u001b[16;7H\u001b[?12l\u001b[?25h" - ], - [ - 0.080887, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[96m that match the given filter function\u001b[m\u001b[93m\u001b[107m\u001b[53;209H\u001b[38;5;22m\u001b[48;5;117m4\u001b[16;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.385382, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[54;1H\u001b[K" - ], - [ - 0.014625, - "\u001b[53;1H\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;31m\u001b[m\u001b[93m\u001b[107m\u001b[53;9H\u001b[38;5;148m\u001b[48;5;240m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[53;12H kpod-stats \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[53;25H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mlibkpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mcontainer_server.go\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[m\u001b[93m\u001b[107m\u001b[53;56H\u001b[38;5;240m\u001b[48;5;236m\u001b[53;57H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                      \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[38;5;247m\u001b[48;5;236m g" - ], - [ - 2.4e-05, - "o\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  88%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m601\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;252m:3  \u001b[16;7H\u001b[?12l\u001b[?25h" - ], - [ - 0.26471, - "\u001b[?25l\u001b[54;1H\u001b[m\u001b[93m\u001b[107m:\u001b[?2004h" - ], - [ - 7e-05, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.184441, - "w" - ], - [ - 9.6e-05, - "\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.039251, - "q\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.104195, - "\r" - ], - [ - 5.6e-05, - "\u001b[?25l" - ], - [ - 0.00018, - "\u001b[?2004l" - ], - [ - 0.022882, - "\"libkpod/container_server.go\"" - ], - [ - 0.006415, - " 685L, 20535C written" - ], - [ - 0.012113, - "\r\r\r\n\u001b[39;49m\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.002425, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.019671, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats* \u001b[39m \u001b[33m17s\u001b[39m\r\n" - ], - [ - 0.002255, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000189, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 8.5e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000208, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 0.000116, - "\u001b[?1h\u001b=" - ], - [ - 0.000101, - "\u001b[?2004h" - ], - [ - 11.704887, - "\u001b[?2004l\r\r\n" - ], - [ - 0.000651, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.025893, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats* \u001b[39m \u001b[33m29s\u001b[39m\r\n" - ], - [ - 0.001689, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 7.2e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.3e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 7.5e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[31m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 0.000263, - "\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.604019, - ":" - ], - [ - 0.41525, - "\b \b" - ], - [ - 24.413263, - "v" - ], - [ - 0.123238, - "\bvi" - ], - [ - 0.096701, - " " - ], - [ - 0.103904, - "s" - ], - [ - 0.040009, - "e" - ], - [ - 0.056539, - "r" - ], - [ - 0.196367, - "ver\u001b[1m/\u001b[0m" - ], - [ - 0.158628, - "\b\u001b[0m/c" - ], - [ - 0.107515, - "o" - ], - [ - 0.072945, - "n" - ], - [ - 0.122494, - "\u0007" - ], - [ - 0.000289, - "\r\r\n" - ], - [ - 0.000116, - "\u001b[0mconfig.go container_create.go container_execsync.go container_portforward.go container_start.go container_stop.go \r\n\u001b[Jcontainer_attach.go \u001b[Jcontainer_exec.go \u001b[Jcontainer_list.go \u001b[Jcontainer_remove.go \u001b[Jcontainer_status.go \u001b[Jcontainer_updateruntimeconfig.go\u001b[J\u001b[A\u001b[A\u001b[0m\u001b[27m\u001b[24m\u001b[39m\r\u001b[2Cvi server/con\u001b[K\u001b[195C\u001b[90m\u001b[39m\u001b[39m\u001b[195D" - ], - [ - 0.477329, - "t" - ], - [ - 0.11174, - "a" - ], - [ - 0.211254, - "\r\r\n\u001b[J\u001b[A\u001b[17Ciner_" - ], - [ - 0.68805, - "l" - ], - [ - 0.124985, - "i" - ], - [ - 0.138637, - "st.go\u001b[1m \u001b[0m" - ], - [ - 0.548537, - "\b\u001b[0m \b" - ], - [ - 0.000176, - "\u001b[?1l\u001b>\u001b[?2004l\r\r\n\u001b[J" - ], - [ - 0.003295, - "\u001b]2;vim server/container_list.go\u0007\u001b]1;vi\u0007" - ], - [ - 0.135184, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000569, - "\u001b[1;54r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[54;1H\"server/container_list.go\"" - ], - [ - 0.000171, - " 108L, 2729C" - ], - [ - 0.008118, - "\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[1;1H\u001b[>c" - ], - [ - 0.001699, - "\u001b[1;1H\u001b[96m\u001b[47m 1 \u001b[m\u001b[93m\u001b[107m\u001b[32mpackage\u001b[m\u001b[93m\u001b[107m server\r\n\u001b[96m\u001b[47m 2 \r\n 3 \u001b[m\u001b[93m\u001b[107m\u001b[32mimport\u001b[m\u001b[93m\u001b[107m (\r\n\u001b[96m\u001b[47m 4 \u001b[m\u001b[93m\u001b[107m \u001b[36m\"github.com/kubernetes-incubator/cri-o/oci\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 5 \u001b[m\u001b[93m\u001b[107m \u001b[36m\"github.com/sirupsen/logrus\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 6 \u001b[m\u001b[93m\u001b[107m \u001b[36m\"golang.org/x/net/context\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 7 \u001b[m\u001b[93m\u001b[107m \u001b[36m\"k8s.io/apimachinery/pkg/fields\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 8 \u001b[m\u001b[93m\u001b[107m pb \u001b[36m\"k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 9 \u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 10 \r\n 11 \u001b[m\u001b[93m\u001b[107m\u001b[96m// filterContainer returns whether passed container matches filtering criteria\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 12 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m filterContainer(c *pb.Container, filter *pb.ContainerFilter) \u001b[33mbool\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 13 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m filter != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 14 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[" - ], - [ - 1.6e-05, - "107m filter.State != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 15 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m c.State != filter.State.State {\r\n\u001b[96m\u001b[47m 16 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mfalse\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 17 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[96m\u001b[47m 18 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 19 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m filter.LabelSelector != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 20 \u001b[m\u001b[93m\u001b[107m\u001b[12Csel := fields.SelectorFromSet(filter.LabelSelector)\r\n\u001b[96m\u001b[47m 21 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m !sel.Matches(fields.Set(c.Labels)) {\r\n\u001b[96m\u001b[47m 22 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mfalse\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 23 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[96m\u001b[47m 24 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 25 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 26 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mtrue\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 27 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 28 \r\n 29 \u001b[m\u001b[93m\u001b[107m\u001b[96m// \u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107m\u001b[96m lists all containers by filters." - ], - [ - 0.033458, - "\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 30 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (s *Server) \u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107m(ctx context.Context, req *pb.\u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107mRequest) (*pb.\u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107mResponse, \u001b[33merror\u001b[m\u001b[93m\u001b[107m) {\r\n\u001b[96m\u001b[47m 31 \u001b[m\u001b[93m\u001b[107m logrus.Debugf(\u001b[36m\"\u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107m\u001b[36mRequest \u001b[m\u001b[93m\u001b[107m\u001b[31m%+v\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, req)\r\n\u001b[96m\u001b[47m 32 \u001b[m\u001b[93m\u001b[107m \u001b[32mvar\u001b[m\u001b[93m\u001b[107m ctrs []*pb.Container\r\n\u001b[96m\u001b[47m 33 \u001b[m\u001b[93m\u001b[107m filter := req.Filter\r\n\u001b[96m\u001b[47m 34 \u001b[m\u001b[93m\u001b[107m ctrList := s.ContainerServer.\u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107m()\r\n\u001b[96m\u001b[47m 35 \r\n 36 \u001b[m\u001b[93m\u001b[107m \u001b[96m// Filter using container id and pod id first.\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 37 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m filter != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 38 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m filter.Id != \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 39 \u001b[m\u001b[93m\u001b[107m\u001b[12Cid, err := s.CtrI" - ], - [ - 3.2e-05, - "DIndex().Get(filter.Id)\r\n\u001b[96m\u001b[47m 40 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 41 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mnil\u001b[m\u001b[93m\u001b[107m, err\r\n\u001b[96m\u001b[47m 42 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[96m\u001b[47m 43 \u001b[m\u001b[93m\u001b[107m\u001b[12Cc := s.ContainerServer.GetContainer(id)\r\n\u001b[96m\u001b[47m 44 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m c != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 45 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mif\u001b[m\u001b[93m\u001b[107m filter.PodSandboxId != \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 46 \u001b[m\u001b[93m\u001b[107m\u001b[20C\u001b[32mif\u001b[m\u001b[93m\u001b[107m c.Sandbox() == filter.PodSandboxId {\r\n\u001b[96m\u001b[47m 47 \u001b[m\u001b[93m\u001b[107m\u001b[24CctrList = []*oci.Container{c}\r\n\u001b[96m\u001b[47m 48 \u001b[m\u001b[93m\u001b[107m\u001b[20C} \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 49 \u001b[m\u001b[93m\u001b[107m\u001b[24CctrList = []*oci.Container{}\r\n\u001b[96m\u001b[47m 50 \u001b[m\u001b[93m\u001b[107m\u001b[20C}\r\n\u001b[96m\u001b[47m 51 \r\n 52 \u001b[m\u001b[93m\u001b[107m\u001b[16C} \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m" - ], - [ - 0.009216, - "\u001b[53;12H kpod-stats \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[53;25H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mserver/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mcontainer_list.go \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[53;52H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                           \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m   1%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m  1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1  \u001b[1;5H\u001b[?12l\u001b" - ], - [ - 2e-05, - "[?25h\u001bP+q436f\u001b\\\u001bP+q6b75\u001b\\\u001bP+q6b64\u001b\\\u001bP+q6b72\u001b\\\u001bP+q6b6c\u001b\\\u001bP+q2332\u001b\\\u001bP+q2334\u001b\\\u001bP+q2569\u001b\\\u001bP+q2a37\u001b\\\u001bP+q6b31\u001b\\" - ], - [ - 0.527381, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m   2%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[2;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.495163, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m   3%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[3;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.025763, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m   4%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:4\u001b[4;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.025962, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m   5%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[5;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.035885, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m   6%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[6;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.03159, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[7;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.027692, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m   7%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[8;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.030541, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[3;12H\u001b[1m\u001b[31m\u001b[106m(\u001b[9;5H)\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m   8%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m9\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[9;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.031712, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[3;12H(\u001b[9;5H)\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m   9%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m10\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[10;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.031153, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  10%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[11;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.026845, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  11%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[12;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.030542, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  12%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:4\u001b[13;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.032914, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  13%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[14;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.032993, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  14%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[15;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.026882, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  15%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[16;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.032257, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  16%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[17;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.031522, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  17%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[18;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.288102, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  18%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m9\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[19;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.496038, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  19%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m20\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[20;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.024987, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[21;8H" - ], - [ - 0.034118, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  20%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[22;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.029418, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  21%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[23;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.031726, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  22%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[24;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.026646, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  23%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[25;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.038387, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  24%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[26;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.02789, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;76H\u001b[1m\u001b[31m\u001b[106m{\u001b[27;5H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;70m\u001b[48;5;240m  25%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[27;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.027891, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;76H{\u001b[27;5H}\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  26%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[28;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.025499, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  27%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m9\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[29;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.032868, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  28%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m30\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[30;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.034132, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  29%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:4\u001b[31;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.734937, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  28%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m0\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[30;5H" - ], - [ - 0.244963, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  29%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:4\u001b[31;8H" - ], - [ - 1.147152, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  30%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[32;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.507676, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  31%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[33;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.021376, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[34;8H" - ], - [ - 0.52311, - "\u001b[53;209H5\u001b[34;9H" - ], - [ - 0.501301, - "\u001b[53;209H6\u001b[34;10H" - ], - [ - 0.026664, - "\u001b[53;209H7\u001b[34;11H" - ], - [ - 0.029294, - "\u001b[53;209H8\u001b[34;12H" - ], - [ - 0.029763, - "\u001b[53;209H9\u001b[34;13H" - ], - [ - 0.029935, - "\u001b[53;209H10\u001b[34;14H" - ], - [ - 0.030764, - "\u001b[53;210H1\u001b[34;15H" - ], - [ - 0.028666, - "\u001b[53;210H2\u001b[34;16H" - ], - [ - 0.031328, - "\u001b[53;210H3\u001b[34;17H" - ], - [ - 0.031664, - "\u001b[53;210H4\u001b[34;18H" - ], - [ - 0.027038, - "\u001b[53;210H5\u001b[34;19H" - ], - [ - 0.033849, - "\u001b[53;210H6\u001b[34;20H" - ], - [ - 0.028053, - "\u001b[53;210H7\u001b[34;21H" - ], - [ - 0.031407, - "\u001b[53;210H8\u001b[34;22H" - ], - [ - 0.029045, - "\u001b[53;210H9\u001b[34;23H" - ], - [ - 0.031094, - "\u001b[53;209H20\u001b[34;24H" - ], - [ - 0.030714, - "\u001b[53;210H1\u001b[34;25H" - ], - [ - 0.030843, - "\u001b[53;210H2\u001b[34;26H" - ], - [ - 0.029335, - "\u001b[53;210H3\u001b[34;27H" - ], - [ - 0.03625, - "\u001b[53;210H4\u001b[34;28H" - ], - [ - 0.02287, - "\u001b[53;210H5\u001b[34;29H" - ], - [ - 0.031991, - "\u001b[53;210H6\u001b[34;30H" - ], - [ - 0.026648, - "\u001b[53;210H7\u001b[34;31H" - ], - [ - 0.032914, - "\u001b[53;210H8\u001b[34;32H" - ], - [ - 0.030082, - "\u001b[53;210H9\u001b[34;33H" - ], - [ - 0.03302, - "\u001b[53;209H30\u001b[34;34H" - ], - [ - 0.029673, - "\u001b[53;210H1\u001b[34;35H" - ], - [ - 0.029969, - "\u001b[53;210H2\u001b[34;36H" - ], - [ - 0.030958, - "\u001b[53;210H3\u001b[34;37H" - ], - [ - 0.032073, - "\u001b[53;210H4\u001b[34;38H" - ], - [ - 0.029162, - "\u001b[53;210H5\u001b[34;39H" - ], - [ - 0.030591, - "\u001b[53;210H6\u001b[34;40H" - ], - [ - 0.02993, - "\u001b[53;210H7\u001b[34;41H" - ], - [ - 0.032535, - "\u001b[53;210H8\u001b[34;42H" - ], - [ - 0.029006, - "\u001b[53;210H9\u001b[34;43H" - ], - [ - 0.031122, - "\u001b[53;209H40\u001b[34;44H" - ], - [ - 0.027152, - "\u001b[53;210H1\u001b[34;45H" - ], - [ - 0.030614, - "\u001b[53;210H2\u001b[34;46H" - ], - [ - 0.030056, - "\u001b[53;210H3\u001b[34;47H" - ], - [ - 0.031423, - "\u001b[53;210H4\u001b[34;48H" - ], - [ - 0.03265, - "\u001b[53;210H5\u001b[34;49H" - ], - [ - 0.026915, - "\u001b[53;210H6\u001b[34;50H" - ], - [ - 0.032032, - "\u001b[53;210H7\u001b[34;51H" - ], - [ - 0.22945, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[1m\u001b[31m\u001b[106m()\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;252m8\u001b[34;52H\u001b[?12l\u001b[?25h" - ], - [ - 0.516968, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[54;1H\u001b[34m-- INSERT --\u001b[m\u001b[93m\u001b[107m\u001b[54;13H\u001b[K" - ], - [ - 0.039223, - "\u001b[53;1H\u001b[1m\u001b[38;5;23m\u001b[48;5;231m INSERT \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[m\u001b[93m\u001b[107m\u001b[53;9H\u001b[38;5;231m\u001b[48;5;31m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m\u001b[53;12H kpod-stats \u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;31m\u001b[53;25H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31mserver/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;31mcontainer_list.go \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[m\u001b[93m\u001b[107m\u001b[53;51H\u001b[38;5;31m\u001b[48;5;24m\u001b[53;52H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;24m                                                                                                                           \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[38;5;117m\u001b[48;5;24m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;149m\u001b[48;5;31m  31%" - ], - [ - 2.7e-05, - "\u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;24m\u001b[48;5;117m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m 34\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;117m:48 \u001b[34;52H\u001b[?12l\u001b[?25h" - ], - [ - 1.114697, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[31m\u001b[106mj(\u001b[m\u001b[93m\u001b[107m)\u001b[53;50H\u001b[1m\u001b[38;5;220m\u001b[48;5;31m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[53;54H \u001b[m\u001b[93m\u001b[107m\u001b[155C\u001b[38;5;22m\u001b[48;5;117m9\u001b[m\u001b[93m\u001b[107m\u001b[34;52Hj\u001b[1m\u001b[31m\u001b[106m()\b\b\u001b[?12l\u001b[?25h" - ], - [ - 0.616695, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b(\u001b[1m\u001b[31m\u001b[106m)\u001b[m\u001b[93m\u001b[107m\u001b[34;54H\u001b[K\u001b[34;52H\u001b[1m\u001b[31m\u001b[106m(\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[34;52H\u001b[?12l\u001b[?25h" - ], - [ - 0.440354, - "\u001b[?25l\u001b[53;210H9\u001b[34;53H\u001b[?12l\u001b[?25h" - ], - [ - 8.949745, - "\u001b[?25l\u001b[53;210H8\u001b[34;52H\u001b[?12l\u001b[?25h" - ], - [ - 0.496969, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m()\u001b[53;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[34;51H\u001b[?12l\u001b[?25h" - ], - [ - 0.032523, - "\u001b[53;210H6\u001b[34;50H" - ], - [ - 0.025768, - "\u001b[53;210H5\u001b[34;49H" - ], - [ - 0.032765, - "\u001b[53;210H4\u001b[34;48H" - ], - [ - 0.031191, - "\u001b[53;210H3\u001b[34;47H" - ], - [ - 0.030756, - "\u001b[53;210H2\u001b[34;46H" - ], - [ - 0.029399, - "\u001b[53;210H1\u001b[34;45H" - ], - [ - 0.338294, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;149m\u001b[48;5;31m  32%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;24m\u001b[48;5;117m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:1 \u001b[35;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.473917, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;149m\u001b[48;5;31m  31%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;24m\u001b[48;5;117m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:41\u001b[34;45H" - ], - [ - 113.574346, - "\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[1;1H\u001b[96m\u001b[47m 2 \r\n 3 \u001b[m\u001b[93m\u001b[107m\u001b[32mimport\u001b[m\u001b[93m\u001b[107m (\r\n\u001b[96m\u001b[47m 4 \u001b[m\u001b[93m\u001b[107m \u001b[36m\"github.com/kubernetes-incubator/cri-o/oci\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 5 \u001b[m\u001b[93m\u001b[107m \u001b[36m\"github.com/sirupsen/logrus\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 6 \u001b[m\u001b[93m\u001b[107m \u001b[36m\"golang.org/x/net/context\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 7 \u001b[m\u001b[93m\u001b[107m \u001b[36m\"k8s.io/apimachinery/pkg/fields\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 8 \u001b[m\u001b[93m\u001b[107m pb \u001b[36m\"k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 9 \u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 10 \r\n 11 \u001b[m\u001b[93m\u001b[107m\u001b[96m// filterContainer returns whether passed container matches filtering criteria\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 12 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m filterContainer(c *pb.Container, filter *pb.ContainerFilter) \u001b[33mbool\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 13 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m filter != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 14 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m filter.State != \u001b[36m" - ], - [ - 2.7e-05, - "nil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 15 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m c.State != filter.State.State {\r\n\u001b[96m\u001b[47m 16 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mfalse\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 17 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[96m\u001b[47m 18 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 19 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m filter.LabelSelector != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 20 \u001b[m\u001b[93m\u001b[107m\u001b[12Csel := fields.SelectorFromSet(filter.LabelSelector)\r\n\u001b[96m\u001b[47m 21 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m !sel.Matches(fields.Set(c.Labels)) {\r\n\u001b[96m\u001b[47m 22 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mfalse\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 23 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[96m\u001b[47m 24 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 25 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 26 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mtrue\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 27 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 28 \r\n 29 \u001b[m\u001b[93m\u001b[107m\u001b[96m// \u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107m\u001b[96m lists all containers by filters.\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m" - ], - [ - 0.005724, - "\u001b[47m 30 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (s *Server) \u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107m(ctx context.Context, req *pb.\u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107mRequest) (*pb.\u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107mResponse, \u001b[33merror\u001b[m\u001b[93m\u001b[107m) {\r\n\u001b[96m\u001b[47m 31 \u001b[m\u001b[93m\u001b[107m logrus.Debugf(\u001b[36m\"\u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107m\u001b[36mRequest \u001b[m\u001b[93m\u001b[107m\u001b[31m%+v\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, req)\r\n\u001b[96m\u001b[47m 32 \u001b[m\u001b[93m\u001b[107m \u001b[32mvar\u001b[m\u001b[93m\u001b[107m ctrs []*pb.Container\r\n\u001b[96m\u001b[47m 33 \u001b[m\u001b[93m\u001b[107m filter := req.Filter\r\n\u001b[96m\u001b[47m 34 \u001b[m\u001b[93m\u001b[107m ctrList := s.ContainerServer.\u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107m()\r\n\u001b[96m\u001b[47m 35 \r\n 36 \u001b[m\u001b[93m\u001b[107m \u001b[96m// Filter using container id and pod id first.\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 37 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m filter != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 38 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m filter.Id != \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 39 \u001b[m\u001b[93m\u001b[107m\u001b[12Cid, err := s.CtrIDIndex().Get(filter.I" - ], - [ - 3.6e-05, - "d)\r\n\u001b[96m\u001b[47m 40 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 41 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mnil\u001b[m\u001b[93m\u001b[107m, err\r\n\u001b[96m\u001b[47m 42 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[96m\u001b[47m 43 \u001b[m\u001b[93m\u001b[107m\u001b[12Cc := s.ContainerServer.GetContainer(id)\r\n\u001b[96m\u001b[47m 44 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m c != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 45 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mif\u001b[m\u001b[93m\u001b[107m filter.PodSandboxId != \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 46 \u001b[m\u001b[93m\u001b[107m\u001b[20C\u001b[32mif\u001b[m\u001b[93m\u001b[107m c.Sandbox() == filter.PodSandboxId {\r\n\u001b[96m\u001b[47m 47 \u001b[m\u001b[93m\u001b[107m\u001b[24CctrList = []*oci.Container{c}\r\n\u001b[96m\u001b[47m 48 \u001b[m\u001b[93m\u001b[107m\u001b[20C} \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 49 \u001b[m\u001b[93m\u001b[107m\u001b[24CctrList = []*oci.Container{}\r\n\u001b[96m\u001b[47m 50 \u001b[m\u001b[93m\u001b[107m\u001b[20C}\r\n\u001b[96m\u001b[47m 51 \u001b[m\u001b[93m\u001b[107m\r\n\u001b[1m\u001b[38;5;23m\u001b[48;5;231m INSERT \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;31m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m\u001b[51;12H kpod-stats \u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;31m" - ], - [ - 1.9e-05, - "\u001b[51;25H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31mserver/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;31mcontainer_list.go\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;31m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[51;54H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;24m                                                                                                                         \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;182H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;190H\u001b[38;5;117m\u001b[48;5;24m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;149m\u001b[48;5;31m  31%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;24m\u001b[48;5;117m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m 34\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:41 \u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[34m-- INSERT --\u001b[33;45H\u001b[?12l\u001b[?2" - ], - [ - 1.4e-05, - "5h" - ], - [ - 0.903658, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[33;38HListCon:tainers()\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[33;46H\u001b[?12l\u001b[?25h" - ], - [ - 0.265128, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mqtainers()\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[33;47H\u001b[?12l\u001b[?25h" - ], - [ - 0.194087, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[33;47H\u001b[K\u001b[34;9Htainers()\u001b[35;9H\u001b[K\u001b[36;9H\u001b[96m// Filter using container id and pod id first.\u001b[m\u001b[93m\u001b[107m\u001b[37;9H\u001b[32mif\u001b[m\u001b[93m\u001b[107m filter != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\u001b[37;27H\u001b[K\u001b[38;13H\u001b[32mif\u001b[m\u001b[93m\u001b[107m filter.Id != \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m {\u001b[38;33H\u001b[K\u001b[39;17Hid, err := s.CtrIDIndex().Get(filter.Id)\u001b[40;17H\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\u001b[40;33H\u001b[K\u001b[41;17H \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mnil\u001b[m\u001b[93m\u001b[107m, err\u001b[42;17H}\u001b[42;19H\u001b[K\u001b[43;17Hc := s.ContainerServer.GetContainer(id)\u001b[44;17H\u001b[32mif\u001b[m\u001b[93m\u001b[107m c != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\u001b[44;30H\u001b[K\u001b[45;21H\u001b[32mif\u001b[m\u001b[93m\u001b[107m filter.PodSandboxId != \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m {\u001b[45;51H\u001b[K\u001b[46;25H\u001b[32mif\u001b[m\u001b[93m\u001b[107m c.Sandbox() == filter.PodSandboxId {\u001b[47;25H ctrList = []*oci.Container{c}\u001b[48;25H} \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\u001b[48;33H\u001b[K\u001b[49;25H ctrList = []*oci.Container{}\u001b[50;25H}\u001b[51;195H\u001b[38;5;149m\u001b[48;5;31m  32%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;24m\u001b[48;5;117m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:5 \u001b[34;9H\u001b[?12l" - ], - [ - 2.1e-05, - "\u001b[?25h" - ], - [ - 0.588871, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[K" - ], - [ - 0.015698, - "\u001b[51;1H\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;31m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H kpod-stats \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;25H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mserver/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mcontainer_list.go\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[m\u001b[93m\u001b[107m\u001b[51;53H\u001b[38;5;240m\u001b[48;5;236m\u001b[51;54H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                         \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;190H\u001b[38;5;247m\u001b[48;5;236m" - ], - [ - 4.7e-05, - " go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  32%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 35\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;252m:4  \u001b[34;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.392274, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H1 line less; before #2 2 seconds ago" - ], - [ - 0.004898, - "\u001b[33;38H\u001b[7m\u001b[33mListContainers\u001b[m\u001b[93m\u001b[107m()\u001b[34;9H\u001b[K\u001b[35;9H\u001b[96m// Filter using container id and pod id first.\u001b[m\u001b[93m\u001b[107m\u001b[36;9H\u001b[32mif\u001b[m\u001b[93m\u001b[107m filter != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\u001b[36;27H\u001b[K\u001b[37;9H \u001b[32mif\u001b[m\u001b[93m\u001b[107m filter.Id != \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m {\u001b[38;13H id, err := s.CtrIDIndex().Get(filter.Id)\u001b[39;17H\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\u001b[39;32H\u001b[K\u001b[40;17H \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mnil\u001b[m\u001b[93m\u001b[107m, err\u001b[41;17H}\u001b[41;21H\u001b[K\u001b[42;17Hc := s.ContainerServer.GetContainer(id)\u001b[43;17H\u001b[32mif\u001b[m\u001b[93m\u001b[107m c != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\u001b[43;30H\u001b[K\u001b[44;17H \u001b[32mif\u001b[m\u001b[93m\u001b[107m filter.PodSandboxId != \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m {\u001b[45;21H \u001b[32mif\u001b[m\u001b[93m\u001b[107m c.Sandbox() == filter.PodSandboxId {\u001b[46;25H ctrList = []*oci.Container{c}\u001b[46;58H\u001b[K\u001b[47;25H} \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\u001b[47;33H\u001b[K\u001b[48;25H ctrList = []*oci.Container{}\u001b[49;25H}\u001b[49;29H\u001b[K\u001b[50;25H\u001b[K\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  31%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m" - ], - [ - 3e-05, - "\u001b[48;5;252m:41\u001b[33;45H\u001b[?12l\u001b[?25h" - ], - [ - 0.603268, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1HType :qa! and press to abandon all changes and exit Vim\u001b[?5h\u001b[?12l\u001b[?25h" - ], - [ - 0.008041, - "\u001b[?5l\u001b[33;45H" - ], - [ - 0.319799, - "\u001b[?25l\u001b[52;1H\u001b[K\u001b[52;1H:\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.127623, - "q\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.201264, - "\r\u001b[?25l\u001b[7m\u001b[31mE37: No write since last change (add ! to override)\u001b[?2004h" - ], - [ - 0.008793, - "\u001b[33;45H\u001b[?12l\u001b[?25h" - ], - [ - 0.638602, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[K\u001b[52;1H:\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.175644, - "q" - ], - [ - 7.5e-05, - "\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.256365, - "!\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.232366, - "\r" - ], - [ - 0.014901, - "\u001b[?25l\u001b[?2004l\u001b[52;1H\u001b[K\u001b[52;1H\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.00252, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.024247, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats* \u001b[39m \u001b[33m139s\u001b[39m\r\n" - ], - [ - 0.00148, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.00016, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 6.8e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000192, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 0.000106, - "\u001b[?1h\u001b=" - ], - [ - 5e-05, - "\u001b[?2004h" - ], - [ - 0.340214, - "m" - ], - [ - 0.09551, - "\bma" - ], - [ - 0.120447, - "k" - ], - [ - 0.087296, - "e" - ], - [ - 0.071368, - " " - ], - [ - 0.089098, - "k" - ], - [ - 0.1039, - "p" - ], - [ - 0.071636, - "o" - ], - [ - 0.087901, - "d" - ], - [ - 0.136844, - "\u001b[?1l\u001b>" - ], - [ - 0.000113, - "\u001b[?2004l\r\r\n" - ], - [ - 0.012133, - "\u001b]2;make kpod\u0007\u001b]1;make\u0007" - ], - [ - 8.491971, - "go build -ldflags '-X main.gitCommit=1fd05c35 -X main.buildInfo=1502973722' -tags \"selinux seccomp \" -o kpod github.com/kubernetes-incubator/cri-o/cmd/kpod\r\n" - ], - [ - 6.307507, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.020575, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats* \u001b[39m \u001b[33m15s\u001b[39m\r\n" - ], - [ - 0.001077, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000118, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.6e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 9.3e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.5e-05, - "\u001b[?1h\u001b=" - ], - [ - 3e-05, - "\u001b[?2004h" - ], - [ - 146.677024, - "c" - ], - [ - 0.396395, - "\b \b" - ], - [ - 0.096947, - "g" - ], - [ - 0.119491, - "\bgi" - ], - [ - 0.065073, - "t" - ], - [ - 0.119305, - " " - ], - [ - 0.064229, - "s" - ], - [ - 0.367919, - "t" - ], - [ - 0.167391, - "a" - ], - [ - 0.088279, - "t" - ], - [ - 0.136684, - "u" - ], - [ - 0.111874, - "s" - ], - [ - 0.167915, - "\u001b[?1l\u001b>" - ], - [ - 0.000214, - "\u001b[?2004l\r\r\n" - ], - [ - 0.003677, - "\u001b]2;git status\u0007\u001b]1;git\u0007" - ], - [ - 0.018619, - "On branch kpod-stats\r\n" - ], - [ - 3.2e-05, - "Your branch is up-to-date with 'origin/kpod-stats'.\r\nChanges not staged for commit:\r\n (use \"git add ...\" to update what will be committed)\r\n (use \"git checkout -- ...\" to discard changes in working directory)\r\n\r\n\t\u001b[31mmodified: libkpod/container_server.go\u001b[m\r\n" - ], - [ - 1.3e-05, - "\t\u001b[31mmodified: server/container_list.go\u001b[m\r\n\r\nno changes added to commit (use \"git add\" and/or \"git commit -a\")\r\n" - ], - [ - 0.000564, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.024004, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats* \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.003289, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000146, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000144, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000112, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 0.000113, - "\u001b[?1h\u001b=" - ], - [ - 4.6e-05, - "\u001b[?2004h" - ], - [ - 0.157568, - "g" - ], - [ - 0.150725, - "\bgi" - ], - [ - 0.088758, - "t" - ], - [ - 0.191523, - " " - ], - [ - 0.703489, - "\b" - ], - [ - 0.499958, - "\b \b" - ], - [ - 0.031738, - "\b\bg \b" - ], - [ - 0.030624, - "\b \b" - ], - [ - 0.302685, - "m" - ], - [ - 0.143773, - "\bma" - ], - [ - 0.132383, - "k" - ], - [ - 0.13996, - "e" - ], - [ - 0.031734, - " " - ], - [ - 0.100103, - "k" - ], - [ - 0.13186, - "p" - ], - [ - 0.09625, - "o" - ], - [ - 0.135131, - "d" - ], - [ - 1.224544, - "\u001b[?1l\u001b>" - ], - [ - 0.0002, - "\u001b[?2004l" - ], - [ - 0.000282, - "\r\r\n" - ], - [ - 0.003861, - "\u001b]2;make kpod\u0007\u001b]1;make\u0007" - ], - [ - 7.767101, - "make: 'kpod' is up to date.\r\n" - ], - [ - 0.000406, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.024134, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats* \u001b[39m \u001b[33m8s\u001b[39m\r\n" - ], - [ - 0.001383, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000122, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.6e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.00011, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 7.5e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.4e-05, - "\u001b[?2004h" - ], - [ - 11.517218, - " " - ], - [ - 4.345309, - "\b\b\b\b\b\b" - ], - [ - 0.359649, - "s" - ], - [ - 0.087548, - "\bsu" - ], - [ - 0.097684, - "d" - ], - [ - 0.086354, - "o" - ], - [ - 0.096813, - " " - ], - [ - 0.09598, - "m" - ], - [ - 0.095724, - "a" - ], - [ - 0.112142, - "k" - ], - [ - 0.095568, - "e" - ], - [ - 0.079489, - " " - ], - [ - 0.121036, - "c" - ], - [ - 0.06424, - "l" - ], - [ - 0.160013, - "e" - ], - [ - 0.078814, - "a" - ], - [ - 0.088993, - "n" - ], - [ - 0.198984, - "\u001b[?1l\u001b>" - ], - [ - 4.7e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.002964, - "\u001b]2;sudo make clean\u0007\u001b]1;make\u0007" - ], - [ - 0.970251, - "[sudo] password for ryan: " - ], - [ - 1.949557, - "\r\n" - ], - [ - 3.091473, - "rm -f \"/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/_output/.gopathok\"\r\n" - ], - [ - 0.001076, - "rm -rf _output\r\n" - ], - [ - 0.000525, - "rm -f docs/*.1 docs/*.5 docs/*.8\r\n" - ], - [ - 0.001472, - "rm -fr test/testdata/redis-image\r\n" - ], - [ - 0.000452, - "find . -name \\*~ -delete\r\n" - ], - [ - 0.015501, - "find . -name \\#\\* -delete\r\n" - ], - [ - 0.01696, - "rm -f crioctl crio kpod\r\n" - ], - [ - 0.025533, - "make -C conmon clean\r\n" - ], - [ - 0.002621, - "make[1]: Entering directory '/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/conmon'\r\nrm -f conmon.o cmsg.o conmon\r\n" - ], - [ - 0.001734, - "make[1]: Leaving directory '/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/conmon'\r\nmake -C pause clean\r\n" - ], - [ - 0.003556, - "make[1]: Entering directory '/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/pause'\r\nrm -f pause.o pause\r\n" - ], - [ - 0.000983, - "make[1]: Leaving directory '/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/pause'\r\n" - ], - [ - 0.000224, - "rm -f test/bin2img/bin2img\r\n" - ], - [ - 0.002959, - "rm -f test/copyimg/copyimg\r\n" - ], - [ - 0.004744, - "rm -f test/checkseccomp/checkseccomp\r\n" - ], - [ - 0.002614, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.024046, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats* \u001b[39m \u001b[33m6s\u001b[39m\r\n" - ], - [ - 0.00245, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000119, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.6e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 8e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m " - ], - [ - 2.4e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 4.6e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.6e-05, - "\u001b[?2004h" - ], - [ - 2.73537, - "g" - ], - [ - 0.063396, - "\bgi" - ], - [ - 0.128086, - "t" - ], - [ - 0.095837, - " " - ], - [ - 0.144554, - "c" - ], - [ - 0.083684, - "o" - ], - [ - 0.083361, - "m" - ], - [ - 0.165205, - "m" - ], - [ - 0.159495, - "i" - ], - [ - 0.108285, - "t" - ], - [ - 0.098609, - " " - ], - [ - 0.145308, - "-" - ], - [ - 0.099243, - "a" - ], - [ - 0.10427, - " " - ], - [ - 0.117066, - "-" - ], - [ - 0.131033, - "-" - ], - [ - 0.095675, - "a" - ], - [ - 0.112554, - "m" - ], - [ - 0.075379, - "e" - ], - [ - 0.108006, - "n" - ], - [ - 0.111673, - "d" - ], - [ - 0.121036, - "\u001b[?1l\u001b>" - ], - [ - 0.000282, - "\u001b[?2004l\r\r\n" - ], - [ - 0.006629, - "\u001b]2;git commit -a --amend\u0007\u001b]1;git\u0007" - ], - [ - 0.033575, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000393, - "\u001b[1;52r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[H\u001b[2J\u001b[?25l\u001b[52;1H\"~/Development/Go/src/github.com/kubernetes-incubator/cri-o/.git/COMMIT_EDITMSG\"" - ], - [ - 8.2e-05, - " 107L, 6228C" - ], - [ - 0.000173, - "\u001b[1;1Hadd kpod stats function\r\n\r\nSigned-off-by: Ryan Cole \r\n\r\n# Please enter the commit message for your changes. Lines starting\r\n# with '#' will be ignored, and an empty message aborts the commit.\r\n#\r\n# Date: Tue Jul 25 09:56:23 2017 -0400\r\n#\r\n# On branch kpod-stats\r\n# Your branch is up-to-date with 'origin/kpod-stats'.\r\n#\r\n# Changes to be committed:\r\n#\u001b[7Cmodified: README.md\r\n#\u001b[7Cmodified: cmd/kpod/images.go\r\n#\u001b[7Cmodified: cmd/kpod/main.go\r\n#\u001b[7Cnew file: cmd/kpod/stats.go\r\n#\u001b[7Cmodified: completions/bash/kpod\r\n#\u001b[7Cnew file: docs/kpod-stats.1.md\r\n#\u001b[7Cmodified: libkpod/container_server.go\r\n#\u001b[7Cmodified: libkpod/image/image.go\r\n#\u001b[7Cnew file: libkpod/stats.go\r\n#\u001b[7Cmodified: server/container_list.go\r\n#\u001b[7Cnew file: test/kpod_stats.bats\r\n#\u001b[7Cmodified: vendor.conf\r\n#\u001b[7Cdeleted: vendor/github.com/Microsoft/hcsshim/mksyscall_windows.go\r\n#\u001b[7Cnew file: vendor/github.com/buger/goterm/README.md\r\n#\u001b[7Cnew file: vendor/github.com/buger/goterm/box.go\r\n#\u001b[7C" - ], - [ - 1.9e-05, - "new file: vendor/github.com/buger/goterm/plot.go\r\n#\u001b[7Cnew file: vendor/github.com/buger/goterm/table.go\r\n#\u001b[7Cnew file: vendor/github.com/buger/goterm/terminal.go\r\n#\u001b[7Cnew file: vendor/github.com/buger/goterm/terminal_nosysioctl.go\r\n#\u001b[7Cnew file: vendor/github.com/buger/goterm/terminal_sysioctl.go\r\n#\u001b[7Cdeleted: vendor/github.com/containers/storage/pkg/archive/example_changes.go\r\n#\u001b[7Cnew file: vendor/github.com/mrunalp/fileutils/LICENSE\r\n#\u001b[7Cnew file: vendor/github.com/mrunalp/fileutils/README.md\r\n#\u001b[7Cnew file: vendor/github.com/mrunalp/fileutils/fileutils.go\r\n#\u001b[7Cnew file: vendor/github.com/mrunalp/fileutils/idtools.go\r\n#\u001b[7Cmodified: vendor/github.com/opencontainers/runc/libcontainer/container_linux.go\r\n#\u001b[7Cmodified: vendor/github.com/opencontainers/runc/libcontainer/criurpc/criurpc.pb.go\r\n#\u001b[7Cmodified: vendor/github.com/opencontainers/runc/libcontainer/criurpc/criurpc.proto\r\n#\u001b[7Cmodified: vendor/github.com/opencontainers/runc/libcontainer/init_linux.go\r\n#" - ], - [ - 1.7e-05, - "\u001b[7Cmodified: vendor/github.com/opencontainers/runc/libcontainer/state_linux.go\r\n#\u001b[7Cnew file: vendor/github.com/vishvananda/netlink/LICENSE\r\n#\u001b[7Cnew file: vendor/github.com/vishvananda/netlink/README.md\r\n#\u001b[7Cnew file: vendor/github.com/vishvananda/netlink/addr.go\r\n#\u001b[7Cnew file: vendor/github.com/vishvananda/netlink/addr_linux.go\r\n#\u001b[7Cnew file: vendor/github.com/vishvananda/netlink/bpf_linux.go\r\n#\u001b[7Cnew file: vendor/github.com/vishvananda/netlink/bridge_linux.go\r\n#\u001b[7Cnew file: vendor/github.com/vishvananda/netlink/class.go\r\n#\u001b[7Cnew file: vendor/github.com/vishvananda/netlink/class_linux.go\u001b[1;1H\u001b[?12l\u001b[?25h" - ], - [ - 0.318498, - "\u001b[?25l\u001b[52;1H\u001b[K\u001b[52;1H:\u001b[?2004h" - ], - [ - 0.000184, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.194901, - "w" - ], - [ - 0.048866, - "q" - ], - [ - 0.079626, - "\r" - ], - [ - 6.7e-05, - "\u001b[?25l\u001b[?2004l" - ], - [ - 0.000842, - "\".git/COMMIT_EDITMSG\"" - ], - [ - 0.018643, - " 107L, 6228C written" - ], - [ - 0.000239, - "\r\r\r\n\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.012196, - "[kpod-stats 51fe5a83] add kpod stats function\r\n Date: Tue Jul 25 09:56:23 2017 -0400\r\n" - ], - [ - 0.005388, - " 93 files changed, 15781 insertions(+), 1249 deletions(-)\r\n create mode 100644 cmd/kpod/stats.go\r\n create mode 100644 docs/kpod-stats.1.md\r\n create mode 100644 libkpod/stats.go\r\n create mode 100644 test/kpod_stats.bats\r\n delete mode 100644 vendor/github.com/Microsoft/hcsshim/mksyscall_windows.go\r\n create mode 100644 vendor/github.com/buger/goterm/README.md\r\n create mode 100644 vendor/github.com/buger/goterm/box.go\r\n create mode 100644 vendor/github.com/buger/goterm/plot.go\r\n create mode 100644 vendor/github.com/buger/goterm/table.go\r\n create mode 100644 vendor/github.com/buger/goterm/terminal.go\r\n create mode 100644 vendor/github.com/buger/goterm/terminal_nosysioctl.go\r\n create mode 100644 vendor/github.com/buger/goterm/terminal_sysioctl.go\r\n delete mode 100644 vendor/github.com/containers/storage/pkg/archive/example_changes.go\r\n create mode 100644 vendor/github.com/mrunalp/fileutils/LICENSE\r\n create mode 100644 vendor/github.com/mrunalp/fileutils/README.md\r\n create mode 100644 vendor/github.com/mrunalp/fileu" - ], - [ - 3.1e-05, - "tils/fileutils.go\r\n create mode 100644 vendor/github.com/mrunalp/fileutils/idtools.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/LICENSE\r\n create mode 100644 vendor/github.com/vishvananda/netlink/README.md\r\n create mode 100644 vendor/github.com/vishvananda/netlink/addr.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/addr_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/bpf_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/bridge_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/class.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/class_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/conntrack_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/conntrack_unspecified.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/filter.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/filter_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/genetlin" - ], - [ - 1.9e-05, - "k_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/genetlink_unspecified.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/gtp_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/handle_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/handle_unspecified.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/link.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/link_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/link_tuntap_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/neigh.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/neigh_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/netlink.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/netlink_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/netlink_unspecified.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/nl/addr_linux.go\r\n create mode 100644 vendor/github." - ], - [ - 1.7e-05, - "com/vishvananda/netlink/nl/bridge_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/nl/conntrack_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/nl/genetlink_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/nl/link_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/nl/mpls_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/nl/nl_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/nl/nl_unspecified.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/nl/route_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/nl/syscall.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/nl/tc_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/nl/xfrm_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/nl/xfrm_monitor_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/nl/xfrm_policy_linux.go\r\n" - ], - [ - 1.6e-05, - " create mode 100644 vendor/github.com/vishvananda/netlink/nl/xfrm_state_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/order.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/protinfo.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/protinfo_linux.go\r\n" - ], - [ - 1.9e-05, - " create mode 100644 vendor/github.com/vishvananda/netlink/qdisc.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/qdisc_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/route.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/route_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/route_unspecified.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/rule.go\r\n" - ], - [ - 1.5e-05, - " create mode 100644 vendor/github.com/vishvananda/netlink/rule_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/socket.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/socket_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/xfrm.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/xfrm_monitor_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/xfrm_policy.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/xfrm_policy_linux.go\r\n" - ], - [ - 1.3e-05, - " create mode 100644 vendor/github.com/vishvananda/netlink/xfrm_state.go\r\n create mode 100644 vendor/github.com/vishvananda/netlink/xfrm_state_linux.go\r\n create mode 100644 vendor/github.com/vishvananda/netns/LICENSE\r\n create mode 100644 vendor/github.com/vishvananda/netns/README.md\r\n create mode 100644 vendor/github.com/vishvananda/netns/netns.go\r\n create mode 100644 vendor/github.com/vishvananda/netns/netns_linux.go" - ], - [ - 1.3e-05, - "\r\n create mode 100644 vendor/github.com/vishvananda/netns/netns_unspecified.go\r\n" - ], - [ - 0.00046, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.023729, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001064, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 7.6e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 1.9e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 7.5e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.4e-05, - "\u001b[?1h\u001b=" - ], - [ - 1.7e-05, - "\u001b[?2004h" - ], - [ - 0.093363, - "g" - ], - [ - 0.116444, - "\bgi" - ], - [ - 0.09112, - "t" - ], - [ - 0.140489, - " " - ], - [ - 0.295456, - "\b" - ], - [ - 0.148558, - "\b \b" - ], - [ - 0.151794, - "\b\bg \b" - ], - [ - 0.143687, - "\b \b" - ], - [ - 0.1717, - "m" - ], - [ - 0.113167, - "\bma" - ], - [ - 0.071539, - "k" - ], - [ - 0.151864, - "e" - ], - [ - 0.068538, - " " - ], - [ - 0.051546, - "k" - ], - [ - 0.136138, - "p" - ], - [ - 0.087532, - "o" - ], - [ - 0.136608, - "d" - ], - [ - 0.107472, - "\u001b[?1l\u001b>" - ], - [ - 0.000279, - "\u001b[?2004l\r\r\n" - ], - [ - 0.003576, - "\u001b]2;make kpod\u0007\u001b]1;make\u0007" - ], - [ - 7.566279, - "go build -ldflags '-X main.gitCommit=51fe5a83 -X main.buildInfo=1502973930' -tags \"selinux seccomp \" -o kpod github.com/kubernetes-incubator/cri-o/cmd/kpod\r\n" - ], - [ - 5.528396, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.025808, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats \u001b[39m \u001b[33m13s\u001b[39m\r\n" - ], - [ - 0.002211, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 64.301943, - "g" - ], - [ - 0.072172, - "\bgi" - ], - [ - 0.104359, - "t" - ], - [ - 0.079837, - " " - ], - [ - 0.080135, - "p" - ], - [ - 0.055427, - "u" - ], - [ - 0.119911, - "s" - ], - [ - 0.104008, - "h" - ], - [ - 0.111595, - " " - ], - [ - 0.112396, - "-" - ], - [ - 0.112504, - "f" - ], - [ - 0.143522, - " " - ], - [ - 0.191507, - "o" - ], - [ - 0.120131, - "r" - ], - [ - 0.096379, - "i" - ], - [ - 0.127918, - "g" - ], - [ - 0.063437, - "i" - ], - [ - 0.056858, - "n" - ], - [ - 0.104321, - " " - ], - [ - 0.095939, - "k" - ], - [ - 0.192254, - "pod-" - ], - [ - 0.303579, - "s" - ], - [ - 0.088135, - "t" - ], - [ - 0.179185, - "a" - ], - [ - 0.580721, - "t" - ], - [ - 0.182035, - "s\u001b[1m \u001b[0m" - ], - [ - 0.393146, - "\b\u001b[0m \b" - ], - [ - 0.000296, - "\u001b[?1l\u001b>\u001b[?2004l\r\r\n" - ], - [ - 0.003558, - "\u001b]2;git push -f origin kpod-stats\u0007\u001b]1;git\u0007" - ], - [ - 0.735535, - "Counting objects: 120, done.\r\n" - ], - [ - 0.001739, - "Delta compression using up to 4 threads.\r\n" - ], - [ - 0.000228, - "Compressing objects: 0% (1/105) \r" - ], - [ - 0.000124, - "Compressing objects: 1% (2/105) \rCompressing objects: 2% (3/105) \r" - ], - [ - 4.3e-05, - "Compressing objects: 3% (4/105) \rCompressing objects: 4% (5/105) \rCompressing objects: 5% (6/105) \rCompressing objects: 6% (7/105) \r" - ], - [ - 2e-05, - "Compressing objects: 7% (8/105) \rCompressing objects: 8% (9/105) \rCompressing objects: 9% (10/105) \r" - ], - [ - 4.8e-05, - "Compressing objects: 10% (11/105) \rCompressing objects: 11% (12/105) \rCompressing objects: 12% (13/105) \r" - ], - [ - 0.000331, - "Compressing objects: 13% (14/105) \r" - ], - [ - 4.3e-05, - "Compressing objects: 14% (15/105) \r" - ], - [ - 4e-05, - "Compressing objects: 15% (16/105) \rCompressing objects: 16% (17/105) \r" - ], - [ - 1.5e-05, - "Compressing objects: 17% (18/105) \r" - ], - [ - 5.3e-05, - "Compressing objects: 18% (19/105) \rCompressing objects: 19% (20/105) \r" - ], - [ - 2e-05, - "Compressing objects: 20% (21/105) \r" - ], - [ - 0.000375, - "Compressing objects: 21% (23/105) \r" - ], - [ - 2e-05, - "Compressing objects: 22% (24/105) \r" - ], - [ - 4.8e-05, - "Compressing objects: 23% (25/105) \r" - ], - [ - 3.7e-05, - "Compressing objects: 24% (26/105) \r" - ], - [ - 3.7e-05, - "Compressing objects: 25% (27/105) \r" - ], - [ - 7.7e-05, - "Compressing objects: 26% (28/105) \r" - ], - [ - 1.7e-05, - "Compressing objects: 27% (29/105) \rCompressing objects: 28% (30/105) \r" - ], - [ - 3.7e-05, - "Compressing objects: 29% (31/105) \r" - ], - [ - 7.1e-05, - "Compressing objects: 30% (32/105) \rCompressing objects: 31% (33/105) \rCompressing objects: 32% (34/105) \r" - ], - [ - 4.1e-05, - "Compressing objects: 33% (35/105) \rCompressing objects: 34% (36/105) \r" - ], - [ - 6.3e-05, - "Compressing objects: 35% (37/105) \r" - ], - [ - 0.00012, - "Compressing objects: 36% (38/105) \r" - ], - [ - 0.000158, - "Compressing objects: 37% (39/105) \r" - ], - [ - 1.2e-05, - "Compressing objects: 38% (40/105) \r" - ], - [ - 0.000264, - "Compressing objects: 39% (41/105) \r" - ], - [ - 3.5e-05, - "Compressing objects: 40% (42/105) \r" - ], - [ - 0.000137, - "Compressing objects: 41% (44/105) \r" - ], - [ - 8.9e-05, - "Compressing objects: 42% (45/105) \r" - ], - [ - 8.5e-05, - "Compressing objects: 43% (46/105) \r" - ], - [ - 1e-05, - "Compressing objects: 44% (47/105) \r" - ], - [ - 6.8e-05, - "Compressing objects: 45% (48/105) \r" - ], - [ - 1.4e-05, - "Compressing objects: 46% (49/105) \r" - ], - [ - 0.000117, - "Compressing objects: 47% (50/105) \r" - ], - [ - 3.1e-05, - "Compressing objects: 48% (51/105) \r" - ], - [ - 3.1e-05, - "Compressing objects: 49% (52/105) \rCompressing objects: 50% (53/105) \r" - ], - [ - 4e-05, - "Compressing objects: 51% (54/105) \r" - ], - [ - 6.3e-05, - "Compressing objects: 52% (55/105) \r" - ], - [ - 9.2e-05, - "Compressing objects: 53% (56/105) \r" - ], - [ - 4.3e-05, - "Compressing objects: 54% (57/105) \r" - ], - [ - 7.9e-05, - "Compressing objects: 55% (58/105) \r" - ], - [ - 4.1e-05, - "Compressing objects: 56% (59/105) \r" - ], - [ - 6.3e-05, - "Compressing objects: 57% (60/105) \r" - ], - [ - 5e-05, - "Compressing objects: 58% (61/105) \r" - ], - [ - 0.000414, - "Compressing objects: 59% (62/105) \r" - ], - [ - 7.8e-05, - "Compressing objects: 60% (63/105) \r" - ], - [ - 5.6e-05, - "Compressing objects: 61% (65/105) \r" - ], - [ - 0.000113, - "Compressing objects: 62% (66/105) \r" - ], - [ - 9.4e-05, - "Compressing objects: 63% (67/105) \r" - ], - [ - 0.000101, - "Compressing objects: 64% (68/105) \r" - ], - [ - 8.3e-05, - "Compressing objects: 65% (69/105) \r" - ], - [ - 3.4e-05, - "Compressing objects: 66% (70/105) \r" - ], - [ - 9.2e-05, - "Compressing objects: 67% (71/105) \r" - ], - [ - 0.000266, - "Compressing objects: 68% (72/105) \r" - ], - [ - 2.2e-05, - "Compressing objects: 69% (73/105) \rCompressing objects: 70% (74/105) \rCompressing objects: 71% (75/105) \r" - ], - [ - 4.2e-05, - "Compressing objects: 72% (76/105) \r" - ], - [ - 3e-05, - "Compressing objects: 73% (77/105) \rCompressing objects: 74% (78/105) \r" - ], - [ - 0.000171, - "Compressing objects: 75% (79/105) \r" - ], - [ - 6.2e-05, - "Compressing objects: 76% (80/105) \r" - ], - [ - 2.4e-05, - "Compressing objects: 77% (81/105) \r" - ], - [ - 6.7e-05, - "Compressing objects: 78% (82/105) \rCompressing objects: 79% (83/105) \r" - ], - [ - 0.000233, - "Compressing objects: 80% (84/105) \r" - ], - [ - 0.00016, - "Compressing objects: 81% (86/105) \r" - ], - [ - 0.000135, - "Compressing objects: 82% (87/105) \r" - ], - [ - 0.000101, - "Compressing objects: 83% (88/105) \rCompressing objects: 84% (89/105) \r" - ], - [ - 2.1e-05, - "Compressing objects: 85% (90/105) \r" - ], - [ - 1.3e-05, - "Compressing objects: 86% (91/105) \r" - ], - [ - 0.000128, - "Compressing objects: 87% (92/105) \r" - ], - [ - 3.5e-05, - "Compressing objects: 88% (93/105) \r" - ], - [ - 0.000118, - "Compressing objects: 89% (94/105) \r" - ], - [ - 5.7e-05, - "Compressing objects: 90% (95/105) \rCompressing objects: 91% (96/105) \r" - ], - [ - 0.000429, - "Compressing objects: 92% (97/105) \rCompressing objects: 93% (98/105) \rCompressing objects: 94% (99/105) \r" - ], - [ - 1.5e-05, - "Compressing objects: 95% (100/105) \rCompressing objects: 96% (101/105) \rCompressing objects: 97% (102/105) \r" - ], - [ - 0.000944, - "Compressing objects: 98% (103/105) \r" - ], - [ - 0.000609, - "Compressing objects: 99% (104/105) \r" - ], - [ - 0.000117, - "Compressing objects: 100% (105/105) \r" - ], - [ - 7.5e-05, - "Compressing objects: 100% (105/105), done.\r\n" - ], - [ - 0.000147, - "Writing objects: 0% (1/120) \r" - ], - [ - 4.5e-05, - "Writing objects: 1% (2/120) \r" - ], - [ - 2.2e-05, - "Writing objects: 2% (3/120) \r" - ], - [ - 1.6e-05, - "Writing objects: 3% (4/120) \r" - ], - [ - 2.2e-05, - "Writing objects: 4% (5/120) \r" - ], - [ - 1.2e-05, - "Writing objects: 5% (6/120) \r" - ], - [ - 0.000344, - "Writing objects: 6% (8/120) \r" - ], - [ - 0.000106, - "Writing objects: 7% (9/120) \r" - ], - [ - 3.4e-05, - "Writing objects: 8% (10/120) \r" - ], - [ - 3.1e-05, - "Writing objects: 9% (11/120) \r" - ], - [ - 2.3e-05, - "Writing objects: 10% (12/120) \r" - ], - [ - 3.4e-05, - "Writing objects: 11% (14/120) \r" - ], - [ - 0.000662, - "Writing objects: 12% (15/120) \r" - ], - [ - 3.1e-05, - "Writing objects: 13% (16/120) \rWriting objects: 14% (17/120) \r" - ], - [ - 0.000202, - "Writing objects: 15% (18/120) \r" - ], - [ - 4.8e-05, - "Writing objects: 16% (20/120) \r" - ], - [ - 1.7e-05, - "Writing objects: 17% (21/120) \rWriting objects: 18% (22/120) \r" - ], - [ - 2.2e-05, - "Writing objects: 19% (23/120) \r" - ], - [ - 1.1e-05, - "Writing objects: 20% (24/120) \r" - ], - [ - 4.3e-05, - "Writing objects: 21% (26/120) \rWriting objects: 22% (27/120) \r" - ], - [ - 1.1e-05, - "Writing objects: 23% (28/120) \rWriting objects: 24% (29/120) \r" - ], - [ - 7.8e-05, - "Writing objects: 25% (30/120) \r" - ], - [ - 2.3e-05, - "Writing objects: 26% (32/120) \rWriting objects: 27% (33/120) \rWriting objects: 28% (34/120) \rWriting objects: 29% (35/120) \rWriting objects: 30% (36/120) \rWriting objects: 31% (38/120) \rWriting objects: 32% (39/120) \rWriting objects: 33% (40/120) \rWriting objects: 34% (41/120) \r" - ], - [ - 3.9e-05, - "Writing objects: 35% (42/120) \r" - ], - [ - 7.2e-05, - "Writing objects: 36% (44/120) \rWriting objects: 37% (45/120) \r" - ], - [ - 1.9e-05, - "Writing objects: 38% (46/120) \r" - ], - [ - 1.8e-05, - "Writing objects: 39% (47/120) \r" - ], - [ - 2.5e-05, - "Writing objects: 40% (48/120) \rWriting objects: 41% (50/120) \rWriting objects: 42% (51/120) \rWriting objects: 43% (52/120) \r" - ], - [ - 1e-05, - "Writing objects: 44% (53/120) \rWriting objects: 45% (54/120) \r" - ], - [ - 7.1e-05, - "Writing objects: 46% (56/120) \r" - ], - [ - 0.000534, - "Writing objects: 47% (57/120) \r" - ], - [ - 9.6e-05, - "Writing objects: 48% (58/120) \r" - ], - [ - 0.000193, - "Writing objects: 49% (59/120) \rWriting objects: 50% (60/120) \rWriting objects: 51% (62/120) \r" - ], - [ - 1.3e-05, - "Writing objects: 52% (63/120) \rWriting objects: 53% (64/120) \r" - ], - [ - 6e-05, - "Writing objects: 54% (65/120) \rWriting objects: 55% (66/120) \rWriting objects: 56% (68/120) \r" - ], - [ - 7e-05, - "Writing objects: 57% (69/120) \rWriting objects: 58% (70/120) \rWriting objects: 59% (71/120) \rWriting objects: 60% (72/120) \r" - ], - [ - 0.000191, - "Writing objects: 61% (74/120) \r" - ], - [ - 6.2e-05, - "Writing objects: 62% (75/120) \rWriting objects: 63% (76/120) \rWriting objects: 64% (77/120) \r" - ], - [ - 0.00023, - "Writing objects: 65% (78/120) \r" - ], - [ - 8.5e-05, - "Writing objects: 66% (80/120) \rWriting objects: 67% (81/120) \rWriting objects: 68% (82/120) \r" - ], - [ - 0.000103, - "Writing objects: 69% (83/120) \rWriting objects: 70% (84/120) \r" - ], - [ - 0.000194, - "Writing objects: 71% (86/120) \rWriting objects: 72% (87/120) \rWriting objects: 73% (88/120) \r" - ], - [ - 0.000514, - "Writing objects: 74% (89/120) \rWriting objects: 75% (90/120) \r" - ], - [ - 2.9e-05, - "Writing objects: 76% (92/120) \r" - ], - [ - 0.000844, - "Writing objects: 77% (93/120) \r" - ], - [ - 3.5e-05, - "Writing objects: 78% (94/120) \rWriting objects: 79% (95/120) \rWriting objects: 80% (96/120) \r" - ], - [ - 9.9e-05, - "Writing objects: 81% (98/120) \r" - ], - [ - 0.000116, - "Writing objects: 82% (99/120) \r" - ], - [ - 4.6e-05, - "Writing objects: 83% (100/120) \r" - ], - [ - 0.000493, - "Writing objects: 84% (101/120) \rWriting objects: 85% (102/120) \rWriting objects: 86% (104/120) \rWriting objects: 87% (105/120) \rWriting objects: 88% (106/120) \rWriting objects: 89% (107/120) \rWriting objects: 90% (108/120) \r" - ], - [ - 0.020626, - "Writing objects: 91% (110/120) \rWriting objects: 92% (111/120) \rWriting objects: 93% (112/120) \rWriting objects: 94% (113/120) \rWriting objects: 95% (114/120) \rWriting objects: 96% (116/120) \rWriting objects: 97% (117/120) \rWriting objects: 98% (118/120) \rWriting objects: 99% (119/120) \rWriting objects: 100% (120/120) \r" - ], - [ - 0.000125, - "Writing objects: 100% (120/120), 116.02 KiB | 4.30 MiB/s, done.\r\nTotal 120 (delta 31), reused 78 (delta 11)\r\n" - ], - [ - 0.145058, - "remote: Resolving deltas: 0% (0/31) \u001b[K\r" - ], - [ - 0.038865, - "remote: Resolving deltas: 3% (1/31) \u001b[K\rremote: Resolving deltas: 6% (2/31) \u001b[K\rremote: Resolving deltas: 9% (3/31) \u001b[K\r" - ], - [ - 0.000148, - "remote: Resolving deltas: 12% (4/31) \u001b[K\rremote: Resolving deltas: 16% (5/31) \u001b[K\r" - ], - [ - 4.8e-05, - "remote: Resolving deltas: 19% (6/31) \u001b[K\rremote: Resolving deltas: 22% (7/31) \u001b[K\rremote: Resolving deltas: 25% (8/31) \u001b[K\r" - ], - [ - 9.1e-05, - "remote: Resolving deltas: 29% (9/31) \u001b[K\rremote: Resolving deltas: 32% (10/31) \u001b[K\rremote: Resolving deltas: 35% (11/31) \u001b[K\rremote: Resolving deltas: 38% (12/31) \u001b[K\rremote: Resolving deltas: 41% (13/31) \u001b[K\rremote: Resolving deltas: 45% (14/31) \u001b[K\r" - ], - [ - 3.7e-05, - "remote: Resolving deltas: 48% (15/31) \u001b[K\rremote: Resolving deltas: 51% (16/31) \u001b[K\rremote: Resolving deltas: 54% (17/31) \u001b[K\rremote: Resolving deltas: 58% (18/31) \u001b[K\rremote: Resolving deltas: 61% (19/31) \u001b[K\rremote: Resolving deltas: 64% (20/31) \u001b[K\rremote: Resolving deltas: 67% (21/31) \u001b[K\r" - ], - [ - 0.000346, - "remote: Resolving deltas: 70% (22/31) \u001b[K\rremote: Resolving deltas: 74% (23/31) \u001b[K\rremote: Resolving deltas: 77% (24/31) \u001b[K\rremote: Resolving deltas: 80% (25/31) \u001b[K\rremote: Resolving deltas: 83% (26/31) \u001b[K\rremote: Resolving deltas: 87% (27/31) \u001b[K\rremote: Resolving deltas: 90% (28/31) \u001b[K\rremote: Resolving deltas: 93% (29/31) \u001b[K\rremote: Resolving deltas: 96% (30/31) \u001b[K\rremote: Resolving deltas: 100% (31/31) \u001b[K\rremote: Resolving deltas: 100% (31/31), completed with 30 local objects.\u001b[K\r\n" - ], - [ - 1.631427, - "To github.com:14rcole/cri-o\r\n + 1fd05c35...51fe5a83 kpod-stats -> kpod-stats (forced update)\r\n" - ], - [ - 0.001344, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.027627, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001274, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 9.1e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 1.9e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000387, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D\u001b[?1h\u001b=" - ], - [ - 2.1e-05, - "\u001b[?2004h" - ], - [ - 291.306849, - "s" - ], - [ - 0.143831, - "\bsu" - ], - [ - 0.09576, - "d" - ], - [ - 0.079837, - "o" - ], - [ - 0.056313, - " " - ], - [ - 0.09608, - "d" - ], - [ - 0.071913, - "o" - ], - [ - 0.175697, - "k" - ], - [ - 0.11164, - "c" - ], - [ - 0.344681, - "\b \b" - ], - [ - 0.143002, - "\b \b" - ], - [ - 0.353439, - "c" - ], - [ - 0.087928, - "k" - ], - [ - 0.127562, - "e" - ], - [ - 0.064111, - "r" - ], - [ - 0.095364, - " " - ], - [ - 0.103965, - "p" - ], - [ - 0.153227, - "s" - ], - [ - 0.119176, - "\u001b[?1l\u001b>" - ], - [ - 0.000192, - "\u001b[?2004l\r\r\n" - ], - [ - 0.004251, - "\u001b]2;sudo docker ps\u0007\u001b]1;docker\u0007" - ], - [ - 0.951818, - "[sudo] password for ryan: " - ], - [ - 2.123737, - "\r\n" - ], - [ - 0.050254, - "CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\r\n" - ], - [ - 0.00261, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.027572, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.000953, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000219, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.6e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 6.4e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 7.4e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.9e-05, - "\u001b[?2004h" - ], - [ - 1.758608, - "s" - ], - [ - 0.079496, - "\bsu" - ], - [ - 0.160361, - "d" - ], - [ - 0.111675, - "o" - ], - [ - 0.576293, - "\b \b" - ], - [ - 0.159908, - "\b \b" - ], - [ - 0.168126, - "\b\bs \b" - ], - [ - 0.159654, - "\b \b" - ], - [ - 0.11212, - "s" - ], - [ - 0.127338, - "\bsu" - ], - [ - 0.080917, - "d" - ], - [ - 0.215883, - " " - ], - [ - 0.103841, - "o" - ], - [ - 0.256261, - "\b \b" - ], - [ - 0.136045, - "\b" - ], - [ - 0.191849, - "o" - ], - [ - 0.143304, - " " - ], - [ - 0.0082, - "d" - ], - [ - 0.096655, - "o" - ], - [ - 0.127223, - "c" - ], - [ - 0.08778, - "k" - ], - [ - 0.072448, - "e" - ], - [ - 0.064418, - "r" - ], - [ - 0.08791, - " " - ], - [ - 0.10463, - "r" - ], - [ - 0.111928, - "u" - ], - [ - 0.175632, - "n" - ], - [ - 0.127848, - " " - ], - [ - 0.401299, - "=" - ], - [ - 0.358516, - "\b \b" - ], - [ - 0.119353, - "-" - ], - [ - 0.128809, - "d" - ], - [ - 0.208134, - " " - ], - [ - 0.57505, - "r" - ], - [ - 0.13708, - "y" - ], - [ - 0.295931, - "\b \b" - ], - [ - 0.151706, - "\b \b" - ], - [ - 0.128648, - "r" - ], - [ - 0.087732, - "y" - ], - [ - 0.128014, - "a" - ], - [ - 0.223742, - "\b \b" - ], - [ - 0.143667, - "\b \b" - ], - [ - 0.151936, - "\b \b" - ], - [ - 0.688079, - "r" - ], - [ - 0.080579, - "e" - ], - [ - 0.151405, - "d" - ], - [ - 0.08859, - "i" - ], - [ - 0.127706, - "s" - ], - [ - 0.223311, - ":" - ], - [ - 0.225389, - "a" - ], - [ - 0.119256, - "l" - ], - [ - 0.167568, - "p" - ], - [ - 0.136311, - "i" - ], - [ - 0.064759, - "n" - ], - [ - 0.519447, - "e" - ], - [ - 2.207743, - "\u001b[?1l\u001b>" - ], - [ - 7.9e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.004381, - "\u001b]2;sudo docker run -d redis:alpine\u0007\u001b]1;docker\u0007" - ], - [ - 0.156868, - "7e7a6dcecb2a803420db5e51e50289160869d387d5fe002c1f968c9c5e0aff47\r\n" - ], - [ - 0.331473, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.02536, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001087, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000141, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.9e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 8.7e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 8.6e-05, - "\u001b[?1h\u001b=" - ], - [ - 0.00014, - "\u001b[?2004h" - ], - [ - 1.408725, - "s" - ], - [ - 0.072298, - "\bsu" - ], - [ - 0.120191, - "d" - ], - [ - 0.070475, - "o" - ], - [ - 0.104883, - " " - ], - [ - 0.224668, - "d" - ], - [ - 0.140195, - "o" - ], - [ - 0.083514, - "c" - ], - [ - 0.087764, - "k" - ], - [ - 0.159229, - "e" - ], - [ - 0.032016, - "r" - ], - [ - 0.145043, - " " - ], - [ - 0.079616, - "p" - ], - [ - 0.17546, - "s" - ], - [ - 0.095711, - "\u001b[?1l\u001b>" - ], - [ - 3.8e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.002462, - "\u001b]2;sudo docker ps\u0007\u001b]1;docker\u0007" - ], - [ - 0.040773, - "CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\r\n7e7a6dcecb2a " - ], - [ - 2.8e-05, - "redis:alpine \"docker-entrypoint...\" 4 seconds ago Up 3 seconds 6379/tcp angry_sammet\r\n" - ], - [ - 0.002288, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.023578, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.00174, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.00025, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 5.7e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000111, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m " - ], - [ - 2.5e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 5.5e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.7e-05, - "\u001b[?2004h" - ], - [ - 2.400936, - "s" - ], - [ - 0.152528, - "\bsu" - ], - [ - 0.11187, - "d" - ], - [ - 0.104125, - "o" - ], - [ - 0.095533, - " " - ], - [ - 0.048573, - "d" - ], - [ - 0.103791, - "o" - ], - [ - 0.280474, - "c" - ], - [ - 0.375565, - "k" - ], - [ - 0.096108, - "e" - ], - [ - 0.07174, - "r" - ], - [ - 0.143903, - " " - ], - [ - 0.088133, - "p" - ], - [ - 0.136279, - "s" - ], - [ - 0.087682, - " " - ], - [ - 0.128367, - "-" - ], - [ - 0.095693, - "-" - ], - [ - 0.199987, - "n" - ], - [ - 0.095887, - "o" - ], - [ - 0.231909, - "-" - ], - [ - 0.192349, - "t" - ], - [ - 0.144555, - "r" - ], - [ - 0.079249, - "u" - ], - [ - 0.167991, - "n" - ], - [ - 0.104447, - "c" - ], - [ - 0.103816, - "\u001b[?1l\u001b>" - ], - [ - 0.000465, - "\u001b[?2004l\r\r\n" - ], - [ - 0.004264, - "\u001b]2;sudo docker ps --no-trunc\u0007\u001b]1;docker\u0007" - ], - [ - 0.037936, - "CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\r\n7e7a6dcecb2a803420db5e51e50289160869d387d5fe002c1f968c9c5e0aff47 redis:alpine \"docker-entrypoint.sh redis-server\" 10 seconds ago Up 8 seconds 6379/tcp angry_sammet\r\n" - ], - [ - 0.003831, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.025231, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-stats \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001942, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000107, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000109, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 8.2e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.2e-05, - "\u001b[?2004h" - ], - [ - 266.219062, - "g" - ], - [ - 0.16768, - "\bgi" - ], - [ - 0.095185, - "t" - ], - [ - 0.088157, - " " - ], - [ - 0.14361, - "c" - ], - [ - 0.072124, - "h" - ], - [ - 0.080042, - "e" - ], - [ - 0.08789, - "c" - ], - [ - 0.161802, - "k" - ], - [ - 0.438173, - "o" - ], - [ - 0.122346, - "ut" - ], - [ - 0.445633, - " " - ], - [ - 0.145215, - "k" - ], - [ - 0.171124, - "pod-" - ], - [ - 0.332988, - "t" - ], - [ - 0.282934, - "est-refactor\u001b[1m \u001b[0m" - ], - [ - 5.748889, - "\b\u001b[0m \b" - ], - [ - 0.000105, - "\u001b[?1l\u001b>" - ], - [ - 0.000463, - "\u001b[?2004l\r\r\n" - ], - [ - 0.005657, - "\u001b]2;git checkout kpod-test-refactor\u0007\u001b]1;git\u0007" - ], - [ - 0.037888, - "Switched to branch 'kpod-test-refactor'\r\n" - ], - [ - 0.001679, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.035158, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-test-refactor \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.002249, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 7.2e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 7e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000272, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.4e-05, - "\u001b[?1h\u001b=" - ], - [ - 1.9e-05, - "\u001b[?2004h" - ], - [ - 49.127527, - "g" - ], - [ - 0.324522, - "\b \b" - ], - [ - 0.279967, - "v" - ], - [ - 0.192132, - "\bv " - ], - [ - 0.07975, - "t" - ], - [ - 0.07264, - "e" - ], - [ - 0.164523, - "st\u001b[1m/\u001b[0m" - ], - [ - 0.330897, - "\b\u001b[0m \b" - ], - [ - 0.136168, - "\b \b" - ], - [ - 0.152143, - "\b \b" - ], - [ - 0.500013, - "\b \b" - ], - [ - 0.030003, - "\b \b" - ], - [ - 0.029676, - "\b" - ], - [ - 0.028834, - "\b \b" - ], - [ - 0.171506, - "v" - ], - [ - 0.119953, - "\bvi" - ], - [ - 0.111174, - " " - ], - [ - 0.080497, - "t" - ], - [ - 0.064222, - "e" - ], - [ - 0.174426, - "st\u001b[1m/\u001b[0m" - ], - [ - 0.314489, - "\b\u001b[0m/k" - ], - [ - 0.079352, - "pod_" - ], - [ - 0.695495, - "p" - ], - [ - 0.0322, - "u" - ], - [ - 0.141247, - "\u0007" - ], - [ - 0.000165, - "\r\r\n" - ], - [ - 5.7e-05, - "\u001b[J\u001b[0mkpod_pull.bats \u001b[Jkpod_push.bats\u001b[J\u001b[A\u001b[0m\u001b[27m\u001b[24m\u001b[39m\r\u001b[2Cvi test/kpod_pu\u001b[K\u001b[193C\u001b[90m\u001b[39m\u001b[39m\u001b[193D" - ], - [ - 0.577866, - "s" - ], - [ - 0.192123, - "h.bats\u001b[1m \u001b[0m" - ], - [ - 2.609562, - "\b\u001b[0m \b\u001b[?1l\u001b>\u001b[?2004l\r\r\n\u001b[J" - ], - [ - 0.005239, - "\u001b]2;vim test/kpod_push.bats\u0007\u001b]1;vi\u0007" - ], - [ - 0.142495, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000713, - "\u001b[1;52r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[52;1H\"test/kpod_push.bats\"" - ], - [ - 9.6e-05, - " 87L, 2371C" - ], - [ - 0.003372, - "\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[1;1H\u001b[>c" - ], - [ - 0.000718, - "\u001b[1;1H\u001b[96m\u001b[47m 38 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 39 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 40 \u001b[m\u001b[93m\u001b[107m rm -rf /tmp/busybox\r\n\u001b[96m\u001b[47m 41 \u001b[m\u001b[93m\u001b[107m stop_crio\r\n\u001b[96m\u001b[47m 42 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 43 \r\n 44 \u001b[m\u001b[93m\u001b[107m@test \u001b[36m\"kpod push to docker archive\"\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 45 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 46 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 47 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 48 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m docker-archive:/tmp/busybox-archive:1.26\r\n\u001b[96m\u001b[47m 49 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 50 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 51 \u001b[m\u001b[93m\u001b[107m rm /tmp/busybox-archive\r\n\u001b[96m\u001b[47m 52 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPO" - ], - [ - 2.1e-05, - "D_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 53 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 54 \u001b[m\u001b[93m\u001b[107m stop_crio\r\n\u001b[96m\u001b[47m 55 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 56 \r\n 57 \u001b[m\u001b[93m\u001b[107m@test \u001b[36m\"kpod push to oci without compression\"\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 58 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 59 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 60 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 61 \u001b[m\u001b[93m\u001b[107m run mkdir /tmp/oci-busybox\r\n\u001b[96m\u001b[47m 62 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 63 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 64 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS push --disable-compression \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m oci:/tmp/oci-busybox\r\n\u001b[96m\u001b[47m 65 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 66 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n" - ], - [ - 0.033108, - "\u001b[96m\u001b[47m 67 \u001b[m\u001b[93m\u001b[107m rm -rf /tmp/oci-busybox\r\n\u001b[96m\u001b[47m 68 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 69 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 70 \u001b[m\u001b[93m\u001b[107m stop_crio\r\n\u001b[96m\u001b[47m 71 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 72 \r\n 73 \u001b[m\u001b[93m\u001b[107m@test \u001b[36m\"kpod push without signatures\"\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 74 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 75 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 76 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 77 \u001b[m\u001b[93m\u001b[107m run mkdir /tmp/busybox\r\n\u001b[96m\u001b[47m 78 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 79 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 80 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS push --remove-signatures \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m dir:/tmp/busybox\r\n\u001b[96m\u001b[47m 81 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[" - ], - [ - 3.3e-05, - "107m\r\n\u001b[96m\u001b[47m 82 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 83 \u001b[m\u001b[93m\u001b[107m rm -rf /tmp/busybox\r\n\u001b[96m\u001b[47m 84 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 85 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 86 \u001b[m\u001b[93m\u001b[107m stop_crio\r\n\u001b[96m\u001b[47m 87 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H kpod-test-refactor \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;33H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mtest/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mkpod_push.bats \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[51;55H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                      \u001b[m\u001b[93m\u001b[107m" - ], - [ - 0.010668, - "\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;180H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;188H\u001b[38;5;247m\u001b[48;5;236m conf\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;247m\u001b[48;5;240m  97%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 84\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5  \u001b[47;9H\u001b[?12l\u001b[?25h\u001bP+q436f\u001b\\\u001bP+q6b75\u001b\\\u001bP+q6b64\u001b\\\u001bP+q6b72\u001b\\\u001bP+q6b6c\u001b\\\u001bP+q2332\u001b\\\u001bP+q2334\u001b\\\u001bP+q2569\u001b\\\u001bP+q2a37\u001b\\\u001bP+q6b31\u001b\\" - ], - [ - 3.900157, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1;2H\u001b[96m\u001b[47m21\r\n 22\r\n 23\u001b[m\u001b[93m\u001b[107m\u001b[6Cun ${OCIC_BINARY} image remove busybox:test\u001b[4;2H\u001b[96m\u001b[47m24\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[1m\u001b[31m\u001b[106m[\u001b[m\u001b[93m\u001b[107m \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 \u001b[1m\u001b[31m\u001b[106m]\u001b[m\u001b[93m\u001b[107m\u001b[5;2H\u001b[96m\u001b[47m25\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[6;2H\u001b[96m\u001b[47m26\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[7;2H\u001b[96m\u001b[47m27\u001b[m\u001b[93m\u001b[107m\u001b[7;5H\u001b[K\u001b[8;2H\u001b[96m\u001b[47m28\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to directory\"\u001b[m\u001b[93m\u001b[107m {\u001b[8;37H\u001b[K\u001b[9;2H\u001b[96m\u001b[47m29\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[10;2H\u001b[96m\u001b[47m30\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[10;23H\u001b[K\u001b[11;2H\u001b[96m\u001b[47m31\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[11;28H\u001b[K\u001b[12;2H\u001b[96m\u001b[47m32\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/busybox\u001b[13;2H\u001b[96m\u001b[47m33\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[13;23H\u001b[K\u001b[14;2H\u001b[96m\u001b[47m34\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[14;28H\u001b[K\u001b[15;2H\u001b[96m\u001b[47m35\u001b[m\u001b[93m\u001b[107m\u001b[38Cpush \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b" - ], - [ - 6e-05, - "[107m dir:/tmp/busybox\u001b[16;2H\u001b[96m\u001b[47m36\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[16;23H\u001b[K\u001b[17;2H\u001b[96m\u001b[47m37\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[18;2H\u001b[96m\u001b[47m38\u001b[m\u001b[93m\u001b[107m\u001b[1C run ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[19;2H\u001b[96m\u001b[47m39\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[20;2H\u001b[96m\u001b[47m40\u001b[m\u001b[93m\u001b[107m\u001b[1C rm -rf /tmp/busybox\u001b[20;28H\u001b[K\u001b[21;2H\u001b[96m\u001b[47m41\u001b[m\u001b[93m\u001b[107m\u001b[5Cstop_crio\u001b[21;18H\u001b[K\u001b[22;2H\u001b[96m\u001b[47m42\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[22;9H\u001b[K\u001b[23;2H\u001b[96m\u001b[47m43\u001b[m\u001b[93m\u001b[107m\u001b[23;9H\u001b[K\u001b[24;2H\u001b[96m\u001b[47m44\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to docker archive\"\u001b[m\u001b[93m\u001b[107m {\u001b[25;2H\u001b[96m\u001b[47m45\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[26;2H\u001b[96m\u001b[47m46\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[26;23H\u001b[K\u001b[27;2H\u001b[96m\u001b[47m47\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[27;28H\u001b[K\u001b[28;2H\u001b[96m\u001b[47m48\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push " - ], - [ - 0.016615, - "\u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m docker-archive:/tmp/busybox-archive:1.26\u001b[29;2H\u001b[96m\u001b[47m49\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[29;23H\u001b[K\u001b[30;2H\u001b[96m\u001b[47m50\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[30;28H\u001b[K\u001b[31;2H\u001b[96m\u001b[47m51\u001b[m\u001b[93m\u001b[107m\u001b[6Cm /tmp/busybox-archive\u001b[31;32H\u001b[K\u001b[32;2H\u001b[96m\u001b[47m52\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[33;2H\u001b[96m\u001b[47m53\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[34;2H\u001b[96m\u001b[47m54\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[35;2H\u001b[96m\u001b[47m55\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[36;2H\u001b[96m\u001b[47m56\u001b[m\u001b[93m\u001b[107m\u001b[36;5H\u001b[K\u001b[37;2H\u001b[96m\u001b[47m57\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to oci without compression\"\u001b[m\u001b[93m\u001b[107m {\u001b[37;51H\u001b[K\u001b[38;2H\u001b[96m\u001b[47m58\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[39;2H\u001b[96m\u001b[47m59\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[39;23H\u001b[K\u001b[40;2H\u001b[96m\u001b[47m60\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[40;28H\u001b[K\u001b[41;2H\u001b[96m\u001b[47m61\u001b[m\u001b[93m\u001b[1" - ], - [ - 5.1e-05, - "07m\u001b[5Crun mkdir /tmp/oci-busybox\u001b[42;2H\u001b[96m\u001b[47m62\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[42;23H\u001b[K\u001b[43;2H\u001b[96m\u001b[47m63\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[43;28H\u001b[K\u001b[44;2H\u001b[96m\u001b[47m64\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push --disable-compression \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m oci:/tmp/oci-busybox\u001b[45;2H\u001b[96m\u001b[47m65\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[45;23H\u001b[K\u001b[46;2H\u001b[96m\u001b[47m66\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[47;2H\u001b[96m\u001b[47m67\u001b[m\u001b[93m\u001b[107m\u001b[6Cm -rf /tmp/oci-busybox\u001b[47;32H\u001b[K\u001b[48;2H\u001b[96m\u001b[47m68\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[49;2H\u001b[96m\u001b[47m69\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[50;2H\u001b[96m\u001b[47m70\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  28%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m24\u001b[4;9H\u001b[?12l\u001b[?25h" - ], - [ - 1.049793, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[1;28H\u001b[K\u001b[2;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[3;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[3;28H\u001b[K\u001b[4;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${OCIC_BINARY} image remove busybox:test\u001b[5;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[6;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[7;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[8;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[8;5H\u001b[K\u001b[9;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to directory\"\u001b[m\u001b[93m\u001b[107m {\u001b[9;37H\u001b[K\u001b[10;2H\u001b[96m\u001b[47m29\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[11;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[11;23H\u001b[K\u001b[12;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[12;28H\u001b[K\u001b[13;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/busybox\u001b[14;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b" - ], - [ - 0.000196, - "[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[14;23H\u001b[K\u001b[15;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[15;28H\u001b[K\u001b[16;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m dir:/tmp/busybox\u001b[17;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[17;23H\u001b[K\u001b[18;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[18;28H\u001b[K\u001b[19;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[20;2H\u001b[96m\u001b[47m39\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[21;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Crm -rf /tmp/busybox\u001b[22;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[23;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[24;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[24;5H\u001b[K\u001b[25;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to docker archive\"\u001b[m\u001b[93m\u001b[107m {\u001b[25;42H\u001b[K\u001b[26;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[27;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho " - ], - [ - 0.004649, - "\u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[27;23H\u001b[K\u001b[28;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[28;28H\u001b[K\u001b[29;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m docker-archive:/tmp/busybox-archive:1.26\u001b[30;2H\u001b[96m\u001b[47m49\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[30;23H\u001b[K\u001b[31;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[31;28H\u001b[K\u001b[32;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[6Cm /tmp/busybox-archive\u001b[32;32H\u001b[K\u001b[33;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[34;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[35;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[36;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[37;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[37;5H\u001b[K\u001b[38;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to oci without compression\"\u001b[m\u001b[93m\u001b[107m {\u001b[38;51H\u001b[K\u001b[39;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[40;2H\u001b" - ], - [ - 3e-05, - "[96m\u001b[47m59\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[40;23H\u001b[K\u001b[41;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[41;28H\u001b[K\u001b[42;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/oci-busybox\u001b[43;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[43;23H\u001b[K\u001b[44;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[44;28H\u001b[K\u001b[45;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push --disable-compression \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m oci:/tmp/oci-busybox\u001b[46;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[46;23H\u001b[K\u001b[47;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[47;28H\u001b[K\u001b[48;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[6Cm -rf /tmp/oci-busybox\u001b[48;32H\u001b[K\u001b[49;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[50;2H\u001b[96m\u001b[47m69\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  26%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m" - ], - [ - 0.002097, - "\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[4;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.206758, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1;2H\u001b[96m\u001b[47m19\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[1;23H\u001b[K\u001b[2;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[2;28H\u001b[K\u001b[3;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[4;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[1m\u001b[31m\u001b[106m[\u001b[m\u001b[93m\u001b[107m \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 \u001b[1m\u001b[31m\u001b[106m]\u001b[m\u001b[93m\u001b[107m\u001b[4;28H\u001b[K\u001b[5;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${OCIC_BINARY} image remove busybox:test\u001b[6;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[7;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[8;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[9;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[9;5H\u001b[K\u001b[10;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to directory\"\u001b[m\u001b[93m\u001b[107m {\u001b[10;37H\u001b[K\u001b[11;2H\u001b[96m\u001b[47m29\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[12;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[12;23H\u001b[K\u001b[13;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$s" - ], - [ - 5.7e-05, - "tatus\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[13;28H\u001b[K\u001b[14;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/busybox\u001b[15;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[15;23H\u001b[K\u001b[16;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[16;28H\u001b[K\u001b[17;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m dir:/tmp/busybox\u001b[18;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[18;23H\u001b[K\u001b[19;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[19;28H\u001b[K\u001b[20;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[21;2H\u001b[96m\u001b[47m39\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[22;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Crm -rf /tmp/busybox\u001b[23;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[24;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[25;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[25;5H\u001b[K\u001b[26;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to docker archive\"\u001b[m\u001b[93m\u001b[107m {\u001b[26;42H\u001b[K" - ], - [ - 0.006686, - "\u001b[27;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[28;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[28;23H\u001b[K\u001b[29;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[29;28H\u001b[K\u001b[30;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m docker-archive:/tmp/busybox-archive:1.26\u001b[31;2H\u001b[96m\u001b[47m49\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[31;23H\u001b[K\u001b[32;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[32;28H\u001b[K\u001b[33;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[6Cm /tmp/busybox-archive\u001b[33;32H\u001b[K\u001b[34;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[35;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[36;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[37;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[38;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5H\u001b[K\u001b[39;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to oci without compre" - ], - [ - 0.000129, - "ssion\"\u001b[m\u001b[93m\u001b[107m {\u001b[39;51H\u001b[K\u001b[40;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[41;2H\u001b[96m\u001b[47m59\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[41;23H\u001b[K\u001b[42;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[42;28H\u001b[K\u001b[43;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/oci-busybox\u001b[44;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[44;23H\u001b[K\u001b[45;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[45;28H\u001b[K\u001b[46;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push --disable-compression \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m oci:/tmp/oci-busybox\u001b[47;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[47;23H\u001b[K\u001b[48;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[48;28H\u001b[K\u001b[49;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[6Cm -rf /tmp/oci-busybox\u001b[49;32H\u001b[K\u001b[50;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m" - ], - [ - 0.006076, - "\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m  25%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[4;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.163845, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m containers-storage:[$ROOT]busybox:test\u001b[2;2H\u001b[96m\u001b[47m19\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[2;23H\u001b[K\u001b[3;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[3;28H\u001b[K\u001b[4;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[5;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[5;28H\u001b[K\u001b[6;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${OCIC_BINARY} image remove busybox:test\u001b[7;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[8;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[9;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[10;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[10;5H\u001b[K\u001b[11;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to directory\"\u001b[m\u001b[93m\u001b[107m {\u001b[11;37H\u001b[K\u001b[12;2H\u001b[96m\u001b[47m29\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[13;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[" - ], - [ - 8.3e-05, - "36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[13;23H\u001b[K\u001b[14;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[14;28H\u001b[K\u001b[15;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/busybox\u001b[16;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[16;23H\u001b[K\u001b[17;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[17;28H\u001b[K\u001b[18;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m dir:/tmp/busybox\u001b[19;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[19;23H\u001b[K\u001b[20;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[20;28H\u001b[K\u001b[21;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[22;2H\u001b[96m\u001b[47m39\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[23;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Crm -rf /tmp/busybox\u001b[24;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[25;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[26;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[26;5H\u001b[K\u001b[27;3H\u001b[96m\u001b[47m4" - ], - [ - 0.007793, - "\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to docker archive\"\u001b[m\u001b[93m\u001b[107m {\u001b[27;42H\u001b[K\u001b[28;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[29;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[29;23H\u001b[K\u001b[30;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[30;28H\u001b[K\u001b[31;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m docker-archive:/tmp/busybox-archive:1.26\u001b[32;2H\u001b[96m\u001b[47m49\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[32;23H\u001b[K\u001b[33;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[33;28H\u001b[K\u001b[34;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[6Cm /tmp/busybox-archive\u001b[34;32H\u001b[K\u001b[35;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[36;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[37;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[38;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[39;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[39" - ], - [ - 3.1e-05, - ";5H\u001b[K\u001b[40;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to oci without compression\"\u001b[m\u001b[93m\u001b[107m {\u001b[40;51H\u001b[K\u001b[41;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[42;2H\u001b[96m\u001b[47m59\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[42;23H\u001b[K\u001b[43;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[43;28H\u001b[K\u001b[44;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/oci-busybox\u001b[45;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[45;23H\u001b[K\u001b[46;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[46;28H\u001b[K\u001b[47;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push --disable-compression \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m oci:/tmp/oci-busybox\u001b[48;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[48;23H\u001b[K\u001b[49;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[49;28H\u001b[K\u001b[50;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[6Cm -rf /tmp/oci-busybox\u001b[50;32H\u001b[K\u001b[51;195H\u001b[38;5;70m" - ], - [ - 0.002123, - "\u001b[48;5;240m  24%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[4;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.19883, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[1;28H\u001b[K\u001b[2;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m containers-storage:[$ROOT]busybox:test\u001b[3;2H\u001b[96m\u001b[47m19\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[3;23H\u001b[K\u001b[4;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[1m\u001b[31m\u001b[106m[\u001b[m\u001b[93m\u001b[107m \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 \u001b[1m\u001b[31m\u001b[106m]\u001b[m\u001b[93m\u001b[107m\u001b[4;28H\u001b[K\u001b[5;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[6;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[6;28H\u001b[K\u001b[7;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${OCIC_BINARY} image remove busybox:test\u001b[8;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[9;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[10;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[11;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[11;5H\u001b[K\u001b[12;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to directory\"\u001b[m\u001b[93m\u001b[107m {\u001b[12;37H\u001b[K\u001b[1" - ], - [ - 0.000124, - "3;2H\u001b[96m\u001b[47m29\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[14;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[14;23H\u001b[K\u001b[15;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[15;28H\u001b[K\u001b[16;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/busybox\u001b[17;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[17;23H\u001b[K\u001b[18;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[18;28H\u001b[K\u001b[19;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m dir:/tmp/busybox\u001b[20;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[20;23H\u001b[K\u001b[21;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[21;28H\u001b[K\u001b[22;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[23;2H\u001b[96m\u001b[47m39\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[24;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Crm -rf /tmp/busybox\u001b[25;3H" - ], - [ - 0.001207, - "\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[26;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[27;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[27;5H\u001b[K\u001b[28;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to docker archive\"\u001b[m\u001b[93m\u001b[107m {\u001b[28;42H\u001b[K\u001b[29;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[30;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[30;23H\u001b[K\u001b[31;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[31;28H\u001b[K\u001b[32;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m docker-archive:/tmp/busybox-archive:1.26\u001b[33;2H\u001b[96m\u001b[47m49\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[33;23H\u001b[K\u001b[34;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[34;28H\u001b[K\u001b[35;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[6Cm /tmp/busybox-archive\u001b[35;32H\u001b[K\u001b[36;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[37;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[" - ], - [ - 0.000194, - "93m\u001b[107m -eq 0 ]\u001b[38;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[39;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[40;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[40;5H\u001b[K\u001b[41;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to oci without compression\"\u001b[m\u001b[93m\u001b[107m {\u001b[41;51H\u001b[K\u001b[42;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[43;2H\u001b[96m\u001b[47m59\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[43;23H\u001b[K\u001b[44;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[44;28H\u001b[K\u001b[45;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/oci-busybox\u001b[46;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[46;23H\u001b[K\u001b[47;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[47;28H\u001b[K\u001b[48;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push --disable-compression \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m oci:/tmp/oci-busybox\u001b[49;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[49;23H\u001b[K\u001b[50;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m" - ], - [ - 0.007907, - "\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[50;28H\u001b[K\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m  23%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m0\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[4;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.157382, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[1;23H\u001b[K\u001b[2;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[2;28H\u001b[K\u001b[3;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m containers-storage:[$ROOT]busybox:test\u001b[4;2H\u001b[96m\u001b[47m19\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[4;23H\u001b[K\u001b[5;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[5;28H\u001b[K\u001b[6;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[7;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[7;28H\u001b[K\u001b[8;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${OCIC_BINARY} image remove busybox:test\u001b[9;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[10;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[11;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[12;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[12;5H\u001b[K\u001b[13;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to directory\"\u001b[m\u001b[93m\u001b" - ], - [ - 7.7e-05, - "[107m {\u001b[13;37H\u001b[K\u001b[14;2H\u001b[96m\u001b[47m29\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[15;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[15;23H\u001b[K\u001b[16;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[16;28H\u001b[K\u001b[17;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/busybox\u001b[18;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[18;23H\u001b[K\u001b[19;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[19;28H\u001b[K\u001b[20;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m dir:/tmp/busybox\u001b[21;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[21;23H\u001b[K\u001b[22;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[22;28H\u001b[K\u001b[23;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[24;2H\u001b[96m\u001b[47m39\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[25;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Crm -rf /tmp/busybox" - ], - [ - 0.004633, - "\u001b[26;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[27;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[28;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[28;5H\u001b[K\u001b[29;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to docker archive\"\u001b[m\u001b[93m\u001b[107m {\u001b[29;42H\u001b[K\u001b[30;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[31;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[31;23H\u001b[K\u001b[32;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[32;28H\u001b[K\u001b[33;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m docker-archive:/tmp/busybox-archive:1.26\u001b[34;2H\u001b[96m\u001b[47m49\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[34;23H\u001b[K\u001b[35;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[35;28H\u001b[K\u001b[36;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[6Cm /tmp/busybox-archive\u001b[36;32H\u001b[K\u001b[37;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[38;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$statu" - ], - [ - 2.3e-05, - "s\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[39;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[40;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[41;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[41;5H\u001b[K\u001b[42;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to oci without compression\"\u001b[m\u001b[93m\u001b[107m {\u001b[42;51H\u001b[K\u001b[43;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[44;2H\u001b[96m\u001b[47m59\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[44;23H\u001b[K\u001b[45;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[45;28H\u001b[K\u001b[46;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/oci-busybox\u001b[47;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[47;23H\u001b[K\u001b[48;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[48;28H\u001b[K\u001b[49;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push --disable-compression \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m oci:/tmp/oci-busybox\u001b[50;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[50;23H\u001b[K\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m" - ], - [ - 0.002017, - "  22%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m19\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[4;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.216601, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[2;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[2;23H\u001b[K\u001b[3;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[3;28H\u001b[K\u001b[4;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m containers-storage:[$ROOT]busybox:test\u001b[5;2H\u001b[96m\u001b[47m19\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[5;23H\u001b[K\u001b[6;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[6;28H\u001b[K\u001b[7;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[8;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[8;28H\u001b[K\u001b[9;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${OCIC_BINARY} image remove busybox:test\u001b[10;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[11;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[12;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[13;3H\u001b[96m\u001b[47m7\u001b[m" - ], - [ - 0.000101, - "\u001b[93m\u001b[107m\u001b[13;5H\u001b[K\u001b[14;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to directory\"\u001b[m\u001b[93m\u001b[107m {\u001b[14;37H\u001b[K\u001b[15;2H\u001b[96m\u001b[47m29\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[16;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[16;23H\u001b[K\u001b[17;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[17;28H\u001b[K\u001b[18;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/busybox\u001b[19;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[19;23H\u001b[K\u001b[20;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[20;28H\u001b[K\u001b[21;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m dir:/tmp/busybox\u001b[22;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[22;23H\u001b[K\u001b[23;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[23;28H\u001b[K\u001b[24;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[25;2H\u001b[96m" - ], - [ - 0.00763, - "\u001b[47m39\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[26;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Crm -rf /tmp/busybox\u001b[27;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[28;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[29;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[29;5H\u001b[K\u001b[30;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to docker archive\"\u001b[m\u001b[93m\u001b[107m {\u001b[30;42H\u001b[K\u001b[31;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[32;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[32;23H\u001b[K\u001b[33;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[33;28H\u001b[K\u001b[34;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m docker-archive:/tmp/busybox-archive:1.26\u001b[35;2H\u001b[96m\u001b[47m49\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[35;23H\u001b[K\u001b[36;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[36;28H\u001b[K\u001b[37;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[6Cm /tmp/busybox-archive\u001b[37;32H\u001b[K\u001b[38;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m" - ], - [ - 0.000247, - "\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[39;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[40;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[41;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[42;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[42;5H\u001b[K\u001b[43;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to oci without compression\"\u001b[m\u001b[93m\u001b[107m {\u001b[43;51H\u001b[K\u001b[44;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[45;2H\u001b[96m\u001b[47m59\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[45;23H\u001b[K\u001b[46;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[46;28H\u001b[K\u001b[47;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/oci-busybox\u001b[48;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[48;23H\u001b[K\u001b[49;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[49;28H\u001b[K\u001b[50;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push --disable-compression \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m oci:/tmp/oci-busybox" - ], - [ - 0.003544, - "\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m  21%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[4;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.174049, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to containers/storage\"\u001b[m\u001b[93m\u001b[107m {\u001b[1;47H\u001b[K\u001b[2;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[3;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[3;23H\u001b[K\u001b[4;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[1m\u001b[31m\u001b[106m[\u001b[m\u001b[93m\u001b[107m \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 \u001b[1m\u001b[31m\u001b[106m]\u001b[m\u001b[93m\u001b[107m\u001b[4;28H\u001b[K\u001b[5;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m containers-storage:[$ROOT]busybox:test\u001b[6;2H\u001b[96m\u001b[47m19\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[6;23H\u001b[K\u001b[7;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[7;28H\u001b[K\u001b[8;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[9;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[9;28H\u001b[K\u001b[10;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${OCIC_BINARY} image remove busybox:test\u001b[11;3H\u001b[96m\u001b[47m" - ], - [ - 5.9e-05, - "4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[12;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[13;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[14;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[14;5H\u001b[K\u001b[15;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to directory\"\u001b[m\u001b[93m\u001b[107m {\u001b[15;37H\u001b[K\u001b[16;2H\u001b[96m\u001b[47m29\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[17;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[17;23H\u001b[K\u001b[18;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[18;28H\u001b[K\u001b[19;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/busybox\u001b[20;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[20;23H\u001b[K\u001b[21;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[21;28H\u001b[K\u001b[22;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m dir:/tmp/busybox\u001b[23;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[23;23H\u001b[K\u001b[24;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ " - ], - [ - 0.001075, - "\u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[24;28H\u001b[K\u001b[25;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[26;2H\u001b[96m\u001b[47m39\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[27;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Crm -rf /tmp/busybox\u001b[28;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[29;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[30;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[30;5H\u001b[K\u001b[31;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to docker archive\"\u001b[m\u001b[93m\u001b[107m {\u001b[31;42H\u001b[K\u001b[32;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[33;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[33;23H\u001b[K\u001b[34;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[34;28H\u001b[K\u001b[35;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m docker-archive:/tmp/busybox-archive:1.26\u001b[36;2H\u001b[96m\u001b[47m49\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[36;23H\u001b[K\u001b[37;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b" - ], - [ - 5.3e-05, - "[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[37;28H\u001b[K\u001b[38;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[6Cm /tmp/busybox-archive\u001b[38;32H\u001b[K\u001b[39;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[40;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[41;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[42;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[43;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[43;5H\u001b[K\u001b[44;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to oci without compression\"\u001b[m\u001b[93m\u001b[107m {\u001b[44;51H\u001b[K\u001b[45;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[46;2H\u001b[96m\u001b[47m59\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[46;23H\u001b[K\u001b[47;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[47;28H\u001b[K\u001b[48;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/oci-busybox\u001b[49;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[49;23H\u001b[K\u001b[50;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m" - ], - [ - 0.008247, - "\u001b[93m\u001b[107m -eq 0 ]\u001b[50;28H\u001b[K\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m  20%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[4;9H\u001b[?12l\u001b[?25h" - ], - [ - 2.125968, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[1;5H\u001b[K\u001b[2;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to containers/storage\"\u001b[m\u001b[93m\u001b[107m {\u001b[2;47H\u001b[K\u001b[3;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[4;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[4;23H\u001b[K\u001b[5;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[5;28H\u001b[K\u001b[6;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m containers-storage:[$ROOT]busybox:test\u001b[7;2H\u001b[96m\u001b[47m19\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[7;23H\u001b[K\u001b[8;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[8;28H\u001b[K\u001b[9;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[10;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[10;28H\u001b[K\u001b[11;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${OCIC_BINARY} image remove busybox:test\u001b[12;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b" - ], - [ - 7.1e-05, - "[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[13;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[14;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[15;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[15;5H\u001b[K\u001b[16;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to directory\"\u001b[m\u001b[93m\u001b[107m {\u001b[16;37H\u001b[K\u001b[17;2H\u001b[96m\u001b[47m29\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[18;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[18;23H\u001b[K\u001b[19;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[19;28H\u001b[K\u001b[20;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/busybox\u001b[21;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[21;23H\u001b[K\u001b[22;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[22;28H\u001b[K\u001b[23;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m dir:/tmp/busybox\u001b[24;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[24;23H\u001b[K\u001b[25;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"" - ], - [ - 0.007072, - "\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[25;28H\u001b[K\u001b[26;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[27;2H\u001b[96m\u001b[47m39\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[28;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Crm -rf /tmp/busybox\u001b[29;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[30;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[31;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[31;5H\u001b[K\u001b[32;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to docker archive\"\u001b[m\u001b[93m\u001b[107m {\u001b[32;42H\u001b[K\u001b[33;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[34;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[34;23H\u001b[K\u001b[35;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[35;28H\u001b[K\u001b[36;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m docker-archive:/tmp/busybox-archive:1.26\u001b[37;2H\u001b[96m\u001b[47m49\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[37;23H\u001b[K\u001b[38;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[3" - ], - [ - 4.4e-05, - "6m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[38;28H\u001b[K\u001b[39;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[6Cm /tmp/busybox-archive\u001b[39;32H\u001b[K\u001b[40;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[41;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[42;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[43;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[44;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[44;5H\u001b[K\u001b[45;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to oci without compression\"\u001b[m\u001b[93m\u001b[107m {\u001b[45;51H\u001b[K\u001b[46;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[47;2H\u001b[96m\u001b[47m59\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[47;23H\u001b[K\u001b[48;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[48;28H\u001b[K\u001b[49;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/oci-busybox\u001b[50;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[50;23H\u001b[K\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m  18%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m" - ], - [ - 0.002085, - "\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[4;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.16733, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[2;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[2;5H\u001b[K\u001b[3;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to containers/storage\"\u001b[m\u001b[93m\u001b[107m {\u001b[3;47H\u001b[K\u001b[4;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[5;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[5;23H\u001b[K\u001b[6;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[6;28H\u001b[K\u001b[7;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m containers-storage:[$ROOT]busybox:test\u001b[8;2H\u001b[96m\u001b[47m19\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[8;23H\u001b[K\u001b[9;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[9;28H\u001b[K\u001b[10;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[11;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[11;28H\u001b[K\u001b[12;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${OCIC_BINARY} image remove busybox:" - ], - [ - 8.8e-05, - "test\u001b[13;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[14;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[15;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[16;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[16;5H\u001b[K\u001b[17;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to directory\"\u001b[m\u001b[93m\u001b[107m {\u001b[17;37H\u001b[K\u001b[18;2H\u001b[96m\u001b[47m29\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[19;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[19;23H\u001b[K\u001b[20;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[20;28H\u001b[K\u001b[21;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/busybox\u001b[22;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[22;23H\u001b[K\u001b[23;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[23;28H\u001b[K\u001b[24;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m dir:/tmp/busybox\u001b[25;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[25;23H\u001b[K\u001b[26;3H\u001b[96m" - ], - [ - 0.007373, - "\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[26;28H\u001b[K\u001b[27;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[28;2H\u001b[96m\u001b[47m39\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[29;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5Crm -rf /tmp/busybox\u001b[30;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[31;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[32;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[32;5H\u001b[K\u001b[33;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to docker archive\"\u001b[m\u001b[93m\u001b[107m {\u001b[33;42H\u001b[K\u001b[34;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[35;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[35;23H\u001b[K\u001b[36;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[36;28H\u001b[K\u001b[37;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m docker-archive:/tmp/busybox-archive:1.26\u001b[38;2H\u001b[96m\u001b[47m49\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[38;23H\u001b[K\u001b" - ], - [ - 2.1e-05, - "[39;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[39;28H\u001b[K\u001b[40;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[6Cm /tmp/busybox-archive\u001b[40;32H\u001b[K\u001b[41;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[42;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[43;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C stop_crio\u001b[44;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[45;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[45;5H\u001b[K\u001b[46;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[1C@test \u001b[36m\"kpod push to oci without compression\"\u001b[m\u001b[93m\u001b[107m {\u001b[46;51H\u001b[K\u001b[47;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[5Crun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[48;2H\u001b[96m\u001b[47m59\u001b[m\u001b[93m\u001b[107m\u001b[5Cecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[48;23H\u001b[K\u001b[49;3H\u001b[96m\u001b[47m0\u001b[m\u001b[93m\u001b[107m\u001b[5C[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[49;28H\u001b[K\u001b[50;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[5Crun mkdir /tmp/oci-busybox\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m  17%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[4;9H\u001b[?1" - ], - [ - 1e-05, - "2l\u001b[?25h" - ], - [ - 0.244303, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m  18%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[5;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.495597, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[6;9H\u001b[1m\u001b[31m\u001b[106m[\u001b[17C]\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m  20%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[6;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.0243, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m[ \u001b[16C]\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m  21%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[7;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.030791, - "\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m  22%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m9\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[8;9H" - ], - [ - 0.034862, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[9;9H\u001b[1m\u001b[31m\u001b[106m[\u001b[17C]\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m  23%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m20\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[9;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.025609, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m[ \u001b[16C]\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m  24%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[10;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.03403, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[11;9H\u001b[1m\u001b[31m\u001b[106m[\u001b[17C]\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;70m\u001b[48;5;240m  25%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[11;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.346484, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m[ \u001b[16C]\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  26%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[12;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.422162, - "\u001b[51;209H48\u001b[12;52H" - ], - [ - 0.227309, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[34m-- INSERT --\u001b[m\u001b[93m\u001b[107m\u001b[52;13H\u001b[K" - ], - [ - 0.018402, - "\u001b[51;1H\u001b[1m\u001b[38;5;23m\u001b[48;5;231m INSERT \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;231m\u001b[48;5;31m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m\u001b[51;12H kpod-test-refactor \u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;31m\u001b[51;33H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31mtest/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;31mkpod_push.bats \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[m\u001b[93m\u001b[107m\u001b[51;54H\u001b[38;5;31m\u001b[48;5;24m\u001b[51;55H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;24m                                                                                                                      \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;180H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;188H\u001b[38;5;117m\u001b[48;5;24m conf\u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;149m\u001b[48;5;31m  26%\u001b[m\u001b[" - ], - [ - 2.9e-05, - "93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;24m\u001b[48;5;117m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m 23\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;117m:49 \u001b[12;53H\u001b[?12l\u001b[?25h" - ], - [ - 0.11896, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;52H\u001b[K\u001b[51;53H\u001b[1m\u001b[38;5;220m\u001b[48;5;31m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[51;57H \u001b[m\u001b[93m\u001b[107m\u001b[152C\u001b[38;5;22m\u001b[48;5;117m8\u001b[12;52H\u001b[?12l\u001b[?25h" - ], - [ - 0.496088, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;51H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[12;51H\u001b[?12l\u001b[?25h" - ], - [ - 0.031493, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;50H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[12;50H\u001b[?12l\u001b[?25h" - ], - [ - 0.027468, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;49H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[12;49H\u001b[?12l\u001b[?25h" - ], - [ - 0.033381, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;48H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[12;48H\u001b[?12l\u001b[?25h" - ], - [ - 0.034028, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;47H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[12;47H\u001b[?12l\u001b[?25h" - ], - [ - 0.027933, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;46H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[12;46H\u001b[?12l\u001b[?25h" - ], - [ - 0.032743, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;45H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[12;45H\u001b[?12l\u001b[?25h" - ], - [ - 0.030113, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;44H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m0\u001b[12;44H\u001b[?12l\u001b[?25h" - ], - [ - 0.034589, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;43H\u001b[K\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m39\u001b[12;43H\u001b[?12l\u001b[?25h" - ], - [ - 0.023953, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;42H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[12;42H\u001b[?12l\u001b[?25h" - ], - [ - 0.192014, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;41H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[12;41H\u001b[?12l\u001b[?25h" - ], - [ - 0.74866, - "\u001b[?25l\u001b[51;210H6\u001b[12;40H\u001b[?12l\u001b[?25h" - ], - [ - 0.498543, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;39H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[12;39H\u001b[?12l\u001b[?25h" - ], - [ - 0.025782, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;38H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[12;38H\u001b[?12l\u001b[?25h" - ], - [ - 0.031784, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;37H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[12;37H\u001b[?12l\u001b[?25h" - ], - [ - 0.03173, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;36H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[12;36H\u001b[?12l\u001b[?25h" - ], - [ - 0.029779, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;35H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[12;35H\u001b[?12l\u001b[?25h" - ], - [ - 0.034013, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;34H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m0\u001b[12;34H\u001b[?12l\u001b[?25h" - ], - [ - 0.028916, - "\u001b[?25l\u001b[51;209H29\u001b[12;33H\u001b[?12l\u001b[?25h" - ], - [ - 0.028505, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;32H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[12;32H\u001b[?12l\u001b[?25h" - ], - [ - 0.029212, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;31H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[12;31H\u001b[?12l\u001b[?25h" - ], - [ - 0.035421, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;30H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[12;30H\u001b[?12l\u001b[?25h" - ], - [ - 0.030293, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;29H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[12;29H\u001b[?12l\u001b[?25h" - ], - [ - 0.030509, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;28H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[12;28H\u001b[?12l\u001b[?25h" - ], - [ - 0.029979, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;14H\u001b[1m\u001b[31m\u001b[106m{\u001b[11C}\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[12;27H\u001b[?12l\u001b[?25h" - ], - [ - 0.03119, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;26H\u001b[K\u001b[12;14H{O\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[12;26H\u001b[?12l\u001b[?25h" - ], - [ - 0.032258, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;25H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[12;25H\u001b[?12l\u001b[?25h" - ], - [ - 0.02545, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;24H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m0\u001b[12;24H\u001b[?12l\u001b[?25h" - ], - [ - 0.035798, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;23H\u001b[K\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m19\u001b[12;23H\u001b[?12l\u001b[?25h" - ], - [ - 0.02867, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;22H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[12;22H\u001b[?12l\u001b[?25h" - ], - [ - 0.031704, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;21H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[12;21H\u001b[?12l\u001b[?25h" - ], - [ - 0.0333, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;20H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[12;20H\u001b[?12l\u001b[?25h" - ], - [ - 0.024988, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;19H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[12;19H\u001b[?12l\u001b[?25h" - ], - [ - 0.02881, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;18H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[12;18H\u001b[?12l\u001b[?25h" - ], - [ - 0.033247, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;17H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[12;17H\u001b[?12l\u001b[?25h" - ], - [ - 0.032484, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;16H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[12;16H\u001b[?12l\u001b[?25h" - ], - [ - 0.031784, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;15H\u001b[K\u001b[12;14H\u001b[1m\u001b[31m\u001b[106m{\u001b[15;5H}\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[12;15H\u001b[?12l\u001b[?25h" - ], - [ - 0.453651, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;14H\u001b[K\u001b[15;5H}\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m0\u001b[12;14H\u001b[?12l\u001b[?25h" - ], - [ - 0.192402, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;13H\u001b[K\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m9 \u001b[12;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.437798, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mk\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m10\u001b[12;14H\u001b[?12l\u001b[?25h" - ], - [ - 0.254702, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mp\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[12;15H\u001b[?12l\u001b[?25h" - ], - [ - 0.30839, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;14H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m0\u001b[12;14H\u001b[?12l\u001b[?25h" - ], - [ - 0.132923, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;13H\u001b[K\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m9 \u001b[12;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.318686, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m$\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m10\u001b[12;14H\u001b[?12l\u001b[?25h" - ], - [ - 0.283056, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m(\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[12;15H\u001b[?12l\u001b[?25h" - ], - [ - 0.330165, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;14H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m0\u001b[12;14H\u001b[?12l\u001b[?25h" - ], - [ - 0.516215, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m{\b\u001b[1m\u001b[31m\u001b[106m{\u001b[15;5H}\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[12;15H\u001b[?12l\u001b[?25h" - ], - [ - 0.658201, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mK\b\b{K\u001b[15;5H}\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[12;16H\u001b[?12l\u001b[?25h" - ], - [ - 0.143261, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mP\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[12;17H\u001b[?12l\u001b[?25h" - ], - [ - 0.123887, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mO\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[12;18H\u001b[?12l\u001b[?25h" - ], - [ - 0.169592, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mD\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[12;19H\u001b[?12l\u001b[?25h" - ], - [ - 0.345485, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m_\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[12;20H\u001b[?12l\u001b[?25h" - ], - [ - 0.181625, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mB\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[12;21H\u001b[?12l\u001b[?25h" - ], - [ - 0.084398, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mI\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[12;22H\u001b[?12l\u001b[?25h" - ], - [ - 0.111056, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mN\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m9\u001b[12;23H\u001b[?12l\u001b[?25h" - ], - [ - 0.128088, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mA\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m20\u001b[12;24H\u001b[?12l\u001b[?25h" - ], - [ - 0.131002, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mR\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[12;25H\u001b[?12l\u001b[?25h" - ], - [ - 0.165526, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mY\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[12;26H\u001b[?12l\u001b[?25h" - ], - [ - 0.657525, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m}\u001b[12;14H\u001b[1m\u001b[31m\u001b[106m{\u001b[11C}\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[12;27H\u001b[?12l\u001b[?25h" - ], - [ - 0.183629, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;14H{K\u001b[10C} \u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[12;28H\u001b[?12l\u001b[?25h" - ], - [ - 0.447484, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m$\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[12;29H\u001b[?12l\u001b[?25h" - ], - [ - 0.17344, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mK\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[12;30H\u001b[?12l\u001b[?25h" - ], - [ - 0.115871, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mP\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[12;31H\u001b[?12l\u001b[?25h" - ], - [ - 0.090564, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mO\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[12;32H\u001b[?12l\u001b[?25h" - ], - [ - 0.114158, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mD\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m9\u001b[12;33H\u001b[?12l\u001b[?25h" - ], - [ - 0.141443, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m_\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m30\u001b[12;34H\u001b[?12l\u001b[?25h" - ], - [ - 0.23065, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mO\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[12;35H\u001b[?12l\u001b[?25h" - ], - [ - 0.144279, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mP\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[12;36H\u001b[?12l\u001b[?25h" - ], - [ - 0.096025, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mT\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[12;37H\u001b[?12l\u001b[?25h" - ], - [ - 0.093663, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mI\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[12;38H\u001b[?12l\u001b[?25h" - ], - [ - 0.079633, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mO\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[12;39H\u001b[?12l\u001b[?25h" - ], - [ - 0.081562, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mN\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[12;40H\u001b[?12l\u001b[?25h" - ], - [ - 0.084293, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mS\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[12;41H\u001b[?12l\u001b[?25h" - ], - [ - 0.137772, - "\u001b[?25l\u001b[51;210H8\u001b[12;42H\u001b[?12l\u001b[?25h" - ], - [ - 0.094796, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mr\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m9\u001b[12;43H\u001b[?12l\u001b[?25h" - ], - [ - 0.14112, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mm\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m40\u001b[12;44H\u001b[?12l\u001b[?25h" - ], - [ - 0.100405, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mi\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[12;45H\u001b[?12l\u001b[?25h" - ], - [ - 0.104584, - "\u001b[?25l\u001b[51;210H2\u001b[12;46H\u001b[?12l\u001b[?25h" - ], - [ - 0.138653, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m$\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[12;47H\u001b[?12l\u001b[?25h" - ], - [ - 0.344074, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;46H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[12;46H\u001b[?12l\u001b[?25h" - ], - [ - 0.199704, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\"\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[12;47H\u001b[?12l\u001b[?25h" - ], - [ - 0.127088, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m$\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[12;48H\u001b[?12l\u001b[?25h" - ], - [ - 0.143183, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mK\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[12;49H\u001b[?12l\u001b[?25h" - ], - [ - 0.328141, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;48H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[12;48H\u001b[?12l\u001b[?25h" - ], - [ - 0.170702, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mI\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[12;49H\u001b[?12l\u001b[?25h" - ], - [ - 0.084435, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mM\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[12;50H\u001b[?12l\u001b[?25h" - ], - [ - 0.098537, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mA\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[12;51H\u001b[?12l\u001b[?25h" - ], - [ - 0.163497, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mG\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[12;52H\u001b[?12l\u001b[?25h" - ], - [ - 0.105928, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mE\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m9\u001b[12;53H\u001b[?12l\u001b[?25h" - ], - [ - 0.145464, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[12;46H\u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m50\u001b[12;54H\u001b[?12l\u001b[?25h" - ], - [ - 0.391443, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[K" - ], - [ - 0.007246, - "\u001b[51;1H\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;31m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H kpod-test-refactor \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;33H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mtest/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mkpod_push.bats\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[m\u001b[93m\u001b[107m\u001b[51;56H\u001b[38;5;240m\u001b[48;5;236m\u001b[51;57H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                    \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;180H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;188H\u001b[38;5;247m\u001b[48;5;236m conf\u001b" - ], - [ - 2.4e-05, - "[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  26%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 23\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;252m:49 \u001b[12;53H\u001b[?12l\u001b[?25h" - ], - [ - 0.297107, - "\u001b[?25l\u001b[52;1H\u001b[m\u001b[93m\u001b[107m:\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.311391, - "w\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.071982, - "q" - ], - [ - 7.5e-05, - "\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.127973, - "\r" - ], - [ - 0.000142, - "\u001b[?25l\u001b[?2004l" - ], - [ - 0.000165, - "\"test/kpod_push.bats\"" - ], - [ - 0.006449, - " 87L, 2372C written" - ], - [ - 0.013487, - "\r\r\r\n\u001b[39;49m\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.002115, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.022207, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-test-refactor* \u001b[39m \u001b[33m25s\u001b[39m\r\n" - ], - [ - 0.000932, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000102, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000173, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.1e-05, - "\u001b[?1h\u001b=" - ], - [ - 1.9e-05, - "\u001b[?2004h" - ], - [ - 0.394575, - "g" - ], - [ - 0.216017, - "\bgi" - ], - [ - 0.088382, - "t" - ], - [ - 0.103545, - " " - ], - [ - 0.128191, - "c" - ], - [ - 0.000178, - "o" - ], - [ - 0.079694, - "m" - ], - [ - 0.279792, - "m" - ], - [ - 0.248528, - "i" - ], - [ - 0.111816, - "t" - ], - [ - 0.087626, - " " - ], - [ - 0.128727, - "-" - ], - [ - 0.095251, - "a" - ], - [ - 0.096123, - " " - ], - [ - 0.104484, - "-" - ], - [ - 0.143571, - "-" - ], - [ - 0.087942, - "a" - ], - [ - 0.104175, - "m" - ], - [ - 0.112113, - "e" - ], - [ - 0.103848, - "n" - ], - [ - 0.112584, - "d" - ], - [ - 0.247762, - "\u001b[?1l\u001b>" - ], - [ - 0.000208, - "\u001b[?2004l\r\r\n" - ], - [ - 0.005064, - "\u001b]2;git commit -a --amend\u0007\u001b]1;git\u0007" - ], - [ - 0.032749, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000317, - "\u001b[1;52r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[H\u001b[2J\u001b[?25l\u001b[52;1H\"~/Development/Go/src/github.com/kubernetes-incubator/cri-o/.git/COMMIT_EDITMSG\"" - ], - [ - 5.3e-05, - " 24L, 716C" - ], - [ - 0.000154, - "\u001b[1;1HRefactor kpod tests\r\n\r\nMove kpod tests from kpod.bats to kpod_[commandname].bats\r\n\r\nSigned-off-by: Ryan Cole \r\n\r\n# Please enter the commit message for your changes. Lines starting\r\n# with '#' will be ignored, and an empty message aborts the commit.\r\n#\r\n# Date: Mon Aug 14 09:15:22 2017 -0400\r\n#\r\n# On branch kpod-test-refactor\r\n# Changes to be committed:\r\n#\u001b[7Cdeleted: test/kpod.bats\r\n#\u001b[7Cmodified: test/kpod_diff.bats\r\n#\u001b[7Cnew file: test/kpod_history.bats\r\n#\u001b[7Cnew file: test/kpod_images.bats\r\n#\u001b[7Cnew file: test/kpod_inspect.bats\r\n#\u001b[7Cmodified: test/kpod_load.bats\r\n#\u001b[7Cnew file: test/kpod_pull.bats\r\n#\u001b[7Cnew file: test/kpod_push.bats\r\n#\u001b[7Cmodified: test/kpod_save.bats\r\n#\u001b[7Cnew file: test/kpod_version.bats\r\n#\r\n\u001b[94m~ \u001b[26;1H~ " - ], - [ - 2.5e-05, - " \u001b[27;1H~ \u001b[28;1H~ \u001b[29;1H~ \u001b[30;1H~ " - ], - [ - 5.1e-05, - " \u001b[31;1H~ \u001b[32;1H~ \u001b[33;1H~ \u001b[34;1H~ \u001b[35;1H~ " - ], - [ - 1.9e-05, - " \u001b[36;1H~ \u001b[37;1H~ \u001b[38;1H~ \u001b[39;1H~ \u001b[40;1H~ " - ], - [ - 1.7e-05, - " \u001b[41;1H~ \u001b[42;1H~ \u001b[43;1H~ \u001b[44;1H~ " - ], - [ - 1.6e-05, - " \u001b[45;1H~ \u001b[46;1H~ \u001b[47;1H~ \u001b[48;1H~ \u001b[49;1H~ " - ], - [ - 1.8e-05, - " \u001b[50;1H~ \u001b[51;1H~ \u001b[1;1H\u001b[?12l\u001b[?25h" - ], - [ - 0.25699, - "\u001b[?25l\u001b[m\u001b[52;1H\u001b[K\u001b[52;1H:\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.159615, - "w" - ], - [ - 0.06399, - "q" - ], - [ - 0.072292, - "\r\u001b[?25l\u001b[?2004l\".git/COMMIT_EDITMSG\"" - ], - [ - 0.006984, - " 24L, 716C written" - ], - [ - 0.000191, - "\r\r\r\n\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.004761, - "[kpod-test-refactor 72c6c49b] Refactor kpod tests\r\n Date: Mon Aug 14 09:15:22 2017 -0400\r\n 10 files changed, 335 insertions(+), 253 deletions(-)\r\n delete mode 100644 test/kpod.bats\r\n create mode 100644 test/kpod_history.bats\r\n create mode 100644 test/kpod_images.bats\r\n create mode 100644 test/kpod_inspect.bats\r\n create mode 100644 test/kpod_pull.bats\r\n create mode 100644 test/kpod_push.bats\r\n create mode 100644 test/kpod_version.bats\r\n\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.02706, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-test-refactor \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.003213, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000199, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 1.9e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000122, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 5.3e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.6e-05, - "\u001b[?2004h" - ], - [ - 0.141189, - "g" - ], - [ - 0.128024, - "\bgi" - ], - [ - 0.071759, - "t" - ], - [ - 0.10427, - " " - ], - [ - 0.096092, - "p" - ], - [ - 0.09589, - "u" - ], - [ - 0.112424, - "s" - ], - [ - 0.1201, - "h" - ], - [ - 0.111109, - " " - ], - [ - 0.088607, - "-" - ], - [ - 0.119704, - "f" - ], - [ - 0.128014, - " " - ], - [ - 0.11191, - "o" - ], - [ - 0.112657, - "r" - ], - [ - 0.103811, - "i" - ], - [ - 0.119689, - "g" - ], - [ - 0.096661, - "i" - ], - [ - 0.039472, - "n" - ], - [ - 0.095541, - " " - ], - [ - 0.12086, - "k" - ], - [ - 0.085614, - "pod-" - ], - [ - 0.185148, - "t" - ], - [ - 0.048017, - "e" - ], - [ - 0.205899, - "st-refactor\u001b[1m \u001b[0m" - ], - [ - 0.179325, - "\b\u001b[0m r" - ], - [ - 0.112012, - "e" - ], - [ - 0.271558, - "\b \b" - ], - [ - 0.127775, - "\b \b" - ], - [ - 0.160077, - "\b" - ], - [ - 0.144317, - "\b \b" - ], - [ - 0.455941, - "r" - ], - [ - 0.336133, - "\u001b[?1l\u001b>" - ], - [ - 0.001355, - "\u001b[?2004l\r\r\n" - ], - [ - 0.003918, - "\u001b]2;git push -f origin kpod-test-refactor\u0007\u001b]1;git\u0007" - ], - [ - 1.183521, - "Counting objects: 12, done.\r\n" - ], - [ - 0.000161, - "Delta compression using up to 4 threads.\r\n" - ], - [ - 8.9e-05, - "Compressing objects: 8% (1/12) \rCompressing objects: 16% (2/12) \r" - ], - [ - 0.00016, - "Compressing objects: 25% (3/12) \r" - ], - [ - 2.3e-05, - "Compressing objects: 33% (4/12) \r" - ], - [ - 3.7e-05, - "Compressing objects: 41% (5/12) \r" - ], - [ - 6.9e-05, - "Compressing objects: 50% (6/12) \r" - ], - [ - 0.000102, - "Compressing objects: 58% (7/12) \r" - ], - [ - 5.4e-05, - "Compressing objects: 66% (8/12) \r" - ], - [ - 8.2e-05, - "Compressing objects: 75% (9/12) \r" - ], - [ - 5.7e-05, - "Compressing objects: 83% (10/12) \r" - ], - [ - 5.8e-05, - "Compressing objects: 91% (11/12) \r" - ], - [ - 5.4e-05, - "Compressing objects: 100% (12/12) \r" - ], - [ - 4.4e-05, - "Compressing objects: 100% (12/12), done.\r\n" - ], - [ - 0.000167, - "Writing objects: 8% (1/12) \r" - ], - [ - 5.7e-05, - "Writing objects: 16% (2/12) \r" - ], - [ - 0.000171, - "Writing objects: 25% (3/12) \r" - ], - [ - 5e-05, - "Writing objects: 33% (4/12) \r" - ], - [ - 0.000129, - "Writing objects: 41% (5/12) \r" - ], - [ - 0.000182, - "Writing objects: 58% (7/12) \r" - ], - [ - 5.9e-05, - "Writing objects: 66% (8/12) \r" - ], - [ - 7e-05, - "Writing objects: 75% (9/12) \r" - ], - [ - 7.9e-05, - "Writing objects: 83% (10/12) \r" - ], - [ - 3.8e-05, - "Writing objects: 91% (11/12) \r" - ], - [ - 4.3e-05, - "Writing objects: 100% (12/12) \r" - ], - [ - 4.1e-05, - "Writing objects: 100% (12/12), 2.57 KiB | 2.57 MiB/s, done.\r\nTotal 12 (delta 9), reused 0 (delta 0)\r\n" - ], - [ - 0.086353, - "remote: Resolving deltas: 0% (0/9) \u001b[K\r" - ], - [ - 0.040457, - "remote: Resolving deltas: 22% (2/9) \u001b[K\rremote: Resolving deltas: 44% (4/9) \u001b[K\rremote: Resolving deltas: 55% (5/9) \u001b[K\rremote: Resolving deltas: 66% (6/9) \u001b[K\rremote: Resolving deltas: 77% (7/9) \u001b[K\rremote: Resolving deltas: 88% (8/9) \u001b[K\rremote: Resolving deltas: 100% (9/9) \u001b[K\rremote: Resolving deltas: 100% (9/9), completed with 5 local objects.\u001b[K\r\n" - ], - [ - 1.343638, - "To github.com:14rcole/cri-o\r\n + 9327604d...72c6c49b kpod-test-refactor -> kpod-test-refactor (forced update)\r\n" - ], - [ - 0.003519, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.027554, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-test-refactor \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.002119, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000223, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007" - ], - [ - 2.1e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 8.9e-05, - "\u001b[?1h\u001b=" - ], - [ - 3.1e-05, - "\u001b[?2004h" - ], - [ - 73.029405, - "g" - ], - [ - 0.116068, - "\bgi" - ], - [ - 0.083652, - "t" - ], - [ - 0.111933, - " " - ], - [ - 0.116198, - "c" - ], - [ - 0.095668, - "h" - ], - [ - 0.100371, - "e" - ], - [ - 0.075276, - "c" - ], - [ - 0.069067, - "k" - ], - [ - 0.155349, - "o" - ], - [ - 0.080863, - "u" - ], - [ - 0.107261, - "t" - ], - [ - 0.143931, - " " - ], - [ - 6.94391, - "k" - ], - [ - 0.367099, - "pod-" - ], - [ - 0.46577, - "r" - ], - [ - 0.096061, - "e" - ], - [ - 0.095387, - "n" - ], - [ - 0.18511, - "ame\u001b[1m \u001b[0m" - ], - [ - 0.335066, - "\b\u001b[0m \b" - ], - [ - 0.00018, - "\u001b[?1l\u001b>" - ], - [ - 8.1e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.004082, - "\u001b]2;git checkout kpod-rename\u0007\u001b]1;git\u0007" - ], - [ - 0.040772, - "Switched to branch 'kpod-rename'\r\n" - ], - [ - 0.000659, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.028625, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-rename \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.002148, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 8.7e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000293, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 5.1e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.6e-05, - "\u001b[?2004h" - ], - [ - 2.266962, - "2" - ], - [ - 0.199874, - "\b27" - ], - [ - 0.248374, - "G" - ], - [ - 0.479833, - "\b \b" - ], - [ - 0.151084, - "\b\b2 \b" - ], - [ - 0.168998, - "\b \b" - ], - [ - 0.976089, - "v" - ], - [ - 0.102867, - "\bvi" - ], - [ - 0.05621, - " " - ], - [ - 0.096671, - "t" - ], - [ - 0.072195, - "e" - ], - [ - 0.167866, - "t" - ], - [ - 0.199366, - "k" - ], - [ - 0.351527, - "\b \b" - ], - [ - 0.113612, - "\u0007" - ], - [ - 0.454797, - "\b \b" - ], - [ - 0.11181, - "s" - ], - [ - 0.178442, - "t\u001b[1m/\u001b[0m" - ], - [ - 0.39881, - "\b\u001b[0m/k" - ], - [ - 0.096645, - "pod" - ], - [ - 0.622458, - "\b \b" - ], - [ - 0.616269, - "f" - ], - [ - 0.424159, - "\b \b" - ], - [ - 0.136035, - "d" - ], - [ - 0.191761, - "_" - ], - [ - 0.255541, - "r" - ], - [ - 0.096112, - "e" - ], - [ - 0.224777, - "n" - ], - [ - 0.139367, - "ame.bats\u001b[1m \u001b[0m" - ], - [ - 0.909463, - "\b\u001b[0m \b\u001b[?1l\u001b>\u001b[?2004l\r\r\n" - ], - [ - 0.001881, - "\u001b]2;vim test/kpod_rename.bats\u0007\u001b]1;vi\u0007" - ], - [ - 0.132692, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000558, - "\u001b[1;52r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[52;1H\"test/kpod_rename.bats\"" - ], - [ - 0.000156, - " 35L, 907C" - ], - [ - 0.003097, - "\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[1;1H\u001b[>c" - ], - [ - 0.000674, - "\u001b[1;1H\u001b[96m\u001b[47m 1 \u001b[m\u001b[93m\u001b[107m\u001b[96m#!/usr/bin/env bats\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 2 \r\n 3 \u001b[m\u001b[93m\u001b[107mload helpers\r\n\u001b[96m\u001b[47m 4 \r\n 5 \u001b[m\u001b[93m\u001b[107mIMAGE=\u001b[36m\"redis:alpine\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 6 \u001b[m\u001b[93m\u001b[107mROOT=\u001b[36m\"$TESTDIR/crio\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 7 \u001b[m\u001b[93m\u001b[107mRUNROOT=\u001b[36m\"$TESTDIR/crio-run\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 8 \u001b[m\u001b[93m\u001b[107mKPOD_OPTIONS=\u001b[36m\"--root $ROOT --runroot $RUNROOT $STORAGE_OPTS\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 9 \u001b[m\u001b[93m\u001b[107mNEW_NAME=\u001b[36m\"rename-test\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 10 \r\n 11 \u001b[m\u001b[93m\u001b[107mfunction teardown() {\r\n\u001b[96m\u001b[47m 12 \u001b[m\u001b[93m\u001b[107m cleanup_test\r\n\u001b[96m\u001b[47m 13 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 14 \r\n 15 \u001b[m\u001b[93m\u001b[107m@test \u001b[36m\"kpod rename successful\"\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 16 \u001b[m\u001b[93m\u001b[107m start_crio\r\n\u001b[96m\u001b[47m 17 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} ${KPOD_OPTIONS} pull $IMAGE\r\n\u001b[96m\u001b[47m 18 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 19 \u001b[m\u001b[93m\u001b[107m run crioctl pod run --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m" - ], - [ - 1.2e-05, - "\u001b[107m/sandbox_config.json\r\n\u001b[96m\u001b[47m 20 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 21 \u001b[m\u001b[93m\u001b[107m pod_id=\u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 22 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 23 \u001b[m\u001b[93m\u001b[107m run ${OCIC_BINARY} ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 24 \u001b[m\u001b[93m\u001b[107m ctr_id=\u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 25 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS rename \u001b[36m\"$ctr_id\"\u001b[m\u001b[93m\u001b[107m \u001b[36m\"$NEW_NAME\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 26 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 27 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 28 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS inspect \u001b[36m\"$ctr_id\"\u001b[m\u001b[93m\u001b[107m --format {{.Name}}\r\n\u001b[96m\u001b[47m 29 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 30 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 31 " - ], - [ - 7.9e-05, - "\u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m == \u001b[36m\"$NEW_NAME\"\u001b[m\u001b[93m\u001b[107m ]\r\n\u001b[96m\u001b[47m 32 \u001b[m\u001b[93m\u001b[107m cleanup_ctrs\r\n\u001b[96m\u001b[47m 33 \u001b[m\u001b[93m\u001b[107m cleanup_pods\r\n\u001b[96m\u001b[47m 34 \u001b[m\u001b[93m\u001b[107m stop_crio\r\n\u001b[96m\u001b[47m 35 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[1m\u001b[94m~ \u001b[37;1H~ \u001b[38;1H~ \u001b[39;1H~ " - ], - [ - 1.1e-05, - " \u001b[40;1H~ \u001b[41;1H~ \u001b[42;1H~ \u001b[43;1H~ \u001b[44;1H~ " - ], - [ - 0.029235, - " \u001b[45;1H~ \u001b[46;1H~ \u001b[47;1H~ \u001b[48;1H~ " - ], - [ - 9.4e-05, - " \u001b[49;1H~ \u001b[50;1H~ \u001b[m\u001b[93m\u001b[107m\u001b[51;1H\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H kpod-rename \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;26H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mtest/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mkpod_rename.bats \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[51;50H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                            " - ], - [ - 0.011325, - "                                               \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;180H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;188H\u001b[38;5;247m\u001b[48;5;236m conf\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 19\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5  \u001b[19;9H\u001b[?12l\u001b[?25h\u001bP+q436f\u001b\\\u001bP+q6b75\u001b\\\u001bP+q6b64\u001b\\\u001bP+q6b72\u001b\\\u001bP+q6b6c\u001b\\\u001bP+q2332\u001b\\\u001bP+q2334\u001b\\\u001bP+q2569\u001b\\\u001bP+q2a37\u001b\\\u001bP+q6b31\u001b\\" - ], - [ - 2.388427, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[27;9H\u001b[1m\u001b[31m\u001b[106m[\u001b[17C]\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  77%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m27\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[27;9H\u001b[?12l\u001b[?25h" - ], - [ - 2.299389, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m[ \u001b[16C]\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  74%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[26;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.528255, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[27;9H\u001b[1m\u001b[31m\u001b[106m[\u001b[17C]\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  77%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[27;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.321714, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m[ \u001b[16C]\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  74%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[26;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.403252, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  71%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[25;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.215177, - "\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  74%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[26;9H" - ], - [ - 27.227284, - "\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  71%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[25;9H" - ], - [ - 0.172124, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  69%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[24;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.422664, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  66%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[23;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.245489, - "\u001b[51;209H4\u001b[23;8H" - ], - [ - 0.280877, - "\u001b[51;209H5\u001b[23;9H" - ], - [ - 0.495366, - "\u001b[51;209H6\u001b[23;10H" - ], - [ - 0.032687, - "\u001b[51;209H7\u001b[23;11H" - ], - [ - 0.030514, - "\u001b[51;209H8\u001b[23;12H" - ], - [ - 0.031651, - "\u001b[51;209H9\u001b[23;13H" - ], - [ - 0.033388, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m$\u001b[1m\u001b[31m\u001b[106m{\u001b[11C}\u001b[m\u001b[93m\u001b[107m\u001b[51;209H\u001b[38;5;22m\u001b[48;5;252m10\u001b[23;14H\u001b[?12l\u001b[?25h" - ], - [ - 0.027913, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m{O\u001b[10C} \u001b[51;210H\u001b[38;5;22m\u001b[48;5;252m1\u001b[23;15H\u001b[?12l\u001b[?25h" - ], - [ - 0.155223, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[31m\u001b[106m{\u001b[11C}\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;252m0\u001b[23;14H\u001b[?12l\u001b[?25h" - ], - [ - 0.174127, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m{O\u001b[10C} \u001b[51;209H\u001b[38;5;22m\u001b[48;5;252m9 \u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.191338, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[31m\u001b[106m{\u001b[m\u001b[93m\u001b[107mOCIC_BINARY\u001b[1m\u001b[31m\u001b[106m}\u001b[m\u001b[93m\u001b[107m ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[23;96H\u001b[K\u001b[51;48H\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[51;52H \u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.500617, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mOCIC_BINARY} ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[23;95H\u001b[K\u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.021176, - "\u001b[?25lCIC_BINARY} ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[23;94H\u001b[K\u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.035102, - "\u001b[?25lIC_BINARY} ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[23;93H\u001b[K\u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.028745, - "\u001b[?25lC_BINARY} ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[23;92H\u001b[K\u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.026326, - "\u001b[?25l_BINARY} ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[23;91H\u001b[K\u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.034424, - "\u001b[?25lBINARY} ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[23;90H\u001b[K\u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.029844, - "\u001b[?25lINARY} ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[23;89H\u001b[K\u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.031125, - "\u001b[?25lNARY} ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[23;88H\u001b[K\u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.03287, - "\u001b[?25lARY} ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[23;87H\u001b[K\u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.196796, - "\u001b[?25lRY} ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[23;86H\u001b[K\u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.182819, - "\u001b[?25lY} ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[23;85H\u001b[K\u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.433786, - "\u001b[?25l\u001b[15;36H\u001b[1m\u001b[31m\u001b[106m{\u001b[23;13H}\u001b[m\u001b[93m\u001b[107m ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[23;84H\u001b[K\u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.196117, - "\u001b[?25l\u001b[52;1H\u001b[34m-- INSERT --\u001b[m\u001b[93m\u001b[107m\u001b[52;13H\u001b[K" - ], - [ - 0.015372, - "\u001b[23;13H\u001b[1m\u001b[31m\u001b[106m \u001b[m\u001b[93m\u001b[107mctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[23;83H\u001b[K\u001b[15;36H{\u001b[23;13H c\u001b[51;1H\u001b[1m\u001b[38;5;23m\u001b[48;5;231m INSERT \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;231m\u001b[48;5;31m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m\u001b[51;12H kpod-rename \u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;31m\u001b[51;26H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31mtest/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;31mkpod_rename.bats\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[38;5;220m\u001b[48;5;31m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[m\u001b[93m\u001b[107m\u001b[51;51H\u001b[38;5;31m\u001b[48;5;24m\u001b[51;52H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;24m                                                                                                                         \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107" - ], - [ - 4.8e-05, - "m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;180H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;188H\u001b[38;5;117m\u001b[48;5;24m conf\u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;186m\u001b[48;5;31m  66%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;24m\u001b[48;5;117m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m 23\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;117m:9  \u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.860848, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mc ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m10\u001b[23;14H\u001b[?12l\u001b[?25h" - ], - [ - 0.195551, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mr ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[23;15H\u001b[?12l\u001b[?25h" - ], - [ - 0.048944, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mi ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[23;16H\u001b[?12l\u001b[?25h" - ], - [ - 0.106817, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mo ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[23;17H\u001b[?12l\u001b[?25h" - ], - [ - 0.070042, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mc ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[23;18H\u001b[?12l\u001b[?25h" - ], - [ - 0.207299, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mt ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[23;19H\u001b[?12l\u001b[?25h" - ], - [ - 0.084867, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107ml ctr create --config \u001b[36m\"$TESTDATA\"\u001b[m\u001b[93m\u001b[107m/container_config.json --pod \u001b[36m\"$pod_id\"\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[23;20H\u001b[?12l\u001b[?25h" - ], - [ - 0.230817, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[K" - ], - [ - 0.005085, - "\u001b[51;1H\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;31m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H kpod-rename \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;26H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mtest/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mkpod_rename.bats\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[m\u001b[93m\u001b[107m\u001b[51;51H\u001b[38;5;240m\u001b[48;5;236m\u001b[51;52H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                         \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;180H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;188H\u001b[38;5;247m\u001b[48;5;236m " - ], - [ - 4.1e-05, - "conf\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  66%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 23\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;252m:15 \u001b[23;19H\u001b[?12l\u001b[?25h" - ], - [ - 0.30678, - "\u001b[?25l\u001b[52;1H\u001b[m\u001b[93m\u001b[107m:\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.127132, - "w" - ], - [ - 3.3e-05, - "\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.056701, - "q\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.079826, - "\r" - ], - [ - 0.000364, - "\u001b[?25l\u001b[?2004l\"test/kpod_rename.bats\"" - ], - [ - 0.012084, - " 35L, 900C written" - ], - [ - 0.014515, - "\r\r\r\n\u001b[39;49m\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.002629, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.024698, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-rename* \u001b[39m \u001b[33m40s\u001b[39m\r\n" - ], - [ - 0.000938, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000106, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007" - ], - [ - 9.8e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 4.6e-05, - "\u001b[?1h\u001b=" - ], - [ - 1.6e-05, - "\u001b[?2004h" - ], - [ - 1.169246, - "g" - ], - [ - 0.271442, - "\bgi" - ], - [ - 0.079187, - "t" - ], - [ - 0.145049, - " " - ], - [ - 0.112281, - "c" - ], - [ - 0.048316, - "o" - ], - [ - 0.091902, - "m" - ], - [ - 0.743999, - "m" - ], - [ - 0.143304, - "i" - ], - [ - 0.107889, - "t" - ], - [ - 0.096264, - " " - ], - [ - 0.132679, - "-" - ], - [ - 0.103518, - "a" - ], - [ - 0.107512, - " " - ], - [ - 0.131904, - "-" - ], - [ - 0.116215, - "-" - ], - [ - 0.115981, - "a" - ], - [ - 0.204267, - "e" - ], - [ - 0.163917, - "n" - ], - [ - 0.392189, - "\b \b" - ], - [ - 0.151483, - "\b \b" - ], - [ - 0.176794, - "m" - ], - [ - 0.103142, - "e" - ], - [ - 0.111978, - "n" - ], - [ - 0.119562, - "d" - ], - [ - 0.112961, - "\u001b[?1l\u001b>" - ], - [ - 0.001554, - "\u001b[?2004l\r\r\n" - ], - [ - 0.00586, - "\u001b]2;git commit -a --amend\u0007\u001b]1;git\u0007" - ], - [ - 0.024458, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.003473, - "\u001b[1;52r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[H\u001b[2J\u001b[?25l\u001b[52;1H\"~/Development/Go/src/github.com/kubernetes-incubator/cri-o/.git/COMMIT_EDITMSG\"" - ], - [ - 0.000192, - " 23L, 623C" - ], - [ - 0.000113, - "\u001b[1;1Himplement kpod rename\r\n\r\nrename a container\r\n\r\nSigned-off-by: Ryan Cole \r\n\r\n# Please enter the commit message for your changes. Lines starting\r\n# with '#' will be ignored, and an empty message aborts the commit.\r\n#\r\n# Date: Mon Aug 14 13:30:24 2017 -0400\r\n#\r\n# On branch kpod-rename\r\n# Changes to be committed:\r\n#\u001b[7Cmodified: cmd/kpod/common.go\r\n#\u001b[7Cmodified: cmd/kpod/main.go\r\n#\u001b[7Cnew file: cmd/kpod/rename.go\r\n#\u001b[7Cmodified: completions/bash/kpod\r\n#\u001b[7Cnew file: docs/kpod-rename.1.md\r\n#\u001b[7Cmodified: docs/kpod.1.md\r\n#\u001b[7Cnew file: libkpod/rename.go\r\n#\u001b[7Cmodified: oci/container.go\r\n#\u001b[7Cnew file: test/kpod_rename.bats\r\n#\r\n\u001b[94m~ \u001b[25;1H~ " - ], - [ - 5.1e-05, - " \u001b[26;1H~ \u001b[27;1H~ \u001b[28;1H~ \u001b[29;1H~ \u001b[30;1H~ " - ], - [ - 3.6e-05, - " \u001b[31;1H~ \u001b[32;1H~ \u001b[33;1H~ \u001b[34;1H~ " - ], - [ - 3.3e-05, - " \u001b[35;1H~ \u001b[36;1H~ \u001b[37;1H~ \u001b[38;1H~ \u001b[39;1H~ " - ], - [ - 9.6e-05, - " \u001b[40;1H~ \u001b[41;1H~ \u001b[42;1H~ \u001b[43;1H~ \u001b[44;1H~ " - ], - [ - 2.8e-05, - " \u001b[45;1H~ \u001b[46;1H~ \u001b[47;1H~ \u001b[48;1H~ \u001b[49;1H~ " - ], - [ - 1.7e-05, - " \u001b[50;1H~ \u001b[51;1H~ \u001b[1;1H\u001b[?12l\u001b[?25h" - ], - [ - 0.324118, - "\u001b[?25l\u001b[m\u001b[52;1H\u001b[K\u001b[52;1H:\u001b[?2004h" - ], - [ - 0.000183, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.183, - "w" - ], - [ - 0.056247, - "q" - ], - [ - 0.073571, - "\r\u001b[?25l\u001b[?2004l\".git/COMMIT_EDITMSG\"" - ], - [ - 0.012337, - " 23L, 623C written" - ], - [ - 9.6e-05, - "\r\r\r\n\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.003601, - "[kpod-rename 1eb21f8e] implement kpod rename\r\n Date: Mon Aug 14 13:30:24 2017 -0400\r\n" - ], - [ - 0.000896, - " 9 files changed, 261 insertions(+), 1 deletion(-)\r\n create mode 100644 cmd/kpod/rename.go\r\n create mode 100644 docs/kpod-rename.1.md\r\n create mode 100644 libkpod/rename.go\r\n create mode 100644 test/kpod_rename.bats\r\n" - ], - [ - 0.000559, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.027462, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-rename \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001241, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000117, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.4e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 9.9e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.3e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.7e-05, - "\u001b[?2004h" - ], - [ - 0.12051, - "g" - ], - [ - 0.119913, - "\bgi" - ], - [ - 0.112417, - "t" - ], - [ - 0.143512, - " " - ], - [ - 0.095889, - "p" - ], - [ - 0.079922, - "u" - ], - [ - 0.088511, - "s" - ], - [ - 0.127486, - "h" - ], - [ - 0.087736, - " " - ], - [ - 0.151933, - "-" - ], - [ - 0.128526, - "f" - ], - [ - 0.112515, - " " - ], - [ - 0.06351, - "o" - ], - [ - 0.136509, - "r" - ], - [ - 0.103539, - "i" - ], - [ - 0.128398, - "g" - ], - [ - 0.063485, - "i" - ], - [ - 0.080165, - "n" - ], - [ - 0.064001, - " " - ], - [ - 0.1677, - "k" - ], - [ - 0.091269, - "pod-" - ], - [ - 0.293058, - "r" - ], - [ - 0.11185, - "e" - ], - [ - 0.135834, - "n" - ], - [ - 0.171262, - "ame\u001b[1m \u001b[0m" - ], - [ - 0.164965, - "\b\u001b[0m \b" - ], - [ - 0.000197, - "\u001b[?1l\u001b>" - ], - [ - 0.000188, - "\u001b[?2004l\r\r\n" - ], - [ - 0.004459, - "\u001b]2;git push -f origin kpod-rename\u0007\u001b]1;git\u0007" - ], - [ - 0.74388, - "Counting objects: 19, done.\r\n" - ], - [ - 0.000183, - "Delta compression using up to 4 threads.\r\n" - ], - [ - 3.8e-05, - "Compressing objects: 5% (1/17) \rCompressing objects: 11% (2/17) \r" - ], - [ - 0.000177, - "Compressing objects: 17% (3/17) \r" - ], - [ - 8.9e-05, - "Compressing objects: 23% (4/17) \r" - ], - [ - 4.7e-05, - "Compressing objects: 29% (5/17) \r" - ], - [ - 0.000114, - "Compressing objects: 35% (6/17) \r" - ], - [ - 0.000132, - "Compressing objects: 41% (7/17) \r" - ], - [ - 9.1e-05, - "Compressing objects: 47% (8/17) \r" - ], - [ - 9.3e-05, - "Compressing objects: 52% (9/17) \r" - ], - [ - 6.5e-05, - "Compressing objects: 58% (10/17) \r" - ], - [ - 3.6e-05, - "Compressing objects: 64% (11/17) \r" - ], - [ - 3.2e-05, - "Compressing objects: 70% (12/17) \r" - ], - [ - 3e-05, - "Compressing objects: 76% (13/17) \r" - ], - [ - 3.8e-05, - "Compressing objects: 82% (14/17) \r" - ], - [ - 3e-05, - "Compressing objects: 88% (15/17) \r" - ], - [ - 2.4e-05, - "Compressing objects: 94% (16/17) \r" - ], - [ - 4.1e-05, - "Compressing objects: 100% (17/17) \r" - ], - [ - 3.5e-05, - "Compressing objects: 100% (17/17), done.\r\n" - ], - [ - 0.000128, - "Writing objects: 5% (1/19) \r" - ], - [ - 6.2e-05, - "Writing objects: 10% (2/19) \r" - ], - [ - 4.2e-05, - "Writing objects: 15% (3/19) \r" - ], - [ - 4.8e-05, - "Writing objects: 21% (4/19) \r" - ], - [ - 4.5e-05, - "Writing objects: 26% (5/19) \r" - ], - [ - 4.6e-05, - "Writing objects: 31% (6/19) \r" - ], - [ - 0.000103, - "Writing objects: 36% (7/19) \r" - ], - [ - 5.3e-05, - "Writing objects: 42% (8/19) \r" - ], - [ - 5.2e-05, - "Writing objects: 47% (9/19) \r" - ], - [ - 8.6e-05, - "Writing objects: 52% (10/19) \r" - ], - [ - 1.7e-05, - "Writing objects: 57% (11/19) \r" - ], - [ - 8.1e-05, - "Writing objects: 63% (12/19) \r" - ], - [ - 4.6e-05, - "Writing objects: 68% (13/19) \r" - ], - [ - 4.2e-05, - "Writing objects: 73% (14/19) \r" - ], - [ - 0.000145, - "Writing objects: 78% (15/19) \r" - ], - [ - 4.1e-05, - "Writing objects: 84% (16/19) \r" - ], - [ - 4.9e-05, - "Writing objects: 89% (17/19) \r" - ], - [ - 3.8e-05, - "Writing objects: 94% (18/19) \r" - ], - [ - 9.1e-05, - "Writing objects: 100% (19/19) \r" - ], - [ - 4.5e-05, - "Writing objects: 100% (19/19), 3.69 KiB | 3.69 MiB/s, done.\r\nTotal 19 (delta 12), reused 0 (delta 0)\r\n" - ], - [ - 0.04705, - "remote: Resolving deltas: 0% (0/12) \u001b[K\r" - ], - [ - 0.038152, - "remote: Resolving deltas: 8% (1/12) \u001b[K\rremote: Resolving deltas: 16% (2/12) \u001b[K\rremote: Resolving deltas: 25% (3/12) \u001b[K\rremote: Resolving deltas: 33% (4/12) \u001b[K\rremote: Resolving deltas: 41% (5/12) \u001b[K\rremote: Resolving deltas: 50% (6/12) \u001b[K\rremote: Resolving deltas: 58% (7/12) \u001b[K\rremote: Resolving deltas: 66% (8/12) \u001b[K\rremote: Resolving deltas: 75% (9/12) \u001b[K\rremote: Resolving deltas: 83% (10/12) \u001b[K\rremote: Resolving deltas: 91% (11/12) \u001b[K\rremote: Resolving deltas: 100% (12/12) \u001b[K\rremote: Resolving deltas: 100% (12/12), completed with 12 local objects.\u001b[K\r\n" - ], - [ - 1.420422, - "To github.com:14rcole/cri-o\r\n + 2a874565...1eb21f8e kpod-rename -> kpod-rename (forced update)\r\n" - ], - [ - 0.002366, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.029573, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-rename \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.002048, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.00012, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 3.3e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000179, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 0.000127, - "\u001b[?1h\u001b=" - ], - [ - 3.6e-05, - "\u001b[?2004h" - ], - [ - 1969.422781, - "k" - ], - [ - 0.16807, - "\bkp" - ], - [ - 0.09268, - "o" - ], - [ - 0.156049, - "d" - ], - [ - 0.087661, - " " - ], - [ - 3.123898, - "r" - ], - [ - 0.360843, - "m" - ], - [ - 0.942902, - "\b \b" - ], - [ - 0.16075, - "\b \b" - ], - [ - 0.151174, - "\b" - ], - [ - 0.176905, - "\b \b" - ], - [ - 0.159513, - "\b \b" - ], - [ - 0.168379, - "\b\bk \b" - ], - [ - 0.15094, - "\b \b" - ], - [ - 0.128879, - "s" - ], - [ - 0.223768, - "\bsd" - ], - [ - 0.280126, - "\b\bs \b" - ], - [ - 0.247922, - "\bsu" - ], - [ - 0.144548, - "d" - ], - [ - 0.095353, - "o" - ], - [ - 0.063452, - " " - ], - [ - 0.073201, - "c" - ], - [ - 0.176123, - "r" - ], - [ - 0.10351, - "i" - ], - [ - 0.071248, - "o" - ], - [ - 0.056543, - "c" - ], - [ - 0.208591, - "t" - ], - [ - 0.071256, - "l" - ], - [ - 0.120819, - " " - ], - [ - 0.224225, - "c" - ], - [ - 0.215122, - "t" - ], - [ - 0.184575, - "r" - ], - [ - 0.199863, - " " - ], - [ - 0.223807, - "l" - ], - [ - 0.104351, - "i" - ], - [ - 0.031403, - "s" - ], - [ - 0.095857, - "t" - ], - [ - 0.176783, - "\u001b[?1l\u001b>" - ], - [ - 0.000303, - "\u001b[?2004l\r\r\n" - ], - [ - 0.006555, - "\u001b]2;sudo crioctl ctr list\u0007\u001b]1;crioctl\u0007" - ], - [ - 0.954158, - "[sudo] password for ryan: " - ], - [ - 1.966785, - "\r\n" - ], - [ - 0.091087, - "ID: d0ddf13569c69f6fed1934eb0e5e9d41b0cf37477c3d42c63931e9b9d2e8ab41\r\nPod: 75d9cdb9e450cd7b67e71136c35e6fa850edfd783b1893f61a69659e2eb8cb77\r\nName: podsandbox1-redis\r\nAttempt: 0\r\nStatus: CONTAINER_RUNNING\r\nImage: redis:alpine\r\nCreated: 2017-08-14 14:45:11.278672966 -0400 EDT\r\nLabels:\r\n\ttier -> backend\r\nAnnotations:\r\n" - ], - [ - 3.3e-05, - "\tpod -> podsandbox1\r\n\r\n" - ], - [ - 0.003294, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.022039, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-rename \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.002127, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000384, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 6.2e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000872, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m " - ], - [ - 5.3e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 3.6e-05, - "\u001b[?1h\u001b=" - ], - [ - 7.8e-05, - "\u001b[?2004h" - ], - [ - 0.48893, - "s" - ], - [ - 0.110979, - "\bsu" - ], - [ - 0.0795, - "d" - ], - [ - 0.080647, - "o" - ], - [ - 0.10398, - " " - ], - [ - 0.087979, - "k" - ], - [ - 0.103896, - "p" - ], - [ - 0.072293, - "o" - ], - [ - 0.063704, - "d" - ], - [ - 0.095893, - " " - ], - [ - 0.07231, - "r" - ], - [ - 0.08694, - "m" - ], - [ - 0.127982, - "i" - ], - [ - 0.072625, - " " - ], - [ - 0.087713, - "r" - ], - [ - 0.080339, - "e" - ], - [ - 0.151296, - "d" - ], - [ - 0.096924, - "i" - ], - [ - 0.119446, - "s" - ], - [ - 0.144858, - ":" - ], - [ - 0.232002, - "a" - ], - [ - 0.087086, - "l" - ], - [ - 0.152797, - "p" - ], - [ - 0.071877, - "i" - ], - [ - 0.080055, - "n" - ], - [ - 0.072073, - "e" - ], - [ - 0.104314, - "\u001b[?1l\u001b>" - ], - [ - 0.0004, - "\u001b[?2004l\r\r\n" - ], - [ - 0.002847, - "\u001b]2;sudo kpod rmi redis:alpine\u0007\u001b]1;kpod\u0007" - ], - [ - 0.089244, - "Could not remove image \"redis:alpine\" (must force) - one or more containers are using its reference image%!(EXTRA int=0)\r\n" - ], - [ - 0.003327, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.023875, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-rename \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.002907, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000104, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 6.8e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[31m❯\u001b[39m " - ], - [ - 2.4e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 4.9e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.6e-05, - "\u001b[?2004h" - ], - [ - 4.955818, - "g" - ], - [ - 0.128566, - "\bgi" - ], - [ - 0.064574, - "t" - ], - [ - 0.095493, - " " - ], - [ - 0.167938, - "c" - ], - [ - 0.112316, - "h" - ], - [ - 0.103897, - "e" - ], - [ - 0.072405, - "c" - ], - [ - 0.054921, - "k" - ], - [ - 0.120936, - "o" - ], - [ - 0.103471, - "u" - ], - [ - 0.063554, - "t" - ], - [ - 0.088583, - " " - ], - [ - 0.176206, - "m" - ], - [ - 0.104132, - "a" - ], - [ - 0.063023, - "s" - ], - [ - 0.251503, - "ter\u001b[1m \u001b[0m" - ], - [ - 0.341276, - "\b\u001b[0m \b" - ], - [ - 0.0001, - "\u001b[?1l\u001b>" - ], - [ - 0.000196, - "\u001b[?2004l" - ], - [ - 0.000167, - "\r\r\n" - ], - [ - 0.004807, - "\u001b]2;git checkout master\u0007\u001b]1;git\u0007" - ], - [ - 0.031022, - "Switched to branch 'master'\r\n" - ], - [ - 5.4e-05, - "Your branch is up-to-date with 'origin/master'.\r\n" - ], - [ - 0.000548, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.02297, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001023, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000111, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.6e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 9.6e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.7e-05, - "\u001b[?1h\u001b=" - ], - [ - 3.6e-05, - "\u001b[?2004h" - ], - [ - 0.154245, - "g" - ], - [ - 0.176512, - "\bgi" - ], - [ - 0.016088, - "t" - ], - [ - 0.104093, - " " - ], - [ - 0.032212, - "p" - ], - [ - 0.103747, - "u" - ], - [ - 0.903255, - "l" - ], - [ - 0.160769, - "l" - ], - [ - 0.118954, - " " - ], - [ - 0.104575, - "-" - ], - [ - 0.151817, - "-" - ], - [ - 0.088524, - "r" - ], - [ - 0.32749, - "\b \b" - ], - [ - 0.14449, - "\b \b" - ], - [ - 0.151997, - "\b \b" - ], - [ - 0.679562, - "u" - ], - [ - 0.05667, - "p" - ], - [ - 0.147276, - "stream\u001b[1m \u001b[0m" - ], - [ - 0.324463, - "\b\u001b[0m m" - ], - [ - 0.088344, - "a" - ], - [ - 0.096029, - "s" - ], - [ - 0.187689, - "ter\u001b[1m:\u001b[0m" - ], - [ - 0.091664, - "\b\u001b[0m \b" - ], - [ - 0.000172, - "\u001b[?1l\u001b>" - ], - [ - 0.000159, - "\u001b[?2004l\r\r\n" - ], - [ - 0.004194, - "\u001b]2;git pull upstream master\u0007\u001b]1;git\u0007" - ], - [ - 1.697902, - "From github.com:kubernetes-incubator/cri-o\r\n * branch master -> FETCH_HEAD\r\n" - ], - [ - 0.057748, - "Updating a69631c1..6ca462a3\r\n" - ], - [ - 0.026098, - "Fast-forward" - ], - [ - 4.3e-05, - "\r\n" - ], - [ - 0.005314, - " README.md | 3 \u001b[32m+\u001b[m\u001b[31m-\u001b[m\r\n cmd/kpod/logs.go | 88 \u001b[32m+++++++++++++++++++++++\u001b[m\r\n cmd/kpod/main.go | 1 \u001b[32m+\u001b[m\r\n code-of-conduct.md | 20 \u001b[32m+++\u001b[m\u001b[31m---\u001b[m\r\n" - ], - [ - 0.000167, - " completions/bash/kpod | 25 \u001b[32m+++++++\u001b[m\r\n docs/kpod-logs.1.md | 61 \u001b[32m++++++++++++++++\u001b[m\r\n libkpod/image/copy.go | 18 \u001b[32m++++\u001b[m\u001b[31m-\u001b[m\r\n libkpod/logs.go | 80 \u001b[32m+++++++++++++++++++++\u001b[m\r\n test/kpod_logs.bats | 77 \u001b[32m++++++++++++++++++++\u001b[m\r\n vendor.conf | 3 \u001b[32m+\u001b[m\r\n vendor/github.com/hpcloud/tail/LICENSE.txt | 21 \u001b[32m++++++\u001b[m\r\n vendor/github.com/hpcloud/tail/README.md | 28 \u001b[32m++++++++\u001b[m\r\n vendor/github.com/hpcloud/tail/ratelimiter/leakybucket.go | 97 \u001b[32m+++++++++++++++++++++++++\u001b[m\r\n vendor/github.com/hpcloud/tail/ratelimiter/memory.go | 58 \u001b[32m+++++++++++++++\u001b[m\r\n vendor/github.com/hpcloud/tail/ratelimiter/storage.go | 6 \u001b[32m++\u001b[m\r\n vendor/github.com/hpcloud/tail/tail.go | 438 " - ], - [ - 2.2e-05, - "\u001b[32m+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\u001b[m\r\n vendor/github.com/hpcloud/tail/tail_posix.go | 11 \u001b[32m+++\u001b[m\r\n vendor/github.com/hpcloud/tail/tail_windows.go | 12 \u001b[32m++++\u001b[m\r\n vendor/github.com/hpcloud/tail/util/util.go | 48 \u001b[32m+++++++++++++\u001b[m\r\n vendor/github.com/hpcloud/tail/watch/filechanges.go | 36 \u001b[32m++++++++++\u001b[m\r\n vendor/github.com/hpcloud/tail/watch/inotify.go | 128 \u001b[32m+++++++++++++++++++++++++++++++++\u001b[m\r\n vendor/github.com/hpcloud/tail/watch/inotify_tracker.go | 260 \u001b[32m+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\u001b[m\r\n vendor/github.com/hpcloud/tail/watch/polling.go | 118 \u001b[32m+++++++++++++++++++++++++++++++\u001b[m\r\n vendor/github.com/hpcloud/tail/watch/watch.go | 20 \u001b[32m++++++\u001b[m\r\n vendor/github.com/hpcloud/tail/winfile/winfile.go | 92 \u001b[32m++++++++++++++++++++++++\u001b[m\r\n vendor/gopkg.in/fsnotify.v1/LICENS" - ], - [ - 1.7e-05, - "E | 28 \u001b[32m++++++++\u001b[m\r\n vendor/gopkg.in/fsnotify.v1/README.md | 50 \u001b[32m+++++++++++++\u001b[m\r\n vendor/gopkg.in/fsnotify.v1/fen.go | 37 \u001b[32m++++++++++\u001b[m\r\n vendor/gopkg.in/fsnotify.v1/fsnotify.go | 62 \u001b[32m++++++++++++++++\u001b[m\r\n vendor/gopkg.in/fsnotify.v1/inotify.go | 325 \u001b[32m++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\u001b[m\r\n vendor/gopkg.in/fsnotify.v1/inotify_poller.go | 187 \u001b[32m+++++++++++++++++++++++++++++++++++++++++++++++++\u001b[m\r\n vendor/gopkg.in/fsnotify.v1/kqueue.go | 503 \u001b[32m++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\u001b[m\r\n vendor/gopkg.in/fsnotify.v1/open_mode_bsd.go | 11 \u001b[32m+++\u001b[m\r\n vendor/gopkg.in/fsnotify.v1/open_mode_darwin.go | 12 \u001b[32m++++\u001b[m\r\n vendor/gopkg.in/fsnotify.v1/windows.go | 561 \u001b[" - ], - [ - 1.6e-05, - "32m+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\u001b[m\r\n vendor/gopkg.in/tomb.v1/LICENSE | 29 \u001b[32m++++++++\u001b[m\r\n vendor/gopkg.in/tomb.v1/README.md | 4 \u001b[32m++\u001b[m\r\n vendor/gopkg.in/tomb.v1/tomb.go | 176 \u001b[32m++++++++++++++++++++++++++++++++++++++++++++++\u001b[m\r\n 38 files changed, 3722 insertions(+), 12 deletions(-)\r\n create mode 100644 cmd/kpod/logs.go\r\n create mode 100644 docs/kpod-logs.1.md\r\n create mode 100644 libkpod/logs.go\r\n create mode 100644 test/kpod_logs.bats\r\n create mode 100644 vendor/github.com/hpcloud/tail/LICENSE.txt\r\n create mode 100644 vendor/github.com/hpcloud/tail/README.md\r\n create mode 100644 vendor/github.com/hpcloud/tail/ratelimiter/leakybucket.go\r\n create mode 100644 vendor/github.com/hpcloud/tail/ratelimiter/memory.go\r\n create mode 100644 vendor/github.com/hpcloud/tail/ratelimiter/storage.go\r\n create mode 100644 ve" - ], - [ - 0.000117, - "ndor/github.com/hpcloud/tail/tail.go\r\n create mode 100644 vendor/github.com/hpcloud/tail/tail_posix.go\r\n create mode 100644 vendor/github.com/hpcloud/tail/tail_windows.go\r\n create mode 100644 vendor/github.com/hpcloud/tail/util/util.go\r\n create mode 100644 vendor/github.com/hpcloud/tail/watch/filechanges.go\r\n create mode 100644 vendor/github.com/hpcloud/tail/watch/inotify.go\r\n create mode 100644 vendor/github.com/hpcloud/tail/watch/inotify_tracker.go\r\n create mode 100644 vendor/github.com/hpcloud/tail/watch/polling.go\r\n create mode 100644 vendor/github.com/hpcloud/tail/watch/watch.go\r\n create mode 100644 vendor/github.com/hpcloud/tail/winfile/winfile.go\r\n create mode 100644 vendor/gopkg.in/fsnotify.v1/LICENSE\r\n create mode 100644 vendor/gopkg.in/fsnotify.v1/README.md\r\n create mode 100644 vendor/gopkg.in/fsnotify.v1/fen.go\r\n create mode 100644 vendor/gopkg.in/fsnotify.v1/fsnotify.go\r\n create mode 100644 vendor/gopkg.in/fsnotify.v1/inotify.go\r\n create mode 100644 vendor/gopkg.in/fsnotify.v1/inotify_poller.go\r\n " - ], - [ - 3.1e-05, - "create mode 100644 vendor/gopkg.in/fsnotify.v1/kqueue.go\r\n create mode 100644 vendor/gopkg.in/fsnotify.v1/open_mode_bsd.go\r\n create mode 100644 vendor/gopkg.in/fsnotify.v1/open_mode_darwin.go\r\n create mode 100644 vendor/gopkg.in/fsnotify.v1/windows.go\r\n create mode 100644 vendor/gopkg.in/tomb.v1/LICENSE\r\n create mode 100644 vendor/gopkg.in/tomb.v1/README.md\r\n create mode 100644 vendor/gopkg.in/tomb.v1/tomb.go\r\n" - ], - [ - 0.001059, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.038598, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001722, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 1.798324, - "v" - ], - [ - 0.088099, - "\bvi" - ], - [ - 0.095471, - " " - ], - [ - 0.313127, - "m" - ], - [ - 0.239446, - "\b \b" - ], - [ - 0.103855, - "c" - ], - [ - 0.104993, - "m" - ], - [ - 0.117338, - "d\u001b[1m/\u001b[0m" - ], - [ - 0.07865, - "\b\u001b[0m/k" - ], - [ - 0.11481, - "pod\u001b[1m/\u001b[0m" - ], - [ - 0.137367, - "\b\u001b[0m/m" - ], - [ - 0.287656, - "\b \b" - ], - [ - 0.135144, - "r" - ], - [ - 0.068676, - "e" - ], - [ - 0.148163, - "n" - ], - [ - 0.157283, - "\u0007" - ], - [ - 0.706737, - "a" - ], - [ - 0.225253, - "\u0007" - ], - [ - 1.09834, - "\b \b" - ], - [ - 0.584105, - "\b \b" - ], - [ - 0.248355, - "m" - ], - [ - 0.259974, - "\b \b" - ], - [ - 0.123623, - "\b \b" - ], - [ - 0.144232, - "m" - ], - [ - 0.159494, - "i" - ], - [ - 0.154991, - ".go\u001b[1m \u001b[0m" - ], - [ - 0.373147, - "\b\u001b[0m \b" - ], - [ - 5.9e-05, - "\u001b[?1l\u001b>" - ], - [ - 0.000152, - "\u001b[?2004l\r\r\n" - ], - [ - 0.003812, - "\u001b]2;vim cmd/kpod/rmi.go\u0007\u001b]1;vi\u0007" - ], - [ - 0.140952, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000561, - "\u001b[1;52r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[52;1H\"cmd/kpod/rmi.go\"" - ], - [ - 0.000112, - " 123L, 3096C" - ], - [ - 0.007972, - "\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[1;1H\u001b[>c" - ], - [ - 0.002019, - "\u001b[1;1H\u001b[96m\u001b[47m 20 \u001b[m\u001b[93m\u001b[107m rmiCommand = cli.Command{\r\n\u001b[96m\u001b[47m 21 \u001b[m\u001b[93m\u001b[107m\u001b[8CName:\u001b[8C\u001b[36m\"rmi\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 22 \u001b[m\u001b[93m\u001b[107m\u001b[8CUsage:\u001b[7C\u001b[36m\"removes one or more images from local storage\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 23 \u001b[m\u001b[93m\u001b[107m\u001b[8CDescription: rmiDescription,\r\n\u001b[96m\u001b[47m 24 \u001b[m\u001b[93m\u001b[107m\u001b[8CAction: rmiCmd,\r\n\u001b[96m\u001b[47m 25 \u001b[m\u001b[93m\u001b[107m\u001b[8CArgsUsage: \u001b[36m\"IMAGE-NAME-OR-ID [...]\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 26 \u001b[m\u001b[93m\u001b[107m\u001b[8CFlags:\u001b[7CrmiFlags,\r\n\u001b[96m\u001b[47m 27 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 28 \u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 29 \r\n 30 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m rmiCmd(c *cli.Context) \u001b[33merror\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 31 \r\n 32 \u001b[m\u001b[93m\u001b[107m force := \u001b[36mfalse\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 33 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m c.IsSet(\u001b[36m\"force\"\u001b[m\u001b[93m\u001b[107m) {\r\n\u001b[96m\u001b[47m 34 \u001b[m\u001b[93m\u001b[107m\u001b[8Cforce = c.Bool(\u001b[36m\"force\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 35 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 36 \r\n 37 \u001b[m\u001b[93m\u001b[107m args := c.Args()\r\n\u001b[96m\u001b[47m 3" - ], - [ - 2.1e-05, - "8 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(args) == \u001b[36m0\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 39 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Errorf(\u001b[36m\"image name or ID must be specified\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 40 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 41 \r\n 42 \u001b[m\u001b[93m\u001b[107m config, err := getConfig(c)\r\n\u001b[96m\u001b[47m 43 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 44 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"Could not get config\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 45 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 46 \u001b[m\u001b[93m\u001b[107m store, err := getStore(config)\r\n\u001b[96m\u001b[47m 47 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 48 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\r\n\u001b[96m\u001b[47m 49 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 50 \r\n 51 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, id := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m args {\r\n\u001b[96m\u001b[47m 52 \u001b[m\u001b[93m\u001b[107m\u001b[8Cimage, err := libkpodimage.FindImage(store, id)\r\n" - ], - [ - 0.032607, - "\u001b[96m\u001b[47m 53 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 54 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"could not get image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 55 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 56 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m image != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 57 \u001b[m\u001b[93m\u001b[107m\u001b[12CctrIDs, err := runningContainers(image, store)\r\n\u001b[96m\u001b[47m 58 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 59 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"error getting running containers for image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 60 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[96m\u001b[47m 61 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(ctrIDs) > \u001b[36m0\u001b[m\u001b[93m\u001b[107m && \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(image.Names) <= \u001b[36m1\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 62 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mif\u001b[m\u001b[93m\u001b[107m force {\r\n\u001b[96m\u001b[47m 63 \u001b[" - ], - [ - 0.000108, - "m\u001b[93m\u001b[107m\u001b[20CremoveContainers(ctrIDs, store)\r\n\u001b[96m\u001b[47m 64 \u001b[m\u001b[93m\u001b[107m\u001b[16C} \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 65 \u001b[m\u001b[93m\u001b[107m\u001b[20C\u001b[32mfor\u001b[m\u001b[93m\u001b[107m ctrID := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m ctrIDs {\r\n\u001b[96m\u001b[47m 66 \u001b[m\u001b[93m\u001b[107m\u001b[24C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m fmt.Errorf(\u001b[36m\"Could not remove image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m (must force) - container \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m is using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\r\n\u001b[96m\u001b[47m 67 \u001b[m\u001b[93m\u001b[107m\u001b[20C}\r\n\u001b[96m\u001b[47m 68 \u001b[m\u001b[93m\u001b[107m\u001b[16C}\r\n\u001b[96m\u001b[47m 69 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;21H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mrmi.go \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[51;39H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                           " - ], - [ - 0.009234, - "                                                                                                             \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:25 \u001b[47;29H\u001b[?12l\u001b[?25h\u001bP+q436f\u001b\\\u001bP+q6b75\u001b\\\u001bP+q6b64\u001b\\\u001bP+q6b72\u001b\\\u001bP+q6b6c\u001b\\\u001bP+q2332\u001b\\\u001bP+q2334\u001b\\\u001bP+q2569\u001b\\\u001bP+q2a37\u001b\\\u001bP+q6b31\u001b\\" - ], - [ - 1.74193, - "\u001b[?25l\u001b[51;210H4\u001b[47;28H\u001b[?12l\u001b[?25h" - ], - [ - 0.184955, - "\u001b[51;210H5\u001b[47;29H" - ], - [ - 0.501563, - "\u001b[51;210H6\u001b[47;30H" - ], - [ - 0.027652, - "\u001b[51;210H7\u001b[47;31H" - ], - [ - 0.031729, - "\u001b[51;210H8\u001b[47;32H" - ], - [ - 0.032977, - "\u001b[51;210H9\u001b[47;33H" - ], - [ - 0.028374, - "\u001b[51;209H30\u001b[47;34H" - ], - [ - 0.029832, - "\u001b[51;210H1\u001b[47;35H" - ], - [ - 0.032526, - "\u001b[51;210H2\u001b[47;36H" - ], - [ - 0.029166, - "\u001b[51;210H3\u001b[47;37H" - ], - [ - 0.031288, - "\u001b[51;210H4\u001b[47;38H" - ], - [ - 0.031594, - "\u001b[51;210H5\u001b[47;39H" - ], - [ - 0.030975, - "\u001b[51;210H6\u001b[47;40H" - ], - [ - 0.029298, - "\u001b[51;210H7\u001b[47;41H" - ], - [ - 0.029023, - "\u001b[51;210H8\u001b[47;42H" - ], - [ - 0.03314, - "\u001b[51;210H9\u001b[47;43H" - ], - [ - 0.031948, - "\u001b[51;209H40\u001b[47;44H" - ], - [ - 0.028742, - "\u001b[51;210H1\u001b[47;45H" - ], - [ - 0.034439, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107mf\u001b[1m\u001b[31m\u001b[106m(\u001b[95C)\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;252m2\u001b[47;46H\u001b[?12l\u001b[?25h" - ], - [ - 0.028925, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m(\u001b[36m\"\u001b[m\u001b[93m\u001b[107m\u001b[94C)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;252m3\u001b[47;47H\u001b[?12l\u001b[?25h" - ], - [ - 0.030179, - "\u001b[51;210H4\u001b[47;48H" - ], - [ - 0.030092, - "\u001b[51;210H5\u001b[47;49H" - ], - [ - 0.03015, - "\u001b[51;210H6\u001b[47;50H" - ], - [ - 0.029603, - "\u001b[51;210H7\u001b[47;51H" - ], - [ - 0.032153, - "\u001b[51;210H8\u001b[47;52H" - ], - [ - 0.030144, - "\u001b[51;210H9\u001b[47;53H" - ], - [ - 0.03006, - "\u001b[51;209H50\u001b[47;54H" - ], - [ - 0.030687, - "\u001b[51;210H1\u001b[47;55H" - ], - [ - 0.02981, - "\u001b[51;210H2\u001b[47;56H" - ], - [ - 0.037596, - "\u001b[51;210H3\u001b[47;57H" - ], - [ - 0.027628, - "\u001b[51;210H4\u001b[47;58H" - ], - [ - 0.026376, - "\u001b[51;210H5\u001b[47;59H" - ], - [ - 0.031146, - "\u001b[51;210H6\u001b[47;60H" - ], - [ - 0.032485, - "\u001b[51;210H7\u001b[47;61H" - ], - [ - 0.026451, - "\u001b[51;210H8\u001b[47;62H" - ], - [ - 0.030128, - "\u001b[51;210H9\u001b[47;63H" - ], - [ - 0.031166, - "\u001b[51;209H60\u001b[47;64H" - ], - [ - 0.036072, - "\u001b[51;210H1\u001b[47;65H" - ], - [ - 0.024924, - "\u001b[51;210H2\u001b[47;66H" - ], - [ - 0.032987, - "\u001b[51;210H3\u001b[47;67H" - ], - [ - 0.029506, - "\u001b[51;210H4\u001b[47;68H" - ], - [ - 0.031373, - "\u001b[51;210H5\u001b[47;69H" - ], - [ - 0.033657, - "\u001b[51;210H6\u001b[47;70H" - ], - [ - 0.02801, - "\u001b[51;210H7\u001b[47;71H" - ], - [ - 0.031093, - "\u001b[51;210H8\u001b[47;72H" - ], - [ - 0.0306, - "\u001b[51;210H9\u001b[47;73H" - ], - [ - 0.034356, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[1m\u001b[31m\u001b[106m(\u001b[10C)\u001b[m\u001b[93m\u001b[107m\u001b[51;209H\u001b[38;5;22m\u001b[48;5;252m70\u001b[47;74H\u001b[?12l\u001b[?25h" - ], - [ - 0.026368, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36m(m\u001b[9C) \u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;252m1\u001b[47;75H\u001b[?12l\u001b[?25h" - ], - [ - 0.031718, - "\u001b[51;210H2\u001b[47;76H" - ], - [ - 0.032486, - "\u001b[51;210H3\u001b[47;77H" - ], - [ - 0.025168, - "\u001b[51;210H4\u001b[47;78H" - ], - [ - 0.036429, - "\u001b[51;210H5\u001b[47;79H" - ], - [ - 0.028144, - "\u001b[51;210H6\u001b[47;80H" - ], - [ - 0.031687, - "\u001b[51;210H7\u001b[47;81H" - ], - [ - 0.031436, - "\u001b[51;210H8\u001b[47;82H" - ], - [ - 0.028164, - "\u001b[51;210H9\u001b[47;83H" - ], - [ - 0.033254, - "\u001b[51;209H80\u001b[47;84H" - ], - [ - 0.033571, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[47;74H\u001b[1m\u001b[31m\u001b[106m(\u001b[10C)\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;252m1\u001b[47;85H\u001b[?12l\u001b[?25h" - ], - [ - 0.028404, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[47;74H\u001b[36m(m\u001b[9C) \u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;252m2\u001b[47;86H\u001b[?12l\u001b[?25h" - ], - [ - 0.029114, - "\u001b[51;210H3\u001b[47;87H" - ], - [ - 0.030981, - "\u001b[51;210H4\u001b[47;88H" - ], - [ - 0.034571, - "\u001b[51;210H5\u001b[47;89H" - ], - [ - 0.02456, - "\u001b[51;210H6\u001b[47;90H" - ], - [ - 0.424165, - "\u001b[51;210H5\u001b[47;89H" - ], - [ - 0.191612, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36montainer \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m is using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;142H\u001b[K\u001b[51;37H\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[51;41H \u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.501563, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mntainer \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m is using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;141H\u001b[K\u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.019326, - "\u001b[?25l\u001b[36mtainer \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m is using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;140H\u001b[K\u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.032305, - "\u001b[?25l\u001b[36mainer \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m is using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;139H\u001b[K\u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.027042, - "\u001b[?25l\u001b[36miner \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m is using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;138H\u001b[K\u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.033786, - "\u001b[?25l\u001b[36mner \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m is using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;137H\u001b[K\u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.032065, - "\u001b[?25l\u001b[36mer \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m is using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;136H\u001b[K\u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.02938, - "\u001b[?25l\u001b[36mr \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m is using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;135H\u001b[K\u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.031174, - "\u001b[?25l\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m is using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;134H\u001b[K\u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.032572, - "\u001b[?25l\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m is using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;133H\u001b[K\u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.025383, - "\u001b[?25l\u001b[36mq is using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;132H\u001b[K\u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.209138, - "\u001b[?25l\u001b[36m is using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;131H\u001b[K\u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.199764, - "\u001b[?25l\u001b[36mis using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;130H\u001b[K\u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.172621, - "\u001b[?25l\u001b[36ms using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;129H\u001b[K\u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.186391, - "\u001b[?25l\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;128H\u001b[K\u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.397295, - "\u001b[?25l\u001b[52;1H\u001b[34m-- INSERT --\u001b[m\u001b[93m\u001b[107m\u001b[52;13H\u001b[K" - ], - [ - 0.04224, - "\u001b[51;1H\u001b[1m\u001b[38;5;23m\u001b[48;5;231m INSERT \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;231m\u001b[48;5;31m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m\u001b[51;12H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;31m\u001b[51;21H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;31mrmi.go\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[38;5;220m\u001b[48;5;31m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[m\u001b[93m\u001b[107m\u001b[51;40H\u001b[38;5;31m\u001b[48;5;24m\u001b[51;41H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;24m                                                                                                                                      \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;182H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;190H\u001b[38;5;117m\u001b[48;5;24m" - ], - [ - 3.5e-05, - " go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;186m\u001b[48;5;31m  54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;24m\u001b[48;5;117m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;117m:85 \u001b[47;89H\u001b[?12l\u001b[?25h" - ], - [ - 0.318684, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mo using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[47;90H\u001b[?12l\u001b[?25h" - ], - [ - 0.085993, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mn using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[47;91H\u001b[?12l\u001b[?25h" - ], - [ - 0.102417, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36me using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[47;92H\u001b[?12l\u001b[?25h" - ], - [ - 0.096152, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m9\u001b[47;93H\u001b[?12l\u001b[?25h" - ], - [ - 0.172551, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mm using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m90\u001b[47;94H\u001b[?12l\u001b[?25h" - ], - [ - 0.084589, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mo using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[47;95H\u001b[?12l\u001b[?25h" - ], - [ - 0.266563, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;133H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m0\u001b[47;94H\u001b[?12l\u001b[?25h" - ], - [ - 0.134027, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[47;132H\u001b[K\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m89\u001b[47;93H\u001b[?12l\u001b[?25h" - ], - [ - 0.160501, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mo using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m90\u001b[47;94H\u001b[?12l\u001b[?25h" - ], - [ - 0.158121, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mr using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[47;95H\u001b[?12l\u001b[?25h" - ], - [ - 0.064495, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[47;96H\u001b[?12l\u001b[?25h" - ], - [ - 0.178203, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mm using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[47;97H\u001b[?12l\u001b[?25h" - ], - [ - 0.070967, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mo using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[47;98H\u001b[?12l\u001b[?25h" - ], - [ - 0.049728, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mr using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[47;99H\u001b[?12l\u001b[?25h" - ], - [ - 0.085073, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36me using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[47;100H\u001b[?12l\u001b[?25h" - ], - [ - 0.064728, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[47;101H\u001b[?12l\u001b[?25h" - ], - [ - 0.115396, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mc using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[47;102H\u001b[?12l\u001b[?25h" - ], - [ - 0.109608, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mo using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m9\u001b[47;103H\u001b[?12l\u001b[?25h" - ], - [ - 0.07234, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mn using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;175H\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;181H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;189H\u001b[38;5;117m\u001b[48;5;24m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;194H\u001b[38;5;186m\u001b[48;5;31m \u001b[1C54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[51;201H\u001b[38;5;24m\u001b[48;5;117m \u001b[51;203H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:100\u001b[47;104H\u001b[?12l\u001b[?25h" - ], - [ - 0.106017, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mt using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[47;105H\u001b[?12l\u001b[?25h" - ], - [ - 0.037147, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36ma using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[47;106H\u001b[?12l\u001b[?25h" - ], - [ - 0.120393, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mi using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[47;107H\u001b[?12l\u001b[?25h" - ], - [ - 0.054877, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mn using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[47;108H\u001b[?12l\u001b[?25h" - ], - [ - 0.055511, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36me using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[47;109H\u001b[?12l\u001b[?25h" - ], - [ - 0.044523, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mr using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[47;110H\u001b[?12l\u001b[?25h" - ], - [ - 0.164345, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36ms using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[47;111H\u001b[?12l\u001b[?25h" - ], - [ - 0.113242, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[36m using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[47;112H\u001b[?12l\u001b[?25h" - ], - [ - 0.065749, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36ma using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m9\u001b[47;113H\u001b[?12l\u001b[?25h" - ], - [ - 0.067013, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36mr using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;209H\u001b[38;5;22m\u001b[48;5;117m10\u001b[47;114H\u001b[?12l\u001b[?25h" - ], - [ - 0.082416, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[36me using its reference image\"\u001b[m\u001b[93m\u001b[107m, id, ctrID)\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m1\u001b[47;115H\u001b[?12l\u001b[?25h" - ], - [ - 0.391867, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[K" - ], - [ - 0.002802, - "\u001b[51;1H\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;31m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;21H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mrmi.go\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[m\u001b[93m\u001b[107m\u001b[51;40H\u001b[38;5;240m\u001b[48;5;236m\u001b[51;41H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                                     \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;181H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;189H\u001b[38;5;247m" - ], - [ - 4.4e-05, - "\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;194H\u001b[38;5;107m\u001b[48;5;240m  54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;201H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;203H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;252m:110 \u001b[47;114H\u001b[?12l\u001b[?25h" - ], - [ - 0.330025, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[47;46H\u001b[1m\u001b[31m\u001b[106m(\u001b[106C)\u001b[m\u001b[93m\u001b[107m\u001b[51;209H\u001b[38;5;22m\u001b[48;5;252m49\u001b[47;153H\u001b[?12l\u001b[?25h" - ], - [ - 0.483853, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[34m-- INSERT --" - ], - [ - 0.009014, - "\u001b[m\u001b[93m\u001b[107m\u001b[51;1H\u001b[1m\u001b[38;5;23m\u001b[48;5;231m INSERT \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;231m\u001b[48;5;31m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m\u001b[51;12H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;31m\u001b[51;21H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;31mrmi.go\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[38;5;220m\u001b[48;5;31m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[m\u001b[93m\u001b[107m\u001b[51;40H\u001b[38;5;31m\u001b[48;5;24m\u001b[51;41H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;24m                                                                                                                                     \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;181H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;189H\u001b[38;5;11" - ], - [ - 8.4e-05, - "7m\u001b[48;5;24m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;194H\u001b[38;5;186m\u001b[48;5;31m  54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[51;201H\u001b[38;5;24m\u001b[48;5;117m \u001b[51;203H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;117m:149 \u001b[47;153H\u001b[?12l\u001b[?25h" - ], - [ - 0.255014, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b)\u001b[47;153H\u001b[K\u001b[47;152H\u001b[1m\u001b[31m\u001b[106m)\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[47;152H\u001b[?12l\u001b[?25h" - ], - [ - 0.143393, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b)\u001b[47;152H\u001b[K\u001b[47;151H\u001b[1m\u001b[31m\u001b[106m)\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[47;151H\u001b[?12l\u001b[?25h" - ], - [ - 0.173726, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b)\u001b[47;151H\u001b[K\u001b[47;150H\u001b[1m\u001b[31m\u001b[106m)\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[47;150H\u001b[?12l\u001b[?25h" - ], - [ - 0.151736, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b)\u001b[47;150H\u001b[K\u001b[47;149H\u001b[1m\u001b[31m\u001b[106m)\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[47;149H\u001b[?12l\u001b[?25h" - ], - [ - 0.17734, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b)\u001b[47;149H\u001b[K\u001b[47;148H\u001b[1m\u001b[31m\u001b[106m)\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m4\u001b[47;148H\u001b[?12l\u001b[?25h" - ], - [ - 0.158422, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b)\u001b[47;148H\u001b[K\u001b[47;147H\u001b[1m\u001b[31m\u001b[106m)\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m3\u001b[47;147H\u001b[?12l\u001b[?25h" - ], - [ - 0.144092, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b)\u001b[47;147H\u001b[K\u001b[47;146H\u001b[1m\u001b[31m\u001b[106m)\u001b[m\u001b[93m\u001b[107m\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m2\u001b[47;146H\u001b[?12l\u001b[?25h" - ], - [ - 0.211601, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[K" - ], - [ - 0.009089, - "\u001b[47;46H(\u001b[36m\"\u001b[m\u001b[93m\u001b[107m\u001b[98C)\u001b[51;1H\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;31m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;21H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mrmi.go\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[m\u001b[93m\u001b[107m\u001b[51;40H\u001b[38;5;240m\u001b[48;5;236m\u001b[51;41H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                                     \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;181H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m " - ], - [ - 3.1e-05, - "\u001b[m\u001b[93m\u001b[107m\u001b[51;189H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;194H\u001b[38;5;107m\u001b[48;5;240m  54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;201H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;203H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;252m:141 \u001b[47;145H\u001b[?12l\u001b[?25h" - ], - [ - 0.214474, - "\u001b[?25l\u001b[52;1H\u001b[m\u001b[93m\u001b[107m:\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.143718, - "w\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.056661, - "q" - ], - [ - 7.6e-05, - "\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.071657, - "\r" - ], - [ - 7.3e-05, - "\u001b[?25l\u001b[?2004l" - ], - [ - 0.023973, - "\"cmd/kpod/rmi.go\"" - ], - [ - 0.003962, - " 123L, 3100C written" - ], - [ - 0.012358, - "\r\r\r\n\u001b[39;49m\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.001868, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.016767, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m13s\u001b[39m\r\n" - ], - [ - 0.001258, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 5.2e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 1.6e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 7e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 5.8e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.4e-05, - "\u001b[?2004h" - ], - [ - 2.403767, - "s" - ], - [ - 0.072404, - "\bsu" - ], - [ - 0.087776, - "d" - ], - [ - 0.10411, - "o" - ], - [ - 0.103535, - " " - ], - [ - 0.112565, - "m" - ], - [ - 0.103814, - "a" - ], - [ - 0.127747, - "k" - ], - [ - 0.104285, - "e" - ], - [ - 0.055181, - " " - ], - [ - 0.096552, - "k" - ], - [ - 0.695888, - "\b \b" - ], - [ - 0.499894, - "\b" - ], - [ - 0.031116, - "\b \b" - ], - [ - 0.031334, - "\b \b" - ], - [ - 0.03129, - "\b \b" - ], - [ - 0.030503, - "\b \b" - ], - [ - 0.029752, - "\b" - ], - [ - 0.03046, - "\b \b" - ], - [ - 0.029619, - "\b \b" - ], - [ - 0.031117, - "\b\bs \b" - ], - [ - 0.030333, - "\b \b" - ], - [ - 0.143801, - "m" - ], - [ - 0.137018, - "\bma" - ], - [ - 0.127748, - "k" - ], - [ - 0.071257, - "e" - ], - [ - 0.112655, - " " - ], - [ - 0.103705, - "k" - ], - [ - 0.120423, - "p" - ], - [ - 0.088219, - "o" - ], - [ - 0.151337, - "d" - ], - [ - 0.144145, - "\u001b[?1l\u001b>" - ], - [ - 0.000245, - "\u001b[?2004l\r\r\n" - ], - [ - 0.003789, - "\u001b]2;make kpod\u0007\u001b]1;make\u0007" - ], - [ - 6.807666, - "go build -ldflags '-X main.gitCommit=6ca462a3 -X main.buildInfo=1502976873' -tags \"selinux seccomp \" -o kpod github.com/kubernetes-incubator/cri-o/cmd/kpod\r\n" - ], - [ - 2.098933, - "# github.com/kubernetes-incubator/cri-o/cmd/kpod\r\ncmd/kpod/rmi.go:65: ctrID declared and not used\r\n" - ], - [ - 0.002582, - "make: *** [Makefile:83: kpod] Error 2\r\n" - ], - [ - 0.000308, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.020816, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m9s\u001b[39m\r\n" - ], - [ - 0.001294, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000209, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007" - ], - [ - 3e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[31m❯\u001b[39m " - ], - [ - 2.1e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 0.000157, - "\u001b[?1h\u001b=" - ], - [ - 3.1e-05, - "\u001b[?2004h" - ], - [ - 2.964102, - "v" - ], - [ - 0.136044, - "\bvu" - ], - [ - 0.095982, - " " - ], - [ - 0.088003, - "c" - ], - [ - 0.08868, - "n" - ], - [ - 0.154713, - "\u0007" - ], - [ - 0.10947, - "j" - ], - [ - 0.161602, - "\u0007" - ], - [ - 0.173494, - "\b \b" - ], - [ - 0.151719, - "\b \b" - ], - [ - 0.609085, - "m" - ], - [ - 0.167394, - "d\u001b[1m/\u001b[0m" - ], - [ - 0.840479, - "\b\u001b[0m/k" - ], - [ - 0.206026, - "pod\u001b[1m/\u001b[0m" - ], - [ - 0.257517, - "\b\u001b[0m/r" - ], - [ - 0.127635, - "m" - ], - [ - 0.103364, - "i.go\u001b[1m \u001b[0m" - ], - [ - 0.616305, - "\b\u001b[0m \b" - ], - [ - 0.000215, - "\u001b[?1l\u001b>" - ], - [ - 0.000236, - "\u001b[?2004l\r\r\n" - ], - [ - 0.004049, - "\u001b]2;vu cmd/kpod/rmi.go\u0007\u001b]1;vu\u0007" - ], - [ - 0.00938, - "zsh: vu: command not found..." - ], - [ - 6.4e-05, - "\r\n" - ], - [ - 0.171147, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.017238, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001466, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.00011, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 1.7e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 8e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[31m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 7.3e-05, - "\u001b[?1h\u001b=" - ], - [ - 3.2e-05, - "\u001b[?2004h" - ], - [ - 0.476196, - "6" - ], - [ - 0.080551, - "\b65" - ], - [ - 0.255454, - "G" - ], - [ - 0.432225, - "\b \b" - ], - [ - 0.159879, - "\b\b6 \b" - ], - [ - 0.1445, - "\b \b" - ], - [ - 0.384217, - "vu cmd/kpod/rmi.go" - ], - [ - 0.895489, - "\u001b[18D" - ], - [ - 0.176977, - "\u001b[1C" - ], - [ - 0.166725, - "\u001b[1C" - ], - [ - 0.256332, - "\b\bv cmd/kpod/rmi.go \u001b[17D" - ], - [ - 0.520213, - "\bvi cmd/kpod/rmi.go\u001b[16D" - ], - [ - 0.223669, - "\u001b[?1l\u001b>" - ], - [ - 0.000151, - "\u001b[?2004l\r\r\n" - ], - [ - 0.00446, - "\u001b]2;vim cmd/kpod/rmi.go\u0007\u001b]1;vi\u0007" - ], - [ - 0.138232, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000485, - "\u001b[1;52r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[52;1H\"cmd/kpod/rmi.go\"" - ], - [ - 0.000106, - " 123L, 3100C" - ], - [ - 0.008045, - "\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[1;1H\u001b[>c" - ], - [ - 0.002005, - "\u001b[1;1H\u001b[96m\u001b[47m 20 \u001b[m\u001b[93m\u001b[107m rmiCommand = cli.Command{\r\n\u001b[96m\u001b[47m 21 \u001b[m\u001b[93m\u001b[107m\u001b[8CName:\u001b[8C\u001b[36m\"rmi\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 22 \u001b[m\u001b[93m\u001b[107m\u001b[8CUsage:\u001b[7C\u001b[36m\"removes one or more images from local storage\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 23 \u001b[m\u001b[93m\u001b[107m\u001b[8CDescription: rmiDescription,\r\n\u001b[96m\u001b[47m 24 \u001b[m\u001b[93m\u001b[107m\u001b[8CAction: rmiCmd,\r\n\u001b[96m\u001b[47m 25 \u001b[m\u001b[93m\u001b[107m\u001b[8CArgsUsage: \u001b[36m\"IMAGE-NAME-OR-ID [...]\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 26 \u001b[m\u001b[93m\u001b[107m\u001b[8CFlags:\u001b[7CrmiFlags,\r\n\u001b[96m\u001b[47m 27 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 28 \u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 29 \r\n 30 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m rmiCmd(c *cli.Context) \u001b[33merror\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 31 \r\n 32 \u001b[m\u001b[93m\u001b[107m force := \u001b[36mfalse\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 33 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m c.IsSet(\u001b[36m\"force\"\u001b[m\u001b[93m\u001b[107m) {\r\n\u001b[96m\u001b[47m 34 \u001b[m\u001b[93m\u001b[107m\u001b[8Cforce = c.Bool(\u001b[36m\"force\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 35 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 36 \r\n 37 \u001b[m\u001b[93m\u001b[107m args := c.Args()\r\n\u001b[96m\u001b[47m 3" - ], - [ - 1.9e-05, - "8 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(args) == \u001b[36m0\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 39 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Errorf(\u001b[36m\"image name or ID must be specified\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 40 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 41 \r\n 42 \u001b[m\u001b[93m\u001b[107m config, err := getConfig(c)\r\n\u001b[96m\u001b[47m 43 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 44 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"Could not get config\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 45 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 46 \u001b[m\u001b[93m\u001b[107m store, err := getStore(config)\r\n\u001b[96m\u001b[47m 47 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 48 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\r\n\u001b[96m\u001b[47m 49 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 50 \r\n 51 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, id := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m args {\r\n\u001b[96m\u001b[47m 52 \u001b[m\u001b[93m\u001b[107m\u001b[8Cimage, err := libkpodimage.FindImage(store, id)\r\n" - ], - [ - 0.031049, - "\u001b[96m\u001b[47m 53 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 54 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"could not get image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 55 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 56 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m image != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 57 \u001b[m\u001b[93m\u001b[107m\u001b[12CctrIDs, err := runningContainers(image, store)\r\n\u001b[96m\u001b[47m 58 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 59 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"error getting running containers for image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 60 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[96m\u001b[47m 61 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(ctrIDs) > \u001b[36m0\u001b[m\u001b[93m\u001b[107m && \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(image.Names) <= \u001b[36m1\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 62 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mif\u001b[m\u001b[93m\u001b[107m force {\r\n\u001b[96m\u001b[47m 63 \u001b[" - ], - [ - 0.000197, - "m\u001b[93m\u001b[107m\u001b[20CremoveContainers(ctrIDs, store)\r\n\u001b[96m\u001b[47m 64 \u001b[m\u001b[93m\u001b[107m\u001b[16C} \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 65 \u001b[m\u001b[93m\u001b[107m\u001b[20C\u001b[32mfor\u001b[m\u001b[93m\u001b[107m ctrID := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m ctrIDs {\r\n\u001b[96m\u001b[47m 66 \u001b[m\u001b[93m\u001b[107m\u001b[24C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m fmt.Errorf(\u001b[36m\"Could not remove image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m (must force) - one or more containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 67 \u001b[m\u001b[93m\u001b[107m\u001b[20C}\r\n\u001b[96m\u001b[47m 68 \u001b[m\u001b[93m\u001b[107m\u001b[16C}\r\n\u001b[96m\u001b[47m 69 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;21H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mrmi.go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;220m\u001b[48;5;240m M \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[51;41H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                        " - ], - [ - 0.009393, - "                                                                                                              \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  54%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 66\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:25 \u001b[47;29H\u001b[?12l\u001b[?25h" - ], - [ - 0.000186, - "\u001bP+q436f\u001b\\\u001bP+q6b75\u001b\\\u001bP+q6b64\u001b\\\u001bP+q6b72\u001b\\\u001bP+q6b6c\u001b\\\u001bP+q2332\u001b\\\u001bP+q2334\u001b\\\u001bP+q2569\u001b\\\u001bP+q2a37\u001b\\\u001bP+q6b31\u001b\\" - ], - [ - 0.894574, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[43;30H\u001b[1m\u001b[31m\u001b[106m{\u001b[45;21H}\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  52%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:17\u001b[45;21H\u001b[?12l\u001b[?25h" - ], - [ - 0.755059, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[43;30H{\u001b[45;21H} \u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  53%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:20\u001b[46;24H\u001b[?12l\u001b[?25h" - ], - [ - 0.297693, - "\u001b[?25l\u001b[51;210H1\u001b[46;25H\u001b[?12l\u001b[?25h" - ], - [ - 0.494594, - "\u001b[51;210H2\u001b[46;26H" - ], - [ - 0.029144, - "\u001b[51;210H3\u001b[46;27H" - ], - [ - 0.189856, - "\u001b[51;210H4\u001b[46;28H" - ], - [ - 0.503162, - "\u001b[51;210H5\u001b[46;29H" - ], - [ - 0.02688, - "\u001b[51;210H6\u001b[46;30H" - ], - [ - 0.031882, - "\u001b[51;210H7\u001b[46;31H" - ], - [ - 0.031015, - "\u001b[51;210H8\u001b[46;32H" - ], - [ - 0.028268, - "\u001b[51;210H9\u001b[46;33H" - ], - [ - 0.725696, - "\u001b[51;209H30\u001b[46;34H" - ], - [ - 5.869681, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[34m-- INSERT --\u001b[m\u001b[93m\u001b[107m\u001b[52;13H\u001b[K" - ], - [ - 0.040358, - "\u001b[51;1H\u001b[1m\u001b[38;5;23m\u001b[48;5;231m INSERT \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;231m\u001b[48;5;31m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m\u001b[51;12H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;31m\u001b[51;21H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;31mrmi.go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;220m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;220m\u001b[48;5;31m M \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[51;41H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;24m                                                                                                                                      \u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;24munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;182H\u001b[38;5;117m\u001b[48;5;24m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;74m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[107m\u001b[51;190H\u001b[38;5;117m\u001b[48;5;24m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m \u001b[m\u001b[93m\u001b[10" - ], - [ - 2.4e-05, - "7m\u001b[51;195H\u001b[38;5;186m\u001b[48;5;31m  53%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;117m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;24m\u001b[48;5;117m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;24m\u001b[48;5;117m 65\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;117m:30 \u001b[46;34H\u001b[?12l\u001b[?25h" - ], - [ - 0.274464, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m ctrIDs {\u001b[46;51H\u001b[K\u001b[51;39H\u001b[1m\u001b[38;5;220m\u001b[48;5;31m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[51;43H \u001b[m\u001b[93m\u001b[107m\u001b[165C\u001b[38;5;22m\u001b[48;5;117m29\u001b[46;33H\u001b[?12l\u001b[?25h" - ], - [ - 0.151925, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m ctrIDs {\u001b[46;50H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m8\u001b[46;32H\u001b[?12l\u001b[?25h" - ], - [ - 0.167731, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m ctrIDs {\u001b[46;49H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m7\u001b[46;31H\u001b[?12l\u001b[?25h" - ], - [ - 0.184041, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m ctrIDs {\u001b[46;48H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[46;30H\u001b[?12l\u001b[?25h" - ], - [ - 0.156407, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m ctrIDs {\u001b[46;47H\u001b[K\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m5\u001b[46;29H\u001b[?12l\u001b[?25h" - ], - [ - 1.347077, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m_ := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m ctrIDs {\u001b[51;210H\u001b[38;5;22m\u001b[48;5;117m6\u001b[46;30H\u001b[?12l\u001b[?25h" - ], - [ - 0.334595, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[K" - ], - [ - 0.014443, - "\u001b[51;1H\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;31m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;21H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mrmi.go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;220m\u001b[48;5;31m \u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;220m\u001b[48;5;240m M\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;31m\u001b[48;5;24m\u001b[m\u001b[93m\u001b[107m\u001b[51;42H\u001b[38;5;240m\u001b[48;5;236m\u001b[51;43H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                                    \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b" - ], - [ - 2.9e-05, - "[m\u001b[93m\u001b[107m\u001b[51;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  53%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 65\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;117m:\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;252m:25 \u001b[46;29H\u001b[?12l\u001b[?25h" - ], - [ - 0.257293, - "\u001b[?25l\u001b[52;1H\u001b[m\u001b[93m\u001b[107m:\u001b[?2004h" - ], - [ - 8.6e-05, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.135176, - "w\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.03633, - "q" - ], - [ - 0.000156, - "\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.124203, - "\r" - ], - [ - 0.0003, - "\u001b[?25l\u001b[?2004l" - ], - [ - 0.023972, - "\"cmd/kpod/rmi.go\"" - ], - [ - 0.012083, - " 123L, 3096C written" - ], - [ - 0.013278, - "\r\r\r\n\u001b[39;49m\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.002006, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.025275, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m13s\u001b[39m\r\n" - ], - [ - 0.001052, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 8.3e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 6.3e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 7e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.4e-05, - "\u001b[?1h\u001b=" - ], - [ - 2e-05, - "\u001b[?2004h" - ], - [ - 0.122123, - "vi cmd/kpod/rmi.go" - ], - [ - 0.183865, - "\u001b[18Dvu\u001b[16C" - ], - [ - 0.8524, - "\u001b[18Dvi\u001b[16C" - ], - [ - 0.251769, - "\u001b[18D \u001b[18D" - ], - [ - 0.427799, - "vi cmd/kpod/rmi.go" - ], - [ - 0.996091, - "\u001b[?1l\u001b>" - ], - [ - 0.000117, - "\u001b[?2004l\r\r\n" - ], - [ - 0.004829, - "\u001b]2;vim cmd/kpod/rmi.go\u0007\u001b]1;vi\u0007" - ], - [ - 0.136844, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000622, - "\u001b[1;52r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[52;1H\"cmd/kpod/rmi.go\"" - ], - [ - 7.1e-05, - " 123L, 3096C" - ], - [ - 0.008554, - "\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[1;1H\u001b[>c" - ], - [ - 0.002929, - "\u001b[1;1H\u001b[96m\u001b[47m 19 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 20 \u001b[m\u001b[93m\u001b[107m rmiCommand = cli.Command{\r\n\u001b[96m\u001b[47m 21 \u001b[m\u001b[93m\u001b[107m\u001b[8CName:\u001b[8C\u001b[36m\"rmi\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 22 \u001b[m\u001b[93m\u001b[107m\u001b[8CUsage:\u001b[7C\u001b[36m\"removes one or more images from local storage\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 23 \u001b[m\u001b[93m\u001b[107m\u001b[8CDescription: rmiDescription,\r\n\u001b[96m\u001b[47m 24 \u001b[m\u001b[93m\u001b[107m\u001b[8CAction: rmiCmd,\r\n\u001b[96m\u001b[47m 25 \u001b[m\u001b[93m\u001b[107m\u001b[8CArgsUsage: \u001b[36m\"IMAGE-NAME-OR-ID [...]\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 26 \u001b[m\u001b[93m\u001b[107m\u001b[8CFlags:\u001b[7CrmiFlags,\r\n\u001b[96m\u001b[47m 27 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 28 \u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 29 \r\n 30 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m rmiCmd(c *cli.Context) \u001b[33merror\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 31 \r\n 32 \u001b[m\u001b[93m\u001b[107m force := \u001b[36mfalse\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 33 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m c.IsSet(\u001b[36m\"force\"\u001b[m\u001b[93m\u001b[107m) {\r\n\u001b[96m\u001b[47m 34 \u001b[m\u001b[93m\u001b[107m\u001b[8Cforce = c.Bool(\u001b[36m\"force\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 35 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 36 \r\n 37 \u001b[m\u001b[93m\u001b[107" - ], - [ - 1.9e-05, - "m args := c.Args()\r\n\u001b[96m\u001b[47m 38 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(args) == \u001b[36m0\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 39 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Errorf(\u001b[36m\"image name or ID must be specified\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 40 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 41 \r\n 42 \u001b[m\u001b[93m\u001b[107m config, err := getConfig(c)\r\n\u001b[96m\u001b[47m 43 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 44 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"Could not get config\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 45 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 46 \u001b[m\u001b[93m\u001b[107m store, err := getStore(config)\r\n\u001b[96m\u001b[47m 47 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 48 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\r\n\u001b[96m\u001b[47m 49 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 50 \r\n 51 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, id := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m args {\r\n\u001b[96m\u001b[47m 52 \u001b[m\u001b[93m\u001b[107m\u001b[8Cimage, err := libkpodimage.FindI" - ], - [ - 0.030095, - "mage(store, id)\r\n\u001b[96m\u001b[47m 53 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 54 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"could not get image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 55 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 56 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m image != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 57 \u001b[m\u001b[93m\u001b[107m\u001b[12CctrIDs, err := runningContainers(image, store)\r\n\u001b[96m\u001b[47m 58 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 59 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"error getting running containers for image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 60 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[96m\u001b[47m 61 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(ctrIDs) > \u001b[36m0\u001b[m\u001b[93m\u001b[107m && \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(image.Names) <= \u001b[36m1\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 62 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mif\u001b[m\u001b[93m\u001b[107m force {\r" - ], - [ - 3.7e-05, - "\n\u001b[96m\u001b[47m 63 \u001b[m\u001b[93m\u001b[107m\u001b[20CremoveContainers(ctrIDs, store)\r\n\u001b[96m\u001b[47m 64 \u001b[m\u001b[93m\u001b[107m\u001b[16C} \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 65 \u001b[m\u001b[93m\u001b[107m\u001b[20C\u001b[32mfor\u001b[m\u001b[93m\u001b[107m _ := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m ctrIDs {\r\n\u001b[96m\u001b[47m 66 \u001b[m\u001b[93m\u001b[107m\u001b[24C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m fmt.Errorf(\u001b[36m\"Could not remove image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m (must force) - one or more containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 67 \u001b[m\u001b[93m\u001b[107m\u001b[20C}\r\n\u001b[96m\u001b[47m 68 \u001b[m\u001b[93m\u001b[107m\u001b[16C}\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;21H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mrmi.go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;220m\u001b[48;5;240m M \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[51;41H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                    " - ], - [ - 0.011253, - "                                                                                                  \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  53%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 65\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:21 \u001b[47;25H\u001b[?12l\u001b[?25h\u001bP+q436f\u001b\\\u001bP+q6b75\u001b\\\u001bP+q6b64\u001b\\\u001bP+q6b72\u001b\\\u001bP+q6b6c\u001b\\\u001bP+q2332\u001b\\\u001bP+q2334\u001b\\\u001bP+q2569\u001b\\\u001bP+q2a37\u001b\\\u001bP+q6b31\u001b\\" - ], - [ - 0.884291, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[K\u001b[52;1H:\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.175395, - "q\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.047934, - "\r" - ], - [ - 0.019314, - "\u001b[?25l\u001b[?2004l\u001b[52;1H\u001b[K\u001b[52;1H\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.001837, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.019156, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001205, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000106, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.3e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 9.5e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.6e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.1e-05, - "\u001b[?2004h" - ], - [ - 0.22274, - "m" - ], - [ - 0.120257, - "\bma" - ], - [ - 0.087838, - "k" - ], - [ - 0.119717, - "e" - ], - [ - 0.055994, - " " - ], - [ - 0.103706, - "k" - ], - [ - 0.080698, - "p" - ], - [ - 0.051603, - "o" - ], - [ - 0.124175, - "d" - ], - [ - 0.076543, - "\u001b[?1l\u001b>\u001b[?2004l\r\r\n" - ], - [ - 0.004916, - "\u001b]2;make kpod\u0007\u001b]1;make\u0007" - ], - [ - 6.744424, - "go build -ldflags '-X main.gitCommit=6ca462a3 -X main.buildInfo=1502976912' -tags \"selinux seccomp \" -o kpod github.com/kubernetes-incubator/cri-o/cmd/kpod\r\n" - ], - [ - 1.99486, - "# github.com/kubernetes-incubator/cri-o/cmd/kpod\r\ncmd/kpod/rmi.go:65: no new variables on left side of :=\r\n" - ], - [ - 0.002634, - "make: *** [Makefile:83: kpod] Error 2\r\n" - ], - [ - 0.000711, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.019707, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m9s\u001b[39m\r\n" - ], - [ - 0.001352, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000124, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000112, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[31m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 4.6e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.8e-05, - "\u001b[?2004h" - ], - [ - 12.559376, - "make kpod" - ], - [ - 0.160079, - "\u001b[9Dvi cmd/kpod/rmi.go" - ], - [ - 0.376119, - "\\" - ], - [ - 0.719352, - "\u001b[?1l\u001b>" - ], - [ - 0.000252, - "\u001b[?2004l\r\r\n" - ], - [ - 0.000889, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J> \u001b[K" - ], - [ - 0.000257, - "\u001b[?1h\u001b=" - ], - [ - 9e-05, - "\u001b[?2004h" - ], - [ - 0.814396, - "\u001b[?2004l\r\r\n" - ], - [ - 0.002088, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.020752, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m24s\u001b[39m\r\n" - ], - [ - 0.001027, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000116, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.6e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000109, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[31m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 7.1e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.9e-05, - "\u001b[?2004h" - ], - [ - 0.191891, - "vi cmd/kpod/rmi.go\\" - ], - [ - 0.255869, - "\b \b" - ], - [ - 0.164227, - "\u001b[?1l\u001b>" - ], - [ - 0.000395, - "\u001b[?2004l\r\r\n" - ], - [ - 0.005085, - "\u001b]2;vim cmd/kpod/rmi.go\u0007\u001b]1;vi\u0007" - ], - [ - 0.139286, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000664, - "\u001b[1;52r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[52;1H\"cmd/kpod/rmi.go\" 123L, 3096C" - ], - [ - 0.007849, - "\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[1;1H\u001b[>c" - ], - [ - 0.001971, - "\u001b[1;1H\u001b[96m\u001b[47m 19 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 20 \u001b[m\u001b[93m\u001b[107m rmiCommand = cli.Command{\r\n\u001b[96m\u001b[47m 21 \u001b[m\u001b[93m\u001b[107m\u001b[8CName:\u001b[8C\u001b[36m\"rmi\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 22 \u001b[m\u001b[93m\u001b[107m\u001b[8CUsage:\u001b[7C\u001b[36m\"removes one or more images from local storage\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 23 \u001b[m\u001b[93m\u001b[107m\u001b[8CDescription: rmiDescription,\r\n\u001b[96m\u001b[47m 24 \u001b[m\u001b[93m\u001b[107m\u001b[8CAction: rmiCmd,\r\n\u001b[96m\u001b[47m 25 \u001b[m\u001b[93m\u001b[107m\u001b[8CArgsUsage: \u001b[36m\"IMAGE-NAME-OR-ID [...]\"\u001b[m\u001b[93m\u001b[107m,\r\n\u001b[96m\u001b[47m 26 \u001b[m\u001b[93m\u001b[107m\u001b[8CFlags:\u001b[7CrmiFlags,\r\n\u001b[96m\u001b[47m 27 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 28 \u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 29 \r\n 30 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m rmiCmd(c *cli.Context) \u001b[33merror\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 31 \r\n 32 \u001b[m\u001b[93m\u001b[107m force := \u001b[36mfalse\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 33 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m c.IsSet(\u001b[36m\"force\"\u001b[m\u001b[93m\u001b[107m) {\r\n\u001b[96m\u001b[47m 34 \u001b[m\u001b[93m\u001b[107m\u001b[8Cforce = c.Bool(\u001b[36m\"force\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 35 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 36 \r\n 37 \u001b[m\u001b[93m\u001b[107" - ], - [ - 2e-05, - "m args := c.Args()\r\n\u001b[96m\u001b[47m 38 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(args) == \u001b[36m0\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 39 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Errorf(\u001b[36m\"image name or ID must be specified\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 40 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 41 \r\n 42 \u001b[m\u001b[93m\u001b[107m config, err := getConfig(c)\r\n\u001b[96m\u001b[47m 43 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 44 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"Could not get config\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 45 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 46 \u001b[m\u001b[93m\u001b[107m store, err := getStore(config)\r\n\u001b[96m\u001b[47m 47 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 48 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\r\n\u001b[96m\u001b[47m 49 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 50 \r\n 51 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, id := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m args {\r\n\u001b[96m\u001b[47m 52 \u001b[m\u001b[93m\u001b[107m\u001b[8Cimage, err := libkpodimage.FindI" - ], - [ - 0.030785, - "mage(store, id)\r\n\u001b[96m\u001b[47m 53 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 54 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"could not get image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 55 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 56 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m image != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 57 \u001b[m\u001b[93m\u001b[107m\u001b[12CctrIDs, err := runningContainers(image, store)\r\n\u001b[96m\u001b[47m 58 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 59 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"error getting running containers for image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 60 \u001b[m\u001b[93m\u001b[107m\u001b[12C}\r\n\u001b[96m\u001b[47m 61 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(ctrIDs) > \u001b[36m0\u001b[m\u001b[93m\u001b[107m && \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(image.Names) <= \u001b[36m1\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 62 \u001b[m\u001b[93m\u001b[107m\u001b[16C\u001b[32mif\u001b[m\u001b[93m\u001b[107m force {\r" - ], - [ - 3e-05, - "\n\u001b[96m\u001b[47m 63 \u001b[m\u001b[93m\u001b[107m\u001b[20CremoveContainers(ctrIDs, store)\r\n\u001b[96m\u001b[47m 64 \u001b[m\u001b[93m\u001b[107m\u001b[16C} \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 65 \u001b[m\u001b[93m\u001b[107m\u001b[20C\u001b[32mfor\u001b[m\u001b[93m\u001b[107m _ := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m ctrIDs {\r\n\u001b[96m\u001b[47m 66 \u001b[m\u001b[93m\u001b[107m\u001b[24C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m fmt.Errorf(\u001b[36m\"Could not remove image \u001b[m\u001b[93m\u001b[107m\u001b[31m%q\u001b[m\u001b[93m\u001b[107m\u001b[36m (must force) - one or more containers are using its reference image\"\u001b[m\u001b[93m\u001b[107m, id)\r\n\u001b[96m\u001b[47m 67 \u001b[m\u001b[93m\u001b[107m\u001b[20C}\r\n\u001b[96m\u001b[47m 68 \u001b[m\u001b[93m\u001b[107m\u001b[16C}\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;21H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mrmi.go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;220m\u001b[48;5;240m M \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[51;41H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                    " - ], - [ - 0.009791, - "                                                                                                  \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  53%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 65\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:21 \u001b[47;25H\u001b[?12l\u001b[?25h" - ], - [ - 3.2e-05, - "\u001bP+q436f\u001b\\\u001bP+q6b75\u001b\\\u001bP+q6b64\u001b\\\u001bP+q6b72\u001b\\\u001bP+q6b6c\u001b\\\u001bP+q2332\u001b\\\u001bP+q2334\u001b\\\u001bP+q2569\u001b\\\u001bP+q2a37\u001b\\\u001bP+q6b31\u001b\\" - ], - [ - 0.549454, - "\u001b[?25l\u001b[51;210H2\u001b[47;26H\u001b[?12l\u001b[?25h" - ], - [ - 0.282227, - "\u001b[51;210H3\u001b[47;27H" - ], - [ - 0.500981, - "\u001b[51;210H4\u001b[47;28H" - ], - [ - 0.028181, - "\u001b[51;210H5\u001b[47;29H" - ], - [ - 0.120266, - "\u001b[51;210H6\u001b[47;30H" - ], - [ - 0.176334, - "\u001b[51;210H7\u001b[47;31H" - ], - [ - 0.332685, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m= \u001b[32mrange\u001b[m\u001b[93m\u001b[107m ctrIDs {\u001b[47;47H\u001b[K\u001b[51;39H\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[51;43H \u001b[47;31H\u001b[?12l\u001b[?25h" - ], - [ - 0.457865, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[K\u001b[52;1H:\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.16749, - "w\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.072064, - "q\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.096121, - "\r" - ], - [ - 0.000123, - "\u001b[?25l\u001b[?2004l" - ], - [ - 0.01842, - "\"cmd/kpod/rmi.go\"" - ], - [ - 0.012505, - " 123L, 3095C written" - ], - [ - 0.016238, - "\r\r\r\n\u001b[39;49m\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.002512, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.022671, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001565, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000124, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 3e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000106, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 7.2e-05, - "\u001b[?1h\u001b=" - ], - [ - 3.7e-05, - "\u001b[?2004h" - ], - [ - 0.334146, - "vi cmd/kpod/rmi.go" - ], - [ - 0.182947, - "\\" - ], - [ - 0.599976, - "\u001b[?1l\u001b>" - ], - [ - 5.2e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.000542, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J> \u001b[K" - ], - [ - 0.000169, - "\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 1.143722, - "\u001b[?2004l\r\r\n" - ], - [ - 0.001295, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.028119, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m6s\u001b[39m\r\n" - ], - [ - 0.00136, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000114, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 1.7e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000126, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[31m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.9e-05, - "\u001b[?1h\u001b=" - ], - [ - 3.2e-05, - "\u001b[?2004h" - ], - [ - 0.193141, - "vi cmd/kpod/rmi.go\\" - ], - [ - 0.159626, - "\b \b" - ], - [ - 0.18457, - "\\" - ], - [ - 0.29669, - "\u001b[19Dmake kpod \u001b[10D" - ], - [ - 0.863034, - "\u001b[?1l\u001b>" - ], - [ - 0.000232, - "\u001b[?2004l\r\r\n" - ], - [ - 0.004368, - "\u001b]2;make kpod\u0007\u001b]1;make\u0007" - ], - [ - 6.733531, - "go build -ldflags '-X main.gitCommit=6ca462a3 -X main.buildInfo=1502976943' -tags \"selinux seccomp \" -o kpod github.com/kubernetes-incubator/cri-o/cmd/kpod\r\n" - ], - [ - 4.55149, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.018009, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m12s\u001b[39m\r\n" - ], - [ - 0.001122, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000105, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007" - ], - [ - 8.3e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.1e-05, - "\u001b[?1h\u001b=" - ], - [ - 2e-05, - "\u001b[?2004h" - ], - [ - 20.811668, - "m" - ], - [ - 0.119573, - "\bma" - ], - [ - 0.111827, - "k" - ], - [ - 0.080357, - "e" - ], - [ - 0.103149, - " " - ], - [ - 0.084516, - "k" - ], - [ - 0.143968, - "p" - ], - [ - 0.079279, - "o" - ], - [ - 0.088902, - "d" - ], - [ - 0.135804, - "\u001b[?1l\u001b>" - ], - [ - 0.000119, - "\u001b[?2004l" - ], - [ - 0.000522, - "\r\r\n" - ], - [ - 0.003588, - "\u001b]2;make kpod\u0007\u001b]1;make\u0007" - ], - [ - 6.696294, - "make: 'kpod' is up to date.\r\n" - ], - [ - 0.000283, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.020139, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m7s\u001b[39m\r\n" - ], - [ - 0.001161, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 9e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.8e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000108, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.5e-05, - "\u001b[?1h\u001b=" - ], - [ - 7.7e-05, - "\u001b[?2004h" - ], - [ - 243.314771, - "s" - ], - [ - 0.111394, - "\bsu" - ], - [ - 0.096183, - "d" - ], - [ - 0.080041, - "o" - ], - [ - 0.128398, - " " - ], - [ - 0.119735, - "m" - ], - [ - 0.095922, - "a" - ], - [ - 0.088141, - "k" - ], - [ - 0.072233, - "e" - ], - [ - 0.095742, - " " - ], - [ - 0.087941, - "i" - ], - [ - 0.104278, - "n" - ], - [ - 0.032039, - "s" - ], - [ - 0.118983, - "t" - ], - [ - 0.072644, - "a" - ], - [ - 0.143994, - "l" - ], - [ - 0.168065, - "l" - ], - [ - 0.752715, - "\u001b[?1l\u001b>\u001b[?2004l\r\r\n" - ], - [ - 0.009834, - "\u001b]2;sudo make install\u0007\u001b]1;make\u0007" - ], - [ - 0.955201, - "[sudo] password for ryan: " - ], - [ - 20.245864, - "\r\n" - ], - [ - 0.045577, - "mkdir -p \"/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/_output/src/github.com/kubernetes-incubator\"\r\n" - ], - [ - 0.001888, - "ln -s \"/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\" \"/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/_output/src/github.com/kubernetes-incubator\"\r\n" - ], - [ - 0.001297, - "touch \"/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/_output/.gopathok\"\r\n" - ], - [ - 0.001197, - "install -D -m 755 crio /usr/local/bin/crio\r\n" - ], - [ - 0.000745, - "install: cannot stat 'crio': No such file or directory\r\n" - ], - [ - 0.000258, - "make: *** [Makefile:133: install] Error 1\r\n" - ], - [ - 0.002376, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.025148, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m21s\u001b[39m\r\n" - ], - [ - 0.001447, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000116, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 3.1e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000295, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[31m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 8.2e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.9e-05, - "\u001b[?2004h" - ], - [ - 16.688284, - "s" - ], - [ - 0.136222, - "\bsu" - ], - [ - 0.119402, - "d" - ], - [ - 0.080011, - "o" - ], - [ - 0.135772, - " " - ], - [ - 0.088659, - "m" - ], - [ - 0.112281, - "a" - ], - [ - 0.118598, - "k" - ], - [ - 0.120387, - "e" - ], - [ - 0.104104, - " " - ], - [ - 0.248577, - "u" - ], - [ - 0.215792, - "n" - ], - [ - 0.140158, - "i" - ], - [ - 0.067519, - "n" - ], - [ - 0.071505, - "s" - ], - [ - 0.104231, - "t" - ], - [ - 0.08841, - "a" - ], - [ - 0.120753, - "l" - ], - [ - 0.111041, - "l" - ], - [ - 0.188244, - "\u001b[?1l\u001b>" - ], - [ - 0.000191, - "\u001b[?2004l\r\r\n" - ], - [ - 0.008904, - "\u001b]2;sudo make uninstall\u0007\u001b]1;make\u0007" - ], - [ - 2.992644, - "rm -f /usr/local/bin/crio\r\n" - ], - [ - 0.008835, - "rm -f /usr/local/bin/crioctl\r\n" - ], - [ - 0.006105, - "rm -f /usr/local/libexec/crio/conmon\r\n" - ], - [ - 0.001162, - "rm -f /usr/local/libexec/crio/pause" - ], - [ - 0.000104, - "\r\n" - ], - [ - 0.000807, - "for i in docs/kpod-diff.1 docs/kpod-push.1 docs/kpod.1 docs/kpod-export.1 docs/kpod-load.1 docs/kpod-images.1 docs/kpod-umount.1 docs/kpod-save.1 docs/kpod-cp.1 docs/kpod-info.1 docs/kpod-mount.1 docs/kpod-inspect.1 docs/kpod-logs.1 docs/kpod-history.1 docs/kpod-pull.1 docs/kpod-rmi.1 docs/kpod-version.1 docs/kpod-tag.1; do \\\r\n\trm -f /usr/local/share/man/man8/$(basename ${i}); \\\r\ndone\r\n" - ], - [ - 0.038238, - "for i in docs/crio.conf.5; do \\\r\n\trm -f /usr/local/share/man/man5/$(basename ${i}); \\\r\ndone\r\n" - ], - [ - 0.003095, - "for i in docs/crio.8; do \\\r\n\trm -f /usr/local/share/man/man8/$(basename ${i}); \\\r\ndone\r\n" - ], - [ - 0.006486, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.024997, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001214, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 8.9e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.5e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 8e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 8e-05, - "\u001b[?1h\u001b=" - ], - [ - 3.1e-05, - "\u001b[?2004h" - ], - [ - 0.734872, - "m" - ], - [ - 0.09234, - "\bma" - ], - [ - 0.115606, - "k" - ], - [ - 0.060071, - "e" - ], - [ - 0.080073, - " " - ], - [ - 0.10406, - "a" - ], - [ - 0.055694, - "l" - ], - [ - 0.108501, - "l" - ], - [ - 0.199594, - "\u001b[?1l\u001b>" - ], - [ - 6.5e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.00357, - "\u001b]2;make all\u0007" - ], - [ - 7.2e-05, - "\u001b]1;make\u0007" - ], - [ - 7.412593, - "go build -ldflags '-X main.gitCommit=6ca462a3 -X main.buildInfo=1502977274' -tags \"selinux seccomp \" -o crio github.com/kubernetes-incubator/cri-o/cmd/crio\r\n" - ], - [ - 6.928493, - "go build -ldflags '-X main.gitCommit=6ca462a3 -X main.buildInfo=1502977274' -tags \"selinux seccomp \" -o crioctl github.com/kubernetes-incubator/cri-o/cmd/crioctl\r\n" - ], - [ - 1.93333, - "make -C conmon\r\n" - ], - [ - 0.004362, - "make[1]: Entering directory '/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/conmon'\r\n" - ], - [ - 0.000772, - "cc -std=c99 -Os -Wall -Wextra -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -c -o conmon.o conmon.c\r\n" - ], - [ - 0.314835, - "cc -std=c99 -Os -Wall -Wextra -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -c -o cmsg.o cmsg.c\r\n" - ], - [ - 0.040765, - "cc -o conmon conmon.o cmsg.o -std=c99 -Os -Wall -Wextra -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -lglib-2.0 \r\n" - ], - [ - 0.01855, - "make[1]: Leaving directory '/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/conmon'\r\n" - ], - [ - 0.000285, - "make -C pause\r\n" - ], - [ - 0.00317, - "make[1]: Entering directory '/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/pause'\r\ncc -std=c99 -Os -Wall -Wextra -static -c -o pause.o pause.c\r\n" - ], - [ - 0.030319, - "cc -o pause pause.o -std=c99 -Os -Wall -Wextra -static \r\n" - ], - [ - 0.090802, - "strip pause\r\n" - ], - [ - 0.004286, - "make[1]: Leaving directory '/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o/pause'\r\n" - ], - [ - 0.068555, - "go build -ldflags '-X main.gitCommit=6ca462a3 -X main.buildInfo=1502977274' -tags \"selinux seccomp \" -o test/bin2img/bin2img github.com/kubernetes-incubator/cri-o/test/bin2img\r\n" - ], - [ - 2.210776, - "go build -ldflags '-X main.gitCommit=6ca462a3 -X main.buildInfo=1502977274' -tags \"selinux seccomp \" -o test/copyimg/copyimg github.com/kubernetes-incubator/cri-o/test/copyimg\r\n" - ], - [ - 2.412996, - "go build -ldflags '-X main.gitCommit=6ca462a3 -X main.buildInfo=1502977274' -tags \"selinux seccomp \" -o test/checkseccomp/checkseccomp github.com/kubernetes-incubator/cri-o/test/checkseccomp" - ], - [ - 6.7e-05, - "\r\n" - ], - [ - 0.162664, - "./crio --config=\"\" config --default > crio.conf\r\n" - ], - [ - 0.091642, - "(go-md2man -in docs/kpod-diff.1.md -out docs/kpod-diff.1.tmp && touch docs/kpod-diff.1.tmp && mv docs/kpod-diff.1.tmp docs/kpod-diff.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-diff.1.md -out docs/kpod-diff.1.tmp && touch docs/kpod-diff.1.tmp && mv docs/kpod-diff.1.tmp docs/kpod-diff.1)\r\n" - ], - [ - 0.006608, - "(go-md2man -in docs/kpod-push.1.md -out docs/kpod-push.1.tmp && touch docs/kpod-push.1.tmp && mv docs/kpod-push.1.tmp docs/kpod-push.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-push.1.md -out docs/kpod-push.1.tmp && touch docs/kpod-push.1.tmp && mv docs/kpod-push.1.tmp docs/kpod-push.1)\r\n" - ], - [ - 0.008204, - "(go-md2man -in docs/crio.conf.5.md -out docs/crio.conf.5.tmp && touch docs/crio.conf.5.tmp && mv docs/crio.conf.5.tmp docs/crio.conf.5) || (/home/ryan/Development/Go/bin/go-md2man -in docs/crio.conf.5.md -out docs/crio.conf.5.tmp && touch docs/crio.conf.5.tmp && mv docs/crio.conf.5.tmp docs/crio.conf.5)\r\n" - ], - [ - 0.00881, - "(go-md2man -in docs/kpod.1.md -out docs/kpod.1.tmp && touch docs/kpod.1.tmp && mv docs/kpod.1.tmp docs/kpod.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod.1.md -out docs/kpod.1.tmp && touch docs/kpod.1.tmp && mv docs/kpod.1.tmp docs/kpod.1)\r\n" - ], - [ - 0.008192, - "(go-md2man -in docs/kpod-export.1.md -out docs/kpod-export.1.tmp && touch docs/kpod-export.1.tmp && mv docs/kpod-export.1.tmp docs/kpod-export.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-export.1.md -out docs/kpod-export.1.tmp && touch docs/kpod-export.1.tmp && mv docs/kpod-export.1.tmp docs/kpod-export.1)\r\n" - ], - [ - 0.0109, - "(go-md2man -in docs/kpod-load.1.md -out docs/kpod-load.1.tmp && touch docs/kpod-load.1.tmp && mv docs/kpod-load.1.tmp docs/kpod-load.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-load.1.md -out docs/kpod-load.1.tmp && touch docs/kpod-load.1.tmp && mv docs/kpod-load.1.tmp docs/kpod-load.1)\r\n" - ], - [ - 0.009389, - "(go-md2man -in docs/kpod-images.1.md -out docs/kpod-images.1.tmp && touch docs/kpod-images.1.tmp && mv docs/kpod-images.1.tmp docs/kpod-images.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-images.1.md -out docs/kpod-images.1.tmp && touch docs/kpod-images.1.tmp && mv docs/kpod-images.1.tmp docs/kpod-images.1)\r\n" - ], - [ - 0.005353, - "(go-md2man -in docs/kpod-umount.1.md -out docs/kpod-umount.1.tmp && touch docs/kpod-umount.1.tmp && mv docs/kpod-umount.1.tmp docs/kpod-umount.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-umount.1.md -out docs/kpod-umount.1.tmp && touch docs/kpod-umount.1.tmp && mv docs/kpod-umount.1.tmp docs/kpod-umount.1)\r\n" - ], - [ - 0.008716, - "(go-md2man -in docs/crio.8.md -out docs/crio.8.tmp && touch docs/crio.8.tmp && mv docs/crio.8.tmp docs/crio.8) || (/home/ryan/Development/Go/bin/go-md2man -in docs/crio.8.md -out docs/crio.8.tmp && touch docs/crio.8.tmp && mv docs/crio.8.tmp docs/crio.8)\r\n" - ], - [ - 0.010697, - "(go-md2man -in docs/kpod-save.1.md -out docs/kpod-save.1.tmp && touch docs/kpod-save.1.tmp && mv docs/kpod-save.1.tmp docs/kpod-save.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-save.1.md -out docs/kpod-save.1.tmp && touch docs/kpod-save.1.tmp && mv docs/kpod-save.1.tmp docs/kpod-save.1)\r\n" - ], - [ - 0.007561, - "(go-md2man -in docs/kpod-cp.1.md -out docs/kpod-cp.1.tmp && touch docs/kpod-cp.1.tmp && mv docs/kpod-cp.1.tmp docs/kpod-cp.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-cp.1.md -out docs/kpod-cp.1.tmp && touch docs/kpod-cp.1.tmp && mv docs/kpod-cp.1.tmp docs/kpod-cp.1)\r\n" - ], - [ - 0.005973, - "(go-md2man -in docs/kpod-info.1.md -out docs/kpod-info.1.tmp && touch docs/kpod-info.1.tmp && mv docs/kpod-info.1.tmp docs/kpod-info.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-info.1.md -out docs/kpod-info.1.tmp && touch docs/kpod-info.1.tmp && mv docs/kpod-info.1.tmp docs/kpod-info.1)\r\n" - ], - [ - 0.005551, - "(go-md2man -in docs/kpod-mount.1.md -out docs/kpod-mount.1.tmp && touch docs/kpod-mount.1.tmp && mv docs/kpod-mount.1.tmp docs/kpod-mount.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-mount.1.md -out docs/kpod-mount.1.tmp && touch docs/kpod-mount.1.tmp && mv docs/kpod-mount.1.tmp docs/kpod-mount.1)\r\n" - ], - [ - 0.009121, - "(go-md2man -in docs/kpod-inspect.1.md -out docs/kpod-inspect.1.tmp && touch docs/kpod-inspect.1.tmp && mv docs/kpod-inspect.1.tmp docs/kpod-inspect.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-inspect.1.md -out docs/kpod-inspect.1.tmp && touch docs/kpod-inspect.1.tmp && mv docs/kpod-inspect.1.tmp docs/kpod-inspect.1)\r\n" - ], - [ - 0.006826, - "(go-md2man -in docs/kpod-logs.1.md -out docs/kpod-logs.1.tmp && touch docs/kpod-logs.1.tmp && mv docs/kpod-logs.1.tmp docs/kpod-logs.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-logs.1.md -out docs/kpod-logs.1.tmp && touch docs/kpod-logs.1.tmp && mv docs/kpod-logs.1.tmp docs/kpod-logs.1)\r\n" - ], - [ - 0.007772, - "(go-md2man -in docs/kpod-history.1.md -out docs/kpod-history.1.tmp && touch docs/kpod-history.1.tmp && mv docs/kpod-history.1.tmp docs/kpod-history.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-history.1.md -out docs/kpod-history.1.tmp && touch docs/kpod-history.1.tmp && mv docs/kpod-history.1.tmp docs/kpod-history.1)\r\n" - ], - [ - 0.005003, - "(go-md2man -in docs/kpod-pull.1.md -out docs/kpod-pull.1.tmp && touch docs/kpod-pull.1.tmp && mv docs/kpod-pull.1.tmp docs/kpod-pull.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-pull.1.md -out docs/kpod-pull.1.tmp && touch docs/kpod-pull.1.tmp && mv docs/kpod-pull.1.tmp docs/kpod-pull.1)\r\n" - ], - [ - 0.010404, - "(go-md2man -in docs/kpod-rmi.1.md -out docs/kpod-rmi.1.tmp && touch docs/kpod-rmi.1.tmp && mv docs/kpod-rmi.1.tmp docs/kpod-rmi.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-rmi.1.md -out docs/kpod-rmi.1.tmp && touch docs/kpod-rmi.1.tmp && mv docs/kpod-rmi.1.tmp docs/kpod-rmi.1)\r\n" - ], - [ - 0.007878, - "(go-md2man -in docs/kpod-version.1.md -out docs/kpod-version.1.tmp && touch docs/kpod-version.1.tmp && mv docs/kpod-version.1.tmp docs/kpod-version.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-version.1.md -out docs/kpod-version.1.tmp && touch docs/kpod-version.1.tmp && mv docs/kpod-version.1.tmp docs/kpod-version.1)\r\n" - ], - [ - 0.006074, - "(go-md2man -in docs/kpod-tag.1.md -out docs/kpod-tag.1.tmp && touch docs/kpod-tag.1.tmp && mv docs/kpod-tag.1.tmp docs/kpod-tag.1) || (/home/ryan/Development/Go/bin/go-md2man -in docs/kpod-tag.1.md -out docs/kpod-tag.1.tmp && touch docs/kpod-tag.1.tmp && mv docs/kpod-tag.1.tmp docs/kpod-tag.1)\r\n" - ], - [ - 0.007358, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.021811, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m22s\u001b[39m\r\n" - ], - [ - 0.001102, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000118, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 1.5e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 6.9e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 0.000142, - "\u001b[?1h\u001b=" - ], - [ - 2.9e-05, - "\u001b[?2004h" - ], - [ - 22.687022, - "s" - ], - [ - 0.176986, - "\bsu" - ], - [ - 0.231668, - "d" - ], - [ - 0.167315, - "o" - ], - [ - 0.224159, - " " - ], - [ - 0.184546, - "m" - ], - [ - 0.111947, - "a" - ], - [ - 0.127867, - "k" - ], - [ - 0.07167, - "e" - ], - [ - 0.095736, - " " - ], - [ - 0.072818, - "i" - ], - [ - 0.071884, - "n" - ], - [ - 0.07219, - "s" - ], - [ - 0.088277, - "t" - ], - [ - 0.071516, - "a" - ], - [ - 0.14414, - "l" - ], - [ - 0.119615, - "l" - ], - [ - 0.239306, - "\u001b[?1l\u001b>" - ], - [ - 7.7e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.001719, - "\u001b]2;sudo make install\u0007\u001b]1;make\u0007" - ], - [ - 3.018747, - "install -D -m 755 crio /usr/local/bin/crio\r\n" - ], - [ - 0.042567, - "install -D -m 755 crioctl /usr/local/bin/crioctl\r\n" - ], - [ - 0.026457, - "install -D -m 755 kpod /usr/local/bin/kpod" - ], - [ - 6.3e-05, - "\r\n" - ], - [ - 0.040019, - "install -D -m 755 conmon/conmon /usr/local/libexec/crio/conmon\r\n" - ], - [ - 0.003162, - "install -D -m 755 pause/pause /usr/local/libexec/crio/pause\r\n" - ], - [ - 0.003708, - "install -d -m 755 /usr/local/share/man/man1\r\n" - ], - [ - 0.00089, - "install -d -m 755 /usr/local/share/man/man5\r\n" - ], - [ - 0.000625, - "install -d -m 755 /usr/local/share/man/man8\r\n" - ], - [ - 0.000846, - "install -m 644 docs/kpod-diff.1 docs/kpod-push.1 docs/kpod-cp.1 docs/kpod.1 docs/kpod-export.1 docs/kpod-load.1 docs/kpod-logs.1 docs/kpod-images.1 docs/kpod-umount.1 docs/kpod-save.1 docs/kpod-mount.1 docs/kpod-info.1 docs/kpod-inspect.1 docs/kpod-history.1 docs/kpod-pull.1 docs/kpod-rmi.1 docs/kpod-version.1 docs/kpod-tag.1 -t /usr/local/share/man/man1\r\n" - ], - [ - 0.009723, - "install -m 644 docs/crio.conf.5 -t /usr/local/share/man/man5\r\n" - ], - [ - 0.002898, - "install -m 644 docs/crio.8 -t /usr/local/share/man/man8\r\n" - ], - [ - 0.006399, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.021303, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master* \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001274, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.0001, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 7.9e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 7e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 7.4e-05, - "\u001b[?1h\u001b=" - ], - [ - 3.4e-05, - "\u001b[?2004h" - ], - [ - 255.497514, - "v" - ], - [ - 0.111133, - "\bvi" - ], - [ - 0.096261, - " " - ], - [ - 0.055637, - "c" - ], - [ - 0.128288, - "m" - ], - [ - 0.295825, - "\b \b" - ], - [ - 0.499642, - "\b \b" - ], - [ - 0.03181, - "\b" - ], - [ - 0.030112, - "\b\bv \b" - ], - [ - 0.029886, - "\b \b" - ], - [ - 2470.181351, - "g" - ], - [ - 0.134982, - "\bgi" - ], - [ - 0.116687, - "t" - ], - [ - 0.248596, - " " - ], - [ - 0.091959, - "c" - ], - [ - 0.221434, - "h" - ], - [ - 0.511729, - "\b \b" - ], - [ - 0.149467, - "\b \b" - ], - [ - 0.180553, - "r" - ], - [ - 0.09336, - "e" - ], - [ - 0.118113, - "s" - ], - [ - 0.166341, - "e" - ], - [ - 0.101897, - "t" - ], - [ - 0.135639, - " " - ], - [ - 0.101112, - "-" - ], - [ - 0.133755, - "-" - ], - [ - 0.204129, - "h" - ], - [ - 0.087003, - "a" - ], - [ - 0.070922, - "r" - ], - [ - 0.107809, - "d" - ], - [ - 0.081233, - " " - ], - [ - 0.210727, - "H" - ], - [ - 0.08464, - "E" - ], - [ - 0.340797, - "AD\u001b[1m \u001b[0m" - ], - [ - 0.359977, - "\b\u001b[0m \b" - ], - [ - 0.000209, - "\u001b[?1l\u001b>" - ], - [ - 3.7e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.00869, - "\u001b]2;git reset --hard HEAD\u0007\u001b]1;git\u0007" - ], - [ - 0.033935, - "HEAD is now at 6ca462a3 Merge pull request #718 from 14rcole/kpod-logs\r\n" - ], - [ - 0.000491, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.039313, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.00621, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000838, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.401122, - "g" - ], - [ - 0.143266, - "\bgi" - ], - [ - 0.141142, - "t" - ], - [ - 0.13335, - " " - ], - [ - 0.080629, - "p" - ], - [ - 0.068567, - "u" - ], - [ - 0.139439, - "s" - ], - [ - 0.111629, - "h" - ], - [ - 0.103453, - " " - ], - [ - 0.140922, - "o" - ], - [ - 0.09323, - "r" - ], - [ - 0.126723, - "i" - ], - [ - 0.116153, - "g" - ], - [ - 0.103085, - "i" - ], - [ - 0.110423, - "n" - ], - [ - 0.047839, - " " - ], - [ - 0.211066, - "m" - ], - [ - 0.140391, - "a" - ], - [ - 0.493452, - "s" - ], - [ - 0.228966, - "ter\u001b[1m \u001b[0m" - ], - [ - 0.433861, - "\b\u001b[0m \b" - ], - [ - 0.000112, - "\u001b[?1l\u001b>" - ], - [ - 3.1e-05, - "\u001b[?2004l" - ], - [ - 0.001239, - "\r\r\n" - ], - [ - 0.004134, - "\u001b]2;git push origin master\u0007\u001b]1;git\u0007" - ], - [ - 0.74689, - "Total 0 (delta 0), reused 0 (delta 0)\r\n" - ], - [ - 1.494101, - "To github.com:14rcole/cri-o\r\n a69631c1..6ca462a3 master -> master\r\n" - ], - [ - 0.000159, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.046807, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001056, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000155, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 4e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 9.5e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 7.1e-05, - "\u001b[?1h\u001b=" - ], - [ - 4.1e-05, - "\u001b[?2004h" - ], - [ - 7.372135, - "g" - ], - [ - 0.126302, - "\bgi" - ], - [ - 0.101424, - "t" - ], - [ - 0.42971, - "n" - ], - [ - 1.654559, - "\b \b" - ], - [ - 0.292926, - " " - ], - [ - 0.227087, - "c" - ], - [ - 0.127935, - "h" - ], - [ - 0.100042, - "e" - ], - [ - 0.081115, - "c" - ], - [ - 0.195682, - "k" - ], - [ - 0.505623, - "o" - ], - [ - 0.138216, - "ut" - ], - [ - 0.45806, - " " - ], - [ - 0.100148, - "m" - ], - [ - 0.335248, - "\b \b" - ], - [ - 0.188284, - "k" - ], - [ - 0.140606, - "pod-" - ], - [ - 0.287649, - "t" - ], - [ - 0.053698, - "e" - ], - [ - 0.304664, - "st-refactor\u001b[1m \u001b[0m" - ], - [ - 0.651671, - "\b\u001b[0m \b" - ], - [ - 9.4e-05, - "\u001b[?1l\u001b>" - ], - [ - 6.3e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.002007, - "\u001b]2;git checkout kpod-test-refactor\u0007\u001b]1;git\u0007" - ], - [ - 0.048356, - "Switched to branch 'kpod-test-refactor'\r\n" - ], - [ - 0.001669, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.055687, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-test-refactor \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.000911, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 6.7e-05, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.2e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000112, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 4.9e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.1e-05, - "\u001b[?2004h" - ], - [ - 101.519318, - "v" - ], - [ - 0.095071, - "\bvi" - ], - [ - 0.079201, - " " - ], - [ - 1.258215, - "c" - ], - [ - 0.126693, - "m" - ], - [ - 0.116773, - "d\u001b[1m/\u001b[0m" - ], - [ - 0.846315, - "\b\u001b[0m/t" - ], - [ - 0.047782, - "e" - ], - [ - 0.357957, - "\b \b" - ], - [ - 0.134026, - "\b \b" - ], - [ - 0.180238, - "k" - ], - [ - 0.084009, - "pod\u001b[1m/\u001b[0m" - ], - [ - 1.056429, - "\b\u001b[0m \b" - ], - [ - 0.500154, - "\b \b" - ], - [ - 0.0301, - "\b \b" - ], - [ - 0.031128, - "\b \b" - ], - [ - 0.030599, - "\b \b" - ], - [ - 0.029396, - "\b \b" - ], - [ - 0.031795, - "\b \b" - ], - [ - 0.120498, - "\b \b" - ], - [ - 0.173821, - "\b \b" - ], - [ - 0.155303, - "t" - ], - [ - 0.046457, - "e" - ], - [ - 0.208794, - "st\u001b[1m/\u001b[0m" - ], - [ - 0.115379, - "\b\u001b[0m/k" - ], - [ - 0.204258, - "pod_" - ], - [ - 0.686373, - "p" - ], - [ - 0.067817, - "s" - ], - [ - 0.535881, - "\b \b" - ], - [ - 0.187935, - "u" - ], - [ - 0.08672, - "\u0007" - ], - [ - 0.000211, - "\r\r\n" - ], - [ - 6.1e-05, - "\u001b[J\u001b[0mkpod_pull.bats \u001b[Jkpod_push.bats\u001b[J\u001b[A\u001b[0m\u001b[27m\u001b[24m\u001b[39m\r\u001b[2Cvi test/kpod_pu\u001b[K\u001b[193C\u001b[90m\u001b[39m\u001b[39m\u001b[193D" - ], - [ - 0.347316, - "s" - ], - [ - 0.191815, - "h.bats\u001b[1m \u001b[0m" - ], - [ - 0.247116, - "\b\u001b[0m \b\u001b[?1l\u001b>" - ], - [ - 0.001036, - "\u001b[?2004l\r\r\n\u001b[J" - ], - [ - 0.001089, - "\u001b]2;vim test/kpod_push.bats\u0007" - ], - [ - 4.6e-05, - "\u001b]1;vi\u0007" - ], - [ - 0.251946, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.001597, - "\u001b[1;52r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[52;1H\"test/kpod_push.bats\"" - ], - [ - 0.000102, - " 87L, 2372C" - ], - [ - 0.003896, - "\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[1;1H\u001b[>c" - ], - [ - 0.000853, - "\u001b[1;1H\u001b[96m\u001b[47m 1 \u001b[m\u001b[93m\u001b[107m\u001b[96m#!/usr/bin/env bats\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 2 \r\n 3 \u001b[m\u001b[93m\u001b[107mload helpers\r\n\u001b[96m\u001b[47m 4 \r\n 5 \u001b[m\u001b[93m\u001b[107mIMAGE=\u001b[36m\"alpine:latest\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 6 \u001b[m\u001b[93m\u001b[107mROOT=\u001b[36m\"$TESTDIR/crio\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 7 \u001b[m\u001b[93m\u001b[107mRUNROOT=\u001b[36m\"$TESTDIR/crio-run\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 8 \u001b[m\u001b[93m\u001b[107mKPOD_OPTIONS=\u001b[36m\"--root $ROOT --runroot $RUNROOT $STORAGE_OPTS\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 9 \r\n 10 \u001b[m\u001b[93m\u001b[107mfunction teardown() {\r\n\u001b[96m\u001b[47m 11 \u001b[m\u001b[93m\u001b[107m cleanup_test\r\n\u001b[96m\u001b[47m 12 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 13 \r\n 14 \u001b[m\u001b[93m\u001b[107m@test \u001b[36m\"kpod push to containers/storage\"\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 15 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 16 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 17 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 18 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m contai" - ], - [ - 3e-05, - "ners-storage:[$ROOT]busybox:test\r\n\u001b[96m\u001b[47m 19 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 20 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 21 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 22 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 23 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 24 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 25 \u001b[m\u001b[93m\u001b[107m stop_crio\r\n\u001b[96m\u001b[47m 26 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 27 \r\n 28 \u001b[m\u001b[93m\u001b[107m@test \u001b[36m\"kpod push to directory\"\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 29 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 30 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 31 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 32 \u001b[m\u001b[93m\u001b[107m run mkdir /tmp/busybox\r\n\u001b[96m\u001b[47m 33 \u001b[m\u001b[93m\u001b[107m echo " - ], - [ - 0.059183, - "\u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 34 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 35 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m dir:/tmp/busybox\r\n\u001b[96m\u001b[47m 36 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 37 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 38 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 39 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 40 \u001b[m\u001b[93m\u001b[107m rm -rf /tmp/busybox\r\n\u001b[96m\u001b[47m 41 \u001b[m\u001b[93m\u001b[107m stop_crio\r\n\u001b[96m\u001b[47m 42 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 43 \r\n 44 \u001b[m\u001b[93m\u001b[107m@test \u001b[36m\"kpod push to docker archive\"\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 45 \u001b[m\u001b[93m\u001b[107m run ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 46 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 47 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[96m\u001b[47m 48 \u001b[m\u001b[93m\u001b[107m run ${KP" - ], - [ - 4.1e-05, - "OD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m docker-archive:/tmp/busybox-archive:1.26\r\n\u001b[96m\u001b[47m 49 \u001b[m\u001b[93m\u001b[107m echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 50 \u001b[m\u001b[93m\u001b[107m [ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H kpod-test-refactor \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;33H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mtest/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mkpod_push.bats \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[51;55H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                                                                                                      \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;180H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m" - ], - [ - 0.013876, - "\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;188H\u001b[38;5;247m\u001b[48;5;236m conf\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  26%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 23\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5  \u001b[23;9H\u001b[?12l\u001b[?25h\u001bP+q436f\u001b\\\u001bP+q6b75\u001b\\\u001bP+q6b64\u001b\\\u001bP+q6b72\u001b\\\u001bP+q6b6c\u001b\\\u001bP+q2332\u001b\\\u001bP+q2334\u001b\\\u001bP+q2569\u001b\\\u001bP+q2a37\u001b\\\u001bP+q6b31\u001b\\" - ], - [ - 4.816904, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[24;9H\u001b[1m\u001b[31m\u001b[106m[\u001b[17C]\u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  28%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[24;9H\u001b[?12l\u001b[?25h" - ], - [ - 4.011791, - "\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.843663, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m[ \u001b[16C]\u001b[51;195H\u001b[38;5;107m\u001b[48;5;240m  26%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[23;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.530257, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\b\b\b\u001b[7m\u001b[96m\u001b[107m \u001b[m\u001b[93m\u001b[107mr\u001b[7m\u001b[96m\u001b[107mun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[96m\u001b[107m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[96m\u001b[107m " - ], - [ - 0.005375, - "\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[34m-- VISUAL LINE --\u001b[m\u001b[93m\u001b[107m\u001b[52;18H\u001b[K\u001b[51;1H\u001b[1m\u001b[38;5;94m\u001b[48;5;214m V·\u001b[51;4HLINE \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;214m\u001b[48;5;94m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;214m\u001b[48;5;94m⇕1 \u001b[m\u001b[93m\u001b[107m\u001b[38;5;94m\u001b[48;5;240m\u001b[51;15H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;17H kpod-test-refactor \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;38H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mtest/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mp\bkpod_push.bats \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[51;60H \u001b[23;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.187201, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[96m\u001b[107mr\u001b[24;5H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[31m\u001b[106m[\u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[96m\u001b[107m \u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[96m\u001b[107m\"$status\"\u001b[m\u001b[93m\u001b[107m\u001b[7m\u001b[96m\u001b[107m -eq 0 ] \u001b[m\u001b[93m\u001b[107m\u001b[51;12H\u001b[1m\u001b[38;5;214m\u001b[48;5;94m2 \u001b[m\u001b[93m\u001b[107m\u001b[181C\u001b[38;5;107m\u001b[48;5;240m  28%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[24;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.311219, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[23;5H stop_crio\u001b[23;18H\u001b[K\u001b[24;5H}\u001b[24;6H\u001b[K\u001b[25;9H\u001b[K\u001b[26;5H@test \u001b[36m\"kpod push to directory\"\u001b[m\u001b[93m\u001b[107m {\u001b[27;9Hrun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[28;5H echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[28;23H\u001b[K\u001b[29;9H[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[29;28H\u001b[K\u001b[30;9Hrun mkdir /tmp/busybox\u001b[31;9Hecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[31;23H\u001b[K\u001b[32;9H[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[32;28H\u001b[K\u001b[33;9Hrun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m dir:/tmp/busybox\u001b[34;9Hecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[34;23H\u001b[K\u001b[35;9H[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[35;28H\u001b[K\u001b[36;9Hrun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[38;10Hm -rf /tmp/busybox\u001b[38;28H\u001b[K\u001b[39;9Hstop_crio\u001b[39;18H\u001b[K\u001b[40;5H}\u001b[40;9H\u001b[K\u001b[41;9H\u001b[K\u001b[42;5H@test \u001b[36m\"kpod push to docker archive\"\u001b[m\u001b[93m\u001b[107m {\u001b[43;9Hrun ${KPOD_BINARY} $KPOD_OPTIONS pull \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\u001b[44;5H echo \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[44;23H\u001b[K\u001b[45;9H[ \u001b[36m\"$sta" - ], - [ - 6.1e-05, - "tus\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[45;28H\u001b[K\u001b[46;9Hrun ${KPOD_BINARY} $KPOD_OPTIONS push \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m docker-archive:/tmp/busybox-archive:1.26\u001b[47;9Hecho \u001b[36m\"$output\"\u001b[m\u001b[93m\u001b[107m\u001b[47;23H\u001b[K\u001b[48;9H[ \u001b[36m\"$status\"\u001b[m\u001b[93m\u001b[107m -eq 0 ]\u001b[48;28H\u001b[K\u001b[49;9Hrm /tmp/busybox-archive\u001b[50;9Hrun ${KPOD_BINARY} $KPOD_OPTIONS rmi \u001b[36m\"$IMAGE\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;214m\u001b[48;5;94m\u001b[m\u001b[93m\u001b[107m\u001b[51;9H\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H kpod-test-refactor \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;33H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mtest/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mkpod_push.bats.\u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[38;5;220m\u001b[48;5;240m + \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mt\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;240m\u001b[48;5;236m\u001b[51;57H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;231m\u001b[48;5;236m   \u001b[m\u001b[93m\u001b[107m\u001b[134C\u001b[38;5;107m\u001b[48;5;240m  27%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m" - ], - [ - 0.003283, - "\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\u001b[K\u001b[23;9H\u001b[?12l\u001b[?25h" - ], - [ - 4.012199, - "\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 2.525173, - "\u001b[?25l\u001b[52;1H:" - ], - [ - 3.9e-05, - "\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.585401, - "w\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.118422, - "q\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 8.69039, - "\r\u001b[?25l\u001b[?2004l\"test/kpod_push.bats\"" - ], - [ - 0.005802, - " 85L, 2298C written" - ], - [ - 0.01652, - "\r\r\r\n\u001b[39;49m" - ], - [ - 0.000114, - "\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.00281, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.044965, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-test-refactor* \u001b[39m \u001b[33m27s\u001b[39m\r\n" - ], - [ - 0.004489, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000232, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 9.4e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000151, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m " - ], - [ - 5.2e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 4.3e-05, - "\u001b[?1h\u001b=" - ], - [ - 3e-05, - "\u001b[?2004h" - ], - [ - 1.0948, - "g" - ], - [ - 0.142791, - "\bgi" - ], - [ - 0.093165, - "t" - ], - [ - 0.104881, - " " - ], - [ - 0.146445, - "c" - ], - [ - 0.080499, - "o" - ], - [ - 0.116396, - "m" - ], - [ - 0.149451, - "m" - ], - [ - 0.126645, - "i" - ], - [ - 0.124885, - "t" - ], - [ - 0.057566, - " " - ], - [ - 0.196291, - "-" - ], - [ - 0.162575, - "a" - ], - [ - 0.097583, - " " - ], - [ - 0.118011, - "-" - ], - [ - 0.149342, - "-" - ], - [ - 0.046139, - "a" - ], - [ - 0.16449, - "m" - ], - [ - 0.100832, - "e" - ], - [ - 0.454585, - "n" - ], - [ - 0.157844, - "d" - ], - [ - 0.128767, - "\u001b[?1l\u001b>" - ], - [ - 6.4e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.002817, - "\u001b]2;git commit -a --amend\u0007\u001b]1;git\u0007" - ], - [ - 0.030281, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.003594, - "\u001b[1;52r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[H\u001b[2J\u001b[?25l\u001b[52;1H\"~/Development/Go/src/github.com/kubernetes-incubator/cri-o/.git/COMMIT_EDITMSG\"" - ], - [ - 0.000205, - " 24L, 716C" - ], - [ - 0.000426, - "\u001b[1;1HRefactor kpod tests\r\n\r\nMove kpod tests from kpod.bats to kpod_[commandname].bats\r\n\r\nSigned-off-by: Ryan Cole \r\n\r\n# Please enter the commit message for your changes. Lines starting\r\n# with '#' will be ignored, and an empty message aborts the commit.\r\n#\r\n# Date: Mon Aug 14 09:15:22 2017 -0400\r\n#\r\n# On branch kpod-test-refactor\r\n# Changes to be committed:\r\n#\u001b[7Cdeleted: test/kpod.bats\r\n#\u001b[7Cmodified: test/kpod_diff.bats\r\n#\u001b[7Cnew file: test/kpod_history.bats\r\n#\u001b[7Cnew file: test/kpod_images.bats\r\n#\u001b[7Cnew file: test/kpod_inspect.bats\r\n#\u001b[7Cmodified: test/kpod_load.bats\r\n#\u001b[7Cnew file: test/kpod_pull.bats\r\n#\u001b[7Cnew file: test/kpod_push.bats\r\n#\u001b[7Cmodified: test/kpod_save.bats\r\n#\u001b[7Cnew file: test/kpod_version.bats\r\n#\r\n\u001b[94m~ \u001b[26;1H~ " - ], - [ - 3e-05, - " \u001b[27;1H~ \u001b[28;1H~ \u001b[29;1H~ \u001b[30;1H~ " - ], - [ - 0.000148, - " \u001b[31;1H~ \u001b[32;1H~ \u001b[33;1H~ \u001b[34;1H~ \u001b[35;1H~ " - ], - [ - 2.2e-05, - " \u001b[36;1H~ \u001b[37;1H~ \u001b[38;1H~ \u001b[39;1H~ \u001b[40;1H~ " - ], - [ - 0.000582, - " \u001b[41;1H~ \u001b[42;1H~ \u001b[43;1H~ \u001b[44;1H~ " - ], - [ - 3e-05, - " \u001b[45;1H~ \u001b[46;1H~ \u001b[47;1H~ \u001b[48;1H~ \u001b[49;1H~ " - ], - [ - 0.000162, - " \u001b[50;1H~ \u001b[51;1H~ \u001b[1;1H\u001b[?12l\u001b[?25h" - ], - [ - 0.276849, - "\u001b[?25l\u001b[m\u001b[52;1H\u001b[K\u001b[52;1H:" - ], - [ - 5e-05, - "\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.161861, - "w" - ], - [ - 0.062363, - "q" - ], - [ - 0.113128, - "\r" - ], - [ - 7e-05, - "\u001b[?25l\u001b[?2004l\".git/COMMIT_EDITMSG\"" - ], - [ - 0.016122, - " 24L, 716C written\r\r\r\n\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.001866, - "[kpod-test-refactor 9f5954a6] Refactor kpod tests\r\n Date: Mon Aug 14 09:15:22 2017 -0400\r\n 10 files changed, 333 insertions(+), 253 deletions(-)\r\n delete mode 100644 test/kpod.bats\r\n create mode 100644 test/kpod_history.bats\r\n create mode 100644 test/kpod_images.bats\r\n create mode 100644 test/kpod_inspect.bats\r\n create mode 100644 test/kpod_pull.bats\r\n create mode 100644 test/kpod_push.bats\r\n create mode 100644 test/kpod_version.bats\r\n\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.046977, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-test-refactor \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001287, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000166, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000157, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m " - ], - [ - 2.7e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 0.000266, - "\u001b[?1h\u001b=" - ], - [ - 2.4e-05, - "\u001b[?2004h" - ], - [ - 0.08068, - "g" - ], - [ - 0.127014, - "\bgi" - ], - [ - 0.077769, - "t" - ], - [ - 0.07119, - " " - ], - [ - 0.125899, - "p" - ], - [ - 0.0933, - "u" - ], - [ - 0.107051, - "s" - ], - [ - 0.103696, - "h" - ], - [ - 0.079917, - " " - ], - [ - 0.173889, - "-" - ], - [ - 0.115307, - "f" - ], - [ - 0.080793, - " " - ], - [ - 0.077616, - "o" - ], - [ - 0.131483, - "r" - ], - [ - 0.1108, - "i" - ], - [ - 0.164739, - "g" - ], - [ - 0.119456, - "i" - ], - [ - 0.102232, - "n" - ], - [ - 0.064044, - " " - ], - [ - 0.163385, - "k" - ], - [ - 0.063896, - "pod-" - ], - [ - 0.226923, - "t" - ], - [ - 0.070106, - "e" - ], - [ - 0.236851, - "st-refactor\u001b[1m \u001b[0m" - ], - [ - 0.608419, - "\b\u001b[0m \b" - ], - [ - 5.6e-05, - "\u001b[?1l\u001b>" - ], - [ - 4.9e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.002783, - "\u001b]2;git push -f origin kpod-test-refactor\u0007\u001b]1;git\u0007" - ], - [ - 0.779856, - "Counting objects: 12, done.\r\n" - ], - [ - 0.000105, - "Delta compression using up to 4 threads.\r\n" - ], - [ - 9.5e-05, - "Compressing objects: 8% (1/12) \rCompressing objects: 16% (2/12) \r" - ], - [ - 0.000129, - "Compressing objects: 25% (3/12) \r" - ], - [ - 0.00012, - "Compressing objects: 33% (4/12) \r" - ], - [ - 1.9e-05, - "Compressing objects: 41% (5/12) \r" - ], - [ - 4.6e-05, - "Compressing objects: 50% (6/12) \r" - ], - [ - 0.000177, - "Compressing objects: 58% (7/12) \rCompressing objects: 66% (8/12) \r" - ], - [ - 0.000199, - "Compressing objects: 75% (9/12) \r" - ], - [ - 3.8e-05, - "Compressing objects: 83% (10/12) \r" - ], - [ - 5.6e-05, - "Compressing objects: 91% (11/12) \r" - ], - [ - 5e-05, - "Compressing objects: 100% (12/12) \r" - ], - [ - 3.7e-05, - "Compressing objects: 100% (12/12), done.\r\n" - ], - [ - 0.000272, - "Writing objects: 8% (1/12) \rWriting objects: 16% (2/12) \rWriting objects: 25% (3/12) \r" - ], - [ - 2.8e-05, - "Writing objects: 33% (4/12) \r" - ], - [ - 0.0001, - "Writing objects: 41% (5/12) \r" - ], - [ - 0.00016, - "Writing objects: 58% (7/12) \r" - ], - [ - 4e-05, - "Writing objects: 66% (8/12) \r" - ], - [ - 6.7e-05, - "Writing objects: 75% (9/12) \r" - ], - [ - 0.000162, - "Writing objects: 83% (10/12) \r" - ], - [ - 3.9e-05, - "Writing objects: 91% (11/12) \r" - ], - [ - 4.4e-05, - "Writing objects: 100% (12/12) \r" - ], - [ - 5.8e-05, - "Writing objects: 100% (12/12), 2.56 KiB | 2.56 MiB/s, done.\r\n" - ], - [ - 3e-05, - "Total 12 (delta 9), reused 0 (delta 0)\r\n" - ], - [ - 0.054483, - "remote: Resolving deltas: 0% (0/9) \u001b[K\r" - ], - [ - 0.038253, - "remote: Resolving deltas: 22% (2/9) \u001b[K\rremote: Resolving deltas: 44% (4/9) \u001b[K\rremote: Resolving deltas: 55% (5/9) \u001b[K\rremote: Resolving deltas: 66% (6/9) \u001b[K\rremote: Resolving deltas: 77% (7/9) \u001b[K\rremote: Resolving deltas: 88% (8/9) \u001b[K\rremote: Resolving deltas: 100% (9/9) \u001b[K\rremote: Resolving deltas: 100% (9/9), completed with 5 local objects.\u001b[K\r\n" - ], - [ - 1.340424, - "To github.com:14rcole/cri-o\r\n + 72c6c49b...9f5954a6 kpod-test-refactor -> kpod-test-refactor" - ], - [ - 6.1e-05, - " (forced update)\r\n" - ], - [ - 0.00145, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.03447, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/kpod-test-refactor \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.001176, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000105, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 6.4e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 6.2e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m " - ], - [ - 4e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 0.000267, - "\u001b[?1h\u001b=" - ], - [ - 1.9e-05, - "\u001b[?2004h" - ], - [ - 0.606748, - "\r\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 1186.178261, - "g" - ], - [ - 0.102859, - "\bgi" - ], - [ - 0.126056, - "t" - ], - [ - 0.086902, - " " - ], - [ - 0.763198, - "c" - ], - [ - 0.110654, - "h" - ], - [ - 0.062485, - "e" - ], - [ - 0.087974, - "c" - ], - [ - 0.045368, - "k" - ], - [ - 0.149436, - "o" - ], - [ - 0.070017, - "u" - ], - [ - 0.062669, - "t" - ], - [ - 0.109796, - " " - ], - [ - 0.164267, - "m" - ], - [ - 0.26327, - "aster\u001b[1m \u001b[0m" - ], - [ - 0.456115, - "\b\u001b[0m \b" - ], - [ - 2.9e-05, - "\u001b[?1l\u001b>" - ], - [ - 0.000106, - "\u001b[?2004l\r\r\n" - ], - [ - 0.005237, - "\u001b]2;git checkout master\u0007\u001b]1;git\u0007" - ], - [ - 0.070788, - "Switched to branch 'master'\r\n" - ], - [ - 0.000203, - "Your branch is up-to-date with 'origin/master'.\r\n" - ], - [ - 0.000797, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.074676, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.002717, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.32787, - "g" - ], - [ - 0.126467, - "\bgi" - ], - [ - 0.072925, - "t" - ], - [ - 0.076466, - " " - ], - [ - 0.102271, - "p" - ], - [ - 0.068608, - "u" - ], - [ - 0.213672, - "l" - ], - [ - 0.142438, - "l" - ], - [ - 0.102593, - " " - ], - [ - 0.126466, - "u" - ], - [ - 0.110638, - "p" - ], - [ - 0.175053, - "stream\u001b[1m \u001b[0m" - ], - [ - 0.338118, - "\b\u001b[0m m" - ], - [ - 0.11582, - "a" - ], - [ - 0.071538, - "s" - ], - [ - 0.203225, - "ter\u001b[1m:\u001b[0m" - ], - [ - 0.396247, - "\b\u001b[0m \b\u001b[?1l\u001b>\u001b[?2004l\r\r\n" - ], - [ - 0.003149, - "\u001b]2;git pull upstream master\u0007" - ], - [ - 0.000119, - "\u001b]1;git\u0007" - ], - [ - 1.611391, - "remote: Counting objects: 1, done.\u001b[K\r\n" - ], - [ - 0.000939, - "remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0\u001b[K\r\n" - ], - [ - 0.00237, - "Unpacking objects: 100% (1/1) \r" - ], - [ - 9.3e-05, - "Unpacking objects: 100% (1/1), done.\r\n" - ], - [ - 0.096361, - "From github.com:kubernetes-incubator/cri-o" - ], - [ - 0.000156, - "\r\n" - ], - [ - 8.9e-05, - " * branch master -> FETCH_HEAD" - ], - [ - 7.3e-05, - "\r\n" - ], - [ - 0.000902, - " 6ca462a3..8c496a10 master -> upstream/master" - ], - [ - 0.000108, - "\r\n" - ], - [ - 0.013153, - "Updating 6ca462a3..8c496a10" - ], - [ - 0.000529, - "\r\n" - ], - [ - 0.035506, - "Fast-forward" - ], - [ - 5.4e-05, - "\r\n" - ], - [ - 0.006117, - " cmd/kpod/common.go | 8 \u001b[32m++\u001b[m" - ], - [ - 5.2e-05, - "\r\n" - ], - [ - 4.4e-05, - " cmd/kpod/formats/formats.go | 23 \u001b[32m+++\u001b[m\u001b[31m-\u001b[m" - ], - [ - 3.6e-05, - "\r\n" - ], - [ - 3.8e-05, - " cmd/kpod/formats/templates.go | 78 \u001b[32m++++++++++++\u001b[m" - ], - [ - 3.3e-05, - "\r\n" - ], - [ - 3.9e-05, - " cmd/kpod/images.go | 126 \u001b[32m+++++++++\u001b[m\u001b[31m----------\u001b[m" - ], - [ - 3.5e-05, - "\r\n" - ], - [ - 3.9e-05, - " vendor.conf | 1 \u001b[32m+\u001b[m" - ], - [ - 3.3e-05, - "\r\n" - ], - [ - 4.4e-05, - " vendor/github.com/Microsoft/hcsshim/mksyscall_windows.go | 934 \u001b[31m---------------------------------------------------------------------------------------------------------------------------------------\u001b[m" - ], - [ - 3.5e-05, - "\r\n" - ], - [ - 3.7e-05, - " vendor/github.com/containers/storage/pkg/archive/example_changes.go | 97 \u001b[31m--------------\u001b[m" - ], - [ - 3e-05, - "\r\n" - ], - [ - 3.5e-05, - " vendor/github.com/fatih/camelcase/LICENSE.md | 20 \u001b[32m+++\u001b[m" - ], - [ - 3e-05, - "\r\n" - ], - [ - 3.6e-05, - " vendor/github.com/fatih/camelcase/README.md | 58 \u001b[32m+++++++++\u001b[m" - ], - [ - 3e-05, - "\r\n" - ], - [ - 4.2e-05, - " vendor/github.com/fatih/camelcase/camelcase.go | 90 \u001b[32m+++++++++++++\u001b[m" - ], - [ - 3.3e-05, - "\r\n" - ], - [ - 3.8e-05, - " 10 files changed, 331 insertions(+), 1104 deletions(-)" - ], - [ - 3e-05, - "\r\n" - ], - [ - 3.8e-05, - " create mode 100644 cmd/kpod/formats/templates.go" - ], - [ - 2.8e-05, - "\r\n" - ], - [ - 3.5e-05, - " delete mode 100644 vendor/github.com/Microsoft/hcsshim/mksyscall_windows.go" - ], - [ - 3.1e-05, - "\r\n" - ], - [ - 3.2e-05, - " delete mode 100644 vendor/github.com/containers/storage/pkg/archive/example_changes.go" - ], - [ - 2.6e-05, - "\r\n" - ], - [ - 3.1e-05, - " create mode 100644 vendor/github.com/fatih/camelcase/LICENSE.md" - ], - [ - 2.7e-05, - "\r\n" - ], - [ - 3.1e-05, - " create mode 100644 vendor/github.com/fatih/camelcase/README.md" - ], - [ - 2.7e-05, - "\r\n" - ], - [ - 3.3e-05, - " create mode 100644 vendor/github.com/fatih/camelcase/camelcase.go" - ], - [ - 2.7e-05, - "\r\n" - ], - [ - 0.000942, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.058415, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master \u001b[39m \u001b[33m\u001b[39m\r\n" - ], - [ - 0.00259, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.00032, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000152, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 0.000223, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m " - ], - [ - 8.5e-05, - "\u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 0.000154, - "\u001b[?1h\u001b=" - ], - [ - 0.000119, - "\u001b[?2004h" - ], - [ - 29.505715, - "v" - ], - [ - 0.127766, - "\bvi" - ], - [ - 0.118693, - " " - ], - [ - 0.402967, - "c" - ], - [ - 0.134732, - "m" - ], - [ - 0.171696, - "d\u001b[1m/\u001b[0m" - ], - [ - 0.082566, - "\b\u001b[0m/k" - ], - [ - 0.141218, - "pod\u001b[1m/\u001b[0m" - ], - [ - 0.41599, - "\b\u001b[0m/i" - ], - [ - 0.051368, - "m" - ], - [ - 0.088439, - "a" - ], - [ - 0.170485, - "ges.go\u001b[1m \u001b[0m" - ], - [ - 0.319745, - "\b\u001b[0m \b" - ], - [ - 7.2e-05, - "\u001b[?1l\u001b>" - ], - [ - 4.7e-05, - "\u001b[?2004l\r" - ], - [ - 0.000136, - "\r\n" - ], - [ - 0.003148, - "\u001b]2;vim cmd/kpod/images.go\u0007\u001b]1;vi\u0007" - ], - [ - 0.330583, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000904, - "\u001b[1;54r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[54;1H\"cmd/kpod/images.go\"" - ], - [ - 8.4e-05, - " 203L, 4796C" - ], - [ - 0.019404, - "\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[1;1H\u001b[>c" - ], - [ - 0.012968, - "\u001b[1;1H\u001b[96m\u001b[47m 98 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 99 \u001b[m\u001b[93m\u001b[107m } \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m100 \u001b[m\u001b[93m\u001b[107m\u001b[8Cparams = \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m101 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m102 \r\n103 \u001b[m\u001b[93m\u001b[107m imageList, err := libkpodimage.GetImagesMatchingFilter(store, params, name)\r\n\u001b[96m\u001b[47m104 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m105 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"could not get list of images matching filter\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m106 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m107 \r\n108 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m outputImages(store, imageList, truncate, digests, quiet, outputFormat, noheading)\r\n\u001b[96m\u001b[47m109 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m110 \r\n111 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m genImagesFormat(quiet, truncate, digests \u001b[33mbool\u001b[m\u001b[93m\u001b[107m) (format \u001b[33mstring\u001b[m\u001b[93m\u001b[107m) {\r\n\u001b[96m\u001b[47m112 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m quiet {\r\n\u001b[96m\u001b[47m113 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mr" - ], - [ - 4e-05, - "eturn\u001b[m\u001b[93m\u001b[107m \u001b[36m\"{{.ID}}\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m114 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m115 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m truncate {\r\n\u001b[96m\u001b[47m116 \u001b[m\u001b[93m\u001b[107m\u001b[8Cformat = \u001b[36m\"table {{ .ID | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-20.12s\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m }} \"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m117 \u001b[m\u001b[93m\u001b[107m } \u001b[32melse\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m118 \u001b[m\u001b[93m\u001b[107m\u001b[8Cformat = \u001b[36m\"table {{ .ID | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-64s\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m }} \"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m119 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m120 \u001b[m\u001b[93m\u001b[107m format += \u001b[36m\"{{ .Name | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-56s\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m }} \"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m121 \r\n122 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m digests {\r\n\u001b[96m\u001b[47m123 \u001b[m\u001b[93m\u001b[107m\u001b[8Cformat += \u001b[36m\"{{ .Digest | printf \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-71s\u001b[m\u001b[93m\u001b[107m\u001b[36m \u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m}} \"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m124 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m125 \r\n126 \u001b[m\u001b[93m\u001b[107m format += \u001b[36m\"{{ .CreatedAt | printf " - ], - [ - 0.073924, - "\u001b[m\u001b[93m\u001b[107m\u001b[31m\\\"%-22s\\\"\u001b[m\u001b[93m\u001b[107m\u001b[36m }} {{.Size}}\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m127 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m128 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m129 \r\n130 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m outputImages(store storage.Store, images []storage.Image, truncate, digests, quiet \u001b[33mbool\u001b[m\u001b[93m\u001b[107m, outputFormat \u001b[33mstring\u001b[m\u001b[93m\u001b[107m, noheading \u001b[33mbool\u001b[m\u001b[93m\u001b[107m) \u001b[33merror\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m131 \u001b[m\u001b[93m\u001b[107m imageOutput := []imageOutputParams{}\r\n\u001b[96m\u001b[47m132 \r\n133 \u001b[m\u001b[93m\u001b[107m lastID := \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m134 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, img := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m images {\r\n\u001b[96m\u001b[47m135 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m quiet && lastID == img.ID {\r\n\u001b[96m\u001b[47m136 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mcontinue\u001b[m\u001b[93m\u001b[107m \u001b[96m// quiet should not show the same ID multiple times\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m137 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m138 \u001b[m\u001b[93m\u001b[107m\u001b[8CcreatedTime := img.Created\r\n\u001b[96m\u001b[47m139 \r\n140 \u001b[m\u001b[93m\u001b[107m\u001b[" - ], - [ - 4e-05, - "8Cname := \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m141 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(img.Names) > \u001b[36m0\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m142 \u001b[m\u001b[93m\u001b[107m\u001b[12Cname = img.Names[\u001b[36m0\u001b[m\u001b[93m\u001b[107m]\r\n\u001b[96m\u001b[47m143 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m144 \r\n145 \u001b[m\u001b[93m\u001b[107m\u001b[8Cinfo, imageDigest, size, _ := libkpodimage.InfoAndDigestAndSize(store, img)\r\n\u001b[96m\u001b[47m146 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m info != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m147 \u001b[m\u001b[93m\u001b[107m\u001b[12CcreatedTime = info.Created\r\n\u001b[96m\u001b[47m148 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m149 \u001b[m\u001b[93m\u001b[107m\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[53;12H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[53;21H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mimages.go \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[53;42H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                         " - ], - [ - 0.028403, - "                                                                                                            \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  61%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m123\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9  \u001b[26;13H\u001b[?12l\u001b[?25h" - ], - [ - 3.8e-05, - "\u001bP+q436f\u001b\\\u001bP+q6b75\u001b\\\u001bP+q6b64\u001b\\\u001bP+q6b72\u001b\\\u001bP+q6b6c\u001b\\\u001bP+q2332\u001b\\\u001bP+q2334\u001b\\\u001bP+q2569\u001b\\\u001bP+q2a37\u001b\\\u001bP+q6b31\u001b\\" - ], - [ - 2.1862, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  60%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[25;13H\u001b[?12l\u001b[?25h" - ], - [ - 4.025378, - "\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 34.053856, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  61%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[26;13H\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[25;20H\u001b[1m\u001b[31m\u001b[106m{\u001b[27;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[27;9H\u001b[?12l\u001b[?25h\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[25;20H{\u001b[27;9H}\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  62%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[28;5H\u001b[?12l\u001b[?25h\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9\u001b[29;13H\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  63%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[30;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.081812, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[14;73H\u001b[1m\u001b[31m\u001b[106m{\u001b[31;5H}\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[31;5H\u001b[?12l\u001b[?25h\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[14;73H{\u001b[31;5H}\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  64%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m9\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[32;5H\u001b[?12l\u001b[?25h\u001b[m\u001b[93m\u001b[107m\u001b[53;206H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m30\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9\u001b[33;13H\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  65%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[34;13H\u001b[?12l\u001b[?25h\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[35;5H\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  66%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9\u001b[36;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.035045, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[37;13H\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  67%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[38;13H\u001b[?12l\u001b[?25h\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:12\u001b[39;16H\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[38;42H\u001b[1m\u001b[31m\u001b[106m{\u001b[40;13H}\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9 \u001b[40;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.014251, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[38;42H{\u001b[40;13H}\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  68%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[41;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.035294, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m9\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[42;5H" - ], - [ - 3.803564, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9\u001b[41;13H" - ], - [ - 0.502126, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[38;42H\u001b[1m\u001b[31m\u001b[106m{\u001b[40;13H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  67%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[40;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.039219, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[38;42H{\u001b[40;13H}\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:12\u001b[39;16H\u001b[?12l\u001b[?25h" - ], - [ - 0.022715, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9 \u001b[38;13H" - ], - [ - 0.030883, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  66%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[37;13H" - ], - [ - 0.032199, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[36;13H" - ], - [ - 0.028523, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  65%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[35;5H" - ], - [ - 0.031179, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9\u001b[34;13H" - ], - [ - 0.032779, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  64%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m0\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[33;13H" - ], - [ - 0.028555, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;206H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m29\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[32;5H" - ], - [ - 0.048269, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[14;73H\u001b[1m\u001b[31m\u001b[106m{\u001b[31;5H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  63%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[31;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.019915, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[14;73H{\u001b[31;5H}\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9\u001b[30;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.028641, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  62%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[29;13H" - ], - [ - 0.027012, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[28;5H" - ], - [ - 0.033581, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[25;20H\u001b[1m\u001b[31m\u001b[106m{\u001b[27;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  61%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[27;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.02925, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[25;20H{\u001b[27;9H}\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9\u001b[26;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.030751, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  60%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[25;13H" - ], - [ - 0.031339, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[24;5H" - ], - [ - 0.041524, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  59%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m0\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9\u001b[23;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.022427, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[20;16H\u001b[1m\u001b[31m\u001b[106m{\u001b[22;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;206H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m19\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[22;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.033264, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[20;16H{\u001b[22;9H}\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  58%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9\u001b[21;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.023387, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[20;13H" - ], - [ - 0.037125, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  57%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[19;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.026419, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[18;13H" - ], - [ - 0.040842, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[15;18H\u001b[1m\u001b[31m\u001b[106m{\u001b[17;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  56%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[17;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.023205, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[15;18H{\u001b[17;9H}\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9\u001b[16;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.033995, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  55%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[15;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.023807, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[14;13H" - ], - [ - 0.037724, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  54%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m0\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[13;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.028157, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;206H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m09\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[12;5H" - ], - [ - 0.035934, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  53%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9\u001b[11;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.027185, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[10;5H" - ], - [ - 0.036538, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[7;23H\u001b[1m\u001b[31m\u001b[106m{\u001b[9;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  52%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[9;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.029736, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[7;23H{\u001b[9;9H}\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9\u001b[8;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.036535, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  51%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[7;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.023374, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[6;13H" - ], - [ - 0.033091, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  50%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[5;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.025945, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[2;16H\u001b[1m\u001b[31m\u001b[106m{\u001b[4;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[4;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.041382, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[1;1H\u001b[L\u001b[1;54r\u001b[1;1H\u001b[96m\u001b[47m 97 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"error parsing filter\"\u001b[m\u001b[93m\u001b[107m)\u001b[3;16H{\u001b[5;9H}\u001b[54;1H\u001b[K\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  49%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m0\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9\u001b[4;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.030519, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[1;1H\u001b[L\u001b[1;54r\u001b[1;1H\u001b[96m\u001b[47m 96 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\u001b[53;205H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 99\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[4;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.048667, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[1;1H\u001b[L\u001b[1;54r\u001b[1;1H\u001b[96m\u001b[47m 95 \u001b[m\u001b[93m\u001b[107m\u001b[8Cparams, err = libkpodimage.ParseFilter(store, c.String(\u001b[36m\"filter\"\u001b[m\u001b[93m\u001b[107m))\u001b[2;27H\u001b[1m\u001b[31m\u001b[106m{\u001b[4;13H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  48%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[4;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.028735, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[1;1H\u001b[L\u001b[1;54r\u001b[1;1H\u001b[96m\u001b[47m 94 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m c.IsSet(\u001b[36m\"filter\"\u001b[m\u001b[93m\u001b[107m) {\u001b[3;27H{\u001b[5;13H}\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:12\u001b[4;16H\u001b[?12l\u001b[?25h" - ], - [ - 0.048253, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[1;1H\u001b[L\u001b[1;54r\u001b[1;1H\u001b[96m\u001b[47m 93 \u001b[m\u001b[93m\u001b[107m \u001b[32mvar\u001b[m\u001b[93m\u001b[107m params *libkpodimage.FilterParams\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  47%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9 \u001b[4;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.011542, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[1;1H\u001b[L\u001b[1;54r\u001b[1;1H\u001b[96m\u001b[47m 92 \u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[4;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.035746, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[1;1H\u001b[L\u001b[1;54r\u001b[1;1H\u001b[96m\u001b[47m 91 \u001b[m\u001b[93m\u001b[107m }\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  46%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[4;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.039133, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[1;1H\u001b[L\u001b[1;54r\u001b[1;1H\u001b[96m\u001b[47m 90 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.New(\u001b[36m\"'kpod images' requires at most 1 argument\"\u001b[m\u001b[93m\u001b[107m)\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[4;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.033562, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[1;1H\u001b[L\u001b[1;54r\u001b[1;1H\u001b[96m\u001b[47m 89 \u001b[m\u001b[93m\u001b[107m } \u001b[32melse\u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(c.Args()) > \u001b[36m1\u001b[m\u001b[93m\u001b[107m {\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  45%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[4;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.423507, - "\u001b[?25l\u001b[54;1H\u001b[m\u001b[93m\u001b[107m/" - ], - [ - 8.6e-05, - "\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.351895, - "h\u001b[?25l" - ], - [ - 0.0106, - "\u001b[15;53H\u001b[7m\u001b[91mh\u001b[27m\u001b[m\u001b[93m\u001b[107m\u001b[53;2H\u001b[1m\u001b[38;5;22m\u001b[48;5;148mCOMMND \u001b[m\u001b[93m\u001b[107m\u001b[186C\u001b[38;5;107m\u001b[48;5;240m  51%\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m103\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:49\r\n\u001b[m\u001b[93m\u001b[107m/h" - ], - [ - 6e-05, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.063442, - "e" - ], - [ - 0.000104, - "\u001b[?25l" - ], - [ - 0.012164, - "\u001b[15;53Hh\u001b[20;89H\u001b[7m\u001b[91mhe\u001b[27m\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  53%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:85\r\n\u001b[m\u001b[93m\u001b[107m/he" - ], - [ - 0.000532, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.072256, - "a" - ], - [ - 7.1e-05, - "\u001b[?25l" - ], - [ - 0.00992, - "\u001b[20;91H\u001b[7m\u001b[91ma\u001b[54;5H" - ], - [ - 0.001459, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.162629, - "\u001b[27m\u001b[m\u001b[93m\u001b[107md" - ], - [ - 8.2e-05, - "\u001b[?25l" - ], - [ - 0.009968, - "\u001b[20;92H\u001b[7m\u001b[91md\u001b[54;6H" - ], - [ - 0.00011, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.147673, - "\u001b[27m\u001b[m\u001b[93m\u001b[107me\u001b[?25l" - ], - [ - 0.013264, - "\u001b[1;52r\u001b[1;1H\u001b[29M\u001b[1;54r\u001b[24;1H\u001b[96m\u001b[47m141 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(img.Names) > \u001b[36m0\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m142 \u001b[m\u001b[93m\u001b[107m\u001b[12Cname = img.Names[\u001b[36m0\u001b[m\u001b[93m\u001b[107m]\r\n\u001b[96m\u001b[47m143 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m144 \r\n145 \u001b[m\u001b[93m\u001b[107m\u001b[8Cinfo, imageDigest, size, _ := libkpodimage.InfoAndDigestAndSize(store, img)\r\n\u001b[96m\u001b[47m146 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m info != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m147 \u001b[m\u001b[93m\u001b[107m\u001b[12CcreatedTime = info.Created\r\n\u001b[96m\u001b[47m148 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m149 \r\n150 \u001b[m\u001b[93m\u001b[107m\u001b[8Cparams := imageOutputParams{\r\n\u001b[96m\u001b[47m151 \u001b[m\u001b[93m\u001b[107m\u001b[12CID:\u001b[8Cimg.ID,\r\n\u001b[96m\u001b[47m152 \u001b[m\u001b[93m\u001b[107m\u001b[12CName: name,\r\n\u001b[96m\u001b[47m153 \u001b[m\u001b[93m\u001b[107m\u001b[12CDigest: imageDigest,\r\n\u001b[96m\u001b[47m154 \u001b[m\u001b[93m\u001b[107m\u001b[12CCreatedAt: createdTime.Format(\u001b[36m\"Jan 2, 2006 15:04\"\u001b[m\u001b[93m\u001b[107m),\r\n\u001b[96m\u001b[47m155 \u001b[m\u001b[93m\u001b[107m\u001b[12CSize: libkpodimage.FormattedSize(size),\r\n\u001b[96m\u001b[47m156 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m157 \u001b[m\u001b[93m\u001b[10" - ], - [ - 6.2e-05, - "7m\u001b[8CimageOutput = \u001b[32mappend\u001b[m\u001b[93m\u001b[107m(imageOutput, params)\r\n\u001b[96m\u001b[47m158 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m159 \r\n160 \u001b[m\u001b[93m\u001b[107m \u001b[32mvar\u001b[m\u001b[93m\u001b[107m out formats.Writer\r\n\u001b[96m\u001b[47m161 \r\n162 \u001b[m\u001b[93m\u001b[107m \u001b[32mswitch\u001b[m\u001b[93m\u001b[107m outputFormat {\r\n\u001b[96m\u001b[47m163 \u001b[m\u001b[93m\u001b[107m \u001b[32mcase\u001b[m\u001b[93m\u001b[107m \u001b[36m\"json\"\u001b[m\u001b[93m\u001b[107m:\r\n\u001b[96m\u001b[47m164 \u001b[m\u001b[93m\u001b[107m\u001b[8Cout = formats.JSONstruct{Output: toGeneric(imageOutput)}\r\n\u001b[96m\u001b[47m165 \u001b[m\u001b[93m\u001b[107m \u001b[32mdefault\u001b[m\u001b[93m\u001b[107m:\r\n\u001b[96m\u001b[47m166 \u001b[m\u001b[93m\u001b[107m\u001b[8Cout = formats.StdoutTemplate{Output: toGeneric(imageOutput), Template: outputFormat, Fields: imageOutput[\u001b[36m0\u001b[m\u001b[93m\u001b[107m].\u001b[7m\u001b[91mheade\u001b[27m\u001b[m\u001b[93m\u001b[107mrMap()}\r\n\u001b[96m\u001b[47m167 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m168 \r\n169 \u001b[m\u001b[93m\u001b[107m formats.Writer(out).Out()\u001b[53;175H\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;181H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;189H\u001b[38;5;247m\u001b[48;5;236m" - ], - [ - 0.000184, - " go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;194H\u001b[38;5;144m\u001b[48;5;240m  82%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[53;201H\u001b[38;5;235m\u001b[48;5;252m \u001b[53;203H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1668\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;22m\u001b[48;5;252m:117\u001b[m\u001b[93m\u001b[107m\u001b[54;1H\u001b[K\u001b[54;1H/heade" - ], - [ - 6.2e-05, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.090014, - "r\u001b[?25l" - ], - [ - 0.010578, - "\u001b[49;126H\u001b[7m\u001b[91mr\u001b[54;8H\u001b[?12l\u001b[?25h" - ], - [ - 0.242781, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mM" - ], - [ - 6.5e-05, - "\u001b[?25l" - ], - [ - 0.018322, - "\u001b[49;127H\u001b[7m\u001b[91mM\u001b[54;9H" - ], - [ - 0.000103, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.216526, - "\u001b[27m\u001b[m\u001b[93m\u001b[107ma\u001b[?25l" - ], - [ - 0.008316, - "\u001b[49;128H\u001b[7m\u001b[91ma\u001b[54;10H" - ], - [ - 0.000108, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.164608, - "\u001b[27m\u001b[m\u001b[93m\u001b[107mp\u001b[?25l" - ], - [ - 0.010964, - "\u001b[49;129H\u001b[7m\u001b[91mp\u001b[54;11H" - ], - [ - 5.8e-05, - "\u001b[?12l\u001b[?25h" - ], - [ - 0.303811, - "\r" - ], - [ - 5.4e-05, - "\u001b[?25l" - ], - [ - 0.01537, - "\u001b[27m\u001b[m\u001b[93m\u001b[107m\u001b[49;121H\u001b[7m\u001b[33mheaderMap\u001b[m\u001b[93m\u001b[107m\u001b[53;2H\u001b[1m\u001b[38;5;22m\u001b[48;5;148mNORMAL \u001b[49;121H\u001b[?12l\u001b[?25h" - ], - [ - 0.613627, - "\u001b[?25l\u001b[54;1H" - ], - [ - 0.009249, - "\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[1;1H\u001b[24M\u001b[1;54r\u001b[29;1H\u001b[96m\u001b[47m170 \r\n171 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m172 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m173 \r\n174 \u001b[m\u001b[93m\u001b[107m\u001b[32mtype\u001b[m\u001b[93m\u001b[107m imageOutputParams \u001b[32mstruct\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m175 \u001b[m\u001b[93m\u001b[107m ID\u001b[8C\u001b[33mstring\u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[36m`json:\"id\"`\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m176 \u001b[m\u001b[93m\u001b[107m Name \u001b[33mstring\u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[36m`json:\"names\"`\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m177 \u001b[m\u001b[93m\u001b[107m Digest digest.Digest \u001b[36m`json:\"digest\"`\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m178 \u001b[m\u001b[93m\u001b[107m CreatedAt \u001b[33mstring\u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[36m`json:\"created\"`\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m179 \u001b[m\u001b[93m\u001b[107m Size \u001b[33mstring\u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[36m`json:\"size\"`\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m180 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m181 \r\n182 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m toGeneric(params []imageOutputParams) []\u001b[32minterface\u001b[m\u001b[93m\u001b[107m{} {\r\n\u001b[96m\u001b[47m183 \u001b[m\u001b[93m\u001b[107m genericParams := \u001b[32mmake\u001b[m\u001b[93m\u001b[107m([]\u001b[32mi" - ], - [ - 4.4e-05, - "nterface\u001b[m\u001b[93m\u001b[107m{}, \u001b[32mlen\u001b[m\u001b[93m\u001b[107m(params))\r\n\u001b[96m\u001b[47m184 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m i, v := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m params {\r\n\u001b[96m\u001b[47m185 \u001b[m\u001b[93m\u001b[107m\u001b[8CgenericParams[i] = \u001b[32minterface\u001b[m\u001b[93m\u001b[107m{}(v)\r\n\u001b[96m\u001b[47m186 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m187 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m genericParams\r\n\u001b[96m\u001b[47m188 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m189 \r\n190 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (i *imageOutputParams) \u001b[7m\u001b[33mheaderMap\u001b[m\u001b[93m\u001b[107m() \u001b[33mmap\u001b[m\u001b[93m\u001b[107m[\u001b[33mstring\u001b[m\u001b[93m\u001b[107m]\u001b[33mstring\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m191 \u001b[m\u001b[93m\u001b[107m v := reflect.Indirect(reflect.ValueOf(i))\r\n\u001b[96m\u001b[47m192 \u001b[m\u001b[93m\u001b[107m values := \u001b[32mmake\u001b[m\u001b[93m\u001b[107m(\u001b[33mmap\u001b[m\u001b[93m\u001b[107m[\u001b[33mstring\u001b[m\u001b[93m\u001b[107m]\u001b[33mstring\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m193 \u001b[m\u001b[93m\u001b[107m\u001b[54;1H\u001b[K\u001b[53;175H\u001b[38;5;231m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b" - ], - [ - 2.6e-05, - "[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  94%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\b190\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:29\u001b[49;33H\u001b[?12l\u001b[?25h" - ], - [ - 2.596474, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m194 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m i := \u001b[36m0\u001b[m\u001b[93m\u001b[107m; i < v.NumField(); i++ {\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[49;33H\u001b[?12l\u001b[?25h" - ], - [ - 0.204651, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m195 \u001b[m\u001b[93m\u001b[107m\u001b[8Ckey := v.Type().Field(i).Name\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  95%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[49;33H\u001b[?12l\u001b[?25h" - ], - [ - 0.176184, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m196 \u001b[m\u001b[93m\u001b[107m\u001b[8Cvalue := key\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1 \u001b[49;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.187364, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m197 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m value == \u001b[36m\"ID\"\u001b[m\u001b[93m\u001b[107m || value == \u001b[36m\"Name\"\u001b[m\u001b[93m\u001b[107m {\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  96%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:29\u001b[49;33H\u001b[?12l\u001b[?25h" - ], - [ - 0.159818, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m198 \u001b[m\u001b[93m\u001b[107m\u001b[12Cvalue = \u001b[36m\"Image\"\u001b[m\u001b[93m\u001b[107m + value\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[49;33H\u001b[?12l\u001b[?25h" - ], - [ - 0.510264, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m199 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  97%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:20\u001b[49;24H\u001b[?12l\u001b[?25h" - ], - [ - 0.025799, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m200 \u001b[m\u001b[93m\u001b[107m\u001b[8Cvalues[key] = fmt.Sprintf(\u001b[36m\"\u001b[m\u001b[93m\u001b[107m\u001b[31m%s\u001b[m\u001b[93m\u001b[107m\u001b[36m \"\u001b[m\u001b[93m\u001b[107m, strings.ToUpper(splitCamelCase(value)))\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:29\u001b[49;33H\u001b[?12l\u001b[?25h" - ], - [ - 0.03976, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m201 \u001b[m\u001b[93m\u001b[107m }\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  98%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[49;33H\u001b[?12l\u001b[?25h" - ], - [ - 0.024833, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[47;49H\u001b[1m\u001b[31m\u001b[106m{\u001b[49;13H}\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m202 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m values\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m9\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9 \u001b[49;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.052706, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[46;49H{\u001b[48;13H}\u001b[52;1H\u001b[96m\u001b[47m203 \u001b[m\u001b[93m\u001b[107m}\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  99%\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m200\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:29\u001b[49;33H\u001b[?12l\u001b[?25h" - ], - [ - 0.031789, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[43;43H\u001b[1m\u001b[31m\u001b[106m{\u001b[50;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5 \u001b[50;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.028149, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[43;43H{\u001b[50;9H}\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m 100%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:17\u001b[51;21H\u001b[?12l\u001b[?25h" - ], - [ - 0.030014, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[39;63H\u001b[1m\u001b[31m\u001b[106m{\u001b[52;5H}\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1 \u001b[52;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.018881, - "\u001b[?5h" - ], - [ - 0.000174, - "\u001b[?2004l" - ], - [ - 0.100098, - "\u001b[?2004h" - ], - [ - 0.031161, - "\u001b[?5l" - ], - [ - 0.340032, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[39;63H{\u001b[52;5H}\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:17\u001b[51;21H\u001b[?12l\u001b[?25h" - ], - [ - 47.126026, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[43;43H\u001b[1m\u001b[31m\u001b[106m{\u001b[50;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  99%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5 \u001b[50;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.49885, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[43;43H{\u001b[50;9H}\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m0\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:29\u001b[49;33H\u001b[?12l\u001b[?25h" - ], - [ - 0.03165, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[46;49H\u001b[1m\u001b[31m\u001b[106m{\u001b[48;13H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  98%\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m199\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9 \u001b[48;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.030139, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[46;49H{\u001b[48;13H}\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:29\u001b[47;33H\u001b[?12l\u001b[?25h" - ], - [ - 0.029042, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  97%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[46;33H" - ], - [ - 0.029773, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:20\u001b[45;24H" - ], - [ - 0.031993, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  96%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:29\u001b[44;33H" - ], - [ - 0.03237, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[43;33H" - ], - [ - 0.195643, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  95%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1 \u001b[42;5H" - ], - [ - 0.210797, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;207H\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:29\u001b[41;33H" - ], - [ - 0.517507, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  94%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[40;33H" - ], - [ - 0.244061, - "\u001b[53;210H8\u001b[40;32H" - ], - [ - 0.216928, - "\u001b[53;210H7\u001b[40;31H" - ], - [ - 0.181163, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\b\u001b[1m\u001b[31m\u001b[106m(\u001b[18C)\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;252m6\u001b[40;30H\u001b[?12l\u001b[?25h" - ], - [ - 315.572339, - "\u001b[?25l\u001b[54;1H\u001b[m\u001b[93m\u001b[107m:" - ], - [ - 4.9e-05, - "\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.220904, - "\b" - ], - [ - 0.002635, - "\u001b[?25l\u001b[40;30H\u001b[?12l\u001b[?25h" - ], - [ - 0.335899, - "\u001b[?25l" - ], - [ - 0.0299, - "\u001b[54;1H\u001b[34m-- VISUAL --\u001b[m\u001b[93m\u001b[107m\u001b[53;1H\u001b[1m\u001b[38;5;94m\u001b[48;5;214m VISUAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[m\u001b[93m\u001b[107m\u001b[53;9H\u001b[38;5;214m\u001b[48;5;94m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;214m\u001b[48;5;94m↔\u001b[53;12H1 \u001b[m\u001b[93m\u001b[107m\u001b[38;5;94m\u001b[48;5;240m\u001b[53;15H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[53;17H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[53;26H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240ms\bimages.go \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[53;47H \u001b[40;30H\u001b[?12l\u001b[?25h" - ], - [ - 0.729109, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[54;1H\u001b[K\u001b[54;1H:\u001b[?2004h'<,'>\u001b[?12l\u001b[?25h" - ], - [ - 0.225295, - "q\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.582167, - "\u001b[?25l\u001b[54;1H\u001b[K" - ], - [ - 0.007677, - "\u001b[53;1H\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;214m\u001b[48;5;94m\u001b[m\u001b[93m\u001b[107m\u001b[53;9H\u001b[38;5;148m\u001b[48;5;240m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[53;12H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[53;21H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpo\u001b[m\u001b[93m\u001b[107m\u001b[2C\u001b[1m\u001b[38;5;231m\u001b[48;5;240mimages.go s\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;240m\u001b[48;5;236m\u001b[53;42H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mg\u001b[m\u001b[93m\u001b[107m\b\u001b[38;5;231m\u001b[48;5;236m     \u001b[40;30H\u001b[?12l\u001b[?25h" - ], - [ - 0.719145, - "\u001b[?25l\u001b[54;1H\u001b[m\u001b[93m\u001b[107m:\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.136951, - "q\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.082665, - "\r" - ], - [ - 0.02936, - "\u001b[?25l" - ], - [ - 0.000147, - "\u001b[?2004l" - ], - [ - 9.5e-05, - "\u001b[54;1H\u001b[K\u001b[54;1H" - ], - [ - 5.5e-05, - "\u001b[?2004l\u001b[?1l\u001b>" - ], - [ - 6.2e-05, - "\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.003739, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.062587, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master \u001b[39m \u001b[33m422s\u001b[39m\r\n" - ], - [ - 0.003799, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007\u001b]1;..cubator/cri-o\u0007\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.263929, - "v" - ], - [ - 0.112167, - "\bvi" - ], - [ - 0.109735, - " " - ], - [ - 0.650955, - "c" - ], - [ - 0.088996, - "m" - ], - [ - 0.11713, - "d\u001b[1m/\u001b[0m" - ], - [ - 0.07719, - "\b\u001b[0m/k" - ], - [ - 0.528816, - "\b \b" - ], - [ - 0.145274, - "\b \b" - ], - [ - 0.153621, - "\b \b" - ], - [ - 0.165982, - "\b \b" - ], - [ - 0.149926, - "\b \b" - ], - [ - 0.099378, - "c" - ], - [ - 0.113919, - "m" - ], - [ - 0.124791, - "d\u001b[1m/\u001b[0m" - ], - [ - 0.076941, - "\b\u001b[0m/k" - ], - [ - 0.118135, - "pod\u001b[1m/\u001b[0m" - ], - [ - 0.453118, - "\b\u001b[0m/f" - ], - [ - 0.087524, - "o" - ], - [ - 0.110424, - "rmats\u001b[1m/\u001b[0m" - ], - [ - 0.196023, - "\b\u001b[0m/f" - ], - [ - 0.110967, - "o" - ], - [ - 0.110584, - "rmats.go\u001b[1m \u001b[0m" - ], - [ - 0.502681, - "\b\u001b[0m \b\u001b[?1l\u001b>" - ], - [ - 3e-05, - "\u001b[?2004l\r\r\n" - ], - [ - 0.007009, - "\u001b]2;vim cmd/kpod/formats/formats.go\u0007\u001b]1;vi\u0007" - ], - [ - 0.333483, - "\u001b[?2004h\u001b[?1049h\u001b[?1h\u001b=\u001b[?2004h" - ], - [ - 0.000971, - "\u001b[1;54r\u001b[?12;25h\u001b[?12l\u001b[?25h\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[54;1H\"cmd/kpod/formats/formats.go\"" - ], - [ - 8.5e-05, - " 69L, 1356C" - ], - [ - 0.020264, - "\u001b[2;1H▽\u001b[6n\u001b[2;1H \u001b[1;1H" - ], - [ - 9.3e-05, - "\u001b[>c" - ], - [ - 0.007943, - "\u001b[1;1H\u001b[96m\u001b[47m 9 \r\n 10 \u001b[m\u001b[93m\u001b[107m \u001b[36m\"github.com/pkg/errors\"\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 11 \u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 12 \r\n 13 \u001b[m\u001b[93m\u001b[107m\u001b[96m// Writer interface for outputs\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 14 \u001b[m\u001b[93m\u001b[107m\u001b[32mtype\u001b[m\u001b[93m\u001b[107m Writer \u001b[32minterface\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 15 \u001b[m\u001b[93m\u001b[107m Out() \u001b[33merror\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 16 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 17 \r\n 18 \u001b[m\u001b[93m\u001b[107m\u001b[96m// JSONstruct for JSON output\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 19 \u001b[m\u001b[93m\u001b[107m\u001b[32mtype\u001b[m\u001b[93m\u001b[107m JSONstruct \u001b[32mstruct\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 20 \u001b[m\u001b[93m\u001b[107m Output []\u001b[32minterface\u001b[m\u001b[93m\u001b[107m{}\r\n\u001b[96m\u001b[47m 21 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 22 \r\n 23 \u001b[m\u001b[93m\u001b[107m\u001b[96m// StdoutTemplate for Go template output\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 24 \u001b[m\u001b[93m\u001b[107m\u001b[32mtype\u001b[m\u001b[93m\u001b[107m StdoutTemplate \u001b[32mstruct\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 25 \u001b[m\u001b[93m\u001b[107m Output []\u001b[32minterface\u001b[m\u001b[93m\u001b[107m{}\r\n\u001b[96m\u001b[47m 26 \u001b[m\u001b[93m\u001b[107m Template \u001b[33mstring\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 27 \u001b[m\u001b[" - ], - [ - 4.3e-05, - "93m\u001b[107m Fields \u001b[33mmap\u001b[m\u001b[93m\u001b[107m[\u001b[33mstring\u001b[m\u001b[93m\u001b[107m]\u001b[33mstring\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 28 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 29 \r\n 30 \u001b[m\u001b[93m\u001b[107m\u001b[96m// Out method for JSON\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 31 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (j JSONstruct) Out() \u001b[33merror\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 32 \u001b[m\u001b[93m\u001b[107m data, err := json.MarshalIndent(j.Output, \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m, \u001b[36m\" \"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 33 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 34 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\r\n\u001b[96m\u001b[47m 35 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 36 \u001b[m\u001b[93m\u001b[107m fmt.Printf(\u001b[36m\"\u001b[m\u001b[93m\u001b[107m\u001b[31m%s\\n\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, data)\r\n\u001b[96m\u001b[47m 37 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 38 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 39 \r\n 40 \u001b[m\u001b[93m\u001b[107m\u001b[96m// Out method for Go templates\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 41 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (t StdoutTemplate) Out() " - ], - [ - 0.071435, - "\u001b[33merror\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 42 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m strings.HasPrefix(t.Template, \u001b[36m\"table\"\u001b[m\u001b[93m\u001b[107m) {\r\n\u001b[96m\u001b[47m 43 \u001b[m\u001b[93m\u001b[107m\u001b[8Ct.Template = strings.TrimSpace(t.Template[\u001b[36m5\u001b[m\u001b[93m\u001b[107m:])\r\n\u001b[96m\u001b[47m 44 \u001b[m\u001b[93m\u001b[107m\u001b[8CheaderTmpl, err := template.New(\u001b[36m\"header\"\u001b[m\u001b[93m\u001b[107m).Funcs(headerFunctions).Parse(t.Template)\r\n\u001b[96m\u001b[47m 45 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 46 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"Template parsing error\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 47 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 48 \u001b[m\u001b[93m\u001b[107m\u001b[8Cerr = headerTmpl.Execute(os.Stdout, t.Fields)\r\n\u001b[96m\u001b[47m 49 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 50 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\r\n\u001b[96m\u001b[47m 51 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 52 \u001b[m\u001b[93m\u001b[107m\u001b[8Cfmt.Println()\r\n\u001b[96m\u001b[47m 53 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 54 \u001b[m\u001b[93m\u001b[107m tmpl, err := template.N" - ], - [ - 4.8e-05, - "ew(\u001b[36m\"image\"\u001b[m\u001b[93m\u001b[107m).Funcs(basicFunctions).Parse(t.Template)\r\n\u001b[96m\u001b[47m 55 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m \u001b[1m\u001b[31m\u001b[106m{\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 56 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"Template parsing error\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 57 \u001b[m\u001b[93m\u001b[107m \u001b[1m\u001b[31m\u001b[106m}\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 58 \r\n 59 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, img := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m t.Output {\r\n\u001b[96m\u001b[47m 60 \u001b[m\u001b[93m\u001b[107m\u001b[8CbasicTmpl := tmpl.Funcs(basicFunctions)\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[53;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[53;12H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[53;21H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/formats/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mformats.go \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[53;51H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                   " - ], - [ - 0.027914, - "                                                                                         \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  83%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[53;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[53;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 57\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5  \u001b[49;9H\u001b[?12l\u001b[?25h" - ], - [ - 6.6e-05, - "\u001bP+q436f\u001b\\\u001bP+q6b75\u001b\\\u001bP+q6b64\u001b\\\u001bP+q6b72\u001b\\\u001bP+q6b6c\u001b\\\u001bP+q2332\u001b\\\u001bP+q2334\u001b\\\u001bP+q2569\u001b\\\u001bP+q2a37\u001b\\\u001bP+q6b31\u001b\\" - ], - [ - 0.752985, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[1;2H\u001b[96m\u001b[47m10\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[36m\"github.com/pkg/errors\"\u001b[m\u001b[93m\u001b[107m\u001b[2;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[1C)\u001b[2;9H\u001b[K\u001b[3;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[3;5H\u001b[K\u001b[4;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[96m// Writer interface for outputs\u001b[m\u001b[93m\u001b[107m\u001b[5;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[32mtype\u001b[m\u001b[93m\u001b[107m Writer \u001b[32minterface\u001b[m\u001b[93m\u001b[107m {\u001b[5;28H\u001b[K\u001b[6;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C Out() \u001b[33merror\u001b[m\u001b[93m\u001b[107m\u001b[6;20H\u001b[K\u001b[7;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[7;9H\u001b[K\u001b[8;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[8;5H\u001b[K\u001b[9;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[96m// JSONstruct for JSON output\u001b[m\u001b[93m\u001b[107m\u001b[10;3H\u001b[96m\u001b[47m9\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[32mtype\u001b[m\u001b[93m\u001b[107m JSONstruct \u001b[32mstruct\u001b[m\u001b[93m\u001b[107m {\u001b[10;29H\u001b[K\u001b[11;2H\u001b[96m\u001b[47m20\u001b[m\u001b[93m\u001b[107m\u001b[1C Output []\u001b[32minterface\u001b[m\u001b[93m\u001b[107m{}\u001b[12;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[12;9H\u001b[K\u001b[13;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[13;5H\u001b[K\u001b[14;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[96m// StdoutTemplate for Go template output\u001b[m\u001b[93m\u001b[107m\u001b[15;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[10" - ], - [ - 2.7e-05, - "7m\u001b[1C\u001b[32mtype\u001b[m\u001b[93m\u001b[107m StdoutTemplate \u001b[32mstruct\u001b[m\u001b[93m\u001b[107m {\u001b[15;33H\u001b[K\u001b[16;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[1C Output []\u001b[32minterface\u001b[m\u001b[93m\u001b[107m{}\u001b[16;32H\u001b[K\u001b[17;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5CTemplate \u001b[33mstring\u001b[m\u001b[93m\u001b[107m\u001b[17;24H\u001b[K\u001b[18;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5CFields \u001b[33mmap\u001b[m\u001b[93m\u001b[107m[\u001b[33mstring\u001b[m\u001b[93m\u001b[107m]\u001b[33mstring\u001b[m\u001b[93m\u001b[107m\u001b[19;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[19;9H\u001b[K\u001b[20;3H\u001b[96m\u001b[47m9\u001b[m\u001b[93m\u001b[107m\u001b[20;5H\u001b[K\u001b[21;2H\u001b[96m\u001b[47m30\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[96m// Out method for JSON\u001b[m\u001b[93m\u001b[107m\u001b[22;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (j JSONstruct) Out() \u001b[33merror\u001b[m\u001b[93m\u001b[107m {\u001b[23;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[1C data, err := json.MarshalIndent(j.Output, \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m, \u001b[36m\" \"\u001b[m\u001b[93m\u001b[107m)\u001b[24;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\u001b[24;24H\u001b[K\u001b[25;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5C \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\u001b[25;23H\u001b[K\u001b[26;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5C}\u001b[26;13H" - ], - [ - 0.002588, - "\u001b[K\u001b[27;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5Cfmt.Printf(\u001b[36m\"\u001b[m\u001b[93m\u001b[107m\u001b[31m%s\\n\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, data)\u001b[28;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\u001b[28;19H\u001b[K\u001b[29;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[1C}\u001b[29;9H\u001b[K\u001b[30;3H\u001b[96m\u001b[47m9\u001b[m\u001b[93m\u001b[107m\u001b[30;5H\u001b[K\u001b[31;2H\u001b[96m\u001b[47m40\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[96m// Out method for Go templates\u001b[m\u001b[93m\u001b[107m\u001b[32;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[1C\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (t StdoutTemplate) Out() \u001b[33merror\u001b[m\u001b[93m\u001b[107m {\u001b[33;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[1C \u001b[32mif\u001b[m\u001b[93m\u001b[107m strings.HasPrefix(t.Template, \u001b[36m\"table\"\u001b[m\u001b[93m\u001b[107m) {\u001b[34;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C t.Template = strings.TrimSpace(t.Template[\u001b[36m5\u001b[m\u001b[93m\u001b[107m:])\u001b[35;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[9CheaderTmpl, err := template.New(\u001b[36m\"header\"\u001b[m\u001b[93m\u001b[107m).Funcs(headerFunctions).Parse(t.Template)\u001b[36;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[9C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\u001b[36;29H\u001b[K\u001b[37;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[9C \u001b[32mreturn\u001b[m\u001b[93m\u001b" - ], - [ - 3.4e-05, - "[107m errors.Wrapf(err, \u001b[36m\"Template parsing error\"\u001b[m\u001b[93m\u001b[107m)\u001b[38;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[9C}\u001b[38;17H\u001b[K\u001b[39;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[9Cerr = headerTmpl.Execute(os.Stdout, t.Fields)\u001b[40;3H\u001b[96m\u001b[47m9\u001b[m\u001b[93m\u001b[107m\u001b[9C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\u001b[40;28H\u001b[K\u001b[41;2H\u001b[96m\u001b[47m50\u001b[m\u001b[93m\u001b[107m\u001b[9C \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\u001b[41;27H\u001b[K\u001b[42;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[9C}\u001b[42;17H\u001b[K\u001b[43;3H\u001b[96m\u001b[47m2\u001b[m\u001b[93m\u001b[107m\u001b[9Cfmt.Println()\u001b[44;3H\u001b[96m\u001b[47m3\u001b[m\u001b[93m\u001b[107m\u001b[5C}\u001b[44;13H\u001b[K\u001b[45;3H\u001b[96m\u001b[47m4\u001b[m\u001b[93m\u001b[107m\u001b[5Ctmpl, err := template.New(\u001b[36m\"image\"\u001b[m\u001b[93m\u001b[107m).Funcs(basicFunctions).Parse(t.Template)\u001b[46;3H\u001b[96m\u001b[47m5\u001b[m\u001b[93m\u001b[107m\u001b[5C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\u001b[46;24H\u001b[K\u001b[47;3H\u001b[96m\u001b[47m6\u001b[m\u001b[93m\u001b[107m\u001b[5C \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"Template parsing error\"\u001b[m\u001b[93m\u001b[107m)\u001b[48;3H\u001b[96m\u001b[47m7\u001b[m\u001b[93m\u001b[107m\u001b[5C}\u001b[48;13H\u001b[K\u001b[49;3H\u001b[96m\u001b[47m8\u001b[m\u001b[93m\u001b[107m\u001b[49;9H\u001b[K\u001b[50;3H\u001b[96m\u001b[47m9\u001b[m\u001b[93m\u001b[107m\u001b[5C" - ], - [ - 0.033553, - "\u001b[32mfor\u001b[m\u001b[93m\u001b[107m _, img := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m t.Output {\u001b[51;2H\u001b[96m\u001b[47m60\u001b[m\u001b[93m\u001b[107m\u001b[5C basicTmpl := tmpl.Funcs(basicFunctions)\u001b[52;3H\u001b[96m\u001b[47m1\u001b[m\u001b[93m\u001b[107m\u001b[9Cerr = basicTmpl.Execute(os.Stdout, img\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  84%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[49;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.379256, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[46;23H\u001b[1m\u001b[31m\u001b[106m{\u001b[48;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  83%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[48;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.137128, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[46;23H{\u001b[48;9H}\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  84%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[49;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.501192, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m 62 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\u001b[54;1H\u001b[K\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  86%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m9\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[49;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.045304, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m 63 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  87%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m60\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:8\u001b[49;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.024223, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m 64 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  88%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[49;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.040877, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m 65 \u001b[m\u001b[93m\u001b[107m\u001b[8Cfmt.Println()\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  90%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[49;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.038981, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m 66 \u001b[m\u001b[93m\u001b[107m }\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  91%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[49;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.022814, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m 67 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  93%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[49;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.03284, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[52;1H\u001b[96m\u001b[47m 68 \u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  94%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[49;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.045318, - "\u001b[?25l\u001b[1;52r\u001b[m\u001b[93m\u001b[107m\u001b[52;1H\r\n\u001b[1;54r\u001b[42;38H\u001b[1m\u001b[31m\u001b[106m{\u001b[49;9H}\u001b[m\u001b[93m\u001b[107m\r\n\r\n\r\n\u001b[96m\u001b[47m 69 \u001b[m\u001b[93m\u001b[107m}\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  96%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[49;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.028648, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[42;38H{\u001b[49;9H}\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  97%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[50;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.022824, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  99%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[51;5H\u001b[?12l\u001b[?25h" - ], - [ - 0.137956, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  97%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[50;9H" - ], - [ - 0.507979, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[42;38H\u001b[1m\u001b[31m\u001b[106m{\u001b[49;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  96%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[49;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.024442, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[42;38H{\u001b[49;9H}\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  94%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:8\u001b[48;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.037304, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  93%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[47;12H" - ], - [ - 0.030234, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  91%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[46;12H" - ], - [ - 0.035803, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;247m\u001b[48;5;240m  90%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[45;12H" - ], - [ - 0.027875, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  88%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[44;12H" - ], - [ - 0.031294, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  87%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m0\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[43;12H" - ], - [ - 0.028909, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  86%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m59\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[42;9H" - ], - [ - 0.028601, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  84%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:1\u001b[41;5H" - ], - [ - 0.0318, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[38;23H\u001b[1m\u001b[31m\u001b[106m{\u001b[40;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  83%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[40;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.04273, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[38;23H{\u001b[40;9H}\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  81%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:8\u001b[39;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.028264, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;144m\u001b[48;5;240m  80%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[38;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.031967, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  78%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[37;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.037706, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[25;51H\u001b[1m\u001b[31m\u001b[106m{\u001b[36;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  77%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[36;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.030776, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[25;51H{\u001b[36;9H}\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  75%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:8\u001b[35;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.028632, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  74%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[34;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.032475, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  72%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m0\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[33;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.026166, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  71%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m49\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[32;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.168545, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  70%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[31;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.49982, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  68%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[30;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.030812, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  67%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[29;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.030802, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  65%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[28;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.032574, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  64%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[27;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.029137, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  62%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[26;12H\u001b[?12l\u001b[?25h" - ], - [ - 0.037678, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  61%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[25;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.28215, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  62%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:8\u001b[26;12H" - ], - [ - 0.499953, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  64%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[27;12H" - ], - [ - 0.029953, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  65%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[28;12H" - ], - [ - 0.033793, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  67%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[29;12H" - ], - [ - 0.032469, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  68%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[30;12H" - ], - [ - 0.030452, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  70%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[31;12H" - ], - [ - 0.03474, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  71%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m9\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[32;12H" - ], - [ - 0.031553, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  72%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m50\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[33;12H" - ], - [ - 0.027886, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  74%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[34;12H" - ], - [ - 0.032183, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  75%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[35;12H" - ], - [ - 0.361308, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  74%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[34;12H" - ], - [ - 0.180436, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  72%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m0\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[33;12H" - ], - [ - 0.163593, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  71%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m49\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[32;12H" - ], - [ - 0.167433, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  70%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[31;12H" - ], - [ - 0.499694, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  68%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[30;12H" - ], - [ - 0.035176, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  67%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[29;12H" - ], - [ - 0.176855, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  65%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[28;12H" - ], - [ - 0.167552, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  64%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[27;12H" - ], - [ - 0.162525, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  62%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[26;12H" - ], - [ - 0.344534, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  61%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5\u001b[25;9H" - ], - [ - 0.475291, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[42C\u001b[1m\u001b[31m\u001b[106m{\u001b[36;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;209H\u001b[38;5;22m\u001b[48;5;252m47\u001b[25;51H\u001b[?12l\u001b[?25h" - ], - [ - 0.862743, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m{\u001b[36;9H}\u001b[53;210H\u001b[38;5;22m\u001b[48;5;252m6\u001b[25;50H\u001b[?12l\u001b[?25h" - ], - [ - 0.211622, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[25;29H\u001b[1m\u001b[31m\u001b[106m(\u001b[19C)\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;252m5\u001b[25;49H\u001b[?12l\u001b[?25h" - ], - [ - 0.334139, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[25;29H(t\u001b[18C) \u001b[53;210H\u001b[38;5;22m\u001b[48;5;252m6\u001b[25;50H\u001b[?12l\u001b[?25h" - ], - [ - 0.690098, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m \u001b[1m\u001b[31m\u001b[106m{\u001b[36;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;210H\u001b[38;5;22m\u001b[48;5;252m7\u001b[25;51H\u001b[?12l\u001b[?25h" - ], - [ - 0.829404, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m{\u001b[36;9H}\u001b[53;195H\u001b[38;5;107m\u001b[48;5;240m  62%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[26;51H\u001b[?12l\u001b[?25h" - ], - [ - 0.187135, - "\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  64%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:\u001b[27;51H" - ], - [ - 0.223449, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[28;27H\u001b[1m\u001b[31m\u001b[106m{\u001b[30;13H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  65%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m5\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:23\u001b[28;27H\u001b[?12l\u001b[?25h" - ], - [ - 0.381099, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m{\u001b[30;13H}\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  67%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m6\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:47\u001b[29;51H\u001b[?12l\u001b[?25h" - ], - [ - 0.445137, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[28;27H\u001b[1m\u001b[31m\u001b[106m{\u001b[30;13H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  68%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m7\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9 \u001b[30;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.207385, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[28;27H{\u001b[30;13H}\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  70%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:47\u001b[31;51H\u001b[?12l\u001b[?25h" - ], - [ - 0.222319, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[32;27H\u001b[1m\u001b[31m\u001b[106m{\u001b[34;13H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  71%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m9\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:23\u001b[32;27H\u001b[?12l\u001b[?25h" - ], - [ - 0.499981, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m{\u001b[34;13H}\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  72%\u001b[m\u001b[93m\u001b[107m\u001b[6C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m50\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:22\u001b[33;26H\u001b[?12l\u001b[?25h" - ], - [ - 0.029604, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[32;27H\u001b[1m\u001b[31m\u001b[106m{\u001b[34;13H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  74%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m1\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:9 \u001b[34;13H\u001b[?12l\u001b[?25h" - ], - [ - 0.162284, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[32;27H{\u001b[34;13H}\u001b[35;24H\u001b[1m\u001b[31m\u001b[106m()\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  75%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m2\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:21\u001b[35;25H\u001b[?12l\u001b[?25h" - ], - [ - 0.200133, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[25;51H\u001b[1m\u001b[31m\u001b[106m{\u001b[m\u001b[93m\u001b[107m\u001b[35;24H()\u001b[36;9H\u001b[1m\u001b[31m\u001b[106m}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  77%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5 \u001b[36;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.196823, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[25;51H{\u001b[36;9H}\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  78%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m4\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:47\u001b[37;51H\u001b[?12l\u001b[?25h" - ], - [ - 0.356692, - "\u001b[?25l\u001b[m\u001b[93m\u001b[107m\u001b[25;51H\u001b[1m\u001b[31m\u001b[106m{\u001b[36;9H}\u001b[m\u001b[93m\u001b[107m\u001b[53;195H\u001b[38;5;108m\u001b[48;5;240m  77%\u001b[m\u001b[93m\u001b[107m\u001b[7C\u001b[1m\u001b[38;5;235m\u001b[48;5;252m3\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5 \u001b[36;9H\u001b[?12l\u001b[?25h" - ], - [ - 837.577075, - "\u001b[27m\u001b[23m\u001b[m\u001b[93m\u001b[107m\u001b[H\u001b[2J\u001b[?25l\u001b[1;1H\u001b[96m\u001b[47m 19 \u001b[m\u001b[93m\u001b[107m\u001b[32mtype\u001b[m\u001b[93m\u001b[107m JSONstruct \u001b[32mstruct\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 20 \u001b[m\u001b[93m\u001b[107m Output []\u001b[32minterface\u001b[m\u001b[93m\u001b[107m{}\r\n\u001b[96m\u001b[47m 21 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 22 \r\n 23 \u001b[m\u001b[93m\u001b[107m\u001b[96m// StdoutTemplate for Go template output\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 24 \u001b[m\u001b[93m\u001b[107m\u001b[32mtype\u001b[m\u001b[93m\u001b[107m StdoutTemplate \u001b[32mstruct\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 25 \u001b[m\u001b[93m\u001b[107m Output []\u001b[32minterface\u001b[m\u001b[93m\u001b[107m{}\r\n\u001b[96m\u001b[47m 26 \u001b[m\u001b[93m\u001b[107m Template \u001b[33mstring\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 27 \u001b[m\u001b[93m\u001b[107m Fields \u001b[33mmap\u001b[m\u001b[93m\u001b[107m[\u001b[33mstring\u001b[m\u001b[93m\u001b[107m]\u001b[33mstring\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 28 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 29 \r\n 30 \u001b[m\u001b[93m\u001b[107m\u001b[96m// Out method for JSON\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 31 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (j JSONstruct) Out() \u001b[33merror\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 32 \u001b[m\u001b[93m\u001b[107m data, err := json.MarshalIndent(j.Output, \u001b[36m\"\"\u001b[m\u001b[93m\u001b[107m, \u001b[36m\" \"\u001b[m\u001b[93m\u001b[107m)\r\n" - ], - [ - 7.7e-05, - "\u001b[96m\u001b[47m 33 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 34 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\r\n\u001b[96m\u001b[47m 35 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 36 \u001b[m\u001b[93m\u001b[107m fmt.Printf(\u001b[36m\"\u001b[m\u001b[93m\u001b[107m\u001b[31m%s\\n\u001b[m\u001b[93m\u001b[107m\u001b[36m\"\u001b[m\u001b[93m\u001b[107m, data)\r\n\u001b[96m\u001b[47m 37 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 38 \u001b[m\u001b[93m\u001b[107m}\r\n\u001b[96m\u001b[47m 39 \r\n 40 \u001b[m\u001b[93m\u001b[107m\u001b[96m// Out method for Go templates\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 41 \u001b[m\u001b[93m\u001b[107m\u001b[32mfunc\u001b[m\u001b[93m\u001b[107m (t StdoutTemplate) Out() \u001b[33merror\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 42 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m strings.HasPrefix(t.Template, \u001b[36m\"table\"\u001b[m\u001b[93m\u001b[107m) \u001b[1m\u001b[31m\u001b[106m{\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 43 \u001b[m\u001b[93m\u001b[107m\u001b[8Ct.Template = strings.TrimSpace(t.Template[\u001b[36m5\u001b[m\u001b[93m\u001b[107m:])\r\n\u001b[96m\u001b[47m 44 \u001b[m\u001b[93m\u001b[107m\u001b[8CheaderTmpl, err := template.New(\u001b[36m\"header\"\u001b[m\u001b[93m\u001b[107m).Funcs(headerFunctions).Parse(t.Template)\r\n\u001b[96m\u001b[47m 45 \u001b[m\u001b[93m\u001b[107m" - ], - [ - 0.006486, - "\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 46 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"Template parsing error\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 47 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 48 \u001b[m\u001b[93m\u001b[107m\u001b[8Cerr = headerTmpl.Execute(os.Stdout, t.Fields)\r\n\u001b[96m\u001b[47m 49 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 50 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\r\n\u001b[96m\u001b[47m 51 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 52 \u001b[m\u001b[93m\u001b[107m\u001b[8Cfmt.Println()\r\n\u001b[96m\u001b[47m 53 \u001b[m\u001b[93m\u001b[107m \u001b[1m\u001b[31m\u001b[106m}\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 54 \u001b[m\u001b[93m\u001b[107m tmpl, err := template.New(\u001b[36m\"image\"\u001b[m\u001b[93m\u001b[107m).Funcs(basicFunctions).Parse(t.Template)\r\n\u001b[96m\u001b[47m 55 \u001b[m\u001b[93m\u001b[107m \u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 56 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m errors.Wrapf(err, \u001b[36m\"Template parsing error\"\u001b[m\u001b[93m\u001b[107m)\r\n\u001b[96m\u001b[47m 57 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 58 \r\n 59 \u001b[m\u001b[93m\u001b[107m \u001b[32mfor\u001b[m\u001b[93m\u001b[107m" - ], - [ - 6.6e-05, - " _, img := \u001b[32mrange\u001b[m\u001b[93m\u001b[107m t.Output {\r\n\u001b[96m\u001b[47m 60 \u001b[m\u001b[93m\u001b[107m\u001b[8CbasicTmpl := tmpl.Funcs(basicFunctions)\r\n\u001b[96m\u001b[47m 61 \u001b[m\u001b[93m\u001b[107m\u001b[8Cerr = basicTmpl.Execute(os.Stdout, img)\r\n\u001b[96m\u001b[47m 62 \u001b[m\u001b[93m\u001b[107m\u001b[8C\u001b[32mif\u001b[m\u001b[93m\u001b[107m err != \u001b[36mnil\u001b[m\u001b[93m\u001b[107m {\r\n\u001b[96m\u001b[47m 63 \u001b[m\u001b[93m\u001b[107m\u001b[12C\u001b[32mreturn\u001b[m\u001b[93m\u001b[107m err\r\n\u001b[96m\u001b[47m 64 \u001b[m\u001b[93m\u001b[107m\u001b[8C}\r\n\u001b[96m\u001b[47m 65 \u001b[m\u001b[93m\u001b[107m\u001b[8Cfmt.Println()\r\n\u001b[96m\u001b[47m 66 \u001b[m\u001b[93m\u001b[107m }\r\n\u001b[96m\u001b[47m 67 \u001b[m\u001b[93m\u001b[107m \u001b[32mreturn\u001b[m\u001b[93m\u001b[107m \u001b[36mnil\u001b[m\u001b[93m\u001b[107m\r\n\u001b[96m\u001b[47m 68 \u001b[m\u001b[93m\u001b[107m\r\n\u001b[1m\u001b[38;5;22m\u001b[48;5;148m NORMAL \u001b[m\u001b[93m\u001b[107m\u001b[38;5;148m\u001b[48;5;240m\u001b[51;10H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240m\u001b[51;12H master \u001b[m\u001b[93m\u001b[107m\u001b[38;5;245m\u001b[48;5;240m\u001b[51;21H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;250m\u001b[48;5;240mcmd/kpod/formats/\u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;231m\u001b[48;5;240mformats.go \u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m\u001b[51;51H \u001b[m\u001b[93m\u001b[107m\u001b[38;5;231m\u001b[48;5;236m                                   " - ], - [ - 2.6e-05, - "                                                                                         \u001b[m\u001b[93m\u001b[107m\u001b[38;5;247m\u001b[48;5;236munix\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;182H\u001b[38;5;247m\u001b[48;5;236m utf-8\u001b[m\u001b[93m\u001b[107m\u001b[38;5;244m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;190H\u001b[38;5;247m\u001b[48;5;236m go\u001b[m\u001b[93m\u001b[107m\u001b[38;5;240m\u001b[48;5;236m \u001b[m\u001b[93m\u001b[107m\u001b[51;195H\u001b[38;5;108m\u001b[48;5;240m  77%\u001b[m\u001b[93m\u001b[107m\u001b[38;5;252m\u001b[48;5;240m \u001b[m\u001b[93m\u001b[107m\u001b[51;202H\u001b[38;5;235m\u001b[48;5;252m \u001b[51;204H \u001b[m\u001b[93m\u001b[107m\u001b[1m\u001b[38;5;235m\u001b[48;5;252m 53\u001b[m\u001b[93m\u001b[107m\u001b[38;5;22m\u001b[48;5;252m:5  \u001b[35;9H\u001b[?12l\u001b[?25h" - ], - [ - 0.84171, - "\u001b[?25l\u001b[52;1H\u001b[m\u001b[93m\u001b[107m:\u001b[?2004h\u001b[?12l\u001b[?25h" - ], - [ - 0.167691, - "q\u001b[?25l\u001b[?12l\u001b[?25h" - ], - [ - 0.064539, - "\r" - ], - [ - 0.016979, - "\u001b[?25l\u001b[?2004l\u001b[52;1H\u001b[K\u001b[52;1H\u001b[?2004l\u001b[?1l\u001b>\u001b[?12l\u001b[?25h\u001b[?1049l" - ], - [ - 0.002329, - "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r" - ], - [ - 0.02599, - "\r\n\u001b[34m\u001b[01mcri-o\u001b[22m \u001b[90mgit/master \u001b[39m \u001b[33m853s\u001b[39m\r\n" - ], - [ - 0.001018, - "\u001b]7;file://localhost.localdomain/home/ryan/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 0.000113, - "\u001b]2;ryan@localhost: ~/Development/Go/src/github.com/kubernetes-incubator/cri-o\u0007" - ], - [ - 2.3e-05, - "\u001b]1;..cubator/cri-o\u0007" - ], - [ - 8.7e-05, - "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[35m❯\u001b[39m \u001b[K\u001b[208C\u001b[90m\u001b[39m\u001b[208D" - ], - [ - 6.7e-05, - "\u001b[?1h\u001b=" - ], - [ - 2.7e-05, - "\u001b[?2004h" - ], - [ - 0.177155, - "e" - ], - [ - 0.184267, - "\bex" - ], - [ - 0.095845, - "i" - ], - [ - 0.144511, - "t" - ], - [ - 0.087093, - "\u001b[?1l\u001b>" - ], - [ - 0.000252, - "\u001b[?2004l\r\r\n" - ], - [ - 0.009572, - "\u001b]2;exit\u0007\u001b]1;exit\u0007" - ] - ] -} \ No newline at end of file diff --git a/libkpod/hooks.go b/libkpod/hooks.go index 681355bcf..26a9ee431 100644 --- a/libkpod/hooks.go +++ b/libkpod/hooks.go @@ -1,18 +1,19 @@ package libkpod +/* import ( "encoding/json" "io/ioutil" - "os" - "path/filepath" - "regexp" - "strings" - "syscall" + "os" + "path/filepath" + "regexp" + "strings" + "syscall" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" ) - +*/ const ( // DefaultHooksDirPath Default directory containing hooks config files DefaultHooksDirPath = "/usr/share/containers/oci/hooks.d" diff --git a/libkpod/testdata/config.toml b/libkpod/testdata/config.toml index 318273674..e19d36017 100644 --- a/libkpod/testdata/config.toml +++ b/libkpod/testdata/config.toml @@ -16,7 +16,7 @@ cgroup_manager = "cgroupfs" hooks_dir_path = "/usr/share/containers/oci/hooks.d" pids_limit = 2048 - container_exits_dir = "/var/run/kpod/exits" + container_exits_dir = "/var/run/podman/exits" [crio.image] default_transport = "docker://" pause_image = "kubernetes/pause" diff --git a/test/helpers.bash b/test/helpers.bash index abf481c9a..30f66f283 100644 --- a/test/helpers.bash +++ b/test/helpers.bash @@ -17,7 +17,7 @@ else CRIO_ROOT=$(cd "$INTEGRATION_ROOT/.."; pwd -P) fi -KPOD_BINARY=${KPOD_BINARY:-${CRIO_ROOT}/bin/kpod} +PODMAN_BINARY=${PODMAN_BINARY:-${CRIO_ROOT}/bin/podman} # Path of the conmon binary. CONMON_BINARY=${CONMON_BINARY:-${CRIO_ROOT}/bin/conmon} # Path of the default seccomp profile. @@ -73,7 +73,7 @@ BB="docker.io/library/busybox:latest" ALPINE="docker.io/library/alpine:latest" FEDORA_MINIMAL="registry.fedoraproject.org/fedora-minimal:latest" -# kpod pull needs a configuration file for shortname pulls +# podman pull needs a configuration file for shortname pulls export REGISTRIES_CONFIG_PATH="$INTEGRATION_ROOT/registries.conf" # Setup default hooks dir @@ -109,7 +109,7 @@ LIBPOD_CNI_PLUGIN=${LIBPOD_CNI_PLUGIN:-/opt/cni/bin/} POD_CIDR="10.88.0.0/16" POD_CIDR_MASK="10.88.*.*" -KPOD_OPTIONS="--root $TESTDIR/crio $STORAGE_OPTIONS --runroot $TESTDIR/crio-run --runtime ${RUNTIME_BINARY} --conmon ${CONMON_BINARY} --cni-config-dir ${LIBPOD_CNI_CONFIG}" +PODMAN_OPTIONS="--root $TESTDIR/crio $STORAGE_OPTIONS --runroot $TESTDIR/crio-run --runtime ${RUNTIME_BINARY} --conmon ${CONMON_BINARY} --cni-config-dir ${LIBPOD_CNI_CONFIG}" cp "$CONMON_BINARY" "$TESTDIR/conmon" @@ -160,7 +160,7 @@ function wait_until_reachable() { } function cleanup_test() { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rm --force --all" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rm --force --all" echo "$output" rm -rf "$TESTDIR" } diff --git a/test/kpod_attach.bats b/test/kpod_attach.bats deleted file mode 100644 index fe2781f8d..000000000 --- a/test/kpod_attach.bats +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "attach to a bogus container" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} attach foobar" - echo "$output" - [ "$status" -eq 1 ] -} - -@test "attach to non-running container" { - ${KPOD_BINARY} ${KPOD_OPTIONS} create --name foobar -d -i ${ALPINE} ls - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} attach foobar" - echo "$output" - [ "$status" -eq 1 ] -} - -@test "attach to multiple containers" { - ${KPOD_BINARY} ${KPOD_OPTIONS} run --name foobar1 -d -i ${ALPINE} /bin/sh - ${KPOD_BINARY} ${KPOD_OPTIONS} run --name foobar2 -d -i ${ALPINE} /bin/sh - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} attach foobar1 foobar2" - echo "$output" - [ "$status" -eq 1 ] -} diff --git a/test/kpod_create.bats b/test/kpod_create.bats deleted file mode 100644 index e4903f6aa..000000000 --- a/test/kpod_create.bats +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function setup() { - prepare_network_conf - copy_images -} - -function teardown() { - cleanup_test -} - -@test "create a container based on local image" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} create $BB ls - echo "$output" - [ "$status" -eq 0 ] -} - -@test "create a container based on a remote image" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} create ${BB_GLIBC} ls - echo "$output" - [ "$status" -eq 0 ] -} - -@test "ensure short options" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} create -dt ${BB_GLIBC} ls - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_diff.bats b/test/kpod_diff.bats deleted file mode 100644 index 5b71dfd48..000000000 --- a/test/kpod_diff.bats +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function setup() { - prepare_network_conf - copy_images -} - -function teardown() { - cleanup_test -} - -@test "test diff of image and parent" { - run ${KPOD_BINARY} $KPOD_OPTIONS diff $BB - echo "$output" - [ "$status" -eq 0 ] -} - -@test "test diff on non-existent layer" { - run ${KPOD_BINARY} $KPOD_OPTIONS diff "abc123" - echo "$output" - [ "$status" -ne 0 ] -} - -@test "test diff with json output" { - # run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} diff --format json $IMAGE | python -m json.tool" - run ${KPOD_BINARY} $KPOD_OPTIONS diff --format json $BB - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_exec.bats b/test/kpod_exec.bats deleted file mode 100644 index 5396298d3..000000000 --- a/test/kpod_exec.bats +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "exec into a bogus container" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} exec foobar ls - echo "$output" - [ "$status" -eq 1 ] -} - -@test "exec without command should fail" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} exec foobar - echo "$output" - [ "$status" -eq 1 ] -} - -@test "exec simple command" { - ${KPOD_BINARY} ${KPOD_OPTIONS} run -d -t --name foobar1 ${ALPINE} sleep 60 - run ${KPOD_BINARY} ${KPOD_OPTIONS} exec foobar1 ls - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_export.bats b/test/kpod_export.bats deleted file mode 100644 index 59942ea57..000000000 --- a/test/kpod_export.bats +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "kpod export output flag" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} create $BB ls" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} export -o container.tar $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rm $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - rm -f container.tar -} diff --git a/test/kpod_history.bats b/test/kpod_history.bats deleted file mode 100644 index 466b977db..000000000 --- a/test/kpod_history.bats +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "kpod history default" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} history $ALPINE - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod history with Go template format" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} history --format "{{.ID}} {{.Created}}" $ALPINE - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod history human flag" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} history --human=false $ALPINE - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod history quiet flag" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} history -q $ALPINE - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod history no-trunc flag" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} history --no-trunc $ALPINE - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod history json flag" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} history --format json $ALPINE | python -m json.tool" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod history short options" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} history -qH $ALPINE - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_images.bats b/test/kpod_images.bats deleted file mode 100644 index ae55c0a37..000000000 --- a/test/kpod_images.bats +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -IMAGE="busybox" - -function setup() { - prepare_network_conf -} - -function teardown() { - cleanup_test -} - -@test "kpod images" { - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} pull ${IMAGE} - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} images - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi ${IMAGE} - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod images test valid json" { - ${KPOD_BINARY} ${KPOD_OPTIONS} pull ${IMAGE} - run ${KPOD_BINARY} ${KPOD_OPTIONS} images --format json - echo "$output" | python -m json.tool - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi ${IMAGE} - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod images check name json output" { - ${KPOD_BINARY} ${KPOD_OPTIONS} pull ${IMAGE} - run ${KPOD_BINARY} ${KPOD_OPTIONS} images --format json - [ "$status" -eq 0 ] - name=$(echo $output | python -c 'import sys; import json; print(json.loads(sys.stdin.read())[0])["names"][0]') - [ "$name" == "docker.io/library/${IMAGE}:latest" ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi ${IMAGE} - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod images short options" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} images -qn - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_import.bats b/test/kpod_import.bats deleted file mode 100644 index 7348a3c82..000000000 --- a/test/kpod_import.bats +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -IMAGE="redis:alpine" - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "kpod import with source and reference" { - skip "Test needs to be converted to kpod run bash -c" - start_crio - run bash -c crioctl pod run bash -c --config "$TESTDATA"/sandbox_config.json - echo "$output" - [ "$status" -eq 0 ] - pod_id="$output" - run bash -c crioctl image pull "$IMAGE" - echo "$output" - [ "$status" -eq 0 ] - run bash -c crioctl ctr create --config "$TESTDATA"/container_config.json --pod "$pod_id" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} export -o container.tar "$ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} import container.tar imported-image - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} images - echo "$output" - [ "$status" -eq 0 ] - images="$output" - run bash -c grep "imported-image" <<< "$images" - echo "$output" - [ "$status" -eq 0 ] - cleanup_ctrs - cleanup_pods - stop_crio - rm -f container.tar -} - -@test "kpod import without reference" { - skip "Test needs to be converted to kpod run bash -c" - start_crio - run bash -c crioctl pod run bash -c --config "$TESTDATA"/sandbox_config.json - echo "$output" - [ "$status" -eq 0 ] - pod_id="$output" - run bash -c crioctl image pull "$IMAGE" - echo "$output" - [ "$status" -eq 0 ] - run bash -c crioctl ctr create --config "$TESTDATA"/container_config.json --pod "$pod_id" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} export -o container.tar "$ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} import container.tar - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} images - echo "$output" - [ "$status" -eq 0 ] - images="$output" - run bash -c grep "" <<< "$images" - echo "$output" - [ "$status" -eq 0 ] - cleanup_ctrs - cleanup_pods - stop_crio - rm -f container.tar -} - -@test "kpod import with message flag" { - skip "Test needs to be converted to kpod run bash -c" - start_crio - run bash -c crioctl pod run bash -c --config "$TESTDATA"/sandbox_config.json - echo "$output" - [ "$status" -eq 0 ] - pod_id="$output" - run bash -c crioctl image pull "$IMAGE" - echo "$output" - [ "$status" -eq 0 ] - run bash -c crioctl ctr create --config "$TESTDATA"/container_config.json --pod "$pod_id" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} export -o container.tar "$ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} import --message "importing container test message" container.tar imported-image - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} history imported-image - echo "$output" - [ "$status" -eq 0 ] - history="$output" - run bash -c grep "importing container test message" <<< "$history" - echo "$output" - [ "$status" -eq 0 ] - cleanup_ctrs - cleanup_pods - stop_crio - rm -f container.tar -} - -@test "kpod import with change flag" { - skip "Test needs to be converted to kpod run bash -c" - start_crio - run bash -c crioctl pod run bash -c --config "$TESTDATA"/sandbox_config.json - echo "$output" - [ "$status" -eq 0 ] - pod_id="$output" - run bash -c crioctl image pull "$IMAGE" - echo "$output" - [ "$status" -eq 0 ] - run bash -c crioctl ctr create --config "$TESTDATA"/container_config.json --pod "$pod_id" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} export -o container.tar "$ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} import --change "CMD=/bin/bash" container.tar imported-image - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} inspect imported-image - echo "$output" - [ "$status" -eq 0 ] - inspect="$output" - run bash -c grep "/bin/bash" <<< "$inspect" - echo "$output" - [ "$status" -eq 0 ] - cleanup_ctrs - cleanup_pods - stop_crio - rm -f container.tar -} diff --git a/test/kpod_inspect.bats b/test/kpod_inspect.bats deleted file mode 100644 index 7a63208e9..000000000 --- a/test/kpod_inspect.bats +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "kpod inspect image" { - run bash -c "${KPOD_BINARY} $KPOD_OPTIONS inspect ${ALPINE} | python -m json.tool" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod inspect non-existent container" { - run ${KPOD_BINARY} $KPOD_OPTIONS inspect 14rcole/non-existent - echo "$output" - [ "$status" -ne 0 ] -} - -@test "kpod inspect with format" { - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS inspect --format {{.ID}} ${ALPINE} - echo "$output" - [ "$status" -eq 0 ] - inspectOutput="$output" - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS images --no-trunc --quiet ${ALPINE} - echo "$output" - [ "$status" -eq 0 ] - [ "$output" = "$inspectOutput" ] - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod inspect specified type" { - run bash -c "${KPOD_BINARY} $KPOD_OPTIONS inspect --type image ${ALPINE} | python -m json.tool" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod inspect container with size" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} create ${BB} ls" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} $KPOD_OPTIONS inspect --size $ctr_id | python -m json.tool | grep SizeRootFs" - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_kill.bats b/test/kpod_kill.bats deleted file mode 100644 index 2bd749239..000000000 --- a/test/kpod_kill.bats +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "kill a bogus container" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} kill foobar" - echo "$output" - [ "$status" -ne 0 ] -} - -@test "kill a running container by id" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} sleep 9999" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} kill $ctr_id" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps" - [ "$status" -eq 0 ] -} - -@test "kill a running container by id with TERM" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} sleep 9999" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} kill -s TERM $ctr_id" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps --no-trunc" - [ "$status" -eq 0 ] -} - -@test "kill a running container by name" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --name test1 -d ${ALPINE} sleep 9999" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} kill -s TERM test1" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps --no-trunc" - [ "$status" -eq 0 ] -} - -@test "kill a running container by id with a bogus signal" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} sleep 9999" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} kill -s foobar $ctr_id" - [ "$status" -eq 1 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps --no-trunc" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_load.bats b/test/kpod_load.bats deleted file mode 100644 index 59b4a4e50..000000000 --- a/test/kpod_load.bats +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function setup() { - prepare_network_conf - copy_images -} - -function teardown() { - cleanup_test -} -@test "kpod load input flag" { - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} save -o alpine.tar $ALPINE - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi $ALPINE - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} load -i alpine.tar - echo "$output" - [ "$status" -eq 0 ] - rm -f alpine.tar -} - -@test "kpod load oci-archive image" { - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} save -o alpine.tar --format oci-archive $ALPINE - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rmi $ALPINE - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} load -i alpine.tar - echo "$output" - [ "$status" -eq 0 ] - rm -f alpine.tar -} - -@test "kpod load oci-archive image with signature-policy" { - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} save -o alpine.tar --format oci-archive $ALPINE - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rmi $ALPINE - [ "$status" -eq 0 ] - cp /etc/containers/policy.json /tmp - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} load --signature-policy /tmp/policy.json -i alpine.tar - echo "$output" - [ "$status" -eq 0 ] - rm -f /tmp/policy.json - rm -f alpine.tar -} - -@test "kpod load using quiet flag" { - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} save -o alpine.tar $ALPINE - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi $ALPINE - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} load -q -i alpine.tar - echo "$output" - [ "$status" -eq 0 ] - rm -f alpine.tar -} - -@test "kpod load directory" { - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} save --format oci-dir -o alp-dir $ALPINE - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi $ALPINE - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} load -i alp-dir - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi alp-dir - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod load non-existent file" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} load -i alpine.tar - echo "$output" - [ "$status" -ne 0 ] -} diff --git a/test/kpod_logs.bats b/test/kpod_logs.bats deleted file mode 100644 index 719dd6b06..000000000 --- a/test/kpod_logs.bats +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "display logs for container" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d $BB ls" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} logs $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rm $ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "tail three lines of logs for container" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d $BB ls" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} logs --tail 3 $ctr_id" - echo "$output" - lines=$(echo "$output" | wc -l) - [ "$status" -eq 0 ] - [[ $(wc -l < "$output" ) -le 3 ]] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rm $ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "display logs for container since a given time" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d $BB ls" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} logs --since 2017-08-07T10:10:09.056611202-04:00 $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rm $ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_mount.bats b/test/kpod_mount.bats deleted file mode 100644 index 12c41c071..000000000 --- a/test/kpod_mount.bats +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -IMAGE="redis:alpine" - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "mount" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} create $BB ls" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} mount $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} mount --notruncate | grep $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} unmount $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} mount $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} mount --format=json | python -m json.tool | grep $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} unmount $ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_pause.bats b/test/kpod_pause.bats deleted file mode 100644 index 1a9bd7dda..000000000 --- a/test/kpod_pause.bats +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function setup() { - prepare_network_conf - copy_images -} - -function teardown() { - cleanup_test -} - -@test "pause a bogus container" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} pause foobar" - echo "$output" - [ "$status" -eq 1 ] -} - -@test "unpause a bogus container" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} unpause foobar" - echo "$output" - [ "$status" -eq 1 ] -} - -@test "pause a created container by id" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d $BB sleep 60" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} pause $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} unpause $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rm -f $ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "pause a running container by id" { - skip "Test needs to wait for --force to work for kpod rm" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d $BB sleep 60" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} pause $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} unpause $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rm -f $ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "unpause a running container" { - skip "Test needs to wait for --force to work for kpod rm" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d $BB sleep 60" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} unpause $ctr_id" - echo "$output" - [ "$status" -eq 1 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rm -f $ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "remove a paused container by id" { - skip "Test needs to wait for --force to work for kpod rm" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d $BB sleep 60" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} pause $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rm $ctr_id" - echo "$output" - [ "$status" -eq 1 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rm --force $ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "stop a paused container created by id" { - skip "Test needs to wait for kpod stop to be implemented" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d $BB sleep 60" - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} pause $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} stop $ctr_id" - echo "$output" - [ "$status" -eq 1 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} unpause $ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -a --filter id=$ctr_id" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rm $ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_ps.bats b/test/kpod_ps.bats deleted file mode 100644 index 3f4758f59..000000000 --- a/test/kpod_ps.bats +++ /dev/null @@ -1,191 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -IMAGE="redis:alpine" -function setup() { - prepare_network_conf - copy_images -} - -function teardown() { - cleanup_test -} - -@test "kpod ps with no containers" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps default" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps all flag" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -a" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps size flag" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -a --size" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps quiet flag" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls" - ctr_id="$output" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -a --quiet" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps latest flag" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps --latest" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps last flag" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${BB} ls" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls -s" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps --last 2" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps no-trunc flag" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -a --no-trunc" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps namespace flag" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps --all --namespace" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps namespace flag and format flag = json" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -a --ns --format json | python -m json.tool | grep namespace" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps without namespace flag and format flag = json" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -a --format json | python -m json.tool | grep namespace" - echo "$output" - [ "$status" -eq 1 ] -} - -@test "kpod ps format flag = go template" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -a --format 'table {{.ID}} {{.Image}} {{.Labels}}'" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps filter flag - ancestor" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -a --filter ancestor=${ALPINE}" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps filter flag - id" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -a --filter id=$ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps filter flag - status" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} sleep 99" - ctr_id="$output" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -a --filter status=running" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} stop $ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps short options" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} sleep 99" - ctr_id="$output" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -aq" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} stop $ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod ps with mutually exclusive flags" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} sleep 99" - ctr_id="$output" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -aqs" - echo "$output" - [ "$status" -ne 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -a --ns -s" - echo "$output" - [ "$status" -ne 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -a --ns format {{.ID}}" - echo "$output" - [ "$status" -ne 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps -a --ns --format json" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} stop $ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_pull.bats b/test/kpod_pull.bats deleted file mode 100644 index 6996f59cf..000000000 --- a/test/kpod_pull.bats +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -@test "kpod pull from docker with tag" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} pull debian:6.0.10 - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rmi debian:6.0.10 - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod pull from docker without tag" { - run ${KPOD_BINARY} $KPOD_OPTIONS pull debian - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rmi debian - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod pull from a non-docker registry with tag" { - run ${KPOD_BINARY} $KPOD_OPTIONS pull registry.fedoraproject.org/fedora:rawhide - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rmi registry.fedoraproject.org/fedora:rawhide - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod pull from a non-docker registry without tag" { - run ${KPOD_BINARY} $KPOD_OPTIONS pull registry.fedoraproject.org/fedora - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rmi registry.fedoraproject.org/fedora - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod pull using digest" { - run ${KPOD_BINARY} $KPOD_OPTIONS pull alpine@sha256:1072e499f3f655a032e88542330cf75b02e7bdf673278f701d7ba61629ee3ebe - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rmi alpine:latest - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod pull from a non existent image" { - run ${KPOD_BINARY} $KPOD_OPTIONS pull umohnani/get-started - echo "$output" - [ "$status" -ne 0 ] -} - -@test "kpod pull from docker with shortname" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} pull debian - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rmi docker.io/debian:latest - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod pull from docker with shortname and tag" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} pull debian:6.0.10 - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rmi docker.io/debian:6.0.10 - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod pull from docker-archive" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} pull alpine - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} save -o alp.tar alpine - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi alpine - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} pull docker-archive:alp.tar - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi alpine - echo "$output" - [ "$status" -eq 0 ] - rm -f alp.tar -} - -@test "kpod pull from oci-archive" { - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} pull alpine - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} save --format oci-archive -o oci-alp.tar alpine - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi alpine - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} pull oci-archive:oci-alp.tar - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi alpine - echo "$output" - [ "$status" -eq 0 ] - rm -f oci-alp.tar -} - -@test "kpod pull from local directory" { - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} pull alpine - echo "$output" - [ "$status" -eq 0 ] - run mkdir test_pull_dir - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} push alpine dir:test_pull_dir - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi alpine - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} pull dir:test_pull_dir - echo "$output" - [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi test_pull_dir - echo "$output" - [ "$status" -eq 0 ] - rm -rf test_pull_dir -} diff --git a/test/kpod_push.bats b/test/kpod_push.bats deleted file mode 100644 index 967aa6da3..000000000 --- a/test/kpod_push.bats +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "kpod push to containers/storage" { - skip "Issues with bash, skipping" - echo # Push the image right back into storage: it now has two names. - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS --log-level=debug push $ALPINE containers-storage:busybox:test - echo "$output" - [ "$status" -eq 0 ] - echo # Try to remove it using the first name. Should be refused. - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS --log-level=debug rmi $ALPINE - echo "$output" - [ "$status" -ne 0 ] - echo # Try to remove it using the second name. Should also be refused. - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS --log-level=debug rmi busybox:test - echo "$output" - [ "$status" -ne 0 ] - echo # Force removal despite having multiple names. Should succeed. - run ${KPOD_BINARY} $KPOD_OPTIONS --log-level=debug rmi -f busybox:test - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod push to directory" { - mkdir /tmp/busybox - run ${KPOD_BINARY} $KPOD_OPTIONS push $ALPINE dir:/tmp/busybox - echo "$output" - [ "$status" -eq 0 ] - rm -rf /tmp/busybox - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rmi $ALPINE - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod push to docker archive" { - run ${KPOD_BINARY} $KPOD_OPTIONS push $ALPINE docker-archive:/tmp/busybox-archive:1.26 - echo "$output" - echo "--->" - [ "$status" -eq 0 ] - rm /tmp/busybox-archive - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rmi $ALPINE - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod push to oci-archive without compression" { - run ${KPOD_BINARY} $KPOD_OPTIONS push $ALPINE oci-archive:/tmp/oci-busybox.tar:alpine - echo "$output" - [ "$status" -eq 0 ] - rm -f /tmp/oci-busybox.tar - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rmi $ALPINE - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod push without signatures" { - mkdir /tmp/busybox - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS push --remove-signatures $ALPINE dir:/tmp/busybox - echo "$output" - [ "$status" -eq 0 ] - rm -rf /tmp/busybox - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rmi $ALPINE - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod push without transport" { - run ${KPOD_BINARY} $KPOD_OPTIONS pull "$ALPINE" - echo "$output" - [ "$status" -eq 0 ] - # TODO: The following should fail until a registry is running in Travis CI. - run ${KPOD_BINARY} $KPOD_OPTIONS push "$ALPINE" localhost:5000/my-alpine - echo "$output" - [ "$status" -ne 0 ] - run ${KPOD_BINARY} $KPOD_OPTIONS rmi "$ALPINE" - echo "$output" -} - -@test "push with manifest type conversion" { - run bash -c "${KPOD_BINARY} $KPOD_OPTIONS push --format oci "${BB}" dir:my-dir" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "grep "application/vnd.oci.image.config.v1+json" my-dir/manifest.json" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} $KPOD_OPTIONS push --compress --format v2s2 "${BB}" dir:my-dir" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "grep "application/vnd.docker.distribution.manifest.v2+json" my-dir/manifest.json" - echo "$output" - [ "$status" -eq 0 ] - rm -rf my-dir -} diff --git a/test/kpod_rm.bats b/test/kpod_rm.bats deleted file mode 100644 index 02e184f4c..000000000 --- a/test/kpod_rm.bats +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function setup() { - prepare_network_conf - copy_images -} - -function teardown() { - cleanup_test -} - -@test "remove a stopped container" { - run ${KPOD_BINARY} $KPOD_OPTIONS run -d ${ALPINE} ls - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rm "$ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "refuse to remove a running container" { - run ${KPOD_BINARY} $KPOD_OPTIONS run -d ${ALPINE} sleep 15 - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash ${KPOD_BINARY} $KPOD_OPTIONS rm "$ctr_id" - echo "$output" - [ "$status" -ne 0 ] -} - -@test "remove a created container" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} create $BB ls - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rm -f "$ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "remove a running container" { - run ${KPOD_BINARY} $KPOD_OPTIONS run -d ${ALPINE} sleep 15 - echo "$output" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c ${KPOD_BINARY} $KPOD_OPTIONS rm -f "$ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "remove all containers" { - ${KPOD_BINARY} ${KPOD_OPTIONS} create $BB ls - ${KPOD_BINARY} ${KPOD_OPTIONS} create $BB ls -l - ${KPOD_BINARY} ${KPOD_OPTIONS} create $BB true - ${KPOD_BINARY} ${KPOD_OPTIONS} create $BB whoami - run ${KPOD_BINARY} $KPOD_OPTIONS rm -a - echo "$output" - [ "$status" -eq 0 ] -} - -@test "remove all containers with one running with short options" { - ${KPOD_BINARY} ${KPOD_OPTIONS} create $BB ls - ${KPOD_BINARY} ${KPOD_OPTIONS} create $BB ls -l - ${KPOD_BINARY} ${KPOD_OPTIONS} create $BB whoami - ${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} sleep 30 - run ${KPOD_BINARY} $KPOD_OPTIONS rm -af - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_rmi.bats b/test/kpod_rmi.bats deleted file mode 100644 index 034fd9ab7..000000000 --- a/test/kpod_rmi.bats +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -IMAGE1="docker.io/library/alpine:latest" -IMAGE2="docker.io/library/busybox:latest" -IMAGE3="docker.io/library/busybox:glibc" - -function teardown() { - cleanup_test -} - -function pullImages() { - ${KPOD_BINARY} $KPOD_OPTIONS pull $IMAGE1 - ${KPOD_BINARY} $KPOD_OPTIONS pull $IMAGE2 - ${KPOD_BINARY} $KPOD_OPTIONS pull $IMAGE3 -} - -@test "kpod rmi bogus image" { - run ${KPOD_BINARY} $KPOD_OPTIONS rmi debian:6.0.10 - echo "$output" - [ "$status" -eq 1 ] -} - -@test "kpod rmi image with fq name" { - pullImages - run ${KPOD_BINARY} $KPOD_OPTIONS rmi $IMAGE1 - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod rmi image with short name" { - pullImages - run ${KPOD_BINARY} $KPOD_OPTIONS rmi alpine - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod rmi all images" { - pullImages - run ${KPOD_BINARY} $KPOD_OPTIONS rmi -a - echo "$output" - [ "$status" -eq 0 ] -} - -@test "kpod rmi all images forceably with short options" { - pullImages - ${KPOD_BINARY} $KPOD_OPTIONS create ${IMAGE1} ls - run ${KPOD_BINARY} $KPOD_OPTIONS rmi -af - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_run.bats b/test/kpod_run.bats deleted file mode 100644 index f01d254cc..000000000 --- a/test/kpod_run.bats +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "run a container based on local image" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run $BB ls" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "run a container based on local image with short options" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -dt $BB ls" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "run a container based on a remote image" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run ${BB_GLIBC} ls" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "run selinux test" { - if [ ! -e /usr/sbin/selinuxenabled ] || [ ! /usr/sbin/selinuxenabled ]; then - skip "SELinux not enabled" - fi - - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run ${ALPINE} cat /proc/self/attr/current" - echo "$output" - firstLabel=$output - - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run ${ALPINE} cat /proc/self/attr/current" - echo "$output" - [ "$output" != "${firstLabel}" ] -} - - -@test "run selinux grep test" { - skip "Until console issues worked out" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -t -i --security-opt label=level:s0:c1,c2 ${ALPINE} cat /proc/self/attr/current | grep s0:c1,c2" - echo "$output" - [ "$status" -eq 0 ] - -} - -@test "run capabilities test" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-add all ${ALPINE} cat /proc/self/status" - echo "$output" - [ "$status" -eq 0 ] - - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-add sys_admin ${ALPINE} cat /proc/self/status" - echo "$output" - [ "$status" -eq 0 ] - - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-drop all ${ALPINE} cat /proc/self/status" - echo "$output" - [ "$status" -eq 0 ] - - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-drop setuid ${ALPINE} cat /proc/self/status" - echo "$output" - [ "$status" -eq 0 ] - -} - -@test "run environment test" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --env FOO=BAR ${ALPINE} printenv FOO | tr -d '\r'" - echo "$output" - [ "$status" -eq 0 ] - [ $output = "BAR" ] - - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --env PATH="/bin" ${ALPINE} printenv PATH | tr -d '\r'" - echo "$output" - [ "$status" -eq 0 ] - [ $output = "/bin" ] - - run bash -c "export FOO=BAR; ${KPOD_BINARY} ${KPOD_OPTIONS} run --env FOO ${ALPINE} printenv FOO | tr -d '\r'" - echo "$output" - [ "$status" -eq 0 ] - [ "$output" = "BAR" ] - - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --env FOO ${ALPINE} printenv" - echo "$output" - [ "$status" -ne 0 ] - -# We don't currently set the hostname in containers, since we are not setting up -# networking. As soon as kpod run gets network support we need to uncomment this -# test. -# run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run ${ALPINE} sh -c printenv | grep HOSTNAME" -# echo "$output" -# [ "$status" -eq 0 ] -} - -IMAGE="docker.io/library/fedora:latest" - -@test "run limits test" { - - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} pull ${IMAGE}" - - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --ulimit rtprio=99 --cap-add=sys_nice ${IMAGE} cat /proc/self/sched" - echo $output - [ "$status" -eq 0 ] - - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --ulimit nofile=2048:2048 ${IMAGE} ulimit -n | tr -d '\r'" - echo $output - [ "$status" -eq 0 ] - [ "$output" = 2048 ] - - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --oom-kill-disable=true ${IMAGE} echo memory-hog" - echo $output - [ "$status" -eq 0 ] - - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --oom-score-adj=100 ${IMAGE} cat /proc/self/oom_score_adj | tr -d '\r'" - echo $output - [ "$status" -eq 0 ] - [ "$output" = 100 ] - -} - -@test "kpod run with volume flag" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -v ${MOUNT_PATH}:/run/test ${BB} cat /proc/self/mountinfo | grep '${MOUNT_PATH} /run/test rw,relatime'" - echo $output - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -v ${MOUNT_PATH}:/run/test:ro ${BB} cat /proc/self/mountinfo | grep '${MOUNT_PATH} /run/test ro,relatime'" - echo $output - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -v ${MOUNT_PATH}:/run/test:shared ${BB} cat /proc/self/mountinfo | grep '${MOUNT_PATH} /run/test rw,relatime shared:'" - echo $output - [ "$status" -eq 0 ] -} diff --git a/test/kpod_run_ns.bats b/test/kpod_run_ns.bats deleted file mode 100644 index a1b364f8b..000000000 --- a/test/kpod_run_ns.bats +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "run pidns test" { - - ${KPOD_BINARY} ${KPOD_OPTIONS} pull ${ALPINE} - - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run ${ALPINE} sh -c 'echo \$\$'" - echo $output - [ "$status" -eq 0 ] - pid=$(echo $output | tr -d '\r') - [ $pid = "1" ] - - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --pid=host ${ALPINE} sh -c 'echo \$\$'" - echo $output - pid=$(echo $output | tr -d '\r') - [ "$status" -eq 0 ] - [ $pid != "1" ] - - run ${KPOD_BINARY} ${KPOD_OPTIONS} run --pid=badpid ${ALPINE} sh -c 'echo $$' - echo $output - [ "$status" -ne 0 ] -} - -@test "run ipcns test" { - - ${KPOD_BINARY} ${KPOD_OPTIONS} pull ${ALPINE} - - tmp=$(mktemp /dev/shm/foo.XXXXX) - run ${KPOD_BINARY} ${KPOD_OPTIONS} run --ipc=host ${ALPINE} ls $tmp - echo $output - out=$(echo $output | tr -d '\r') - [ "$status" -eq 0 ] - [ $out != $tmp ] - - rm -f $tmp - - run ${KPOD_BINARY} ${KPOD_OPTIONS} run --ipc=badpid ${ALPINE} sh -c 'echo $$' - echo $output - [ "$status" -ne 0 ] -} diff --git a/test/kpod_save.bats b/test/kpod_save.bats deleted file mode 100644 index 03d24ed86..000000000 --- a/test/kpod_save.bats +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "kpod save output flag" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} save -o alpine.tar $ALPINE" - echo "$output" - [ "$status" -eq 0 ] - rm -f alpine.tar -} - -@test "kpod save oci flag" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} save -o alpine.tar --format oci-archive $ALPINE" - echo "$output" - [ "$status" -eq 0 ] - rm -f alpine.tar -} - -@test "kpod save using stdout" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} save $ALPINE > alpine.tar" - [ "$status" -eq 0 ] - rm -f alpine.tar -} - -@test "kpod save quiet flag" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} save -q -o alpine.tar $ALPINE" - echo "$output" - [ "$status" -eq 0 ] - rm -f alpine.tar -} - -@test "kpod save non-existent image" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} save -o alpine.tar FOOBAR" - echo "$output" - [ "$status" -ne 0 ] -} - -@test "kpod save to directory wit oci format" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} save --format oci-dir -o alp-dir $ALPINE" - echo "$output" - [ "$status" -eq 0 ] - rm -rf alp-dir -} - -@test "kpod save to directory wit v2s2 (docker) format" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} save --format docker-dir -o alp-dir $ALPINE" - echo "$output" - [ "$status" -eq 0 ] - rm -rf alp-dir -} diff --git a/test/kpod_start.bats b/test/kpod_start.bats deleted file mode 100644 index 999b29982..000000000 --- a/test/kpod_start.bats +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function setup() { - prepare_network_conf - copy_images -} - -function teardown() { - cleanup_test -} - -@test "start bogus container" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} start 1234 - echo "$output" - [ "$status" -eq 1 ] -} - -@test "start single container by id" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} create -d ${ALPINE} ls - ctr_id=${output} - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} start $ctr_id - echo "$output" - [ "$status" -eq 0 ] -} - -@test "start single container by name" { - ${KPOD_BINARY} ${KPOD_OPTIONS} create -d --name foobar99 ${ALPINE} ls - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} start foobar - echo "$output" - [ "$status" -eq 0 ] -} - -@test "start multiple containers" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} create -d ${ALPINE} ls - ctr1_id=${output} - run ${KPOD_BINARY} ${KPOD_OPTIONS} create -d ${ALPINE} ls - ctr1_id2=${output} - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} start $ctr1_id $ctr2_id - echo "$output" - [ "$status" -eq 0 ] -} - -@test "start multiple containers -- attach should fail" { - ${KPOD_BINARY} ${KPOD_OPTIONS} create --name foobar1 -d ${ALPINE} ls - ${KPOD_BINARY} ${KPOD_OPTIONS} create --name foobar2 -d ${ALPINE} ls - run ${KPOD_BINARY} ${KPOD_OPTIONS} start -a foobar1 foobar2 - echo "$output" - [ "$status" -eq 1 ] -} diff --git a/test/kpod_stats.bats b/test/kpod_stats.bats deleted file mode 100644 index b4c879c46..000000000 --- a/test/kpod_stats.bats +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "stats should run with no containers" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} stats --no-stream - echo "$output" - [ "$status" -eq 0 ] -} - -@test "stats with bogus container id" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} stats --no-stream 123 - echo "$output" - [ "$status" -eq 1 ] -} - -@test "stats on a running container" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} run -d -t ${ALPINE} sleep 99 - ctr_id="$output" - echo "$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} stats --no-stream $ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "stats on a running container no id" { - ${KPOD_BINARY} ${KPOD_OPTIONS} run -d -t ${ALPINE} sleep 99 - run ${KPOD_BINARY} ${KPOD_OPTIONS} stats --no-stream - echo "$output" - [ "$status" -eq 0 ] -} - -@test "stats on all containers" { - ${KPOD_BINARY} ${KPOD_OPTIONS} run -d -t ${ALPINE} ls - run ${KPOD_BINARY} ${KPOD_OPTIONS} stats --no-stream -a - echo "$output" - [ "$status" -eq 0 ] -} - -@test "stats only output IDs" { - ${KPOD_BINARY} ${KPOD_OPTIONS} run -d -t ${ALPINE} sleep 99 - run ${KPOD_BINARY} ${KPOD_OPTIONS} stats --no-stream --format "{{.Container}}" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "stats json output" { - ${KPOD_BINARY} ${KPOD_OPTIONS} run -d -t ${ALPINE} ls - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} stats --no-stream -a --format json | python -m json.tool" - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_stop.bats b/test/kpod_stop.bats deleted file mode 100644 index 0822d88f5..000000000 --- a/test/kpod_stop.bats +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "stop a bogus container" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} stop foobar" - echo "$output" - [ "$status" -eq 1 ] -} - -@test "stop a running container by id" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} sleep 9999" - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} stop $ctr_id" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps" - [ "$status" -eq 0 ] -} - -@test "stop a running container by name" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --name test1 -d ${ALPINE} sleep 9999" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} stop test1" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} ps" - [ "$status" -eq 0 ] -} - -@test "stop all containers" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --name test1 -d ${ALPINE} sleep 9999" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --name test2 -d ${ALPINE} sleep 9999" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --name test3 -d ${ALPINE} sleep 9999" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} stop -a -t 1" - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_tag.bats b/test/kpod_tag.bats deleted file mode 100644 index ce3d19140..000000000 --- a/test/kpod_tag.bats +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -IMAGE="alpine:latest" - -function teardown() { - cleanup_test -} - -@test "kpod tag with shortname:latest" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} pull $IMAGE" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} tag $IMAGE foobar:latest" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} inspect foobar:latest" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rmi --force foobar:latest" - [ "$status" -eq 0 ] -} - -@test "kpod tag with shortname" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} pull $IMAGE" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} tag $IMAGE foobar" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} inspect foobar:latest" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rmi --force foobar:latest" - [ "$status" -eq 0 ] -} - -@test "kpod tag with shortname:tag" { - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} pull $IMAGE" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} tag $IMAGE foobar:v" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} inspect foobar:v" - echo "$output" - [ "$status" -eq 0 ] - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rmi --force foobar:v" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_top.bats b/test/kpod_top.bats deleted file mode 100644 index 9d54908bc..000000000 --- a/test/kpod_top.bats +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -function setup() { - prepare_network_conf - copy_images -} - -@test "top without container name or id" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} top - echo "$output" - [ "$status" -eq 1 ] -} - -@test "top a bogus container" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} top foobar - echo "$output" - [ "$status" -eq 1 ] -} - -@test "top non-running container by id with defaults" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} create -d ${ALPINE} sleep 60 - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} top $ctr_id" - echo "$output" - [ "$status" -eq 1 ] -} - -@test "top running container by id with defaults" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} run -dt ${ALPINE} /bin/sh - [ "$status" -eq 0 ] - ctr_id="$output" - echo $ctr_id - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} top $ctr_id" - echo "$output" - [ "$status" -eq 0 ] -} - -@test "top running container by id with ps opts" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} sleep 60 - [ "$status" -eq 0 ] - ctr_id="$output" - run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} top $ctr_id -o fuser,f,comm,label" - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_version.bats b/test/kpod_version.bats deleted file mode 100644 index b0e7a3d13..000000000 --- a/test/kpod_version.bats +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function teardown() { - cleanup_test -} - -@test "kpod version test" { - run bash -c "${KPOD_BINARY} version" - echo "$output" - [ "$status" -eq 0 ] -} diff --git a/test/kpod_wait.bats b/test/kpod_wait.bats deleted file mode 100644 index 871c9f5bf..000000000 --- a/test/kpod_wait.bats +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bats - -load helpers - -function setup() { - prepare_network_conf - copy_images -} - -function teardown() { - cleanup_test -} - -@test "wait on a bogus container" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} wait 12343 - echo $output - echo $status - [ "$status" -eq 1 ] -} - -@test "wait on a stopped container" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} ls - echo $output - [ "$status" -eq 0 ] - ctr_id=${output} - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} wait $ctr_id - [ "$status" -eq 0 ] -} - -@test "wait on a sleeping container" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} sleep 10 - echo $output - [ "$status" -eq 0 ] - ctr_id=${output} - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} wait $ctr_id - [ "$status" -eq 0 ] -} diff --git a/test/podman_attach.bats b/test/podman_attach.bats new file mode 100644 index 000000000..1d3451eeb --- /dev/null +++ b/test/podman_attach.bats @@ -0,0 +1,33 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "attach to a bogus container" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} attach foobar" + echo "$output" + [ "$status" -eq 1 ] +} + +@test "attach to non-running container" { + ${PODMAN_BINARY} ${PODMAN_OPTIONS} create --name foobar -d -i ${ALPINE} ls + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} attach foobar" + echo "$output" + [ "$status" -eq 1 ] +} + +@test "attach to multiple containers" { + ${PODMAN_BINARY} ${PODMAN_OPTIONS} run --name foobar1 -d -i ${ALPINE} /bin/sh + ${PODMAN_BINARY} ${PODMAN_OPTIONS} run --name foobar2 -d -i ${ALPINE} /bin/sh + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} attach foobar1 foobar2" + echo "$output" + [ "$status" -eq 1 ] +} diff --git a/test/podman_create.bats b/test/podman_create.bats new file mode 100644 index 000000000..a9f70cdfa --- /dev/null +++ b/test/podman_create.bats @@ -0,0 +1,30 @@ +#!/usr/bin/env bats + +load helpers + +function setup() { + prepare_network_conf + copy_images +} + +function teardown() { + cleanup_test +} + +@test "create a container based on local image" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} create $BB ls + echo "$output" + [ "$status" -eq 0 ] +} + +@test "create a container based on a remote image" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} create ${BB_GLIBC} ls + echo "$output" + [ "$status" -eq 0 ] +} + +@test "ensure short options" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} create -dt ${BB_GLIBC} ls + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_diff.bats b/test/podman_diff.bats new file mode 100644 index 000000000..942af8805 --- /dev/null +++ b/test/podman_diff.bats @@ -0,0 +1,31 @@ +#!/usr/bin/env bats + +load helpers + +function setup() { + prepare_network_conf + copy_images +} + +function teardown() { + cleanup_test +} + +@test "test diff of image and parent" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS diff $BB + echo "$output" + [ "$status" -eq 0 ] +} + +@test "test diff on non-existent layer" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS diff "abc123" + echo "$output" + [ "$status" -ne 0 ] +} + +@test "test diff with json output" { + # run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} diff --format json $IMAGE | python -m json.tool" + run ${PODMAN_BINARY} $PODMAN_OPTIONS diff --format json $BB + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_exec.bats b/test/podman_exec.bats new file mode 100644 index 000000000..57f7217d8 --- /dev/null +++ b/test/podman_exec.bats @@ -0,0 +1,31 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "exec into a bogus container" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} exec foobar ls + echo "$output" + [ "$status" -eq 1 ] +} + +@test "exec without command should fail" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} exec foobar + echo "$output" + [ "$status" -eq 1 ] +} + +@test "exec simple command" { + ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d -t --name foobar1 ${ALPINE} sleep 60 + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} exec foobar1 ls + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_export.bats b/test/podman_export.bats new file mode 100644 index 000000000..2a620dc4a --- /dev/null +++ b/test/podman_export.bats @@ -0,0 +1,26 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "podman export output flag" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} create $BB ls" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} export -o container.tar $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rm $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + rm -f container.tar +} diff --git a/test/podman_history.bats b/test/podman_history.bats new file mode 100644 index 000000000..ea5aa8d31 --- /dev/null +++ b/test/podman_history.bats @@ -0,0 +1,54 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "podman history default" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} history $ALPINE + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman history with Go template format" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} history --format "{{.ID}} {{.Created}}" $ALPINE + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman history human flag" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} history --human=false $ALPINE + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman history quiet flag" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} history -q $ALPINE + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman history no-trunc flag" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} history --no-trunc $ALPINE + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman history json flag" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} history --format json $ALPINE | python -m json.tool" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman history short options" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} history -qH $ALPINE + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_images.bats b/test/podman_images.bats new file mode 100644 index 000000000..f62508e80 --- /dev/null +++ b/test/podman_images.bats @@ -0,0 +1,52 @@ +#!/usr/bin/env bats + +load helpers + +IMAGE="busybox" + +function setup() { + prepare_network_conf +} + +function teardown() { + cleanup_test +} + +@test "podman images" { + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull ${IMAGE} + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} images + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi ${IMAGE} + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman images test valid json" { + ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull ${IMAGE} + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} images --format json + echo "$output" | python -m json.tool + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi ${IMAGE} + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman images check name json output" { + ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull ${IMAGE} + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} images --format json + [ "$status" -eq 0 ] + name=$(echo $output | python -c 'import sys; import json; print(json.loads(sys.stdin.read())[0])["names"][0]') + [ "$name" == "docker.io/library/${IMAGE}:latest" ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi ${IMAGE} + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman images short options" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} images -qn + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_import.bats b/test/podman_import.bats new file mode 100644 index 000000000..b665b789e --- /dev/null +++ b/test/podman_import.bats @@ -0,0 +1,146 @@ +#!/usr/bin/env bats + +load helpers + +IMAGE="redis:alpine" + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "podman import with source and reference" { + skip "Test needs to be converted to podman run bash -c" + start_crio + run bash -c crioctl pod run bash -c --config "$TESTDATA"/sandbox_config.json + echo "$output" + [ "$status" -eq 0 ] + pod_id="$output" + run bash -c crioctl image pull "$IMAGE" + echo "$output" + [ "$status" -eq 0 ] + run bash -c crioctl ctr create --config "$TESTDATA"/container_config.json --pod "$pod_id" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} export -o container.tar "$ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} import container.tar imported-image + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} images + echo "$output" + [ "$status" -eq 0 ] + images="$output" + run bash -c grep "imported-image" <<< "$images" + echo "$output" + [ "$status" -eq 0 ] + cleanup_ctrs + cleanup_pods + stop_crio + rm -f container.tar +} + +@test "podman import without reference" { + skip "Test needs to be converted to podman run bash -c" + start_crio + run bash -c crioctl pod run bash -c --config "$TESTDATA"/sandbox_config.json + echo "$output" + [ "$status" -eq 0 ] + pod_id="$output" + run bash -c crioctl image pull "$IMAGE" + echo "$output" + [ "$status" -eq 0 ] + run bash -c crioctl ctr create --config "$TESTDATA"/container_config.json --pod "$pod_id" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} export -o container.tar "$ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} import container.tar + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} images + echo "$output" + [ "$status" -eq 0 ] + images="$output" + run bash -c grep "" <<< "$images" + echo "$output" + [ "$status" -eq 0 ] + cleanup_ctrs + cleanup_pods + stop_crio + rm -f container.tar +} + +@test "podman import with message flag" { + skip "Test needs to be converted to podman run bash -c" + start_crio + run bash -c crioctl pod run bash -c --config "$TESTDATA"/sandbox_config.json + echo "$output" + [ "$status" -eq 0 ] + pod_id="$output" + run bash -c crioctl image pull "$IMAGE" + echo "$output" + [ "$status" -eq 0 ] + run bash -c crioctl ctr create --config "$TESTDATA"/container_config.json --pod "$pod_id" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} export -o container.tar "$ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} import --message "importing container test message" container.tar imported-image + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} history imported-image + echo "$output" + [ "$status" -eq 0 ] + history="$output" + run bash -c grep "importing container test message" <<< "$history" + echo "$output" + [ "$status" -eq 0 ] + cleanup_ctrs + cleanup_pods + stop_crio + rm -f container.tar +} + +@test "podman import with change flag" { + skip "Test needs to be converted to podman run bash -c" + start_crio + run bash -c crioctl pod run bash -c --config "$TESTDATA"/sandbox_config.json + echo "$output" + [ "$status" -eq 0 ] + pod_id="$output" + run bash -c crioctl image pull "$IMAGE" + echo "$output" + [ "$status" -eq 0 ] + run bash -c crioctl ctr create --config "$TESTDATA"/container_config.json --pod "$pod_id" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} export -o container.tar "$ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} import --change "CMD=/bin/bash" container.tar imported-image + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} inspect imported-image + echo "$output" + [ "$status" -eq 0 ] + inspect="$output" + run bash -c grep "/bin/bash" <<< "$inspect" + echo "$output" + [ "$status" -eq 0 ] + cleanup_ctrs + cleanup_pods + stop_crio + rm -f container.tar +} diff --git a/test/podman_inspect.bats b/test/podman_inspect.bats new file mode 100644 index 000000000..197cc4556 --- /dev/null +++ b/test/podman_inspect.bats @@ -0,0 +1,53 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "podman inspect image" { + run bash -c "${PODMAN_BINARY} $PODMAN_OPTIONS inspect ${ALPINE} | python -m json.tool" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman inspect non-existent container" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS inspect 14rcole/non-existent + echo "$output" + [ "$status" -ne 0 ] +} + +@test "podman inspect with format" { + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS inspect --format {{.ID}} ${ALPINE} + echo "$output" + [ "$status" -eq 0 ] + inspectOutput="$output" + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS images --no-trunc --quiet ${ALPINE} + echo "$output" + [ "$status" -eq 0 ] + [ "$output" = "$inspectOutput" ] + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman inspect specified type" { + run bash -c "${PODMAN_BINARY} $PODMAN_OPTIONS inspect --type image ${ALPINE} | python -m json.tool" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman inspect container with size" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} create ${BB} ls" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} $PODMAN_OPTIONS inspect --size $ctr_id | python -m json.tool | grep SizeRootFs" + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_kill.bats b/test/podman_kill.bats new file mode 100644 index 000000000..88837aa8d --- /dev/null +++ b/test/podman_kill.bats @@ -0,0 +1,65 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "kill a bogus container" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} kill foobar" + echo "$output" + [ "$status" -ne 0 ] +} + +@test "kill a running container by id" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} sleep 9999" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} kill $ctr_id" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps" + [ "$status" -eq 0 ] +} + +@test "kill a running container by id with TERM" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} sleep 9999" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} kill -s TERM $ctr_id" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps --no-trunc" + [ "$status" -eq 0 ] +} + +@test "kill a running container by name" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --name test1 -d ${ALPINE} sleep 9999" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} kill -s TERM test1" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps --no-trunc" + [ "$status" -eq 0 ] +} + +@test "kill a running container by id with a bogus signal" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} sleep 9999" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} kill -s foobar $ctr_id" + [ "$status" -eq 1 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps --no-trunc" + [ "$status" -eq 0 ] +} diff --git a/test/podman_load.bats b/test/podman_load.bats new file mode 100644 index 000000000..1219144e4 --- /dev/null +++ b/test/podman_load.bats @@ -0,0 +1,82 @@ +#!/usr/bin/env bats + +load helpers + +function setup() { + prepare_network_conf + copy_images +} + +function teardown() { + cleanup_test +} +@test "podman load input flag" { + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} save -o alpine.tar $ALPINE + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi $ALPINE + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} load -i alpine.tar + echo "$output" + [ "$status" -eq 0 ] + rm -f alpine.tar +} + +@test "podman load oci-archive image" { + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} save -o alpine.tar --format oci-archive $ALPINE + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi $ALPINE + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} load -i alpine.tar + echo "$output" + [ "$status" -eq 0 ] + rm -f alpine.tar +} + +@test "podman load oci-archive image with signature-policy" { + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} save -o alpine.tar --format oci-archive $ALPINE + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi $ALPINE + [ "$status" -eq 0 ] + cp /etc/containers/policy.json /tmp + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} load --signature-policy /tmp/policy.json -i alpine.tar + echo "$output" + [ "$status" -eq 0 ] + rm -f /tmp/policy.json + rm -f alpine.tar +} + +@test "podman load using quiet flag" { + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} save -o alpine.tar $ALPINE + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi $ALPINE + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} load -q -i alpine.tar + echo "$output" + [ "$status" -eq 0 ] + rm -f alpine.tar +} + +@test "podman load directory" { + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} save --format oci-dir -o alp-dir $ALPINE + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi $ALPINE + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} load -i alp-dir + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi alp-dir + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman load non-existent file" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} load -i alpine.tar + echo "$output" + [ "$status" -ne 0 ] +} diff --git a/test/podman_logs.bats b/test/podman_logs.bats new file mode 100644 index 000000000..927f36bca --- /dev/null +++ b/test/podman_logs.bats @@ -0,0 +1,53 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "display logs for container" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB ls" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} logs $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rm $ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "tail three lines of logs for container" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB ls" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} logs --tail 3 $ctr_id" + echo "$output" + lines=$(echo "$output" | wc -l) + [ "$status" -eq 0 ] + [[ $(wc -l < "$output" ) -le 3 ]] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rm $ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "display logs for container since a given time" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB ls" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} logs --since 2017-08-07T10:10:09.056611202-04:00 $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rm $ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_mount.bats b/test/podman_mount.bats new file mode 100644 index 000000000..110cf0e93 --- /dev/null +++ b/test/podman_mount.bats @@ -0,0 +1,39 @@ +#!/usr/bin/env bats + +load helpers + +IMAGE="redis:alpine" + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "mount" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} create $BB ls" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} mount $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} mount --notruncate | grep $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} unmount $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} mount $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} mount --format=json | python -m json.tool | grep $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} unmount $ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_pause.bats b/test/podman_pause.bats new file mode 100644 index 000000000..1075fa05f --- /dev/null +++ b/test/podman_pause.bats @@ -0,0 +1,111 @@ +#!/usr/bin/env bats + +load helpers + +function setup() { + prepare_network_conf + copy_images +} + +function teardown() { + cleanup_test +} + +@test "pause a bogus container" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pause foobar" + echo "$output" + [ "$status" -eq 1 ] +} + +@test "unpause a bogus container" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} unpause foobar" + echo "$output" + [ "$status" -eq 1 ] +} + +@test "pause a created container by id" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pause $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} unpause $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rm -f $ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "pause a running container by id" { + skip "Test needs to wait for --force to work for podman rm" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pause $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} unpause $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rm -f $ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "unpause a running container" { + skip "Test needs to wait for --force to work for podman rm" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} unpause $ctr_id" + echo "$output" + [ "$status" -eq 1 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rm -f $ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "remove a paused container by id" { + skip "Test needs to wait for --force to work for podman rm" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pause $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rm $ctr_id" + echo "$output" + [ "$status" -eq 1 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rm --force $ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "stop a paused container created by id" { + skip "Test needs to wait for podman stop to be implemented" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d $BB sleep 60" + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pause $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} stop $ctr_id" + echo "$output" + [ "$status" -eq 1 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} unpause $ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a --filter id=$ctr_id" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rm $ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_ps.bats b/test/podman_ps.bats new file mode 100644 index 000000000..3b904535c --- /dev/null +++ b/test/podman_ps.bats @@ -0,0 +1,191 @@ +#!/usr/bin/env bats + +load helpers + +IMAGE="redis:alpine" +function setup() { + prepare_network_conf + copy_images +} + +function teardown() { + cleanup_test +} + +@test "podman ps with no containers" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps default" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps all flag" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps size flag" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a --size" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps quiet flag" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls" + ctr_id="$output" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a --quiet" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps latest flag" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps --latest" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps last flag" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${BB} ls" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls -s" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps --last 2" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps no-trunc flag" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a --no-trunc" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps namespace flag" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps --all --namespace" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps namespace flag and format flag = json" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a --ns --format json | python -m json.tool | grep namespace" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps without namespace flag and format flag = json" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a --format json | python -m json.tool | grep namespace" + echo "$output" + [ "$status" -eq 1 ] +} + +@test "podman ps format flag = go template" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a --format 'table {{.ID}} {{.Image}} {{.Labels}}'" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps filter flag - ancestor" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a --filter ancestor=${ALPINE}" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps filter flag - id" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a --filter id=$ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps filter flag - status" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} sleep 99" + ctr_id="$output" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a --filter status=running" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} stop $ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps short options" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} sleep 99" + ctr_id="$output" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -aq" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} stop $ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman ps with mutually exclusive flags" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} sleep 99" + ctr_id="$output" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -aqs" + echo "$output" + [ "$status" -ne 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a --ns -s" + echo "$output" + [ "$status" -ne 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a --ns format {{.ID}}" + echo "$output" + [ "$status" -ne 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps -a --ns --format json" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} stop $ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_pull.bats b/test/podman_pull.bats new file mode 100644 index 000000000..b0de1a8ab --- /dev/null +++ b/test/podman_pull.bats @@ -0,0 +1,136 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +@test "podman pull from docker with tag" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull debian:6.0.10 + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi debian:6.0.10 + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman pull from docker without tag" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS pull debian + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi debian + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman pull from a non-docker registry with tag" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS pull registry.fedoraproject.org/fedora:rawhide + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi registry.fedoraproject.org/fedora:rawhide + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman pull from a non-docker registry without tag" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS pull registry.fedoraproject.org/fedora + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi registry.fedoraproject.org/fedora + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman pull using digest" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS pull alpine@sha256:1072e499f3f655a032e88542330cf75b02e7bdf673278f701d7ba61629ee3ebe + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi alpine:latest + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman pull from a non existent image" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS pull umohnani/get-started + echo "$output" + [ "$status" -ne 0 ] +} + +@test "podman pull from docker with shortname" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull debian + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi docker.io/debian:latest + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman pull from docker with shortname and tag" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull debian:6.0.10 + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi docker.io/debian:6.0.10 + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman pull from docker-archive" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull alpine + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} save -o alp.tar alpine + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi alpine + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull docker-archive:alp.tar + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi alpine + echo "$output" + [ "$status" -eq 0 ] + rm -f alp.tar +} + +@test "podman pull from oci-archive" { + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull alpine + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} save --format oci-archive -o oci-alp.tar alpine + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi alpine + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull oci-archive:oci-alp.tar + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi alpine + echo "$output" + [ "$status" -eq 0 ] + rm -f oci-alp.tar +} + +@test "podman pull from local directory" { + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull alpine + echo "$output" + [ "$status" -eq 0 ] + run mkdir test_pull_dir + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} push alpine dir:test_pull_dir + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi alpine + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull dir:test_pull_dir + echo "$output" + [ "$status" -eq 0 ] + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi test_pull_dir + echo "$output" + [ "$status" -eq 0 ] + rm -rf test_pull_dir +} diff --git a/test/podman_push.bats b/test/podman_push.bats new file mode 100644 index 000000000..cc9220bfd --- /dev/null +++ b/test/podman_push.bats @@ -0,0 +1,103 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "podman push to containers/storage" { + skip "Issues with bash, skipping" + echo # Push the image right back into storage: it now has two names. + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS --log-level=debug push $ALPINE containers-storage:busybox:test + echo "$output" + [ "$status" -eq 0 ] + echo # Try to remove it using the first name. Should be refused. + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS --log-level=debug rmi $ALPINE + echo "$output" + [ "$status" -ne 0 ] + echo # Try to remove it using the second name. Should also be refused. + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS --log-level=debug rmi busybox:test + echo "$output" + [ "$status" -ne 0 ] + echo # Force removal despite having multiple names. Should succeed. + run ${PODMAN_BINARY} $PODMAN_OPTIONS --log-level=debug rmi -f busybox:test + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman push to directory" { + mkdir /tmp/busybox + run ${PODMAN_BINARY} $PODMAN_OPTIONS push $ALPINE dir:/tmp/busybox + echo "$output" + [ "$status" -eq 0 ] + rm -rf /tmp/busybox + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi $ALPINE + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman push to docker archive" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS push $ALPINE docker-archive:/tmp/busybox-archive:1.26 + echo "$output" + echo "--->" + [ "$status" -eq 0 ] + rm /tmp/busybox-archive + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi $ALPINE + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman push to oci-archive without compression" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS push $ALPINE oci-archive:/tmp/oci-busybox.tar:alpine + echo "$output" + [ "$status" -eq 0 ] + rm -f /tmp/oci-busybox.tar + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi $ALPINE + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman push without signatures" { + mkdir /tmp/busybox + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS push --remove-signatures $ALPINE dir:/tmp/busybox + echo "$output" + [ "$status" -eq 0 ] + rm -rf /tmp/busybox + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rmi $ALPINE + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman push without transport" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS pull "$ALPINE" + echo "$output" + [ "$status" -eq 0 ] + # TODO: The following should fail until a registry is running in Travis CI. + run ${PODMAN_BINARY} $PODMAN_OPTIONS push "$ALPINE" localhost:5000/my-alpine + echo "$output" + [ "$status" -ne 0 ] + run ${PODMAN_BINARY} $PODMAN_OPTIONS rmi "$ALPINE" + echo "$output" +} + +@test "push with manifest type conversion" { + run bash -c "${PODMAN_BINARY} $PODMAN_OPTIONS push --format oci "${BB}" dir:my-dir" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "grep "application/vnd.oci.image.config.v1+json" my-dir/manifest.json" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} $PODMAN_OPTIONS push --compress --format v2s2 "${BB}" dir:my-dir" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "grep "application/vnd.docker.distribution.manifest.v2+json" my-dir/manifest.json" + echo "$output" + [ "$status" -eq 0 ] + rm -rf my-dir +} diff --git a/test/podman_rm.bats b/test/podman_rm.bats new file mode 100644 index 000000000..8ef39435d --- /dev/null +++ b/test/podman_rm.bats @@ -0,0 +1,72 @@ +#!/usr/bin/env bats + +load helpers + +function setup() { + prepare_network_conf + copy_images +} + +function teardown() { + cleanup_test +} + +@test "remove a stopped container" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS run -d ${ALPINE} ls + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rm "$ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "refuse to remove a running container" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS run -d ${ALPINE} sleep 15 + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash ${PODMAN_BINARY} $PODMAN_OPTIONS rm "$ctr_id" + echo "$output" + [ "$status" -ne 0 ] +} + +@test "remove a created container" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} create $BB ls + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rm -f "$ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "remove a running container" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS run -d ${ALPINE} sleep 15 + echo "$output" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c ${PODMAN_BINARY} $PODMAN_OPTIONS rm -f "$ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "remove all containers" { + ${PODMAN_BINARY} ${PODMAN_OPTIONS} create $BB ls + ${PODMAN_BINARY} ${PODMAN_OPTIONS} create $BB ls -l + ${PODMAN_BINARY} ${PODMAN_OPTIONS} create $BB true + ${PODMAN_BINARY} ${PODMAN_OPTIONS} create $BB whoami + run ${PODMAN_BINARY} $PODMAN_OPTIONS rm -a + echo "$output" + [ "$status" -eq 0 ] +} + +@test "remove all containers with one running with short options" { + ${PODMAN_BINARY} ${PODMAN_OPTIONS} create $BB ls + ${PODMAN_BINARY} ${PODMAN_OPTIONS} create $BB ls -l + ${PODMAN_BINARY} ${PODMAN_OPTIONS} create $BB whoami + ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} sleep 30 + run ${PODMAN_BINARY} $PODMAN_OPTIONS rm -af + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_rmi.bats b/test/podman_rmi.bats new file mode 100644 index 000000000..dabf2f0e8 --- /dev/null +++ b/test/podman_rmi.bats @@ -0,0 +1,52 @@ +#!/usr/bin/env bats + +load helpers + +IMAGE1="docker.io/library/alpine:latest" +IMAGE2="docker.io/library/busybox:latest" +IMAGE3="docker.io/library/busybox:glibc" + +function teardown() { + cleanup_test +} + +function pullImages() { + ${PODMAN_BINARY} $PODMAN_OPTIONS pull $IMAGE1 + ${PODMAN_BINARY} $PODMAN_OPTIONS pull $IMAGE2 + ${PODMAN_BINARY} $PODMAN_OPTIONS pull $IMAGE3 +} + +@test "podman rmi bogus image" { + run ${PODMAN_BINARY} $PODMAN_OPTIONS rmi debian:6.0.10 + echo "$output" + [ "$status" -eq 1 ] +} + +@test "podman rmi image with fq name" { + pullImages + run ${PODMAN_BINARY} $PODMAN_OPTIONS rmi $IMAGE1 + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman rmi image with short name" { + pullImages + run ${PODMAN_BINARY} $PODMAN_OPTIONS rmi alpine + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman rmi all images" { + pullImages + run ${PODMAN_BINARY} $PODMAN_OPTIONS rmi -a + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman rmi all images forceably with short options" { + pullImages + ${PODMAN_BINARY} $PODMAN_OPTIONS create ${IMAGE1} ls + run ${PODMAN_BINARY} $PODMAN_OPTIONS rmi -af + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_run.bats b/test/podman_run.bats new file mode 100644 index 000000000..57ae0872e --- /dev/null +++ b/test/podman_run.bats @@ -0,0 +1,138 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "run a container based on local image" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run $BB ls" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "run a container based on local image with short options" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -dt $BB ls" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "run a container based on a remote image" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run ${BB_GLIBC} ls" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "run selinux test" { + if [ ! -e /usr/sbin/selinuxenabled ] || [ ! /usr/sbin/selinuxenabled ]; then + skip "SELinux not enabled" + fi + + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run ${ALPINE} cat /proc/self/attr/current" + echo "$output" + firstLabel=$output + + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run ${ALPINE} cat /proc/self/attr/current" + echo "$output" + [ "$output" != "${firstLabel}" ] +} + + +@test "run selinux grep test" { + skip "Until console issues worked out" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -t -i --security-opt label=level:s0:c1,c2 ${ALPINE} cat /proc/self/attr/current | grep s0:c1,c2" + echo "$output" + [ "$status" -eq 0 ] + +} + +@test "run capabilities test" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --cap-add all ${ALPINE} cat /proc/self/status" + echo "$output" + [ "$status" -eq 0 ] + + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --cap-add sys_admin ${ALPINE} cat /proc/self/status" + echo "$output" + [ "$status" -eq 0 ] + + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --cap-drop all ${ALPINE} cat /proc/self/status" + echo "$output" + [ "$status" -eq 0 ] + + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --cap-drop setuid ${ALPINE} cat /proc/self/status" + echo "$output" + [ "$status" -eq 0 ] + +} + +@test "run environment test" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --env FOO=BAR ${ALPINE} printenv FOO | tr -d '\r'" + echo "$output" + [ "$status" -eq 0 ] + [ $output = "BAR" ] + + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --env PATH="/bin" ${ALPINE} printenv PATH | tr -d '\r'" + echo "$output" + [ "$status" -eq 0 ] + [ $output = "/bin" ] + + run bash -c "export FOO=BAR; ${PODMAN_BINARY} ${PODMAN_OPTIONS} run --env FOO ${ALPINE} printenv FOO | tr -d '\r'" + echo "$output" + [ "$status" -eq 0 ] + [ "$output" = "BAR" ] + + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --env FOO ${ALPINE} printenv" + echo "$output" + [ "$status" -ne 0 ] + +# We don't currently set the hostname in containers, since we are not setting up +# networking. As soon as podman run gets network support we need to uncomment this +# test. +# run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run ${ALPINE} sh -c printenv | grep HOSTNAME" +# echo "$output" +# [ "$status" -eq 0 ] +} + +IMAGE="docker.io/library/fedora:latest" + +@test "run limits test" { + + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pull ${IMAGE}" + + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --ulimit rtprio=99 --cap-add=sys_nice ${IMAGE} cat /proc/self/sched" + echo $output + [ "$status" -eq 0 ] + + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --ulimit nofile=2048:2048 ${IMAGE} ulimit -n | tr -d '\r'" + echo $output + [ "$status" -eq 0 ] + [ "$output" = 2048 ] + + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --oom-kill-disable=true ${IMAGE} echo memory-hog" + echo $output + [ "$status" -eq 0 ] + + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --oom-score-adj=100 ${IMAGE} cat /proc/self/oom_score_adj | tr -d '\r'" + echo $output + [ "$status" -eq 0 ] + [ "$output" = 100 ] + +} + +@test "podman run with volume flag" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -v ${MOUNT_PATH}:/run/test ${BB} cat /proc/self/mountinfo | grep '${MOUNT_PATH} /run/test rw,relatime'" + echo $output + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -v ${MOUNT_PATH}:/run/test:ro ${BB} cat /proc/self/mountinfo | grep '${MOUNT_PATH} /run/test ro,relatime'" + echo $output + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -v ${MOUNT_PATH}:/run/test:shared ${BB} cat /proc/self/mountinfo | grep '${MOUNT_PATH} /run/test rw,relatime shared:'" + echo $output + [ "$status" -eq 0 ] +} diff --git a/test/podman_run_ns.bats b/test/podman_run_ns.bats new file mode 100644 index 000000000..8d1bd4b54 --- /dev/null +++ b/test/podman_run_ns.bats @@ -0,0 +1,51 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "run pidns test" { + + ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull ${ALPINE} + + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run ${ALPINE} sh -c 'echo \$\$'" + echo $output + [ "$status" -eq 0 ] + pid=$(echo $output | tr -d '\r') + [ $pid = "1" ] + + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --pid=host ${ALPINE} sh -c 'echo \$\$'" + echo $output + pid=$(echo $output | tr -d '\r') + [ "$status" -eq 0 ] + [ $pid != "1" ] + + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run --pid=badpid ${ALPINE} sh -c 'echo $$' + echo $output + [ "$status" -ne 0 ] +} + +@test "run ipcns test" { + + ${PODMAN_BINARY} ${PODMAN_OPTIONS} pull ${ALPINE} + + tmp=$(mktemp /dev/shm/foo.XXXXX) + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run --ipc=host ${ALPINE} ls $tmp + echo $output + out=$(echo $output | tr -d '\r') + [ "$status" -eq 0 ] + [ $out != $tmp ] + + rm -f $tmp + + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run --ipc=badpid ${ALPINE} sh -c 'echo $$' + echo $output + [ "$status" -ne 0 ] +} diff --git a/test/podman_save.bats b/test/podman_save.bats new file mode 100644 index 000000000..2e03a95cc --- /dev/null +++ b/test/podman_save.bats @@ -0,0 +1,59 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "podman save output flag" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} save -o alpine.tar $ALPINE" + echo "$output" + [ "$status" -eq 0 ] + rm -f alpine.tar +} + +@test "podman save oci flag" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} save -o alpine.tar --format oci-archive $ALPINE" + echo "$output" + [ "$status" -eq 0 ] + rm -f alpine.tar +} + +@test "podman save using stdout" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} save $ALPINE > alpine.tar" + [ "$status" -eq 0 ] + rm -f alpine.tar +} + +@test "podman save quiet flag" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} save -q -o alpine.tar $ALPINE" + echo "$output" + [ "$status" -eq 0 ] + rm -f alpine.tar +} + +@test "podman save non-existent image" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} save -o alpine.tar FOOBAR" + echo "$output" + [ "$status" -ne 0 ] +} + +@test "podman save to directory wit oci format" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} save --format oci-dir -o alp-dir $ALPINE" + echo "$output" + [ "$status" -eq 0 ] + rm -rf alp-dir +} + +@test "podman save to directory wit v2s2 (docker) format" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} save --format docker-dir -o alp-dir $ALPINE" + echo "$output" + [ "$status" -eq 0 ] + rm -rf alp-dir +} diff --git a/test/podman_start.bats b/test/podman_start.bats new file mode 100644 index 000000000..025316462 --- /dev/null +++ b/test/podman_start.bats @@ -0,0 +1,51 @@ +#!/usr/bin/env bats + +load helpers + +function setup() { + prepare_network_conf + copy_images +} + +function teardown() { + cleanup_test +} + +@test "start bogus container" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} start 1234 + echo "$output" + [ "$status" -eq 1 ] +} + +@test "start single container by id" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} create -d ${ALPINE} ls + ctr_id=${output} + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} start $ctr_id + echo "$output" + [ "$status" -eq 0 ] +} + +@test "start single container by name" { + ${PODMAN_BINARY} ${PODMAN_OPTIONS} create -d --name foobar99 ${ALPINE} ls + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} start foobar + echo "$output" + [ "$status" -eq 0 ] +} + +@test "start multiple containers" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} create -d ${ALPINE} ls + ctr1_id=${output} + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} create -d ${ALPINE} ls + ctr1_id2=${output} + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} start $ctr1_id $ctr2_id + echo "$output" + [ "$status" -eq 0 ] +} + +@test "start multiple containers -- attach should fail" { + ${PODMAN_BINARY} ${PODMAN_OPTIONS} create --name foobar1 -d ${ALPINE} ls + ${PODMAN_BINARY} ${PODMAN_OPTIONS} create --name foobar2 -d ${ALPINE} ls + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} start -a foobar1 foobar2 + echo "$output" + [ "$status" -eq 1 ] +} diff --git a/test/podman_stats.bats b/test/podman_stats.bats new file mode 100644 index 000000000..f9981227a --- /dev/null +++ b/test/podman_stats.bats @@ -0,0 +1,61 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "stats should run with no containers" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} stats --no-stream + echo "$output" + [ "$status" -eq 0 ] +} + +@test "stats with bogus container id" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} stats --no-stream 123 + echo "$output" + [ "$status" -eq 1 ] +} + +@test "stats on a running container" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d -t ${ALPINE} sleep 99 + ctr_id="$output" + echo "$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} stats --no-stream $ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "stats on a running container no id" { + ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d -t ${ALPINE} sleep 99 + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} stats --no-stream + echo "$output" + [ "$status" -eq 0 ] +} + +@test "stats on all containers" { + ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d -t ${ALPINE} ls + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} stats --no-stream -a + echo "$output" + [ "$status" -eq 0 ] +} + +@test "stats only output IDs" { + ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d -t ${ALPINE} sleep 99 + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} stats --no-stream --format "{{.Container}}" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "stats json output" { + ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d -t ${ALPINE} ls + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} stats --no-stream -a --format json | python -m json.tool" + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_stop.bats b/test/podman_stop.bats new file mode 100644 index 000000000..06b001fed --- /dev/null +++ b/test/podman_stop.bats @@ -0,0 +1,50 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "stop a bogus container" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} stop foobar" + echo "$output" + [ "$status" -eq 1 ] +} + +@test "stop a running container by id" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} sleep 9999" + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} stop $ctr_id" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps" + [ "$status" -eq 0 ] +} + +@test "stop a running container by name" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --name test1 -d ${ALPINE} sleep 9999" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} stop test1" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} ps" + [ "$status" -eq 0 ] +} + +@test "stop all containers" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --name test1 -d ${ALPINE} sleep 9999" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --name test2 -d ${ALPINE} sleep 9999" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} run --name test3 -d ${ALPINE} sleep 9999" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} stop -a -t 1" + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_tag.bats b/test/podman_tag.bats new file mode 100644 index 000000000..79a7f5638 --- /dev/null +++ b/test/podman_tag.bats @@ -0,0 +1,50 @@ +#!/usr/bin/env bats + +load helpers + +IMAGE="alpine:latest" + +function teardown() { + cleanup_test +} + +@test "podman tag with shortname:latest" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pull $IMAGE" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} tag $IMAGE foobar:latest" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} inspect foobar:latest" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi --force foobar:latest" + [ "$status" -eq 0 ] +} + +@test "podman tag with shortname" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pull $IMAGE" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} tag $IMAGE foobar" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} inspect foobar:latest" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi --force foobar:latest" + [ "$status" -eq 0 ] +} + +@test "podman tag with shortname:tag" { + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} pull $IMAGE" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} tag $IMAGE foobar:v" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} inspect foobar:v" + echo "$output" + [ "$status" -eq 0 ] + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} rmi --force foobar:v" + [ "$status" -eq 0 ] +} diff --git a/test/podman_top.bats b/test/podman_top.bats new file mode 100644 index 000000000..1d3df149d --- /dev/null +++ b/test/podman_top.bats @@ -0,0 +1,52 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +function setup() { + prepare_network_conf + copy_images +} + +@test "top without container name or id" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} top + echo "$output" + [ "$status" -eq 1 ] +} + +@test "top a bogus container" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} top foobar + echo "$output" + [ "$status" -eq 1 ] +} + +@test "top non-running container by id with defaults" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} create -d ${ALPINE} sleep 60 + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} top $ctr_id" + echo "$output" + [ "$status" -eq 1 ] +} + +@test "top running container by id with defaults" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -dt ${ALPINE} /bin/sh + [ "$status" -eq 0 ] + ctr_id="$output" + echo $ctr_id + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} top $ctr_id" + echo "$output" + [ "$status" -eq 0 ] +} + +@test "top running container by id with ps opts" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} sleep 60 + [ "$status" -eq 0 ] + ctr_id="$output" + run bash -c "${PODMAN_BINARY} ${PODMAN_OPTIONS} top $ctr_id -o fuser,f,comm,label" + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_version.bats b/test/podman_version.bats new file mode 100644 index 000000000..0f959277b --- /dev/null +++ b/test/podman_version.bats @@ -0,0 +1,13 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +@test "podman version test" { + run bash -c "${PODMAN_BINARY} version" + echo "$output" + [ "$status" -eq 0 ] +} diff --git a/test/podman_wait.bats b/test/podman_wait.bats new file mode 100644 index 000000000..823a8591f --- /dev/null +++ b/test/podman_wait.bats @@ -0,0 +1,37 @@ +#!/usr/bin/env bats + +load helpers + +function setup() { + prepare_network_conf + copy_images +} + +function teardown() { + cleanup_test +} + +@test "wait on a bogus container" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} wait 12343 + echo $output + echo $status + [ "$status" -eq 1 ] +} + +@test "wait on a stopped container" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} ls + echo $output + [ "$status" -eq 0 ] + ctr_id=${output} + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} wait $ctr_id + [ "$status" -eq 0 ] +} + +@test "wait on a sleeping container" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} run -d ${ALPINE} sleep 10 + echo $output + [ "$status" -eq 0 ] + ctr_id=${output} + run bash -c ${PODMAN_BINARY} ${PODMAN_OPTIONS} wait $ctr_id + [ "$status" -eq 0 ] +} diff --git a/transfer.md b/transfer.md index 5c1fbc17c..b72f0a584 100644 --- a/transfer.md +++ b/transfer.md @@ -1,15 +1,15 @@ -# KPOD Usage Transfer +# PODMAN Usage Transfer -This document outlines useful information for ops and dev transfer as it relates to infrastructure that utilizes KPOD. +This document outlines useful information for ops and dev transfer as it relates to infrastructure that utilizes PODMAN. ## Operational Transfer ## Abstract -The `crio` daemon is intended to provide the [CRI](https://github.com/kubernetes/community/blob/master/contributors/devel/container-runtime-interface.md) socket needed for Kubernetes to use for automating deployment, scaling, and management of containerized applications (See the document for [configuring kubernetes to use KPOD](./kubernetes.md) for more information on that). +The `crio` daemon is intended to provide the [CRI](https://github.com/kubernetes/community/blob/master/contributors/devel/container-runtime-interface.md) socket needed for Kubernetes to use for automating deployment, scaling, and management of containerized applications (See the document for [configuring kubernetes to use PODMAN](./kubernetes.md) for more information on that). Therefore the `crioctl` command line is a client that interfaces to the same grpc socket as the kubernetes daemon would, for talking to the `crio` daemon. In many ways `crioctl` is only as feature rich as the Kubernetes CRI requires. -There are additional tools e.g. `kpod` and [`buildah`](https://github.com/projectatomic/buildah) that provide a feature rich set of commands for all operational needs in a Kubernetes environment. +There are additional tools e.g. `podman` and [`buildah`](https://github.com/projectatomic/buildah) that provide a feature rich set of commands for all operational needs in a Kubernetes environment. ## System Tools @@ -20,56 +20,56 @@ As well as some systemd helpers like `systemd-cgls` and `systemd-cgtop` are stil ## Equivalents For many troubleshooting and information collection steps, there may be an existing pattern. -Following provides equivalent with KPOD tools for gathering information or jumping into containers, for operational use. +Following provides equivalent with PODMAN tools for gathering information or jumping into containers, for operational use. -| Existing Step | KPOD (and friends) | +| Existing Step | PODMAN (and friends) | | :---: | :---: | -| `docker exec` | [`kpod exec`](./docs/kpod-exec.1.md) | -| `docker info` | [`kpod info`](./docs/kpod-info.1.md) | -| `docker inspect` | [`kpod inspect`](./docs/kpod-inspect.1.md) | -| `docker logs` | [`kpod logs`](./docs/kpod-logs.1.md) | -| `docker ps` | [`kpod ps`](./docs/kpod-ps.1.md) | -| `docker stats` | [`kpod stats`](./docs/kpod-stats.1.md)| +| `docker exec` | [`podman exec`](./docs/podman-exec.1.md) | +| `docker info` | [`podman info`](./docs/podman-info.1.md) | +| `docker inspect` | [`podman inspect`](./docs/podman-inspect.1.md) | +| `docker logs` | [`podman logs`](./docs/podman-logs.1.md) | +| `docker ps` | [`podman ps`](./docs/podman-ps.1.md) | +| `docker stats` | [`podman stats`](./docs/podman-stats.1.md)| ## Development Transfer There are other equivalents for these tools -| Existing Step | KPOD (and friends) | +| Existing Step | PODMAN (and friends) | | :---: | :---: | -| `docker attach` | [`kpod exec`](./docs/kpod-attach.1.md) ***| +| `docker attach` | [`podman exec`](./docs/podman-attach.1.md) ***| | `docker build` | [`buildah bud`](https://github.com/projectatomic/buildah/blob/master/docs/buildah-bud.md) | | `docker commit` | [`buildah commit`](https://github.com/projectatomic/buildah/blob/master/docs/buildah-commit.md) | -| `docker cp` | [`kpod mount`](./docs/kpod-cp.1.md) **** | -| `docker create` | [`kpod create`](./docs/kpod-create.1.md) | -| `docker diff` | [`kpod diff`](./docs/kpod-diff.1.md) | -| `docker export` | [`kpod export`](./docs/kpod-export.1.md) | -| `docker history`| [`kpod history`](./docs/kpod-history.1.md)| -| `docker images` | [`kpod images`](./docs/kpod-images.1.md) | -| `docker kill` | [`kpod kill`](./docs/kpod-kill.1.md) | -| `docker load` | [`kpod load`](./docs/kpod-load.1.md) | -| `docker login` | [`kpod login`](./docs/kpod-login.1.md) | -| `docker logout` | [`kpod logout`](./docs/kpod-logout.1.md) | -| `docker pause` | [`kpod pause`](./docs/kpod-pause.1.md) | -| `docker ps` | [`kpod ps`](./docs/kpod-ps.1.md) | -| `docker pull` | [`kpod pull`](./docs/kpod-pull.1.md) | -| `docker push` | [`kpod push`](./docs/kpod-push.1.md) | -| `docker rm` | [`kpod rm`](./docs/kpod-rm.1.md) | -| `docker rmi` | [`kpod rmi`](./docs/kpod-rmi.1.md) | -| `docker run` | [`kpod run`](./docs/kpod-run.1.md) | -| `docker save` | [`kpod save`](./docs/kpod-save.1.md) | -| `docker stop` | [`kpod stop`](./docs/kpod-stop.1.md) | -| `docker tag` | [`kpod tag`](./docs/kpod-tag.1.md) | -| `docker unpause`| [`kpod unpause`](./docs/kpod-unpause.1.md)| -| `docker version`| [`kpod version`](./docs/kpod-version.1.md)| -| `docker wait` | [`kpod wait`](./docs/kpod-wait.1.md) | - -*** Use `kpod exec` to enter a container and `kpod logs` to view the output of pid 1 of a container. -**** Use mount to take advantage of the entire linux tool chain rather then just cp. Read [`here`](./docs/kpod-cp.1.md) for more information. - -## Missing commands in kpod - -Those Docker commands currently do not have equivalents in `kpod`: +| `docker cp` | [`podman mount`](./docs/podman-cp.1.md) **** | +| `docker create` | [`podman create`](./docs/podman-create.1.md) | +| `docker diff` | [`podman diff`](./docs/podman-diff.1.md) | +| `docker export` | [`podman export`](./docs/podman-export.1.md) | +| `docker history`| [`podman history`](./docs/podman-history.1.md)| +| `docker images` | [`podman images`](./docs/podman-images.1.md) | +| `docker kill` | [`podman kill`](./docs/podman-kill.1.md) | +| `docker load` | [`podman load`](./docs/podman-load.1.md) | +| `docker login` | [`podman login`](./docs/podman-login.1.md) | +| `docker logout` | [`podman logout`](./docs/podman-logout.1.md) | +| `docker pause` | [`podman pause`](./docs/podman-pause.1.md) | +| `docker ps` | [`podman ps`](./docs/podman-ps.1.md) | +| `docker pull` | [`podman pull`](./docs/podman-pull.1.md) | +| `docker push` | [`podman push`](./docs/podman-push.1.md) | +| `docker rm` | [`podman rm`](./docs/podman-rm.1.md) | +| `docker rmi` | [`podman rmi`](./docs/podman-rmi.1.md) | +| `docker run` | [`podman run`](./docs/podman-run.1.md) | +| `docker save` | [`podman save`](./docs/podman-save.1.md) | +| `docker stop` | [`podman stop`](./docs/podman-stop.1.md) | +| `docker tag` | [`podman tag`](./docs/podman-tag.1.md) | +| `docker unpause`| [`podman unpause`](./docs/podman-unpause.1.md)| +| `docker version`| [`podman version`](./docs/podman-version.1.md)| +| `docker wait` | [`podman wait`](./docs/podman-wait.1.md) | + +*** Use `podman exec` to enter a container and `podman logs` to view the output of pid 1 of a container. +**** Use mount to take advantage of the entire linux tool chain rather then just cp. Read [`here`](./docs/podman-cp.1.md) for more information. + +## Missing commands in podman + +Those Docker commands currently do not have equivalents in `podman`: * `docker container` * `docker events` @@ -91,7 +91,7 @@ Those Docker commands currently do not have equivalents in `kpod`: ## Missing commands in Docker -The following kpod commands do not have a Docker equivalent: +The following podman commands do not have a Docker equivalent: -* [`kpod mount`](./docs/kpod-mount.1.md) -* [`kpod umount`](./docs/kpod-umount.1.md) +* [`podman mount`](./docs/podman-mount.1.md) +* [`podman umount`](./docs/podman-umount.1.md) -- cgit v1.2.3-54-g00ecf