This means applications can just write files in their current working directory.
Plus, error messages from applications that don’t start up without a
configuration file will now show a useable path (like
/perm/home/prometheus/prometheus.yml) instead of a path in the root directory
(like /prometheus.yml).
CLONE_NEWNS breaks running containers via podman with messages such as:
ERRO[0000] error joining network namespace for container 607b4936f51907dcf534a9d7c87ffce578611257bca9d9e05abba712e4f67ad9: error retrieving network namespace at /run/netns/cni-1aa4aa68-74d2-dacf-6b86-7bbe11a0af36: unknown FS magic on "/run/netns/cni-1aa4aa68-74d2-dacf-6b86-7bbe11a0af36": 1021994
Before this change, podman worked interactively via breakglass, but not from a
gokrazy-supervised service.
related to https://github.com/gokrazy/gokrazy/issues/44
gokrazy.go: added a NewWaitForClockService() which enables waitForClock configuration
supervise.go: added waitForClock boolean in service{} and changed the behaviour from environment variable to flag
Signed-off-by: Darshil Chanpura <darshil@thatwebsite.xyz>
With gokrazy/gokrazy#106, we're sending a TERM signal to service
processes and their immediate children. Service processes are being
waited on by `cmd.Wait()`, which will reap any kernel state associated
with it. However, its child processes don't necessarily get reaped
(depending on whether its parent had time to clean up before exiting).
With this change, we explicitly wait for everything in the service
process group to exit and prevent zombies.
Currently, rebooting/upgrading the instance sends a TERM signal to all
running services, waits 1 second and then reboots. Processes that take
longer to cleanly stop can't do so.
Instead, give each service up to 15s to do a clean shutdown. Reboot 15s
after the command is sent, or after all services are stopped, whichever
comes first.
To make it easier to kill entire process tree for a service, create a
per-service process group. Stopping the service can be done by sending a
single signal to the process group.
This means the process has already exited, but should not be treated as an
error. This fixes using “gok run” for crash-looping processes, and also the stop
button in the web interface.
This allows running “gok run” for prototyping, even for software you have not
included in the currently running gokrazy image.
fixes https://github.com/gokrazy/gokrazy/issues/88
Create a /log endpoint for streaming stdout/stderr logs for processes.
Replace status page stdout/stderr to call into /log to stream logs and
live update page.
Previously, HOME was inherited from the environment of the init process, which
has HOME=/ set. Of course, / is not writable on gokrazy, so this change makes
things less strict and should therefore not break any deployments.
To configure, run the following command in an interactive shell (e.g. via
breakglass, or when mounting the permanent partition of the SD card on the
host):
mkdir /perm/remote_syslog
echo 10.0.0.76:514 > /perm/remote_syslog/target
I recommend using a (static) IP address for increased reliability, so that
remote syslog works even when DNS does not.
fixes#50