Deliver master.conf to a node that has no Varaverk on it yet, which is the node that needs it
Phase 1 exists to hand the partner its identity before the install, but the push refused any host without varaverk.cfg — so the conf could only ever reach a node that no longer needed it to be told who it was. It now resolves the remote's conf directory across both install layouts and creates the internal one when neither exists.
This commit is contained in:
@@ -412,7 +412,12 @@ require_once '/usr/local/emhttp/plugins/varaverk/include/config.php';
|
||||
if (empty(\$results)) { echo 'no remote hosts'; exit(0); }
|
||||
\$failed = 0;
|
||||
foreach (\$results as \$r) {
|
||||
echo \$r['host'] . ': ' . (\$r['ok'] ? 'pushed' : 'FAILED — ' . \$r['error']) . PHP_EOL;
|
||||
// 'seed' means the partner had no master.conf anywhere — say so, because that is the case
|
||||
// where the push carried the mesh's identity to a node that could not have known it.
|
||||
\$what = (\$r['mode'] ?? '') === 'seed'
|
||||
? 'seeded → ' . (\$r['path'] ?? '')
|
||||
: 'pushed → ' . (\$r['path'] ?? '');
|
||||
echo \$r['host'] . ': ' . (\$r['ok'] ? \$what : 'FAILED — ' . \$r['error']) . PHP_EOL;
|
||||
if (!\$r['ok']) \$failed++;
|
||||
}
|
||||
exit(\$failed > 0 ? 1 : 0);
|
||||
|
||||
Reference in New Issue
Block a user