Call systemd's `sd_notify` when doing `--create-netns-only`
musjj opened this issue · 2 comments
I'm running vopono
as a root service, which works pretty well (despite this issue: #84?). But it would be nicer if the service can be notified when the namespace is actually created, to avoid race conditions.
Daemons can do this by calling sd_notify
. Services with Type=notify
will then respond accordingly:
https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Type=
Behavior of notify is similar to exec; however, it is expected that the service sends a "READY=1" notification message via sd_notify(3) or an equivalent call when it has finished starting up. systemd will proceed with starting follow-up units after this notification message has been sent.
You might be able to do this already with a --postup
script btw, but I'll take a look and try it out, thanks!
Thanks, passing a systemd-notify --ready
script to --postup
works pretty well for me!