fix(agent): native enroll + launchd install real-deploy shakedown
Fixes found deploying `pair --install` against the live control-plane: - native enroll tolerates hostContentSecret:null and converts the base64-DER cert + caChain[] the CP returns into PEM for frpc/keystore - launchd/systemd units use an absolute node (process.execPath) + a PATH with /usr/local/bin (bare `node` died with EX_CONFIG 78) - the agent unit now carries ENROLL_URL/RELAY_URL/STATE_DIR/LOCAL_TARGET_URL (`run` loadConfig()-validates them; missing → supervisor exited 1) 281 tests pass. Follow-up: add unit tests for the native-enroll tolerance + agent-unit env (only install node-path is covered so far).
This commit is contained in:
@@ -99,7 +99,7 @@ async function enrollNative(
|
||||
id: AgentIdentity,
|
||||
ks: Keystore,
|
||||
): Promise<NativeEnrollResult> {
|
||||
const enroll = await redeemPairingCode(cfg.enrollUrl, code, id, ks)
|
||||
const enroll = await redeemPairingCode(cfg.enrollUrl, code, id, ks, { allowMissingContentSecret: true })
|
||||
return { hostId: enroll.hostId, subdomain: enroll.subdomain }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user