The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/crio-lxc/pull/10
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === With this, I'm able to start pods and containers using crictl, by hand. The basic.bats test does not yet work.
From d9c453e6febe6a92326599ece3a72b525ae6ca56 Mon Sep 17 00:00:00 2001 From: Serge Hallyn <se...@hallyn.com> Date: Mon, 22 Apr 2019 16:36:52 -0500 Subject: [PATCH 1/3] state: don't forget to actually query the initpid Signed-off-by: Serge Hallyn <se...@hallyn.com> --- cmd/state.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/state.go b/cmd/state.go index 5e8af42..6bea455 100644 --- a/cmd/state.go +++ b/cmd/state.go @@ -55,10 +55,11 @@ func doState(ctx *cli.Context) error { // https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc4/runtime.md#state // it means "the container process has neither exited nor executed the user-specified program" status := "stopped" + pid := 0 if c.Running() && checkHackyPreStart(c) == "started" { status = "running" + pid = c.InitPid() } - pid := 0 // bundlePath is the enclosing directory of the rootfs: // https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc4/bundle.md bundlePath := filepath.Dir(c.ConfigItem("lxc.rootfs.path")[0]) From b634fd847526ce97cb825560bf1d5b386a8db124 Mon Sep 17 00:00:00 2001 From: Serge Hallyn <se...@hallyn.com> Date: Mon, 22 Apr 2019 16:55:54 -0500 Subject: [PATCH 2/3] go fmt --- cmd/delete.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/delete.go b/cmd/delete.go index c743cfd..02b6a69 100644 --- a/cmd/delete.go +++ b/cmd/delete.go @@ -22,7 +22,7 @@ var deleteCmd = cli.Command{ `, Flags: []cli.Flag{ cli.BoolFlag{ - Name: "force", + Name: "force", Usage: "force deletion", }, }, From 75c9c58944cfdefe989eacddc683b0ecc1bea4de Mon Sep 17 00:00:00 2001 From: Serge Hallyn <se...@hallyn.com> Date: Mon, 22 Apr 2019 17:12:44 -0500 Subject: [PATCH 3/3] basic.bats: pass pod id argument to crictl create As that is what it seems to require, not a container name. Signed-off-by: Serge Hallyn <se...@hallyn.com> --- test/basic.bats | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/basic.bats b/test/basic.bats index e254151..3f72848 100644 --- a/test/basic.bats +++ b/test/basic.bats @@ -12,6 +12,7 @@ function teardown() { crictl runp test/basic-pod-config.json crictl pull busybox crictl images - crictl create clowncore test/basic-container-config.json test/basic-pod-config.json - [ "$(crictl ps)" | grep clowncore ] + podid=$(crictl pods | grep nginx-sandbox | awk '{ print $1 }') + crictl create $podid test/basic-container-config.json test/basic-pod-config.json + [ "$(crictl ps -a)" | grep busybox ] }
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel