diff --git a/cmd/containerd-stress/exec_worker.go b/cmd/containerd-stress/exec_worker.go index 32c9a737e..cda1d04cd 100644 --- a/cmd/containerd-stress/exec_worker.go +++ b/cmd/containerd-stress/exec_worker.go @@ -18,6 +18,7 @@ package main import ( "context" + "fmt" "strings" "syscall" "time" @@ -38,8 +39,9 @@ func (w *execWorker) exec(ctx, tctx context.Context) { w.wg.Done() logrus.Infof("worker %d finished", w.id) }() - c, err := w.client.NewContainer(ctx, "exec-container", - containerd.WithNewSnapshot("exec-container", w.image), + id := fmt.Sprintf("exec-container-%d", w.id) + c, err := w.client.NewContainer(ctx, id, + containerd.WithNewSnapshot(id, w.image), containerd.WithNewSpec(oci.WithImageConfig(w.image), oci.WithUsername("games"), oci.WithProcessArgs("sleep", "30d")), ) if err != nil { diff --git a/cmd/containerd-stress/main.go b/cmd/containerd-stress/main.go index f70d6fe11..9ef058b90 100644 --- a/cmd/containerd-stress/main.go +++ b/cmd/containerd-stress/main.go @@ -257,17 +257,19 @@ func test(c config) error { } var exec *execWorker if c.Exec { - wg.Add(1) - exec = &execWorker{ - worker: worker{ - id: c.Concurrency, - wg: &wg, - image: image, - client: client, - commit: v.Revision, - }, + for i := c.Concurrency; i < c.Concurrency+c.Concurrency; i++ { + wg.Add(1) + exec = &execWorker{ + worker: worker{ + id: i, + wg: &wg, + image: image, + client: client, + commit: v.Revision, + }, + } + go exec.exec(ctx, tctx) } - go exec.exec(ctx, tctx) } // start the timer and run the worker diff --git a/cmd/containerd-stress/size.go b/cmd/containerd-stress/size.go index ecb57e596..46fba62c5 100644 --- a/cmd/containerd-stress/size.go +++ b/cmd/containerd-stress/size.go @@ -27,6 +27,8 @@ var binaries = []string{ "ctr", "containerd", "containerd-shim", + "containerd-shim-runc-v1", + "containerd-shim-runc-v2", } // checkBinarySizes checks and reports the binary sizes for the containerd compiled binaries to prometheus