summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-08-13 21:25:12 +0000
committergVisor bot <gvisor-bot@google.com>2021-08-13 21:25:12 +0000
commit9518f1b9c1b941d5465591843944a5ef438c60b2 (patch)
tree32195054417b76652bc8c994e7b57631cacbfdee /runsc/boot
parent7d99670377713faba2ff56da646112e8ea767d87 (diff)
parent6eb8596f72f3c889de3f826b82319d41ac655829 (diff)
Merge release-20210806.0-27-g6eb8596f7 (automated)
Diffstat (limited to 'runsc/boot')
-rw-r--r--runsc/boot/controller.go6
-rw-r--r--runsc/boot/strace.go9
2 files changed, 13 insertions, 2 deletions
diff --git a/runsc/boot/controller.go b/runsc/boot/controller.go
index b0282604a..ae32b86e6 100644
--- a/runsc/boot/controller.go
+++ b/runsc/boot/controller.go
@@ -121,6 +121,11 @@ const (
UsageReduce = "Usage.Reduce"
)
+// Events related commands (see events.go for more details).
+const (
+ EventsAttachDebugEmitter = "Events.AttachDebugEmitter"
+)
+
// ControlSocketAddr generates an abstract unix socket name for the given ID.
func ControlSocketAddr(id string) string {
return fmt.Sprintf("\x00runsc-sandbox.%s", id)
@@ -161,6 +166,7 @@ func newController(fd int, l *Loader) (*controller, error) {
}
ctrl.srv.Register(&debug{})
+ ctrl.srv.Register(&control.Events{})
ctrl.srv.Register(&control.Logging{})
ctrl.srv.Register(&control.Lifecycle{l.k})
ctrl.srv.Register(&control.Fs{l.k})
diff --git a/runsc/boot/strace.go b/runsc/boot/strace.go
index c21648a32..cf5be34cd 100644
--- a/runsc/boot/strace.go
+++ b/runsc/boot/strace.go
@@ -35,9 +35,14 @@ func enableStrace(conf *config.Config) error {
}
strace.LogMaximumSize = max
+ sink := strace.SinkTypeLog
+ if conf.StraceEvent {
+ sink = strace.SinkTypeEvent
+ }
+
if len(conf.StraceSyscalls) == 0 {
- strace.EnableAll(strace.SinkTypeLog)
+ strace.EnableAll(sink)
return nil
}
- return strace.Enable(strings.Split(conf.StraceSyscalls, ","), strace.SinkTypeLog)
+ return strace.Enable(strings.Split(conf.StraceSyscalls, ","), sink)
}