Give the mirror the terminal step its half of phase 1 actually needs, instead of a button that cannot answer a password prompt
This commit is contained in:
@@ -283,11 +283,16 @@ function vv_pt_nodes(): array {
|
||||
? vv_pt_local_system()
|
||||
: ($ts['online'] && $ts['ip'] && $mySshKey ? vv_pt_remote_system($ts['ip'], $mySshKey) : []);
|
||||
|
||||
// Onboard phase from setup.db — null=self, 0=not started, 1=SSH+conf done, 2=fully onboarded
|
||||
// Onboard phase from setup.db — 0=not started, 1=SSH+conf done, 2=fully onboarded.
|
||||
//
|
||||
// Computed for self as well as for partners. The flags are keyed to the host they
|
||||
// describe, so on the mirror HOST2_PHASE*_DONE is the mirror's own progress — and the
|
||||
// mirror's action panel needs it to know whether its SSH key step is still outstanding.
|
||||
// This was forced to null for self, which left a mirror with no way to see its own
|
||||
// phase and no way to render anything but a bare button.
|
||||
$nodeIdUpper = strtoupper($slot);
|
||||
$onboardPhase = $isMe ? null
|
||||
: (($setupDb[$nodeIdUpper . '_PHASE2_DONE'] ?? '') === 'true' ? 2
|
||||
: (($setupDb[$nodeIdUpper . '_PHASE1_DONE'] ?? '') === 'true' ? 1 : 0));
|
||||
$onboardPhase = ($setupDb[$nodeIdUpper . '_PHASE2_DONE'] ?? '') === 'true' ? 2
|
||||
: (($setupDb[$nodeIdUpper . '_PHASE1_DONE'] ?? '') === 'true' ? 1 : 0);
|
||||
// key_ready: local key generated but not yet installed on HOST2 (SSH pending manual step)
|
||||
$keyReady = !$isMe && ($setupDb[$nodeIdUpper . '_KEY_READY'] ?? '') === 'true';
|
||||
// For self: local setup complete flag (set by partnership_manager --onboard --local-only)
|
||||
|
||||
Reference in New Issue
Block a user