@@ -15,7 +15,6 @@ package main
15
15
16
16
import (
17
17
"context"
18
- "errors"
19
18
"flag"
20
19
"os"
21
20
"os/signal"
@@ -48,12 +47,10 @@ const (
48
47
49
48
func main () {
50
49
var (
51
- id string
52
50
port int
53
51
debug bool
54
52
)
55
53
56
- flag .StringVar (& id , "id" , "" , "ContainerID (required)" )
57
54
flag .IntVar (& port , "port" , defaultPort , "Vsock port to listen to" )
58
55
flag .BoolVar (& debug , "debug" , false , "Turn on debug mode" )
59
56
flag .Parse ()
@@ -68,11 +65,6 @@ func main() {
68
65
shimCtx , shimCancel := context .WithCancel (namespaces .WithNamespace (context .Background (), defaultNamespace ))
69
66
group , shimCtx := errgroup .WithContext (shimCtx )
70
67
71
- // verify arguments, id is required
72
- if id == "" {
73
- log .G (shimCtx ).WithError (errors .New ("invalid argument" )).Fatal ("id not set" )
74
- }
75
-
76
68
// Ensure this process is a subreaper or else containers created via runc will
77
69
// not be its children.
78
70
if err := sys .SetSubreaper (enableSubreaper ); err != nil {
@@ -83,7 +75,7 @@ func main() {
83
75
// This can be wrapped to add missing functionality (like
84
76
// running multiple containers inside one Firecracker VM)
85
77
86
- log .G (shimCtx ).WithField ( "id" , id ). Info ("creating runc shim " )
78
+ log .G (shimCtx ).Info ("creating task service " )
87
79
88
80
eventExchange := & event.ExchangeCloser {Exchange : exchange .NewExchange ()}
89
81
taskService := NewTaskService (shimCtx , shimCancel , eventExchange )
0 commit comments