aurae-runtime / auraed

Secure mTLS and gRPC backed runtime daemon. Alternative to systemd. Written in Rust.
https://aurae.io/auraed
Apache License 2.0
60 stars 11 forks source link

Avoid kernel panic in case auraed stops #22

Open Vincinator opened 1 year ago

Vincinator commented 1 year ago

When auraed is started as pid1, it has no parent process in user space. It is then also called init process. In case the init process stops, the kernel does not know what to do - so it panics.

I think we shouldn't let the kernel panic, and handle the two cases:

  1. regular stop of auraed
  2. unhandled rust panic / aka auraed crashes

A simple solution is to just shutdown the system via e.g.

 syscall_reboot(libc::LINUX_REBOOT_CMD_POWER_OFF);