From 34c0fe73ed10913d4295c9e75b8cf357cbe0e154 Mon Sep 17 00:00:00 2001 From: Shambhavi Srivastava Date: Tue, 10 Oct 2023 14:25:45 -0700 Subject: [PATCH] Updating golang's containerd/runc version 1.1.0 This is required to include the NetworkInterface struct added in go-runc Stats in commit c321e8cd. https://github.com/containerd/go-runc/blob/main/events.go PiperOrigin-RevId: 572366821 --- pkg/shim/runsc/runsc.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkg/shim/runsc/runsc.go b/pkg/shim/runsc/runsc.go index 4536455e7..ccc03110b 100644 --- a/pkg/shim/runsc/runsc.go +++ b/pkg/shim/runsc/runsc.go @@ -38,14 +38,23 @@ import ( // DefaultCommand is the default command for Runsc. const DefaultCommand = "runsc" +// ProcessMonitor is a subset of runc.ProcessMonitor. It does not include +// StartLocked(), which was added in containerd/runc v1.1.1. This is so that +// we can continue using containerd/containerd v1.4.13 with newer +// containerd/runc versions without breaking build. +type ProcessMonitor interface { + Start(cmd *exec.Cmd) (chan runc.Exit, error) + Wait(cmd *exec.Cmd, ch chan runc.Exit) (int, error) +} + // Monitor is the default process monitor to be used by runsc. -var Monitor runc.ProcessMonitor = &LogMonitor{Next: runc.Monitor} +var Monitor ProcessMonitor = &LogMonitor{Next: runc.Monitor} // LogMonitor implements the runc.ProcessMonitor interface, logging the command // that is getting executed, and then forwarding the call to another // implementation. type LogMonitor struct { - Next runc.ProcessMonitor + Next ProcessMonitor } // Start implements runc.ProcessMonitor.