feat add mycelium reconnect logic #22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_mycelium"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#5
WIP: feat add mycelium reconnect logicto feat add mycelium reconnect logicfeat add mycelium reconnect logicto WIP: feat add mycelium reconnect logicea5b912792ecf1eca212WIP: feat add mycelium reconnect logicto feat add mycelium reconnect logic@ -4,1 +4,3 @@pub fn execute(manager: &mut VmManager, args: &InspectArgs) -> anyhow::Result<()> {pub async fn execute(manager: &mut VmManager, args: &InspectArgs) -> anyhow::Result<()> {// Run mycelium health check for running VMs before displaying state.if let Err(e) = manager.check_mycelium_health(&args.container).await {-- open for discussion
can't we make the health checking an option?
--check-healthto avoid having to wait for 10s before seeing any output even if the user's goal of the inspect command wasn't to test mycelium?
@ -533,0 +569,4 @@.and_then(|ns| ns.mycelium_ip.as_deref()).filter(|ip| !ip.is_empty());let health = match (&probed_ip, known_ip) {the match can be simplified to
as last two cases do the exact same thing, can also collapse them into single (None, _)
feat add mycelium reconnect logicto WIP: feat add mycelium reconnect logicWIP: feat add mycelium reconnect logicto feat add mycelium reconnect logic@ -22,0 +74,4 @@} else if mycelium_pid == Some(raw_pid) {eprintln!("[init] Mycelium (PID {raw_pid}) exited, scheduling restart...");if let Some(mut child) = mycelium_child.take() {let _ = child.wait();now this
child.wait()internally calls waitpid again for the same PID that was already reaped above, so the kernel returnsECHILD("no such child").so we're now doing something that always fails
fix: remove the .wait() call since it serves no purpose. The .take() already removes the Child from the Option, and dropping it is enough to clean up the Rust-side resources