mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
* fix(ssh): say what to do when a host's server setup stops on a known cause A managed SSH host whose server setup deferred always showed "Orca couldn't start its server on this host. Try connecting again.", even when a retry can't help (full disk, an interrupted update needing Recover, another Orca runtime on the host's data). The deferral code was dropped before it reached the host status. Carry the code as an optional field on the unserved status, keep the retry line only for codes a later connect clears, and name the fix for the ones a user can act on. Older hosts and thrown errors carry no code and keep the retry line. Refs #38347 * fix(ssh): drop the Recover advice a first setup can't act on Connect already runs activation recovery before deploying, and an unregistered host has no Recover control, so that code now points at Details. Soften the live-runtime line, keep waiting causes in the warning tone, and test the published code and its remedy rather than English copy. Refs #38347 * fix(ssh): treat an unreadable server build as needing Details, not a retry Refs #38347
28 lines
927 B
TypeScript
28 lines
927 B
TypeScript
/** What the user can do when managed-server setup stops on a deferral code. */
|
|
export type SshHostServerSetupRemedy =
|
|
| 'retry'
|
|
| 'free-host-space'
|
|
| 'stop-unmanaged-runtime'
|
|
| 'see-details'
|
|
|
|
// A later connect clears these by itself: another run held the host, or its daemon didn't answer a count.
|
|
const RETRYABLE_SETUP_CODES: ReadonlySet<string> = new Set([
|
|
'orcad_activation_fence_busy',
|
|
'orcad_update_terminal_census_unavailable'
|
|
])
|
|
|
|
export function sshHostServerSetupRemedy(code: string | undefined): SshHostServerSetupRemedy {
|
|
// No code: a thrown setup error, or a host that predates published codes.
|
|
if (code === undefined || RETRYABLE_SETUP_CODES.has(code)) {
|
|
return 'retry'
|
|
}
|
|
switch (code) {
|
|
case 'orcad_snapshot_space_insufficient':
|
|
return 'free-host-space'
|
|
case 'orcad_initial_runtime_live':
|
|
return 'stop-unmanaged-runtime'
|
|
default:
|
|
return 'see-details'
|
|
}
|
|
}
|