diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-10-11 11:55:45 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-10-11 11:56:54 -0700 |
commit | f413e4b11794cd71cc3b2b64c8f6861f5394a3f1 (patch) | |
tree | ff9af373751ee40db971ae6dd23a6c752e8d43fe /runsc/boot/loader.go | |
parent | 0bfa03d61c7791aad03da5ac021bc60e4578858e (diff) |
Add bare bones unsupported syscall logging
This change introduces a new flags to create/run called
--user-log. Logs to this files are visible to users and
are meant to help debugging problems with their images
and containers.
For now only unsupported syscalls are sent to this log,
and only minimum support was added. We can build more
infrastructure around it as needed.
PiperOrigin-RevId: 216735977
Change-Id: I54427ca194604991c407d49943ab3680470de2d0
Diffstat (limited to 'runsc/boot/loader.go')
-rw-r--r-- | runsc/boot/loader.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go index 60b278295..0a3f67774 100644 --- a/runsc/boot/loader.go +++ b/runsc/boot/loader.go @@ -163,6 +163,8 @@ type Args struct { // TotalMem is the initial amount of total memory to report back to the // container. TotalMem uint64 + // UserLogFD is the file descriptor to write user logs to. + UserLogFD int } // New initializes a new kernel loader configured by spec. @@ -313,6 +315,10 @@ func New(args Args) (*Loader, error) { return nil, fmt.Errorf("failed to create root process: %v", err) } + if err := initCompatLogs(args.UserLogFD); err != nil { + return nil, fmt.Errorf("init compat logs: %v", err) + } + l := &Loader{ k: k, ctrl: ctrl, |