nœuds réservés (M3U96b → hfmarketdata)
2 changed files +5 −0
modified
mld/config.py
+3 −0
@@ -46,6 +46,9 @@ NODES = { | |||||
| 46 | "m4md": {"cores": 10, "ram_gb": 16, "model": "Mac mini"}, # ajouté 2026-09-04 (Mac16,10, M4, 100.78.227.79) | 46 | "m4md": {"cores": 10, "ram_gb": 16, "model": "Mac mini"}, # ajouté 2026-09-04 (Mac16,10, M4, 100.78.227.79) | ||
| 47 | } | 47 | } | ||
| 48 | 48 | ||||
| 49 | +# Nœuds réservés : inéligibles au placement automatique (sauf app épinglée dessus). | ||||
| 50 | +RESERVED = {"M3U96b": "réservé à hfmarketdata (lac FirstRate Data) depuis le 2026-09-04"} | ||||
| 51 | + | ||||
| 49 | # Rôles : gateway = jamais d'app ; worker = éligible. Un nœud absent du scan est « offline ». | 52 | # Rôles : gateway = jamais d'app ; worker = éligible. Un nœud absent du scan est « offline ». | ||
| 50 | ROLES = {alias: ("gateway" if alias == GATEWAY else "worker") for alias in NODES} | 53 | ROLES = {alias: ("gateway" if alias == GATEWAY else "worker") for alias in NODES} | ||
| 51 | 54 | ||||
modified
mld/picker.py
+2 −0
@@ -10,6 +10,8 @@ def eligible(node, m, projected, exclude=()): | |||||
| 10 | return False, "rôle %s" % node.get("role") | 10 | return False, "rôle %s" % node.get("role") | ||
| 11 | if not node.get("online"): | 11 | if not node.get("online"): | ||
| 12 | return False, "hors ligne" | 12 | return False, "hors ligne" | ||
| 13 | + if a in config.RESERVED and pin != a: | ||||
| 14 | + return False, "réservé : %s" % config.RESERVED[a] | ||||
| 13 | if a in exclude or a in (m["placement"].get("avoid") or []): | 15 | if a in exclude or a in (m["placement"].get("avoid") or []): | ||
| 14 | return False, "exclu" | 16 | return False, "exclu" | ||
| 15 | if pin and pin != a: | 17 | if pin and pin != a: | ||
| 16 | 18 | ||||