mirror of
https://github.com/CloudNebulaProject/reddwarf.git
synced 2026-04-10 13:20:40 +00:00
Three high-priority reliability features that close gaps identified in AUDIT.md: 1. Periodic reconciliation: PodController now runs reconcile_all() every 30s via a tokio::time::interval branch in the select! loop, detecting zone crashes between events. 2. Node health checker: New NodeHealthChecker polls node heartbeats every 15s and marks nodes with stale heartbeats (>40s) as NotReady with reason NodeStatusUnknown, preserving last_transition_time correctly. 3. Graceful pod termination: DELETE sets deletion_timestamp and phase=Terminating instead of immediate removal. Controller drives a state machine (shutdown → halt on grace expiry → deprovision → finalize) with periodic reconcile advancing it. New POST .../finalize endpoint performs actual storage removal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
43 lines
1.2 KiB
Rust
43 lines
1.2 KiB
Rust
// Allow unused assignments for diagnostic fields - they're used by the thiserror/miette macros
|
|
#![allow(unused_assignments)]
|
|
|
|
pub mod api_client;
|
|
pub mod brand;
|
|
pub mod command;
|
|
pub mod controller;
|
|
pub mod error;
|
|
#[cfg(target_os = "illumos")]
|
|
pub mod illumos;
|
|
pub mod mock;
|
|
pub mod network;
|
|
pub mod node_agent;
|
|
pub mod node_health;
|
|
pub mod storage;
|
|
pub mod traits;
|
|
pub mod types;
|
|
pub mod zone;
|
|
|
|
// Re-export primary types
|
|
pub use error::{Result, RuntimeError};
|
|
pub use mock::MockRuntime;
|
|
pub use network::{CidrConfig, IpAllocation, Ipam};
|
|
pub use traits::ZoneRuntime;
|
|
pub use types::{
|
|
ContainerProcess, DirectNicConfig, EtherstubConfig, FsMount, NetworkMode, StoragePoolConfig,
|
|
ZoneBrand, ZoneConfig, ZoneInfo, ZoneState, ZoneStorageOpts,
|
|
};
|
|
|
|
// Re-export storage types
|
|
#[cfg(target_os = "illumos")]
|
|
pub use storage::ZfsStorageEngine;
|
|
pub use storage::{MockStorageEngine, StorageEngine, VolumeInfo};
|
|
|
|
// Re-export controller and agent types
|
|
pub use api_client::ApiClient;
|
|
pub use controller::{PodController, PodControllerConfig};
|
|
pub use node_agent::{NodeAgent, NodeAgentConfig};
|
|
pub use node_health::{NodeHealthChecker, NodeHealthCheckerConfig};
|
|
|
|
// Conditionally re-export illumos runtime
|
|
#[cfg(target_os = "illumos")]
|
|
pub use illumos::IllumosRuntime;
|