Skip to content

Commit

Permalink
board/common: Use finit's log: to capture output from containers
Browse files Browse the repository at this point in the history
Since `conmon` only logs the output from the monitored container's
`stdout`/`stderr`, we might as well get rid of `k8s-logger`, and let
the output pass through to finit, which will then pipe the messages to
syslog.

Fix #836
  • Loading branch information
wkz committed Nov 28, 2024
1 parent 4213452 commit 627dbe4
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 8 deletions.
4 changes: 1 addition & 3 deletions board/common/rootfs/etc/finit.d/available/[email protected]
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
task name:container-%i :setup \
[2345] container -n %i setup -- Setup container %i
service <usr/container:%i> :%i pid:!/run/k8s-logger-%i.pid \
[2345] k8s-logger -cni %i -f local1 /run/containers/%i.fifo -- Logger for container %i
sysv <!pid/k8s-logger:%i> :%i pid:!/run/container:%i.pid kill:10 \
sysv <!usr/container:%i> :%i pid:!/run/container:%i.pid log:prio:local1,tag:%i kill:10 \
[2345] container -n %i -- container %i
2 changes: 1 addition & 1 deletion board/common/rootfs/usr/sbin/container
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ create()
fi

if [ -z "$logging" ]; then
logging="--log-driver k8s-file --log-opt path=/run/containers/$name.fifo"
logging="--log-driver none"
fi

# When we get here we've already fetched, or pulled, the image
Expand Down
1 change: 0 additions & 1 deletion configs/aarch64_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
BR2_PACKAGE_IITO=y
BR2_PACKAGE_K8S_LOGGER=y
BR2_PACKAGE_KEYACK=y
BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
BR2_PACKAGE_LANDING=y
Expand Down
1 change: 0 additions & 1 deletion configs/r2s_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
BR2_PACKAGE_IITO=y
BR2_PACKAGE_K8S_LOGGER=y
BR2_PACKAGE_KEYACK=y
BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
BR2_PACKAGE_LANDING=y
Expand Down
1 change: 0 additions & 1 deletion configs/riscv64_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
BR2_PACKAGE_IITO=y
BR2_PACKAGE_K8S_LOGGER=y
BR2_PACKAGE_KEYACK=y
BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
BR2_PACKAGE_LANDING=y
Expand Down
1 change: 0 additions & 1 deletion configs/x86_64_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
BR2_PACKAGE_IITO=y
BR2_PACKAGE_K8S_LOGGER=y
BR2_PACKAGE_KEYACK=y
BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
BR2_PACKAGE_LANDING=y
Expand Down

0 comments on commit 627dbe4

Please sign in to comment.