Phase 1: resilient SSH handling + Push Conf button
partnership_onboard.sh (--phase1-only): - Test if SSH already works first (BatchMode) — skip ssh-copy-id if yes - If ssh-copy-id fails (no TTY in background): soft-fail, generate key locally, print pubkey for manual install, write HOST2_KEY_READY=true, run local setup - Only skip conf push if SSH truly unavailable; otherwise proceeds normally - Exit 0 with clear manual-step instructions instead of hard failure include/partnership.php: - Read HOST2_KEY_READY from setup.db; expose as key_ready on remote nodes pages/partnership.php: - Node card: amber "Key generated · install on HOST2 then Push Conf" badge when key_ready=true and phase=0 - "Push Conf (key installed)" button appears when key_ready=true — runs --phase1-only --skip-ssh (assumes user manually did ssh-copy-id) - vvPtPushConf() top-level function
This commit is contained in:
@@ -156,6 +156,8 @@ function vv_pt_nodes(): array {
|
||||
$onboardPhase = $isMe ? null
|
||||
: (($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)
|
||||
$localDone = $isMe && ($setupDb[$nodeIdUpper . '_LOCAL_DONE'] ?? '') === 'true';
|
||||
|
||||
@@ -172,6 +174,7 @@ function vv_pt_nodes(): array {
|
||||
'partnership' => $ptDb,
|
||||
'system' => $system,
|
||||
'onboard_phase' => $onboardPhase,
|
||||
'key_ready' => $keyReady,
|
||||
'local_done' => $localDone,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user