let user to specify the shim name or path
Signed-off-by: mYmNeo <thomassong@tencent.com>
This commit is contained in:
parent
5e5daf2b33
commit
4eb27a5926
6 changed files with 21 additions and 9 deletions
|
@ -27,6 +27,7 @@ func (s *Supervisor) start(t *StartTask) error {
|
|||
Bundle: t.BundlePath,
|
||||
Runtime: s.runtime,
|
||||
RuntimeArgs: s.runtimeArgs,
|
||||
Shim: s.shim,
|
||||
Labels: t.Labels,
|
||||
NoPivotRoot: t.NoPivotRoot,
|
||||
Timeout: s.timeout,
|
||||
|
|
|
@ -18,7 +18,7 @@ const (
|
|||
)
|
||||
|
||||
// New returns an initialized Process supervisor.
|
||||
func New(stateDir string, runtimeName string, runtimeArgs []string, timeout time.Duration) (*Supervisor, error) {
|
||||
func New(stateDir string, runtimeName, shimName string, runtimeArgs []string, timeout time.Duration) (*Supervisor, error) {
|
||||
startTasks := make(chan *startTask, 10)
|
||||
if err := os.MkdirAll(stateDir, 0755); err != nil {
|
||||
return nil, err
|
||||
|
@ -41,6 +41,7 @@ func New(stateDir string, runtimeName string, runtimeArgs []string, timeout time
|
|||
monitor: monitor,
|
||||
runtime: runtimeName,
|
||||
runtimeArgs: runtimeArgs,
|
||||
shim: shimName,
|
||||
timeout: timeout,
|
||||
}
|
||||
if err := setupEventLog(s); err != nil {
|
||||
|
@ -109,6 +110,7 @@ type Supervisor struct {
|
|||
// name of the OCI compatible runtime used to execute containers
|
||||
runtime string
|
||||
runtimeArgs []string
|
||||
shim string
|
||||
containers map[string]*containerInfo
|
||||
startTasks chan *startTask
|
||||
// we need a lock around the subscribers map only because additions and deletions from
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue