idunn-launch answers presence only: the splice, the unix child endpoint and --listener are deleted; the child binds the member bind and the probe reaches it over TCP
PresenceAcceptor serves one connection at a time within a 1 s deadline and never ends on an accept error; a dead presence thread fails the unit. Builds. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
7805c0aa9a
commit
9173a0e8e6
5 changed files with 393 additions and 532 deletions
|
|
@ -7,7 +7,7 @@ fn main() -> std::process::ExitCode {
|
|||
use anyhow::Context;
|
||||
use idunn_daemon::deployment::{
|
||||
IDUNN_PROCESS_WRITE_LEASE_ENVIRONMENT, IDUNN_RUNTIME_BUNDLE_ENVIRONMENT,
|
||||
IDUNN_RUNTIME_CANDIDATE_BIND_ENVIRONMENT,
|
||||
IDUNN_RUNTIME_CANDIDATE_BIND_ENVIRONMENT, IDUNN_RUNTIME_MEMBER_BIND_ENVIRONMENT,
|
||||
};
|
||||
use idunn_daemon::launcher::{self, *};
|
||||
|
||||
|
|
@ -26,6 +26,11 @@ fn main() -> std::process::ExitCode {
|
|||
.context("the Idunn runtime bundle is not set")?;
|
||||
let bind = std::env::var(IDUNN_RUNTIME_CANDIDATE_BIND_ENVIRONMENT)
|
||||
.context("the Idunn candidate bind is not set")?;
|
||||
let member = launcher::parse_member_bind(
|
||||
&std::env::var(IDUNN_RUNTIME_MEMBER_BIND_ENVIRONMENT)
|
||||
.context("the Idunn member bind is not set")?,
|
||||
&bind,
|
||||
)?;
|
||||
let (activation, provider) = launcher::inherited_authority_files()?;
|
||||
let authority = RuntimeAuthority::open(bundle.as_ref(), activation, provider)?;
|
||||
authority.require_candidate_bind(&bind)?;
|
||||
|
|
@ -47,10 +52,9 @@ fn main() -> std::process::ExitCode {
|
|||
sink: std::sync::Arc::new(sink),
|
||||
lease: std::sync::Arc::new(lease),
|
||||
spawner: Box::new(ProcessSpawner),
|
||||
route_bounds: RouteBounds::default(),
|
||||
health: Box::new(move |endpoint| {
|
||||
health: Box::new(move |member| {
|
||||
std::sync::Arc::new(HttpHealthProbe {
|
||||
endpoint: endpoint.clone(),
|
||||
member,
|
||||
path: health_path.clone(),
|
||||
})
|
||||
}),
|
||||
|
|
@ -64,6 +68,7 @@ fn main() -> std::process::ExitCode {
|
|||
&contract,
|
||||
authority,
|
||||
route,
|
||||
member,
|
||||
&std::env::temp_dir(),
|
||||
ports,
|
||||
&STOP,
|
||||
|
|
|
|||
|
|
@ -657,9 +657,7 @@ pub struct ProcessWriteLeaseBinding {
|
|||
|
||||
impl ProcessWriteLeaseBinding {
|
||||
pub fn lock_path(&self) -> PathBuf {
|
||||
let mut lock_path = self.record_path.as_os_str().to_os_string();
|
||||
lock_path.push(".lock");
|
||||
PathBuf::from(lock_path)
|
||||
crate::drivers::authority_lock_path(&self.record_path)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
865
src/launcher.rs
865
src/launcher.rs
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue