You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As previously reported in balena-io/open-balena#99 the only log that gets spit out to stdout/stderr is
Systemd init system enabled.
This is the case in Kubernetes and Docker for all the open-balena-* services... which makes capturing logs quite difficult in production, especially when the container is constantly restarting.
The text was updated successfully, but these errors were encountered:
The VPN, API, Registry, and S3 containers all seem to have the same entrypoint /usr/bin/entry.sh. The script could benefit from a more detailed logs in case of errors. Maybe something like the following;
#!/bin/bashset -m
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'# No Color# Function to print error messageprint_error() {
echo -e "${RED}Error: $1${NC}"
}
# Function to handle cleanupcleanup() {
# Add cleanup tasks hereexit 1
}
# Trap error signals and call cleanup functiontrap'print_error "Script encountered an error"; cleanup' ERR
echo -e "${GREEN}Systemd init system enabled."# systemd causes a POLLHUP for console FD to occur# on startup once all other processes have stopped.# We need this sleep to ensure this doesn't occur, else# logging to the console will not work.
sleep infinity &# Example command that may fail# Uncomment to test error handling#non_existent_commandforvarin$(compgen -e);doprintf'%q=%q\n'"$var""${!var}"done> /etc/docker.env
exec /sbin/init
As previously reported in balena-io/open-balena#99 the only log that gets spit out to stdout/stderr is
This is the case in Kubernetes and Docker for all the open-balena-* services... which makes capturing logs quite difficult in production, especially when the container is constantly restarting.
The text was updated successfully, but these errors were encountered: