lxc / incus

Powerful system container and virtual machine manager
https://linuxcontainers.org/incus
Apache License 2.0
2.8k stars 224 forks source link

Question about logs from systemd: Is dnsmasq shutting down properly? #1392

Closed dontlaugh closed 1 week ago

dontlaugh commented 1 week ago

Incus versions are Client version: 6.7; Server version: 6.7

journalctl -fu incus then run systemctl restart incus

This shows up in the logs

systemd[1]: Stopping Incus - Daemon...
systemd[1]: incus.service: Deactivated successfully.
systemd[1]: incus.service: Unit process 94026 (dnsmasq) remains running after unit stopped.
Nov 17 19:15:15 augustus systemd[1]: Stopped Incus - Daemon.
systemd[1]: incus.service: Found left-over process 94026 (dnsmasq) in control group while starting unit. Ignoring.
systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.

dnsmasq is given a new PID on every restart, so presumably our intention is to have that process terminate w/ the service.

stgraber commented 1 week ago

Not quite. We purposefully don't terminate dnsmasq when Incus exits as we want it to keep being available for the instances running during a service restart.

However as soon as Incus starts back up, it restarts all the networks to generate an up to date dnsmasq config.

So it's perfectly normal to both see dnsmasq still run when Incus goes down and to see it get restarted when Incus starts up.