mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 04:27:02 +01:00
Work around systemd race condition (#3262)
Systemd reload can't handle us reloading so quickly which causes "reload or restart" to always "restart" kanidm incorrectly.
This commit is contained in:
parent
42459f56b0
commit
64fcb61d5e
|
@ -787,8 +787,14 @@ async fn kanidm_main(
|
|||
|
||||
sctx.tls_acceptor_reload().await;
|
||||
|
||||
// Systemd freaks out if you send the ready state too fast after the
|
||||
// reload state and can kill Kanidmd as a result.
|
||||
tokio::time::sleep(std::time::Duration::from_secs(5)).await;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
let _ = sd_notify::notify(true, &[sd_notify::NotifyState::Ready]);
|
||||
|
||||
info!("Reload complete");
|
||||
}
|
||||
Some(()) = async move {
|
||||
let sigterm = tokio::signal::unix::SignalKind::user_defined1();
|
||||
|
|
Loading…
Reference in a new issue