فهرست منبع

health: FLARE groups show up as a container on the controller

' sm121 health' read only 'docker ps', so a FLARE lane on dgx5-8 looked like four
free nodes. It now folds the orbit groups in (same probe the dashboard uses):
the controller node reports the group as 'Up (flare)' and the cluster reports
one busy node.
Alexander Korolev 15 ساعت پیش
والد
کامیت
7ee302e6e9
1فایلهای تغییر یافته به همراه19 افزوده شده و 0 حذف شده
  1. 19 0
      src/docker/health/collect.rs

+ 19 - 0
src/docker/health/collect.rs

@@ -126,6 +126,25 @@ async fn collect_cluster(config: &Config, cluster: &Cluster, dry_run: bool) -> H
         }
     }
 
+    // FLARE groups run without a docker container: fold them in so `health`
+    // shows the lane as busy on the controller (the dashboard does the same).
+    if config.flare.is_some() {
+        let (controller, groups) = crate::web::probe::flare_groups(config).await;
+        if let Some(ip) = controller {
+            let ctl_name = crate::web::flare_nodes::candidates(config)
+                .into_iter()
+                .find(|n| n.ssh_ip == ip)
+                .map(|n| n.name.clone());
+            for node in &mut nodes {
+                if Some(&node.name) == ctl_name.as_ref() {
+                    for (group, _) in &groups {
+                        node.containers.push(format!("{group}\tUp (flare)"));
+                    }
+                }
+            }
+        }
+    }
+
     let es = es_handle.await.unwrap_or_default();
     let verdict = verdict_for(&nodes, es.blocking_off);
     let tmux = crate::tmux::discover::tmux_health_for_cluster(config, cluster).await;