Propagate new fallback model to all remaining script references
All FALLBACK_${MY_ID}_COVERS_${REMOTE_ID}_TIER* references updated to
FALLBACK_${REMOTE_ID}_TIER* across fallback_test.sh, partnership_manager.sh,
docker_update.sh, mesh_monitor.sh, and monitor.php. mesh_monitor.sh drops
the inner covering-host loop — tier data now lives in the covered host's own
conf so no cross-host scan is needed. monitor.php reads from the covered
host's conf file rather than the local host's.
This commit is contained in:
@@ -109,19 +109,17 @@ function vv_fallback_active(): array {
|
||||
if ($c) $running[strtolower($c['n'])] = $c['i'];
|
||||
}
|
||||
|
||||
// Parse FALLBACK arrays from this host's conf
|
||||
$confFile = strtolower($myId) . '.conf';
|
||||
$rawConf = vv_read_conf_raw($confFile);
|
||||
|
||||
$result = [];
|
||||
foreach ($allHostIds as $covered) {
|
||||
if ($covered === $myId) continue;
|
||||
$coveredHostname = $vars[$covered] ?? '';
|
||||
if (!$coveredHostname) continue;
|
||||
|
||||
// Covered host defines its own recovery profile — read from their conf
|
||||
$coveredRaw = vv_read_conf_raw(strtolower($covered) . '.conf');
|
||||
$names = [];
|
||||
for ($tier = 1; $tier <= 4; $tier++)
|
||||
$names = array_merge($names, vv_parse_bash_array($rawConf, "FALLBACK_{$myId}_COVERS_{$covered}_TIER{$tier}"));
|
||||
$names = array_merge($names, vv_parse_bash_array($coveredRaw, "FALLBACK_{$covered}_TIER{$tier}"));
|
||||
|
||||
$active = [];
|
||||
foreach ($names as $name) {
|
||||
|
||||
Reference in New Issue
Block a user