Phase 9 R1: repo-ensure RPC + fleet-health fixes #107

Merged
osobh merged 6 commits from phase-9-r1a-repo-ensure-rpc into main 2026-07-31 20:05:11 +00:00
Showing only changes of commit 75d822d0f2 - Show all commits
+10 -10
View File
@@ -7,7 +7,7 @@ use crate::manifest::Manifest;
use crate::snapshot;
use crate::sync::{SyncQueue, drain_sync_queue};
use crate::zfs::SystemZfs;
use anyhow::Result;
use anyhow::{Context, Result};
use chrono::Utc;
use sysinfo::{ProcessRefreshKind, RefreshKind, System};
use tokio::time::{interval, Duration};
@@ -36,7 +36,14 @@ pub async fn run(cfg: Config, mut manifest: Manifest) -> Result<()> {
let hot_dir = cfg.hot.path.clone();
let hot_max_bytes = cfg.hot.max_gb.saturating_mul(1024 * 1024 * 1024);
let blob_root = cluster_cfg.blob_store_root.clone();
match ClusterServices::start(
// Fail fast rather than degrade silently: a bind failure here is
// almost always a boot-time race against DHCP/network-online
// (the bind address isn't assigned to the interface yet). The
// systemd unit has `Restart=on-failure`; exiting lets it retry
// a few seconds later once the network is actually up, instead
// of leaving the daemon running indefinitely with no gossip,
// RPC, or Prometheus endpoint and no visible failure state.
let svc = ClusterServices::start(
cluster_cfg,
cfg.node.name.clone(),
hot_dir,
@@ -44,8 +51,7 @@ pub async fn run(cfg: Config, mut manifest: Manifest) -> Result<()> {
blob_root,
)
.await
{
Ok(svc) => {
.context("starting cluster services")?;
tracing::info!(
rpc_enabled = svc.rpc_enabled(),
blob_store_enabled = svc.blob_store_enabled(),
@@ -54,12 +60,6 @@ pub async fn run(cfg: Config, mut manifest: Manifest) -> Result<()> {
);
Some(svc)
}
Err(e) => {
tracing::error!(error = %e, "cluster services failed to start; continuing without cluster");
None
}
}
}
None => {
tracing::info!("no [cluster] section in config; running standalone");
None