Skip to content

Commit 2be7fb3

Browse files
committed
Forward agent logs from systemd to containerd on host for debug.
Signed-off-by: Erik Sipsma <[email protected]>
1 parent 65d3531 commit 2be7fb3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

runtime/service.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,8 @@ func (s *service) createVM(requestCtx context.Context, request *proto.CreateVMRe
476476
cmd := firecracker.VMCommandBuilder{}.
477477
WithBin(s.config.FirecrackerBinaryPath).
478478
WithSocketPath(relSockPath).
479+
WithStdout(s.logger.WriterLevel(logrus.InfoLevel)).
480+
WithStderr(s.logger.WriterLevel(logrus.ErrorLevel)).
479481
Build(s.shimCtx) // shimCtx so the VM process is only killed when the shim shuts down
480482

481483
// use shimCtx so the VM is killed when the shim shuts down

tools/image-builder/files_debootstrap/etc/systemd/system/firecracker-agent.service

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ Type=simple
2121
WorkingDirectory=/container
2222
ExecStart=/usr/local/bin/agent
2323
Restart=always
24+
StandardOutput=journal+console

0 commit comments

Comments
 (0)