From f58ff68ab39156d56c839083d40f6cd0b29e48ec Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Mon, 17 Aug 2026 14:43:03 -0400 Subject: [PATCH] Mesh partnership leg reads this host's own state file, not one named after the remote --- Plugin/unraid/include/partnership.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Plugin/unraid/include/partnership.php b/Plugin/unraid/include/partnership.php index c5e9f80..36e6507 100644 --- a/Plugin/unraid/include/partnership.php +++ b/Plugin/unraid/include/partnership.php @@ -391,6 +391,9 @@ function vv_pt_nodes(): array { $hosts = vv_arr_known_hosts(); // ['host1' => 'hostname', ...] $vars = vv_conf_vars(); $tsPeers = vv_pt_ts_peers(); + // Read once: the partnership state this host records for itself, used by every remote's + // mesh check below. + $localPtState = vv_pt_read_db(STATE_DIR . '/partnership_' . vv_get_hostname() . '.db')['state'] ?? ''; $ownerSlot = strtolower($vars['PARTNERSHIP_OWNER_HOST'] ?? ''); $setupDb = vv_setup_state_read(); @@ -554,7 +557,11 @@ function vv_pt_nodes(): array { 'mesh' => $isMe ? null : [ 'tailscale' => $ts['online'] === true, 'ssh' => !empty($system['unraid_version']) || !empty($system['uptime_sec']), - 'partnership' => ($ptDb['state'] ?? '') === 'ACTIVE', + // This host's own state file, not one named after the remote. A partnership is a + // single mutual fact, and each host writes it under its OWN hostname — so + // partnership_.db does not exist here, and reading it made a healthy + // partnership report as a failing leg on the owner's own page. + 'partnership' => $localPtState === 'ACTIVE', 'onboarded' => $onboardPhase >= 2, ], ];