Skip to content

Commit 655ba65

Browse files
Merge pull request #2686 from jterry75/runhcs_improvements
Various containerd-shim-runhcs bug fixes/improvements
2 parents df60d32 + 81eb40f commit 655ba65

9 files changed

Lines changed: 352 additions & 56 deletions

File tree

runtime/v2/binary.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import (
3131
"github.com/containerd/containerd/runtime/v2/task"
3232
"github.com/containerd/ttrpc"
3333
"github.com/pkg/errors"
34+
"github.com/sirupsen/logrus"
3435
)
3536

3637
func shimBinary(ctx context.Context, bundle *Bundle, runtime, containerdAddress string, events *exchange.Exchange, rt *runtime.TaskList) *binary {
@@ -52,13 +53,18 @@ type binary struct {
5253
}
5354

5455
func (b *binary) Start(ctx context.Context) (_ *shim, err error) {
56+
args := []string{"-id", b.bundle.ID}
57+
if logrus.GetLevel() == logrus.DebugLevel {
58+
args = append(args, "-debug")
59+
}
60+
args = append(args, "start")
61+
5562
cmd, err := client.Command(
5663
ctx,
5764
b.runtime,
5865
b.containerdAddress,
5966
b.bundle.Path,
60-
"-id", b.bundle.ID,
61-
"start",
67+
args...,
6268
)
6369
if err != nil {
6470
return nil, err

0 commit comments

Comments
 (0)