Skip to content

Commit b014286

Browse files
committed
StartShim's signature has been changed in 1.5.x
Now it takes shim.StartOpts instead of 4 strings. Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent bd10fc3 commit b014286

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

runtime/service.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ func (s *service) serveFCControl() error {
310310
return nil
311311
}
312312

313-
func (s *service) StartShim(shimCtx context.Context, containerID, containerdBinary, containerdAddress, containerdTTRPCAddress string) (string, error) {
313+
func (s *service) StartShim(shimCtx context.Context, opts shim.StartOpts) (string, error) {
314314
// In the shim start routine, we can assume that containerd provided a "log" FIFO in the current working dir.
315315
// We have to use that instead of stdout/stderr because containerd reads the stdio pipes of shim start to get
316316
// either the shim address or the error returned here.
@@ -321,7 +321,7 @@ func (s *service) StartShim(shimCtx context.Context, containerID, containerdBina
321321

322322
logrus.SetOutput(logFifo)
323323

324-
log := log.G(shimCtx).WithField("task_id", containerID)
324+
log := log.G(shimCtx).WithField("task_id", opts.ID)
325325
log.Debug("StartShim")
326326

327327
// If we are running a shim start routine, we can safely assume our current working
@@ -362,7 +362,7 @@ func (s *service) StartShim(shimCtx context.Context, containerID, containerdBina
362362
exitAfterAllTasksDeleted = true
363363
}
364364

365-
client, err := ttrpcutil.NewClient(containerdTTRPCAddress)
365+
client, err := ttrpcutil.NewClient(opts.TTRPCAddress)
366366
if err != nil {
367367
return "", err
368368
}
@@ -396,7 +396,7 @@ func (s *service) StartShim(shimCtx context.Context, containerID, containerdBina
396396
}
397397
log.WithField("vmID", s.vmID).Infof("successfully started shim (git commit: %s).%s", revision, str)
398398

399-
return shim.SocketAddress(shimCtx, containerdAddress, s.vmID)
399+
return shim.SocketAddress(shimCtx, opts.Address, s.vmID)
400400
}
401401

402402
func logPanicAndDie(logger *logrus.Entry) {

0 commit comments

Comments
 (0)